POL Price: $0.669434 (-6.24%)
 

Overview

POL Balance

Polygon PoS Chain LogoPolygon PoS Chain LogoPolygon PoS Chain Logo0 POL

POL Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
EventImplementation

Compiler Version
v0.8.12+commit.f00d7308

Optimization Enabled:
Yes with 800 runs

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

import "./abstract/EventERC721Upgradeable.sol";
import "./abstract/AuthModifiers.sol";
import "./interfaces/IRegistry.sol";
import "./interfaces/IEventImplementation.sol";

contract EventImplementation is IEventImplementation, EventERC721Upgradeable, AuthModifiers {
    using StringsUpgradeable for uint256;

    IRegistry private registry;

    /// @custom:oz-upgrades-unsafe-allow constructor
    constructor() initializer {}

    // solhint-disable-next-line func-name-mixedcase
    function __EventImplementation_init(
        string calldata _name,
        string calldata _symbol,
        address _registry
    ) external initializer {
        __ERC721_init(_name, _symbol);
        __AuthModifiers_init(_registry);
        __EventImplementation_init_unchained(_registry);
    }

    // solhint-disable-next-line func-name-mixedcase
    function __EventImplementation_init_unchained(address _registry) internal initializer {
        registry = IRegistry(_registry);
    }

    EventData public eventData;
    EventFinancing public eventFinancing;

    function batchActions(
        TicketAction[] calldata ticketActions,
        uint8[] calldata actionCounts,
        BalanceUpdates[] calldata balanceUpdates
    ) external onlyRelayer {
        uint256 start = 0;

        for (uint256 actionType = 0; actionType < actionCounts.length; actionType++) {
            uint256 end = start + actionCounts[actionType];

            if (actionType == 0 && actionCounts[actionType] != 0) {
                require(!eventFinancing.primaryBlocked, "EventFinancing: Inventory Restricted");
                _primarySale(ticketActions[start:end], balanceUpdates);
                start = end;
                continue;
            }
            if (actionType == 1 && actionCounts[actionType] != 0) {
                _secondarySale(ticketActions[start:end]);
                start = end;
                continue;
            }
            if (actionType == 2 && actionCounts[actionType] != 0) {
                require(!eventFinancing.scanBlocked, "EventFinancing: Inventory Restricted");
                _scan(ticketActions[start:end]);
                start = end;
                continue;
            }
            if (actionType == 3 && actionCounts[actionType] != 0) {
                _checkIn(ticketActions[start:end]);
                start = end;
                continue;
            }
            if (actionType == 4 && actionCounts[actionType] != 0) {
                _invalidate(ticketActions[start:end]);
                start = end;
                continue;
            }
            if (actionType == 5 && actionCounts[actionType] != 0) {
                _claim(ticketActions[start:end]);
                start = end;
                continue;
            }
        }
    }

    function _getBoolean(uint8 _packedBools, uint8 _boolNumber) internal pure returns (bool) {
        uint8 flag = (_packedBools >> _boolNumber) & uint8(1);
        return (flag == 1 ? true : false);
    }

    function _setBoolean(
        uint8 _packedBools,
        uint8 _boolNumber,
        bool _value
    ) internal pure returns (uint8 _flags) {
        if (_value) return _packedBools | (uint8(1) << _boolNumber);
        else return _packedBools & ~(uint8(1) << _boolNumber);
    }

    function isScanned(uint256 _tokenId) public view returns (bool _status) {
        return _getBoolean(tokenData[_tokenId].booleanFlags, uint8(TicketFlags.SCANNED));
    }

    function isCheckedIn(uint256 _tokenId) public view returns (bool _status) {
        return _getBoolean(tokenData[_tokenId].booleanFlags, uint8(TicketFlags.CHECKED_IN));
    }

    function isInvalidated(uint256 _tokenId) public view returns (bool _status) {
        return _getBoolean(tokenData[_tokenId].booleanFlags, uint8(TicketFlags.INVALIDATED));
    }

    function isClaimed(uint256 _tokenId) public view returns (bool _status) {
        return _getBoolean(tokenData[_tokenId].booleanFlags, uint8(TicketFlags.CLAIMED));
    }

    function _setScannedFlag(uint256 _tokenId, bool _status) internal {
        tokenData[_tokenId].booleanFlags = _setBoolean(
            tokenData[_tokenId].booleanFlags,
            uint8(TicketFlags.SCANNED),
            _status
        );
    }

    function _setCheckedInFlag(uint256 _tokenId, bool _status) internal {
        tokenData[_tokenId].booleanFlags = _setBoolean(
            tokenData[_tokenId].booleanFlags,
            uint8(TicketFlags.CHECKED_IN),
            _status
        );
    }

    function _setInvalidatedFlag(uint256 _tokenId, bool _status) internal {
        tokenData[_tokenId].booleanFlags = _setBoolean(
            tokenData[_tokenId].booleanFlags,
            uint8(TicketFlags.INVALIDATED),
            _status
        );
    }

    function _setClaimedFlag(uint256 _tokenId, bool _status) internal {
        tokenData[_tokenId].booleanFlags = _setBoolean(
            tokenData[_tokenId].booleanFlags,
            uint8(TicketFlags.CLAIMED),
            _status
        );
    }

    /**
     * @dev Batch Functions
     */
    function _mintBatch(TicketAction[] calldata ticketActions, BalanceUpdates[] calldata balanceUpdates) internal {
        for (uint256 i = 0; i < balanceUpdates.length; i++) {
            _addressData[balanceUpdates[i].owner].balance += balanceUpdates[i].quantity;
        }

        for (uint256 i = 0; i < ticketActions.length; i++) {
            _mint(ticketActions[i]);
        }
    }

    function _transferFromBatch(TicketAction[] calldata ticketActions) internal {
        for (uint256 i = 0; i < ticketActions.length; i++) {
            _transfer(ownerOf(ticketActions[i].tokenId), ticketActions[i].to, ticketActions[i].tokenId);
        }
    }

    /**
     * @dev Ticket Lifecycle Methods
     */
    function _primarySale(TicketAction[] calldata ticketActions, BalanceUpdates[] calldata balanceUpdates) internal {
        _mintBatch(ticketActions, balanceUpdates);
        IEconomics econ = registry.economics();
        (uint256 _fuel, uint256 _fuelProtocol) = econ.reserveFuelPrimarySale(msg.sender, ticketActions);
        emit PrimarySale(ticketActions, _fuel, _fuelProtocol);
    }

    function _secondarySale(TicketAction[] calldata ticketActions) internal {
        for (uint256 i = 0; i < ticketActions.length; i++) {
            uint256 _tokenId = ticketActions[i].tokenId;
            require(!isInvalidated(_tokenId) && !isClaimed(_tokenId), "EventImplementation: Error on resale");
        }
        IEconomics econ = registry.economics();
        (uint256 _fuel, uint256 _fuelProtocol) = econ.reserveFuelSecondarySale(msg.sender, ticketActions);
        emit SecondarySale(ticketActions, _fuel, _fuelProtocol);
    }

    function _scan(TicketAction[] calldata ticketActions) internal {
        for (uint256 i = 0; i < ticketActions.length; i++) {
            uint256 _tokenId = ticketActions[i].tokenId;
            require(!isInvalidated(_tokenId), "EventImplementation: Error on ticket scan");
            _setScannedFlag(_tokenId, true);
        }
        IEconomics econ = registry.economics();
        (uint256 _fuel, uint256 _fuelProtocol) = econ.spendBasicAction(msg.sender, uint32(ticketActions.length));
        emit Scanned(ticketActions, _fuel, _fuelProtocol);
    }

    function _checkIn(TicketAction[] calldata ticketActions) internal {
        for (uint256 i = 0; i < ticketActions.length; i++) {
            uint256 _tokenId = ticketActions[i].tokenId;
            require(!isInvalidated(_tokenId) && !isCheckedIn(_tokenId), "EventImplementation: Error on check-in");
            _setCheckedInFlag(_tokenId, true);
        }
        IEconomics econ = registry.economics();
        (uint256 _fuel, uint256 _fuelProtocol) = econ.spendTicketReserved(msg.sender, uint32(ticketActions.length));
        emit CheckedIn(ticketActions, _fuel, _fuelProtocol);
    }

    function _invalidate(TicketAction[] calldata ticketActions) internal {
        for (uint256 i = 0; i < ticketActions.length; i++) {
            uint256 _tokenId = ticketActions[i].tokenId;
            require(!isInvalidated(_tokenId), "EventImplementation: Error on ticket invalidation");
            _setInvalidatedFlag(_tokenId, true);
        }
        IEconomics econ = registry.economics();
        (uint256 _fuel, uint256 _fuelProtocol) = econ.spendTicketReserved(msg.sender, uint32(ticketActions.length));
        emit Invalidated(ticketActions, _fuel, _fuelProtocol);
    }

    function _claim(TicketAction[] calldata ticketActions) internal {
        for (uint256 i = 0; i < ticketActions.length; i++) {
            uint256 _tokenId = ticketActions[i].tokenId;
            require(!isInvalidated(_tokenId) && !isClaimed(_tokenId), "EventImplementation: Error on NFT claim");
            _setClaimedFlag(_tokenId, true);
        }
        _transferFromBatch(ticketActions);
        emit Claimed(ticketActions, 0, 0);
    }

    /**
     * @dev Event Lifecycle Methods
     */
    function setEventData(EventData calldata _eventData) external onlyFactory {
        eventData = _eventData;
        emit EventDataSet(_eventData);
    }

    function updateEventData(EventData calldata _eventData) external onlyRelayer {
        eventData = _eventData;
        emit EventDataUpdated(_eventData);
    }

    function setFinancing(EventFinancing calldata _financing) external onlyFactory {
        eventFinancing = _financing;
        emit UpdateFinancing(_financing);
    }

    /**
     * @dev View functions
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        string memory baseURI = _baseURI();
        return
            bytes(baseURI).length > 0
                ? string(abi.encodePacked(baseURI, uint256(eventData.index).toString(), "/", tokenId.toString()))
                : "";
    }

    function _baseURI() internal view virtual override returns (string memory) {
        return registry.baseURI();
    }
}

File 2 of 24 : EventERC721Upgradeable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721MetadataUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

import "../interfaces/IEventImplementation.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
abstract contract EventERC721Upgradeable is
    Initializable,
    ContextUpgradeable,
    ERC165Upgradeable,
    IERC721Upgradeable,
    IERC721MetadataUpgradeable
{
    using AddressUpgradeable for address;
    using StringsUpgradeable for uint256;

    // Token name
    string internal _name;

    // Token symbol
    string internal _symbol;

    // Token-specific data struct
    mapping(uint256 => IEventImplementation.TokenData) public tokenData;

    // Address-specific data struct
    mapping(address => IEventImplementation.AddressData) internal _addressData;

    // Mapping from token ID to approved address
    mapping(uint256 => address) internal _tokenApprovals;

    // Mapping from owner to operator approvals
    mapping(address => mapping(address => bool)) internal _operatorApprovals;

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    // solhint-disable-next-line func-name-mixedcase
    function __ERC721_init(string memory name_, string memory symbol_) internal initializer {
        __Context_init_unchained();
        __ERC165_init_unchained();
        __ERC721_init_unchained(name_, symbol_);
    }

    // solhint-disable-next-line func-name-mixedcase
    function __ERC721_init_unchained(string memory name_, string memory symbol_) internal initializer {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(ERC165Upgradeable, IERC165Upgradeable)
        returns (bool)
    {
        return
            interfaceId == type(IERC721Upgradeable).interfaceId ||
            interfaceId == type(IERC721MetadataUpgradeable).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: balance query for the zero address");
        return _addressData[owner].balance;
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = tokenData[tokenId].owner;
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        return owner;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overriden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = EventERC721Upgradeable.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(operator != _msgSender(), "ERC721: approve to caller");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }

    /**
     * @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.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received},
     * - which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return tokenData[tokenId].owner != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = EventERC721Upgradeable.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received},
     * - which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(IEventImplementation.TicketAction memory ticketAction) internal virtual {
        _safeMint(ticketAction, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(IEventImplementation.TicketAction memory ticketAction, bytes memory _data) internal virtual {
        _mint(ticketAction);
        require(
            _checkOnERC721Received(address(0), ticketAction.to, ticketAction.tokenId, _data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(IEventImplementation.TicketAction memory ticketAction) internal virtual {
        require(ticketAction.to != address(0), "ERC721: mint to the zero address");
        require(!_exists(ticketAction.tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), ticketAction.to, ticketAction.tokenId);

        tokenData[ticketAction.tokenId] = IEventImplementation.TokenData(ticketAction.to, ticketAction.basePrice, 0);

        emit Transfer(address(0), ticketAction.to, ticketAction.tokenId);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = EventERC721Upgradeable.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _addressData[owner].balance -= 1;
        delete tokenData[tokenId];

        emit Transfer(owner, address(0), tokenId);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(EventERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        _addressData[from].balance -= 1;
        _addressData[to].balance += 1;
        tokenData[tokenId].owner = to;

        emit Transfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(EventERC721Upgradeable.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal returns (bool) {
        if (to.isContract()) {
            try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (
                bytes4 retval
            ) {
                return retval == IERC721ReceiverUpgradeable.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    //solhint-disable-next-line no-inline-assembly
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}

    uint256[44] internal __gap;
}

File 3 of 24 : AuthModifiers.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "../interfaces/IRegistry.sol";

abstract contract AuthModifiers is Initializable {
    IRegistry private registry;

    // solhint-disable-next-line func-name-mixedcase
    function __AuthModifiers_init_unchained(address _registry) internal initializer {
        registry = IRegistry(_registry);
    }

    // solhint-disable-next-line func-name-mixedcase
    function __AuthModifiers_init(address _registry) public initializer {
        __AuthModifiers_init_unchained(_registry);
    }

    /**
     * @dev Throws if called by any account other than a GET Protocol Relayer admin account.
     */
    modifier onlyIntegratorAdmin() {
        registry.auth().hasIntegratorAdminRole(msg.sender);
        _;
    }

    /**
     * @dev Throws if called by any account other than a GET Protocol Relayer account.
     */
    modifier onlyRelayer() {
        registry.auth().hasRelayerRole(msg.sender);
        _;
    }

    /**
     * @dev Throws if called by any contract other than a GET Protocol Factory contract.
     */
    modifier onlyFactory() {
        registry.auth().hasFactoryRole(msg.sender);
        _;
    }

    /**
     * @dev Throws if called by any contract different from an instance of a GET protocol Event Contract
     */
    modifier onlyEvent() {
        registry.auth().hasEventRole(msg.sender);
        _;
    }

    /**
     * @dev Throws if called by any contract other than the GET Protocol FuelDistributor Contract.
     */
    modifier onlyFuelDistributor() {
        registry.auth().hasFuelDistributorRole(msg.sender);
        _;
    }

    /**
     * @dev Throws if called by any contract other than the GET Protocol TopUp Contract.
     */
    modifier onlyTopUp() {
        registry.auth().hasTopUpRole(msg.sender);
        _;
    }

    /**
     * @dev Throws if called by any account other than the GET Protocol EOA(S) designated for TopUps.
     */
    modifier onlyCustodialTopUp() {
        registry.auth().hasCustodialTopUpRole(msg.sender);
        _;
    }

    /**
     * @dev Throws if called by any contract other than the PriceOracle update EOA.
     */
    modifier onlyPriceOracle() {
        registry.auth().hasPriceOracleRole(msg.sender);
        _;
    }
}

