ETH Price: $1,930.73 (-4.16%)
Gas: 0.04 Gwei
 

Overview

ETH Balance

0.75 ETH

Eth Value

$1,448.05 (@ $1,930.73/ETH)

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer Ownersh...156366862022-09-29 4:42:231247 days ago1664426543IN
0xA1077C79...ACA8a2A70
0 ETH0.000284649.94449204
Mint150626912022-07-02 10:54:051336 days ago1656759245IN
0xA1077C79...ACA8a2A70
0.5 ETH0.002092947.40343
Mint144877892022-03-30 13:24:201430 days ago1648646660IN
0xA1077C79...ACA8a2A70
0.25 ETH0.0010977933.815774
Mint144877892022-03-30 13:24:201430 days ago1648646660IN
0xA1077C79...ACA8a2A70
0.25 ETH0.0010977933.815774
Mint144877892022-03-30 13:24:201430 days ago1648646660IN
0xA1077C79...ACA8a2A70
0.25 ETH0.0010977933.815774
Mint144877892022-03-30 13:24:201430 days ago1648646660IN
0xA1077C79...ACA8a2A70
0.25 ETH0.00562433.815774
Set Base Token U...144032992022-03-17 9:47:061443 days ago1647510426IN
0xA1077C79...ACA8a2A70
0 ETH0.0008375217.12868078
Set Base Token U...139456562022-01-05 13:19:361514 days ago1641388776IN
0xA1077C79...ACA8a2A70
0 ETH0.00528382108.06242952
Set Base Token U...139396362022-01-04 14:58:551515 days ago1641308335IN
0xA1077C79...ACA8a2A70
0 ETH0.0053938498.97695122
Withdraw139382752022-01-04 9:41:251515 days ago1641289285IN
0xA1077C79...ACA8a2A70
0 ETH0.0137470769.69543097
Mint139378062022-01-04 8:02:191515 days ago1641283339IN
0xA1077C79...ACA8a2A70
0.4 ETH0.0019637260.48937496
Set Base Token U...139341112022-01-03 18:30:101516 days ago1641234610IN
0xA1077C79...ACA8a2A70
0 ETH0.00749115104.6483959
Set Base Token U...139341082022-01-03 18:29:551516 days ago1641234595IN
0xA1077C79...ACA8a2A70
0 ETH0.00837153100.74774779
Mint139338542022-01-03 17:33:321516 days ago1641231212IN
0xA1077C79...ACA8a2A70
0.2 ETH0.00374144104.12566617
Mint139320552022-01-03 10:55:561516 days ago1641207356IN
0xA1077C79...ACA8a2A70
0.25 ETH0.0114356369.93718493
Mint139317342022-01-03 9:39:001516 days ago1641202740IN
0xA1077C79...ACA8a2A70
0.25 ETH0.0131228580.25572198
Mint139310812022-01-03 7:06:441516 days ago1641193604IN
0xA1077C79...ACA8a2A70
0.25 ETH0.0132235579.51003567
Mint139284042022-01-02 21:15:461517 days ago1641158146IN
0xA1077C79...ACA8a2A70
0.25 ETH0.02332418142.65469442
Mint139138872021-12-31 15:21:521519 days ago1640964112IN
0xA1077C79...ACA8a2A70
0.25 ETH0.0132525579.68439252
Mint139138862021-12-31 15:21:201519 days ago1640964080IN
0xA1077C79...ACA8a2A70
0.25 ETH0.0116271671.10852221
Mint139138842021-12-31 15:21:031519 days ago1640964063IN
0xA1077C79...ACA8a2A70
0.75 ETH0.0311979178.76808974
Mint139138832021-12-31 15:20:561519 days ago1640964056IN
0xA1077C79...ACA8a2A70
0.25 ETH0.013204280.75325557
Mint139138812021-12-31 15:20:341519 days ago1640964034IN
0xA1077C79...ACA8a2A70
0.75 ETH0.0329382283.1620114
Mint139138802021-12-31 15:20:171519 days ago1640964017IN
0xA1077C79...ACA8a2A70
0.5 ETH0.0214213776.53253006
Mint139138792021-12-31 15:20:091519 days ago1640964009IN
0xA1077C79...ACA8a2A70
0.75 ETH0.0328232182.87163704
View all transactions

Latest 22 internal transactions

