ETH Price: $3,071.49 (-2.33%)
 
Transaction Hash
Method
Block
From
To
Value
Set Substrate Ad...169612592024-07-11 15:31:0519 hrs ago1720711865IN
0xb6cF65F9...Fd68AB042
0 ETH0.000001080.00930093
Migrate Kanarias166969142024-07-05 12:39:356 days ago1720183175IN
0xb6cF65F9...Fd68AB042
0 ETH0.000015140.0081728
Migrate Kanarias166968862024-07-05 12:38:396 days ago1720183119IN
0xb6cF65F9...Fd68AB042
0 ETH0.000015440.00833671
Configure Kanari...166924832024-07-05 10:11:537 days ago1720174313IN
0xb6cF65F9...Fd68AB042
0 ETH0.000008910.01292748
Migrate Kanarias166549102024-07-04 13:19:277 days ago1720099167IN
0xb6cF65F9...Fd68AB042
0 ETH0.000021520.00876873
Migrate Kanarias166549032024-07-04 13:19:137 days ago1720099153IN
0xb6cF65F9...Fd68AB042
0 ETH0.000034870.00873598
Set Substrate Ad...166154942024-07-03 15:25:358 days ago1720020335IN
0xb6cF65F9...Fd68AB042
0 ETH0.00000080.01285838
Migrate Kanarias166154642024-07-03 15:24:358 days ago1720020275IN
0xb6cF65F9...Fd68AB042
0 ETH0.000041080.01204858
Configure Kanari...166026532024-07-03 8:17:339 days ago1719994653IN
0xb6cF65F9...Fd68AB042
0 ETH0.00001820.00907007
Set Substrate Ad...165845962024-07-02 22:15:399 days ago1719958539IN
0xb6cF65F9...Fd68AB042
0 ETH0.000000330.00288366
Migrate Kanarias165380002024-07-01 20:22:2710 days ago1719865347IN
0xb6cF65F9...Fd68AB042
0 ETH0.000036360.00894049
Set Substrate Ad...164838382024-06-30 14:17:0311 days ago1719757023IN
0xb6cF65F9...Fd68AB042
0 ETH0.000000870.00751362
Configure Kanari...164820102024-06-30 13:16:0711 days ago1719753367IN
0xb6cF65F9...Fd68AB042
0 ETH0.000002410.00564771
Set Substrate Ad...164416762024-06-29 14:51:3912 days ago1719672699IN
0xb6cF65F9...Fd68AB042
0 ETH0.000001490.01278293
Set Substrate Ad...164152532024-06-29 0:10:5313 days ago1719619853IN
0xb6cF65F9...Fd68AB042
0 ETH0.000000350.00306368
Migrate Kanarias163877742024-06-28 8:54:5514 days ago1719564895IN
0xb6cF65F9...Fd68AB042
0 ETH0.000024880.0088
Migrate Kanarias163481962024-06-27 10:55:3915 days ago1719485739IN
0xb6cF65F9...Fd68AB042
0 ETH0.000009560.00257698
Migrate Kanarias163223762024-06-26 20:34:5915 days ago1719434099IN
0xb6cF65F9...Fd68AB042
0 ETH0.000019610.00571814
Configure Kanari...163019842024-06-26 9:15:1516 days ago1719393315IN
0xb6cF65F9...Fd68AB042
0 ETH0.000008130.00674461
Configure Kanari...163019812024-06-26 9:15:0916 days ago1719393309IN
0xb6cF65F9...Fd68AB042
0 ETH0.000016710.00673363
Set Substrate Ad...162573432024-06-25 8:27:1317 days ago1719304033IN
0xb6cF65F9...Fd68AB042
0 ETH0.000000850.00731594
Set Substrate Ad...162437842024-06-25 0:55:1517 days ago1719276915IN
0xb6cF65F9...Fd68AB042
0 ETH0.000000490.00425099
Set Substrate Ad...162010452024-06-24 1:10:3718 days ago1719191437IN
0xb6cF65F9...Fd68AB042
0 ETH0.000000150.00132927
Set Substrate Ad...160886942024-06-21 10:45:3521 days ago1718966735IN
0xb6cF65F9...Fd68AB042
0 ETH0.000001280.01101074
Migrate Kanarias160635052024-06-20 20:45:5721 days ago1718916357IN
0xb6cF65F9...Fd68AB042
0 ETH0.000004810.00132516
View all transactions

Parent Transaction Hash Block From To Value
View All Internal Transactions

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Migrator

Compiler Version
v0.8.21+commit.d9974bed

Optimization Enabled:
Yes with 1000 runs

Other Settings:
london EvmVersion
File 1 of 8 : Migrator.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.21;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@rmrk-team/evm-contracts/contracts/RMRK/access/Ownable.sol";
import "./interfaces/IMintWithAssets.sol";

error AlreadyMigrated();
error ItemNeverConfigured();
error ItemPreviouslyConfigured();
error MigrationNotAvailable();
error NothingToMigrate();
error NotMapper();

