ETH Price: $2,705.05 (+0.20%)
Gas: 0.82 Gwei

Contract

0x16eE6F44522dffde8070Ca83dF441ec20d84C598
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Summon57856022018-06-14 4:57:582438 days ago1528952278IN
0x16eE6F44...20d84C598
0.01 ETH0.000110925
Withdraw ETH55497582018-05-03 15:17:122479 days ago1525360632IN
0x16eE6F44...20d84C598
0 ETH0.000154455
Summon52598522018-03-15 13:31:232528 days ago1521120683IN
0x16eE6F44...20d84C598
0.01 ETH0.000110925
Summon52598522018-03-15 13:31:232528 days ago1521120683IN
0x16eE6F44...20d84C598
0.01 ETH0.000110925
Summon52597162018-03-15 12:59:252528 days ago1521118765IN
0x16eE6F44...20d84C598
0.01 ETH0.000090954.1
Summon52597022018-03-15 12:55:572528 days ago1521118557IN
0x16eE6F44...20d84C598
0.01 ETH0.000090954.1
Summon52484152018-03-13 14:27:272530 days ago1520951247IN
0x16eE6F44...20d84C598
0.01 ETH0.000110925
Summon52449412018-03-13 0:20:502531 days ago1520900450IN
0x16eE6F44...20d84C598
0.01 ETH0.000022181
Summon52438272018-03-12 19:52:262531 days ago1520884346IN
0x16eE6F44...20d84C598
0.01 ETH0.000044362
Pause52429772018-03-12 16:17:302531 days ago1520871450IN
0x16eE6F44...20d84C598
0 ETH0.000201397
Donate Skin52429112018-03-12 16:01:402531 days ago1520870500IN
0x16eE6F44...20d84C598
0 ETH0.000497315
Buy In Market52428352018-03-12 15:43:462531 days ago1520869426IN
0x16eE6F44...20d84C598
0.08 ETH0.000089383
Buy In Market52428292018-03-12 15:42:162531 days ago1520869336IN
0x16eE6F44...20d84C598
0.05 ETH0.000089383
Summon52427522018-03-12 15:26:042531 days ago1520868364IN
0x16eE6F44...20d84C598
0.012 ETH0.00063845
Clear Summon Num52426162018-03-12 14:55:472531 days ago1520866547IN
0x16eE6F44...20d84C598
0 ETH0.000195647
Summon52425332018-03-12 14:34:282531 days ago1520865268IN
0x16eE6F44...20d84C598
0.01 ETH0.000510224
Summon52425132018-03-12 14:27:502531 days ago1520864870IN
0x16eE6F44...20d84C598
0.012 ETH0.000047932
Summon52425102018-03-12 14:27:212531 days ago1520864841IN
0x16eE6F44...20d84C598
0.01 ETH0.000548284
Summon52425092018-03-12 14:26:322531 days ago1520864792IN
0x16eE6F44...20d84C598
0.012 ETH0.000047932
Summon52425052018-03-12 14:25:092531 days ago1520864709IN
0x16eE6F44...20d84C598
0.012 ETH0.00025642
Summon52425052018-03-12 14:25:092531 days ago1520864709IN
0x16eE6F44...20d84C598
0.012 ETH0.000256752
Summon52425052018-03-12 14:25:092531 days ago1520864709IN
0x16eE6F44...20d84C598
0.012 ETH0.000256332
Summon52424782018-03-12 14:18:002531 days ago1520864280IN
0x16eE6F44...20d84C598
0.012 ETH0.000256612
Summon52424782018-03-12 14:18:002531 days ago1520864280IN
0x16eE6F44...20d84C598
0.012 ETH0.000256452
Summon52424782018-03-12 14:18:002531 days ago1520864280IN
0x16eE6F44...20d84C598
0.012 ETH0.000243072
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
55497582018-05-03 15:17:122479 days ago1525360632
0x16eE6F44...20d84C598
5.49807 ETH
52428352018-03-12 15:43:462531 days ago1520869426
0x16eE6F44...20d84C598
0.07768 ETH
52428292018-03-12 15:42:162531 days ago1520869336
0x16eE6F44...20d84C598
0.04855 ETH
52419772018-03-12 12:15:102531 days ago1520856910
0x16eE6F44...20d84C598
0.01942 ETH
52419392018-03-12 12:05:102531 days ago1520856310
0x16eE6F44...20d84C598
0.04855 ETH
52418652018-03-12 11:47:082531 days ago1520855228
0x16eE6F44...20d84C598
0.004855 ETH
52417422018-03-12 11:10:372531 days ago1520853037
0x16eE6F44...20d84C598
0.07768 ETH
52415862018-03-12 10:34:462531 days ago1520850886
0x16eE6F44...20d84C598
0.01942 ETH
52415622018-03-12 10:28:322531 days ago1520850512
0x16eE6F44...20d84C598
0.01942 ETH
52415612018-03-12 10:28:272531 days ago1520850507
0x16eE6F44...20d84C598
0.004855 ETH
52415442018-03-12 10:23:092531 days ago1520850189
0x16eE6F44...20d84C598
0.00971 ETH
52415362018-03-12 10:20:522531 days ago1520850052
0x16eE6F44...20d84C598
0.014565 ETH
52407422018-03-12 7:07:562532 days ago1520838476
0x16eE6F44...20d84C598
0.03884 ETH
52404082018-03-12 5:39:592532 days ago1520833199
0x16eE6F44...20d84C598
0.004855 ETH
52404032018-03-12 5:38:262532 days ago1520833106
0x16eE6F44...20d84C598
0.004855 ETH
52403972018-03-12 5:36:342532 days ago1520832994
0x16eE6F44...20d84C598
0.004855 ETH
52363122018-03-11 13:16:202532 days ago1520774180
0x16eE6F44...20d84C598
0.04855 ETH
52362252018-03-11 12:56:412532 days ago1520773001
0x16eE6F44...20d84C598
0.04855 ETH
52361952018-03-11 12:47:392532 days ago1520772459
0x16eE6F44...20d84C598
0.00971 ETH
52361952018-03-11 12:47:392532 days ago1520772459
0x16eE6F44...20d84C598
0.04855 ETH
52361692018-03-11 12:41:282532 days ago1520772088
0x16eE6F44...20d84C598
0.04855 ETH
52361382018-03-11 12:35:002532 days ago1520771700
0x16eE6F44...20d84C598
0.04855 ETH
52360942018-03-11 12:23:492532 days ago1520771029
0x16eE6F44...20d84C598
0.4855 ETH
52360582018-03-11 12:16:172532 days ago1520770577
0x16eE6F44...20d84C598
0.4855 ETH
52355782018-03-11 10:20:372532 days ago1520763637
0x16eE6F44...20d84C598
0.01942 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SkinMinting

Compiler Version
v0.4.20+commit.3155dd80

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2018-03-10
*/

pragma solidity ^0.4.18;

contract Manager {
    address public ceo;
    address public cfo;
    address public coo;
    address public cao;

    event OwnershipTransferred(address indexed previousCeo, address indexed newCeo);
    event Pause();
    event Unpause();


    /**
    * @dev The Ownable constructor sets the original `owner` of the contract to the sender
    * account.
    */
    function Manager() public {
        coo = msg.sender;
        cfo = 0x447870C2f334Fcda68e644aE53Db3471A9f7302D;
        ceo = 0x6EC9C6fcE15DB982521eA2087474291fA5Ad6d31;
        cao = 0x391Ef2cB0c81A2C47D659c3e3e6675F550e4b183;
    }

    /**
    * @dev Throws if called by any account other than the owner.
    */
    modifier onlyCEO() {
        require(msg.sender == ceo);
        _;
    }

    modifier onlyCOO() {
        require(msg.sender == coo);
        _;
    }

    modifier onlyCAO() {
        require(msg.sender == cao);
        _;
    }

    /**
    * @dev Allows the current owner to transfer control of the contract to a newCeo.
    * @param newCeo The address to transfer ownership to.
    */
    function demiseCEO(address newCeo) public onlyCEO {
        require(newCeo != address(0));
        OwnershipTransferred(ceo, newCeo);
        ceo = newCeo;
    }

    function setCFO(address newCfo) public onlyCEO {
        require(newCfo != address(0));
        cfo = newCfo;
    }

    function setCOO(address newCoo) public onlyCEO {
        require(newCoo != address(0));
        coo = newCoo;
    }

    function setCAO(address newCao) public onlyCEO {
        require(newCao != address(0));
        cao = newCao;
    }

    bool public paused = false;


    /**
    * @dev Modifier to make a function callable only when the contract is not paused.
    */
    modifier whenNotPaused() {
        require(!paused);
        _;
    }

    /**
    * @dev Modifier to make a function callable only when the contract is paused.
    */
    modifier whenPaused() {
        require(paused);
        _;
    }

    /**
    * @dev called by the owner to pause, triggers stopped state
    */
    function pause() onlyCAO whenNotPaused public {
        paused = true;
        Pause();
    }

    /**
    * @dev called by the owner to unpause, returns to normal state
    */
    function unpause() onlyCAO whenPaused public {
        paused = false;
        Unpause();
    }
}