File 4 of 24 : IRegistry.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "./IAuth.sol";
import "./IEconomics.sol";
import "./IEventFactory.sol";
import "./IPriceOracle.sol";
import "./ITopUp.sol";

interface IRegistry {
    event UpdateAuth(address old, address updated);
    event UpdateEconomics(address old, address updated);
    event UpdateEventFactory(address old, address updated);
    event UpdatePriceOracle(address old, address updated);
    event UpdateFuelDistributor(address old, address updated);
    event UpdateTopUp(address old, address updated);
    event UpdateBaseURI(string old, string updated);

    function auth() external view returns (IAuth);

    function economics() external view returns (IEconomics);

    function eventFactory() external view returns (IEventFactory);

    function priceOracle() external view returns (IPriceOracle);

    function topUp() external view returns (ITopUp);

    function baseURI() external view returns (string memory);

    function setAuth(address _auth) external;

    function setEconomics(address _economics) external;

    function setEventFactory(address _eventFactory) external;

    function setPriceOracle(address _priceOracle) external;

    function setFuelDistributor(address _fuelDistributor) external;

    function setTopUp(address _topUp) external;

    function setBaseURI(string memory _baseURI) external;
}

File 5 of 24 : IEventImplementation.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

interface IEventImplementation {
    enum TicketFlags {
        SCANNED, // 0
        CHECKED_IN, // 1
        INVALIDATED, // 2
        CLAIMED // 3
    }

    struct BalanceUpdates {
        address owner;
        uint64 quantity;
    }

    struct TokenData {
        address owner;
        uint40 basePrice;
        uint8 booleanFlags;
    }

    struct AddressData {
        // uint64 more than enough
        uint64 balance;
    }

    struct EventData {
        uint32 index;
        uint64 startTime;
        uint64 endTime;
        int32 latitude;
        int32 longitude;
        string currency;
        string name;
        string shopUrl;
        string imageUrl;
    }

    struct TicketAction {
        uint256 tokenId;
        bytes32 externalId; // sha256 hashed, emitted in event only.
        address to;
        uint64 orderTime;
        uint40 basePrice;
    }

    struct EventFinancing {
        uint64 palletIndex;
        address bondCouncil;
        bool inventoryRegistered;
        bool financingActive;
        bool primaryBlocked;
        bool secondaryBlocked;
        bool scanBlocked;
        bool claimBlocked;
    }

    event PrimarySale(TicketAction[] ticketActions, uint256 getUsed, uint256 getUsedProtocol);

    event SecondarySale(TicketAction[] ticketActions, uint256 getUsed, uint256 getUsedProtocol);

    event Scanned(TicketAction[] ticketActions, uint256 getUsed, uint256 getUsedProtocol);

    event CheckedIn(TicketAction[] ticketActions, uint256 getUsed, uint256 getUsedProtocol);

    event Invalidated(TicketAction[] ticketActions, uint256 getUsed, uint256 getUsedProtocol);

    event Claimed(TicketAction[] ticketActions, uint256 getUsed, uint256 getUsedProtocol);

    event EventDataSet(EventData eventData);

    event EventDataUpdated(EventData eventData);

    event UpdateFinancing(EventFinancing financing);

    function batchActions(
        TicketAction[] calldata ticketActions,
        uint8[] memory actionCounts,
        BalanceUpdates[] calldata balanceUpdates
    ) external;

    function setEventData(EventData memory _eventData) external;

    function updateEventData(EventData memory _eventData) external;

    function setFinancing(EventFinancing memory _financing) external;
}