contract Migrator is Ownable, IERC721Receiver {
    event KanariaMigrated(uint256 indexed kanariaId, address indexed owner);

    event ItemMigrated(
        uint256 indexed kanariaId,
        address indexed owner,
        address contractAddress,
        uint64[] itemsAssetIds
    );

    event EvmToSubstrateAddressSet(
        address indexed evmAddress,
        string indexed substrateAddress
    );

    event EvmToSubstrateAddressReset(
        address indexed evmAddress,
        string indexed substrateAddress
    );

    struct ItemWithAssets {
        address contractAddress;
        uint64[] assetIds;
    }

    struct ItemWithAssetsAndId {
        address contractAddress;
        uint64[] assetIds;
        uint256 itemId;
    }

    struct ItemInputConfig {
        address owner;
        ItemWithAssetsAndId[] itemsWithAssets;
    }

    struct KanariaMigrationConfig {
        uint256 kanariaId;
        address owner;
        ItemWithAssets[] items;
    }

    mapping(uint256 kanariaId => uint256 migrated) // 1 = true, 0 = false
        private _kanariaMigrationState;
    mapping(uint256 kanariaId => address owner) private _kanariaOwners;
    mapping(uint256 kanariaId => ItemWithAssets[] items)
        private _kanariaItemsWithAssets;
    mapping(address owner => ItemWithAssetsAndId[])
        private _unnestedItemsMigrationConfig;
    mapping(uint256 itemId => uint256 configured) // 1 = true, 0 = false
        private _unnestedItemsConfiguredIds;

    address private _kanaria;
    address private _kanariaHolder;

    address private _mapper;
    mapping(address evm => string substrate) private _evmToSubstrate;
    mapping(string substrate => address evm) private _substrateToEvm;

    constructor(address kanaria) {
        _kanaria = kanaria;
    }

    function onERC721Received(
        address,
        address,
        uint256,
        bytes calldata
    ) external pure override returns (bytes4) {
        return this.onERC721Received.selector;
    }

    function configureKanariaMigrations(
        KanariaMigrationConfig[] calldata kanariaMigrationConfigs
    ) public onlyOwnerOrContributor {
        uint256 length = kanariaMigrationConfigs.length;

        for (uint256 i; i < length; ) {
            KanariaMigrationConfig memory config = kanariaMigrationConfigs[i];
            uint256 kanariaId = config.kanariaId;
            if (_kanariaMigrationState[kanariaId] == 1)
                revert AlreadyMigrated();

            _kanariaOwners[kanariaId] = config.owner;
            ItemWithAssets[] memory items = config.items;
            delete _kanariaItemsWithAssets[kanariaId];

            uint256 itemsLength = items.length;
            for (uint256 j; j < itemsLength; ) {
                _kanariaItemsWithAssets[kanariaId].push(items[j]);
                unchecked {
                    ++j;
                }
            }

            unchecked {
                ++i;
            }
        }
    }

    function configureItemMigrations(
        ItemInputConfig[] calldata itemsConfig
    ) public onlyOwnerOrContributor {
        uint256 length = itemsConfig.length;

        for (uint256 i; i < length; ) {
            ItemWithAssetsAndId[] memory items = itemsConfig[i].itemsWithAssets;
            address owner = itemsConfig[i].owner;

            for (uint256 j; j < items.length; ) {
                ItemWithAssetsAndId memory item = items[j];
                uint256 itemId = item.itemId;
                if (_unnestedItemsConfiguredIds[itemId] == 1)
                    revert ItemPreviouslyConfigured();
                _unnestedItemsConfiguredIds[itemId] = 1;
                _unnestedItemsMigrationConfig[owner].push(item);
                unchecked {
                    ++j;
                }
            }
            unchecked {
                ++i;
            }
        }
    }

    function updateItemConfiguration(
        address owner,
        uint256 itemId,
        address contractAddress,
        uint64[] memory assetIds
    ) public onlyOwnerOrContributor {
        if (_unnestedItemsConfiguredIds[itemId] == 0)
            revert ItemNeverConfigured();
        uint256 length = _unnestedItemsMigrationConfig[owner].length;
        bool found;

        for (uint256 i; i < length; ) {
            if (_unnestedItemsMigrationConfig[owner][i].itemId == itemId) {
                found = true;
                _unnestedItemsMigrationConfig[owner][i] = ItemWithAssetsAndId({
                    contractAddress: contractAddress,
                    assetIds: assetIds,
                    itemId: itemId
                });
                break;
            }
            unchecked {
                ++i;
            }
        }
        if (!found) revert AlreadyMigrated();
    }

    function getConfigForKanarias(
        uint256[] memory kanariaIds
    ) public view returns (KanariaMigrationConfig[] memory) {
        KanariaMigrationConfig[] memory configs = new KanariaMigrationConfig[](
            kanariaIds.length
        );
        for (uint256 i; i < kanariaIds.length; ) {
            configs[i] = KanariaMigrationConfig({
                kanariaId: kanariaIds[i],
                owner: _kanariaOwners[kanariaIds[i]],
                items: _kanariaItemsWithAssets[kanariaIds[i]]
            });
            unchecked {
                ++i;
            }
        }
        return configs;
    }

    function getMigratedStateForKanarias(
        uint256[] memory kanariaIds
    ) public view returns (bool[] memory) {
        bool[] memory states = new bool[](kanariaIds.length);
        for (uint256 i; i < kanariaIds.length; ) {
            states[i] = _kanariaMigrationState[kanariaIds[i]] == 1;
            unchecked {
                ++i;
            }
        }
        return states;
    }

    function getConfigForItems(
        address[] memory owners
    ) public view returns (ItemWithAssetsAndId[][] memory configs) {
        uint256 length = owners.length;
        configs = new ItemWithAssetsAndId[][](length);
        for (uint256 i; i < length; ) {
            configs[i] = _unnestedItemsMigrationConfig[owners[i]];
            unchecked {
                ++i;
            }
        }
        return configs;
    }

    function getTotalItemsToMigrateForOwners(
        address[] memory owners
    ) public view returns (uint256[] memory total) {
        uint256 length = owners.length;
        total = new uint256[](length);
        for (uint256 i; i < length; ) {
            total[i] = _unnestedItemsMigrationConfig[owners[i]].length;
            unchecked {
                ++i;
            }
        }
    }

    function migrateKanarias(uint256[] calldata kanariaIds) public {
        for (uint256 i; i < kanariaIds.length; ) {
            _migrateKanaria(kanariaIds[i]);
            unchecked {
                ++i;
            }
        }
    }

    function _migrateKanaria(uint256 kanariaId) private {
        address owner = _kanariaOwners[kanariaId];
        ItemWithAssets[] memory items = _kanariaItemsWithAssets[kanariaId];

        if (owner == address(0)) revert MigrationNotAvailable();
        if (_kanariaMigrationState[kanariaId] == 1) revert AlreadyMigrated();
        _kanariaMigrationState[kanariaId] = 1;

        // Items
        for (uint256 i; i < items.length; ) {
            ItemWithAssets memory item = items[i];
            IMintWithAssets(item.contractAddress).nestMintWithAssets(
                _kanaria,
                kanariaId,
                item.assetIds
            );
            emit ItemMigrated(
                kanariaId,
                owner,
                item.contractAddress,
                item.assetIds
            );
            unchecked {
                ++i;
            }
        }

        // Kanaria
        IERC721(_kanaria).transferFrom(_kanariaHolder, owner, kanariaId);
        emit KanariaMigrated(kanariaId, owner);
    }

    function migrateItems(address owner, uint256 amount) public {
        uint256 length = _unnestedItemsMigrationConfig[owner].length;
        if (length == 0) revert NothingToMigrate();
        amount = amount > length ? length : amount;

        for (uint256 i; i < amount; ) {
            uint256 lastIndex = length - i - 1;
            ItemWithAssetsAndId memory item = _unnestedItemsMigrationConfig[
                owner
            ][lastIndex];
            _unnestedItemsMigrationConfig[owner].pop();
            IMintWithAssets(item.contractAddress).mintWithAssets(
                owner,
                item.assetIds
            );
            emit ItemMigrated(0, owner, item.contractAddress, item.assetIds);
            unchecked {
                ++i;
            }
        }
    }

    function getKanariaAddress() public view returns (address) {
        return _kanaria;
    }

    function getKanariaHolderAddress() public view returns (address) {
        return _kanariaHolder;
    }

    function setKanariaHolderAddress(
        address kanariaHolder
    ) external onlyOwnerOrContributor {
        _kanariaHolder = kanariaHolder;
    }

    function getMapperAddress() public view returns (address) {
        return _mapper;
    }

    function setMapperAddress(address mapper) external onlyOwnerOrContributor {
        _mapper = mapper;
    }

    function setSubstrateAddress(
        address evm,
        string memory substrateAddress
    ) external {
        if (msg.sender != _mapper) revert NotMapper();
        _evmToSubstrate[evm] = substrateAddress;
        _substrateToEvm[substrateAddress] = evm;
        emit EvmToSubstrateAddressSet(evm, substrateAddress);
    }

    function resetSubstrateAddress(
        address evm,
        string memory substrateAddress
    ) external {
        if (msg.sender != _mapper) revert NotMapper();
        delete _evmToSubstrate[evm];
        delete _substrateToEvm[substrateAddress];
        emit EvmToSubstrateAddressReset(evm, substrateAddress);
    }

    function batchGetSubstrateAddresses(
        address[] memory evmAddress
    ) public view returns (string[] memory substrateAddresses) {
        substrateAddresses = new string[](evmAddress.length);
        for (uint256 i; i < evmAddress.length; ) {
            substrateAddresses[i] = _evmToSubstrate[evmAddress[i]];
            unchecked {
                ++i;
            }
        }
    }

    function batchGetEvmAddresses(
        string[] memory substrateAddress
    ) public view returns (address[] memory evmAddresses) {
        evmAddresses = new address[](substrateAddress.length);
        for (uint256 i; i < substrateAddress.length; ) {
            evmAddresses[i] = _substrateToEvm[substrateAddress[i]];
            unchecked {
                ++i;
            }
        }
    }
}

File 2 of 8 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

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

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

File 3 of 8 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 4 of 8 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 5 of 8 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @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);
}

File 6 of 8 : Ownable.sol
// SPDX-License-Identifier: Apache-2.0

pragma solidity ^0.8.21;

import "@openzeppelin/contracts/utils/Context.sol";
import "../library/RMRKErrors.sol";

/**
 * @title Ownable
 * @author RMRK team
 * @notice A minimal ownable smart contractf or owner and contributors.
 * @dev This smart contract is based on "openzeppelin's access/Ownable.sol".
 */
contract Ownable is Context {
    address private _owner;
    mapping(address => uint256) private _contributors;

    /**
     * @notice Used to anounce the transfer of ownership.
     * @param previousOwner Address of the account that transferred their ownership role
     * @param newOwner Address of the account receiving the ownership role
     */
    event OwnershipTransferred(
        address indexed previousOwner,
        address indexed newOwner
    );

    /**
     * @notice Event that signifies that an address was granted contributor role or that the permission has been
     *  revoked.
     * @dev This can only be triggered by a current owner, so there is no need to include that information in the event.
     * @param contributor Address of the account that had contributor role status updated
     * @param isContributor A boolean value signifying whether the role has been granted (`true`) or revoked (`false`)
     */
    event ContributorUpdate(address indexed contributor, bool isContributor);

    /**
     * @dev Reverts if called by any account other than the owner or an approved contributor.
     */
    modifier onlyOwnerOrContributor() {
        _onlyOwnerOrContributor();
        _;
    }

    /**
     * @dev Reverts if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _onlyOwner();
        _;
    }

    /**
     * @dev Initializes the contract by setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @notice Returns the address of the current owner.
     * @return Address of the current owner
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @notice Leaves the contract without owner. Functions using the `onlyOwner` modifier will be disabled.
     * @dev Can only be called by the current owner.
     * @dev Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is
     *  only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @notice Transfers ownership of the contract to a new owner.
     * @dev Can only be called by the current owner.
     * @param newOwner Address of the new owner's account
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) revert RMRKNewOwnerIsZeroAddress();
        _transferOwnership(newOwner);
    }

    /**
     * @notice Transfers ownership of the contract to a new owner.
     * @dev Internal function without access restriction.
     * @dev Emits ***OwnershipTransferred*** event.
     * @param newOwner Address of the new owner's account
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }

    /**
     * @notice Adds or removes a contributor to the smart contract.
     * @dev Can only be called by the owner.
     * @dev Emits ***ContributorUpdate*** event.
     * @param contributor Address of the contributor's account
     * @param grantRole A boolean value signifying whether the contributor role is being granted (`true`) or revoked
     *  (`false`)
     */
    function manageContributor(
        address contributor,
        bool grantRole
    ) external onlyOwner {
        if (contributor == address(0)) revert RMRKNewContributorIsZeroAddress();
        grantRole
            ? _contributors[contributor] = 1
            : _contributors[contributor] = 0;
        emit ContributorUpdate(contributor, grantRole);
    }

    /**
     * @notice Used to check if the address is one of the contributors.
     * @param contributor Address of the contributor whose status we are checking
     * @return Boolean value indicating whether the address is a contributor or not
     */
    function isContributor(address contributor) public view returns (bool) {
        return _contributors[contributor] == 1;
    }

    /**
     * @notice Used to verify that the caller is either the owner or a contributor.
     * @dev If the caller is not the owner or a contributor, the execution will be reverted.
     */
    function _onlyOwnerOrContributor() private view {
        if (owner() != _msgSender() && !isContributor(_msgSender()))
            revert RMRKNotOwnerOrContributor();
    }

    /**
     * @notice Used to verify that the caller is the owner.
     * @dev If the caller is not the owner, the execution will be reverted.
     */
    function _onlyOwner() private view {
        if (owner() != _msgSender()) revert RMRKNotOwner();
    }
}