Advanced mode:
Parent Transaction Hash Method Block
From
To
-139382752022-01-04 9:41:251515 days ago1641289285
0xA1077C79...ACA8a2A70
138.48282 ETH
-139382752022-01-04 9:41:251515 days ago1641289285
0xA1077C79...ACA8a2A70
39.56652 ETH
-139382752022-01-04 9:41:251515 days ago1641289285
0xA1077C79...ACA8a2A70
32.9721 ETH
-139382752022-01-04 9:41:251515 days ago1641289285
0xA1077C79...ACA8a2A70
32.9721 ETH
-139382752022-01-04 9:41:251515 days ago1641289285
0xA1077C79...ACA8a2A70
36.26931 ETH
-139382752022-01-04 9:41:251515 days ago1641289285
0xA1077C79...ACA8a2A70
75.83583 ETH
-139382752022-01-04 9:41:251515 days ago1641289285
0xA1077C79...ACA8a2A70
65.9442 ETH
-139382752022-01-04 9:41:251515 days ago1641289285
0xA1077C79...ACA8a2A70
32.9721 ETH
-139382752022-01-04 9:41:251515 days ago1641289285
0xA1077C79...ACA8a2A70
65.9442 ETH
-139382752022-01-04 9:41:251515 days ago1641289285
0xA1077C79...ACA8a2A70
138.48282 ETH
-139382752022-01-04 9:41:251515 days ago1641289285
0xA1077C79...ACA8a2A70
125.608 ETH
-138810542021-12-26 13:19:471524 days ago1640524787
0xA1077C79...ACA8a2A70
31.94604 ETH
-138810542021-12-26 13:19:471524 days ago1640524787
0xA1077C79...ACA8a2A70
9.12744 ETH
-138810542021-12-26 13:19:471524 days ago1640524787
0xA1077C79...ACA8a2A70
7.6062 ETH
-138810542021-12-26 13:19:471524 days ago1640524787
0xA1077C79...ACA8a2A70
7.6062 ETH
-138810542021-12-26 13:19:471524 days ago1640524787
0xA1077C79...ACA8a2A70
8.36682 ETH
-138810542021-12-26 13:19:471524 days ago1640524787
0xA1077C79...ACA8a2A70
17.49426 ETH
-138810542021-12-26 13:19:471524 days ago1640524787
0xA1077C79...ACA8a2A70
15.2124 ETH
-138810542021-12-26 13:19:471524 days ago1640524787
0xA1077C79...ACA8a2A70
7.6062 ETH
-138810542021-12-26 13:19:471524 days ago1640524787
0xA1077C79...ACA8a2A70
15.2124 ETH
-138810542021-12-26 13:19:471524 days ago1640524787
0xA1077C79...ACA8a2A70
31.94604 ETH
-138810542021-12-26 13:19:471524 days ago1640524787
0xA1077C79...ACA8a2A70
28.976 ETH
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BoxingBoyzTokenFactory

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";

import "../../../../infrastructure/authentication/IAuthenticator.sol";
import "../../ERC20/retriever/TokenRetriever.sol";
import "./IBoxingBoyzToken.sol";


