Sponsored Link:  Dmarket – first cross-game trading platform based on blockchain technology. Check the Whitepaper.
Contract Overview
ETH Balance: 0.000000001 Ether
ETH USD Value: less than $0.01 (@ $320.83/ETH)
No Of Transactions: 12 txns
  Latest 12 txns

TxHash Age From To Value [TxFee]
0x4d007877f3fa0a0a01c67adacf8defb29277c81ac36dcd41a2635a1e1c404b25112 days 4 hrs ago0xb44caabed82251ca7da063e99622a6f1f8104687  IN   0xda5c805cfcf76ccc44ba616e0898ef1e332860630 Ether0.08
0xd2eafffd05274055bde99edf9c5a422965b5873cd6dc3ad2d98780ba8320020c112 days 4 hrs ago0x32c5c3b5d2eb4a60ba0e3eacc69a51d8356fc7e0  IN   0xda5c805cfcf76ccc44ba616e0898ef1e332860630.000000001 Ether0.0005874
0xea546158bb53c5576165d42f33c56356b0537f617a2481a421e88a170b3fdac6112 days 4 hrs ago0xb44caabed82251ca7da063e99622a6f1f8104687  IN   0xda5c805cfcf76ccc44ba616e0898ef1e332860630 Ether0.024
0x488628f4a780e5ae620031e1b72afcda07b7b2da9f5fbc18ddb1076288893542112 days 4 hrs ago0xb44caabed82251ca7da063e99622a6f1f8104687  IN   0xda5c805cfcf76ccc44ba616e0898ef1e332860630 Ether0.00654696
0xdbb6055c2a0cdabd363ec9359cc08ab3fac39eb4911f39e30768e967e7d25b65119 days 4 hrs ago0xb44caabed82251ca7da063e99622a6f1f8104687  IN   0xda5c805cfcf76ccc44ba616e0898ef1e332860630 Ether0.00772848
0xb5b86a89b77515d7b9102d6198a7c26d94d6ea08491d27beedfa0b26eac7a2a2119 days 12 hrs ago0x32c5c3b5d2eb4a60ba0e3eacc69a51d8356fc7e0  IN   0xda5c805cfcf76ccc44ba616e0898ef1e3328606320,777.6 Ether0.00067994
0x918a59858375a1ff11dec9c375999005916b9436f4f47cb94a06c35dde885f8f119 days 13 hrs ago0x32c5c3b5d2eb4a60ba0e3eacc69a51d8356fc7e0  IN   0xda5c805cfcf76ccc44ba616e0898ef1e332860637,000 Ether0.00067994
0xab68e267eb5afcfdde3b11652cb0d69454b6ebcee3ed5a5f688890ec6d9da79f120 days 16 hrs ago0x32c5c3b5d2eb4a60ba0e3eacc69a51d8356fc7e0  IN   0xda5c805cfcf76ccc44ba616e0898ef1e3328606330,000 Ether0.00067994
0xb2805fab1597eae6789b74ddc103ab0af10bb5c3c892cf813cadb47e6b0f97a3120 days 17 hrs ago0x32c5c3b5d2eb4a60ba0e3eacc69a51d8356fc7e0  IN   0xda5c805cfcf76ccc44ba616e0898ef1e3328606319,626 Ether0.00067994
0xfd50c9c90a19a0d2e197c78f86ce06ca248299522d8ae75eb4b596bdf08599e5120 days 21 hrs ago0x32c5c3b5d2eb4a60ba0e3eacc69a51d8356fc7e0  IN   0xda5c805cfcf76ccc44ba616e0898ef1e33286063374 Ether0.00067994
0x50a4c2666ab34fe2655783bc09784eb8271ec3eaa64c45c3c2cc837430bfea58120 days 23 hrs ago0x32c5c3b5d2eb4a60ba0e3eacc69a51d8356fc7e0  IN   0xda5c805cfcf76ccc44ba616e0898ef1e332860630.1 Ether0.00127994
0x4f3bab4a6de0fc43d1ac74d609931dbb5e0408ac1a33d08c1a728fbb73681e8a121 days 15 hrs ago0xb44caabed82251ca7da063e99622a6f1f8104687  IN    Contract Creation0 Ether0.02317744
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
  Latest 1 Internal Transaction

