ETH Price: $3,375.75 (+3.60%)

Contract

0xfEcC0513A5063b8DaC9E77c723a1D00cF27fe7f2
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Migrate162294162022-12-21 0:13:11734 days ago1671581591IN
0xfEcC0513...cF27fe7f2
0 ETH0.0090362416
Migrate162294112022-12-21 0:12:11734 days ago1671581531IN
0xfEcC0513...cF27fe7f2
0 ETH0.0074465813
Migrate158652092022-10-31 2:59:23784 days ago1667185163IN
0xfEcC0513...cF27fe7f2
0 ETH0.0056444310
Migrate156933122022-10-07 2:43:23808 days ago1665110603IN
0xfEcC0513...cF27fe7f2
0 ETH0.004519418
Migrate156933062022-10-07 2:42:11808 days ago1665110531IN
0xfEcC0513...cF27fe7f2
0 ETH0.0052583210
Migrate156932992022-10-07 2:40:47808 days ago1665110447IN
0xfEcC0513...cF27fe7f2
0 ETH0.005082769
Migrate155308612022-09-14 4:01:46831 days ago1663128106IN
0xfEcC0513...cF27fe7f2
0 ETH0.004549228
Migrate155308592022-09-14 4:01:19831 days ago1663128079IN
0xfEcC0513...cF27fe7f2
0 ETH0.003997597
Migrate155308582022-09-14 4:00:55831 days ago1663128055IN
0xfEcC0513...cF27fe7f2
0 ETH0.003981217
Migrate155308552022-09-14 3:59:41831 days ago1663127981IN
0xfEcC0513...cF27fe7f2
0 ETH0.003253246
Migrate155308432022-09-14 3:56:03831 days ago1663127763IN
0xfEcC0513...cF27fe7f2
0 ETH0.004010137
Migrate155308432022-09-14 3:56:03831 days ago1663127763IN
0xfEcC0513...cF27fe7f2
0 ETH0.003980337
Migrate155308422022-09-14 3:55:55831 days ago1663127755IN
0xfEcC0513...cF27fe7f2
0 ETH0.003424946
Migrate155308402022-09-14 3:55:21831 days ago1663127721IN
0xfEcC0513...cF27fe7f2
0 ETH0.003981537
Migrate155242202022-09-13 1:45:25833 days ago1663033525IN
0xfEcC0513...cF27fe7f2
0 ETH0.0068779413
Migrate155236242022-09-12 23:19:06833 days ago1663024746IN
0xfEcC0513...cF27fe7f2
0 ETH0.0079903614
Migrate153998852022-08-24 0:58:15853 days ago1661302695IN
0xfEcC0513...cF27fe7f2
0 ETH0.0062104211
Migrate153995922022-08-23 23:45:13853 days ago1661298313IN
0xfEcC0513...cF27fe7f2
0 ETH0.003966457
Migrate153995862022-08-23 23:44:00853 days ago1661298240IN
0xfEcC0513...cF27fe7f2
0 ETH0.003981457
Migrate150875012022-07-06 7:03:09901 days ago1657090989IN
0xfEcC0513...cF27fe7f2
0 ETH0.0079890314
Migrate149252652022-06-08 6:38:10929 days ago1654670290IN
0xfEcC0513...cF27fe7f2
0 ETH0.0212348339
Migrate149249552022-06-08 5:23:06929 days ago1654665786IN
0xfEcC0513...cF27fe7f2
0 ETH0.0372731766
Migrate145170862022-04-04 3:19:46994 days ago1649042386IN
0xfEcC0513...cF27fe7f2
0 ETH0.0224955539
Migrate145170842022-04-04 3:19:28994 days ago1649042368IN
0xfEcC0513...cF27fe7f2
0 ETH0.0250287444
Migrate145170812022-04-04 3:19:04994 days ago1649042344IN
0xfEcC0513...cF27fe7f2
0 ETH0.0238854842
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
v2Migration

Compiler Version
v0.5.11+commit.c082d0b4

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2019-11-19
*/

pragma solidity 0.5.11;

contract BaseMigration {

    function convertPurity(uint16 purity)
        public
        pure
        returns (uint8)
    {
        return uint8(4 - (purity / 1000));
    }

    function convertProto(uint16 proto)
        public
        view
        returns (uint16)
    {
        if (proto >= 1 && proto <= 377) {
            return proto;
        }
        // first phoenix
        if (proto == 380) {
            return 400;
        }
        // light's bidding
        if (proto == 381) {
            return 401;
        }
        // chimera
        if (proto == 394) {
            return 402;
        }
        // etherbots
        (bool found, uint index) = getEtherbotsIndex(proto);
        if (found) {
            return uint16(380 + index);
        }
        // hyperion
        if (proto == 378) {
            return 65000;
        }
        // prometheus
        if (proto == 379) {
            return 65001;
        }
        // atlas
        if (proto == 383) {
            return 65002;
        }
        // tethys
        if (proto == 384) {
            return 65003;
        }
        require(false, "BM: unrecognised proto");
    }

    uint16[] internal ebs = [
        400,
        413,
        414,
        421,
        427,
        428,
        389,
        415,
        416,
        422,
        424,
        425,
        426,
        382,
        420,
        417
    ];

    function getEtherbotsIndex(uint16 proto)
        public
        view
        returns (bool, uint16)
    {
        for (uint16 i = 0; i < ebs.length; i++) {
            if (ebs[i] == proto) {
                return (true, i);
            }
        }
        return (false, 0);
    }

}