File 7 of 8 : RMRKErrors.sol
// SPDX-License-Identifier: Apache-2.0

pragma solidity ^0.8.21;

/// @title RMRKErrors
/// @author RMRK team
/// @notice A collection of errors used in the RMRK suite
/// @dev Errors are kept in a centralised file in order to provide a central point of reference and to avoid error
///  naming collisions due to inheritance

/// Attempting to grant the token to 0x0 address
error ERC721AddressZeroIsNotaValidOwner();
/// Attempting to grant approval to the current owner of the token
error ERC721ApprovalToCurrentOwner();
/// Attempting to grant approval when not being owner or approved for all should not be permitted
error ERC721ApproveCallerIsNotOwnerNorApprovedForAll();
/// Attempting to get approvals for a token owned by 0x0 (considered non-existent)
error ERC721ApprovedQueryForNonexistentToken();
/// Attempting to grant approval to self
error ERC721ApproveToCaller();
/// Attempting to use an invalid token ID
error ERC721InvalidTokenId();
/// Attempting to mint to 0x0 address
error ERC721MintToTheZeroAddress();
/// Attempting to manage a token without being its owner or approved by the owner
error ERC721NotApprovedOrOwner();
/// Attempting to mint an already minted token
error ERC721TokenAlreadyMinted();
/// Attempting to transfer the token from an address that is not the owner
error ERC721TransferFromIncorrectOwner();
/// Attempting to safe transfer to an address that is unable to receive the token
error ERC721TransferToNonReceiverImplementer();
/// Attempting to transfer the token to a 0x0 address
error ERC721TransferToTheZeroAddress();
/// Attempting to grant approval of assets to their current owner
error RMRKApprovalForAssetsToCurrentOwner();
/// Attempting to grant approval of assets without being the caller or approved for all
error RMRKApproveForAssetsCallerIsNotOwnerNorApprovedForAll();
/// Attempting to incorrectly configue a Catalog item
error RMRKBadConfig();
/// Attempting to set the priorities with an array of length that doesn't match the length of active assets array
error RMRKBadPriorityListLength();
/// Attempting to add an asset entry with `Part`s, without setting the `Catalog` address
error RMRKCatalogRequiredForParts();
/// Attempting to transfer a soulbound (non-transferrable) token
error RMRKCannotTransferSoulbound();
/// Attempting to accept a child that has already been accepted
error RMRKChildAlreadyExists();
/// Attempting to interact with a child, using index that is higher than the number of children
error RMRKChildIndexOutOfRange();
/// Attempting to find the index of a child token on a parent which does not own it.
error RMRKChildNotFoundInParent();
/// Attempting to pass collaborator address array and collaborator permission array of different lengths
error RMRKCollaboratorArraysNotEqualLength();
/// Attempting to register a collection that is already registered
error RMRKCollectionAlreadyRegistered();
/// Attempting to manage or interact with colleciton that is not registered
error RMRKCollectionNotRegistered();
/// Attempting to equip a `Part` with a child not approved by the Catalog
error RMRKEquippableEquipNotAllowedByCatalog();
/// Attempting to pass an epired ECDSA deadline
error RMRKExpiredDeadline();
/// Attempting to use ID 0, which is not supported
/// @dev The ID 0 in RMRK suite is reserved for empty values. Guarding against its use ensures the expected operation
error RMRKIdZeroForbidden();
/// Attempting to interact with an asset, using index greater than number of assets
error RMRKIndexOutOfRange();
/// Attempting to reclaim a child that can't be reclaimed
error RMRKInvalidChildReclaim();
/// Attempting to use and invalid ECDSA signature
error RMRKInvalidSignature();
/// Attempting to interact with an end-user account when the contract account is expected
error RMRKIsNotContract();
/// Attempting to interact with a contract that had its operation locked
error RMRKLocked();
/// Attempting to add a pending child after the number of pending children has reached the limit (default limit is 128)
error RMRKMaxPendingChildrenReached();
/// Attempting to add a pending asset after the number of pending assets has reached the limit (default limit is
///  128)
error RMRKMaxPendingAssetsReached();
/// Attempting to burn a total number of recursive children higher than maximum set
/// @param childContract Address of the collection smart contract in which the maximum number of recursive burns was reached
/// @param childId ID of the child token at which the maximum number of recursive burns was reached
error RMRKMaxRecursiveBurnsReached(address childContract, uint256 childId);
/// Attempting to mint a number of tokens that would cause the total supply to be greater than maximum supply
error RMRKMintOverMax();
/// Attempting to mint a nested token to a smart contract that doesn't support nesting
error RMRKMintToNonRMRKNestableImplementer();
/// Attempting to mint zero tokens
error RMRKMintZero();
/// Attempting to pass complementary arrays of different lengths
error RMRKMismachedArrayLength();
/// Attempting to transfer a child before it is unequipped
error RMRKMustUnequipFirst();
/// Attempting to nest a child over the nestable limit (current limit is 100 levels of nesting)
error RMRKNestableTooDeep();
/// Attempting to nest the token to own descendant, which would create a loop and leave the looped tokens in limbo
error RMRKNestableTransferToDescendant();
/// Attempting to nest the token to a smart contract that doesn't support nesting
error RMRKNestableTransferToNonRMRKNestableImplementer();
/// Attempting to nest the token into itself
error RMRKNestableTransferToSelf();
/// Attempting to interact with an asset that can not be found
error RMRKNoAssetMatchingId();
/// Attempting to manage an asset without owning it or having been granted permission by the owner to do so
error RMRKNotApprovedForAssetsOrOwner();
/// Attempting to interact with a token without being its owner or having been granted permission by the
///  owner to do so
/// @dev When a token is nested, only the direct owner (NFT parent) can mange it. In that case, approved addresses are
///  not allowed to manage it, in order to ensure the expected behaviour
error RMRKNotApprovedOrDirectOwner();
/// Attempting to manage a collection without being the collection's collaborator
error RMRKNotCollectionCollaborator();
/// Attemting to manage a collection without being the collection's issuer
error RMRKNotCollectionIssuer();
/// Attempting to manage a collection without being the collection's issuer or collaborator
error RMRKNotCollectionIssuerOrCollaborator();
/// Attempting to compose an asset wihtout having an associated Catalog
error RMRKNotComposableAsset();
/// Attempting to unequip an item that isn't equipped
error RMRKNotEquipped();
/// Attempting to interact with a management function without being the smart contract's owner
error RMRKNotOwner();
/// Attempting to interact with a function without being the owner or contributor of the collection
error RMRKNotOwnerOrContributor();
/// Attempting to manage a collection without being the specific address
error RMRKNotSpecificAddress();
/// Attempting to manage a token without being its owner
error RMRKNotTokenOwner();
/// Attempting to transfer the ownership to the 0x0 address
error RMRKNewOwnerIsZeroAddress();
/// Attempting to assign a 0x0 address as a contributor
error RMRKNewContributorIsZeroAddress();
/// Attemtping to use `Ownable` interface without implementing it
error RMRKOwnableNotImplemented();
/// Attempting an operation requiring the token being nested, while it is not
error RMRKParentIsNotNFT();
/// Attempting to add a `Part` with an ID that is already used
error RMRKPartAlreadyExists();
/// Attempting to use a `Part` that doesn't exist
error RMRKPartDoesNotExist();
/// Attempting to use a `Part` that is `Fixed` when `Slot` kind of `Part` should be used
error RMRKPartIsNotSlot();
/// Attempting to interact with a pending child using an index greater than the size of pending array
error RMRKPendingChildIndexOutOfRange();
/// Attempting to add an asset using an ID that has already been used
error RMRKAssetAlreadyExists();
/// Attempting to equip an item into a slot that already has an item equipped
error RMRKSlotAlreadyUsed();
/// Attempting to equip an item into a `Slot` that the target asset does not implement
error RMRKTargetAssetCannotReceiveSlot();
/// Attempting to equip a child into a `Slot` and parent that the child's collection doesn't support
error RMRKTokenCannotBeEquippedWithAssetIntoSlot();
/// Attempting to compose a NFT of a token without active assets
error RMRKTokenDoesNotHaveAsset();
/// Attempting to determine the asset with the top priority on a token without assets
error RMRKTokenHasNoAssets();
/// Attempting to accept or transfer a child which does not match the one at the specified index
error RMRKUnexpectedChildId();
/// Attempting to reject all pending assets but more assets than expected are pending
error RMRKUnexpectedNumberOfAssets();
/// Attempting to reject all pending children but children assets than expected are pending
error RMRKUnexpectedNumberOfChildren();
/// Attempting to accept or reject an asset which does not match the one at the specified index
error RMRKUnexpectedAssetId();
/// Attempting an operation expecting a parent to the token which is not the actual one
error RMRKUnexpectedParent();
/// Attempting not to pass an empty array of equippable addresses when adding or setting the equippable addresses
error RMRKZeroLengthIdsPassed();
/// Attempting to set the royalties to a value higher than 100% (10000 in basis points)
error RMRKRoyaltiesTooHigh();
/// Attempting to do a bulk operation on a token that is not owned by the caller
error RMRKCanOnlyDoBulkOperationsOnOwnedTokens();
/// Attempting to do a bulk operation with multiple tokens at a time
error RMRKCanOnlyDoBulkOperationsWithOneTokenAtATime();
/// Attempting to pay with native token with a value different than expected
error RMRKWrongValueSent();