/// @title BoxingBoyz Token Factory 
/// @dev Non-fungible token (ERC721) factory that mints BoxingBoyz tokens
/// @author Frank Bonnet - <[email protected]>
contract BoxingBoyzTokenFactory is Ownable, TokenRetriever {

    enum Stages {
        Initializing,
        Deploying,
        Deployed
    }

    /**
     *  Storage
     */
    uint constant MAX_SUPPLY = 10_000;
    uint constant MAX_MINT_PER_CALL = 3;
    uint constant MAX_MINT_PER_ADDRESS = 3;
    uint constant MINT_FEE_PRIVATE = 0.2 ether;
    uint constant MINT_FEE_PUBLIC = 0.25 ether;
    uint constant PERCENTAGE_DENOMINATOR = 10_000;

    // Authentication
    address private whitelist;

    // Beneficiary
    address payable public beneficiary; 

    // Stakeholders
    mapping (address => uint) public stakeholders;
    address[] private stakeholdersIndex;

     // State
    uint public start;
    Stages public stage;
    address public token;
    bool public isPublic;

    /**
     * Modifiers
     */
    /// @dev Throw if at stage other than current stage
    /// @param _stage expected stage to test for
    modifier atStage(Stages _stage) {
        require(stage == _stage, "In wrong stage");
        _;
    }
    

    /// @dev Throw sender isn't a stakeholders
    modifier onlyStakeholders() {
        require(stakeholders[msg.sender] > 0, "Only stakeholders");
        _;
    }


    /**
     * Public Functions
     */
    /// @dev Start in the Initializing stage
    constructor() {
        stage = Stages.Initializing;
    }


    /// @dev Setup stakeholders
    /// @param _stakeholders The addresses of the stakeholders (first stakeholder is the beneficiary)
    /// @param _percentages The percentages of the stakeholders 
    function setupStakeholders(address payable[] calldata _stakeholders, uint[] calldata _percentages) public onlyOwner atStage(Stages.Initializing) {
        require(stakeholdersIndex.length == 0, "Stakeholders already setup");
        
        // First stakeholder is expected to be the beneficiary
        beneficiary = _stakeholders[0]; 

        uint total = 0;
        for (uint i = 0; i < _stakeholders.length; i++) {
            stakeholdersIndex.push(_stakeholders[i]);
            stakeholders[_stakeholders[i]] = _percentages[i];
            total += _percentages[i];
        }

        require(total == PERCENTAGE_DENOMINATOR, "Stakes should add up to 100%");
    }


    /// @dev Initialize the factory
    /// @param _start The timestamp of the start date
    /// @param _token The token that is minted
    /// @param _whitelist The address of the whitelist authenticator
    function initialize(uint _start, address _token, address _whitelist) public onlyOwner atStage(Stages.Initializing) {
        require(stakeholdersIndex.length > 0, "Setup stakeholders first");
        token = _token;
        start = _start;
        whitelist = _whitelist;
        isPublic = false;
        stage = Stages.Deploying;
    }


    /// @dev Premint for givaways etc
    /// @param _numberOfItemsToMint Number of items to mint
    /// @param _toAddress Receiving address
    function premint(uint _numberOfItemsToMint, address _toAddress) public onlyOwner atStage(Stages.Deploying) {
        for (uint i = 0; i < _numberOfItemsToMint; i++) {
            IBoxingBoyzToken(token).mintTo(_toAddress);
        }
    }


    /// @dev Deploy the contract (setup is final)
    function deploy() public onlyOwner atStage(Stages.Deploying) {
        stage = Stages.Deployed;
    }


    /// @dev Set contract URI
    /// @param _uri Location to contract info
    function setContractURI(string memory _uri) public onlyOwner {
        IBoxingBoyzToken(token).setContractURI(_uri);
    }


    /// @dev Set base token URI 
    /// @param _uri Base of location where token data is stored. To be postfixed with tokenId
    function setBaseTokenURI(string memory _uri) public onlyOwner {
        IBoxingBoyzToken(token).setBaseTokenURI(_uri);
    }


    /// @dev Starts the public sale - In the public sale the whitelist check is ommited and the public mint fee is used
    function makePublic() public onlyOwner {
        isPublic = true;
    }


    /// @dev Mint `_numberOfItemsToMint` items to to `_toAddress`
    /// @param _numberOfItemsToMint Number of items to mint
    /// @param _toAddress Address to mint to
    function mint(uint _numberOfItemsToMint, address _toAddress) public payable atStage(Stages.Deployed) {
        require(canMint(_numberOfItemsToMint), "Unable to mint items");
        require(_canPayMintFee(_numberOfItemsToMint, msg.value), "Unable to pay");

        if (_numberOfItemsToMint == 1) {
            IBoxingBoyzToken(token).mintTo(_toAddress);
        } else if (_numberOfItemsToMint > 1 && _numberOfItemsToMint <= MAX_MINT_PER_CALL) {
            for (uint i = 0; i < _numberOfItemsToMint; i++) {
                IBoxingBoyzToken(token).mintTo(_toAddress);
            }
        }
    }


    /// @dev Returns if it's still possible to mint `_numberOfItemsToMint`
    /// @param _numberOfItemsToMint Number of items to mint
    /// @return If the items can be minted
    function canMint(uint _numberOfItemsToMint) public view returns (bool) {
        
        // Enforce started rule
        if (block.timestamp < start){
            return false;
        }

        // Enforce max per call rule
        if (_numberOfItemsToMint > MAX_MINT_PER_CALL) {
            return false;
        }

        // Authenticate
        if (!isPublic && !IAuthenticator(whitelist).authenticate(msg.sender))
        {
            return false;
        }

        // Enforce max per address rule
        if ((IERC721Enumerable(token).balanceOf(msg.sender) + _numberOfItemsToMint) > MAX_MINT_PER_ADDRESS) {
            return false;
        }

        // Enforce max token rule
        return IERC721Enumerable(token).totalSupply() <= (MAX_SUPPLY - _numberOfItemsToMint);
    }


    /// @dev Returns true if the call has enough ether to pay the minting fee
    /// @param _numberOfItemsToMint Number of items to mint
    /// @return If the minting fee can be payed
    function canPayMintFee(uint _numberOfItemsToMint) public view returns (bool) {
        return _canPayMintFee(_numberOfItemsToMint, address(msg.sender).balance);
    }


    /// @dev Returns the ether amount needed to pay the minting fee
    /// @param _numberOfItemsToMint Number of items to mint
    /// @return Ether amount needed to pay the minting fee
    function getMintFee(uint _numberOfItemsToMint) public view returns (uint) {
        return _getMintFee(_numberOfItemsToMint);
    }


    /// @dev Allows the beneficiary to withdraw 
    function withdraw() public onlyStakeholders {
        uint balance = address(this).balance;
        for (uint i = 0; i < stakeholdersIndex.length; i++)
        {
            payable(stakeholdersIndex[i]).transfer(
                balance * stakeholders[stakeholdersIndex[i]] / PERCENTAGE_DENOMINATOR);
        }
    }


    /// @dev Failsafe mechanism
    /// Allows the owner to retrieve tokens from the contract that 
    /// might have been send there by accident
    /// @param _tokenContract The address of ERC20 compatible token
    function retrieveTokens(address _tokenContract) override public onlyOwner {
        super.retrieveTokens(_tokenContract);

        // Retrieve tokens from our token contract
        ITokenRetriever(address(token)).retrieveTokens(_tokenContract);
    }


    /// @dev Failsafe and clean-up mechanism
    /// Makes the token URI's perminant since the factory is it's only owner
    function destroy() public onlyOwner {
        selfdestruct(beneficiary);
    }


    /**
     * Internal Functions
     */
    /// @dev Returns if the call has enough ether to pay the minting fee
    /// @param _numberOfItemsToMint Number of items to mint
    /// @param _received The amount that was received
    /// @return If the minting fee can be payed
    function _canPayMintFee(uint _numberOfItemsToMint, uint _received) internal view returns (bool) {
        return _received >= _getMintFee(_numberOfItemsToMint);
    }


    /// @dev Returns the ether amount needed to pay the minting fee
    /// @param _numberOfItemsToMint Number of items to mint
    /// @return Ether amount needed to pay the minting fee
    function _getMintFee(uint _numberOfItemsToMint) internal view returns (uint) {
        return (isPublic ? MINT_FEE_PUBLIC : MINT_FEE_PRIVATE) * _numberOfItemsToMint;
    }
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _setOwner(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

// SPDX-License-Identifier: MIT

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 `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, 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 `sender` to `recipient` 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 sender,
        address recipient,
        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);
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, 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;
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

// SPDX-License-Identifier: ISC
pragma solidity ^0.8.0 <0.9.0;


/// @title IAuthenticator
/// @dev Authenticator interface
/// @author Frank Bonnet - <[email protected]>
interface IAuthenticator {
    

    /// @dev Authenticate 
    /// Returns whether `_account` is authenticated
    /// @param _account The account to authenticate
    /// @return whether `_account` is successfully authenticated
    function authenticate(address _account) external view returns (bool);
}

// SPDX-License-Identifier: ISC
pragma solidity ^0.8.0 <0.9.0;

/**
 * ITokenRetriever
 *
 * Allows tokens to be retrieved from a contract
 *
 * #created 29/09/2017
 * #author Frank Bonnet
 */
interface ITokenRetriever {

    /**
     * Extracts tokens from the contract
     *
     * @param _tokenContract The address of ERC20 compatible token
     */
    function retrieveTokens(address _tokenContract) external;
}

// SPDX-License-Identifier: ISC
pragma solidity ^0.8.0 <0.9.0;

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

/**
 * TokenRetriever
 *
 * Allows tokens to be retrieved from a contract
 *
 * #created 31/12/2021
 * #author Frank Bonnet
 */
contract TokenRetriever is ITokenRetriever {

    /**
     * Extracts tokens from the contract
     *
     * @param _tokenContract The address of ERC20 compatible token
     */
    function retrieveTokens(address _tokenContract) override virtual public {
        IERC20 tokenInstance = IERC20(_tokenContract);
        uint tokenBalance = tokenInstance.balanceOf(address(this));
        if (tokenBalance > 0) {
            tokenInstance.transfer(msg.sender, tokenBalance);
        }
    }
}

// SPDX-License-Identifier: ISC
pragma solidity ^0.8.0 <0.9.0;


/// @title BoxingBoyz Token
/// @dev Non-fungible token (ERC721) 
/// @author Frank Bonnet - <[email protected]>
interface IBoxingBoyzToken {


    /**
     * Public functions
     */
    /// @dev Initializes the token contract
    /// @param _proxyRegistry Whitelist for easy trading
    /// @param _initialContractURI Location to contract info
    /// @param _initialBaseTokenURI Base of location where token data is stored. To be postfixed with tokenId
    function initialize(
        address _proxyRegistry, 
        string calldata _initialContractURI, 
        string calldata _initialBaseTokenURI) external;


    /// @dev Get contract URI
    /// @return Location to contract info
    function getContractURI() external view returns (string memory);


    /// @dev Set contract URI
    /// @param _uri Location to contract info
    function setContractURI(string memory _uri) external;


    /// @dev Get base token URI 
    /// @return Base of location where token data is stored. To be postfixed with tokenId
    function getBaseTokenURI() external view returns (string memory);


    /// @dev Set base token URI 
    /// @param _uri Base of location where token data is stored. To be postfixed with tokenId
    function setBaseTokenURI(string memory _uri) external;


    /// @dev getTokenURI() postfixed with the token ID baseTokenURI(){tokenID}
    /// @param _tokenId Token ID
    /// @return Location where token data is stored
    function getTokenURI(uint _tokenId) external view returns (string memory);

    /// @dev Mints a token to an address with a tokenURI.
    /// @param _to address of the future owner of the token
    function mintTo(address _to) external;
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"beneficiary","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_numberOfItemsToMint","type":"uint256"}],"name":"canMint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_numberOfItemsToMint","type":"uint256"}],"name":"canPayMintFee","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deploy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"destroy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_numberOfItemsToMint","type":"uint256"}],"name":"getMintFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_start","type":"uint256"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_whitelist","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isPublic","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"makePublic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_numberOfItemsToMint","type":"uint256"},{"internalType":"address","name":"_toAddress","type":"address"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_numberOfItemsToMint","type":"uint256"},{"internalType":"address","name":"_toAddress","type":"address"}],"name":"premint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenContract","type":"address"}],"name":"retrieveTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setBaseTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable[]","name":"_stakeholders","type":"address[]"},{"internalType":"uint256[]","name":"_percentages","type":"uint256[]"}],"name":"setupStakeholders","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stage","outputs":[{"internalType":"enum BoxingBoyzTokenFactory.Stages","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stakeholders","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"start","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b5061001a33610029565b6006805460ff19169055610079565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6116f7806100886000396000f3fe6080604052600436106101405760003560e01c80638da5cb5b116100b6578063c040e6b81161006f578063c040e6b81461035d578063c07cfca914610384578063dc9a1535146103b1578063f2fde38b146103d2578063fc018c05146103f2578063fc0c546a1461040757600080fd5b80638da5cb5b146102b6578063938e3d7b146102d457806394bf804d146102f4578063ac4ddd9f14610307578063b4988fd014610327578063be9a65551461034757600080fd5b8063538dba3e11610108578063538dba3e146102075780635dd871a3146102275780636735363114610257578063715018a614610277578063775c300c1461028c57806383197ef0146102a157600080fd5b806314a2cf161461014557806329524ba81461016757806330176e131461019a57806338af3eed146101ba5780633ccfd60b146101f2575b600080fd5b34801561015157600080fd5b5061016561016036600461134c565b61042c565b005b34801561017357600080fd5b5061018761018236600461147f565b6106d9565b6040519081526020015b60405180910390f35b3480156101a657600080fd5b506101656101b53660046113d5565b6106ea565b3480156101c657600080fd5b506002546101da906001600160a01b031681565b6040516001600160a01b039091168152602001610191565b3480156101fe57600080fd5b5061016561077d565b34801561021357600080fd5b506101656102223660046114af565b6108b9565b34801561023357600080fd5b5061024761024236600461147f565b6109b1565b6040519015158152602001610191565b34801561026357600080fd5b5061024761027236600461147f565b610bab565b34801561028357600080fd5b50610165610bb8565b34801561029857600080fd5b50610165610bee565b3480156102ad57600080fd5b50610165610c6d565b3480156102c257600080fd5b506000546001600160a01b03166101da565b3480156102e057600080fd5b506101656102ef3660046113d5565b610ca5565b6101656103023660046114af565b610d03565b34801561031357600080fd5b50610165610322366004611329565b610eeb565b34801561033357600080fd5b506101656103423660046114de565b610f56565b34801561035357600080fd5b5061018760055481565b34801561036957600080fd5b506006546103779060ff1681565b604051610191919061151f565b34801561039057600080fd5b5061018761039f366004611329565b60036020526000908152604090205481565b3480156103bd57600080fd5b5060065461024790600160a81b900460ff1681565b3480156103de57600080fd5b506101656103ed366004611329565b611064565b3480156103fe57600080fd5b506101656110ff565b34801561041357600080fd5b506006546101da9061010090046001600160a01b031681565b6000546001600160a01b0316331461045f5760405162461bcd60e51b81526004016104569061159a565b60405180910390fd5b60008060065460ff16600281111561048757634e487b7160e01b600052602160045260246000fd5b146104a45760405162461bcd60e51b8152600401610456906115cf565b600454156104f45760405162461bcd60e51b815260206004820152601a60248201527f5374616b65686f6c6465727320616c72656164792073657475700000000000006044820152606401610456565b8484600081811061051557634e487b7160e01b600052603260045260246000fd5b905060200201602081019061052a9190611329565b600280546001600160a01b0319166001600160a01b03929092169190911790556000805b8581101561067f57600487878381811061057857634e487b7160e01b600052603260045260246000fd5b905060200201602081019061058d9190611329565b81546001810183556000928352602090922090910180546001600160a01b0319166001600160a01b039092169190911790558484828181106105df57634e487b7160e01b600052603260045260246000fd5b905060200201356003600089898581811061060a57634e487b7160e01b600052603260045260246000fd5b905060200201602081019061061f9190611329565b6001600160a01b0316815260208101919091526040016000205584848281811061065957634e487b7160e01b600052603260045260246000fd5b905060200201358261066b91906115f7565b91508061067781611665565b91505061054e565b5061271081146106d15760405162461bcd60e51b815260206004820152601c60248201527f5374616b65732073686f756c642061646420757020746f2031303025000000006044820152606401610456565b505050505050565b60006106e48261113e565b92915050565b6000546001600160a01b031633146107145760405162461bcd60e51b81526004016104569061159a565b6006546040516330176e1360e01b81526101009091046001600160a01b0316906330176e1390610748908490600401611547565b600060405180830381600087803b15801561076257600080fd5b505af1158015610776573d6000803e3d6000fd5b5050505050565b336000908152600360205260409020546107cd5760405162461bcd60e51b81526020600482015260116024820152704f6e6c79207374616b65686f6c6465727360781b6044820152606401610456565b4760005b6004548110156108b557600481815481106107fc57634e487b7160e01b600052603260045260246000fd5b6000918252602082200154600480546001600160a01b03909216926108fc9261271092600392918790811061084157634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b03168352820192909252604001902054610870908661162f565b61087a919061160f565b6040518115909202916000818181858888f193505050501580156108a2573d6000803e3d6000fd5b50806108ad81611665565b9150506107d1565b5050565b6000546001600160a01b031633146108e35760405162461bcd60e51b81526004016104569061159a565b60018060065460ff16600281111561090b57634e487b7160e01b600052602160045260246000fd5b146109285760405162461bcd60e51b8152600401610456906115cf565b60005b838110156109ab5760065460405163755edd1760e01b81526001600160a01b0385811660048301526101009092049091169063755edd1790602401600060405180830381600087803b15801561098057600080fd5b505af1158015610994573d6000803e3d6000fd5b5050505080806109a390611665565b91505061092b565b50505050565b60006005544210156109c557506000919050565b60038211156109d657506000919050565b600654600160a81b900460ff16158015610a6857506001546040516308e0d29d60e01b81523360048201526001600160a01b03909116906308e0d29d9060240160206040518083038186803b158015610a2e57600080fd5b505afa158015610a42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6691906113b5565b155b15610a7557506000919050565b6006546040516370a0823160e01b815233600482015260039184916101009091046001600160a01b0316906370a082319060240160206040518083038186803b158015610ac157600080fd5b505afa158015610ad5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af99190611497565b610b0391906115f7565b1115610b1157506000919050565b610b1d8261271061164e565b600660019054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b6b57600080fd5b505afa158015610b7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba39190611497565b111592915050565b60006106e4823331611176565b6000546001600160a01b03163314610be25760405162461bcd60e51b81526004016104569061159a565b610bec600061118b565b565b6000546001600160a01b03163314610c185760405162461bcd60e51b81526004016104569061159a565b60018060065460ff166002811115610c4057634e487b7160e01b600052602160045260246000fd5b14610c5d5760405162461bcd60e51b8152600401610456906115cf565b506006805460ff19166002179055565b6000546001600160a01b03163314610c975760405162461bcd60e51b81526004016104569061159a565b6002546001600160a01b0316ff5b6000546001600160a01b03163314610ccf5760405162461bcd60e51b81526004016104569061159a565b60065460405163938e3d7b60e01b81526101009091046001600160a01b03169063938e3d7b90610748908490600401611547565b60028060065460ff166002811115610d2b57634e487b7160e01b600052602160045260246000fd5b14610d485760405162461bcd60e51b8152600401610456906115cf565b610d51836109b1565b610d945760405162461bcd60e51b8152602060048201526014602482015273556e61626c6520746f206d696e74206974656d7360601b6044820152606401610456565b610d9e8334611176565b610dda5760405162461bcd60e51b815260206004820152600d60248201526c556e61626c6520746f2070617960981b6044820152606401610456565b8260011415610e4d5760065460405163755edd1760e01b81526001600160a01b0384811660048301526101009092049091169063755edd1790602401600060405180830381600087803b158015610e3057600080fd5b505af1158015610e44573d6000803e3d6000fd5b50505050505050565b600183118015610e5e575060038311155b15610ee65760005b838110156109ab5760065460405163755edd1760e01b81526001600160a01b0385811660048301526101009092049091169063755edd1790602401600060405180830381600087803b158015610ebb57600080fd5b505af1158015610ecf573d6000803e3d6000fd5b505050508080610ede90611665565b915050610e66565b505050565b6000546001600160a01b03163314610f155760405162461bcd60e51b81526004016104569061159a565b610f1e816111db565b60065460405163ac4ddd9f60e01b81526001600160a01b0383811660048301526101009092049091169063ac4ddd9f90602401610748565b6000546001600160a01b03163314610f805760405162461bcd60e51b81526004016104569061159a565b60008060065460ff166002811115610fa857634e487b7160e01b600052602160045260246000fd5b14610fc55760405162461bcd60e51b8152600401610456906115cf565b6004546110145760405162461bcd60e51b815260206004820152601860248201527f5365747570207374616b65686f6c6465727320666972737400000000000000006044820152606401610456565b5060068054600594909455600180546001600160a01b039384166001600160a01b0319909116178155929091166101000260ff60ff60a81b0119166001600160b01b031990931692909217179055565b6000546001600160a01b0316331461108e5760405162461bcd60e51b81526004016104569061159a565b6001600160a01b0381166110f35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610456565b6110fc8161118b565b50565b6000546001600160a01b031633146111295760405162461bcd60e51b81526004016104569061159a565b6006805460ff60a81b1916600160a81b179055565b6006546000908290600160a81b900460ff16611162576702c68af0bb14000061116c565b6703782dace9d900005b6106e4919061162f565b60006111818361113e565b9091101592915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516370a0823160e01b815230600482015281906000906001600160a01b038316906370a082319060240160206040518083038186803b15801561121f57600080fd5b505afa158015611233573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112579190611497565b90508015610ee65760405163a9059cbb60e01b8152336004820152602481018290526001600160a01b0383169063a9059cbb90604401602060405180830381600087803b1580156112a757600080fd5b505af11580156112bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ab91906113b5565b60008083601f8401126112f0578081fd5b50813567ffffffffffffffff811115611307578182fd5b6020830191508360208260051b850101111561132257600080fd5b9250929050565b60006020828403121561133a578081fd5b8135611345816116ac565b9392505050565b60008060008060408587031215611361578283fd5b843567ffffffffffffffff80821115611378578485fd5b611384888389016112df565b9096509450602087013591508082111561139c578384fd5b506113a9878288016112df565b95989497509550505050565b6000602082840312156113c6578081fd5b81518015158114611345578182fd5b6000602082840312156113e6578081fd5b813567ffffffffffffffff808211156113fd578283fd5b818401915084601f830112611410578283fd5b81358181111561142257611422611696565b604051601f8201601f19908116603f0116810190838211818310171561144a5761144a611696565b81604052828152876020848701011115611462578586fd5b826020860160208301379182016020019490945295945050505050565b600060208284031215611490578081fd5b5035919050565b6000602082840312156114a8578081fd5b5051919050565b600080604083850312156114c1578182fd5b8235915060208301356114d3816116ac565b809150509250929050565b6000806000606084860312156114f2578283fd5b833592506020840135611504816116ac565b91506040840135611514816116ac565b809150509250925092565b602081016003831061154157634e487b7160e01b600052602160045260246000fd5b91905290565b6000602080835283518082850152825b8181101561157357858101830151858201604001528201611557565b818111156115845783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600e908201526d496e2077726f6e6720737461676560901b604082015260600190565b6000821982111561160a5761160a611680565b500190565b60008261162a57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561164957611649611680565b500290565b60008282101561166057611660611680565b500390565b600060001982141561167957611679611680565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146110fc57600080fdfea2646970667358221220559d1a641b973d9f9b03be120bdf562f757e0e6100f91ec6057aea1de6326fa364736f6c63430008040033

Deployed Bytecode

0x6080604052600436106101405760003560e01c80638da5cb5b116100b6578063c040e6b81161006f578063c040e6b81461035d578063c07cfca914610384578063dc9a1535146103b1578063f2fde38b146103d2578063fc018c05146103f2578063fc0c546a1461040757600080fd5b80638da5cb5b146102b6578063938e3d7b146102d457806394bf804d146102f4578063ac4ddd9f14610307578063b4988fd014610327578063be9a65551461034757600080fd5b8063538dba3e11610108578063538dba3e146102075780635dd871a3146102275780636735363114610257578063715018a614610277578063775c300c1461028c57806383197ef0146102a157600080fd5b806314a2cf161461014557806329524ba81461016757806330176e131461019a57806338af3eed146101ba5780633ccfd60b146101f2575b600080fd5b34801561015157600080fd5b5061016561016036600461134c565b61042c565b005b34801561017357600080fd5b5061018761018236600461147f565b6106d9565b6040519081526020015b60405180910390f35b3480156101a657600080fd5b506101656101b53660046113d5565b6106ea565b3480156101c657600080fd5b506002546101da906001600160a01b031681565b6040516001600160a01b039091168152602001610191565b3480156101fe57600080fd5b5061016561077d565b34801561021357600080fd5b506101656102223660046114af565b6108b9565b34801561023357600080fd5b5061024761024236600461147f565b6109b1565b6040519015158152602001610191565b34801561026357600080fd5b5061024761027236600461147f565b610bab565b34801561028357600080fd5b50610165610bb8565b34801561029857600080fd5b50610165610bee565b3480156102ad57600080fd5b50610165610c6d565b3480156102c257600080fd5b506000546001600160a01b03166101da565b3480156102e057600080fd5b506101656102ef3660046113d5565b610ca5565b6101656103023660046114af565b610d03565b34801561031357600080fd5b50610165610322366004611329565b610eeb565b34801561033357600080fd5b506101656103423660046114de565b610f56565b34801561035357600080fd5b5061018760055481565b34801561036957600080fd5b506006546103779060ff1681565b604051610191919061151f565b34801561039057600080fd5b5061018761039f366004611329565b60036020526000908152604090205481565b3480156103bd57600080fd5b5060065461024790600160a81b900460ff1681565b3480156103de57600080fd5b506101656103ed366004611329565b611064565b3480156103fe57600080fd5b506101656110ff565b34801561041357600080fd5b506006546101da9061010090046001600160a01b031681565b6000546001600160a01b0316331461045f5760405162461bcd60e51b81526004016104569061159a565b60405180910390fd5b60008060065460ff16600281111561048757634e487b7160e01b600052602160045260246000fd5b146104a45760405162461bcd60e51b8152600401610456906115cf565b600454156104f45760405162461bcd60e51b815260206004820152601a60248201527f5374616b65686f6c6465727320616c72656164792073657475700000000000006044820152606401610456565b8484600081811061051557634e487b7160e01b600052603260045260246000fd5b905060200201602081019061052a9190611329565b600280546001600160a01b0319166001600160a01b03929092169190911790556000805b8581101561067f57600487878381811061057857634e487b7160e01b600052603260045260246000fd5b905060200201602081019061058d9190611329565b81546001810183556000928352602090922090910180546001600160a01b0319166001600160a01b039092169190911790558484828181106105df57634e487b7160e01b600052603260045260246000fd5b905060200201356003600089898581811061060a57634e487b7160e01b600052603260045260246000fd5b905060200201602081019061061f9190611329565b6001600160a01b0316815260208101919091526040016000205584848281811061065957634e487b7160e01b600052603260045260246000fd5b905060200201358261066b91906115f7565b91508061067781611665565b91505061054e565b5061271081146106d15760405162461bcd60e51b815260206004820152601c60248201527f5374616b65732073686f756c642061646420757020746f2031303025000000006044820152606401610456565b505050505050565b60006106e48261113e565b92915050565b6000546001600160a01b031633146107145760405162461bcd60e51b81526004016104569061159a565b6006546040516330176e1360e01b81526101009091046001600160a01b0316906330176e1390610748908490600401611547565b600060405180830381600087803b15801561076257600080fd5b505af1158015610776573d6000803e3d6000fd5b5050505050565b336000908152600360205260409020546107cd5760405162461bcd60e51b81526020600482015260116024820152704f6e6c79207374616b65686f6c6465727360781b6044820152606401610456565b4760005b6004548110156108b557600481815481106107fc57634e487b7160e01b600052603260045260246000fd5b6000918252602082200154600480546001600160a01b03909216926108fc9261271092600392918790811061084157634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b03168352820192909252604001902054610870908661162f565b61087a919061160f565b6040518115909202916000818181858888f193505050501580156108a2573d6000803e3d6000fd5b50806108ad81611665565b9150506107d1565b5050565b6000546001600160a01b031633146108e35760405162461bcd60e51b81526004016104569061159a565b60018060065460ff16600281111561090b57634e487b7160e01b600052602160045260246000fd5b146109285760405162461bcd60e51b8152600401610456906115cf565b60005b838110156109ab5760065460405163755edd1760e01b81526001600160a01b0385811660048301526101009092049091169063755edd1790602401600060405180830381600087803b15801561098057600080fd5b505af1158015610994573d6000803e3d6000fd5b5050505080806109a390611665565b91505061092b565b50505050565b60006005544210156109c557506000919050565b60038211156109d657506000919050565b600654600160a81b900460ff16158015610a6857506001546040516308e0d29d60e01b81523360048201526001600160a01b03909116906308e0d29d9060240160206040518083038186803b158015610a2e57600080fd5b505afa158015610a42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6691906113b5565b155b15610a7557506000919050565b6006546040516370a0823160e01b815233600482015260039184916101009091046001600160a01b0316906370a082319060240160206040518083038186803b158015610ac157600080fd5b505afa158015610ad5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af99190611497565b610b0391906115f7565b1115610b1157506000919050565b610b1d8261271061164e565b600660019054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b6b57600080fd5b505afa158015610b7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba39190611497565b111592915050565b60006106e4823331611176565b6000546001600160a01b03163314610be25760405162461bcd60e51b81526004016104569061159a565b610bec600061118b565b565b6000546001600160a01b03163314610c185760405162461bcd60e51b81526004016104569061159a565b60018060065460ff166002811115610c4057634e487b7160e01b600052602160045260246000fd5b14610c5d5760405162461bcd60e51b8152600401610456906115cf565b506006805460ff19166002179055565b6000546001600160a01b03163314610c975760405162461bcd60e51b81526004016104569061159a565b6002546001600160a01b0316ff5b6000546001600160a01b03163314610ccf5760405162461bcd60e51b81526004016104569061159a565b60065460405163938e3d7b60e01b81526101009091046001600160a01b03169063938e3d7b90610748908490600401611547565b60028060065460ff166002811115610d2b57634e487b7160e01b600052602160045260246000fd5b14610d485760405162461bcd60e51b8152600401610456906115cf565b610d51836109b1565b610d945760405162461bcd60e51b8152602060048201526014602482015273556e61626c6520746f206d696e74206974656d7360601b6044820152606401610456565b610d9e8334611176565b610dda5760405162461bcd60e51b815260206004820152600d60248201526c556e61626c6520746f2070617960981b6044820152606401610456565b8260011415610e4d5760065460405163755edd1760e01b81526001600160a01b0384811660048301526101009092049091169063755edd1790602401600060405180830381600087803b158015610e3057600080fd5b505af1158015610e44573d6000803e3d6000fd5b50505050505050565b600183118015610e5e575060038311155b15610ee65760005b838110156109ab5760065460405163755edd1760e01b81526001600160a01b0385811660048301526101009092049091169063755edd1790602401600060405180830381600087803b158015610ebb57600080fd5b505af1158015610ecf573d6000803e3d6000fd5b505050508080610ede90611665565b915050610e66565b505050565b6000546001600160a01b03163314610f155760405162461bcd60e51b81526004016104569061159a565b610f1e816111db565b60065460405163ac4ddd9f60e01b81526001600160a01b0383811660048301526101009092049091169063ac4ddd9f90602401610748565b6000546001600160a01b03163314610f805760405162461bcd60e51b81526004016104569061159a565b60008060065460ff166002811115610fa857634e487b7160e01b600052602160045260246000fd5b14610fc55760405162461bcd60e51b8152600401610456906115cf565b6004546110145760405162461bcd60e51b815260206004820152601860248201527f5365747570207374616b65686f6c6465727320666972737400000000000000006044820152606401610456565b5060068054600594909455600180546001600160a01b039384166001600160a01b0319909116178155929091166101000260ff60ff60a81b0119166001600160b01b031990931692909217179055565b6000546001600160a01b0316331461108e5760405162461bcd60e51b81526004016104569061159a565b6001600160a01b0381166110f35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610456565b6110fc8161118b565b50565b6000546001600160a01b031633146111295760405162461bcd60e51b81526004016104569061159a565b6006805460ff60a81b1916600160a81b179055565b6006546000908290600160a81b900460ff16611162576702c68af0bb14000061116c565b6703782dace9d900005b6106e4919061162f565b60006111818361113e565b9091101592915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516370a0823160e01b815230600482015281906000906001600160a01b038316906370a082319060240160206040518083038186803b15801561121f57600080fd5b505afa158015611233573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112579190611497565b90508015610ee65760405163a9059cbb60e01b8152336004820152602481018290526001600160a01b0383169063a9059cbb90604401602060405180830381600087803b1580156112a757600080fd5b505af11580156112bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ab91906113b5565b60008083601f8401126112f0578081fd5b50813567ffffffffffffffff811115611307578182fd5b6020830191508360208260051b850101111561132257600080fd5b9250929050565b60006020828403121561133a578081fd5b8135611345816116ac565b9392505050565b60008060008060408587031215611361578283fd5b843567ffffffffffffffff80821115611378578485fd5b611384888389016112df565b9096509450602087013591508082111561139c578384fd5b506113a9878288016112df565b95989497509550505050565b6000602082840312156113c6578081fd5b81518015158114611345578182fd5b6000602082840312156113e6578081fd5b813567ffffffffffffffff808211156113fd578283fd5b818401915084601f830112611410578283fd5b81358181111561142257611422611696565b604051601f8201601f19908116603f0116810190838211818310171561144a5761144a611696565b81604052828152876020848701011115611462578586fd5b826020860160208301379182016020019490945295945050505050565b600060208284031215611490578081fd5b5035919050565b6000602082840312156114a8578081fd5b5051919050565b600080604083850312156114c1578182fd5b8235915060208301356114d3816116ac565b809150509250929050565b6000806000606084860312156114f2578283fd5b833592506020840135611504816116ac565b91506040840135611514816116ac565b809150509250925092565b602081016003831061154157634e487b7160e01b600052602160045260246000fd5b91905290565b6000602080835283518082850152825b8181101561157357858101830151858201604001528201611557565b818111156115845783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600e908201526d496e2077726f6e6720737461676560901b604082015260600190565b6000821982111561160a5761160a611680565b500190565b60008261162a57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561164957611649611680565b500290565b60008282101561166057611660611680565b500390565b600060001982141561167957611679611680565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146110fc57600080fdfea2646970667358221220559d1a641b973d9f9b03be120bdf562f757e0e6100f91ec6057aea1de6326fa364736f6c63430008040033

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.