contract SkinBase is Manager {

    struct Skin {
        uint128 appearance;
        uint64 cooldownEndTime;
        uint64 mixingWithId;
    }

    // All skins, mapping from skin id to skin apprance
    mapping (uint256 => Skin) skins;

    // Mapping from skin id to owner
    mapping (uint256 => address) public skinIdToOwner;

    // Whether a skin is on sale
    mapping (uint256 => bool) public isOnSale;

    // Number of all total valid skins
    // skinId 0 should not correspond to any skin, because skin.mixingWithId==0 indicates not mixing
    uint256 public nextSkinId = 1;  

    // Number of skins an account owns
    mapping (address => uint256) public numSkinOfAccounts;

    // // Give some skins to init account for unit tests
    // function SkinBase() public {
    //     address account0 = 0x627306090abaB3A6e1400e9345bC60c78a8BEf57;
    //     address account1 = 0xf17f52151EbEF6C7334FAD080c5704D77216b732;

    //     // Create simple skins
    //     Skin memory skin = Skin({appearance: 0, cooldownEndTime:0, mixingWithId: 0});
    //     for (uint256 i = 1; i <= 15; i++) {
    //         if (i < 10) {
    //             skin.appearance = uint128(i);
    //             if (i < 7) { 
    //                 skinIdToOwner[i] = account0;
    //                 numSkinOfAccounts[account0] += 1;
    //             } else {  
    //                 skinIdToOwner[i] = account1;
    //                 numSkinOfAccounts[account1] += 1;
    //             }
    //         } else {  
    //             skin.appearance = uint128(block.blockhash(block.number - i + 9));
    //             skinIdToOwner[i] = account1;
    //             numSkinOfAccounts[account1] += 1;
    //         }
    //         skins[i] = skin;
    //         isOnSale[i] = false;
    //         nextSkinId += 1;
    //     }
    // } 

    // Get the i-th skin an account owns, for off-chain usage only
    function skinOfAccountById(address account, uint256 id) external view returns (uint256) {
       uint256 count = 0;
       uint256 numSkinOfAccount = numSkinOfAccounts[account];
       require(numSkinOfAccount > 0);
       require(id < numSkinOfAccount);
       for (uint256 i = 1; i < nextSkinId; i++) {
           if (skinIdToOwner[i] == account) {
               // This skin belongs to current account
               if (count == id) {
                   // This is the id-th skin of current account, a.k.a, what we need
                    return i;
               } 
               count++;
           }
        }
        revert();
    }

    // Get skin by id
    function getSkin(uint256 id) public view returns (uint128, uint64, uint64) {
        require(id > 0);
        require(id < nextSkinId);
        Skin storage skin = skins[id];
        return (skin.appearance, skin.cooldownEndTime, skin.mixingWithId);
    }

    function withdrawETH() external onlyCAO {
        cfo.transfer(this.balance);
    }
}


contract MixFormulaInterface {
    function calcNewSkinAppearance(uint128 x, uint128 y) public pure returns (uint128);

    // create random appearance
    function randomSkinAppearance(uint256 externalNum) public view returns (uint128);

    // bleach
    function bleachAppearance(uint128 appearance, uint128 attributes) public pure returns (uint128);
}

contract SkinMix is SkinBase {

    // Mix formula
    MixFormulaInterface public mixFormula;


    // Pre-paid ether for synthesization, will be returned to user if the synthesization failed (minus gas).
    uint256 public prePaidFee = 150000 * 5000000000; // (15w gas * 5 gwei)

    // Events
    event MixStart(address account, uint256 skinAId, uint256 skinBId);
    event AutoMix(address account, uint256 skinAId, uint256 skinBId, uint64 cooldownEndTime);
    event MixSuccess(address account, uint256 skinId, uint256 skinAId, uint256 skinBId);

    // Set mix formula contract address 
    function setMixFormulaAddress(address mixFormulaAddress) external onlyCOO {
        mixFormula = MixFormulaInterface(mixFormulaAddress);
    }

    // setPrePaidFee: set advance amount, only owner can call this
    function setPrePaidFee(uint256 newPrePaidFee) external onlyCOO {
        prePaidFee = newPrePaidFee;
    }

    // _isCooldownReady: check whether cooldown period has been passed
    function _isCooldownReady(uint256 skinAId, uint256 skinBId) private view returns (bool) {
        return (skins[skinAId].cooldownEndTime <= uint64(now)) && (skins[skinBId].cooldownEndTime <= uint64(now));
    }

    // _isNotMixing: check whether two skins are in another mixing process
    function _isNotMixing(uint256 skinAId, uint256 skinBId) private view returns (bool) {
        return (skins[skinAId].mixingWithId == 0) && (skins[skinBId].mixingWithId == 0);
    }

    // _setCooldownTime: set new cooldown time
    function _setCooldownEndTime(uint256 skinAId, uint256 skinBId) private {
        uint256 end = now + 5 minutes;
        // uint256 end = now;
        skins[skinAId].cooldownEndTime = uint64(end);
        skins[skinBId].cooldownEndTime = uint64(end);
    }

    // _isValidSkin: whether an account can mix using these skins
    // Make sure two things:
    // 1. these two skins do exist
    // 2. this account owns these skins
    function _isValidSkin(address account, uint256 skinAId, uint256 skinBId) private view returns (bool) {
        // Make sure those two skins belongs to this account
        if (skinAId == skinBId) {
            return false;
        }
        if ((skinAId == 0) || (skinBId == 0)) {
            return false;
        }
        if ((skinAId >= nextSkinId) || (skinBId >= nextSkinId)) {
            return false;
        }
        return (skinIdToOwner[skinAId] == account) && (skinIdToOwner[skinBId] == account);
    }

    // _isNotOnSale: whether a skin is not on sale
    function _isNotOnSale(uint256 skinId) private view returns (bool) {
        return (isOnSale[skinId] == false);
    }

    // mix  
    function mix(uint256 skinAId, uint256 skinBId) public whenNotPaused {

        // Check whether skins are valid
        require(_isValidSkin(msg.sender, skinAId, skinBId));

        // Check whether skins are neither on sale
        require(_isNotOnSale(skinAId) && _isNotOnSale(skinBId));

        // Check cooldown
        require(_isCooldownReady(skinAId, skinBId));

        // Check these skins are not in another process
        require(_isNotMixing(skinAId, skinBId));

        // Set new cooldown time
        _setCooldownEndTime(skinAId, skinBId);

        // Mark skins as in mixing
        skins[skinAId].mixingWithId = uint64(skinBId);
        skins[skinBId].mixingWithId = uint64(skinAId);

        // Emit MixStart event
        MixStart(msg.sender, skinAId, skinBId);
    }

    // Mixing auto
    function mixAuto(uint256 skinAId, uint256 skinBId) public payable whenNotPaused {
        require(msg.value >= prePaidFee);

        mix(skinAId, skinBId);

        Skin storage skin = skins[skinAId];

        AutoMix(msg.sender, skinAId, skinBId, skin.cooldownEndTime);
    }

    // Get mixing result, return the resulted skin id
    function getMixingResult(uint256 skinAId, uint256 skinBId) public whenNotPaused {
        // Check these two skins belongs to the same account
        address account = skinIdToOwner[skinAId];
        require(account == skinIdToOwner[skinBId]);

        // Check these two skins are in the same mixing process
        Skin storage skinA = skins[skinAId];
        Skin storage skinB = skins[skinBId];
        require(skinA.mixingWithId == uint64(skinBId));
        require(skinB.mixingWithId == uint64(skinAId));

        // Check cooldown
        require(_isCooldownReady(skinAId, skinBId));

        // Create new skin
        uint128 newSkinAppearance = mixFormula.calcNewSkinAppearance(skinA.appearance, skinB.appearance);
        Skin memory newSkin = Skin({appearance: newSkinAppearance, cooldownEndTime: uint64(now), mixingWithId: 0});
        skins[nextSkinId] = newSkin;
        skinIdToOwner[nextSkinId] = account;
        isOnSale[nextSkinId] = false;
        nextSkinId++;

        // Clear old skins
        skinA.mixingWithId = 0;
        skinB.mixingWithId = 0;

        // In order to distinguish created skins in minting with destroyed skins
        // skinIdToOwner[skinAId] = owner;
        // skinIdToOwner[skinBId] = owner;
        delete skinIdToOwner[skinAId];
        delete skinIdToOwner[skinBId];
        // require(numSkinOfAccounts[account] >= 2);
        numSkinOfAccounts[account] -= 1;

        MixSuccess(account, nextSkinId - 1, skinAId, skinBId);
    }
}