ParentTxHash Block Age From To Value
0xdbb6055c2a0cdabd363ec9359cc08ab3fac39eb4911f39e30768e967e7d25b653593277119 days 4 hrs ago0xda5c805cfcf76ccc44ba616e0898ef1e332860630x1d0dcc8d8bcafa8e8502beaeef6cbd49d3affcdc77,777.7 Ether
[ Download CSV Export  ] 
Warning: The compiled contract might be susceptible to DelegateCallReturnValue (low-severity), ECRecoverMalformedInput (medium-severity), SkipEmptyStringLiteral (low-severity) Solidity compiler bugs.

Contract Source Code Verified
Contract Name: BiddingRing
Compiler Version: v0.4.10+commit.f0d539ae
Optimization Enabled: No
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts
pragma solidity 0.4.10;


contract DutchAuction {
    function bid(address receiver) payable returns (uint);
    function claimTokens(address receiver);
    function stage() returns (uint);
    function calcTokenPrice() constant public returns (uint);
    Token public gnosisToken;
}


contract Token {
    function transfer(address to, uint256 value) returns (bool success);
    function balanceOf(address owner) constant returns (uint256 balance);
}


contract BiddingRing {

    event BidSubmission(address indexed sender, uint256 amount);
    event RefundSubmission(address indexed sender, uint256 amount);
    event RefundReceived(uint256 amount);

    uint public constant AUCTION_STARTED = 2;
    uint public constant TRADING_STARTED = 4;

    DutchAuction public dutchAuction;
    Token public gnosisToken;
    uint public maxPrice;
    uint public totalContributions;
    uint public totalTokens;
    uint public totalBalance;
    mapping (address => uint) public contributions;
    Stages public stage;

    enum Stages {
        ContributionsCollection,
        ContributionsSent,
        TokensClaimed
    }

    modifier atStage(Stages _stage) {
        if (stage != _stage)
            throw;
        _;
    }

    function BiddingRing(address _dutchAuction, uint _maxPrice)
        public
    {
        if (_dutchAuction == 0 || _maxPrice == 0)
            throw;
        dutchAuction = DutchAuction(_dutchAuction);
        gnosisToken = dutchAuction.gnosisToken();
        if (address(gnosisToken) == 0)
            throw;
        maxPrice = _maxPrice;
        stage = Stages.ContributionsCollection;
    }

    function()
        public
        payable
    {
        if (msg.sender == address(dutchAuction))
            RefundReceived(msg.value);
        else if (stage == Stages.ContributionsCollection)
            contribute();
        else if (stage == Stages.TokensClaimed)
            transfer();
        else
            throw;
    }

    function contribute()
        public
        payable
        atStage(Stages.ContributionsCollection)
    {
        contributions[msg.sender] += msg.value;
        totalContributions += msg.value;
        BidSubmission(msg.sender, msg.value);
    }

    function refund()
        public
        atStage(Stages.ContributionsCollection)
    {
        uint contribution = contributions[msg.sender];
        contributions[msg.sender] = 0;
        totalContributions -= contribution;
        RefundSubmission(msg.sender, contribution);
        if (!msg.sender.send(contribution))
            throw;
    }

    function bidProxy()
        public
        atStage(Stages.ContributionsCollection)
    {
        // Check auction has started and price is below max price
        if (dutchAuction.stage() != AUCTION_STARTED || dutchAuction.calcTokenPrice() > maxPrice)
            throw;
        // Send all money to auction contract
        stage = Stages.ContributionsSent;
        dutchAuction.bid.value(this.balance)(0);
    }

    function claimProxy()
        public
        atStage(Stages.ContributionsSent)
    {
        // Auction is over
        if (dutchAuction.stage() != TRADING_STARTED)
            throw;
        dutchAuction.claimTokens(0);
        totalTokens = gnosisToken.balanceOf(this);
        totalBalance = this.balance;
        stage = Stages.TokensClaimed;
    }

    function transfer()
        public
        atStage(Stages.TokensClaimed)
        returns (uint amount)
    {
        uint contribution = contributions[msg.sender];
        contributions[msg.sender] = 0;
        // Calc. percentage of tokens for sender
        amount = totalTokens * contribution / totalContributions;
        gnosisToken.transfer(msg.sender, amount);
        // Send possible refund share, don't throw to make sure tokens are transferred
        uint refund = totalBalance * contribution / totalContributions;
        if (refund > 0)
            msg.sender.send(refund);
    }
}

  Contract ABI  