File 6 of 24 : IERC721Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721Upgradeable is IERC165Upgradeable {
    /**
     * @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`, 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 be 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: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * 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 Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

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

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

File 7 of 24 : IERC721ReceiverUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 IERC721ReceiverUpgradeable {
    /**
     * @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 `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 8 of 24 : IERC721MetadataUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721Upgradeable.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721MetadataUpgradeable is IERC721Upgradeable {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

File 9 of 24 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 10 of 24 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/**
 * @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 ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

File 11 of 24 : StringsUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library StringsUpgradeable {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

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

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 12 of 24 : ERC165Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {
    function __ERC165_init() internal onlyInitializing {
    }

    function __ERC165_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165Upgradeable).interfaceId;
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

File 13 of 24 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.0;

import "../../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the
 * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() initializer {}
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        // If the contract is initializing we ignore whether _initialized is set in order to support multiple
        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the
        // contract may have been reentered.
        require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} modifier, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    function _isConstructor() private view returns (bool) {
        return !AddressUpgradeable.isContract(address(this));
    }
}

File 14 of 24 : IERC165Upgradeable.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 IERC165Upgradeable {
    /**
     * @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 15 of 24 : IAuth.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol";

interface IAuth is IAccessControlUpgradeable {
    function hasIntegratorAdminRole(address) external view;

    function hasFactoryRole(address) external view;

    function hasEventRole(address) external view;

    function hasFuelDistributorRole(address) external view;

    function hasRelayerRole(address) external view;

    function hasTopUpRole(address) external view;

    function hasCustodialTopUpRole(address) external view;

    function hasPriceOracleRole(address) external view;

    function grantEventRole(address) external;
}

File 16 of 24 : IEconomics.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "./IEventImplementation.sol";

interface IEconomics {
    // Data structure containing all the different rates for a particular relayer.
    //   100% (1) 1_000_000,
    //   10% (0.1) = 100_000,
    //   1% (0.01) = 10_000,
    //   0.1% (0.001) = 1_000,
    //   0.01% (0.0001) = 100,
    //   0.001% (0,00001) = 10,
    //   0.0001% = (0.000001) = 1
    // All scaled by 1_000_000.
    //
    // USD values (e.g. minFee, maxFee) are scaled by 1_000 (tenth of a cent).
    struct DynamicRates {
        uint24 minFeePrimary;
        uint24 maxFeePrimary;
        uint24 primaryRate;
        uint24 minFeeSecondary;
        uint24 maxFeeSecondary;
        uint24 secondaryRate;
        uint24 salesTaxRate;
    }

    // Largely unnecesary to define separately but helps avoid stack too deep errors within reserved fuel calculations.
    struct Rate {
        uint24 minFee;
        uint24 maxFee;
        uint24 rate;
    }

    struct IntegratorData {
        uint32 index;
        uint32 activeTicketCount;
        bool isBillingEnabled;
        bool isConfigured;
        uint256 price;
        uint256 availableFuel;
        uint256 reservedFuel;
        uint256 reservedFuelProtocol;
        string name;
    }

    struct RelayerData {
        uint32 integratorIndex;
    }

    struct SpentFuel {
        uint256 total;
        uint256 protocol;
        uint32 ticketCount;
    }

    event IntegratorToppedUp(
        uint32 indexed integratorIndex,
        uint256 indexed total,
        uint256 price,
        uint256 indexed newAveragePrice,
        uint256 salesTax
    );
    event FuelReservedPrimary(uint32 integratorIndex, uint32 ticketCount, uint256 fuel, uint256 fuelProtocol);
    event FuelReservedSecondary(uint32 integratorIndex, uint32 ticketCount, uint256 fuel, uint256 fuelProtocol);
    event BasicTaxCharged(uint32 integratorIndex, uint32 actionCount, uint256 fuel, uint256 fuelProtocol);
    event TicketFuelEmptied(uint32 integratorIndex, uint32 ticketCount, uint256 fuel, uint256 fuelProtocol);
    event SpentFuelCollected(SpentFuel spentFuel);
    event SalesTaxFuelCollected(address salesTaxFuelDesintation, uint256 salesTaxFuel);
    event AccountBalanceCorrected(
        uint32 integratorIndex,
        uint256 oldAvailableFuel,
        uint256 newAvailableFuel,
        uint256 oldReservedBalance,
        uint256 newReservedBalance,
        uint256 oldReservedBalanceProtocol,
        uint256 newReservedBalanceProtocol
    );
    event UpdateBasicTaxRate(uint24 old, uint24 updated);
    event UpdateFuelToken(address old, address updated);
    event UpdateSpentFuel(SpentFuel spentFuel);
    event UpdateDynamicRates(uint32 integratorIndex, DynamicRates dynamicRates);
    event UpdateProtocolRates(DynamicRates protocolRates);
    event UpdateSalesTaxFuelDestination(address salesTaxFuelDestination);
    event IntegratorConfigured(uint32 integratorIndex, string name, address relayerAddress, DynamicRates dynamicRates);
    event IntegratorActivated(uint32 integratorIndex);
    event IntegratorDisabled(uint32 integratorIndex);
    event RelayerAdded(address relayerAddress, uint32 integratorIndex);
    event RelayerRemoved(address relayerAddress, uint32 integratorIndex);
    event BillingStatusUpdated(uint32 integeratorIndex, bool status);
    event ConfigurationStatusUpdated(uint32 integratorIndex, bool status);
    event EnableIntegratorBilling(uint32 integratorIndex);
    event DisableIntegratorBilling(uint32 integratorIndex);
    event UpdateIntegratorTicketCount(uint32 integratorIndex, uint256 activeTicketCount);
    event UpdateIntegratorPrice(uint32 integratorIndex, uint256 price);
    event UpdateIntegratorName(uint32 integratorIndex, string name);

    function fuelToken() external returns (IERC20);

    function basicTaxRate() external returns (uint24);

    function spentFuel()
        external
        returns (
            uint256,
            uint256,
            uint32
        );

    function integratorCount() external returns (uint32);

    function topUpIntegrator(
        uint32 _integratorIndex,
        address _sender,
        uint256 _amount,
        uint256 _price
    ) external returns (uint256);

    function reserveFuelPrimarySale(address _relayerAddress, IEventImplementation.TicketAction[] memory _ticketActions)
        external
        returns (uint256, uint256);

    function reserveFuelSecondarySale(
        address _relayerAddress,
        IEventImplementation.TicketAction[] memory _ticketActions
    ) external returns (uint256, uint256);

    function spendBasicAction(address _relayerAddress, uint32 _actionCount) external returns (uint256, uint256);

    function spendTicketReserved(address _relayerAddress, uint32 _ticketCount) external returns (uint256, uint256);

    function collectSpentFuel() external returns (uint256, uint256);

    function collectSalesTaxFuel() external;

    function correctAccountBalance(
        uint32 _integratorIndex,
        uint256 _newAvailableFuel,
        uint256 _newReservedFuel
    ) external;

    function setupIntegrator(
        string calldata _name,
        address _relayerAddress,
        DynamicRates calldata _dynamicRates
    ) external;

    function activateIntegrator(uint32 _integratorIndex) external;

    function disableIntegrator(uint32 _integratorIndex) external;

    function addRelayer(address _relayerAddress, uint32 _integratorIndex) external;

    function removeRelayer(address _relayerAddress) external;

    function setDynamicRates(uint32 _integratorIndex, DynamicRates memory dynamicRates) external;

    function setProtocolRates(DynamicRates memory dynamicRates) external;

    function setSalesTaxFuelDestination(address _salesTaxFuelDestination) external;

    function enableIntegratorBilling(uint32 _integratorIndex) external;

    function disableIntegratorBilling(uint32 _integratorIndex) external;

    function setBasicTaxRate(uint24 _basicTaxRate) external;

    function setFuelToken(address _fuelToken) external;

    function setSpentFuel(SpentFuel calldata _spentFuel) external;

    function emergencyWithdraw(
        address _asset,
        address _to,
        uint256 _amount
    ) external;

    function setBillingStatus(uint32 _integratorIndex, bool status) external;

    function setConfigurationStatus(uint32 _integratorIndex, bool status) external;

    function setIntegratorTicketCount(uint32 _integratorIndex, uint32 _activeTicketCount) external;

    function setIntegratorPrice(uint32 _integratorIndex, uint256 _price) external;

    function setIntegratorName(uint32 _integratorIndex, string calldata _name) external;

    function viewIntegratorUSDBalance(uint32 _integratorIndex) external view returns (uint256);
}

File 17 of 24 : IEventFactory.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

interface IEventFactory {
    event EventCreated(uint256 indexed eventIndex, address indexed eventImplementationProxy);
}

File 18 of 24 : IPriceOracle.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

interface IPriceOracle {
    event UpdatePrice(uint256 old, uint256 updated);

    function price() external view returns (uint256);

    function lastUpdateTimestamp() external view returns (uint32);

    function setPrice(uint256 _price) external;
}

File 19 of 24 : ITopUp.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";

interface ITopUp {
    event ToppedUpCustodial(
        uint32 indexed integratorIndex,
        address indexed debitedAccount,
        uint256 availableFuel,
        uint256 amountFuel,
        uint256 price,
        bytes32 externalId
    );
    event ToppedUpNonCustodial(
        uint32 indexed integratorIndex,
        address indexed debitedAccount,
        uint256 availableFuel,
        uint256 amountFuel,
        uint256 price
    );
    event UpdateBaseToken(address old, address updated);
    event UpdateWeth(address old, address updated);
    event UpdateRouter(address old, address updated);
    event UpdateOracle(address old, address updated);

    function baseToken() external returns (IERC20Metadata);

    function weth() external returns (IERC20);

    function router() external returns (IUniswapV2Router02);

    function topUpCustodial(
        uint32 _integratorIndex,
        uint256 _amountIn,
        uint256 _amountOutMin,
        bytes32 _externalId
    ) external;

    function topUpNonCustodial(uint32 _integratorIndex, uint256 _amountFuel) external;

    function pause() external;

    function unpause() external;

    function setBaseToken(address _baseToken) external;

    function setWeth(address _weth) external;

    function setRouter(address _router) external;

    function setApprovals() external;
}

File 20 of 24 : IAccessControlUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControlUpgradeable {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 21 of 24 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 22 of 24 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 23 of 24 : IUniswapV2Router02.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.4;

import './IUniswapV2Router01.sol';

interface IUniswapV2Router02 is IUniswapV2Router01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountETH);
    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
}

File 24 of 24 : IUniswapV2Router01.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.4;

interface IUniswapV2Router01 {
    function factory() external view returns (address);
    function WETH() external view returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountETH);
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountETH);
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);
    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);

    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"externalId","type":"bytes32"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint64","name":"orderTime","type":"uint64"},{"internalType":"uint40","name":"basePrice","type":"uint40"}],"indexed":false,"internalType":"struct IEventImplementation.TicketAction[]","name":"ticketActions","type":"tuple[]"},{"indexed":false,"internalType":"uint256","name":"getUsed","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"getUsedProtocol","type":"uint256"}],"name":"CheckedIn","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"externalId","type":"bytes32"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint64","name":"orderTime","type":"uint64"},{"internalType":"uint40","name":"basePrice","type":"uint40"}],"indexed":false,"internalType":"struct IEventImplementation.TicketAction[]","name":"ticketActions","type":"tuple[]"},{"indexed":false,"internalType":"uint256","name":"getUsed","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"getUsedProtocol","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint32","name":"index","type":"uint32"},{"internalType":"uint64","name":"startTime","type":"uint64"},{"internalType":"uint64","name":"endTime","type":"uint64"},{"internalType":"int32","name":"latitude","type":"int32"},{"internalType":"int32","name":"longitude","type":"int32"},{"internalType":"string","name":"currency","type":"string"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"shopUrl","type":"string"},{"internalType":"string","name":"imageUrl","type":"string"}],"indexed":false,"internalType":"struct IEventImplementation.EventData","name":"eventData","type":"tuple"}],"name":"EventDataSet","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint32","name":"index","type":"uint32"},{"internalType":"uint64","name":"startTime","type":"uint64"},{"internalType":"uint64","name":"endTime","type":"uint64"},{"internalType":"int32","name":"latitude","type":"int32"},{"internalType":"int32","name":"longitude","type":"int32"},{"internalType":"string","name":"currency","type":"string"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"shopUrl","type":"string"},{"internalType":"string","name":"imageUrl","type":"string"}],"indexed":false,"internalType":"struct IEventImplementation.EventData","name":"eventData","type":"tuple"}],"name":"EventDataUpdated","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"externalId","type":"bytes32"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint64","name":"orderTime","type":"uint64"},{"internalType":"uint40","name":"basePrice","type":"uint40"}],"indexed":false,"internalType":"struct IEventImplementation.TicketAction[]","name":"ticketActions","type":"tuple[]"},{"indexed":false,"internalType":"uint256","name":"getUsed","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"getUsedProtocol","type":"uint256"}],"name":"Invalidated","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"externalId","type":"bytes32"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint64","name":"orderTime","type":"uint64"},{"internalType":"uint40","name":"basePrice","type":"uint40"}],"indexed":false,"internalType":"struct IEventImplementation.TicketAction[]","name":"ticketActions","type":"tuple[]"},{"indexed":false,"internalType":"uint256","name":"getUsed","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"getUsedProtocol","type":"uint256"}],"name":"PrimarySale","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"externalId","type":"bytes32"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint64","name":"orderTime","type":"uint64"},{"internalType":"uint40","name":"basePrice","type":"uint40"}],"indexed":false,"internalType":"struct IEventImplementation.TicketAction[]","name":"ticketActions","type":"tuple[]"},{"indexed":false,"internalType":"uint256","name":"getUsed","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"getUsedProtocol","type":"uint256"}],"name":"Scanned","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"externalId","type":"bytes32"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint64","name":"orderTime","type":"uint64"},{"internalType":"uint40","name":"basePrice","type":"uint40"}],"indexed":false,"internalType":"struct IEventImplementation.TicketAction[]","name":"ticketActions","type":"tuple[]"},{"indexed":false,"internalType":"uint256","name":"getUsed","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"getUsedProtocol","type":"uint256"}],"name":"SecondarySale","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint64","name":"palletIndex","type":"uint64"},{"internalType":"address","name":"bondCouncil","type":"address"},{"internalType":"bool","name":"inventoryRegistered","type":"bool"},{"internalType":"bool","name":"financingActive","type":"bool"},{"internalType":"bool","name":"primaryBlocked","type":"bool"},{"internalType":"bool","name":"secondaryBlocked","type":"bool"},{"internalType":"bool","name":"scanBlocked","type":"bool"},{"internalType":"bool","name":"claimBlocked","type":"bool"}],"indexed":false,"internalType":"struct IEventImplementation.EventFinancing","name":"financing","type":"tuple"}],"name":"UpdateFinancing","type":"event"},{"inputs":[{"internalType":"address","name":"_registry","type":"address"}],"name":"__AuthModifiers_init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"address","name":"_registry","type":"address"}],"name":"__EventImplementation_init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"externalId","type":"bytes32"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint64","name":"orderTime","type":"uint64"},{"internalType":"uint40","name":"basePrice","type":"uint40"}],"internalType":"struct IEventImplementation.TicketAction[]","name":"ticketActions","type":"tuple[]"},{"internalType":"uint8[]","name":"actionCounts","type":"uint8[]"},{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint64","name":"quantity","type":"uint64"}],"internalType":"struct IEventImplementation.BalanceUpdates[]","name":"balanceUpdates","type":"tuple[]"}],"name":"batchActions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"eventData","outputs":[{"internalType":"uint32","name":"index","type":"uint32"},{"internalType":"uint64","name":"startTime","type":"uint64"},{"internalType":"uint64","name":"endTime","type":"uint64"},{"internalType":"int32","name":"latitude","type":"int32"},{"internalType":"int32","name":"longitude","type":"int32"},{"internalType":"string","name":"currency","type":"string"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"shopUrl","type":"string"},{"internalType":"string","name":"imageUrl","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eventFinancing","outputs":[{"internalType":"uint64","name":"palletIndex","type":"uint64"},{"internalType":"address","name":"bondCouncil","type":"address"},{"internalType":"bool","name":"inventoryRegistered","type":"bool"},{"internalType":"bool","name":"financingActive","type":"bool"},{"internalType":"bool","name":"primaryBlocked","type":"bool"},{"internalType":"bool","name":"secondaryBlocked","type":"bool"},{"internalType":"bool","name":"scanBlocked","type":"bool"},{"internalType":"bool","name":"claimBlocked","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"isCheckedIn","outputs":[{"internalType":"bool","name":"_status","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"isClaimed","outputs":[{"internalType":"bool","name":"_status","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"isInvalidated","outputs":[{"internalType":"bool","name":"_status","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"isScanned","outputs":[{"internalType":"bool","name":"_status","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"index","type":"uint32"},{"internalType":"uint64","name":"startTime","type":"uint64"},{"internalType":"uint64","name":"endTime","type":"uint64"},{"internalType":"int32","name":"latitude","type":"int32"},{"internalType":"int32","name":"longitude","type":"int32"},{"internalType":"string","name":"currency","type":"string"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"shopUrl","type":"string"},{"internalType":"string","name":"imageUrl","type":"string"}],"internalType":"struct IEventImplementation.EventData","name":"_eventData","type":"tuple"}],"name":"setEventData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint64","name":"palletIndex","type":"uint64"},{"internalType":"address","name":"bondCouncil","type":"address"},{"internalType":"bool","name":"inventoryRegistered","type":"bool"},{"internalType":"bool","name":"financingActive","type":"bool"},{"internalType":"bool","name":"primaryBlocked","type":"bool"},{"internalType":"bool","name":"secondaryBlocked","type":"bool"},{"internalType":"bool","name":"scanBlocked","type":"bool"},{"internalType":"bool","name":"claimBlocked","type":"bool"}],"internalType":"struct IEventImplementation.EventFinancing","name":"_financing","type":"tuple"}],"name":"setFinancing","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenData","outputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint40","name":"basePrice","type":"uint40"},{"internalType":"uint8","name":"booleanFlags","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"index","type":"uint32"},{"internalType":"uint64","name":"startTime","type":"uint64"},{"internalType":"uint64","name":"endTime","type":"uint64"},{"internalType":"int32","name":"latitude","type":"int32"},{"internalType":"int32","name":"longitude","type":"int32"},{"internalType":"string","name":"currency","type":"string"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"shopUrl","type":"string"},{"internalType":"string","name":"imageUrl","type":"string"}],"internalType":"struct IEventImplementation.EventData","name":"_eventData","type":"tuple"}],"name":"updateEventData","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50600054610100900460ff166200002f5760005460ff161562000039565b62000039620000de565b620000a15760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b600054610100900460ff16158015620000c4576000805461ffff19166101011790555b8015620000d7576000805461ff00191690555b506200010b565b6000620000f630620000fc60201b6200182a1760201c565b15905090565b6001600160a01b03163b151590565b614472806200011b6000396000f3fe608060405234801561001057600080fd5b50600436106101ae5760003560e01c80636352211e116100ee578063a22cb46511610097578063b4b5b48f11610071578063b4b5b48f1461043f578063b88d4fde146104b1578063c87b56dd146104c4578063e985e9c5146104d757600080fd5b8063a22cb4651461035a578063a85bfd8a1461036d578063abdd97441461042c57600080fd5b806395d89b41116100c857806395d89b411461032c5780639bccd1cd146103345780639e34070f1461034757600080fd5b80636352211e146102e557806370a08231146102f857806381ddd5081461031957600080fd5b8063254641e41161015b57806342842e0e1161013557806342842e0e146102995780634977d03b146102ac5780635ddda513146102bf5780635df67794146102d257600080fd5b8063254641e414610256578063298ae216146102735780632d103c951461028657600080fd5b8063095ea7b31161018c578063095ea7b31461021b57806323b872dd14610230578063248fd9a71461024357600080fd5b806301ffc9a7146101b357806306fdde03146101db578063081812fc146101f0575b600080fd5b6101c66101c13660046131f5565b610513565b60405190151581526020015b60405180910390f35b6101e3610565565b6040516101d2919061326a565b6102036101fe36600461327d565b6105f7565b6040516001600160a01b0390911681526020016101d2565b61022e6102293660046132ab565b610691565b005b61022e61023e3660046132d7565b6107a7565b61022e6102513660046133a9565b61082e565b61025e610c12565b6040516101d299989796959493929190613471565b6101c661028136600461327d565b610eae565b61022e61029436600461350a565b610ed1565b61022e6102a73660046132d7565b610f94565b61022e6102ba366004613527565b610faf565b61022e6102cd3660046135a5565b6110cb565b6101c66102e036600461327d565b61120e565b6102036102f336600461327d565b611232565b61030b61030636600461350a565b6112bd565b6040519081526020016101d2565b61022e610327366004613629565b611361565b6101e3611472565b61022e610342366004613527565b611481565b6101c661035536600461327d565b611592565b61022e610368366004613660565b6115b6565b609e54609f546103d29167ffffffffffffffff8116916001600160a01b03680100000000000000008304169160ff600160e01b8204811692600160e81b8304821692600160f01b8104831692600160f81b909104811691808216916101009091041688565b6040805167ffffffffffffffff90991689526001600160a01b03909716602089015294151595870195909552911515606086015215156080850152151560a084015290151560c0830152151560e0820152610100016101d2565b6101c661043a36600461327d565b61167b565b61048361044d36600461327d565b6067602052600090815260409020546001600160a01b03811690600160a01b810464ffffffffff1690600160c81b900460ff1683565b604080516001600160a01b03909416845264ffffffffff909216602084015260ff16908201526060016101d2565b61022e6104bf366004613708565b61169f565b6101e36104d236600461327d565b61172d565b6101c66104e53660046137b7565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b60006001600160e01b031982166380ac58cd60e01b148061054457506001600160e01b03198216635b5e139f60e01b145b8061055f57506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060658054610574906137e5565b80601f01602080910402602001604051908101604052809291908181526020018280546105a0906137e5565b80156105ed5780601f106105c2576101008083540402835291602001916105ed565b820191906000526020600020905b8154815290600101906020018083116105d057829003601f168201915b5050505050905090565b6000818152606760205260408120546001600160a01b03166106755760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152606960205260409020546001600160a01b031690565b600061069c82611232565b9050806001600160a01b0316836001600160a01b0316141561070a5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161066c565b336001600160a01b0382161480610726575061072681336104e5565b6107985760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161066c565b6107a28383611839565b505050565b6107b133826118a7565b6108235760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f766564000000000000000000000000000000606482015260840161066c565b6107a283838361199e565b609760009054906101000a90046001600160a01b03166001600160a01b031663de9375f26040518163ffffffff1660e01b8152600401602060405180830381865afa158015610881573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a5919061381a565b60405163cab6d5af60e01b81523360048201526001600160a01b03919091169063cab6d5af9060240160006040518083038186803b1580156108e657600080fd5b505afa1580156108fa573d6000803e3d6000fd5b505050506000805b84811015610c0857600086868381811061091e5761091e613837565b9050602002016020810190610933919061384d565b6109409060ff1684613886565b905081158015610978575086868381811061095d5761095d613837565b9050602002016020810190610972919061384d565b60ff1615155b15610a0057609e54600160f01b900460ff16156109e35760405162461bcd60e51b8152602060048201526024808201527f4576656e7446696e616e63696e673a20496e76656e746f72792052657374726960448201526318dd195960e21b606482015260840161066c565b6109f96109f282858b8d61389e565b8787611b9b565b9150610bf6565b816001148015610a385750868683818110610a1d57610a1d613837565b9050602002016020810190610a32919061384d565b60ff1615155b15610a51576109f9610a4c82858b8d61389e565b611cd6565b816002148015610a895750868683818110610a6e57610a6e613837565b9050602002016020810190610a83919061384d565b60ff1615155b15610b0157609f5460ff1615610aed5760405162461bcd60e51b8152602060048201526024808201527f4576656e7446696e616e63696e673a20496e76656e746f72792052657374726960448201526318dd195960e21b606482015260840161066c565b6109f9610afc82858b8d61389e565b611eb6565b816003148015610b395750868683818110610b1e57610b1e613837565b9050602002016020810190610b33919061384d565b60ff1615155b15610b52576109f9610b4d82858b8d61389e565b6120a0565b816004148015610b8a5750868683818110610b6f57610b6f613837565b9050602002016020810190610b84919061384d565b60ff1615155b15610ba3576109f9610b9e82858b8d61389e565b61229c565b816005148015610bdb5750868683818110610bc057610bc0613837565b9050602002016020810190610bd5919061384d565b60ff1615155b15610bf4576109f9610bef82858b8d61389e565b612486565b505b80610c00816138cb565b915050610902565b5050505050505050565b60998054609a805463ffffffff83169367ffffffffffffffff64010000000085048116946c01000000000000000000000000810490911693600160a01b8204600390810b947801000000000000000000000000000000000000000000000000909304900b9291610c81906137e5565b80601f0160208091040260200160405190810160405280929190818152602001828054610cad906137e5565b8015610cfa5780601f10610ccf57610100808354040283529160200191610cfa565b820191906000526020600020905b815481529060010190602001808311610cdd57829003601f168201915b505050505090806002018054610d0f906137e5565b80601f0160208091040260200160405190810160405280929190818152602001828054610d3b906137e5565b8015610d885780601f10610d5d57610100808354040283529160200191610d88565b820191906000526020600020905b815481529060010190602001808311610d6b57829003601f168201915b505050505090806003018054610d9d906137e5565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc9906137e5565b8015610e165780601f10610deb57610100808354040283529160200191610e16565b820191906000526020600020905b815481529060010190602001808311610df957829003601f168201915b505050505090806004018054610e2b906137e5565b80601f0160208091040260200160405190810160405280929190818152602001828054610e57906137e5565b8015610ea45780601f10610e7957610100808354040283529160200191610ea4565b820191906000526020600020905b815481529060010190602001808311610e8757829003601f168201915b5050505050905089565b60008181526067602052604081205461055f90600160c81b900460ff16826125aa565b600054610100900460ff16610eec5760005460ff1615610ef0565b303b155b610f535760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161066c565b600054610100900460ff16158015610f75576000805461ffff19166101011790555b610f7e826125d1565b8015610f90576000805461ff00191690555b5050565b6107a28383836040518060200160405280600081525061169f565b609760009054906101000a90046001600160a01b03166001600160a01b031663de9375f26040518163ffffffff1660e01b8152600401602060405180830381865afa158015611002573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611026919061381a565b604051630160462d60e51b81523360048201526001600160a01b039190911690632c08c5a09060240160006040518083038186803b15801561106757600080fd5b505afa15801561107b573d6000803e3d6000fd5b50505050806099818161108e9190613a84565b9050507f958566cf628c92f9351ddd9785bd2156df12a9c4ffb3814098eebe91a69956a6816040516110c09190613ced565b60405180910390a150565b600054610100900460ff166110e65760005460ff16156110ea565b303b155b61114d5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161066c565b600054610100900460ff1615801561116f576000805461ffff19166101011790555b6111e286868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8a0181900481028201810190925288815292508891508790819084018382808284376000920191909152506126a592505050565b6111eb82610ed1565b6111f482612779565b8015611206576000805461ff00191690555b505050505050565b60008181526067602052604081205461055f90600160c81b900460ff1660026125aa565b6000818152606760205260408120546001600160a01b03168061055f5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e0000000000000000000000000000000000000000000000606482015260840161066c565b60006001600160a01b03821661133b5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f206164647265737300000000000000000000000000000000000000000000606482015260840161066c565b506001600160a01b031660009081526068602052604090205467ffffffffffffffff1690565b609760009054906101000a90046001600160a01b03166001600160a01b031663de9375f26040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113d8919061381a565b604051630160462d60e51b81523360048201526001600160a01b039190911690632c08c5a09060240160006040518083038186803b15801561141957600080fd5b505afa15801561142d573d6000803e3d6000fd5b5050505080609e81816114409190613e37565b9050507fe8e0d9c2eed58cd24a8857d101285ac4d4093fef050a79803be2cc64d45658ca816040516110c0919061402e565b606060668054610574906137e5565b609760009054906101000a90046001600160a01b03166001600160a01b031663de9375f26040518163ffffffff1660e01b8152600401602060405180830381865afa1580156114d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114f8919061381a565b60405163cab6d5af60e01b81523360048201526001600160a01b03919091169063cab6d5af9060240160006040518083038186803b15801561153957600080fd5b505afa15801561154d573d6000803e3d6000fd5b5050505080609981816115609190613a84565b9050507f11c10cf3cbb6f8fa7801265868e7a4dcf315772778bf51d17b0e18f3128a08f1816040516110c09190613ced565b60008181526067602052604081205461055f90600160c81b900460ff1660036125aa565b6001600160a01b03821633141561160f5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161066c565b336000818152606a602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60008181526067602052604081205461055f90600160c81b900460ff1660016125aa565b6116a933836118a7565b61171b5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f766564000000000000000000000000000000606482015260840161066c565b6117278484848461284d565b50505050565b6000818152606760205260409020546060906001600160a01b03166117ba5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000606482015260840161066c565b60006117c46128d6565b905060008151116117e45760405180602001604052806000815250611823565b60995481906117f89063ffffffff1661294d565b6118018561294d565b604051602001611813939291906140e2565b6040516020818303038152906040525b9392505050565b6001600160a01b03163b151590565b600081815260696020526040902080546001600160a01b0319166001600160a01b038416908117909155819061186e82611232565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152606760205260408120546001600160a01b03166119205760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161066c565b600061192b83611232565b9050806001600160a01b0316846001600160a01b031614806119665750836001600160a01b031661195b846105f7565b6001600160a01b0316145b8061199657506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b03166119b182611232565b6001600160a01b031614611a2d5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e0000000000000000000000000000000000000000000000606482015260840161066c565b6001600160a01b038216611a8f5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161066c565b611a9a600082611839565b6001600160a01b0383166000908152606860205260408120805460019290611acd90849067ffffffffffffffff16614132565b82546101009290920a67ffffffffffffffff8181021990931691831602179091556001600160a01b03841660009081526068602052604081208054600194509092611b1a9185911661415b565b825467ffffffffffffffff9182166101009390930a92830291909202199091161790555060008181526067602052604080822080546001600160a01b038087166001600160a01b0319909216821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b611ba784848484612a63565b60985460408051632e239d9760e01b815290516000926001600160a01b031691632e239d979160048083019260209291908290030181865afa158015611bf1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c15919061381a565b9050600080826001600160a01b0316635a841b493389896040518463ffffffff1660e01b8152600401611c4a9392919061422f565b60408051808303816000875af1158015611c68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c8c919061425b565b915091507f7536f4f9c79a1cbe41e2a0739df4ded83b7e7890356e19f058443bc0256e4edc87878484604051611cc5949392919061427f565b60405180910390a150505050505050565b60005b81811015611d88576000838383818110611cf557611cf5613837565b905060a00201600001359050611d0a8161120e565b158015611d1d5750611d1b81611592565b155b611d755760405162461bcd60e51b8152602060048201526024808201527f4576656e74496d706c656d656e746174696f6e3a204572726f72206f6e20726560448201526373616c6560e01b606482015260840161066c565b5080611d80816138cb565b915050611cd9565b5060985460408051632e239d9760e01b815290516000926001600160a01b031691632e239d979160048083019260209291908290030181865afa158015611dd3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611df7919061381a565b9050600080826001600160a01b031663a6aafae83387876040518463ffffffff1660e01b8152600401611e2c9392919061422f565b60408051808303816000875af1158015611e4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e6e919061425b565b915091507fcf4e3ce2f7e364adde047ba97e589f5d59faab035175a615a2902e8f776a3e2085858484604051611ea7949392919061427f565b60405180910390a15050505050565b60005b81811015611f7b576000838383818110611ed557611ed5613837565b905060a00201600001359050611eea8161120e565b15611f5d5760405162461bcd60e51b815260206004820152602960248201527f4576656e74496d706c656d656e746174696f6e3a204572726f72206f6e20746960448201527f636b6574207363616e0000000000000000000000000000000000000000000000606482015260840161066c565b611f68816001612b87565b5080611f73816138cb565b915050611eb9565b5060985460408051632e239d9760e01b815290516000926001600160a01b031691632e239d979160048083019260209291908290030181865afa158015611fc6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fea919061381a565b604051630264fde560e31b815233600482015263ffffffff8416602482015290915060009081906001600160a01b03841690631327ef289060440160408051808303816000875af1158015612043573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612067919061425b565b915091507fdcc6310b14e47270a1b88cb2729e18e38d886e7b10ed8b5b55c2b0b07a7c7ab285858484604051611ea7949392919061427f565b60005b818110156121775760008383838181106120bf576120bf613837565b905060a002016000013590506120d48161120e565b1580156120e757506120e58161167b565b155b6121595760405162461bcd60e51b815260206004820152602660248201527f4576656e74496d706c656d656e746174696f6e3a204572726f72206f6e20636860448201527f65636b2d696e0000000000000000000000000000000000000000000000000000606482015260840161066c565b612164816001612bdd565b508061216f816138cb565b9150506120a3565b5060985460408051632e239d9760e01b815290516000926001600160a01b031691632e239d979160048083019260209291908290030181865afa1580156121c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121e6919061381a565b60405163241047cd60e21b815233600482015263ffffffff8416602482015290915060009081906001600160a01b038416906390411f349060440160408051808303816000875af115801561223f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612263919061425b565b915091507f9647b78aeeea679f1b41a3f725a904aba757a17aa35902423afd9fdcc751b5e685858484604051611ea7949392919061427f565b60005b818110156123615760008383838181106122bb576122bb613837565b905060a002016000013590506122d08161120e565b156123435760405162461bcd60e51b815260206004820152603160248201527f4576656e74496d706c656d656e746174696f6e3a204572726f72206f6e20746960448201527f636b657420696e76616c69646174696f6e000000000000000000000000000000606482015260840161066c565b61234e816001612c01565b5080612359816138cb565b91505061229f565b5060985460408051632e239d9760e01b815290516000926001600160a01b031691632e239d979160048083019260209291908290030181865afa1580156123ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123d0919061381a565b60405163241047cd60e21b815233600482015263ffffffff8416602482015290915060009081906001600160a01b038416906390411f349060440160408051808303816000875af1158015612429573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061244d919061425b565b915091507f6e714a965f34ba7ab70054f8de9b53e71c7438577c3bf2df26a916313c4fbfd385858484604051611ea7949392919061427f565b60005b8181101561255d5760008383838181106124a5576124a5613837565b905060a002016000013590506124ba8161120e565b1580156124cd57506124cb81611592565b155b61253f5760405162461bcd60e51b815260206004820152602760248201527f4576656e74496d706c656d656e746174696f6e3a204572726f72206f6e204e4660448201527f5420636c61696d00000000000000000000000000000000000000000000000000606482015260840161066c565b61254a816001612c25565b5080612555816138cb565b915050612489565b506125688282612c49565b7ffa2ec35ac48e074e7e268ef68564eaef01afe7a44f966495691d5f1bf045ab55828260008060405161259e949392919061427f565b60405180910390a15050565b6000600160ff8481169084161c81169081146125c7576000611996565b5060019392505050565b600054610100900460ff166125ec5760005460ff16156125f0565b303b155b6126535760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161066c565b600054610100900460ff16158015612675576000805461ffff19166101011790555b609780546001600160a01b0319166001600160a01b0384161790558015610f90576000805461ff00191690555050565b600054610100900460ff166126c05760005460ff16156126c4565b303b155b6127275760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161066c565b600054610100900460ff16158015612749576000805461ffff19166101011790555b612751612cd8565b612759612cd8565b6127638383612d57565b80156107a2576000805461ff0019169055505050565b600054610100900460ff166127945760005460ff1615612798565b303b155b6127fb5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161066c565b600054610100900460ff1615801561281d576000805461ffff19166101011790555b609880546001600160a01b0319166001600160a01b0384161790558015610f90576000805461ff00191690555050565b61285884848461199e565b61286484848484612e39565b6117275760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e7465720000000000000000000000000000606482015260840161066c565b60985460408051636c0360eb60e01b815290516060926001600160a01b031691636c0360eb9160048083019260009291908290030181865afa158015612920573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261294891908101906142a6565b905090565b6060816129715750506040805180820190915260018152600360fc1b602082015290565b8160005b811561299b5780612985816138cb565b91506129949050600a8361432a565b9150612975565b60008167ffffffffffffffff8111156129b6576129b6613699565b6040519080825280601f01601f1916602001820160405280156129e0576020820181803683370190505b5090505b8415611996576129f560018361433e565b9150612a02600a86614355565b612a0d906030613886565b60f81b818381518110612a2257612a22613837565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612a5c600a8661432a565b94506129e4565b60005b81811015612b3257828282818110612a8057612a80613837565b9050604002016020016020810190612a989190614369565b60686000858585818110612aae57612aae613837565b612ac4926020604090920201908101915061350a565b6001600160a01b03168152602081019190915260400160009081208054909190612af990849067ffffffffffffffff1661415b565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055508080612b2a906138cb565b915050612a66565b5060005b83811015612b8057612b6e858583818110612b5357612b53613837565b905060a00201803603810190612b699190614386565b612f8d565b80612b78816138cb565b915050612b36565b5050505050565b600082815260676020526040812054612bad91600160c81b90910460ff16905b8361311c565b600092835260676020526040909220805460ff93909316600160c81b0260ff60c81b199093169290921790915550565b600082815260676020526040902054612bad90600160c81b900460ff166001612ba7565b600082815260676020526040902054612bad90600160c81b900460ff166002612ba7565b600082815260676020526040902054612bad90600160c81b900460ff166003612ba7565b60005b818110156107a257612cc6612c7b848484818110612c6c57612c6c613837565b905060a0020160000135611232565b848484818110612c8d57612c8d613837565b905060a002016040016020810190612ca5919061350a565b858585818110612cb757612cb7613837565b905060a002016000013561199e565b80612cd0816138cb565b915050612c4c565b600054610100900460ff16612d555760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161066c565b565b600054610100900460ff16612d725760005460ff1615612d76565b303b155b612dd95760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161066c565b600054610100900460ff16158015612dfb576000805461ffff19166101011790555b8251612e0e906065906020860190613143565b508151612e22906066906020850190613143565b5080156107a2576000805461ff0019169055505050565b60006001600160a01b0384163b15612f8257604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612e7d90339089908890889060040161440c565b6020604051808303816000875af1925050508015612eb8575060408051601f3d908101601f19168201909252612eb591810190614448565b60015b612f68573d808015612ee6576040519150601f19603f3d011682016040523d82523d6000602084013e612eeb565b606091505b508051612f605760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e7465720000000000000000000000000000606482015260840161066c565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611996565b506001949350505050565b60408101516001600160a01b0316612fe75760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161066c565b80516000908152606760205260409020546001600160a01b03161561304e5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161066c565b6040805160608101825282820180516001600160a01b039081168352608085015164ffffffffff90811660208086019182526000868801818152895182526067909252878120965187549351925160ff16600160c81b0260ff60c81b1993909516600160a01b027fffffffffffffff000000000000000000000000000000000000000000000000009094169086161792909217169190911790935584519151935191931691907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a450565b600081156131335750600160ff83161b8317611823565b5050600160ff919091161b191690565b82805461314f906137e5565b90600052602060002090601f01602090048101928261317157600085556131b7565b82601f1061318a57805160ff19168380011785556131b7565b828001600101855582156131b7579182015b828111156131b757825182559160200191906001019061319c565b506131c39291506131c7565b5090565b5b808211156131c357600081556001016131c8565b6001600160e01b0319811681146131f257600080fd5b50565b60006020828403121561320757600080fd5b8135611823816131dc565b60005b8381101561322d578181015183820152602001613215565b838111156117275750506000910152565b60008151808452613256816020860160208601613212565b601f01601f19169290920160200192915050565b602081526000611823602083018461323e565b60006020828403121561328f57600080fd5b5035919050565b6001600160a01b03811681146131f257600080fd5b600080604083850312156132be57600080fd5b82356132c981613296565b946020939093013593505050565b6000806000606084860312156132ec57600080fd5b83356132f781613296565b9250602084013561330781613296565b929592945050506040919091013590565b60008083601f84011261332a57600080fd5b50813567ffffffffffffffff81111561334257600080fd5b6020830191508360208260051b850101111561335d57600080fd5b9250929050565b60008083601f84011261337657600080fd5b50813567ffffffffffffffff81111561338e57600080fd5b6020830191508360208260061b850101111561335d57600080fd5b600080600080600080606087890312156133c257600080fd5b863567ffffffffffffffff808211156133da57600080fd5b818901915089601f8301126133ee57600080fd5b8135818111156133fd57600080fd5b8a602060a08302850101111561341257600080fd5b60209283019850965090880135908082111561342d57600080fd5b6134398a838b01613318565b9096509450604089013591508082111561345257600080fd5b5061345f89828a01613364565b979a9699509497509295939492505050565b600061012063ffffffff8c16835267ffffffffffffffff808c166020850152808b166040850152508860030b60608401528760030b60808401528060a08401526134bd8184018861323e565b905082810360c08401526134d1818761323e565b905082810360e08401526134e5818661323e565b90508281036101008401526134fa818561323e565b9c9b505050505050505050505050565b60006020828403121561351c57600080fd5b813561182381613296565b60006020828403121561353957600080fd5b813567ffffffffffffffff81111561355057600080fd5b8201610120818503121561182357600080fd5b60008083601f84011261357557600080fd5b50813567ffffffffffffffff81111561358d57600080fd5b60208301915083602082850101111561335d57600080fd5b6000806000806000606086880312156135bd57600080fd5b853567ffffffffffffffff808211156135d557600080fd5b6135e189838a01613563565b909750955060208801359150808211156135fa57600080fd5b5061360788828901613563565b909450925050604086013561361b81613296565b809150509295509295909350565b6000610100828403121561363c57600080fd5b50919050565b80151581146131f257600080fd5b803561365b81613642565b919050565b6000806040838503121561367357600080fd5b823561367e81613296565b9150602083013561368e81613642565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156136d8576136d8613699565b604052919050565b600067ffffffffffffffff8211156136fa576136fa613699565b50601f01601f191660200190565b6000806000806080858703121561371e57600080fd5b843561372981613296565b9350602085013561373981613296565b925060408501359150606085013567ffffffffffffffff81111561375c57600080fd5b8501601f8101871361376d57600080fd5b803561378061377b826136e0565b6136af565b81815288602083850101111561379557600080fd5b8160208401602083013760006020838301015280935050505092959194509250565b600080604083850312156137ca57600080fd5b82356137d581613296565b9150602083013561368e81613296565b600181811c908216806137f957607f821691505b6020821081141561363c57634e487b7160e01b600052602260045260246000fd5b60006020828403121561382c57600080fd5b815161182381613296565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561385f57600080fd5b813560ff8116811461182357600080fd5b634e487b7160e01b600052601160045260246000fd5b6000821982111561389957613899613870565b500190565b600080858511156138ae57600080fd5b838611156138bb57600080fd5b505060a083020193919092039150565b60006000198214156138df576138df613870565b5060010190565b63ffffffff811681146131f257600080fd5b67ffffffffffffffff811681146131f257600080fd5b6000813561055f816138f8565b8060030b81146131f257600080fd5b6000813561055f8161391b565b6000808335601e1984360301811261394e57600080fd5b83018035915067ffffffffffffffff82111561396957600080fd5b60200191503681900382131561335d57600080fd5b601f8211156107a257600081815260208120601f850160051c810160208610156139a55750805b601f850160051c820191505b81811015611206578281556001016139b1565b67ffffffffffffffff8311156139dc576139dc613699565b6139f0836139ea83546137e5565b8361397e565b6000601f841160018114613a245760008515613a0c5750838201355b600019600387901b1c1916600186901b178355612b80565b600083815260209020601f19861690835b82811015613a555786850135825560209485019460019092019101613a35565b5086821015613a725760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b8135613a8f816138e6565b63ffffffff811663ffffffff1983541617825550613adc613ab26020840161390e565b82546bffffffffffffffff00000000191660209190911b6bffffffffffffffff0000000016178255565b613b30613aeb6040840161390e565b82547fffffffffffffffffffffffff0000000000000000ffffffffffffffffffffffff1660609190911b73ffffffffffffffff00000000000000000000000016178255565b613b8b613b3f6060840161392a565b8280548260a01b77ffffffff0000000000000000000000000000000000000000167fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff8216178255505050565b613bea613b9a6080840161392a565b8280548260c01b7bffffffff000000000000000000000000000000000000000000000000167fffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff8216178255505050565b613bf760a0830183613937565b613c058183600186016139c4565b5050613c1460c0830183613937565b613c228183600286016139c4565b5050613c3160e0830183613937565b613c3f8183600386016139c4565b5050613c4f610100830183613937565b6117278183600486016139c4565b803561365b816138e6565b803561365b816138f8565b803561365b8161391b565b6000808335601e19843603018112613c9557600080fd5b830160208101925035905067ffffffffffffffff811115613cb557600080fd5b80360383131561335d57600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60208152613d0b60208201613d0184613c5d565b63ffffffff169052565b6000613d1960208401613c68565b67ffffffffffffffff8116604084015250613d3660408401613c68565b67ffffffffffffffff8116606084015250613d5360608401613c73565b613d62608084018260030b9052565b50613d6f60808401613c73565b613d7e60a084018260030b9052565b50613d8c60a0840184613c7e565b6101208060c0860152613da461014086018385613cc4565b9250613db360c0870187613c7e565b9250601f19808786030160e0880152613dcd858584613cc4565b9450613ddc60e0890189613c7e565b94509150610100818887030181890152613df7868685613cc4565b9550613e05818a018a613c7e565b955092505080878603018388015250613e1f848483613cc4565b979650505050505050565b6000813561055f81613642565b8135613e42816138f8565b67ffffffffffffffff8116905081548167ffffffffffffffff1982161783556020840135613e6f81613296565b7bffffffffffffffffffffffffffffffffffffffff00000000000000008160401b168363ffffffff60e01b841617178455505050613eeb613eb260408401613e2a565b8280547fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff1691151560e01b60ff60e01b16919091179055565b613f33613efa60608401613e2a565b8280547fffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1691151560e81b60ff60e81b16919091179055565b613f7b613f4260808401613e2a565b8280547fff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1691151560f01b60ff60f01b16919091179055565b613fde613f8a60a08401613e2a565b8280547effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1691151560f81b7fff0000000000000000000000000000000000000000000000000000000000000016919091179055565b60018101614005613ff160c08501613e2a565b825490151560ff1660ff1991909116178255565b6107a261401460e08501613e2a565b82805461ff00191691151560081b61ff0016919091179055565b6101008101823561403e816138f8565b67ffffffffffffffff168252602083013561405881613296565b6001600160a01b03166020830152604083013561407481613642565b1515604083015261408760608401613650565b1515606083015261409a60808401613650565b151560808301526140ad60a08401613650565b151560a08301526140c060c08401613650565b151560c08301526140d360e08401613650565b80151560e08401525092915050565b600084516140f4818460208901613212565b845190830190614108818360208901613212565b602f60f81b91019081528351614125816001840160208801613212565b0160010195945050505050565b600067ffffffffffffffff8381169083168181101561415357614153613870565b039392505050565b600067ffffffffffffffff80831681851680830382111561417e5761417e613870565b01949350505050565b803564ffffffffff8116811461365b57600080fd5b8183526000602080850194508260005b85811015614224578135875282820135838801526040808301356141cf81613296565b6001600160a01b0316908801526060828101356141eb816138f8565b67ffffffffffffffff1690880152608064ffffffffff61420c848301614187565b169088015260a09687019691909101906001016141ac565b509495945050505050565b6001600160a01b038416815260406020820152600061425260408301848661419c565b95945050505050565b6000806040838503121561426e57600080fd5b505080516020909101519092909150565b60608152600061429360608301868861419c565b6020830194909452506040015292915050565b6000602082840312156142b857600080fd5b815167ffffffffffffffff8111156142cf57600080fd5b8201601f810184136142e057600080fd5b80516142ee61377b826136e0565b81815285602083850101111561430357600080fd5b614252826020830160208601613212565b634e487b7160e01b600052601260045260246000fd5b60008261433957614339614314565b500490565b60008282101561435057614350613870565b500390565b60008261436457614364614314565b500690565b60006020828403121561437b57600080fd5b8135611823816138f8565b600060a0828403121561439857600080fd5b60405160a0810181811067ffffffffffffffff821117156143bb576143bb613699565b8060405250823581526020830135602082015260408301356143dc81613296565b604082015260608301356143ef816138f8565b606082015261440060808401614187565b60808201529392505050565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261443e608083018461323e565b9695505050505050565b60006020828403121561445a57600080fd5b8151611823816131dc56fea164736f6c634300080c000a

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101ae5760003560e01c80636352211e116100ee578063a22cb46511610097578063b4b5b48f11610071578063b4b5b48f1461043f578063b88d4fde146104b1578063c87b56dd146104c4578063e985e9c5146104d757600080fd5b8063a22cb4651461035a578063a85bfd8a1461036d578063abdd97441461042c57600080fd5b806395d89b41116100c857806395d89b411461032c5780639bccd1cd146103345780639e34070f1461034757600080fd5b80636352211e146102e557806370a08231146102f857806381ddd5081461031957600080fd5b8063254641e41161015b57806342842e0e1161013557806342842e0e146102995780634977d03b146102ac5780635ddda513146102bf5780635df67794146102d257600080fd5b8063254641e414610256578063298ae216146102735780632d103c951461028657600080fd5b8063095ea7b31161018c578063095ea7b31461021b57806323b872dd14610230578063248fd9a71461024357600080fd5b806301ffc9a7146101b357806306fdde03146101db578063081812fc146101f0575b600080fd5b6101c66101c13660046131f5565b610513565b60405190151581526020015b60405180910390f35b6101e3610565565b6040516101d2919061326a565b6102036101fe36600461327d565b6105f7565b6040516001600160a01b0390911681526020016101d2565b61022e6102293660046132ab565b610691565b005b61022e61023e3660046132d7565b6107a7565b61022e6102513660046133a9565b61082e565b61025e610c12565b6040516101d299989796959493929190613471565b6101c661028136600461327d565b610eae565b61022e61029436600461350a565b610ed1565b61022e6102a73660046132d7565b610f94565b61022e6102ba366004613527565b610faf565b61022e6102cd3660046135a5565b6110cb565b6101c66102e036600461327d565b61120e565b6102036102f336600461327d565b611232565b61030b61030636600461350a565b6112bd565b6040519081526020016101d2565b61022e610327366004613629565b611361565b6101e3611472565b61022e610342366004613527565b611481565b6101c661035536600461327d565b611592565b61022e610368366004613660565b6115b6565b609e54609f546103d29167ffffffffffffffff8116916001600160a01b03680100000000000000008304169160ff600160e01b8204811692600160e81b8304821692600160f01b8104831692600160f81b909104811691808216916101009091041688565b6040805167ffffffffffffffff90991689526001600160a01b03909716602089015294151595870195909552911515606086015215156080850152151560a084015290151560c0830152151560e0820152610100016101d2565b6101c661043a36600461327d565b61167b565b61048361044d36600461327d565b6067602052600090815260409020546001600160a01b03811690600160a01b810464ffffffffff1690600160c81b900460ff1683565b604080516001600160a01b03909416845264ffffffffff909216602084015260ff16908201526060016101d2565b61022e6104bf366004613708565b61169f565b6101e36104d236600461327d565b61172d565b6101c66104e53660046137b7565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b60006001600160e01b031982166380ac58cd60e01b148061054457506001600160e01b03198216635b5e139f60e01b145b8061055f57506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060658054610574906137e5565b80601f01602080910402602001604051908101604052809291908181526020018280546105a0906137e5565b80156105ed5780601f106105c2576101008083540402835291602001916105ed565b820191906000526020600020905b8154815290600101906020018083116105d057829003601f168201915b5050505050905090565b6000818152606760205260408120546001600160a01b03166106755760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152606960205260409020546001600160a01b031690565b600061069c82611232565b9050806001600160a01b0316836001600160a01b0316141561070a5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161066c565b336001600160a01b0382161480610726575061072681336104e5565b6107985760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161066c565b6107a28383611839565b505050565b6107b133826118a7565b6108235760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f766564000000000000000000000000000000606482015260840161066c565b6107a283838361199e565b609760009054906101000a90046001600160a01b03166001600160a01b031663de9375f26040518163ffffffff1660e01b8152600401602060405180830381865afa158015610881573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a5919061381a565b60405163cab6d5af60e01b81523360048201526001600160a01b03919091169063cab6d5af9060240160006040518083038186803b1580156108e657600080fd5b505afa1580156108fa573d6000803e3d6000fd5b505050506000805b84811015610c0857600086868381811061091e5761091e613837565b9050602002016020810190610933919061384d565b6109409060ff1684613886565b905081158015610978575086868381811061095d5761095d613837565b9050602002016020810190610972919061384d565b60ff1615155b15610a0057609e54600160f01b900460ff16156109e35760405162461bcd60e51b8152602060048201526024808201527f4576656e7446696e616e63696e673a20496e76656e746f72792052657374726960448201526318dd195960e21b606482015260840161066c565b6109f96109f282858b8d61389e565b8787611b9b565b9150610bf6565b816001148015610a385750868683818110610a1d57610a1d613837565b9050602002016020810190610a32919061384d565b60ff1615155b15610a51576109f9610a4c82858b8d61389e565b611cd6565b816002148015610a895750868683818110610a6e57610a6e613837565b9050602002016020810190610a83919061384d565b60ff1615155b15610b0157609f5460ff1615610aed5760405162461bcd60e51b8152602060048201526024808201527f4576656e7446696e616e63696e673a20496e76656e746f72792052657374726960448201526318dd195960e21b606482015260840161066c565b6109f9610afc82858b8d61389e565b611eb6565b816003148015610b395750868683818110610b1e57610b1e613837565b9050602002016020810190610b33919061384d565b60ff1615155b15610b52576109f9610b4d82858b8d61389e565b6120a0565b816004148015610b8a5750868683818110610b6f57610b6f613837565b9050602002016020810190610b84919061384d565b60ff1615155b15610ba3576109f9610b9e82858b8d61389e565b61229c565b816005148015610bdb5750868683818110610bc057610bc0613837565b9050602002016020810190610bd5919061384d565b60ff1615155b15610bf4576109f9610bef82858b8d61389e565b612486565b505b80610c00816138cb565b915050610902565b5050505050505050565b60998054609a805463ffffffff83169367ffffffffffffffff64010000000085048116946c01000000000000000000000000810490911693600160a01b8204600390810b947801000000000000000000000000000000000000000000000000909304900b9291610c81906137e5565b80601f0160208091040260200160405190810160405280929190818152602001828054610cad906137e5565b8015610cfa5780601f10610ccf57610100808354040283529160200191610cfa565b820191906000526020600020905b815481529060010190602001808311610cdd57829003601f168201915b505050505090806002018054610d0f906137e5565b80601f0160208091040260200160405190810160405280929190818152602001828054610d3b906137e5565b8015610d885780601f10610d5d57610100808354040283529160200191610d88565b820191906000526020600020905b815481529060010190602001808311610d6b57829003601f168201915b505050505090806003018054610d9d906137e5565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc9906137e5565b8015610e165780601f10610deb57610100808354040283529160200191610e16565b820191906000526020600020905b815481529060010190602001808311610df957829003601f168201915b505050505090806004018054610e2b906137e5565b80601f0160208091040260200160405190810160405280929190818152602001828054610e57906137e5565b8015610ea45780601f10610e7957610100808354040283529160200191610ea4565b820191906000526020600020905b815481529060010190602001808311610e8757829003601f168201915b5050505050905089565b60008181526067602052604081205461055f90600160c81b900460ff16826125aa565b600054610100900460ff16610eec5760005460ff1615610ef0565b303b155b610f535760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161066c565b600054610100900460ff16158015610f75576000805461ffff19166101011790555b610f7e826125d1565b8015610f90576000805461ff00191690555b5050565b6107a28383836040518060200160405280600081525061169f565b609760009054906101000a90046001600160a01b03166001600160a01b031663de9375f26040518163ffffffff1660e01b8152600401602060405180830381865afa158015611002573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611026919061381a565b604051630160462d60e51b81523360048201526001600160a01b039190911690632c08c5a09060240160006040518083038186803b15801561106757600080fd5b505afa15801561107b573d6000803e3d6000fd5b50505050806099818161108e9190613a84565b9050507f958566cf628c92f9351ddd9785bd2156df12a9c4ffb3814098eebe91a69956a6816040516110c09190613ced565b60405180910390a150565b600054610100900460ff166110e65760005460ff16156110ea565b303b155b61114d5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161066c565b600054610100900460ff1615801561116f576000805461ffff19166101011790555b6111e286868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8a0181900481028201810190925288815292508891508790819084018382808284376000920191909152506126a592505050565b6111eb82610ed1565b6111f482612779565b8015611206576000805461ff00191690555b505050505050565b60008181526067602052604081205461055f90600160c81b900460ff1660026125aa565b6000818152606760205260408120546001600160a01b03168061055f5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e0000000000000000000000000000000000000000000000606482015260840161066c565b60006001600160a01b03821661133b5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f206164647265737300000000000000000000000000000000000000000000606482015260840161066c565b506001600160a01b031660009081526068602052604090205467ffffffffffffffff1690565b609760009054906101000a90046001600160a01b03166001600160a01b031663de9375f26040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113d8919061381a565b604051630160462d60e51b81523360048201526001600160a01b039190911690632c08c5a09060240160006040518083038186803b15801561141957600080fd5b505afa15801561142d573d6000803e3d6000fd5b5050505080609e81816114409190613e37565b9050507fe8e0d9c2eed58cd24a8857d101285ac4d4093fef050a79803be2cc64d45658ca816040516110c0919061402e565b606060668054610574906137e5565b609760009054906101000a90046001600160a01b03166001600160a01b031663de9375f26040518163ffffffff1660e01b8152600401602060405180830381865afa1580156114d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114f8919061381a565b60405163cab6d5af60e01b81523360048201526001600160a01b03919091169063cab6d5af9060240160006040518083038186803b15801561153957600080fd5b505afa15801561154d573d6000803e3d6000fd5b5050505080609981816115609190613a84565b9050507f11c10cf3cbb6f8fa7801265868e7a4dcf315772778bf51d17b0e18f3128a08f1816040516110c09190613ced565b60008181526067602052604081205461055f90600160c81b900460ff1660036125aa565b6001600160a01b03821633141561160f5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161066c565b336000818152606a602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60008181526067602052604081205461055f90600160c81b900460ff1660016125aa565b6116a933836118a7565b61171b5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f766564000000000000000000000000000000606482015260840161066c565b6117278484848461284d565b50505050565b6000818152606760205260409020546060906001600160a01b03166117ba5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000606482015260840161066c565b60006117c46128d6565b905060008151116117e45760405180602001604052806000815250611823565b60995481906117f89063ffffffff1661294d565b6118018561294d565b604051602001611813939291906140e2565b6040516020818303038152906040525b9392505050565b6001600160a01b03163b151590565b600081815260696020526040902080546001600160a01b0319166001600160a01b038416908117909155819061186e82611232565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152606760205260408120546001600160a01b03166119205760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161066c565b600061192b83611232565b9050806001600160a01b0316846001600160a01b031614806119665750836001600160a01b031661195b846105f7565b6001600160a01b0316145b8061199657506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b03166119b182611232565b6001600160a01b031614611a2d5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e0000000000000000000000000000000000000000000000606482015260840161066c565b6001600160a01b038216611a8f5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161066c565b611a9a600082611839565b6001600160a01b0383166000908152606860205260408120805460019290611acd90849067ffffffffffffffff16614132565b82546101009290920a67ffffffffffffffff8181021990931691831602179091556001600160a01b03841660009081526068602052604081208054600194509092611b1a9185911661415b565b825467ffffffffffffffff9182166101009390930a92830291909202199091161790555060008181526067602052604080822080546001600160a01b038087166001600160a01b0319909216821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b611ba784848484612a63565b60985460408051632e239d9760e01b815290516000926001600160a01b031691632e239d979160048083019260209291908290030181865afa158015611bf1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c15919061381a565b9050600080826001600160a01b0316635a841b493389896040518463ffffffff1660e01b8152600401611c4a9392919061422f565b60408051808303816000875af1158015611c68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c8c919061425b565b915091507f7536f4f9c79a1cbe41e2a0739df4ded83b7e7890356e19f058443bc0256e4edc87878484604051611cc5949392919061427f565b60405180910390a150505050505050565b60005b81811015611d88576000838383818110611cf557611cf5613837565b905060a00201600001359050611d0a8161120e565b158015611d1d5750611d1b81611592565b155b611d755760405162461bcd60e51b8152602060048201526024808201527f4576656e74496d706c656d656e746174696f6e3a204572726f72206f6e20726560448201526373616c6560e01b606482015260840161066c565b5080611d80816138cb565b915050611cd9565b5060985460408051632e239d9760e01b815290516000926001600160a01b031691632e239d979160048083019260209291908290030181865afa158015611dd3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611df7919061381a565b9050600080826001600160a01b031663a6aafae83387876040518463ffffffff1660e01b8152600401611e2c9392919061422f565b60408051808303816000875af1158015611e4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e6e919061425b565b915091507fcf4e3ce2f7e364adde047ba97e589f5d59faab035175a615a2902e8f776a3e2085858484604051611ea7949392919061427f565b60405180910390a15050505050565b60005b81811015611f7b576000838383818110611ed557611ed5613837565b905060a00201600001359050611eea8161120e565b15611f5d5760405162461bcd60e51b815260206004820152602960248201527f4576656e74496d706c656d656e746174696f6e3a204572726f72206f6e20746960448201527f636b6574207363616e0000000000000000000000000000000000000000000000606482015260840161066c565b611f68816001612b87565b5080611f73816138cb565b915050611eb9565b5060985460408051632e239d9760e01b815290516000926001600160a01b031691632e239d979160048083019260209291908290030181865afa158015611fc6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fea919061381a565b604051630264fde560e31b815233600482015263ffffffff8416602482015290915060009081906001600160a01b03841690631327ef289060440160408051808303816000875af1158015612043573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612067919061425b565b915091507fdcc6310b14e47270a1b88cb2729e18e38d886e7b10ed8b5b55c2b0b07a7c7ab285858484604051611ea7949392919061427f565b60005b818110156121775760008383838181106120bf576120bf613837565b905060a002016000013590506120d48161120e565b1580156120e757506120e58161167b565b155b6121595760405162461bcd60e51b815260206004820152602660248201527f4576656e74496d706c656d656e746174696f6e3a204572726f72206f6e20636860448201527f65636b2d696e0000000000000000000000000000000000000000000000000000606482015260840161066c565b612164816001612bdd565b508061216f816138cb565b9150506120a3565b5060985460408051632e239d9760e01b815290516000926001600160a01b031691632e239d979160048083019260209291908290030181865afa1580156121c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121e6919061381a565b60405163241047cd60e21b815233600482015263ffffffff8416602482015290915060009081906001600160a01b038416906390411f349060440160408051808303816000875af115801561223f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612263919061425b565b915091507f9647b78aeeea679f1b41a3f725a904aba757a17aa35902423afd9fdcc751b5e685858484604051611ea7949392919061427f565b60005b818110156123615760008383838181106122bb576122bb613837565b905060a002016000013590506122d08161120e565b156123435760405162461bcd60e51b815260206004820152603160248201527f4576656e74496d706c656d656e746174696f6e3a204572726f72206f6e20746960448201527f636b657420696e76616c69646174696f6e000000000000000000000000000000606482015260840161066c565b61234e816001612c01565b5080612359816138cb565b91505061229f565b5060985460408051632e239d9760e01b815290516000926001600160a01b031691632e239d979160048083019260209291908290030181865afa1580156123ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123d0919061381a565b60405163241047cd60e21b815233600482015263ffffffff8416602482015290915060009081906001600160a01b038416906390411f349060440160408051808303816000875af1158015612429573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061244d919061425b565b915091507f6e714a965f34ba7ab70054f8de9b53e71c7438577c3bf2df26a916313c4fbfd385858484604051611ea7949392919061427f565b60005b8181101561255d5760008383838181106124a5576124a5613837565b905060a002016000013590506124ba8161120e565b1580156124cd57506124cb81611592565b155b61253f5760405162461bcd60e51b815260206004820152602760248201527f4576656e74496d706c656d656e746174696f6e3a204572726f72206f6e204e4660448201527f5420636c61696d00000000000000000000000000000000000000000000000000606482015260840161066c565b61254a816001612c25565b5080612555816138cb565b915050612489565b506125688282612c49565b7ffa2ec35ac48e074e7e268ef68564eaef01afe7a44f966495691d5f1bf045ab55828260008060405161259e949392919061427f565b60405180910390a15050565b6000600160ff8481169084161c81169081146125c7576000611996565b5060019392505050565b600054610100900460ff166125ec5760005460ff16156125f0565b303b155b6126535760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161066c565b600054610100900460ff16158015612675576000805461ffff19166101011790555b609780546001600160a01b0319166001600160a01b0384161790558015610f90576000805461ff00191690555050565b600054610100900460ff166126c05760005460ff16156126c4565b303b155b6127275760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161066c565b600054610100900460ff16158015612749576000805461ffff19166101011790555b612751612cd8565b612759612cd8565b6127638383612d57565b80156107a2576000805461ff0019169055505050565b600054610100900460ff166127945760005460ff1615612798565b303b155b6127fb5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161066c565b600054610100900460ff1615801561281d576000805461ffff19166101011790555b609880546001600160a01b0319166001600160a01b0384161790558015610f90576000805461ff00191690555050565b61285884848461199e565b61286484848484612e39565b6117275760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e7465720000000000000000000000000000606482015260840161066c565b60985460408051636c0360eb60e01b815290516060926001600160a01b031691636c0360eb9160048083019260009291908290030181865afa158015612920573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261294891908101906142a6565b905090565b6060816129715750506040805180820190915260018152600360fc1b602082015290565b8160005b811561299b5780612985816138cb565b91506129949050600a8361432a565b9150612975565b60008167ffffffffffffffff8111156129b6576129b6613699565b6040519080825280601f01601f1916602001820160405280156129e0576020820181803683370190505b5090505b8415611996576129f560018361433e565b9150612a02600a86614355565b612a0d906030613886565b60f81b818381518110612a2257612a22613837565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612a5c600a8661432a565b94506129e4565b60005b81811015612b3257828282818110612a8057612a80613837565b9050604002016020016020810190612a989190614369565b60686000858585818110612aae57612aae613837565b612ac4926020604090920201908101915061350a565b6001600160a01b03168152602081019190915260400160009081208054909190612af990849067ffffffffffffffff1661415b565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055508080612b2a906138cb565b915050612a66565b5060005b83811015612b8057612b6e858583818110612b5357612b53613837565b905060a00201803603810190612b699190614386565b612f8d565b80612b78816138cb565b915050612b36565b5050505050565b600082815260676020526040812054612bad91600160c81b90910460ff16905b8361311c565b600092835260676020526040909220805460ff93909316600160c81b0260ff60c81b199093169290921790915550565b600082815260676020526040902054612bad90600160c81b900460ff166001612ba7565b600082815260676020526040902054612bad90600160c81b900460ff166002612ba7565b600082815260676020526040902054612bad90600160c81b900460ff166003612ba7565b60005b818110156107a257612cc6612c7b848484818110612c6c57612c6c613837565b905060a0020160000135611232565b848484818110612c8d57612c8d613837565b905060a002016040016020810190612ca5919061350a565b858585818110612cb757612cb7613837565b905060a002016000013561199e565b80612cd0816138cb565b915050612c4c565b600054610100900460ff16612d555760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161066c565b565b600054610100900460ff16612d725760005460ff1615612d76565b303b155b612dd95760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161066c565b600054610100900460ff16158015612dfb576000805461ffff19166101011790555b8251612e0e906065906020860190613143565b508151612e22906066906020850190613143565b5080156107a2576000805461ff0019169055505050565b60006001600160a01b0384163b15612f8257604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612e7d90339089908890889060040161440c565b6020604051808303816000875af1925050508015612eb8575060408051601f3d908101601f19168201909252612eb591810190614448565b60015b612f68573d808015612ee6576040519150601f19603f3d011682016040523d82523d6000602084013e612eeb565b606091505b508051612f605760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e7465720000000000000000000000000000606482015260840161066c565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611996565b506001949350505050565b60408101516001600160a01b0316612fe75760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161066c565b80516000908152606760205260409020546001600160a01b03161561304e5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161066c565b6040805160608101825282820180516001600160a01b039081168352608085015164ffffffffff90811660208086019182526000868801818152895182526067909252878120965187549351925160ff16600160c81b0260ff60c81b1993909516600160a01b027fffffffffffffff000000000000000000000000000000000000000000000000009094169086161792909217169190911790935584519151935191931691907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a450565b600081156131335750600160ff83161b8317611823565b5050600160ff919091161b191690565b82805461314f906137e5565b90600052602060002090601f01602090048101928261317157600085556131b7565b82601f1061318a57805160ff19168380011785556131b7565b828001600101855582156131b7579182015b828111156131b757825182559160200191906001019061319c565b506131c39291506131c7565b5090565b5b808211156131c357600081556001016131c8565b6001600160e01b0319811681146131f257600080fd5b50565b60006020828403121561320757600080fd5b8135611823816131dc565b60005b8381101561322d578181015183820152602001613215565b838111156117275750506000910152565b60008151808452613256816020860160208601613212565b601f01601f19169290920160200192915050565b602081526000611823602083018461323e565b60006020828403121561328f57600080fd5b5035919050565b6001600160a01b03811681146131f257600080fd5b600080604083850312156132be57600080fd5b82356132c981613296565b946020939093013593505050565b6000806000606084860312156132ec57600080fd5b83356132f781613296565b9250602084013561330781613296565b929592945050506040919091013590565b60008083601f84011261332a57600080fd5b50813567ffffffffffffffff81111561334257600080fd5b6020830191508360208260051b850101111561335d57600080fd5b9250929050565b60008083601f84011261337657600080fd5b50813567ffffffffffffffff81111561338e57600080fd5b6020830191508360208260061b850101111561335d57600080fd5b600080600080600080606087890312156133c257600080fd5b863567ffffffffffffffff808211156133da57600080fd5b818901915089601f8301126133ee57600080fd5b8135818111156133fd57600080fd5b8a602060a08302850101111561341257600080fd5b60209283019850965090880135908082111561342d57600080fd5b6134398a838b01613318565b9096509450604089013591508082111561345257600080fd5b5061345f89828a01613364565b979a9699509497509295939492505050565b600061012063ffffffff8c16835267ffffffffffffffff808c166020850152808b166040850152508860030b60608401528760030b60808401528060a08401526134bd8184018861323e565b905082810360c08401526134d1818761323e565b905082810360e08401526134e5818661323e565b90508281036101008401526134fa818561323e565b9c9b505050505050505050505050565b60006020828403121561351c57600080fd5b813561182381613296565b60006020828403121561353957600080fd5b813567ffffffffffffffff81111561355057600080fd5b8201610120818503121561182357600080fd5b60008083601f84011261357557600080fd5b50813567ffffffffffffffff81111561358d57600080fd5b60208301915083602082850101111561335d57600080fd5b6000806000806000606086880312156135bd57600080fd5b853567ffffffffffffffff808211156135d557600080fd5b6135e189838a01613563565b909750955060208801359150808211156135fa57600080fd5b5061360788828901613563565b909450925050604086013561361b81613296565b809150509295509295909350565b6000610100828403121561363c57600080fd5b50919050565b80151581146131f257600080fd5b803561365b81613642565b919050565b6000806040838503121561367357600080fd5b823561367e81613296565b9150602083013561368e81613642565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156136d8576136d8613699565b604052919050565b600067ffffffffffffffff8211156136fa576136fa613699565b50601f01601f191660200190565b6000806000806080858703121561371e57600080fd5b843561372981613296565b9350602085013561373981613296565b925060408501359150606085013567ffffffffffffffff81111561375c57600080fd5b8501601f8101871361376d57600080fd5b803561378061377b826136e0565b6136af565b81815288602083850101111561379557600080fd5b8160208401602083013760006020838301015280935050505092959194509250565b600080604083850312156137ca57600080fd5b82356137d581613296565b9150602083013561368e81613296565b600181811c908216806137f957607f821691505b6020821081141561363c57634e487b7160e01b600052602260045260246000fd5b60006020828403121561382c57600080fd5b815161182381613296565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561385f57600080fd5b813560ff8116811461182357600080fd5b634e487b7160e01b600052601160045260246000fd5b6000821982111561389957613899613870565b500190565b600080858511156138ae57600080fd5b838611156138bb57600080fd5b505060a083020193919092039150565b60006000198214156138df576138df613870565b5060010190565b63ffffffff811681146131f257600080fd5b67ffffffffffffffff811681146131f257600080fd5b6000813561055f816138f8565b8060030b81146131f257600080fd5b6000813561055f8161391b565b6000808335601e1984360301811261394e57600080fd5b83018035915067ffffffffffffffff82111561396957600080fd5b60200191503681900382131561335d57600080fd5b601f8211156107a257600081815260208120601f850160051c810160208610156139a55750805b601f850160051c820191505b81811015611206578281556001016139b1565b67ffffffffffffffff8311156139dc576139dc613699565b6139f0836139ea83546137e5565b8361397e565b6000601f841160018114613a245760008515613a0c5750838201355b600019600387901b1c1916600186901b178355612b80565b600083815260209020601f19861690835b82811015613a555786850135825560209485019460019092019101613a35565b5086821015613a725760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b8135613a8f816138e6565b63ffffffff811663ffffffff1983541617825550613adc613ab26020840161390e565b82546bffffffffffffffff00000000191660209190911b6bffffffffffffffff0000000016178255565b613b30613aeb6040840161390e565b82547fffffffffffffffffffffffff0000000000000000ffffffffffffffffffffffff1660609190911b73ffffffffffffffff00000000000000000000000016178255565b613b8b613b3f6060840161392a565b8280548260a01b77ffffffff0000000000000000000000000000000000000000167fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff8216178255505050565b613bea613b9a6080840161392a565b8280548260c01b7bffffffff000000000000000000000000000000000000000000000000167fffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff8216178255505050565b613bf760a0830183613937565b613c058183600186016139c4565b5050613c1460c0830183613937565b613c228183600286016139c4565b5050613c3160e0830183613937565b613c3f8183600386016139c4565b5050613c4f610100830183613937565b6117278183600486016139c4565b803561365b816138e6565b803561365b816138f8565b803561365b8161391b565b6000808335601e19843603018112613c9557600080fd5b830160208101925035905067ffffffffffffffff811115613cb557600080fd5b80360383131561335d57600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60208152613d0b60208201613d0184613c5d565b63ffffffff169052565b6000613d1960208401613c68565b67ffffffffffffffff8116604084015250613d3660408401613c68565b67ffffffffffffffff8116606084015250613d5360608401613c73565b613d62608084018260030b9052565b50613d6f60808401613c73565b613d7e60a084018260030b9052565b50613d8c60a0840184613c7e565b6101208060c0860152613da461014086018385613cc4565b9250613db360c0870187613c7e565b9250601f19808786030160e0880152613dcd858584613cc4565b9450613ddc60e0890189613c7e565b94509150610100818887030181890152613df7868685613cc4565b9550613e05818a018a613c7e565b955092505080878603018388015250613e1f848483613cc4565b979650505050505050565b6000813561055f81613642565b8135613e42816138f8565b67ffffffffffffffff8116905081548167ffffffffffffffff1982161783556020840135613e6f81613296565b7bffffffffffffffffffffffffffffffffffffffff00000000000000008160401b168363ffffffff60e01b841617178455505050613eeb613eb260408401613e2a565b8280547fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff1691151560e01b60ff60e01b16919091179055565b613f33613efa60608401613e2a565b8280547fffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1691151560e81b60ff60e81b16919091179055565b613f7b613f4260808401613e2a565b8280547fff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1691151560f01b60ff60f01b16919091179055565b613fde613f8a60a08401613e2a565b8280547effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1691151560f81b7fff0000000000000000000000000000000000000000000000000000000000000016919091179055565b60018101614005613ff160c08501613e2a565b825490151560ff1660ff1991909116178255565b6107a261401460e08501613e2a565b82805461ff00191691151560081b61ff0016919091179055565b6101008101823561403e816138f8565b67ffffffffffffffff168252602083013561405881613296565b6001600160a01b03166020830152604083013561407481613642565b1515604083015261408760608401613650565b1515606083015261409a60808401613650565b151560808301526140ad60a08401613650565b151560a08301526140c060c08401613650565b151560c08301526140d360e08401613650565b80151560e08401525092915050565b600084516140f4818460208901613212565b845190830190614108818360208901613212565b602f60f81b91019081528351614125816001840160208801613212565b0160010195945050505050565b600067ffffffffffffffff8381169083168181101561415357614153613870565b039392505050565b600067ffffffffffffffff80831681851680830382111561417e5761417e613870565b01949350505050565b803564ffffffffff8116811461365b57600080fd5b8183526000602080850194508260005b85811015614224578135875282820135838801526040808301356141cf81613296565b6001600160a01b0316908801526060828101356141eb816138f8565b67ffffffffffffffff1690880152608064ffffffffff61420c848301614187565b169088015260a09687019691909101906001016141ac565b509495945050505050565b6001600160a01b038416815260406020820152600061425260408301848661419c565b95945050505050565b6000806040838503121561426e57600080fd5b505080516020909101519092909150565b60608152600061429360608301868861419c565b6020830194909452506040015292915050565b6000602082840312156142b857600080fd5b815167ffffffffffffffff8111156142cf57600080fd5b8201601f810184136142e057600080fd5b80516142ee61377b826136e0565b81815285602083850101111561430357600080fd5b614252826020830160208601613212565b634e487b7160e01b600052601260045260246000fd5b60008261433957614339614314565b500490565b60008282101561435057614350613870565b500390565b60008261436457614364614314565b500690565b60006020828403121561437b57600080fd5b8135611823816138f8565b600060a0828403121561439857600080fd5b60405160a0810181811067ffffffffffffffff821117156143bb576143bb613699565b8060405250823581526020830135602082015260408301356143dc81613296565b604082015260608301356143ef816138f8565b606082015261440060808401614187565b60808201529392505050565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261443e608083018461323e565b9695505050505050565b60006020828403121561445a57600080fd5b8151611823816131dc56fea164736f6c634300080c000a

Block Transaction 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

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.