contract Pack {

    enum Type {
        Rare,
        Epic,
        Legendary,
        Shiny
    }

}

contract LegacyICards {

    enum Rarity {
        Common,
        Rare,
        Epic,
        Legendary,
        Mythic
    }

    function getRandomCard(
        Rarity rarity,
        uint16 random
    )
        public
        view
        returns (uint16);

    function createCard(
        address user,
        uint16 proto,
        uint16 purity
    )
        public
        returns (uint);


}

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}


/**
 * This file's sole purpose is because in v2 Migrations importing PackFive.sol to use the PackFive 
 * type causes a circular depedency via the import of ICards inside RarityProvider.sol.
 * We can probably get rid of this in the case v2 Migrations aren't needed.
 */

contract IPackFive {

    struct Purchase {
        uint count;
        uint randomness;
        uint[] state;
        Pack.Type packType;
        uint64 commit;
        uint64 lockup;
        bool revoked;
        address user;
    }

    Purchase[] public purchases;

    function getPurchaseState(uint purchaseID) public view returns (uint[] memory state);
    function predictPacks(uint id) external view returns (uint16[] memory protos, uint16[] memory purities);
    function canActivatePurchase(uint id) public view returns (bool);

}


contract RarityProvider {

    LegacyICards cards;

    constructor(LegacyICards _cards) public {
        cards = _cards;
    }

    struct RandomnessComponents {
        uint random;
        uint32 rarity;
        uint16 quality;
        uint16 purity;
        uint16 proto;
    }

    // return 'length' bytes of 'num' starting at 'start'
    function extract(uint num, uint length, uint start) internal pure returns (uint) {
        return (((1 << (length * 8)) - 1) & (num >> ((start - 1) * 8)));
    }

    // divides the random seed into components
    function getComponents(
        uint cardIndex, uint rand
    ) internal pure returns (
        RandomnessComponents memory
    ) {
        uint random = uint(keccak256(abi.encodePacked(cardIndex, rand)));
        return RandomnessComponents({
            random: random,
            rarity: uint32(extract(random, 4, 10) % 1000000),
            quality: uint16(extract(random, 2, 4) % 1000),
            purity: uint16(extract(random, 2, 6) % 1000),
            proto: uint16(extract(random, 2, 8) % (2**16-1))
        });
    }

    function getCardDetails(Pack.Type packType, uint cardIndex, uint result) internal view returns (uint16, uint16) {
        if (packType == Pack.Type.Shiny) {
            return _getShinyCardDetails(cardIndex, result);
        } else if (packType == Pack.Type.Legendary) {
            return _getLegendaryCardDetails(cardIndex, result);
        } else if (packType == Pack.Type.Epic) {
            return _getEpicCardDetails(cardIndex, result);
        }
        return _getRareCardDetails(cardIndex, result);
    }

    function _getShinyCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) {

        RandomnessComponents memory rc = getComponents(cardIndex, result);

        LegacyICards.Rarity rarity;

        if (cardIndex % 5 == 0) {
            rarity = _getLegendaryPlusRarity(rc.rarity);
            purity = _getShinyPurityBase(rc.quality) + rc.purity;
        } else if (cardIndex % 5 == 1) {
            rarity = _getRarePlusRarity(rc.rarity);
            purity = _getPurityBase(rc.quality) + rc.purity;
        } else {
            rarity = _getCommonPlusRarity(rc.rarity);
            purity = _getPurityBase(rc.quality) + rc.purity;
        }
        proto = cards.getRandomCard(rarity, rc.proto);
        return (proto, purity);
    }

    function _getLegendaryCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) {

        RandomnessComponents memory rc = getComponents(cardIndex, result);

        LegacyICards.Rarity rarity;

        if (cardIndex % 5 == 0) {
            rarity = _getLegendaryPlusRarity(rc.rarity);
        } else if (cardIndex % 5 == 1) {
            rarity = _getRarePlusRarity(rc.rarity);
        } else {
            rarity = _getCommonPlusRarity(rc.rarity);
        }

        purity = _getPurityBase(rc.quality) + rc.purity;

        proto = cards.getRandomCard(rarity, rc.proto);

        return (proto, purity);
    }


    function _getEpicCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) {

        RandomnessComponents memory rc = getComponents(cardIndex, result);

        LegacyICards.Rarity rarity;

        if (cardIndex % 5 == 0) {
            rarity = _getEpicPlusRarity(rc.rarity);
        } else {
            rarity = _getCommonPlusRarity(rc.rarity);
        }

        purity = _getPurityBase(rc.quality) + rc.purity;

        proto = cards.getRandomCard(rarity, rc.proto);

        return (proto, purity);
    }

    function _getRareCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) {

        RandomnessComponents memory rc = getComponents(cardIndex, result);

        LegacyICards.Rarity rarity;

        if (cardIndex % 5 == 0) {
            rarity = _getRarePlusRarity(rc.rarity);
        } else {
            rarity = _getCommonPlusRarity(rc.rarity);
        }

        purity = _getPurityBase(rc.quality) + rc.purity;

        proto = cards.getRandomCard(rarity, rc.proto);
        return (proto, purity);
    }


    function _getCommonPlusRarity(uint32 rand) internal pure returns (LegacyICards.Rarity) {
        if (rand == 999999) {
            return LegacyICards.Rarity.Mythic;
        } else if (rand >= 998345) {
            return LegacyICards.Rarity.Legendary;
        } else if (rand >= 986765) {
            return LegacyICards.Rarity.Epic;
        } else if (rand >= 924890) {
            return LegacyICards.Rarity.Rare;
        } else {
            return LegacyICards.Rarity.Common;
        }
    }

    function _getRarePlusRarity(uint32 rand) internal pure returns (LegacyICards.Rarity) {
        if (rand == 999999) {
            return LegacyICards.Rarity.Mythic;
        } else if (rand >= 981615) {
            return LegacyICards.Rarity.Legendary;
        } else if (rand >= 852940) {
            return LegacyICards.Rarity.Epic;
        } else {
            return LegacyICards.Rarity.Rare;
        }
    }

    function _getEpicPlusRarity(uint32 rand) internal pure returns (LegacyICards.Rarity) {
        if (rand == 999999) {
            return LegacyICards.Rarity.Mythic;
        } else if (rand >= 981615) {
            return LegacyICards.Rarity.Legendary;
        } else {
            return LegacyICards.Rarity.Epic;
        }
    }

    function _getLegendaryPlusRarity(uint32 rand) internal pure returns (LegacyICards.Rarity) {
        if (rand == 999999) {
            return LegacyICards.Rarity.Mythic;
        } else {
            return LegacyICards.Rarity.Legendary;
        }
    }

    // store purity and shine as one number to save users gas
    function _getPurityBase(uint16 randOne) internal pure returns (uint16) {
        if (randOne >= 998) {
            return 3000;
        } else if (randOne >= 988) {
            return 2000;
        } else if (randOne >= 938) {
            return 1000;
        }
        return 0;
    }

    function _getShinyPurityBase(uint16 randOne) internal pure returns (uint16) {
        if (randOne >= 998) {
            return 3000;
        } else if (randOne >= 748) {
            return 2000;
        } else {
            return 1000;
        }
    }

    function getShine(uint16 purity) public pure returns (uint8) {
        return uint8(purity / 1000);
    }

}

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
contract IERC721 is IERC165 {
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of NFTs in `owner`'s account.
     */
    function balanceOf(address owner) public view returns (uint256 balance);

    /**
     * @dev Returns the owner of the NFT specified by `tokenId`.
     */
    function ownerOf(uint256 tokenId) public view returns (address owner);

    /**
     * @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to
     * another (`to`).
     *
     *
     *
     * Requirements:
     * - `from`, `to` cannot be zero.
     * - `tokenId` must be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this
     * NFT by either {approve} or {setApprovalForAll}.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId) public;
    /**
     * @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to
     * another (`to`).
     *
     * Requirements:
     * - If the caller is not `from`, it must be approved to move this NFT by
     * either {approve} or {setApprovalForAll}.
     */
    function transferFrom(address from, address to, uint256 tokenId) public;
    function approve(address to, uint256 tokenId) public;
    function getApproved(uint256 tokenId) public view returns (address operator);

    function setApprovalForAll(address operator, bool _approved) public;
    function isApprovedForAll(address owner, address operator) public view returns (bool);


    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public;
}