contract SkinMarket is SkinMix {

    // Cut ratio for a transaction
    // Values 0-10,000 map to 0%-100%
    uint128 public trCut = 400;

    // Sale orders list 
    mapping (uint256 => uint256) public desiredPrice;

    // events
    event PutOnSale(address account, uint256 skinId);
    event WithdrawSale(address account, uint256 skinId);
    event BuyInMarket(address buyer, uint256 skinId);

    // functions

    function setTrCut(uint256 newCut) external onlyCOO {
        trCut = uint128(newCut);
    }

    // Put asset on sale
    function putOnSale(uint256 skinId, uint256 price) public whenNotPaused {
        // Only owner of skin pass
        require(skinIdToOwner[skinId] == msg.sender);

        // Check whether skin is mixing 
        require(skins[skinId].mixingWithId == 0);

        // Check whether skin is already on sale
        require(isOnSale[skinId] == false);

        require(price > 0); 

        // Put on sale
        desiredPrice[skinId] = price;
        isOnSale[skinId] = true;

        // Emit the Approval event
        PutOnSale(msg.sender, skinId);
    }
  
    // Withdraw an sale order
    function withdrawSale(uint256 skinId) external whenNotPaused {
        // Check whether this skin is on sale
        require(isOnSale[skinId] == true);
        
        // Can only withdraw self's sale
        require(skinIdToOwner[skinId] == msg.sender);

        // Withdraw
        isOnSale[skinId] = false;
        desiredPrice[skinId] = 0;

        // Emit the cancel event
        WithdrawSale(msg.sender, skinId);
    }
 
    // Buy skin in market
    function buyInMarket(uint256 skinId) external payable whenNotPaused {
        // Check whether this skin is on sale
        require(isOnSale[skinId] == true);

        address seller = skinIdToOwner[skinId];

        // Check the sender isn't the seller
        require(msg.sender != seller);

        uint256 _price = desiredPrice[skinId];
        // Check whether pay value is enough
        require(msg.value >= _price);

        // Cut and then send the proceeds to seller
        uint256 sellerProceeds = _price - _computeCut(_price);

        seller.transfer(sellerProceeds);

        // Transfer skin from seller to buyer
        numSkinOfAccounts[seller] -= 1;
        skinIdToOwner[skinId] = msg.sender;
        numSkinOfAccounts[msg.sender] += 1;
        isOnSale[skinId] = false;
        desiredPrice[skinId] = 0;

        // Emit the buy event
        BuyInMarket(msg.sender, skinId);
    }

    // Compute the marketCut
    function _computeCut(uint256 _price) internal view returns (uint256) {
        return _price * trCut / 10000;
    }
}

contract SkinMinting is SkinMarket {

    // Limits the number of skins the contract owner can ever create.
    uint256 public skinCreatedLimit = 50000;
    uint256 public skinCreatedNum;

    // The summon numbers of each accouts: will be cleared every day
    mapping (address => uint256) public accoutToSummonNum;

    // Pay level of each accouts
    mapping (address => uint256) public accoutToPayLevel;
    mapping (address => uint256) public accountsLastClearTime;

    uint256 public levelClearTime = now;

    // price
    uint256 public baseSummonPrice = 1 finney;
    uint256 public bleachPrice = 300 finney;  // do not call this

    // Pay level
    uint256[5] public levelSplits = [10,
                                     20,
                                     50,
                                     100,
                                     200];
    
    uint256[6] public payMultiple = [10,
                                     12,
                                     15,
                                     20,
                                     30,
                                     40];


    // events
    event CreateNewSkin(uint256 skinId, address account);
    event Bleach(uint256 skinId, uint128 newAppearance);

    // functions

    // Set price 
    function setBaseSummonPrice(uint256 newPrice) external onlyCOO {
        baseSummonPrice = newPrice;
    }

    function setBleachPrice(uint256 newPrice) external onlyCOO {
        bleachPrice = newPrice;
    }

    // Create base skin for sell. Only owner can create
    function createSkin(uint128 specifiedAppearance, uint256 salePrice) external onlyCOO {
        require(skinCreatedNum < skinCreatedLimit);

        // Create specified skin
        // uint128 randomAppearance = mixFormula.randomSkinAppearance();
        Skin memory newSkin = Skin({appearance: specifiedAppearance, cooldownEndTime: uint64(now), mixingWithId: 0});
        skins[nextSkinId] = newSkin;
        skinIdToOwner[nextSkinId] = coo;
        isOnSale[nextSkinId] = false;

        // Emit the create event
        CreateNewSkin(nextSkinId, coo);

        // Put this skin on sale
        putOnSale(nextSkinId, salePrice);

        nextSkinId++;
        numSkinOfAccounts[coo] += 1;   
        skinCreatedNum += 1;
    }

    // Donate a skin to player. Only COO can operate
    function donateSkin(uint128 specifiedAppearance, address donee) external onlyCOO {
        Skin memory newSkin = Skin({appearance: specifiedAppearance, cooldownEndTime: uint64(now), mixingWithId: 0});
        skins[nextSkinId] = newSkin;
        skinIdToOwner[nextSkinId] = donee;
        isOnSale[nextSkinId] = false;

        // Emit the create event
        CreateNewSkin(nextSkinId, donee);

        nextSkinId++;
        numSkinOfAccounts[donee] += 1;   
        skinCreatedNum += 1;
    }

    // Summon
    function summon() external payable whenNotPaused {
        // Clear daily summon numbers
        if (accountsLastClearTime[msg.sender] == uint256(0)) {
            // This account's first time to summon, we do not need to clear summon numbers
            accountsLastClearTime[msg.sender] = now;
        } else {
            if (accountsLastClearTime[msg.sender] < levelClearTime && now > levelClearTime) {
                accoutToSummonNum[msg.sender] = 0;
                accoutToPayLevel[msg.sender] = 0;
                accountsLastClearTime[msg.sender] = now;
            }
        }

        uint256 payLevel = accoutToPayLevel[msg.sender];
        uint256 price = payMultiple[payLevel] * baseSummonPrice;
        require(msg.value >= price);

        // Create random skin
        uint128 randomAppearance = mixFormula.randomSkinAppearance(nextSkinId);
        // uint128 randomAppearance = 0;
        Skin memory newSkin = Skin({appearance: randomAppearance, cooldownEndTime: uint64(now), mixingWithId: 0});
        skins[nextSkinId] = newSkin;
        skinIdToOwner[nextSkinId] = msg.sender;
        isOnSale[nextSkinId] = false;

        // Emit the create event
        CreateNewSkin(nextSkinId, msg.sender);

        nextSkinId++;
        numSkinOfAccounts[msg.sender] += 1;
        
        accoutToSummonNum[msg.sender] += 1;
        
        // Handle the paylevel        
        if (payLevel < 5) {
            if (accoutToSummonNum[msg.sender] >= levelSplits[payLevel]) {
                accoutToPayLevel[msg.sender] = payLevel + 1;
            }
        }
    }

    // Bleach some attributes
    function bleach(uint128 skinId, uint128 attributes) external payable whenNotPaused {
        // Check whether msg.sender is owner of the skin 
        require(msg.sender == skinIdToOwner[skinId]);

        // Check whether this skin is on sale 
        require(isOnSale[skinId] == false);

        // Check whether there is enough money
        require(msg.value >= bleachPrice);

        Skin storage originSkin = skins[skinId];
        // Check whether this skin is in mixing 
        require(originSkin.mixingWithId == 0);

        uint128 newAppearance = mixFormula.bleachAppearance(originSkin.appearance, attributes);
        originSkin.appearance = newAppearance;

        // Emit bleach event
        Bleach(skinId, newAppearance);
    }

    // Our daemon will clear daily summon numbers
    function clearSummonNum() external onlyCOO {
        uint256 nextDay = levelClearTime + 1 days;
        if (now > nextDay) {
            levelClearTime = nextDay;
        }
    }
}