File 8 of 8 : IMintWithAssets.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.21;

interface IMintWithAssets {
    function mintWithAssets(address to, uint64[] memory assetIds) external;

    function nestMintWithAssets(
        address parentContract,
        uint256 destinationId,
        uint64[] memory assetIds
    ) external;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"kanaria","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyMigrated","type":"error"},{"inputs":[],"name":"ItemNeverConfigured","type":"error"},{"inputs":[],"name":"ItemPreviouslyConfigured","type":"error"},{"inputs":[],"name":"MigrationNotAvailable","type":"error"},{"inputs":[],"name":"NotMapper","type":"error"},{"inputs":[],"name":"NothingToMigrate","type":"error"},{"inputs":[],"name":"RMRKNewContributorIsZeroAddress","type":"error"},{"inputs":[],"name":"RMRKNewOwnerIsZeroAddress","type":"error"},{"inputs":[],"name":"RMRKNotOwner","type":"error"},{"inputs":[],"name":"RMRKNotOwnerOrContributor","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"contributor","type":"address"},{"indexed":false,"internalType":"bool","name":"isContributor","type":"bool"}],"name":"ContributorUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"evmAddress","type":"address"},{"indexed":true,"internalType":"string","name":"substrateAddress","type":"string"}],"name":"EvmToSubstrateAddressReset","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"evmAddress","type":"address"},{"indexed":true,"internalType":"string","name":"substrateAddress","type":"string"}],"name":"EvmToSubstrateAddressSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"kanariaId","type":"uint256"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"address","name":"contractAddress","type":"address"},{"indexed":false,"internalType":"uint64[]","name":"itemsAssetIds","type":"uint64[]"}],"name":"ItemMigrated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"kanariaId","type":"uint256"},{"indexed":true,"internalType":"address","name":"owner","type":"address"}],"name":"KanariaMigrated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"string[]","name":"substrateAddress","type":"string[]"}],"name":"batchGetEvmAddresses","outputs":[{"internalType":"address[]","name":"evmAddresses","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"evmAddress","type":"address[]"}],"name":"batchGetSubstrateAddresses","outputs":[{"internalType":"string[]","name":"substrateAddresses","type":"string[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"owner","type":"address"},{"components":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint64[]","name":"assetIds","type":"uint64[]"},{"internalType":"uint256","name":"itemId","type":"uint256"}],"internalType":"struct Migrator.ItemWithAssetsAndId[]","name":"itemsWithAssets","type":"tuple[]"}],"internalType":"struct Migrator.ItemInputConfig[]","name":"itemsConfig","type":"tuple[]"}],"name":"configureItemMigrations","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"kanariaId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"},{"components":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint64[]","name":"assetIds","type":"uint64[]"}],"internalType":"struct Migrator.ItemWithAssets[]","name":"items","type":"tuple[]"}],"internalType":"struct Migrator.KanariaMigrationConfig[]","name":"kanariaMigrationConfigs","type":"tuple[]"}],"name":"configureKanariaMigrations","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"owners","type":"address[]"}],"name":"getConfigForItems","outputs":[{"components":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint64[]","name":"assetIds","type":"uint64[]"},{"internalType":"uint256","name":"itemId","type":"uint256"}],"internalType":"struct Migrator.ItemWithAssetsAndId[][]","name":"configs","type":"tuple[][]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"kanariaIds","type":"uint256[]"}],"name":"getConfigForKanarias","outputs":[{"components":[{"internalType":"uint256","name":"kanariaId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"},{"components":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint64[]","name":"assetIds","type":"uint64[]"}],"internalType":"struct Migrator.ItemWithAssets[]","name":"items","type":"tuple[]"}],"internalType":"struct Migrator.KanariaMigrationConfig[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getKanariaAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getKanariaHolderAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMapperAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"kanariaIds","type":"uint256[]"}],"name":"getMigratedStateForKanarias","outputs":[{"internalType":"bool[]","name":"","type":"bool[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"owners","type":"address[]"}],"name":"getTotalItemsToMigrateForOwners","outputs":[{"internalType":"uint256[]","name":"total","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"contributor","type":"address"}],"name":"isContributor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"contributor","type":"address"},{"internalType":"bool","name":"grantRole","type":"bool"}],"name":"manageContributor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"migrateItems","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"kanariaIds","type":"uint256[]"}],"name":"migrateKanarias","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"evm","type":"address"},{"internalType":"string","name":"substrateAddress","type":"string"}],"name":"resetSubstrateAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"kanariaHolder","type":"address"}],"name":"setKanariaHolderAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"mapper","type":"address"}],"name":"setMapperAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"evm","type":"address"},{"internalType":"string","name":"substrateAddress","type":"string"}],"name":"setSubstrateAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"itemId","type":"uint256"},{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint64[]","name":"assetIds","type":"uint64[]"}],"name":"updateItemConfiguration","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b5060405162002b2e38038062002b2e8339810160408190526200003491620000b5565b6200003f3362000065565b600780546001600160a01b0319166001600160a01b0392909216919091179055620000e7565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215620000c857600080fd5b81516001600160a01b0381168114620000e057600080fd5b9392505050565b612a3780620000f76000396000f3fe608060405234801561001057600080fd5b50600436106101985760003560e01c806379e8ca9e116100e3578063aad33f251161008c578063d5affd2c11610066578063d5affd2c146103f9578063f0172dd31461040c578063f2fde38b1461042c57600080fd5b8063aad33f25146103a8578063ca12e52c146103b9578063d294459c146103d957600080fd5b806389bd4ec1116100bd57806389bd4ec1146103615780638da5cb5b146103865780639c3950191461039757600080fd5b806379e8ca9e146103285780637d55033e1461033b57806389087dda1461034e57600080fd5b80633e00dcf6116101455780635ce86b471161011f5780635ce86b47146102ed578063715018a61461030d578063715d17441461031557600080fd5b80633e00dcf6146102a75780633ffd5dc8146102c757806349f5b8c0146102da57600080fd5b80631d0d35f5116101765780631d0d35f5146102445780631fa88b63146102815780632aa524a81461029457600080fd5b806308d4a17d1461019d5780630ce06def146101b2578063150b7a02146101db575b600080fd5b6101b06101ab366004611d7d565b61043f565b005b6101c56101c0366004611def565b610518565b6040516101d29190611ed1565b60405180910390f35b6102136101e9366004611f9d565b7f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101d2565b610271610252366004612038565b6001600160a01b03166000908152600160208190526040909120541490565b60405190151581526020016101d2565b6101b061028f3660046120a6565b6106d9565b6101b06102a2366004612165565b610848565b6102ba6102b53660046121cd565b6109ea565b6040516101d2919061227e565b6101b06102d5366004612038565b610abd565b6101b06102e83660046122cb565b610ae7565b6103006102fb3660046122f5565b610da5565b6040516101d2919061237b565b6101b0610fdf565b6101b0610323366004611d7d565b610ff3565b6101b061033636600461245f565b6110b6565b6101b06103493660046120a6565b61118c565b6101b061035c366004612038565b61132a565b6008546001600160a01b03165b6040516001600160a01b0390911681526020016101d2565b6000546001600160a01b031661036e565b6009546001600160a01b031661036e565b6007546001600160a01b031661036e565b6103cc6103c7366004611def565b611354565b6040516101d291906124bf565b6103ec6103e73660046122f5565b61149e565b6040516101d29190612539565b6101b06104073660046120a6565b61154e565b61041f61041a366004611def565b611587565b6040516101d29190612573565b6101b061043a366004612038565b611643565b6009546001600160a01b0316331461046a57604051631791b1c760e31b815260040160405180910390fd5b6001600160a01b0382166000908152600a6020526040902061048c8282612625565b5081600b8260405161049e91906126e5565b90815260405190819003602001812080546001600160a01b03939093166001600160a01b0319909316929092179091556104d99082906126e5565b604051908190038120906001600160a01b038416907f0cfb0c497178fee027ad109e0b9dfbd24e0b521e40cd6cb3b40222f43e5d52ac90600090a35050565b80516060908067ffffffffffffffff81111561053657610536611c7a565b60405190808252806020026020018201604052801561056957816020015b60608152602001906001900390816105545790505b50915060005b818110156106d2576005600085838151811061058d5761058d612701565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b828210156106a9576000848152602090819020604080516060810182526003860290920180546001600160a01b0316835260018101805483518187028101870190945280845293949193858301939283018282801561068757602002820191906000526020600020906000905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116106425790505b50505050508152602001600282015481525050815260200190600101906105d5565b505050508382815181106106bf576106bf612701565b602090810291909101015260010161056f565b5050919050565b6106e1611697565b8060005b8181101561084257600084848381811061070157610701612701565b90506020028101906107139190612717565b61071c9061272d565b805160008181526002602052604090205491925090600103610751576040516332870f2f60e21b815260040160405180910390fd5b602082810151600083815260038352604080822080546001600160a01b0319166001600160a01b039094169390931790925581850151600490935290812061079891611ae0565b805160005b8181101561083257600084815260046020526040902083518490839081106107c7576107c7612701565b602090810291909101810151825460018082018555600094855293839020825160029092020180546001600160a01b0319166001600160a01b03909216919091178155818301518051929491936108249392850192910190611b01565b50505080600101905061079d565b50846001019450505050506106e5565b50505050565b610850611697565b6000838152600660205260408120549003610897576040517f5a4622ee00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03841660009081526005602052604081205490805b828110156109c3576001600160a01b03871660009081526005602052604090208054879190839081106108e8576108e8612701565b906000526020600020906003020160020154036109bb57600191506040518060600160405280866001600160a01b031681526020018581526020018781525060056000896001600160a01b03166001600160a01b03168152602001908152602001600020828154811061095d5761095d612701565b600091825260209182902083516003929092020180546001600160a01b0319166001600160a01b0390921691909117815582820151805191926109a892600185019290910190611b01565b50604082015181600201559050506109c3565b6001016108b3565b50806109e2576040516332870f2f60e21b815260040160405180910390fd5b505050505050565b6060815167ffffffffffffffff811115610a0657610a06611c7a565b604051908082528060200260200182016040528015610a2f578160200160208202803683370190505b50905060005b8251811015610ab757600b838281518110610a5257610a52612701565b6020026020010151604051610a6791906126e5565b9081526040519081900360200190205482516001600160a01b0390911690839083908110610a9757610a97612701565b6001600160a01b0390921660209283029190910190910152600101610a35565b50919050565b610ac5611697565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03821660009081526005602052604081205490819003610b3a576040517f1a7b9b9500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b808211610b475781610b49565b805b915060005b828110156108425760006001610b648385612847565b610b6e9190612847565b6001600160a01b03861660009081526005602052604081208054929350909183908110610b9d57610b9d612701565b600091825260209182902060408051606081018252600390930290910180546001600160a01b03168352600181018054835181870281018701909452808452939491938583019392830182828015610c4857602002820191906000526020600020906000905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610c035790505b50505050508152602001600282015481525050905060056000876001600160a01b03166001600160a01b03168152602001908152602001600020805480610c9157610c9161286e565b60008281526020812060036000199093019283020180546001600160a01b031916815590610cc26001830182611bbc565b506000600291909101559055805160208201516040517f7dd540b20000000000000000000000000000000000000000000000000000000081526001600160a01b0390921691637dd540b291610d1c918a9190600401612884565b600060405180830381600087803b158015610d3657600080fd5b505af1158015610d4a573d6000803e3d6000fd5b50505050856001600160a01b031660007feb6cdedb6b18b8bf714d227e980630b893a0449658458329d2579dd1976cf59783600001518460200151604051610d93929190612884565b60405180910390a35050600101610b4e565b60606000825167ffffffffffffffff811115610dc357610dc3611c7a565b604051908082528060200260200182016040528015610e1057816020015b60408051606080820183526000808352602083015291810191909152815260200190600190039081610de15790505b50905060005b8351811015610fd8576040518060600160405280858381518110610e3c57610e3c612701565b6020026020010151815260200160036000878581518110610e5f57610e5f612701565b6020026020010151815260200190815260200160002060009054906101000a90046001600160a01b03166001600160a01b0316815260200160046000878581518110610ead57610ead612701565b60200260200101518152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b82821015610fac5760008481526020908190206040805180820182526002860290920180546001600160a01b03168352600181018054835181870281018701909452808452939491938583019392830182828015610f9457602002820191906000526020600020906000905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610f4f5790505b50505050508152505081526020019060010190610ee3565b50505050815250828281518110610fc557610fc5612701565b6020908102919091010152600101610e16565b5092915050565b610fe76116ef565b610ff16000611733565b565b6009546001600160a01b0316331461101e57604051631791b1c760e31b815260040160405180910390fd5b6001600160a01b0382166000908152600a6020526040812061103f91611be1565b600b8160405161104f91906126e5565b90815260405190819003602001812080546001600160a01b03191690556110779082906126e5565b604051908190038120906001600160a01b038416907f7eeb1dc3158e569ef965e18f775c2982dbf05ded1aec3265ca24c36da659761090600090a35050565b6110be6116ef565b6001600160a01b0382166110fe576040517fb5c0938000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80611123576001600160a01b0382166000908152600160205260408120819055611142565b6001600160a01b03821660009081526001602081905260409091208190555b50816001600160a01b03167f4b5657e84cf8a17ac5587bbeb3cc2bab9826c4c67b8bad81b4849de49d37aac282604051611180911515815260200190565b60405180910390a25050565b611194611697565b8060005b818110156108425760008484838181106111b4576111b4612701565b90506020028101906111c691906128ae565b6111d49060208101906128c4565b6111dd9161290e565b905060008585848181106111f3576111f3612701565b905060200281019061120591906128ae565b611213906020810190612038565b905060005b825181101561131c57600083828151811061123557611235612701565b602002602001015190506000816040015190506006600082815260200190815260200160002054600103611295576040517f5aac58d900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526006602090815260408083206001908190556001600160a01b038881168552600584529184208054808301825590855293839020865160039095020180546001600160a01b0319169490921693909317815584820151805186949293611304938501920190611b01565b50604091909101516002909101555050600101611218565b508260010192505050611198565b611332611697565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b6060815167ffffffffffffffff81111561137057611370611c7a565b6040519080825280602002602001820160405280156113a357816020015b606081526020019060019003908161138e5790505b50905060005b8251811015610ab757600a60008483815181106113c8576113c8612701565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002080546113fb906125ab565b80601f0160208091040260200160405190810160405280929190818152602001828054611427906125ab565b80156114745780601f1061144957610100808354040283529160200191611474565b820191906000526020600020905b81548152906001019060200180831161145757829003601f168201915b505050505082828151811061148b5761148b612701565b60209081029190910101526001016113a9565b60606000825167ffffffffffffffff8111156114bc576114bc611c7a565b6040519080825280602002602001820160405280156114e5578160200160208202803683370190505b50905060005b8351811015610fd8576002600085838151811061150a5761150a612701565b602002602001015181526020019081526020016000205460011482828151811061153657611536612701565b911515602092830291909101909101526001016114eb565b60005b818110156115825761157a83838381811061156e5761156e612701565b90506020020135611783565b600101611551565b505050565b80516060908067ffffffffffffffff8111156115a5576115a5611c7a565b6040519080825280602002602001820160405280156115ce578160200160208202803683370190505b50915060005b818110156106d257600560008583815181106115f2576115f2612701565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000208054905083828151811061163057611630612701565b60209081029190910101526001016115d4565b61164b6116ef565b6001600160a01b03811661168b576040517f4ece6ecf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61169481611733565b50565b6000546001600160a01b031633148015906116b857506116b633610252565b155b15610ff1576040517f1eca167000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000546001600160a01b03163314610ff1576040517f38c5ab1e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000818152600360209081526040808320546004835281842080548351818602810186019094528084526001600160a01b039092169493909190849084015b8282101561188b5760008481526020908190206040805180820182526002860290920180546001600160a01b0316835260018101805483518187028101870190945280845293949193858301939283018282801561187357602002820191906000526020600020906000905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff168152602001906008019060208260070104928301926001038202915080841161182e5790505b505050505081525050815260200190600101906117c2565b5092935050506001600160a01b03831690506118d3576040517fa6f983da00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600083815260026020526040902054600103611902576040516332870f2f60e21b815260040160405180910390fd5b6000838152600260205260408120600190555b8151811015611a1b57600082828151811061193257611932612701565b6020908102919091018101518051600754928201516040517f78a91f510000000000000000000000000000000000000000000000000000000081529294506001600160a01b03918216936378a91f519361199493909116918a916004016129d0565b600060405180830381600087803b1580156119ae57600080fd5b505af11580156119c2573d6000803e3d6000fd5b50505050836001600160a01b0316857feb6cdedb6b18b8bf714d227e980630b893a0449658458329d2579dd1976cf59783600001518460200151604051611a0a929190612884565b60405180910390a350600101611915565b506007546008546040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b0391821660048201528482166024820152604481018690529116906323b872dd90606401600060405180830381600087803b158015611a8d57600080fd5b505af1158015611aa1573d6000803e3d6000fd5b50506040516001600160a01b03851692508591507f966f5f0ead09109b0f79e248567e7162e4bfe5ba3884928bf672ed88bc65a81a90600090a3505050565b50805460008255600202906000526020600020908101906116949190611c1b565b82805482825590600052602060002090600301600490048101928215611bac5791602002820160005b83821115611b7657835183826101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055509260200192600801602081600701049283019260010302611b2a565b8015611baa5782816101000a81549067ffffffffffffffff0219169055600801602081600701049283019260010302611b76565b505b50611bb8929150611c49565b5090565b5080546000825560030160049004906000526020600020908101906116949190611c49565b508054611bed906125ab565b6000825580601f10611bfd575050565b601f0160209004906000526020600020908101906116949190611c49565b80821115611bb85780546001600160a01b03191681556000611c406001830182611bbc565b50600201611c1b565b5b80821115611bb85760008155600101611c4a565b80356001600160a01b0381168114611c7557600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715611cb357611cb3611c7a565b60405290565b6040805190810167ffffffffffffffff81118282101715611cb357611cb3611c7a565b604051601f8201601f1916810167ffffffffffffffff81118282101715611d0557611d05611c7a565b604052919050565b600082601f830112611d1e57600080fd5b813567ffffffffffffffff811115611d3857611d38611c7a565b611d4b601f8201601f1916602001611cdc565b818152846020838601011115611d6057600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215611d9057600080fd5b611d9983611c5e565b9150602083013567ffffffffffffffff811115611db557600080fd5b611dc185828601611d0d565b9150509250929050565b600067ffffffffffffffff821115611de557611de5611c7a565b5060051b60200190565b60006020808385031215611e0257600080fd5b823567ffffffffffffffff811115611e1957600080fd5b8301601f81018513611e2a57600080fd5b8035611e3d611e3882611dcb565b611cdc565b81815260059190911b82018301908381019087831115611e5c57600080fd5b928401925b82841015611e8157611e7284611c5e565b82529284019290840190611e61565b979650505050505050565b600081518084526020808501945080840160005b83811015611ec657815167ffffffffffffffff1687529582019590820190600101611ea0565b509495945050505050565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b83811015611f8f57888303603f19018552815180518085529088019088850190600581901b86018a0160005b82811015611f7957601f19888303018452845160606001600160a01b0382511684528d820151818f860152611f5b82860182611e8c565b928e0151948e019490945250948c0194938c01939150600101611f24565b50978a0197955050509187019150600101611ef8565b509098975050505050505050565b600080600080600060808688031215611fb557600080fd5b611fbe86611c5e565b9450611fcc60208701611c5e565b935060408601359250606086013567ffffffffffffffff80821115611ff057600080fd5b818801915088601f83011261200457600080fd5b81358181111561201357600080fd5b89602082850101111561202557600080fd5b9699959850939650602001949392505050565b60006020828403121561204a57600080fd5b61205382611c5e565b9392505050565b60008083601f84011261206c57600080fd5b50813567ffffffffffffffff81111561208457600080fd5b6020830191508360208260051b850101111561209f57600080fd5b9250929050565b600080602083850312156120b957600080fd5b823567ffffffffffffffff8111156120d057600080fd5b6120dc8582860161205a565b90969095509350505050565b600082601f8301126120f957600080fd5b81356020612109611e3883611dcb565b82815260059290921b8401810191818101908684111561212857600080fd5b8286015b8481101561215a57803567ffffffffffffffff8116811461214d5760008081fd5b835291830191830161212c565b509695505050505050565b6000806000806080858703121561217b57600080fd5b61218485611c5e565b93506020850135925061219960408601611c5e565b9150606085013567ffffffffffffffff8111156121b557600080fd5b6121c1878288016120e8565b91505092959194509250565b600060208083850312156121e057600080fd5b823567ffffffffffffffff808211156121f857600080fd5b818501915085601f83011261220c57600080fd5b813561221a611e3882611dcb565b81815260059190911b8301840190848101908883111561223957600080fd5b8585015b83811015612271578035858111156122555760008081fd5b6122638b89838a0101611d0d565b84525091860191860161223d565b5098975050505050505050565b6020808252825182820181905260009190848201906040850190845b818110156122bf5783516001600160a01b03168352928401929184019160010161229a565b50909695505050505050565b600080604083850312156122de57600080fd5b6122e783611c5e565b946020939093013593505050565b6000602080838503121561230857600080fd5b823567ffffffffffffffff81111561231f57600080fd5b8301601f8101851361233057600080fd5b803561233e611e3882611dcb565b81815260059190911b8201830190838101908783111561235d57600080fd5b928401925b82841015611e8157833582529284019290840190612362565b60006020808301818452808551808352604092508286019150828160051b8701018488016000805b8481101561245057898403603f19018652825180518552888101516001600160a01b039081168a8701529088015160608987018190528151908701819052908a0191608080880192600581901b890190910191865b8281101561243957898403607f1901855285518051831685528e01518e85018e90526124268e860182611e8c565b968f0196958f01959450506001016123f8565b505050978a019795505050918701916001016123a3565b50919998505050505050505050565b6000806040838503121561247257600080fd5b61247b83611c5e565b91506020830135801515811461249057600080fd5b809150509250929050565b60005b838110156124b657818101518382015260200161249e565b50506000910152565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561252c57878503603f190184528151805180875261250d818989018a850161249b565b601f01601f1916959095018601945092850192908501906001016124e6565b5092979650505050505050565b6020808252825182820181905260009190848201906040850190845b818110156122bf578351151583529284019291840191600101612555565b6020808252825182820181905260009190848201906040850190845b818110156122bf5783518352928401929184019160010161258f565b600181811c908216806125bf57607f821691505b602082108103610ab757634e487b7160e01b600052602260045260246000fd5b601f82111561158257600081815260208120601f850160051c810160208610156126065750805b601f850160051c820191505b818110156109e257828155600101612612565b815167ffffffffffffffff81111561263f5761263f611c7a565b6126538161264d84546125ab565b846125df565b602080601f83116001811461268857600084156126705750858301515b600019600386901b1c1916600185901b1785556109e2565b600085815260208120601f198616915b828110156126b757888601518255948401946001909101908401612698565b50858210156126d55787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600082516126f781846020870161249b565b9190910192915050565b634e487b7160e01b600052603260045260246000fd5b60008235605e198336030181126126f757600080fd5b60006060823603121561273f57600080fd5b612747611c90565b823581526020612758818501611c5e565b8183015260408085013567ffffffffffffffff8082111561277857600080fd5b9086019036601f83011261278b57600080fd5b8135612799611e3882611dcb565b81815260059190911b830185019085810190368311156127b857600080fd5b8685015b83811015612833578035858111156127d45760008081fd5b860136819003601f19018813156127eb5760008081fd5b6127f3611cb9565b6127fe8a8301611c5e565b815288820135878111156128125760008081fd5b612820368c838601016120e8565b828c0152508452509187019187016127bc565b509487019490945250939695505050505050565b8181038181111561286857634e487b7160e01b600052601160045260246000fd5b92915050565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b03831681526040602082015260006128a66040830184611e8c565b949350505050565b60008235603e198336030181126126f757600080fd5b6000808335601e198436030181126128db57600080fd5b83018035915067ffffffffffffffff8211156128f657600080fd5b6020019150600581901b360382131561209f57600080fd5b600061291c611e3884611dcb565b80848252602080830192508560051b85013681111561293a57600080fd5b855b818110156129c457803567ffffffffffffffff8082111561295d5760008081fd5b8189019150606082360312156129735760008081fd5b61297b611c90565b61298483611c5e565b815285830135828111156129985760008081fd5b6129a4368286016120e8565b82880152506040928301359281019290925250855293820193820161293c565b50919695505050505050565b6001600160a01b03841681528260208201526060604082015260006129f86060830184611e8c565b9594505050505056fea2646970667358221220071ee246c962ec03595f09766819e8208001b135db3695da3907dbaa2703fd7364736f6c63430008150033000000000000000000000000011ff409bc4803ec5cfab41c3fd1db99fd05c004

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101985760003560e01c806379e8ca9e116100e3578063aad33f251161008c578063d5affd2c11610066578063d5affd2c146103f9578063f0172dd31461040c578063f2fde38b1461042c57600080fd5b8063aad33f25146103a8578063ca12e52c146103b9578063d294459c146103d957600080fd5b806389bd4ec1116100bd57806389bd4ec1146103615780638da5cb5b146103865780639c3950191461039757600080fd5b806379e8ca9e146103285780637d55033e1461033b57806389087dda1461034e57600080fd5b80633e00dcf6116101455780635ce86b471161011f5780635ce86b47146102ed578063715018a61461030d578063715d17441461031557600080fd5b80633e00dcf6146102a75780633ffd5dc8146102c757806349f5b8c0146102da57600080fd5b80631d0d35f5116101765780631d0d35f5146102445780631fa88b63146102815780632aa524a81461029457600080fd5b806308d4a17d1461019d5780630ce06def146101b2578063150b7a02146101db575b600080fd5b6101b06101ab366004611d7d565b61043f565b005b6101c56101c0366004611def565b610518565b6040516101d29190611ed1565b60405180910390f35b6102136101e9366004611f9d565b7f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101d2565b610271610252366004612038565b6001600160a01b03166000908152600160208190526040909120541490565b60405190151581526020016101d2565b6101b061028f3660046120a6565b6106d9565b6101b06102a2366004612165565b610848565b6102ba6102b53660046121cd565b6109ea565b6040516101d2919061227e565b6101b06102d5366004612038565b610abd565b6101b06102e83660046122cb565b610ae7565b6103006102fb3660046122f5565b610da5565b6040516101d2919061237b565b6101b0610fdf565b6101b0610323366004611d7d565b610ff3565b6101b061033636600461245f565b6110b6565b6101b06103493660046120a6565b61118c565b6101b061035c366004612038565b61132a565b6008546001600160a01b03165b6040516001600160a01b0390911681526020016101d2565b6000546001600160a01b031661036e565b6009546001600160a01b031661036e565b6007546001600160a01b031661036e565b6103cc6103c7366004611def565b611354565b6040516101d291906124bf565b6103ec6103e73660046122f5565b61149e565b6040516101d29190612539565b6101b06104073660046120a6565b61154e565b61041f61041a366004611def565b611587565b6040516101d29190612573565b6101b061043a366004612038565b611643565b6009546001600160a01b0316331461046a57604051631791b1c760e31b815260040160405180910390fd5b6001600160a01b0382166000908152600a6020526040902061048c8282612625565b5081600b8260405161049e91906126e5565b90815260405190819003602001812080546001600160a01b03939093166001600160a01b0319909316929092179091556104d99082906126e5565b604051908190038120906001600160a01b038416907f0cfb0c497178fee027ad109e0b9dfbd24e0b521e40cd6cb3b40222f43e5d52ac90600090a35050565b80516060908067ffffffffffffffff81111561053657610536611c7a565b60405190808252806020026020018201604052801561056957816020015b60608152602001906001900390816105545790505b50915060005b818110156106d2576005600085838151811061058d5761058d612701565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b828210156106a9576000848152602090819020604080516060810182526003860290920180546001600160a01b0316835260018101805483518187028101870190945280845293949193858301939283018282801561068757602002820191906000526020600020906000905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116106425790505b50505050508152602001600282015481525050815260200190600101906105d5565b505050508382815181106106bf576106bf612701565b602090810291909101015260010161056f565b5050919050565b6106e1611697565b8060005b8181101561084257600084848381811061070157610701612701565b90506020028101906107139190612717565b61071c9061272d565b805160008181526002602052604090205491925090600103610751576040516332870f2f60e21b815260040160405180910390fd5b602082810151600083815260038352604080822080546001600160a01b0319166001600160a01b039094169390931790925581850151600490935290812061079891611ae0565b805160005b8181101561083257600084815260046020526040902083518490839081106107c7576107c7612701565b602090810291909101810151825460018082018555600094855293839020825160029092020180546001600160a01b0319166001600160a01b03909216919091178155818301518051929491936108249392850192910190611b01565b50505080600101905061079d565b50846001019450505050506106e5565b50505050565b610850611697565b6000838152600660205260408120549003610897576040517f5a4622ee00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03841660009081526005602052604081205490805b828110156109c3576001600160a01b03871660009081526005602052604090208054879190839081106108e8576108e8612701565b906000526020600020906003020160020154036109bb57600191506040518060600160405280866001600160a01b031681526020018581526020018781525060056000896001600160a01b03166001600160a01b03168152602001908152602001600020828154811061095d5761095d612701565b600091825260209182902083516003929092020180546001600160a01b0319166001600160a01b0390921691909117815582820151805191926109a892600185019290910190611b01565b50604082015181600201559050506109c3565b6001016108b3565b50806109e2576040516332870f2f60e21b815260040160405180910390fd5b505050505050565b6060815167ffffffffffffffff811115610a0657610a06611c7a565b604051908082528060200260200182016040528015610a2f578160200160208202803683370190505b50905060005b8251811015610ab757600b838281518110610a5257610a52612701565b6020026020010151604051610a6791906126e5565b9081526040519081900360200190205482516001600160a01b0390911690839083908110610a9757610a97612701565b6001600160a01b0390921660209283029190910190910152600101610a35565b50919050565b610ac5611697565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03821660009081526005602052604081205490819003610b3a576040517f1a7b9b9500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b808211610b475781610b49565b805b915060005b828110156108425760006001610b648385612847565b610b6e9190612847565b6001600160a01b03861660009081526005602052604081208054929350909183908110610b9d57610b9d612701565b600091825260209182902060408051606081018252600390930290910180546001600160a01b03168352600181018054835181870281018701909452808452939491938583019392830182828015610c4857602002820191906000526020600020906000905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610c035790505b50505050508152602001600282015481525050905060056000876001600160a01b03166001600160a01b03168152602001908152602001600020805480610c9157610c9161286e565b60008281526020812060036000199093019283020180546001600160a01b031916815590610cc26001830182611bbc565b506000600291909101559055805160208201516040517f7dd540b20000000000000000000000000000000000000000000000000000000081526001600160a01b0390921691637dd540b291610d1c918a9190600401612884565b600060405180830381600087803b158015610d3657600080fd5b505af1158015610d4a573d6000803e3d6000fd5b50505050856001600160a01b031660007feb6cdedb6b18b8bf714d227e980630b893a0449658458329d2579dd1976cf59783600001518460200151604051610d93929190612884565b60405180910390a35050600101610b4e565b60606000825167ffffffffffffffff811115610dc357610dc3611c7a565b604051908082528060200260200182016040528015610e1057816020015b60408051606080820183526000808352602083015291810191909152815260200190600190039081610de15790505b50905060005b8351811015610fd8576040518060600160405280858381518110610e3c57610e3c612701565b6020026020010151815260200160036000878581518110610e5f57610e5f612701565b6020026020010151815260200190815260200160002060009054906101000a90046001600160a01b03166001600160a01b0316815260200160046000878581518110610ead57610ead612701565b60200260200101518152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b82821015610fac5760008481526020908190206040805180820182526002860290920180546001600160a01b03168352600181018054835181870281018701909452808452939491938583019392830182828015610f9457602002820191906000526020600020906000905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610f4f5790505b50505050508152505081526020019060010190610ee3565b50505050815250828281518110610fc557610fc5612701565b6020908102919091010152600101610e16565b5092915050565b610fe76116ef565b610ff16000611733565b565b6009546001600160a01b0316331461101e57604051631791b1c760e31b815260040160405180910390fd5b6001600160a01b0382166000908152600a6020526040812061103f91611be1565b600b8160405161104f91906126e5565b90815260405190819003602001812080546001600160a01b03191690556110779082906126e5565b604051908190038120906001600160a01b038416907f7eeb1dc3158e569ef965e18f775c2982dbf05ded1aec3265ca24c36da659761090600090a35050565b6110be6116ef565b6001600160a01b0382166110fe576040517fb5c0938000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80611123576001600160a01b0382166000908152600160205260408120819055611142565b6001600160a01b03821660009081526001602081905260409091208190555b50816001600160a01b03167f4b5657e84cf8a17ac5587bbeb3cc2bab9826c4c67b8bad81b4849de49d37aac282604051611180911515815260200190565b60405180910390a25050565b611194611697565b8060005b818110156108425760008484838181106111b4576111b4612701565b90506020028101906111c691906128ae565b6111d49060208101906128c4565b6111dd9161290e565b905060008585848181106111f3576111f3612701565b905060200281019061120591906128ae565b611213906020810190612038565b905060005b825181101561131c57600083828151811061123557611235612701565b602002602001015190506000816040015190506006600082815260200190815260200160002054600103611295576040517f5aac58d900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526006602090815260408083206001908190556001600160a01b038881168552600584529184208054808301825590855293839020865160039095020180546001600160a01b0319169490921693909317815584820151805186949293611304938501920190611b01565b50604091909101516002909101555050600101611218565b508260010192505050611198565b611332611697565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b6060815167ffffffffffffffff81111561137057611370611c7a565b6040519080825280602002602001820160405280156113a357816020015b606081526020019060019003908161138e5790505b50905060005b8251811015610ab757600a60008483815181106113c8576113c8612701565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002080546113fb906125ab565b80601f0160208091040260200160405190810160405280929190818152602001828054611427906125ab565b80156114745780601f1061144957610100808354040283529160200191611474565b820191906000526020600020905b81548152906001019060200180831161145757829003601f168201915b505050505082828151811061148b5761148b612701565b60209081029190910101526001016113a9565b60606000825167ffffffffffffffff8111156114bc576114bc611c7a565b6040519080825280602002602001820160405280156114e5578160200160208202803683370190505b50905060005b8351811015610fd8576002600085838151811061150a5761150a612701565b602002602001015181526020019081526020016000205460011482828151811061153657611536612701565b911515602092830291909101909101526001016114eb565b60005b818110156115825761157a83838381811061156e5761156e612701565b90506020020135611783565b600101611551565b505050565b80516060908067ffffffffffffffff8111156115a5576115a5611c7a565b6040519080825280602002602001820160405280156115ce578160200160208202803683370190505b50915060005b818110156106d257600560008583815181106115f2576115f2612701565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000208054905083828151811061163057611630612701565b60209081029190910101526001016115d4565b61164b6116ef565b6001600160a01b03811661168b576040517f4ece6ecf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61169481611733565b50565b6000546001600160a01b031633148015906116b857506116b633610252565b155b15610ff1576040517f1eca167000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000546001600160a01b03163314610ff1576040517f38c5ab1e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000818152600360209081526040808320546004835281842080548351818602810186019094528084526001600160a01b039092169493909190849084015b8282101561188b5760008481526020908190206040805180820182526002860290920180546001600160a01b0316835260018101805483518187028101870190945280845293949193858301939283018282801561187357602002820191906000526020600020906000905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff168152602001906008019060208260070104928301926001038202915080841161182e5790505b505050505081525050815260200190600101906117c2565b5092935050506001600160a01b03831690506118d3576040517fa6f983da00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600083815260026020526040902054600103611902576040516332870f2f60e21b815260040160405180910390fd5b6000838152600260205260408120600190555b8151811015611a1b57600082828151811061193257611932612701565b6020908102919091018101518051600754928201516040517f78a91f510000000000000000000000000000000000000000000000000000000081529294506001600160a01b03918216936378a91f519361199493909116918a916004016129d0565b600060405180830381600087803b1580156119ae57600080fd5b505af11580156119c2573d6000803e3d6000fd5b50505050836001600160a01b0316857feb6cdedb6b18b8bf714d227e980630b893a0449658458329d2579dd1976cf59783600001518460200151604051611a0a929190612884565b60405180910390a350600101611915565b506007546008546040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b0391821660048201528482166024820152604481018690529116906323b872dd90606401600060405180830381600087803b158015611a8d57600080fd5b505af1158015611aa1573d6000803e3d6000fd5b50506040516001600160a01b03851692508591507f966f5f0ead09109b0f79e248567e7162e4bfe5ba3884928bf672ed88bc65a81a90600090a3505050565b50805460008255600202906000526020600020908101906116949190611c1b565b82805482825590600052602060002090600301600490048101928215611bac5791602002820160005b83821115611b7657835183826101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055509260200192600801602081600701049283019260010302611b2a565b8015611baa5782816101000a81549067ffffffffffffffff0219169055600801602081600701049283019260010302611b76565b505b50611bb8929150611c49565b5090565b5080546000825560030160049004906000526020600020908101906116949190611c49565b508054611bed906125ab565b6000825580601f10611bfd575050565b601f0160209004906000526020600020908101906116949190611c49565b80821115611bb85780546001600160a01b03191681556000611c406001830182611bbc565b50600201611c1b565b5b80821115611bb85760008155600101611c4a565b80356001600160a01b0381168114611c7557600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715611cb357611cb3611c7a565b60405290565b6040805190810167ffffffffffffffff81118282101715611cb357611cb3611c7a565b604051601f8201601f1916810167ffffffffffffffff81118282101715611d0557611d05611c7a565b604052919050565b600082601f830112611d1e57600080fd5b813567ffffffffffffffff811115611d3857611d38611c7a565b611d4b601f8201601f1916602001611cdc565b818152846020838601011115611d6057600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215611d9057600080fd5b611d9983611c5e565b9150602083013567ffffffffffffffff811115611db557600080fd5b611dc185828601611d0d565b9150509250929050565b600067ffffffffffffffff821115611de557611de5611c7a565b5060051b60200190565b60006020808385031215611e0257600080fd5b823567ffffffffffffffff811115611e1957600080fd5b8301601f81018513611e2a57600080fd5b8035611e3d611e3882611dcb565b611cdc565b81815260059190911b82018301908381019087831115611e5c57600080fd5b928401925b82841015611e8157611e7284611c5e565b82529284019290840190611e61565b979650505050505050565b600081518084526020808501945080840160005b83811015611ec657815167ffffffffffffffff1687529582019590820190600101611ea0565b509495945050505050565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b83811015611f8f57888303603f19018552815180518085529088019088850190600581901b86018a0160005b82811015611f7957601f19888303018452845160606001600160a01b0382511684528d820151818f860152611f5b82860182611e8c565b928e0151948e019490945250948c0194938c01939150600101611f24565b50978a0197955050509187019150600101611ef8565b509098975050505050505050565b600080600080600060808688031215611fb557600080fd5b611fbe86611c5e565b9450611fcc60208701611c5e565b935060408601359250606086013567ffffffffffffffff80821115611ff057600080fd5b818801915088601f83011261200457600080fd5b81358181111561201357600080fd5b89602082850101111561202557600080fd5b9699959850939650602001949392505050565b60006020828403121561204a57600080fd5b61205382611c5e565b9392505050565b60008083601f84011261206c57600080fd5b50813567ffffffffffffffff81111561208457600080fd5b6020830191508360208260051b850101111561209f57600080fd5b9250929050565b600080602083850312156120b957600080fd5b823567ffffffffffffffff8111156120d057600080fd5b6120dc8582860161205a565b90969095509350505050565b600082601f8301126120f957600080fd5b81356020612109611e3883611dcb565b82815260059290921b8401810191818101908684111561212857600080fd5b8286015b8481101561215a57803567ffffffffffffffff8116811461214d5760008081fd5b835291830191830161212c565b509695505050505050565b6000806000806080858703121561217b57600080fd5b61218485611c5e565b93506020850135925061219960408601611c5e565b9150606085013567ffffffffffffffff8111156121b557600080fd5b6121c1878288016120e8565b91505092959194509250565b600060208083850312156121e057600080fd5b823567ffffffffffffffff808211156121f857600080fd5b818501915085601f83011261220c57600080fd5b813561221a611e3882611dcb565b81815260059190911b8301840190848101908883111561223957600080fd5b8585015b83811015612271578035858111156122555760008081fd5b6122638b89838a0101611d0d565b84525091860191860161223d565b5098975050505050505050565b6020808252825182820181905260009190848201906040850190845b818110156122bf5783516001600160a01b03168352928401929184019160010161229a565b50909695505050505050565b600080604083850312156122de57600080fd5b6122e783611c5e565b946020939093013593505050565b6000602080838503121561230857600080fd5b823567ffffffffffffffff81111561231f57600080fd5b8301601f8101851361233057600080fd5b803561233e611e3882611dcb565b81815260059190911b8201830190838101908783111561235d57600080fd5b928401925b82841015611e8157833582529284019290840190612362565b60006020808301818452808551808352604092508286019150828160051b8701018488016000805b8481101561245057898403603f19018652825180518552888101516001600160a01b039081168a8701529088015160608987018190528151908701819052908a0191608080880192600581901b890190910191865b8281101561243957898403607f1901855285518051831685528e01518e85018e90526124268e860182611e8c565b968f0196958f01959450506001016123f8565b505050978a019795505050918701916001016123a3565b50919998505050505050505050565b6000806040838503121561247257600080fd5b61247b83611c5e565b91506020830135801515811461249057600080fd5b809150509250929050565b60005b838110156124b657818101518382015260200161249e565b50506000910152565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561252c57878503603f190184528151805180875261250d818989018a850161249b565b601f01601f1916959095018601945092850192908501906001016124e6565b5092979650505050505050565b6020808252825182820181905260009190848201906040850190845b818110156122bf578351151583529284019291840191600101612555565b6020808252825182820181905260009190848201906040850190845b818110156122bf5783518352928401929184019160010161258f565b600181811c908216806125bf57607f821691505b602082108103610ab757634e487b7160e01b600052602260045260246000fd5b601f82111561158257600081815260208120601f850160051c810160208610156126065750805b601f850160051c820191505b818110156109e257828155600101612612565b815167ffffffffffffffff81111561263f5761263f611c7a565b6126538161264d84546125ab565b846125df565b602080601f83116001811461268857600084156126705750858301515b600019600386901b1c1916600185901b1785556109e2565b600085815260208120601f198616915b828110156126b757888601518255948401946001909101908401612698565b50858210156126d55787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600082516126f781846020870161249b565b9190910192915050565b634e487b7160e01b600052603260045260246000fd5b60008235605e198336030181126126f757600080fd5b60006060823603121561273f57600080fd5b612747611c90565b823581526020612758818501611c5e565b8183015260408085013567ffffffffffffffff8082111561277857600080fd5b9086019036601f83011261278b57600080fd5b8135612799611e3882611dcb565b81815260059190911b830185019085810190368311156127b857600080fd5b8685015b83811015612833578035858111156127d45760008081fd5b860136819003601f19018813156127eb5760008081fd5b6127f3611cb9565b6127fe8a8301611c5e565b815288820135878111156128125760008081fd5b612820368c838601016120e8565b828c0152508452509187019187016127bc565b509487019490945250939695505050505050565b8181038181111561286857634e487b7160e01b600052601160045260246000fd5b92915050565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b03831681526040602082015260006128a66040830184611e8c565b949350505050565b60008235603e198336030181126126f757600080fd5b6000808335601e198436030181126128db57600080fd5b83018035915067ffffffffffffffff8211156128f657600080fd5b6020019150600581901b360382131561209f57600080fd5b600061291c611e3884611dcb565b80848252602080830192508560051b85013681111561293a57600080fd5b855b818110156129c457803567ffffffffffffffff8082111561295d5760008081fd5b8189019150606082360312156129735760008081fd5b61297b611c90565b61298483611c5e565b815285830135828111156129985760008081fd5b6129a4368286016120e8565b82880152506040928301359281019290925250855293820193820161293c565b50919695505050505050565b6001600160a01b03841681528260208201526060604082015260006129f86060830184611e8c565b9594505050505056fea2646970667358221220071ee246c962ec03595f09766819e8208001b135db3695da3907dbaa2703fd7364736f6c63430008150033

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

000000000000000000000000011ff409bc4803ec5cfab41c3fd1db99fd05c004

-----Decoded View---------------
Arg [0] : kanaria (address): 0x011ff409BC4803eC5cFaB41c3Fd1db99fD05c004

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000011ff409bc4803ec5cfab41c3fd1db99fd05c004


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
[ 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.