contract ICards is IERC721 {

    struct Batch {
        uint48 userID;
        uint16 size;
    }

    function batches(uint index) public view returns (uint48 userID, uint16 size);

    function userIDToAddress(uint48 id) public view returns (address);

    function getDetails(
        uint tokenId
    )
        public
        view
        returns (
        uint16 proto,
        uint8 quality
    );

    function setQuality(
        uint tokenId,
        uint8 quality
    ) public;

    function mintCards(
        address to,
        uint16[] memory _protos,
        uint8[] memory _qualities
    )
        public
        returns (uint);

    function mintCard(
        address to,
        uint16 _proto,
        uint8 _quality
    )
        public
        returns (uint);

    function burn(uint tokenId) public;

    function batchSize()
        public
        view
        returns (uint);
}




contract v2Migration is BaseMigration, RarityProvider {

    ICards cards;
    uint16 public limit;

    constructor(
        LegacyICards _legacy,
        ICards _cards,
        address[] memory _packs,
        uint16 _limit
    )
        public RarityProvider(_legacy)
    {
        for (uint i = 0; i < _packs.length; i++) {
            canMigrate[_packs[i]] = true;
        }

        limit = _limit;
        cards = _cards;
    }

    struct StackDepthLimit {
        uint16 proto;
        uint16 purity;
        uint16[] protos;
        uint8[] qualities;
    }

    mapping (address => bool) public canMigrate;
    mapping (address => mapping (uint => uint16)) public v2Migrated;

    event Migrated(
        address indexed user,
        uint id,
        uint start,
        uint end,
        uint startID
    );

    // PackFive = pack factory which creates packs and cards

    function migrate(
        IPackFive pack,
        uint id
    )
        public
    {
        require(
            canMigrate[address(pack)],
            "V2: must be migrating from an approved pack"
        );

        (uint count, uint randomness,Pack.Type packType,,,, address user) = pack.purchases(id);
        uint[] memory state = pack.getPurchaseState(id);

        require(
            noCardsActivated(state),
            "V2: must have no cards activated"
        );

        // Check if randomness set
        require(
            randomness != 0,
            "V2: must have had randomness set"
        );

        uint16 size = uint16(count * 5);
        require(size > count, "check overflow");

        uint16 migrated = v2Migrated[address(pack)][id];

        // If no cards activated, then we just create all of the cards (count * 5)
        require(
            size > migrated,
            "V2: must not have been migrated previously"
        );

        uint16 remaining = size - migrated;

        uint16 len = remaining > limit ? limit : remaining;

        StackDepthLimit memory sdl;

        sdl.protos = new uint16[](len);
        sdl.qualities = new uint8[](len);

        for (uint16 i = 0; i < len; i++) {
            (sdl.proto, sdl.purity) = getCardDetails(packType, migrated+i, randomness);
            sdl.protos[i] = convertProto(sdl.proto);
            sdl.qualities[i] = convertPurity(sdl.purity);
        }

        // Mint cards (details passed as function args)
        uint startID = cards.mintCards(user, sdl.protos, sdl.qualities);

        emit Migrated(user, id, migrated, len, startID);

        v2Migrated[address(pack)][id] += len;

    }

    function noCardsActivated(
        uint[] memory state
    )
        public
        pure
        returns (bool)
    {
        for (uint i = 0; i < state.length; i++) {
            if (state[i] != 0) {
                return false;
            }
        }
        return true;
    }
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[{"internalType":"uint16","name":"proto","type":"uint16"}],"name":"getEtherbotsIndex","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint16","name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"v2Migrated","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256[]","name":"state","type":"uint256[]"}],"name":"noCardsActivated","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"uint16","name":"proto","type":"uint16"}],"name":"convertProto","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint16","name":"purity","type":"uint16"}],"name":"convertPurity","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"canMigrate","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint16","name":"purity","type":"uint16"}],"name":"getShine","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"limit","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"contract IPackFive","name":"pack","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"migrate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract LegacyICards","name":"_legacy","type":"address"},{"internalType":"contract ICards","name":"_cards","type":"address"},{"internalType":"address[]","name":"_packs","type":"address[]"},{"internalType":"uint16","name":"_limit","type":"uint16"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"start","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"end","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startID","type":"uint256"}],"name":"Migrated","type":"event"}]

610280604052610190608090815261019d60a05261019e60c0526101a560e0526101ab610100526101ac610120526101856101405261019f610160526101a06101808190526101a690526101a86101c0526101a96101e0526101aa6102005261017e610220526101a4610240526101a1610260526200008390600090601062000228565b503480156200009157600080fd5b50604051620014553803806200145583398181016040526080811015620000b757600080fd5b81516020830151604080850180519151939592948301929184640100000000821115620000e357600080fd5b908301906020820185811115620000f957600080fd5b82518660208202830111640100000000821117156200011757600080fd5b82525081516020918201928201910280838360005b83811015620001465781810151838201526020016200012c565b50505050919091016040525060200151600180546001600160a01b0319166001600160a01b0388161790559150600090505b8251811015620001d0576001600360008584815181106200019557fe5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905560010162000178565b50600280546001600160a01b039094166001600160a01b031961ffff909316740100000000000000000000000000000000000000000261ffff60a01b1990951694909417919091169290921790915550620002fd9050565b82805482825590600052602060002090600f01601090048101928215620002c65791602002820160005b838211156200029457835183826101000a81548161ffff021916908361ffff160217905550926020019260020160208160010104928301926001030262000252565b8015620002c45782816101000a81549061ffff021916905560020160208160010104928301926001030262000294565b505b50620002d4929150620002d8565b5090565b620002fa91905b80821115620002d457805461ffff19168155600101620002df565b90565b611148806200030d6000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c806346d01a171161006657806346d01a17146101f25780637de07cea14610229578063850e37601461024f578063a4d66daf14610270578063ad68ebf71461027857610093565b80630107e59d146100985780631b7318bb146100d7578063222400221461011a57806345c075d5146101d1575b600080fd5b6100b9600480360360208110156100ae57600080fd5b503561ffff166102a6565b60408051921515835261ffff90911660208301528051918290030190f35b610103600480360360408110156100ed57600080fd5b506001600160a01b038135169060200135610318565b6040805161ffff9092168252519081900360200190f35b6101bd6004803603602081101561013057600080fd5b81019060208101813564010000000081111561014b57600080fd5b82018360208201111561015d57600080fd5b8035906020019184602083028401116401000000008311171561017f57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610339945050505050565b604080519115158252519081900360200190f35b610103600480360360208110156101e757600080fd5b503561ffff1661037e565b6102136004803603602081101561020857600080fd5b503561ffff166104c1565b6040805160ff9092168252519081900360200190f35b6101bd6004803603602081101561023f57600080fd5b50356001600160a01b03166104d2565b6102136004803603602081101561026557600080fd5b503561ffff166104e7565b6101036104f5565b6102a46004803603604081101561028e57600080fd5b506001600160a01b038135169060200135610506565b005b600080805b60005461ffff8216101561030a578361ffff1660008261ffff16815481106102cf57fe5b60009182526020909120601082040154600f9091166002026101000a900461ffff16141561030257600192509050610313565b6001016102ab565b50600091508190505b915091565b600460209081526000928352604080842090915290825290205461ffff1681565b6000805b82518110156103735782818151811061035257fe5b602002602001015160001461036b576000915050610379565b60010161033d565b50600190505b919050565b600060018261ffff161015801561039b57506101798261ffff1611155b156103a7575080610379565b8161ffff1661017c14156103be5750610190610379565b8161ffff1661017d14156103d55750610191610379565b8161ffff1661018a14156103ec5750610192610379565b6000806103f8846102a6565b61ffff169150915081156104135761017c0191506103799050565b8361ffff1661017a141561042d5761fde892505050610379565b8361ffff1661017b14156104475761fde992505050610379565b8361ffff1661017f14156104615761fdea92505050610379565b8361ffff16610180141561047b5761fdeb92505050610379565b6040805162461bcd60e51b8152602060048201526016602482015275424d3a20756e7265636f676e697365642070726f746f60501b604482015290519081900360640190fd5b6103e861ffff919091160460040390565b60036020526000908152604090205460ff1681565b6103e861ffff919091160490565b600254600160a01b900461ffff1681565b6001600160a01b03821660009081526003602052604090205460ff1661055d5760405162461bcd60e51b815260040180806020018281038252602b8152602001806110bf602b913960400191505060405180910390fd5b600080600080856001600160a01b0316638392fe31866040518263ffffffff1660e01b81526004018082815260200191505060e06040518083038186803b1580156105a757600080fd5b505afa1580156105bb573d6000803e3d6000fd5b505050506040513d60e08110156105d157600080fd5b508051602082015160408084015160c090940151815163deb18a9560e01b8152600481018b9052915193985091965092945092506060916001600160a01b0389169163deb18a9591602480820192600092909190829003018186803b15801561063957600080fd5b505afa15801561064d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561067657600080fd5b810190808051604051939291908464010000000082111561069657600080fd5b9083019060208201858111156106ab57600080fd5b82518660208202830111640100000000821117156106c857600080fd5b82525081516020918201928201910280838360005b838110156106f55781810151838201526020016106dd565b50505050905001604052505050905061070d81610339565b61075e576040805162461bcd60e51b815260206004820181905260248201527f56323a206d7573742068617665206e6f20636172647320616374697661746564604482015290519081900360640190fd5b836107b0576040805162461bcd60e51b815260206004820181905260248201527f56323a206d7573742068617665206861642072616e646f6d6e65737320736574604482015290519081900360640190fd5b6005850261ffff811686106107fd576040805162461bcd60e51b815260206004820152600e60248201526d636865636b206f766572666c6f7760901b604482015290519081900360640190fd5b6001600160a01b03881660009081526004602090815260408083208a845290915290205461ffff90811690821681106108675760405162461bcd60e51b815260040180806020018281038252602a8152602001806110ea602a913960400191505060405180910390fd5b6002548183039060009061ffff600160a01b90910481169083161161088c578161089b565b600254600160a01b900461ffff165b90506108a561106a565b8161ffff166040519080825280602002602001820160405280156108d3578160200160208202803883390190505b5081604001819052508161ffff1660405190808252806020026020018201604052801561090a578160200160208202803883390190505b50606082015260005b8261ffff168161ffff1610156109ac576109348982870161ffff168c610b67565b61ffff90811660208501521680835261094c9061037e565b82604001518261ffff168151811061096057fe5b61ffff90921660209283029190910182015282015161097e906104c1565b82606001518261ffff168151811061099257fe5b60ff90921660209283029190910190910152600101610913565b50600254604080830151606080850151925163c8be6b9b60e01b81526001600160a01b038c81166004830190815260248301938452845160648401528451600097929092169563c8be6b9b958f959094919390916044810191608490910190602080880191028083838e5b83811015610a2f578181015183820152602001610a17565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015610a6e578181015183820152602001610a56565b5050505090500195505050505050602060405180830381600087803b158015610a9657600080fd5b505af1158015610aaa573d6000803e3d6000fd5b505050506040513d6020811015610ac057600080fd5b5051604080518e815261ffff80891660208301528616818301526060810183905290519192506001600160a01b038a16917fc8102fa5c0a66c20caa3ebb502aecfcc6e0ea963896d5a14c1bd8c10c456c5539181900360800190a250506001600160a01b039a909a1660009081526004602090815260408083209b83529a905298909820805461ffff19811661ffff918216909b0116999099179098555050505050505050565b6000806003856003811115610b7857fe5b1415610b9157610b888484610be4565b91509150610bdc565b6002856003811115610b9f57fe5b1415610baf57610b888484610d25565b6001856003811115610bbd57fe5b1415610bcd57610b888484610d85565b610bd78484610db3565b915091505b935093915050565b600080610bef611090565b610bf98585610de1565b9050600060058606610c2e57610c128260200151610eaf565b90508160600151610c268360400151610ed2565b019250610c80565b6005860660011415610c5b57610c478260200151610f09565b90508160600151610c268360400151610f5c565b610c688260200151610fa8565b90508160600151610c7c8360400151610f5c565b0192505b6001546080830151604051631954322d60e31b81526001600160a01b039092169163caa1916891849160049081019081908490811115610cbc57fe5b60ff1681526020018261ffff1661ffff1681526020019250505060206040518083038186803b158015610cee57600080fd5b505afa158015610d02573d6000803e3d6000fd5b505050506040513d6020811015610d1857600080fd5b5051935050509250929050565b600080610d30611090565b610d3a8585610de1565b9050600060058606610d5a57610d538260200151610eaf565b9050610d73565b6005860660011415610c5b57610d538260200151610f09565b8160600151610c7c8360400151610f5c565b600080610d90611090565b610d9a8585610de1565b9050600060058606610c5b57610d538260200151611013565b600080610dbe611090565b610dc88585610de1565b9050600060058606610c5b57610d538260200151610f09565b610de9611090565b6040805160208082018690528183018590528251808303840181526060830180855281519190920120610100830190935282815290608001620f4240610e32846004600a61104e565b81610e3957fe5b0663ffffffff1681526020016103e8610e55846002600461104e565b81610e5c57fe5b0661ffff1681526020016103e8610e76846002600661104e565b81610e7d57fe5b0661ffff16815260200161ffff610e97846002600861104e565b81610e9e57fe5b0661ffff1681525091505092915050565b60008163ffffffff16620f423f1415610eca57506004610379565b506003610379565b60006103e68261ffff1610610eea5750610bb8610379565b6102ec8261ffff1610610f0057506107d0610379565b506103e8610379565b60008163ffffffff16620f423f1415610f2457506004610379565b620efa6f8263ffffffff1610610f3c57506003610379565b620d03cc8263ffffffff1610610f5457506002610379565b506001610379565b60006103e68261ffff1610610f745750610bb8610379565b6103dc8261ffff1610610f8a57506107d0610379565b6103aa8261ffff1610610fa057506103e8610379565b506000919050565b60008163ffffffff16620f423f1415610fc357506004610379565b620f3bc98263ffffffff1610610fdb57506003610379565b620f0e8d8263ffffffff1610610ff357506002610379565b620e1cda8263ffffffff161061100b57506001610379565b506000610379565b60008163ffffffff16620f423f141561102e57506004610379565b620efa6f8263ffffffff161061104657506003610379565b506002610379565b600160089283021b6000199081019101919091029190911c1690565b604080516080810182526000808252602082015260609181018290528181019190915290565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe56323a206d757374206265206d6967726174696e672066726f6d20616e20617070726f766564207061636b56323a206d757374206e6f742068617665206265656e206d696772617465642070726576696f75736c79a265627a7a723158203785c699f3688ec04bba2a7017f74d3e032f03555dfde1551254db9272da5d8b64736f6c634300050b00320000000000000000000000006ebeaf8e8e946f0716e6533a6f2cefc83f60e8ab0000000000000000000000000e3a2a1f2146d86a604adc220b4967a898d7fe070000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000012c00000000000000000000000000000000000000000000000000000000000000010000000000000000000000003ae323c0589d32067c07b4a351b10bc900d8b50d

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100935760003560e01c806346d01a171161006657806346d01a17146101f25780637de07cea14610229578063850e37601461024f578063a4d66daf14610270578063ad68ebf71461027857610093565b80630107e59d146100985780631b7318bb146100d7578063222400221461011a57806345c075d5146101d1575b600080fd5b6100b9600480360360208110156100ae57600080fd5b503561ffff166102a6565b60408051921515835261ffff90911660208301528051918290030190f35b610103600480360360408110156100ed57600080fd5b506001600160a01b038135169060200135610318565b6040805161ffff9092168252519081900360200190f35b6101bd6004803603602081101561013057600080fd5b81019060208101813564010000000081111561014b57600080fd5b82018360208201111561015d57600080fd5b8035906020019184602083028401116401000000008311171561017f57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610339945050505050565b604080519115158252519081900360200190f35b610103600480360360208110156101e757600080fd5b503561ffff1661037e565b6102136004803603602081101561020857600080fd5b503561ffff166104c1565b6040805160ff9092168252519081900360200190f35b6101bd6004803603602081101561023f57600080fd5b50356001600160a01b03166104d2565b6102136004803603602081101561026557600080fd5b503561ffff166104e7565b6101036104f5565b6102a46004803603604081101561028e57600080fd5b506001600160a01b038135169060200135610506565b005b600080805b60005461ffff8216101561030a578361ffff1660008261ffff16815481106102cf57fe5b60009182526020909120601082040154600f9091166002026101000a900461ffff16141561030257600192509050610313565b6001016102ab565b50600091508190505b915091565b600460209081526000928352604080842090915290825290205461ffff1681565b6000805b82518110156103735782818151811061035257fe5b602002602001015160001461036b576000915050610379565b60010161033d565b50600190505b919050565b600060018261ffff161015801561039b57506101798261ffff1611155b156103a7575080610379565b8161ffff1661017c14156103be5750610190610379565b8161ffff1661017d14156103d55750610191610379565b8161ffff1661018a14156103ec5750610192610379565b6000806103f8846102a6565b61ffff169150915081156104135761017c0191506103799050565b8361ffff1661017a141561042d5761fde892505050610379565b8361ffff1661017b14156104475761fde992505050610379565b8361ffff1661017f14156104615761fdea92505050610379565b8361ffff16610180141561047b5761fdeb92505050610379565b6040805162461bcd60e51b8152602060048201526016602482015275424d3a20756e7265636f676e697365642070726f746f60501b604482015290519081900360640190fd5b6103e861ffff919091160460040390565b60036020526000908152604090205460ff1681565b6103e861ffff919091160490565b600254600160a01b900461ffff1681565b6001600160a01b03821660009081526003602052604090205460ff1661055d5760405162461bcd60e51b815260040180806020018281038252602b8152602001806110bf602b913960400191505060405180910390fd5b600080600080856001600160a01b0316638392fe31866040518263ffffffff1660e01b81526004018082815260200191505060e06040518083038186803b1580156105a757600080fd5b505afa1580156105bb573d6000803e3d6000fd5b505050506040513d60e08110156105d157600080fd5b508051602082015160408084015160c090940151815163deb18a9560e01b8152600481018b9052915193985091965092945092506060916001600160a01b0389169163deb18a9591602480820192600092909190829003018186803b15801561063957600080fd5b505afa15801561064d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561067657600080fd5b810190808051604051939291908464010000000082111561069657600080fd5b9083019060208201858111156106ab57600080fd5b82518660208202830111640100000000821117156106c857600080fd5b82525081516020918201928201910280838360005b838110156106f55781810151838201526020016106dd565b50505050905001604052505050905061070d81610339565b61075e576040805162461bcd60e51b815260206004820181905260248201527f56323a206d7573742068617665206e6f20636172647320616374697661746564604482015290519081900360640190fd5b836107b0576040805162461bcd60e51b815260206004820181905260248201527f56323a206d7573742068617665206861642072616e646f6d6e65737320736574604482015290519081900360640190fd5b6005850261ffff811686106107fd576040805162461bcd60e51b815260206004820152600e60248201526d636865636b206f766572666c6f7760901b604482015290519081900360640190fd5b6001600160a01b03881660009081526004602090815260408083208a845290915290205461ffff90811690821681106108675760405162461bcd60e51b815260040180806020018281038252602a8152602001806110ea602a913960400191505060405180910390fd5b6002548183039060009061ffff600160a01b90910481169083161161088c578161089b565b600254600160a01b900461ffff165b90506108a561106a565b8161ffff166040519080825280602002602001820160405280156108d3578160200160208202803883390190505b5081604001819052508161ffff1660405190808252806020026020018201604052801561090a578160200160208202803883390190505b50606082015260005b8261ffff168161ffff1610156109ac576109348982870161ffff168c610b67565b61ffff90811660208501521680835261094c9061037e565b82604001518261ffff168151811061096057fe5b61ffff90921660209283029190910182015282015161097e906104c1565b82606001518261ffff168151811061099257fe5b60ff90921660209283029190910190910152600101610913565b50600254604080830151606080850151925163c8be6b9b60e01b81526001600160a01b038c81166004830190815260248301938452845160648401528451600097929092169563c8be6b9b958f959094919390916044810191608490910190602080880191028083838e5b83811015610a2f578181015183820152602001610a17565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015610a6e578181015183820152602001610a56565b5050505090500195505050505050602060405180830381600087803b158015610a9657600080fd5b505af1158015610aaa573d6000803e3d6000fd5b505050506040513d6020811015610ac057600080fd5b5051604080518e815261ffff80891660208301528616818301526060810183905290519192506001600160a01b038a16917fc8102fa5c0a66c20caa3ebb502aecfcc6e0ea963896d5a14c1bd8c10c456c5539181900360800190a250506001600160a01b039a909a1660009081526004602090815260408083209b83529a905298909820805461ffff19811661ffff918216909b0116999099179098555050505050505050565b6000806003856003811115610b7857fe5b1415610b9157610b888484610be4565b91509150610bdc565b6002856003811115610b9f57fe5b1415610baf57610b888484610d25565b6001856003811115610bbd57fe5b1415610bcd57610b888484610d85565b610bd78484610db3565b915091505b935093915050565b600080610bef611090565b610bf98585610de1565b9050600060058606610c2e57610c128260200151610eaf565b90508160600151610c268360400151610ed2565b019250610c80565b6005860660011415610c5b57610c478260200151610f09565b90508160600151610c268360400151610f5c565b610c688260200151610fa8565b90508160600151610c7c8360400151610f5c565b0192505b6001546080830151604051631954322d60e31b81526001600160a01b039092169163caa1916891849160049081019081908490811115610cbc57fe5b60ff1681526020018261ffff1661ffff1681526020019250505060206040518083038186803b158015610cee57600080fd5b505afa158015610d02573d6000803e3d6000fd5b505050506040513d6020811015610d1857600080fd5b5051935050509250929050565b600080610d30611090565b610d3a8585610de1565b9050600060058606610d5a57610d538260200151610eaf565b9050610d73565b6005860660011415610c5b57610d538260200151610f09565b8160600151610c7c8360400151610f5c565b600080610d90611090565b610d9a8585610de1565b9050600060058606610c5b57610d538260200151611013565b600080610dbe611090565b610dc88585610de1565b9050600060058606610c5b57610d538260200151610f09565b610de9611090565b6040805160208082018690528183018590528251808303840181526060830180855281519190920120610100830190935282815290608001620f4240610e32846004600a61104e565b81610e3957fe5b0663ffffffff1681526020016103e8610e55846002600461104e565b81610e5c57fe5b0661ffff1681526020016103e8610e76846002600661104e565b81610e7d57fe5b0661ffff16815260200161ffff610e97846002600861104e565b81610e9e57fe5b0661ffff1681525091505092915050565b60008163ffffffff16620f423f1415610eca57506004610379565b506003610379565b60006103e68261ffff1610610eea5750610bb8610379565b6102ec8261ffff1610610f0057506107d0610379565b506103e8610379565b60008163ffffffff16620f423f1415610f2457506004610379565b620efa6f8263ffffffff1610610f3c57506003610379565b620d03cc8263ffffffff1610610f5457506002610379565b506001610379565b60006103e68261ffff1610610f745750610bb8610379565b6103dc8261ffff1610610f8a57506107d0610379565b6103aa8261ffff1610610fa057506103e8610379565b506000919050565b60008163ffffffff16620f423f1415610fc357506004610379565b620f3bc98263ffffffff1610610fdb57506003610379565b620f0e8d8263ffffffff1610610ff357506002610379565b620e1cda8263ffffffff161061100b57506001610379565b506000610379565b60008163ffffffff16620f423f141561102e57506004610379565b620efa6f8263ffffffff161061104657506003610379565b506002610379565b600160089283021b6000199081019101919091029190911c1690565b604080516080810182526000808252602082015260609181018290528181019190915290565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe56323a206d757374206265206d6967726174696e672066726f6d20616e20617070726f766564207061636b56323a206d757374206e6f742068617665206265656e206d696772617465642070726576696f75736c79a265627a7a723158203785c699f3688ec04bba2a7017f74d3e032f03555dfde1551254db9272da5d8b64736f6c634300050b0032

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000006ebeaf8e8e946f0716e6533a6f2cefc83f60e8ab0000000000000000000000000e3a2a1f2146d86a604adc220b4967a898d7fe070000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000012c00000000000000000000000000000000000000000000000000000000000000010000000000000000000000003ae323c0589d32067c07b4a351b10bc900d8b50d

-----Decoded View---------------
Arg [0] : _legacy (address): 0x6EbeAf8e8E946F0716E6533A6f2cefc83f60e8Ab
Arg [1] : _cards (address): 0x0E3A2A1f2146d86A604adc220b4967A898D7Fe07
Arg [2] : _packs (address[]): 0x3aE323c0589d32067c07B4A351b10bc900d8B50D
Arg [3] : _limit (uint16): 300

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000006ebeaf8e8e946f0716e6533a6f2cefc83f60e8ab
Arg [1] : 0000000000000000000000000e3a2a1f2146d86a604adc220b4967a898d7fe07
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [3] : 000000000000000000000000000000000000000000000000000000000000012c
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [5] : 0000000000000000000000003ae323c0589d32067c07b4a351b10bc900d8b50d


Swarm Source

bzzr://3785c699f3688ec04bba2a7017f74d3e032f03555dfde1551254db9272da5d8b

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.