Contract Security Audit

Contract ABI

[{"constant":false,"inputs":[{"name":"skinId","type":"uint256"}],"name":"withdrawSale","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"baseSummonPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"skinAId","type":"uint256"},{"name":"skinBId","type":"uint256"}],"name":"getMixingResult","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"coo","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"specifiedAppearance","type":"uint128"},{"name":"donee","type":"address"}],"name":"donateSkin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newPrice","type":"uint256"}],"name":"setBleachPrice","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"accoutToPayLevel","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"cfo","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"mixFormula","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"skinIdToOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"accountsLastClearTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"mixFormulaAddress","type":"address"}],"name":"setMixFormulaAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newCoo","type":"address"}],"name":"setCOO","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"nextSkinId","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"cao","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"summon","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"skinId","type":"uint256"},{"name":"price","type":"uint256"}],"name":"putOnSale","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"bleachPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"payMultiple","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newCfo","type":"address"}],"name":"setCFO","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"trCut","outputs":[{"name":"","type":"uint128"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"skinAId","type":"uint256"},{"name":"skinBId","type":"uint256"}],"name":"mixAuto","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"desiredPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"levelSplits","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"numSkinOfAccounts","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"prePaidFee","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"levelClearTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"skinCreatedLimit","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ceo","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"specifiedAppearance","type":"uint128"},{"name":"salePrice","type":"uint256"}],"name":"createSkin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newPrePaidFee","type":"uint256"}],"name":"setPrePaidFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"id","type":"uint256"}],"name":"getSkin","outputs":[{"name":"","type":"uint128"},{"name":"","type":"uint64"},{"name":"","type":"uint64"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"},{"name":"id","type":"uint256"}],"name":"skinOfAccountById","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newPrice","type":"uint256"}],"name":"setBaseSummonPrice","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"skinAId","type":"uint256"},{"name":"skinBId","type":"uint256"}],"name":"mix","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newCao","type":"address"}],"name":"setCAO","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"accoutToSummonNum","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"skinId","type":"uint256"}],"name":"buyInMarket","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"newCut","type":"uint256"}],"name":"setTrCut","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"clearSummonNum","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdrawETH","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"skinId","type":"uint128"},{"name":"attributes","type":"uint128"}],"name":"bleach","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"skinCreatedNum","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"isOnSale","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newCeo","type":"address"}],"name":"demiseCEO","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"skinId","type":"uint256"},{"indexed":false,"name":"account","type":"address"}],"name":"CreateNewSkin","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"skinId","type":"uint256"},{"indexed":false,"name":"newAppearance","type":"uint128"}],"name":"Bleach","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"account","type":"address"},{"indexed":false,"name":"skinId","type":"uint256"}],"name":"PutOnSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"account","type":"address"},{"indexed":false,"name":"skinId","type":"uint256"}],"name":"WithdrawSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"buyer","type":"address"},{"indexed":false,"name":"skinId","type":"uint256"}],"name":"BuyInMarket","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"account","type":"address"},{"indexed":false,"name":"skinAId","type":"uint256"},{"indexed":false,"name":"skinBId","type":"uint256"}],"name":"MixStart","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"account","type":"address"},{"indexed":false,"name":"skinAId","type":"uint256"},{"indexed":false,"name":"skinBId","type":"uint256"},{"indexed":false,"name":"cooldownEndTime","type":"uint64"}],"name":"AutoMix","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"account","type":"address"},{"indexed":false,"name":"skinId","type":"uint256"},{"indexed":false,"name":"skinAId","type":"uint256"},{"indexed":false,"name":"skinBId","type":"uint256"}],"name":"MixSuccess","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousCeo","type":"address"},{"indexed":true,"name":"newCeo","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","type":"event"}]

