Contract Overview
Balance: 0 Ether
Ether Value: $0
Transactions: 4 txns
 Latest 4 txns

TxHash Age From To Value [TxFee]
0x6cb53b7251ef00e39220c548e0e3fdb5619b60181b81a0ba859518898f4a6724307 days 17 hrs ago0x6d9d26f4346c55e934d4d1d0eb6e6a542939a7b6  IN   0x75f97d98eb49989f9af40c49a7a1eb32767214f50 Ether0.001278203448
0x8d9bf713716975220481d35083e315131d4f2662db9d53d7bc590aff18547a79367 days 18 hrs ago0x8356d271ab09354276c17419e2ffcad8118c7f60  IN   0x75f97d98eb49989f9af40c49a7a1eb32767214f50 Ether0.001306224
0x23b6bd52c8ed1c7568fd1dea6b46d834f4fd7dd748c9f2492af4addf49cdaf17428 days 3 hrs ago0x63d9e95c372f99ca930769958f7d8e3e9b4815c8  IN   0x75f97d98eb49989f9af40c49a7a1eb32767214f50 Ether0.001457946
0xb16cfc9154f5740bc8a64e063a13398223b85c2eca8e2ce89c91e8ac09fb85e1428 days 17 hrs ago0x7df1702da741da556d57646bbb8bb8026d0082c2  IN    Contract Creation0 Ether0.009482697
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
View All
ParentTxHash Block Age From To Value
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), NestedArrayFunctionCallDecoder (medium-severity), ZeroFunctionSelector (very low-severity) SolidityCompiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: VoteOnMyTeslaColor
Compiler Text: v0.4.15+commit.bbb8e64f
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.0;

/// @title PonzICO
/// @author acityinohio
contract PonzICO {
    address public owner;
    uint public total;
    mapping (address => uint) public invested;
    mapping (address => uint) public balances;

    //function signatures
    function PonzICO() { }
    function withdraw() { }
    function reinvest() { }
    function invest() payable { }
    
}

/// @title VoteOnMyTeslaColor EXCLUSIVELY FOR SUPER-ACCREDITED PONZICO INVESTORS
/// @author acityinohio
contract VoteOnMyTeslaColor {
    address public owner;
    enum Color { SolidBlack, MidnightSilverMetallic, DeepBlueMetallic, SilverMetallic, RedMultiCoat }
    mapping (uint8 => uint32) public votes;
    mapping (address => bool) public voted;

    //log vote
    event LogVotes(Color color, uint num);
    //log winner
    event LogWinner(Color color);

    //hardcode production PonzICO address
    PonzICO ponzico = PonzICO(0x1ce7986760ADe2BF0F322f5EF39Ce0DE3bd0C82B);

    //just for me
    modifier ownerOnly() {require(msg.sender == owner); _; }
    //only valid colors, as specified by the Model3 production details
    modifier isValidColor(uint8 color) {require(color < uint8(5)); _; }
    //Only super-accredited ponzICO investors (0.1 ETH per vote) can vote
    //Can only vote once! Unless you want to pay to play...
    modifier superAccreditedInvestor() { require(ponzico.invested(msg.sender) >= 0.1 ether && !voted[msg.sender]); _;}

    //constructor for initializing VoteOnMyTeslaColor
    //the owner is the genius who made the revolutionary smart contract PonzICO
    //obviously blue starts with 10 votes because it is objectively the BEST color
    function VoteOnMyTeslaColor() {
        owner = msg.sender;
        //YOURE MY BOY BLUE
        votes[uint8(2)] = 10;
    }

    //SUPER ACCREDITED INVESTORS ONLY, YOU CAN ONLY VOTE ONCE
    function vote(uint8 color)
    superAccreditedInvestor()
    isValidColor(color)
    {
        //0.1 ETH invested in PonzICO per vote, truncated
        uint32 num = uint32(ponzico.invested(msg.sender) / (0.1 ether));
        votes[color] += num;
        voted[msg.sender] = true;
        LogVotes(Color(color), num);
    }
    
    //pay to vote again! I don't care!
    //...but it'll cost you 1 ether for me to look the other way, wink wink
    function itsLikeChicago() payable {
        require(voted[msg.sender] && msg.value >= 1 ether);
        voted[msg.sender] = false;
    }

    function winnovate()
    ownerOnly()
    {
        Color winner = Color.SolidBlack;
        for (uint8 choice = 1; choice < 5; choice++) {
            if (votes[choice] > votes[choice-1]) {
                winner = Color(choice);
            }
        }
        LogWinner(winner);
        //keeping dat blockchain bloat on check
        selfdestruct(owner);
    }
}

    Contract ABI  
