ETH Price: $2,352.28 (+0.18%)

Contract

0x04190EF3D7C91C881D335725B6BB5d45236B22AE
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60806040142938372022-02-28 9:33:07927 days ago1646040787IN
 Create: LootClassification
0 ETH0.0397446143.2342267

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
LootClassification

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 1 : LootClassification.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/*
LootCLassification.sol
Lootverse Utility contract to classifyitems found in Loot (For Adventurers) Bags.

See OG Loot Contract for lists of all possible items.
https://etherscan.io/address/0xff9c1b15b16263c61d017ee9f65c50e4ae0113d7

All functions are made public incase they are useful but the expected use is through the main
3 classification functions:

- getRank()
- getClass()
- getMaterial()
- getLevel()

Each of these take an item 'Type' (weapon, chest, head etc.) 
and an index into the list of all possible items of that type as found in the OG Loot contract.

The LootComponents(0x3eb43b1545a360d1D065CB7539339363dFD445F3) contract can be used to get item indexes from Loot bag tokenIDs.
The code from LootComponents is copied into this contract and rewritten for gas efficiency
So a typical use might be:

// get weapon classification for loot bag# 1234
{
    LootClassification classification = 
        LootClassification(_TBD_);

    uint256[5] memory weaponComponents = classification.weaponComponents(1234);
    uint256 index = weaponComponents[0];

    LootClassification.Type itemType = LootClassification.Type.Weapon;
    LootClassification.Class class = classification.getClass(itemType, index);
    LootClassification.Material material = classification.getMaterial(itemType, index);
    uint256 rank = classification.getRank(itemType, index);
    uint256 level = classification.getLevel(itemType, index);
}
*/
contract LootClassification
{
    enum Type
    {
        Weapon,
        Chest,
        Head,
        Waist,
        Foot,
        Hand,
        Neck,
        Ring
    }
    
    enum Material
    {
        Heavy,
        Medium,
        Dark,
        Light,
        Cloth,
        Hide,
        Metal,
        Jewellery
    }
    
    enum Class
    {
        Warrior,
        Hunter,
        Mage,
        Any
    }
    
    uint256 constant public WeaponLastHeavyIndex = 4;
    uint256 constant public WeaponLastMediumIndex = 9;
    uint256 constant public WeaponLastDarkIndex = 13;
    
    function getWeaponMaterial(uint256 index) pure public returns(Material)
    {
        if (index <= WeaponLastHeavyIndex)
            return Material.Heavy;
        
        if (index <= WeaponLastMediumIndex)
            return Material.Medium;
        
        if (index <= WeaponLastDarkIndex)
            return Material.Dark;
        
        return Material.Light;
    }
    
    function getWeaponRank(uint256 index) pure public returns (uint256)
    {
        if (index <= WeaponLastHeavyIndex)
            return index + 1;
        
        if (index <= WeaponLastMediumIndex)
            return index - 4;
        
        if (index <= WeaponLastDarkIndex)
            return index - 9;
        
        return index -13;
    }
    
    uint256 constant public ChestLastClothIndex = 4;
    uint256 constant public ChestLastLeatherIndex = 9;
    
    function getChestMaterial(uint256 index) pure public returns(Material)
    {
        if (index <= ChestLastClothIndex)
            return Material.Cloth;
        
        if (index <= ChestLastLeatherIndex)
            return Material.Hide;
        
        return Material.Metal;
    }
    
    function getChestRank(uint256 index) pure public returns (uint256)
    {
        if (index <= ChestLastClothIndex)
            return index + 1;
        
        if (index <= ChestLastLeatherIndex)
            return index - 4;
        
        return index - 9;
    }
    
    // Head, waist, foot and hand items all follow the same classification pattern,
    // so they are generalised as armour.
    uint256 constant public ArmourLastMetalIndex = 4;
    uint256 constant public ArmourLasLeatherIndex = 9;
    
    function getArmourMaterial(uint256 index) pure public returns(Material)
    {
        if (index <= ArmourLastMetalIndex)
            return Material.Metal;
        
        if (index <= ArmourLasLeatherIndex)
            return Material.Hide;
        
        return Material.Cloth;
    }
    
    function getArmourRank(uint256 index) pure public returns (uint256)
    {
        if (index <= ArmourLastMetalIndex)
            return index + 1;
        
        if (index <= ArmourLasLeatherIndex)
            return index - 4;
        
        return index - 9;
    }
    
    function getRingRank(uint256 index) pure public returns (uint256)
    {
        if (index > 2)
            return 1;
        else 
            return index + 1;
    }
    
    function getNeckRank(uint256 index) pure public returns (uint256)
    {
        return 1;
    }
    
    function getMaterial(Type lootType, uint256 index) pure public returns (Material)
    {
         if (lootType == Type.Weapon)
            return getWeaponMaterial(index);
            
        if (lootType == Type.Chest)
            return getChestMaterial(index);
            
        if (lootType == Type.Head ||
            lootType == Type.Waist ||
            lootType == Type.Foot ||
            lootType == Type.Hand)
        {
            return getArmourMaterial(index);
        }
            
        return Material.Jewellery;
    }
    
    function getClass(Type lootType, uint256 index) pure public returns (Class)
    {
        Material material = getMaterial(lootType, index);
        return getClassFromMaterial(material);
    }

    function getClassFromMaterial(Material material) pure public returns (Class)
    {   
        if (material == Material.Heavy || material == Material.Metal)
            return Class.Warrior;
            
        if (material == Material.Medium || material == Material.Hide)
            return Class.Hunter;
            
        if (material == Material.Dark || material == Material.Light || material == Material.Cloth)
            return Class.Mage;
            
        return Class.Any;
        
    }
    
    function getRank(Type lootType, uint256 index) pure public returns (uint256)
    {
        if (lootType == Type.Weapon)
            return getWeaponRank(index);
            
        if (lootType == Type.Chest)
            return getChestRank(index);
        
        if (lootType == Type.Head ||
            lootType == Type.Waist ||
            lootType == Type.Foot ||
            lootType == Type.Hand)
        {
            return getArmourRank(index);
        }
        
        if (lootType == Type.Ring)
            return getRingRank(index);
            
        return getNeckRank(index);  
    }

    function getLevel(Type lootType, uint256 index) pure public returns (uint256)
    {
        if (lootType == Type.Chest ||
            lootType == Type.Weapon ||
            lootType == Type.Head ||
            lootType == Type.Waist ||
            lootType == Type.Foot ||
            lootType == Type.Hand)
        {
            return 6 - getRank(lootType, index);
        } else {
            return 4 - getRank(lootType, index); 
        }
    }

    ///////////////////////////////////////////////////////////////////////////
    /*
    Gas efficient implementation of LootComponents
    https://etherscan.io/address/0x3eb43b1545a360d1D065CB7539339363dFD445F3#code
    The actual names are not needed when retreiving the component indexes only
    Header comment from orignal follows:

    // SPDX-License-Identifier: Unlicense
    
    This is a utility contract to make it easier for other
    contracts to work with Loot properties.
    
    Call weaponComponents(), chestComponents(), etc. to get 
    an array of attributes that correspond to the item. 
    
    The return format is:
    
    uint256[6] =>
        [0] = Item ID
        [1] = Suffix ID (0 for none)
        [2] = Name Prefix ID (0 for none)
        [3] = Name Suffix ID (0 for none)
        [4] = Augmentation (0 = false, 1 = true)
        [5] = Greatness
    
    See the item and attribute tables below for corresponding IDs.
    */

    uint256 constant WEAPON_COUNT = 18;
    uint256 constant CHEST_COUNT = 15;
    uint256 constant HEAD_COUNT = 15;
    uint256 constant WAIST_COUNT = 15;
    uint256 constant FOOT_COUNT = 15;
    uint256 constant HAND_COUNT = 15;
    uint256 constant NECK_COUNT = 3;
    uint256 constant RING_COUNT = 5;
    uint256 constant SUFFIX_COUNT = 16;
    uint256 constant NAME_PREFIX_COUNT = 69;
    uint256 constant NAME_SUFFIX_COUNT = 18;

    function random(string memory input) internal pure returns (uint256) 
    {
        return uint256(keccak256(abi.encodePacked(input)));
    }

    function weaponComponents(uint256 tokenId) public pure returns (uint256[6] memory) 
    {
        return tokenComponents(tokenId, "WEAPON", WEAPON_COUNT);
    }
    
    function chestComponents(uint256 tokenId) public pure returns (uint256[6] memory) 
    {
        return tokenComponents(tokenId, "CHEST", CHEST_COUNT);
    }
    
    function headComponents(uint256 tokenId) public pure returns (uint256[6] memory) 
    {
        return tokenComponents(tokenId, "HEAD", HEAD_COUNT);
    }
    
    function waistComponents(uint256 tokenId) public pure returns (uint256[6] memory) 
    {
        return tokenComponents(tokenId, "WAIST", WAIST_COUNT);
    }

    function footComponents(uint256 tokenId) public pure returns (uint256[6] memory) 
    {
        return tokenComponents(tokenId, "FOOT", FOOT_COUNT);
    }
    
    function handComponents(uint256 tokenId) public pure returns (uint256[6] memory) 
    {
        return tokenComponents(tokenId, "HAND", HAND_COUNT);
    }
    
    function neckComponents(uint256 tokenId) public pure returns (uint256[6] memory) 
    {
        return tokenComponents(tokenId, "NECK", NECK_COUNT);
    }
    
    function ringComponents(uint256 tokenId) public pure returns (uint256[6] memory) 
    {
        return tokenComponents(tokenId, "RING", RING_COUNT);
    }

    function tokenComponents(uint256 tokenId, string memory keyPrefix, uint256 itemCount) 
        internal pure returns (uint256[6] memory) 
    {
        uint256[6] memory components;
        
        uint256 rand = random(string(abi.encodePacked(keyPrefix, toString(tokenId))));
        
        components[0] = rand % itemCount;
        components[1] = 0;
        components[2] = 0;
        
        components[5] = rand % 21; //aka greatness
        if (components[5] > 14) {
            components[1] = (rand % SUFFIX_COUNT) + 1;
        }
        if (components[5] >= 19) {
            components[2] = (rand % NAME_PREFIX_COUNT) + 1;
            components[3] = (rand % NAME_SUFFIX_COUNT) + 1;
            if (components[5] == 19) {
                // ...
            } else {
                components[4] = 1;
            }
        }
        return components;
    }

    function toString(uint256 value) internal pure returns (string memory) 
    {
        // Inspired by OraclizeAPI's implementation - MIT license
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[],"name":"ArmourLasLeatherIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ArmourLastMetalIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ChestLastClothIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ChestLastLeatherIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WeaponLastDarkIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WeaponLastHeavyIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WeaponLastMediumIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"chestComponents","outputs":[{"internalType":"uint256[6]","name":"","type":"uint256[6]"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"footComponents","outputs":[{"internalType":"uint256[6]","name":"","type":"uint256[6]"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getArmourMaterial","outputs":[{"internalType":"enum LootClassification.Material","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getArmourRank","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getChestMaterial","outputs":[{"internalType":"enum LootClassification.Material","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getChestRank","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"enum LootClassification.Type","name":"lootType","type":"uint8"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getClass","outputs":[{"internalType":"enum LootClassification.Class","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"enum LootClassification.Material","name":"material","type":"uint8"}],"name":"getClassFromMaterial","outputs":[{"internalType":"enum LootClassification.Class","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"enum LootClassification.Type","name":"lootType","type":"uint8"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getLevel","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"enum LootClassification.Type","name":"lootType","type":"uint8"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getMaterial","outputs":[{"internalType":"enum LootClassification.Material","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getNeckRank","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"enum LootClassification.Type","name":"lootType","type":"uint8"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRank","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRingRank","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getWeaponMaterial","outputs":[{"internalType":"enum LootClassification.Material","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getWeaponRank","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"handComponents","outputs":[{"internalType":"uint256[6]","name":"","type":"uint256[6]"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"headComponents","outputs":[{"internalType":"uint256[6]","name":"","type":"uint256[6]"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"neckComponents","outputs":[{"internalType":"uint256[6]","name":"","type":"uint256[6]"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ringComponents","outputs":[{"internalType":"uint256[6]","name":"","type":"uint256[6]"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"waistComponents","outputs":[{"internalType":"uint256[6]","name":"","type":"uint256[6]"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"weaponComponents","outputs":[{"internalType":"uint256[6]","name":"","type":"uint256[6]"}],"stateMutability":"pure","type":"function"}]

608060405234801561001057600080fd5b50610fab806100206000396000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c80635f65c917116100f9578063af41894f11610097578063e1423ad411610071578063e1423ad414610213578063e5322ea914610363578063f63db29714610376578063fbe0fbd51461038957600080fd5b8063af41894f1461032a578063dbecb50b1461033d578063e0398c1a1461035057600080fd5b80637c64810c116100d35780637c64810c146102135780638a43aa46146102f0578063a6b4014614610303578063a76a9d271461031657600080fd5b80635f65c9171461024157806361d73f64146102ca578063741ec32e146102dd57600080fd5b80633b7919a111610166578063441870d011610140578063441870d01461027157806349873cfe146102845780634c865a79146102975780635c7e6b0e146102aa57600080fd5b80633b7919a1146101f25780633ff48ee114610249578063433b43f51461025157600080fd5b8063196f659e116101a2578063196f659e1461021b578063261de77c1461022e578063333ca06d1461024157806339b7bb651461024157600080fd5b8063063e077a146101c95780630e98d1ed146101f257806312a685b014610213575b600080fd5b6101dc6101d7366004610de0565b61039c565b6040516101e99190610e52565b60405180910390f35b610205610200366004610de0565b6103d2565b6040519081526020016101e9565b610205600481565b6101dc610229366004610de0565b610405565b6101dc61023c366004610de0565b610435565b610205600981565b610205600d81565b61026461025f366004610de0565b610466565b6040516101e99190610e9d565b6101dc61027f366004610de0565b610490565b610264610292366004610de0565b6104c0565b6101dc6102a5366004610de0565b6104ea565b6102bd6102b8366004610db5565b61051c565b6040516101e99190610e83565b6102056102d8366004610de0565b61053c565b6102056102eb366004610de0565b610582565b6101dc6102fe366004610de0565b6105a0565b610264610311366004610de0565b6105d0565b610205610324366004610de0565b50600190565b610205610338366004610db5565b61060a565b61026461034b366004610db5565b610737565b6101dc61035e366004610de0565b610852565b6102bd610371366004610d99565b610882565b610205610384366004610db5565b6109bb565b6101dc610397366004610de0565b610b08565b6103a4610d7b565b6103cc826040518060400160405280600481526020016352494e4760e01b8152506005610b35565b92915050565b6000600482116103e7576103cc826001610eb1565b600982116103fa576103cc600483610edd565b6103cc600983610edd565b61040d610d7b565b6103cc82604051806040016040528060048152602001631210539160e21b815250600f610b35565b61043d610d7b565b6103cc826040518060400160405280600581526020016415d05254d560da1b815250600f610b35565b60006004821161047857506004919050565b6009821161048857506005919050565b506006919050565b610498610d7b565b6103cc82604051806040016040528060048152602001631211505160e21b815250600f610b35565b6000600482116104d257506006919050565b600982116104e257506005919050565b506004919050565b6104f2610d7b565b6103cc82604051806040016040528060068152602001652ba2a0a827a760d11b8152506012610b35565b6000806105298484610737565b905061053481610882565b949350505050565b600060048211610551576103cc826001610eb1565b60098211610564576103cc600483610edd565b600d8211610577576103cc600983610edd565b6103cc600d83610edd565b6000600282111561059557506001919050565b6103cc826001610eb1565b6105a8610d7b565b6103cc82604051806040016040528060048152602001634e45434b60e01b8152506003610b35565b6000600482116105e257506000919050565b600982116105f257506001919050565b600d821161060257506002919050565b506003919050565b6000600183600781111561062e57634e487b7160e01b600052602160045260246000fd5b14806106595750600083600781111561065757634e487b7160e01b600052602160045260246000fd5b145b806106835750600283600781111561068157634e487b7160e01b600052602160045260246000fd5b145b806106ad575060038360078111156106ab57634e487b7160e01b600052602160045260246000fd5b145b806106d7575060048360078111156106d557634e487b7160e01b600052602160045260246000fd5b145b80610701575060058360078111156106ff57634e487b7160e01b600052602160045260246000fd5b145b156107225761071083836109bb565b61071b906006610edd565b90506103cc565b61072c83836109bb565b61071b906004610edd565b60008083600781111561075a57634e487b7160e01b600052602160045260246000fd5b14156107695761071b826105d0565b600183600781111561078b57634e487b7160e01b600052602160045260246000fd5b141561079a5761071b82610466565b60028360078111156107bc57634e487b7160e01b600052602160045260246000fd5b14806107e7575060038360078111156107e557634e487b7160e01b600052602160045260246000fd5b145b806108115750600483600781111561080f57634e487b7160e01b600052602160045260246000fd5b145b8061083b5750600583600781111561083957634e487b7160e01b600052602160045260246000fd5b145b156108495761071b826104c0565b50600792915050565b61085a610d7b565b6103cc82604051806040016040528060048152602001631193d3d560e21b815250600f610b35565b6000808260078111156108a557634e487b7160e01b600052602160045260246000fd5b14806108d0575060068260078111156108ce57634e487b7160e01b600052602160045260246000fd5b145b156108dd57506000919050565b60018260078111156108ff57634e487b7160e01b600052602160045260246000fd5b148061092a5750600582600781111561092857634e487b7160e01b600052602160045260246000fd5b145b1561093757506001919050565b600282600781111561095957634e487b7160e01b600052602160045260246000fd5b14806109845750600382600781111561098257634e487b7160e01b600052602160045260246000fd5b145b806109ae575060048260078111156109ac57634e487b7160e01b600052602160045260246000fd5b145b1561060257506002919050565b6000808360078111156109de57634e487b7160e01b600052602160045260246000fd5b14156109ed5761071b8261053c565b6001836007811115610a0f57634e487b7160e01b600052602160045260246000fd5b1415610a1e5761071b826103d2565b6002836007811115610a4057634e487b7160e01b600052602160045260246000fd5b1480610a6b57506003836007811115610a6957634e487b7160e01b600052602160045260246000fd5b145b80610a9557506004836007811115610a9357634e487b7160e01b600052602160045260246000fd5b145b80610abf57506005836007811115610abd57634e487b7160e01b600052602160045260246000fd5b145b15610acd5761071b826103d2565b6007836007811115610aef57634e487b7160e01b600052602160045260246000fd5b1415610afe5761071b82610582565b60015b9392505050565b610b10610d7b565b6103cc826040518060400160405280600581526020016410d21154d560da1b815250600f5b610b3d610d7b565b610b45610d7b565b6000610b7985610b5488610c30565b604051602001610b65929190610e3d565b604051602081830303815290604052610d4a565b9050610b858482610f0f565b82526000602083018190526040830152610ba0601582610f0f565b60a08301819052600e1015610bcb57610bba601082610f0f565b610bc5906001610eb1565b60208301525b60a0820151601311610c2757610be2604582610f0f565b610bed906001610eb1565b6040830152610bfd601282610f0f565b610c08906001610eb1565b606083015260a082015160131415610c1f57610c27565b600160808301525b50949350505050565b606081610c545750506040805180820190915260018152600360fc1b602082015290565b8160005b8115610c7e5780610c6881610ef4565b9150610c779050600a83610ec9565b9150610c58565b60008167ffffffffffffffff811115610ca757634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015610cd1576020820181803683370190505b5090505b841561053457610ce6600183610edd565b9150610cf3600a86610f0f565b610cfe906030610eb1565b60f81b818381518110610d2157634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350610d43600a86610ec9565b9450610cd5565b600081604051602001610d5d9190610e31565b60408051601f19818403018152919052805160209091012092915050565b6040518060c001604052806006906020820280368337509192915050565b600060208284031215610daa578081fd5b8135610b0181610f65565b60008060408385031215610dc7578081fd5b8235610dd281610f65565b946020939093013593505050565b600060208284031215610df1578081fd5b5035919050565b60008151815b81811015610e185760208185018101518683015201610dfe565b81811115610e265782828601525b509290920192915050565b6000610b018284610df8565b6000610534610e4c8386610df8565b84610df8565b60c08101818360005b6006811015610e7a578151835260209283019290910190600101610e5b565b50505092915050565b6020810160048310610e9757610e97610f4f565b91905290565b6020810160088310610e9757610e97610f4f565b60008219821115610ec457610ec4610f23565b500190565b600082610ed857610ed8610f39565b500490565b600082821015610eef57610eef610f23565b500390565b6000600019821415610f0857610f08610f23565b5060010190565b600082610f1e57610f1e610f39565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b60088110610f7257600080fd5b5056fea2646970667358221220f3a9e97700eb259cfbc46be1d5cafbfa9848b5c3488e5f086f8452b494d13b3964736f6c63430008040033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101c45760003560e01c80635f65c917116100f9578063af41894f11610097578063e1423ad411610071578063e1423ad414610213578063e5322ea914610363578063f63db29714610376578063fbe0fbd51461038957600080fd5b8063af41894f1461032a578063dbecb50b1461033d578063e0398c1a1461035057600080fd5b80637c64810c116100d35780637c64810c146102135780638a43aa46146102f0578063a6b4014614610303578063a76a9d271461031657600080fd5b80635f65c9171461024157806361d73f64146102ca578063741ec32e146102dd57600080fd5b80633b7919a111610166578063441870d011610140578063441870d01461027157806349873cfe146102845780634c865a79146102975780635c7e6b0e146102aa57600080fd5b80633b7919a1146101f25780633ff48ee114610249578063433b43f51461025157600080fd5b8063196f659e116101a2578063196f659e1461021b578063261de77c1461022e578063333ca06d1461024157806339b7bb651461024157600080fd5b8063063e077a146101c95780630e98d1ed146101f257806312a685b014610213575b600080fd5b6101dc6101d7366004610de0565b61039c565b6040516101e99190610e52565b60405180910390f35b610205610200366004610de0565b6103d2565b6040519081526020016101e9565b610205600481565b6101dc610229366004610de0565b610405565b6101dc61023c366004610de0565b610435565b610205600981565b610205600d81565b61026461025f366004610de0565b610466565b6040516101e99190610e9d565b6101dc61027f366004610de0565b610490565b610264610292366004610de0565b6104c0565b6101dc6102a5366004610de0565b6104ea565b6102bd6102b8366004610db5565b61051c565b6040516101e99190610e83565b6102056102d8366004610de0565b61053c565b6102056102eb366004610de0565b610582565b6101dc6102fe366004610de0565b6105a0565b610264610311366004610de0565b6105d0565b610205610324366004610de0565b50600190565b610205610338366004610db5565b61060a565b61026461034b366004610db5565b610737565b6101dc61035e366004610de0565b610852565b6102bd610371366004610d99565b610882565b610205610384366004610db5565b6109bb565b6101dc610397366004610de0565b610b08565b6103a4610d7b565b6103cc826040518060400160405280600481526020016352494e4760e01b8152506005610b35565b92915050565b6000600482116103e7576103cc826001610eb1565b600982116103fa576103cc600483610edd565b6103cc600983610edd565b61040d610d7b565b6103cc82604051806040016040528060048152602001631210539160e21b815250600f610b35565b61043d610d7b565b6103cc826040518060400160405280600581526020016415d05254d560da1b815250600f610b35565b60006004821161047857506004919050565b6009821161048857506005919050565b506006919050565b610498610d7b565b6103cc82604051806040016040528060048152602001631211505160e21b815250600f610b35565b6000600482116104d257506006919050565b600982116104e257506005919050565b506004919050565b6104f2610d7b565b6103cc82604051806040016040528060068152602001652ba2a0a827a760d11b8152506012610b35565b6000806105298484610737565b905061053481610882565b949350505050565b600060048211610551576103cc826001610eb1565b60098211610564576103cc600483610edd565b600d8211610577576103cc600983610edd565b6103cc600d83610edd565b6000600282111561059557506001919050565b6103cc826001610eb1565b6105a8610d7b565b6103cc82604051806040016040528060048152602001634e45434b60e01b8152506003610b35565b6000600482116105e257506000919050565b600982116105f257506001919050565b600d821161060257506002919050565b506003919050565b6000600183600781111561062e57634e487b7160e01b600052602160045260246000fd5b14806106595750600083600781111561065757634e487b7160e01b600052602160045260246000fd5b145b806106835750600283600781111561068157634e487b7160e01b600052602160045260246000fd5b145b806106ad575060038360078111156106ab57634e487b7160e01b600052602160045260246000fd5b145b806106d7575060048360078111156106d557634e487b7160e01b600052602160045260246000fd5b145b80610701575060058360078111156106ff57634e487b7160e01b600052602160045260246000fd5b145b156107225761071083836109bb565b61071b906006610edd565b90506103cc565b61072c83836109bb565b61071b906004610edd565b60008083600781111561075a57634e487b7160e01b600052602160045260246000fd5b14156107695761071b826105d0565b600183600781111561078b57634e487b7160e01b600052602160045260246000fd5b141561079a5761071b82610466565b60028360078111156107bc57634e487b7160e01b600052602160045260246000fd5b14806107e7575060038360078111156107e557634e487b7160e01b600052602160045260246000fd5b145b806108115750600483600781111561080f57634e487b7160e01b600052602160045260246000fd5b145b8061083b5750600583600781111561083957634e487b7160e01b600052602160045260246000fd5b145b156108495761071b826104c0565b50600792915050565b61085a610d7b565b6103cc82604051806040016040528060048152602001631193d3d560e21b815250600f610b35565b6000808260078111156108a557634e487b7160e01b600052602160045260246000fd5b14806108d0575060068260078111156108ce57634e487b7160e01b600052602160045260246000fd5b145b156108dd57506000919050565b60018260078111156108ff57634e487b7160e01b600052602160045260246000fd5b148061092a5750600582600781111561092857634e487b7160e01b600052602160045260246000fd5b145b1561093757506001919050565b600282600781111561095957634e487b7160e01b600052602160045260246000fd5b14806109845750600382600781111561098257634e487b7160e01b600052602160045260246000fd5b145b806109ae575060048260078111156109ac57634e487b7160e01b600052602160045260246000fd5b145b1561060257506002919050565b6000808360078111156109de57634e487b7160e01b600052602160045260246000fd5b14156109ed5761071b8261053c565b6001836007811115610a0f57634e487b7160e01b600052602160045260246000fd5b1415610a1e5761071b826103d2565b6002836007811115610a4057634e487b7160e01b600052602160045260246000fd5b1480610a6b57506003836007811115610a6957634e487b7160e01b600052602160045260246000fd5b145b80610a9557506004836007811115610a9357634e487b7160e01b600052602160045260246000fd5b145b80610abf57506005836007811115610abd57634e487b7160e01b600052602160045260246000fd5b145b15610acd5761071b826103d2565b6007836007811115610aef57634e487b7160e01b600052602160045260246000fd5b1415610afe5761071b82610582565b60015b9392505050565b610b10610d7b565b6103cc826040518060400160405280600581526020016410d21154d560da1b815250600f5b610b3d610d7b565b610b45610d7b565b6000610b7985610b5488610c30565b604051602001610b65929190610e3d565b604051602081830303815290604052610d4a565b9050610b858482610f0f565b82526000602083018190526040830152610ba0601582610f0f565b60a08301819052600e1015610bcb57610bba601082610f0f565b610bc5906001610eb1565b60208301525b60a0820151601311610c2757610be2604582610f0f565b610bed906001610eb1565b6040830152610bfd601282610f0f565b610c08906001610eb1565b606083015260a082015160131415610c1f57610c27565b600160808301525b50949350505050565b606081610c545750506040805180820190915260018152600360fc1b602082015290565b8160005b8115610c7e5780610c6881610ef4565b9150610c779050600a83610ec9565b9150610c58565b60008167ffffffffffffffff811115610ca757634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015610cd1576020820181803683370190505b5090505b841561053457610ce6600183610edd565b9150610cf3600a86610f0f565b610cfe906030610eb1565b60f81b818381518110610d2157634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350610d43600a86610ec9565b9450610cd5565b600081604051602001610d5d9190610e31565b60408051601f19818403018152919052805160209091012092915050565b6040518060c001604052806006906020820280368337509192915050565b600060208284031215610daa578081fd5b8135610b0181610f65565b60008060408385031215610dc7578081fd5b8235610dd281610f65565b946020939093013593505050565b600060208284031215610df1578081fd5b5035919050565b60008151815b81811015610e185760208185018101518683015201610dfe565b81811115610e265782828601525b509290920192915050565b6000610b018284610df8565b6000610534610e4c8386610df8565b84610df8565b60c08101818360005b6006811015610e7a578151835260209283019290910190600101610e5b565b50505092915050565b6020810160048310610e9757610e97610f4f565b91905290565b6020810160088310610e9757610e97610f4f565b60008219821115610ec457610ec4610f23565b500190565b600082610ed857610ed8610f39565b500490565b600082821015610eef57610eef610f23565b500390565b6000600019821415610f0857610f08610f23565b5060010190565b600082610f1e57610f1e610f39565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b60088110610f7257600080fd5b5056fea2646970667358221220f3a9e97700eb259cfbc46be1d5cafbfa9848b5c3488e5f086f8452b494d13b3964736f6c63430008040033

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  ]

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.