606060409081526003805460a060020a60ff021916905560016007556602aa1efb94e000600a55600b80546001608060020a03191661019017905561c350600d554260125566038d7ea4c68000601355670429d069189e000060145560a090519081016040908152600a8252601460208301526032908201526064606082015260c86080820152620000969060159060056200015a565b5060c06040519081016040908152600a8252600c6020830152600f9082015260146060820152601e6080820152602860a0820152620000da90601a906006620001a2565b5060028054600160a060020a033316600160a060020a03199182161790915560018054821673447870c2f334fcda68e644ae53db3471a9f7302d179055600080548216736ec9c6fce15db982521ea2087474291fa5ad6d311790556003805490911673391ef2cb0c81a2c47d659c3e3e6675f550e4b183179055620001f7565b826005810192821562000190579160200282015b8281111562000190578251829060ff169055916020019190600101906200016e565b506200019e929150620001d7565b5090565b826006810192821562000190579160200282018281111562000190578251829060ff169055916020019190600101906200016e565b620001f491905b808211156200019e5760008155600101620001de565b90565b61205580620002076000396000f30060606040526004361061022c5763ffffffff60e060020a60003504166302ce8ac9811461023157806304f7a69d1461024957806305d258dd1461026e57806307cdee4914610287578063148222cf146102b657806314ca6e01146102e15780631e52f7b5146102f75780631ed20347146103165780632038e80a146103295780632104fa0b1461033c578063278fcffa14610352578063287efb57146103715780632ba73c15146103905780632c9ea1b7146103af5780632f94afba146103c2578063363dd19e146103d557806336f7992b146103dd5780633a21ec8d146103f65780633ef5f368146104095780633f4ba83a1461041f5780634e0a33791461043257806356f91399146104515780635b548ab4146104805780635c975abb1461048e5780636885edcd146104b55780636c779d57146104cb578063733efe16146104e15780637b04b1f8146105005780637b6e7603146105135780638456cb591461052657806387934ec814610539578063908921fc1461054c578063959b3fa01461055f57806397b3116e1461058157806398e4f58114610597578063a02a34cd146105e5578063ab5706ee14610607578063b4bb58fb1461061d578063bca3eb2414610636578063cf39bff514610655578063d46aa61014610674578063dba9a8a21461067f578063dd50e9d414610695578063e086e5ec146106a8578063ede02b71146106bb578063efce828e146106d5578063f0f2805f146106e8578063fde17733146106fe575b600080fd5b341561023c57600080fd5b61024760043561071d565b005b341561025457600080fd5b61025c6107e8565b60405190815260200160405180910390f35b341561027957600080fd5b6102476004356024356107ee565b341561029257600080fd5b61029a610b0d565b604051600160a060020a03909116815260200160405180910390f35b34156102c157600080fd5b6102476001608060020a0360043516600160a060020a0360243516610b1c565b34156102ec57600080fd5b610247600435610ccd565b341561030257600080fd5b61025c600160a060020a0360043516610ced565b341561032157600080fd5b61029a610cff565b341561033457600080fd5b61029a610d0e565b341561034757600080fd5b61029a600435610d1d565b341561035d57600080fd5b61025c600160a060020a0360043516610d38565b341561037c57600080fd5b610247600160a060020a0360043516610d4a565b341561039b57600080fd5b610247600160a060020a0360043516610d87565b34156103ba57600080fd5b61025c610dd9565b34156103cd57600080fd5b61029a610ddf565b610247610dee565b34156103e857600080fd5b610247600435602435611157565b341561040157600080fd5b61025c611259565b341561041457600080fd5b61025c60043561125f565b341561042a57600080fd5b610247611273565b341561043d57600080fd5b610247600160a060020a03600435166112f2565b341561045c57600080fd5b610464611344565b6040516001608060020a03909116815260200160405180910390f35b610247600435602435611353565b341561049957600080fd5b6104a161141b565b604051901515815260200160405180910390f35b34156104c057600080fd5b61025c60043561142b565b34156104d657600080fd5b61025c60043561143d565b34156104ec57600080fd5b61025c600160a060020a036004351661144a565b341561050b57600080fd5b61025c61145c565b341561051e57600080fd5b61025c611462565b341561053157600080fd5b610247611468565b341561054457600080fd5b61025c6114ec565b341561055757600080fd5b61029a6114f2565b341561056a57600080fd5b6102476001608060020a0360043516602435611501565b341561058c57600080fd5b6102476004356116d7565b34156105a257600080fd5b6105ad6004356116f7565b6040516001608060020a03909316835267ffffffffffffffff9182166020840152166040808301919091526060909101905180910390f35b34156105f057600080fd5b61025c600160a060020a0360043516602435611752565b341561061257600080fd5b6102476004356117de565b341561062857600080fd5b6102476004356024356117fe565b341561064157600080fd5b610247600160a060020a036004351661192e565b341561066057600080fd5b61025c600160a060020a0360043516611980565b610247600435611992565b341561068a57600080fd5b610247600435611b11565b34156106a057600080fd5b610247611b57565b34156106b357600080fd5b610247611b90565b6102476001608060020a0360043581169060243516611be6565b34156106e057600080fd5b61025c611d9a565b34156106f357600080fd5b6104a1600435611da0565b341561070957600080fd5b610247600160a060020a0360043516611db5565b60035460a060020a900460ff161561073457600080fd5b60008181526006602052604090205460ff16151560011461075457600080fd5b60008181526005602052604090205433600160a060020a0390811691161461077b57600080fd5b6000818152600660209081526040808320805460ff19169055600c909152808220919091557f0d0e55f4e2a77f6d27f3ecdbe59fb9f5b4f4de61c10b3243e99905d4763baab6903390839051600160a060020a03909216825260208201526040908101905180910390a150565b60135481565b6000806000806107fc612009565b60035460a060020a900460ff161561081357600080fd5b60008781526005602052604080822054888352912054600160a060020a03918216965016851461084257600080fd5b60008781526004602052604080822088835291208154919550935067ffffffffffffffff80881660c060020a909204161461087c57600080fd5b825467ffffffffffffffff88811660c060020a909204161461089d57600080fd5b6108a78787611e43565b15156108b257600080fd5b60095484548454600160a060020a039092169163a1c1519a916001608060020a03908116911660006040516020015260405160e060020a63ffffffff85160281526001608060020a03928316600482015291166024820152604401602060405180830381600087803b151561092657600080fd5b6102c65a03f1151561093757600080fd5b505050604051805190509150606060405190810160409081526001608060020a038416825267ffffffffffffffff4216602080840191909152600082840181905260075481526004909152209091508190815181546fffffffffffffffffffffffffffffffff19166001608060020a03919091161781556020820151815467ffffffffffffffff91909116608060020a0277ffffffffffffffff00000000000000000000000000000000199091161781556040820151815467ffffffffffffffff9190911660c060020a02600160c060020a03918216179091556007805460009081526005602081815260408084208054600160a060020a038e16600160a060020a031991821681179092558654865260068452828620805460ff19169055865460010187558c5488168d558b549097168b558e85529282528084208054871690558c8452808420805490961690955590825260089052829020805460001990810190915590547fac81ba101131fd51da2d33fa7ef506549a1f53c29fad06382d86b257fc5888d9935088929101908a908a90518085600160a060020a0316600160a060020a0316815260200184815260200183815260200182815260200194505050505060405180910390a150505050505050565b600254600160a060020a031681565b610b24612009565b60025433600160a060020a03908116911614610b3f57600080fd5b606060405190810160409081526001608060020a038516825267ffffffffffffffff4216602080840191909152600082840181905260075481526004909152209091508190815181546fffffffffffffffffffffffffffffffff19166001608060020a03919091161781556020820151815467ffffffffffffffff91909116608060020a0277ffffffffffffffff000000000000000000000000000000001990911617815560408201518154600160c060020a031660c060020a67ffffffffffffffff9290921691909102179055506007805460009081526005602090815260408083208054600160a060020a031916600160a060020a03881617905583548352600690915290819020805460ff1916905590547fe02fda003a77c2554ac72a53bbeacf3440a1e22212fd46e961fc2b123294dd4e91849051918252600160a060020a031660208201526040908101905180910390a150600780546001908101909155600160a060020a039091166000908152600860205260409020805482019055600e8054909101905550565b60025433600160a060020a03908116911614610ce857600080fd5b601455565b60106020526000908152604090205481565b600154600160a060020a031681565b600954600160a060020a031681565b600560205260009081526040902054600160a060020a031681565b60116020526000908152604090205481565b60025433600160a060020a03908116911614610d6557600080fd5b60098054600160a060020a031916600160a060020a0392909216919091179055565b60005433600160a060020a03908116911614610da257600080fd5b600160a060020a0381161515610db757600080fd5b60028054600160a060020a031916600160a060020a0392909216919091179055565b60075481565b600354600160a060020a031681565b6000806000610dfb612009565b60035460a060020a900460ff1615610e1257600080fd5b600160a060020a0333166000908152601160205260409020541515610e5157600160a060020a0333166000908152601160205260409020429055610eb3565b601254600160a060020a033316600090815260116020526040902054108015610e7b575060125442115b15610eb357600160a060020a0333166000908152600f6020908152604080832083905560108252808320839055601190915290204290555b600160a060020a033316600090815260106020526040902054601354909450601a8560068110610edf57fe5b01540292503483901015610ef257600080fd5b600954600754600160a060020a0390911690633d24081c9060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b1515610f4957600080fd5b6102c65a03f11515610f5a57600080fd5b505050604051805190509150606060405190810160409081526001608060020a038416825267ffffffffffffffff4216602080840191909152600082840181905260075481526004909152209091508190815181546fffffffffffffffffffffffffffffffff19166001608060020a03919091161781556020820151815467ffffffffffffffff91909116608060020a0277ffffffffffffffff000000000000000000000000000000001990911617815560408201518154600160c060020a031660c060020a67ffffffffffffffff9290921691909102179055506007805460009081526005602090815260408083208054600160a060020a03191633600160a060020a0381169190911790915584548452600690925291829020805460ff1916905591547fe02fda003a77c2554ac72a53bbeacf3440a1e22212fd46e961fc2b123294dd4e92909151918252600160a060020a031660208201526040908101905180910390a1600780546001908101909155600160a060020a0333166000908152600860209081526040808320805485019055600f9091529020805490910190556005841015611151576015846005811061111257fe5b0154600160a060020a0333166000908152600f60205260409020541061115157600160a060020a03331660009081526010602052604090206001850190555b50505050565b60035460a060020a900460ff161561116e57600080fd5b60008281526005602052604090205433600160a060020a0390811691161461119557600080fd5b60008281526004602052604090205460c060020a900467ffffffffffffffff16156111bf57600080fd5b60008281526006602052604090205460ff16156111db57600080fd5b600081116111e857600080fd5b6000828152600c60209081526040808320849055600690915290819020805460ff191660011790557f490fad3155d80ff0da3b5e2676a2b0121544ec602724a25f5f41157862ad582a903390849051600160a060020a03909216825260208201526040908101905180910390a15050565b60145481565b601a816006811061126c57fe5b0154905081565b60035433600160a060020a0390811691161461128e57600080fd5b60035460a060020a900460ff1615156112a657600080fd5b6003805474ff0000000000000000000000000000000000000000191690557f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b60005433600160a060020a0390811691161461130d57600080fd5b600160a060020a038116151561132257600080fd5b60018054600160a060020a031916600160a060020a0392909216919091179055565b600b546001608060020a031681565b60035460009060a060020a900460ff161561136d57600080fd5b600a5434101561137c57600080fd5b61138683836117fe565b6004600084815260200190815260200160002090507fa0b8773c576b204aa8e6df0ff342f9b00297636e99dce8a2103e8d966e767f843384848460000160109054906101000a900467ffffffffffffffff16604051600160a060020a039094168452602084019290925260408084019190915267ffffffffffffffff90911660608301526080909101905180910390a1505050565b60035460a060020a900460ff1681565b600c6020526000908152604090205481565b6015816005811061126c57fe5b60086020526000908152604090205481565b600a5481565b60125481565b60035433600160a060020a0390811691161461148357600080fd5b60035460a060020a900460ff161561149a57600080fd5b6003805474ff0000000000000000000000000000000000000000191660a060020a1790557f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b600d5481565b600054600160a060020a031681565b611509612009565b60025433600160a060020a0390811691161461152457600080fd5b600d54600e541061153457600080fd5b606060405190810160409081526001608060020a038516825267ffffffffffffffff4216602080840191909152600082840181905260075481526004909152209091508190815181546fffffffffffffffffffffffffffffffff19166001608060020a03919091161781556020820151815467ffffffffffffffff91909116608060020a0277ffffffffffffffff00000000000000000000000000000000199091161781556040820151815467ffffffffffffffff9190911660c060020a02600160c060020a0390911617905550600280546007805460009081526005602090815260408083208054600160a060020a031916600160a060020a0396871617905583548352600690915290819020805460ff19169055905492547fe02fda003a77c2554ac72a53bbeacf3440a1e22212fd46e961fc2b123294dd4e9392169051918252600160a060020a031660208201526040908101905180910390a161169d60075483611157565b5050600780546001908101909155600254600160a060020a03166000908152600860205260409020805482019055600e8054909101905550565b60025433600160a060020a039081169116146116f257600080fd5b600a55565b600080808080851161170857600080fd5b600754851061171657600080fd5b505050600091825250600460205260409020546001608060020a0381169167ffffffffffffffff608060020a830481169260c060020a90041690565b600160a060020a03821660009081526008602052604081205481908180821161177a57600080fd5b81851061178657600080fd5b5060015b60075481101561022c57600081815260056020526040902054600160a060020a03878116911614156117cd57848314156117c6578093506117d5565b6001909201915b60010161178a565b50505092915050565b60025433600160a060020a039081169116146117f957600080fd5b601355565b60035460a060020a900460ff161561181557600080fd5b611820338383611e9e565b151561182b57600080fd5b61183482611f32565b8015611844575061184481611f32565b151561184f57600080fd5b6118598282611e43565b151561186457600080fd5b61186e8282611f48565b151561187957600080fd5b6118838282611f97565b600082815260046020526040808220805467ffffffffffffffff80861660c060020a908102600160c060020a03938416179093558585529383902080549487169092029316929092179091557f4e1f80806ba228e25ed6f726450eaef48a5ae8e2604ca9156f554699acdd883f90339084908490518084600160a060020a0316600160a060020a03168152602001838152602001828152602001935050505060405180910390a15050565b60005433600160a060020a0390811691161461194957600080fd5b600160a060020a038116151561195e57600080fd5b60038054600160a060020a031916600160a060020a0392909216919091179055565b600f6020526000908152604090205481565b6003546000908190819060a060020a900460ff16156119b057600080fd5b60008481526006602052604090205460ff1615156001146119d057600080fd5b600084815260056020526040902054600160a060020a03908116935033168314156119fa57600080fd5b6000848152600c602052604090205491503482901015611a1957600080fd5b611a2282611ff0565b82039050600160a060020a03831681156108fc0282604051600060405180830381858888f193505050501515611a5757600080fd5b600160a060020a0383811660009081526008602081815260408084208054600019019055888452600582528084208054600160a060020a0319163396871690811790915584529181528183208054600101905587835260068152818320805460ff19169055600c9052808220919091557ff6de23dfab6e1deb1628f4b40e812dcd594adc18c2738b3606e6525e8b63d4ca9190869051600160a060020a03909216825260208201526040908101905180910390a150505050565b60025433600160a060020a03908116911614611b2c57600080fd5b600b80546fffffffffffffffffffffffffffffffff19166001608060020a0392909216919091179055565b60025460009033600160a060020a03908116911614611b7557600080fd5b6012546201518001905080421115611b8d5760128190555b50565b60035433600160a060020a03908116911614611bab57600080fd5b600154600160a060020a039081169030163180156108fc0290604051600060405180830381858888f193505050501515611be457600080fd5b565b600354600090819060a060020a900460ff1615611c0257600080fd5b6001608060020a03841660009081526005602052604090205433600160a060020a03908116911614611c3357600080fd5b6001608060020a03841660009081526006602052604090205460ff1615611c5957600080fd5b601454341015611c6857600080fd5b6001608060020a0384166000908152600460205260409020805490925060c060020a900467ffffffffffffffff1615611ca057600080fd5b6009548254600160a060020a039091169063250312ce906001608060020a03168560006040516020015260405160e060020a63ffffffff85160281526001608060020a03928316600482015291166024820152604401602060405180830381600087803b1515611d0f57600080fd5b6102c65a03f11515611d2057600080fd5b505050604051805183546fffffffffffffffffffffffffffffffff19166001608060020a03821617845591507fb1682fb0e70bb59dd5b0108ba10dad2a8cfa888b95b829260d566317d5d70fcb905084826040516001608060020a039283168152911660208201526040908101905180910390a150505050565b600e5481565b60066020526000908152604090205460ff1681565b60005433600160a060020a03908116911614611dd057600080fd5b600160a060020a0381161515611de557600080fd5b600054600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008054600160a060020a031916600160a060020a0392909216919091179055565b60008281526004602052604081205467ffffffffffffffff428116608060020a9092041611801590611e97575060008281526004602052604090205467ffffffffffffffff428116608060020a9092041611155b9392505050565b600081831415611eb057506000611e97565b821580611ebb575081155b15611ec857506000611e97565b60075483101580611edb57506007548210155b15611ee857506000611e97565b600083815260056020526040902054600160a060020a038581169116148015611f2a5750600082815260056020526040902054600160a060020a038581169116145b949350505050565b60009081526006602052604090205460ff161590565b60008281526004602052604081205460c060020a900467ffffffffffffffff16158015611e9757505060009081526004602052604090205460c060020a900467ffffffffffffffff1615919050565b600091825260046020526040808320805467ffffffffffffffff61012c420116608060020a0277ffffffffffffffff00000000000000000000000000000000199182168117909255928452922080549091169091179055565b600b546127106001608060020a03909116919091020490565b6060604051908101604090815260008083526020830181905290820152905600a165627a7a72305820653573af33fe4c9cd9cf962db547fd359ec27c3ef65b99fca024e217014368a70029