[{"constant":false,"inputs":[],"name":"itsLikeChicago","outputs":[],"payable":true,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"winnovate","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"voted","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"color","type":"uint8"}],"name":"vote","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint8"}],"name":"votes","outputs":[{"name":"","type":"uint32"}],"payable":false,"type":"function"},{"inputs":[],"payable":false,"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"color","type":"uint8"},{"indexed":false,"name":"num","type":"uint256"}],"name":"LogVotes","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"color","type":"uint8"}],"name":"LogWinner","type":"event"}]

  Contract Creation Code Switch To Opcodes View
606060405260038054600160a060020a031916731ce7986760ade2bf0f322f5ef39ce0de3bd0c82b179055341561003557600080fd5b5b60008054600160a060020a033316600160a060020a03199091161781556002905260016020527fd9d16d34ffb15ba3a3d852f0d403e2ce1d691fb54de27ac87cd2f993f3ec330f805463ffffffff1916600a1790555b5b6104d38061009c6000396000f3006060604052361561005c5763ffffffff60e060020a600035041663611f1fbe81146100615780638da5cb5b1461006b57806399b632e41461009a578063aec2ccae146100af578063b3f98adc146100e2578063c1b43357146100fd575b600080fd5b61006961012f565b005b341561007657600080fd5b61007e61018d565b604051600160a060020a03909116815260200160405180910390f35b34156100a557600080fd5b61006961019c565b005b34156100ba57600080fd5b6100ce600160a060020a0360043516610272565b604051901515815260200160405180910390f35b34156100ed57600080fd5b61006960ff60043516610287565b005b341561010857600080fd5b61011660ff6004351661048f565b60405163ffffffff909116815260200160405180910390f35b600160a060020a03331660009081526002602052604090205460ff16801561015f5750670de0b6b3a76400003410155b151561016a57600080fd5b600160a060020a0333166000908152600260205260409020805460ff191690555b565b600054600160a060020a031681565b60008054819033600160a060020a039081169116146101ba57600080fd5b506000905060015b60058160ff16101561021a5760ff6000198201811660009081526001602052604080822054928416825290205463ffffffff91821691161115610211578060ff16600481111561020e57fe5b91505b5b6001016101c2565b7f2646bce6bbf54d9dbd90d77b8deb90b5e28458370a8bcd4856c96509ac3f4e37826040518082600481111561024c57fe5b60ff16815260200191505060405180910390a1600054600160a060020a0316ff5b5b5050565b60026020526000908152604090205460ff1681565b60035460009067016345785d8a000090600160a060020a03166366b3f6bf33846040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15156102ec57600080fd5b6102c65a03f115156102fd57600080fd5b505050604051805190501015801561032e5750600160a060020a03331660009081526002602052604090205460ff16155b151561033957600080fd5b81600560ff82161061034a57600080fd5b60035467016345785d8a000090600160a060020a03166366b3f6bf3360006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15156103ad57600080fd5b6102c65a03f115156103be57600080fd5b505050604051805190508115156103d157fe5b60ff85166000818152600160208181526040808420805463ffffffff1981169890970463ffffffff97881681019097169790971790965533600160a060020a0316835260029052939020805460ff191690931790925592507f644e4e4e141efc1efdca148366c3ebfdf403f50c45398bbe122fe58ee989ef2d90600481111561045657fe5b836040518083600481111561046757fe5b60ff1681526020018263ffffffff1681526020019250505060405180910390a15b5b505b5050565b60016020526000908152604090205463ffffffff16815600a165627a7a723058203df08aae266f35f69e7d379e000758733dbea3f10d49bea08ac5a56f6cdec8bf0029

   Swarm Source:
bzzr://3df08aae266f35f69e7d379e000758733dbea3f10d49bea08ac5a56f6cdec8bf

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.