[{"constant":true,"inputs":[],"name":"AUCTION_STARTED","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"claimProxy","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalContributions","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"contributions","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"refund","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"gnosisToken","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalTokens","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"transfer","outputs":[{"name":"amount","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"TRADING_STARTED","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"dutchAuction","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"stage","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"contribute","outputs":[],"payable":true,"type":"function"},{"constant":true,"inputs":[],"name":"maxPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"bidProxy","outputs":[],"payable":false,"type":"function"},{"inputs":[{"name":"_dutchAuction","type":"address"},{"name":"_maxPrice","type":"uint256"}],"payable":false,"type":"constructor"},{"payable":true,"type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"BidSubmission","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"RefundSubmission","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amount","type":"uint256"}],"name":"RefundReceived","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6060604052341561000c57fe5b6040516040806110fb833981016040528080519060200190919080519060200190919050505b60008273ffffffffffffffffffffffffffffffffffffffff1614806100575750600081145b156100625760006000fd5b81600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166360fd902c6000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401809050602060405180830381600087803b151561013157fe5b60325a03f1151561013e57fe5b50505060405180519050600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156101cf5760006000fd5b806002819055506000600760006101000a81548160ff021916908360028111156101f557fe5b02179055505b50505b610eee8061020d6000396000f300606060405236156100d9576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806329fcfeb0146101f357806330b66cee1461021957806337c089231461022b57806342e94c9014610251578063590e1ae31461029b57806360fd902c146102ad5780637e1c0c09146102ff5780638a4068dd146103255780639ae8ac3c1461034b5780639da0d7d414610371578063ad7a672f146103c3578063c040e6b8146103e9578063d7bb99ba1461041d578063e38d6b5c14610427578063ed9a3ac11461044d575b6101f15b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561016f577f5f9145ef1ebbf201190a609438526a6db7cdbd1c7a06a90825b66f8dfe65c2fb346040518082815260200191505060405180910390a16101ee565b6000600281111561017c57fe5b600760009054906101000a900460ff16600281111561019757fe5b14156101aa576101a561045f565b6101ed565b600260028111156101b757fe5b600760009054906101000a900460ff1660028111156101d257fe5b14156101e6576101e0610545565b506101ec565b60006000fd5b5b5b5b565b005b34156101fb57fe5b61020361075d565b6040518082815260200191505060405180910390f35b341561022157fe5b610229610762565b005b341561023357fe5b61023b610a26565b6040518082815260200191505060405180910390f35b341561025957fe5b610285600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610a2c565b6040518082815260200191505060405180910390f35b34156102a357fe5b6102ab610a44565b005b34156102b557fe5b6102bd610bab565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561030757fe5b61030f610bd1565b6040518082815260200191505060405180910390f35b341561032d57fe5b610335610545565b6040518082815260200191505060405180910390f35b341561035357fe5b61035b610bd7565b6040518082815260200191505060405180910390f35b341561037957fe5b610381610bdc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156103cb57fe5b6103d3610c02565b6040518082815260200191505060405180910390f35b34156103f157fe5b6103f9610c08565b6040518082600281111561040957fe5b60ff16815260200191505060405180910390f35b61042561045f565b005b341561042f57fe5b610437610c1b565b6040518082815260200191505060405180910390f35b341561045557fe5b61045d610c21565b005b600080600281111561046d57fe5b600760009054906101000a900460ff16600281111561048857fe5b1415156104955760006000fd5b34600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550346003600082825401925050819055503373ffffffffffffffffffffffffffffffffffffffff167f9c89e828e6cee6374b68147c9e753e41746aad98ba255a527a4fc0ac1868bff9346040518082815260200191505060405180910390a25b5b50565b600060006000600280600281111561055957fe5b600760009054906101000a900460ff16600281111561057457fe5b1415156105815760006000fd5b600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205492506000600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600354836004540281151561061957fe5b049350600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33866000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15156106e657fe5b60325a03f115156106f357fe5b5050506040518051905050600354836005540281151561070f57fe5b0491506000821115610755573373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051809050600060405180830381858888f19350505050505b5b5b50505090565b600281565b600180600281111561077057fe5b600760009054906101000a900460ff16600281111561078b57fe5b1415156107985760006000fd5b6004600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c040e6b86000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401809050602060405180830381600087803b151561082857fe5b60325a03f1151561083557fe5b5050506040518051905014151561084c5760006000fd5b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663df8de3e760006040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b15156108f057fe5b60325a03f115156108fd57fe5b505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15156109c257fe5b60325a03f115156109cf57fe5b505050604051805190506004819055503073ffffffffffffffffffffffffffffffffffffffff16316005819055506002600760006101000a81548160ff02191690836002811115610a1c57fe5b02179055505b5b50565b60035481565b60066020528060005260406000206000915090505481565b60006000806002811115610a5457fe5b600760009054906101000a900460ff166002811115610a6f57fe5b141515610a7c5760006000fd5b600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205491506000600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816003600082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff167f5d87eb33a71045c24cb2e99ed9335ed748942197a95c73788324ff369f500217836040518082815260200191505060405180910390a23373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051809050600060405180830381858888f193505050501515610ba55760006000fd5b5b5b5050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60045481565b600481565b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b600760009054906101000a900460ff1681565b60025481565b6000806002811115610c2f57fe5b600760009054906101000a900460ff166002811115610c4a57fe5b141515610c575760006000fd5b6002600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c040e6b86000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401809050602060405180830381600087803b1515610ce757fe5b60325a03f11515610cf457fe5b50505060405180519050141580610db05750600254600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166339f64b526000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401809050602060405180830381600087803b1515610d9757fe5b60325a03f11515610da457fe5b50505060405180519050115b15610dbb5760006000fd5b6001600760006101000a81548160ff02191690836002811115610dda57fe5b0217905550600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639cf5453d3073ffffffffffffffffffffffffffffffffffffffff163160006000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1681526020019150506020604051808303818588803b1515610ea357fe5b61235a5a03f11515610eb157fe5b5050505060405180519050505b5b505600a165627a7a7230582099ace63fbeba169486bfab3372ef09a6b77853600dbad67e8698c87c1236712500290000000000000000000000001d0dcc8d8bcafa8e8502beaeef6cbd49d3affcdc0000000000000000000000000000000000000000000000000de0b6b3a7640000

    Constructor Arguments (ABI-encoded and appended to the ByteCode above)
0000000000000000000000001d0dcc8d8bcafa8e8502beaeef6cbd49d3affcdc0000000000000000000000000000000000000000000000000de0b6b3a7640000

-----Decoded View---------------
Found 2 constructor arguments :
Arg [0] : 0000000000000000000000001d0dcc8d8bcafa8e8502beaeef6cbd49d3affcdc
Arg [1] : 0000000000000000000000000000000000000000000000000de0b6b3a7640000


   Swarm Source:
bzzr://99ace63fbeba169486bfab3372ef09a6b77853600dbad67e8698c87c12367125
View All
Block Age txn Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "downvote" button for any spammy posts, and the "upvote" for interesting conversations.