Deployed Bytecode

0x60606040526004361061022c5763ffffffff60e060020a60003504166302ce8ac9811461023157806304f7a69d1461024957806305d258dd1461026e57806307cdee4914610287578063148222cf146102b657806314ca6e01146102e15780631e52f7b5146102f75780631ed20347146103165780632038e80a146103295780632104fa0b1461033c578063278fcffa14610352578063287efb57146103715780632ba73c15146103905780632c9ea1b7146103af5780632f94afba146103c2578063363dd19e146103d557806336f7992b146103dd5780633a21ec8d146103f65780633ef5f368146104095780633f4ba83a1461041f5780634e0a33791461043257806356f91399146104515780635b548ab4146104805780635c975abb1461048e5780636885edcd146104b55780636c779d57146104cb578063733efe16146104e15780637b04b1f8146105005780637b6e7603146105135780638456cb591461052657806387934ec814610539578063908921fc1461054c578063959b3fa01461055f57806397b3116e1461058157806398e4f58114610597578063a02a34cd146105e5578063ab5706ee14610607578063b4bb58fb1461061d578063bca3eb2414610636578063cf39bff514610655578063d46aa61014610674578063dba9a8a21461067f578063dd50e9d414610695578063e086e5ec146106a8578063ede02b71146106bb578063efce828e146106d5578063f0f2805f146106e8578063fde17733146106fe575b600080fd5b341561023c57600080fd5b61024760043561071d565b005b341561025457600080fd5b61025c6107e8565b60405190815260200160405180910390f35b341561027957600080fd5b6102476004356024356107ee565b341561029257600080fd5b61029a610b0d565b604051600160a060020a03909116815260200160405180910390f35b34156102c157600080fd5b6102476001608060020a0360043516600160a060020a0360243516610b1c565b34156102ec57600080fd5b610247600435610ccd565b341561030257600080fd5b61025c600160a060020a0360043516610ced565b341561032157600080fd5b61029a610cff565b341561033457600080fd5b61029a610d0e565b341561034757600080fd5b61029a600435610d1d565b341561035d57600080fd5b61025c600160a060020a0360043516610d38565b341561037c57600080fd5b610247600160a060020a0360043516610d4a565b341561039b57600080fd5b610247600160a060020a0360043516610d87565b34156103ba57600080fd5b61025c610dd9565b34156103cd57600080fd5b61029a610ddf565b610247610dee565b34156103e857600080fd5b610247600435602435611157565b341561040157600080fd5b61025c611259565b341561041457600080fd5b61025c60043561125f565b341561042a57600080fd5b610247611273565b341561043d57600080fd5b610247600160a060020a03600435166112f2565b341561045c57600080fd5b610464611344565b6040516001608060020a03909116815260200160405180910390f35b610247600435602435611353565b341561049957600080fd5b6104a161141b565b604051901515815260200160405180910390f35b34156104c057600080fd5b61025c60043561142b565b34156104d657600080fd5b61025c60043561143d565b34156104ec57600080fd5b61025c600160a060020a036004351661144a565b341561050b57600080fd5b61025c61145c565b341561051e57600080fd5b61025c611462565b341561053157600080fd5b610247611468565b341561054457600080fd5b61025c6114ec565b341561055757600080fd5b61029a6114f2565b341561056a57600080fd5b6102476001608060020a0360043516602435611501565b341561058c57600080fd5b6102476004356116d7565b34156105a257600080fd5b6105ad6004356116f7565b6040516001608060020a03909316835267ffffffffffffffff9182166020840152166040808301919091526060909101905180910390f35b34156105f057600080fd5b61025c600160a060020a0360043516602435611752565b341561061257600080fd5b6102476004356117de565b341561062857600080fd5b6102476004356024356117fe565b341561064157600080fd5b610247600160a060020a036004351661192e565b341561066057600080fd5b61025c600160a060020a0360043516611980565b610247600435611992565b341561068a57600080fd5b610247600435611b11565b34156106a057600080fd5b610247611b57565b34156106b357600080fd5b610247611b90565b6102476001608060020a0360043581169060243516611be6565b34156106e057600080fd5b61025c611d9a565b34156106f357600080fd5b6104a1600435611da0565b341561070957600080fd5b610247600160a060020a0360043516611db5565b60035460a060020a900460ff161561073457600080fd5b60008181526006602052604090205460ff16151560011461075457600080fd5b60008181526005602052604090205433600160a060020a0390811691161461077b57600080fd5b6000818152600660209081526040808320805460ff19169055600c909152808220919091557f0d0e55f4e2a77f6d27f3ecdbe59fb9f5b4f4de61c10b3243e99905d4763baab6903390839051600160a060020a03909216825260208201526040908101905180910390a150565b60135481565b6000806000806107fc612009565b60035460a060020a900460ff161561081357600080fd5b60008781526005602052604080822054888352912054600160a060020a03918216965016851461084257600080fd5b60008781526004602052604080822088835291208154919550935067ffffffffffffffff80881660c060020a909204161461087c57600080fd5b825467ffffffffffffffff88811660c060020a909204161461089d57600080fd5b6108a78787611e43565b15156108b257600080fd5b60095484548454600160a060020a039092169163a1c1519a916001608060020a03908116911660006040516020015260405160e060020a63ffffffff85160281526001608060020a03928316600482015291166024820152604401602060405180830381600087803b151561092657600080fd5b6102c65a03f1151561093757600080fd5b505050604051805190509150606060405190810160409081526001608060020a038416825267ffffffffffffffff4216602080840191909152600082840181905260075481526004909152209091508190815181546fffffffffffffffffffffffffffffffff19166001608060020a03919091161781556020820151815467ffffffffffffffff91909116608060020a0277ffffffffffffffff00000000000000000000000000000000199091161781556040820151815467ffffffffffffffff9190911660c060020a02600160c060020a03918216179091556007805460009081526005602081815260408084208054600160a060020a038e16600160a060020a031991821681179092558654865260068452828620805460ff19169055865460010187558c5488168d558b549097168b558e85529282528084208054871690558c8452808420805490961690955590825260089052829020805460001990810190915590547fac81ba101131fd51da2d33fa7ef506549a1f53c29fad06382d86b257fc5888d9935088929101908a908a90518085600160a060020a0316600160a060020a0316815260200184815260200183815260200182815260200194505050505060405180910390a150505050505050565b600254600160a060020a031681565b610b24612009565b60025433600160a060020a03908116911614610b3f57600080fd5b606060405190810160409081526001608060020a038516825267ffffffffffffffff4216602080840191909152600082840181905260075481526004909152209091508190815181546fffffffffffffffffffffffffffffffff19166001608060020a03919091161781556020820151815467ffffffffffffffff91909116608060020a0277ffffffffffffffff000000000000000000000000000000001990911617815560408201518154600160c060020a031660c060020a67ffffffffffffffff9290921691909102179055506007805460009081526005602090815260408083208054600160a060020a031916600160a060020a03881617905583548352600690915290819020805460ff1916905590547fe02fda003a77c2554ac72a53bbeacf3440a1e22212fd46e961fc2b123294dd4e91849051918252600160a060020a031660208201526040908101905180910390a150600780546001908101909155600160a060020a039091166000908152600860205260409020805482019055600e8054909101905550565b60025433600160a060020a03908116911614610ce857600080fd5b601455565b60106020526000908152604090205481565b600154600160a060020a031681565b600954600160a060020a031681565b600560205260009081526040902054600160a060020a031681565b60116020526000908152604090205481565b60025433600160a060020a03908116911614610d6557600080fd5b60098054600160a060020a031916600160a060020a0392909216919091179055565b60005433600160a060020a03908116911614610da257600080fd5b600160a060020a0381161515610db757600080fd5b60028054600160a060020a031916600160a060020a0392909216919091179055565b60075481565b600354600160a060020a031681565b6000806000610dfb612009565b60035460a060020a900460ff1615610e1257600080fd5b600160a060020a0333166000908152601160205260409020541515610e5157600160a060020a0333166000908152601160205260409020429055610eb3565b601254600160a060020a033316600090815260116020526040902054108015610e7b575060125442115b15610eb357600160a060020a0333166000908152600f6020908152604080832083905560108252808320839055601190915290204290555b600160a060020a033316600090815260106020526040902054601354909450601a8560068110610edf57fe5b01540292503483901015610ef257600080fd5b600954600754600160a060020a0390911690633d24081c9060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b1515610f4957600080fd5b6102c65a03f11515610f5a57600080fd5b505050604051805190509150606060405190810160409081526001608060020a038416825267ffffffffffffffff4216602080840191909152600082840181905260075481526004909152209091508190815181546fffffffffffffffffffffffffffffffff19166001608060020a03919091161781556020820151815467ffffffffffffffff91909116608060020a0277ffffffffffffffff000000000000000000000000000000001990911617815560408201518154600160c060020a031660c060020a67ffffffffffffffff9290921691909102179055506007805460009081526005602090815260408083208054600160a060020a03191633600160a060020a0381169190911790915584548452600690925291829020805460ff1916905591547fe02fda003a77c2554ac72a53bbeacf3440a1e22212fd46e961fc2b123294dd4e92909151918252600160a060020a031660208201526040908101905180910390a1600780546001908101909155600160a060020a0333166000908152600860209081526040808320805485019055600f9091529020805490910190556005841015611151576015846005811061111257fe5b0154600160a060020a0333166000908152600f60205260409020541061115157600160a060020a03331660009081526010602052604090206001850190555b50505050565b60035460a060020a900460ff161561116e57600080fd5b60008281526005602052604090205433600160a060020a0390811691161461119557600080fd5b60008281526004602052604090205460c060020a900467ffffffffffffffff16156111bf57600080fd5b60008281526006602052604090205460ff16156111db57600080fd5b600081116111e857600080fd5b6000828152600c60209081526040808320849055600690915290819020805460ff191660011790557f490fad3155d80ff0da3b5e2676a2b0121544ec602724a25f5f41157862ad582a903390849051600160a060020a03909216825260208201526040908101905180910390a15050565b60145481565b601a816006811061126c57fe5b0154905081565b60035433600160a060020a0390811691161461128e57600080fd5b60035460a060020a900460ff1615156112a657600080fd5b6003805474ff0000000000000000000000000000000000000000191690557f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b60005433600160a060020a0390811691161461130d57600080fd5b600160a060020a038116151561132257600080fd5b60018054600160a060020a031916600160a060020a0392909216919091179055565b600b546001608060020a031681565b60035460009060a060020a900460ff161561136d57600080fd5b600a5434101561137c57600080fd5b61138683836117fe565b6004600084815260200190815260200160002090507fa0b8773c576b204aa8e6df0ff342f9b00297636e99dce8a2103e8d966e767f843384848460000160109054906101000a900467ffffffffffffffff16604051600160a060020a039094168452602084019290925260408084019190915267ffffffffffffffff90911660608301526080909101905180910390a1505050565b60035460a060020a900460ff1681565b600c6020526000908152604090205481565b6015816005811061126c57fe5b60086020526000908152604090205481565b600a5481565b60125481565b60035433600160a060020a0390811691161461148357600080fd5b60035460a060020a900460ff161561149a57600080fd5b6003805474ff0000000000000000000000000000000000000000191660a060020a1790557f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b600d5481565b600054600160a060020a031681565b611509612009565b60025433600160a060020a0390811691161461152457600080fd5b600d54600e541061153457600080fd5b606060405190810160409081526001608060020a038516825267ffffffffffffffff4216602080840191909152600082840181905260075481526004909152209091508190815181546fffffffffffffffffffffffffffffffff19166001608060020a03919091161781556020820151815467ffffffffffffffff91909116608060020a0277ffffffffffffffff00000000000000000000000000000000199091161781556040820151815467ffffffffffffffff9190911660c060020a02600160c060020a0390911617905550600280546007805460009081526005602090815260408083208054600160a060020a031916600160a060020a0396871617905583548352600690915290819020805460ff19169055905492547fe02fda003a77c2554ac72a53bbeacf3440a1e22212fd46e961fc2b123294dd4e9392169051918252600160a060020a031660208201526040908101905180910390a161169d60075483611157565b5050600780546001908101909155600254600160a060020a03166000908152600860205260409020805482019055600e8054909101905550565b60025433600160a060020a039081169116146116f257600080fd5b600a55565b600080808080851161170857600080fd5b600754851061171657600080fd5b505050600091825250600460205260409020546001608060020a0381169167ffffffffffffffff608060020a830481169260c060020a90041690565b600160a060020a03821660009081526008602052604081205481908180821161177a57600080fd5b81851061178657600080fd5b5060015b60075481101561022c57600081815260056020526040902054600160a060020a03878116911614156117cd57848314156117c6578093506117d5565b6001909201915b60010161178a565b50505092915050565b60025433600160a060020a039081169116146117f957600080fd5b601355565b60035460a060020a900460ff161561181557600080fd5b611820338383611e9e565b151561182b57600080fd5b61183482611f32565b8015611844575061184481611f32565b151561184f57600080fd5b6118598282611e43565b151561186457600080fd5b61186e8282611f48565b151561187957600080fd5b6118838282611f97565b600082815260046020526040808220805467ffffffffffffffff80861660c060020a908102600160c060020a03938416179093558585529383902080549487169092029316929092179091557f4e1f80806ba228e25ed6f726450eaef48a5ae8e2604ca9156f554699acdd883f90339084908490518084600160a060020a0316600160a060020a03168152602001838152602001828152602001935050505060405180910390a15050565b60005433600160a060020a0390811691161461194957600080fd5b600160a060020a038116151561195e57600080fd5b60038054600160a060020a031916600160a060020a0392909216919091179055565b600f6020526000908152604090205481565b6003546000908190819060a060020a900460ff16156119b057600080fd5b60008481526006602052604090205460ff1615156001146119d057600080fd5b600084815260056020526040902054600160a060020a03908116935033168314156119fa57600080fd5b6000848152600c602052604090205491503482901015611a1957600080fd5b611a2282611ff0565b82039050600160a060020a03831681156108fc0282604051600060405180830381858888f193505050501515611a5757600080fd5b600160a060020a0383811660009081526008602081815260408084208054600019019055888452600582528084208054600160a060020a0319163396871690811790915584529181528183208054600101905587835260068152818320805460ff19169055600c9052808220919091557ff6de23dfab6e1deb1628f4b40e812dcd594adc18c2738b3606e6525e8b63d4ca9190869051600160a060020a03909216825260208201526040908101905180910390a150505050565b60025433600160a060020a03908116911614611b2c57600080fd5b600b80546fffffffffffffffffffffffffffffffff19166001608060020a0392909216919091179055565b60025460009033600160a060020a03908116911614611b7557600080fd5b6012546201518001905080421115611b8d5760128190555b50565b60035433600160a060020a03908116911614611bab57600080fd5b600154600160a060020a039081169030163180156108fc0290604051600060405180830381858888f193505050501515611be457600080fd5b565b600354600090819060a060020a900460ff1615611c0257600080fd5b6001608060020a03841660009081526005602052604090205433600160a060020a03908116911614611c3357600080fd5b6001608060020a03841660009081526006602052604090205460ff1615611c5957600080fd5b601454341015611c6857600080fd5b6001608060020a0384166000908152600460205260409020805490925060c060020a900467ffffffffffffffff1615611ca057600080fd5b6009548254600160a060020a039091169063250312ce906001608060020a03168560006040516020015260405160e060020a63ffffffff85160281526001608060020a03928316600482015291166024820152604401602060405180830381600087803b1515611d0f57600080fd5b6102c65a03f11515611d2057600080fd5b505050604051805183546fffffffffffffffffffffffffffffffff19166001608060020a03821617845591507fb1682fb0e70bb59dd5b0108ba10dad2a8cfa888b95b829260d566317d5d70fcb905084826040516001608060020a039283168152911660208201526040908101905180910390a150505050565b600e5481565b60066020526000908152604090205460ff1681565b60005433600160a060020a03908116911614611dd057600080fd5b600160a060020a0381161515611de557600080fd5b600054600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008054600160a060020a031916600160a060020a0392909216919091179055565b60008281526004602052604081205467ffffffffffffffff428116608060020a9092041611801590611e97575060008281526004602052604090205467ffffffffffffffff428116608060020a9092041611155b9392505050565b600081831415611eb057506000611e97565b821580611ebb575081155b15611ec857506000611e97565b60075483101580611edb57506007548210155b15611ee857506000611e97565b600083815260056020526040902054600160a060020a038581169116148015611f2a5750600082815260056020526040902054600160a060020a038581169116145b949350505050565b60009081526006602052604090205460ff161590565b60008281526004602052604081205460c060020a900467ffffffffffffffff16158015611e9757505060009081526004602052604090205460c060020a900467ffffffffffffffff1615919050565b600091825260046020526040808320805467ffffffffffffffff61012c420116608060020a0277ffffffffffffffff00000000000000000000000000000000199182168117909255928452922080549091169091179055565b600b546127106001608060020a03909116919091020490565b6060604051908101604090815260008083526020830181905290820152905600a165627a7a72305820653573af33fe4c9cd9cf962db547fd359ec27c3ef65b99fca024e217014368a70029

Swarm Source

bzzr://653573af33fe4c9cd9cf962db547fd359ec27c3ef65b99fca024e217014368a7

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.