Contract

0x99995a54FD82C16E1428690C0D6e3bEd1e0d0Cb9

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

-
Transaction Hash
Method
Block
From
To
Set Oracle4086642024-12-14 16:46:454 days ago1734194805IN
0x99995a54...d1e0d0Cb9
0 S0.000055281.11

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

Contract Source Code Verified (Exact Match)

Contract Name:
Soniccoin

Compiler Version
v0.8.24+commit.e11b9ed9

Optimization Enabled:
Yes with 50 runs

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

import "./openzeppelin-contracts/contracts/access/Ownable.sol";
import "./openzeppelin-contracts/contracts/token/ERC20/ERC20.sol";

import "./interfaces/IOracle.sol";
import "./SoniccoinStorage.sol";

contract Soniccoin is ERC20, Ownable, SoniccoinStorage {
    /// @notice Maximum supply of the token
    uint256 public constant MAX_SUPPLY = 21000000e18; // 21 million

    /// @notice Block interval for mining
    uint256 public constant BLOCK_INTERVAL = 1 minutes;

    uint256 public nonce;
    uint256 public minimumEnergiesPerBlock;
    bool public minimumEnergiesPerBlockActivated;

    event Mine(uint256 indexed blockNumber, address indexed miner, uint256 mineCount);
    event NewSONICBlock(uint256 indexed blockNumber);
    event MiningRewardSet(uint256 indexed miningReward);
    event MinerSelected(uint256 blockNumber, address selectedMiner, uint256 miningReward);
    event FeeCollectorSet(address feeCollector);
    event MineCostSet(uint256 mineCost);
    event OracleSet(address oracle);

    modifier whenStarted() {
        require(isStarted, "not started");
        _;
    }

    /**
     * @notice Initializes the contract.
     */
    constructor() ERC20("Sonic Coin", "SONIC") Ownable(msg.sender) {
        mineCost = 0.2 ether; // 0.2 $S
        miningReward = 200e18; // 200 SONIC
        halvingInterval = 10080; // 10080 Soniccoin blocks, ~1 week
        // Launch price at 0.40$ per SONIC
        minimumEnergiesPerBlock = 340; // 0.40 * 200 = 80$ per block -> 80 / (0.2 * $S_price) = 340 energies per block
        minimumEnergiesPerBlockActivated = true;

        _mint(msg.sender, 2025000e18); // mint 2.025M Soniccoin
    }


    function getUserRandomNumber() internal returns (bytes32) {
        nonce++;
        return keccak256(abi.encodePacked(block.timestamp, msg.sender, nonce));
    }

    /**
     * @notice Get the miners for a specific block.
     * @param _blockNumber The block number
     * @return The miners
     */
    function minersOfBlock(uint256 _blockNumber) public view returns (address[] memory) {
        return blocks[_blockNumber].miners;
    }

    /**
     * @notice Get the miners for a specific block with a range.
     * @dev This function is not recommended to use for on-chain purposes.
     * @param _blockNumber The block number
     * @param _from The start index
     * @param _to The end index
     * @return The miners
     */
    function minersOfBlockWithRange(uint256 _blockNumber, uint256 _from, uint256 _to)
        public
        view
        returns (address[] memory)
    {
        uint256 count = _to - _from;
        address[] memory miners = new address[](count);
        for (uint256 i = 0; i < count; i++) {
            miners[i] = blocks[_blockNumber].miners[_from + i];
        }
        return miners;
    }

    /**
     * @notice Get the number of miners for a specific block.
     * @param _blockNumber The block number
     * @return The number of miners
     */
    function minersOfBlockCount(uint256 _blockNumber) public view returns (uint256) {
        return blocks[_blockNumber].miners.length;
    }

    /**
     * @notice Get the selected miner for a specific block.
     * @param _blockNumber The block number
     * @return The selected miner
     */
    function selectedMinerOfBlock(uint256 _blockNumber) public view returns (address) {
        return blocks[_blockNumber].selectedMiner;
    }

    /**
     * @notice Get the next halving block.
     * @return The next halving block
     */
    function nextHalvingBlock() public view returns (uint256) {
        return lastHalvingBlock + halvingInterval;
    }

    /**
     * @notice Get the request ID for the target block.
     * @param _blockNumber The target block number
     * @return The request ID
     */
    function getRequestIdByBlockNumber(uint256 _blockNumber) public view returns (uint256) {
        return blockNumberToRequests[_blockNumber];
    }

    /**
     * @notice Get the block number for the request ID.
     * @param _requestId The request ID
     * @return The block number
     */
    function getBlockNumberByRequestId(uint256 _requestId) public view returns (uint256) {
        return requestsToBlockNumber[_requestId];
    }

    /**
     * @notice Mines the reward multiple times in the current block.
     * @param mineCount The number of times to mine
     */
    function mine(uint256 mineCount) public payable whenStarted {
        require(mineCount > 0, "invalid mine count");
        require(msg.value == mineCost * mineCount, "insufficient mine cost");

        _mine(msg.sender, blockNumber + 1, mineCount);

        _concludeBlock();
    }

    /**
     * @notice Mines the reward multiple times in the future block.
     * @param mineCount The number of times to mine per block
     * @param blockCount The number of future blocks to mine
     */
    function futureMine(uint256 mineCount, uint256 blockCount) public payable whenStarted {
        require(mineCount > 0 && blockCount > 0, "invalid mine count or block count");
        require(msg.value == mineCost * mineCount * blockCount, "insufficient mine cost");

        uint256 targetBlock = blockNumber + 1;
        for (uint256 i = 0; i < blockCount;) {
            _mine(msg.sender, targetBlock + i, mineCount);

            unchecked {
                i++;
            }
        }

        _concludeBlock();
    }

    /**
     * @notice Starts the mining.
     */
    function start() public onlyOwner {
        require(!isStarted, "already initialized");

        isStarted = true;
        lastBlockTime = block.timestamp;
    }

    /**
     * @notice Sets the mining reward.
     * @param _miningReward The mining reward
     */
    function setMiningReward(uint256 _miningReward) public onlyOwner {
        require(!isStarted, "already initialized");
        miningReward = _miningReward;

        emit MiningRewardSet(_miningReward);
    }

    /**
     * @notice Sets the fee collector address.
     * @param _feeCollector The fee collector address
     */
    function setFeeCollector(address _feeCollector) public onlyOwner {
        feeCollector = _feeCollector;

        emit FeeCollectorSet(_feeCollector);
    }

    /**
     * @notice Adjusts the mine cost.
     * @param _mineCost The mine cost
     */
    function adjustMineCost(uint256 _mineCost) public onlyOwner {
        mineCost = _mineCost;

        emit MineCostSet(_mineCost);
    }

    /**
     * @notice Sets the oracle.
     * @param _oracle The oracle
     */
    function setOracle(address _oracle) public onlyOwner {
        oracle = _oracle;

        emit OracleSet(_oracle);
    }

    function setMinimumEnergiesPerBlock(uint256 _minimumEnergiesPerBlock) public onlyOwner {
        minimumEnergiesPerBlock = _minimumEnergiesPerBlock;
    }

    function setMinimumEnergiesPerBlockActivated(bool _minimumEnergiesPerBlockActivated) public onlyOwner {
        minimumEnergiesPerBlockActivated = _minimumEnergiesPerBlockActivated;
    }

    /**
     * @notice Collects the Ether.
     * @param amount The amount of Ether to collect
     */
    function collect(uint256 amount) public {
        require(msg.sender == feeCollector, "only feeCollector can collect");

        (bool sent,) = feeCollector.call{value: amount}("");
        require(sent, "failed to send Ether");
    }

    /**
 * @notice Oracle fulfills the randomness and selects the miner.
 * @param sequenceNumber The sequence number from the oracle.
 * @param randomNumber The random number provided by the oracle in bytes32 format.
 */
function fulfillRandomness(uint64 sequenceNumber, bytes32 randomNumber) public {
    require(msg.sender == address(oracle), "only oracle can select miner");

    uint256 targetBlock = requestsToBlockNumber[sequenceNumber];
    Block storage blockData = blocks[targetBlock];

    // Skip if the selected miner is already set.
    if (blockData.selectedMiner != address(0)) {
        return;
    }

    uint256 minerCount = minersOfBlockCount(targetBlock);
    if (minerCount == 0) {
        return;
    }

    // Convert bytes32 random number to uint256 and select miner based on index
    uint256 randIdx = uint256(randomNumber) % minerCount;
    address selectedMiner = blockData.miners[randIdx];

    // Mint the mining reward.
    if (totalSupply() + blockData.miningReward <= MAX_SUPPLY) {
        _mint(selectedMiner, blockData.miningReward);
    }

    // Record the selected miner.
    blockData.selectedMiner = selectedMiner;

    emit MinerSelected(targetBlock, selectedMiner, blockData.miningReward);
}

    /**
     * @dev Concludes the block.
     */
function _concludeBlock() private {
    uint256 nextBlockNumber = blockNumber + 1;
    uint256 minerCount = minersOfBlockCount(nextBlockNumber);
    bool hasMinimumEnergiesPerBlock = minimumEnergiesPerBlockActivated ? minerCount >= minimumEnergiesPerBlock : true;
    if ((block.timestamp >= lastBlockTime + BLOCK_INTERVAL) && hasMinimumEnergiesPerBlock) {
        // Proceed to the next block.
        blockNumber++;
        lastBlockTime = block.timestamp;

        // Use block number or another unique identifier as the user-provided random seed
        bytes32 userRandomNumber = getUserRandomNumber();
        // bytes32 userRandomNumber = keccak256(abi.encodePacked(blockNumber));

        // Call the oracle with the seed and get the sequence number as the request ID
        uint64 sequenceNumber = IOracle(oracle).requestRandomness(userRandomNumber);

        // Check if it's time for halving.
        if (blockNumber >= nextHalvingBlock()) {
            miningReward = miningReward / 2;
            halvingInterval = halvingInterval * 2;

            lastHalvingBlock = blockNumber;
        }

        blockNumberToRequests[blockNumber] = sequenceNumber;
        requestsToBlockNumber[sequenceNumber] = blockNumber;
        blocks[blockNumber].miningReward = miningReward;

        emit NewSONICBlock(blockNumber);
    }
}


    /**
     * @dev Mines the reward.
     * @param user The user address
     * @param targetBlock The target block number to mine
     */
    function _mine(address user, uint256 targetBlock, uint256 counts) private {
        for (uint256 i = 0; i < counts;) {
            blocks[targetBlock].miners.push(user);

            unchecked {
                i++;
            }
        }

        emit Mine(targetBlock, user, counts);
    }
}

File 2 of 9 : IOracle.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

interface IOracle {
    function requestRandomness(bytes32 userRandomNumber) external returns (uint64);
}

File 3 of 9 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../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.
 *
 * The initial owner is set to the address provided by the deployer. 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;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

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

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(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 {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 4 of 9 : draft-IERC6093.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;

/**
 * @dev Standard ERC-20 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens.
 */
interface IERC20Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC20InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC20InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     * @param allowance Amount of tokens a `spender` is allowed to operate with.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC20InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `spender` to be approved. Used in approvals.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC20InvalidSpender(address spender);
}

/**
 * @dev Standard ERC-721 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.
 */
interface IERC721Errors {
    /**
     * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20.
     * Used in balance queries.
     * @param owner Address of the current owner of a token.
     */
    error ERC721InvalidOwner(address owner);

    /**
     * @dev Indicates a `tokenId` whose `owner` is the zero address.
     * @param tokenId Identifier number of a token.
     */
    error ERC721NonexistentToken(uint256 tokenId);

    /**
     * @dev Indicates an error related to the ownership over a particular token. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param tokenId Identifier number of a token.
     * @param owner Address of the current owner of a token.
     */
    error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC721InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC721InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param tokenId Identifier number of a token.
     */
    error ERC721InsufficientApproval(address operator, uint256 tokenId);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC721InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC721InvalidOperator(address operator);
}

/**
 * @dev Standard ERC-1155 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens.
 */
interface IERC1155Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     * @param tokenId Identifier number of a token.
     */
    error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC1155InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC1155InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param owner Address of the current owner of a token.
     */
    error ERC1155MissingApprovalForAll(address operator, address owner);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC1155InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC1155InvalidOperator(address operator);

    /**
     * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
     * Used in batch transfers.
     * @param idsLength Length of the array of token identifiers
     * @param valuesLength Length of the array of token amounts
     */
    error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}

File 5 of 9 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "./IERC20.sol";
import {IERC20Metadata} from "./extensions/IERC20Metadata.sol";
import {Context} from "../../utils/Context.sol";
import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * The default value of {decimals} is 18. To change this, you should override
 * this function so it returns a different value.
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC-20
 * applications.
 */
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
    mapping(address account => uint256) private _balances;

    mapping(address account => mapping(address spender => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the default value returned by this function, unless
     * it's overridden.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `value`.
     */
    function transfer(address to, uint256 value) public virtual returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, value);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 value) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, value);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Skips emitting an {Approval} event indicating an allowance update. This is not
     * required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve].
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `value`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `value`.
     */
    function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, value);
        _transfer(from, to, value);
        return true;
    }

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _transfer(address from, address to, uint256 value) internal {
        if (from == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        if (to == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(from, to, value);
    }

    /**
     * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`
     * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding
     * this function.
     *
     * Emits a {Transfer} event.
     */
    function _update(address from, address to, uint256 value) internal virtual {
        if (from == address(0)) {
            // Overflow check required: The rest of the code assumes that totalSupply never overflows
            _totalSupply += value;
        } else {
            uint256 fromBalance = _balances[from];
            if (fromBalance < value) {
                revert ERC20InsufficientBalance(from, fromBalance, value);
            }
            unchecked {
                // Overflow not possible: value <= fromBalance <= totalSupply.
                _balances[from] = fromBalance - value;
            }
        }

        if (to == address(0)) {
            unchecked {
                // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.
                _totalSupply -= value;
            }
        } else {
            unchecked {
                // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.
                _balances[to] += value;
            }
        }

        emit Transfer(from, to, value);
    }

    /**
     * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).
     * Relies on the `_update` mechanism
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _mint(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(address(0), account, value);
    }

    /**
     * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.
     * Relies on the `_update` mechanism.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead
     */
    function _burn(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        _update(account, address(0), value);
    }

    /**
     * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     *
     * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
     */
    function _approve(address owner, address spender, uint256 value) internal {
        _approve(owner, spender, value, true);
    }

    /**
     * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.
     *
     * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by
     * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any
     * `Approval` event during `transferFrom` operations.
     *
     * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to
     * true using the following override:
     *
     * ```solidity
     * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {
     *     super._approve(owner, spender, value, true);
     * }
     * ```
     *
     * Requirements are the same as {_approve}.
     */
    function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {
        if (owner == address(0)) {
            revert ERC20InvalidApprover(address(0));
        }
        if (spender == address(0)) {
            revert ERC20InvalidSpender(address(0));
        }
        _allowances[owner][spender] = value;
        if (emitEvent) {
            emit Approval(owner, spender, value);
        }
    }

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `value`.
     *
     * Does not update the allowance value in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Does not emit an {Approval} event.
     */
    function _spendAllowance(address owner, address spender, uint256 value) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance < type(uint256).max) {
            if (currentAllowance < value) {
                revert ERC20InsufficientAllowance(spender, currentAllowance, value);
            }
            unchecked {
                _approve(owner, spender, currentAllowance - value, false);
            }
        }
    }
}

File 6 of 9 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC-20 standard.
 */
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 7 of 9 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-20 standard as defined in the ERC.
 */
interface IERC20 {
    /**
     * @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);

    /**
     * @dev Returns the value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

    /**
     * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` 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 value) external returns (bool);
}

File 8 of 9 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

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

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

File 9 of 9 : SoniccoinStorage.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

contract SoniccoinStorage {

    /// @notice The flag to check if the mining is started
    bool public isStarted;

    /// @notice The cost to mine
    uint256 public mineCost;

    /// @notice The mining reward
    uint256 public miningReward;

    /// @notice The current block number
    uint256 public blockNumber;

    /// @notice The last block time
    uint256 public lastBlockTime;

    /// @notice The halving interval
    uint256 public halvingInterval;

    /// @notice The last halving block
    uint256 public lastHalvingBlock;

    /// @notice The fee collector address
    address public feeCollector;

    struct Block {
        address[] miners;
        address selectedMiner;
        uint256 miningReward;
    }

    /// @notice The blocks data
    mapping(uint256 => Block) public blocks;

    /// @notice The block number to request ID mapping
    mapping(uint256 => uint256) public blockNumberToRequests;

    /// @notice The randomness oracle
    address public oracle;

    /// @notice The request ID to block number mapping
    mapping(uint256 => uint256) public requestsToBlockNumber;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC20InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC20InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC20InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"ERC20InvalidSpender","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"feeCollector","type":"address"}],"name":"FeeCollectorSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"blockNumber","type":"uint256"},{"indexed":true,"internalType":"address","name":"miner","type":"address"},{"indexed":false,"internalType":"uint256","name":"mineCount","type":"uint256"}],"name":"Mine","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"mineCost","type":"uint256"}],"name":"MineCostSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"blockNumber","type":"uint256"},{"indexed":false,"internalType":"address","name":"selectedMiner","type":"address"},{"indexed":false,"internalType":"uint256","name":"miningReward","type":"uint256"}],"name":"MinerSelected","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"miningReward","type":"uint256"}],"name":"MiningRewardSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"NewSONICBlock","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oracle","type":"address"}],"name":"OracleSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"BLOCK_INTERVAL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mineCost","type":"uint256"}],"name":"adjustMineCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"blockNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"blockNumberToRequests","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"blocks","outputs":[{"internalType":"address","name":"selectedMiner","type":"address"},{"internalType":"uint256","name":"miningReward","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"collect","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeCollector","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"sequenceNumber","type":"uint64"},{"internalType":"bytes32","name":"randomNumber","type":"bytes32"}],"name":"fulfillRandomness","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"mineCount","type":"uint256"},{"internalType":"uint256","name":"blockCount","type":"uint256"}],"name":"futureMine","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_requestId","type":"uint256"}],"name":"getBlockNumberByRequestId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_blockNumber","type":"uint256"}],"name":"getRequestIdByBlockNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"halvingInterval","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastBlockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastHalvingBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"mineCount","type":"uint256"}],"name":"mine","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mineCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_blockNumber","type":"uint256"}],"name":"minersOfBlock","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_blockNumber","type":"uint256"}],"name":"minersOfBlockCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_blockNumber","type":"uint256"},{"internalType":"uint256","name":"_from","type":"uint256"},{"internalType":"uint256","name":"_to","type":"uint256"}],"name":"minersOfBlockWithRange","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumEnergiesPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumEnergiesPerBlockActivated","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"miningReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextHalvingBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oracle","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"requestsToBlockNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_blockNumber","type":"uint256"}],"name":"selectedMinerOfBlock","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_feeCollector","type":"address"}],"name":"setFeeCollector","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minimumEnergiesPerBlock","type":"uint256"}],"name":"setMinimumEnergiesPerBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_minimumEnergiesPerBlockActivated","type":"bool"}],"name":"setMinimumEnergiesPerBlockActivated","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_miningReward","type":"uint256"}],"name":"setMiningReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oracle","type":"address"}],"name":"setOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"start","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801562000010575f80fd5b50336040518060400160405280600a81526020016929b7b734b19021b7b4b760b11b81525060405180604001604052806005815260200164534f4e494360d81b81525081600390816200006491906200035a565b5060046200007382826200035a565b5050506001600160a01b038116620000a557604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b620000b08162000100565b506702c68af0bb140000600655680ad78ebc5ac6200000600755612760600a556101546012556013805460ff19166001179055620000fa336a01accf784f922dffa0000062000151565b6200044c565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b6001600160a01b0382166200017c5760405163ec442f0560e01b81525f60048201526024016200009c565b620001895f83836200018d565b5050565b6001600160a01b038316620001bb578060025f828254620001af919062000426565b909155506200022d9050565b6001600160a01b0383165f90815260208190526040902054818110156200020f5760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016200009c565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b0382166200024b5760028054829003905562000269565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051620002af91815260200190565b60405180910390a3505050565b634e487b7160e01b5f52604160045260245ffd5b600181811c90821680620002e557607f821691505b6020821081036200030457634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156200035557805f5260205f20601f840160051c81016020851015620003315750805b601f840160051c820191505b8181101562000352575f81556001016200033d565b50505b505050565b81516001600160401b03811115620003765762000376620002bc565b6200038e81620003878454620002d0565b846200030a565b602080601f831160018114620003c4575f8415620003ac5750858301515b5f19600386901b1c1916600185901b1785556200041e565b5f85815260208120601f198616915b82811015620003f457888601518255948401946001909101908401620003d3565b50858210156200041257878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b808201808211156200044657634e487b7160e01b5f52601160045260245ffd5b92915050565b611afe806200045a5f395ff3fe608060405260043610610244575f3560e01c80637dc0d1d011610137578063b9414b2b116100af578063b9414b2b14610696578063be9a6555146106b5578063c415b95c146106c9578063c85ea4ec146106e8578063ce3f865f146106fd578063ce86ea901461071c578063dd62ed3e14610747578063e54ad23714610766578063e6deaf4f1461077b578063e78857cc1461079a578063f25b3f99146107b3578063f2fde38b14610813575f80fd5b80637dc0d1d01461052057806380f929721461053f578063826233121461056b5780638da5cb5b1461058a57806395d89b41146105a7578063a412c493146105bb578063a42dce80146105da578063a84edc08146105f9578063a9059cbb14610624578063ac7d70ce14610643578063add55ccb14610662578063affed0e014610681575f80fd5b80634d474898116101ca5780634d474898146103af578063544736e6146103c25780635665fb4d146103e257806357e871e7146103f757806361c56a1c1461040c5780636a47aa06146104375780636db7ebb61461044c57806370a0823114610490578063714b8246146104c4578063715018a6146104d8578063724b2f5a146104ec5780637adbf97314610501575f80fd5b806306fdde0314610248578063095ea7b3146102725780631770492e146102a157806318160ddd146102da57806323b872dd146102ee578063313ce5671461030d57806332cb6b0c1461032857806335c4377b1461034657806338885ac11461035a5780633a7ba4fc1461036f5780634ac2d1031461039a575b5f80fd5b348015610253575f80fd5b5061025c610832565b60405161026991906116df565b60405180910390f35b34801561027d575f80fd5b5061029161028c366004611746565b6108c2565b6040519015158152602001610269565b3480156102ac575f80fd5b506102cc6102bb36600461176e565b60106020525f908152604090205481565b604051908152602001610269565b3480156102e5575f80fd5b506002546102cc565b3480156102f9575f80fd5b50610291610308366004611785565b6108db565b348015610318575f80fd5b5060405160128152602001610269565b348015610333575f80fd5b506102cc6a115eec47f6cf7e3500000081565b348015610351575f80fd5b506102cc603c81565b61036d6103683660046117be565b6108fe565b005b34801561037a575f80fd5b506102cc61038936600461176e565b600e6020525f908152604090205481565b3480156103a5575f80fd5b506102cc60075481565b61036d6103bd36600461176e565b610a11565b3480156103cd575f80fd5b5060055461029190600160a01b900460ff1681565b3480156103ed575f80fd5b506102cc60125481565b348015610402575f80fd5b506102cc60085481565b348015610417575f80fd5b506102cc61042636600461176e565b5f9081526010602052604090205490565b348015610442575f80fd5b506102cc600a5481565b348015610457575f80fd5b5061048361046636600461176e565b5f908152600d60205260409020600101546001600160a01b031690565b60405161026991906117de565b34801561049b575f80fd5b506102cc6104aa3660046117f2565b6001600160a01b03165f9081526020819052604090205490565b3480156104cf575f80fd5b506102cc610ace565b3480156104e3575f80fd5b5061036d610ae4565b3480156104f7575f80fd5b506102cc600b5481565b34801561050c575f80fd5b5061036d61051b3660046117f2565b610af7565b34801561052b575f80fd5b50600f54610483906001600160a01b031681565b34801561054a575f80fd5b5061055e610559366004611812565b610b55565b604051610269919061183b565b348015610576575f80fd5b5061036d61058536600461189b565b610c31565b348015610595575f80fd5b506005546001600160a01b0316610483565b3480156105b2575f80fd5b5061025c610dc6565b3480156105c6575f80fd5b5061055e6105d536600461176e565b610dd5565b3480156105e5575f80fd5b5061036d6105f43660046117f2565b610e3e565b348015610604575f80fd5b506102cc61061336600461176e565b5f908152600d602052604090205490565b34801561062f575f80fd5b5061029161063e366004611746565b610e91565b34801561064e575f80fd5b5061036d61065d36600461176e565b610e9e565b34801561066d575f80fd5b5061036d61067c3660046118b7565b610edb565b34801561068c575f80fd5b506102cc60115481565b3480156106a1575f80fd5b5061036d6106b036600461176e565b610ef6565b3480156106c0575f80fd5b5061036d610f03565b3480156106d4575f80fd5b50600c54610483906001600160a01b031681565b3480156106f3575f80fd5b506102cc60095481565b348015610708575f80fd5b5061036d61071736600461176e565b610f4e565b348015610727575f80fd5b506102cc61073636600461176e565b5f908152600e602052604090205490565b348015610752575f80fd5b506102cc6107613660046118d6565b611043565b348015610771575f80fd5b506102cc60065481565b348015610786575f80fd5b5061036d61079536600461176e565b61106d565b3480156107a5575f80fd5b506013546102919060ff1681565b3480156107be575f80fd5b506107f46107cd36600461176e565b600d6020525f9081526040902060018101546002909101546001600160a01b039091169082565b604080516001600160a01b039093168352602083019190915201610269565b34801561081e575f80fd5b5061036d61082d3660046117f2565b6110d1565b60606003805461084190611907565b80601f016020809104026020016040519081016040528092919081815260200182805461086d90611907565b80156108b85780601f1061088f576101008083540402835291602001916108b8565b820191905f5260205f20905b81548152906001019060200180831161089b57829003601f168201915b5050505050905090565b5f336108cf81858561110b565b60019150505b92915050565b5f336108e8858285611118565b6108f3858585611169565b506001949350505050565b600554600160a01b900460ff166109305760405162461bcd60e51b81526004016109279061193f565b60405180910390fd5b5f8211801561093e57505f81115b6109945760405162461bcd60e51b815260206004820152602160248201527f696e76616c6964206d696e6520636f756e74206f7220626c6f636b20636f756e6044820152601d60fa1b6064820152608401610927565b80826006546109a39190611978565b6109ad9190611978565b34146109cb5760405162461bcd60e51b81526004016109279061198f565b5f60085460016109db91906119bf565b90505f5b82811015610a03576109fb336109f583856119bf565b866111c6565b6001016109df565b50610a0c611259565b505050565b600554600160a01b900460ff16610a3a5760405162461bcd60e51b81526004016109279061193f565b5f8111610a7e5760405162461bcd60e51b81526020600482015260126024820152711a5b9d985b1a59081b5a5b994818dbdd5b9d60721b6044820152606401610927565b80600654610a8c9190611978565b3414610aaa5760405162461bcd60e51b81526004016109279061198f565b610ac3336008546001610abd91906119bf565b836111c6565b610acb611259565b50565b5f600a54600b54610adf91906119bf565b905090565b610aec6113f8565b610af55f611425565b565b610aff6113f8565b600f80546001600160a01b0319166001600160a01b0383161790556040517f3f32684a32a11dabdbb8c0177de80aa3ae36a004d75210335b49e544e48cd0aa90610b4a9083906117de565b60405180910390a150565b60605f610b6284846119d2565b90505f816001600160401b03811115610b7d57610b7d6119e5565b604051908082528060200260200182016040528015610ba6578160200160208202803683370190505b5090505f5b82811015610c27575f878152600d60205260409020610bca82886119bf565b81548110610bda57610bda6119f9565b905f5260205f20015f9054906101000a90046001600160a01b0316828281518110610c0757610c076119f9565b6001600160a01b0390921660209283029190910190910152600101610bab565b5095945050505050565b600f546001600160a01b03163314610c8b5760405162461bcd60e51b815260206004820152601c60248201527f6f6e6c79206f7261636c652063616e2073656c656374206d696e6572000000006044820152606401610927565b6001600160401b0382165f90815260106020908152604080832054808452600d90925290912060018101546001600160a01b031615610cca5750505050565b5f828152600d602052604081205490819003610ce7575050505050565b5f610cf28286611a21565b90505f835f018281548110610d0957610d096119f9565b5f9182526020909120015460028501546001600160a01b0390911691506a115eec47f6cf7e3500000090610d3c60025490565b610d4691906119bf565b11610d5957610d59818560020154611476565b6001840180546001600160a01b0319166001600160a01b03831690811790915560028501546040805188815260208101939093528201527f7751b7b286227379c21dd3b9309e4067a6f5aac577b3c039d776102f96ecfde89060600160405180910390a150505050505050565b60606004805461084190611907565b5f818152600d6020908152604091829020805483518184028101840190945280845260609392830182828015610e3257602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610e14575b50505050509050919050565b610e466113f8565b600c80546001600160a01b0319166001600160a01b0383161790556040517f12e1d17016b94668449f97876f4a8d5cc2c19f314db337418894734037cc19d490610b4a9083906117de565b5f336108cf818585611169565b610ea66113f8565b60068190556040518181527f85e42fa5726036a226dc1d1785b502dba7b9c3bd18702c51ff6f101a45518b4f90602001610b4a565b610ee36113f8565b6013805460ff1916911515919091179055565b610efe6113f8565b601255565b610f0b6113f8565b600554600160a01b900460ff1615610f355760405162461bcd60e51b815260040161092790611a34565b6005805460ff60a01b1916600160a01b17905542600955565b600c546001600160a01b03163314610fa85760405162461bcd60e51b815260206004820152601d60248201527f6f6e6c7920666565436f6c6c6563746f722063616e20636f6c6c6563740000006044820152606401610927565b600c546040515f916001600160a01b03169083908381818185875af1925050503d805f8114610ff2576040519150601f19603f3d011682016040523d82523d5f602084013e610ff7565b606091505b505090508061103f5760405162461bcd60e51b81526020600482015260146024820152733330b4b632b2103a379039b2b7321022ba3432b960611b6044820152606401610927565b5050565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b6110756113f8565b600554600160a01b900460ff161561109f5760405162461bcd60e51b815260040161092790611a34565b600781905560405181907ff23ed82b68ea318076849822f412a6c5637af4f338c3fa025676fc78e1ed489b905f90a250565b6110d96113f8565b6001600160a01b038116611102575f604051631e4fbdf760e01b815260040161092791906117de565b610acb81611425565b610a0c83838360016114aa565b5f6111238484611043565b90505f19811015611163578181101561115557828183604051637dc7a0d960e11b815260040161092793929190611a61565b61116384848484035f6114aa565b50505050565b6001600160a01b038316611192575f604051634b637e8f60e11b815260040161092791906117de565b6001600160a01b0382166111bb575f60405163ec442f0560e01b815260040161092791906117de565b610a0c83838361157c565b5f5b8181101561120f575f838152600d602090815260408220805460018082018355918452919092200180546001600160a01b0319166001600160a01b038716179055016111c8565b50826001600160a01b0316827f6624a09eb96dea85bd37279bab3c70e7198a4bf6a00a69c9361c5b3d85e560898360405161124c91815260200190565b60405180910390a3505050565b5f600854600161126991906119bf565b5f818152600d60205260408120546013549293509160ff1661128c576001611293565b6012548210155b9050603c6009546112a491906119bf565b42101580156112b05750805b15610a0c5760088054905f6112c483611a82565b9091555050426009555f6112d6611682565b600f54604051635e3b709f60e01b8152600481018390529192505f916001600160a01b0390911690635e3b709f906024016020604051808303815f875af1158015611323573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113479190611a9a565b9050611351610ace565b600854106113835760026007546113689190611ab5565b600755600a54611379906002611978565b600a55600854600b555b600880545f908152600e602090815260408083206001600160401b03861690819055845490845260108352818420819055600754908452600d90925280832060020191909155915491517fb94ac26c2af468926509f850d4c4c190d311538239d8aef8faa96a510a3585e39190a25050505050565b6005546001600160a01b03163314610af5573360405163118cdaa760e01b815260040161092791906117de565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b6001600160a01b03821661149f575f60405163ec442f0560e01b815260040161092791906117de565b61103f5f838361157c565b6001600160a01b0384166114d3575f60405163e602df0560e01b815260040161092791906117de565b6001600160a01b0383166114fc575f604051634a1406b160e11b815260040161092791906117de565b6001600160a01b038085165f908152600160209081526040808320938716835292905220829055801561116357826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161156e91815260200190565b60405180910390a350505050565b6001600160a01b0383166115a6578060025f82825461159b91906119bf565b909155506116039050565b6001600160a01b0383165f90815260208190526040902054818110156115e55783818360405163391434e360e21b815260040161092793929190611a61565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b03821661161f5760028054829003905561163d565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161124c91815260200190565b601180545f918261169283611a82565b9091555050601154604080514260208201526001600160601b03193360601b1691810191909152605481019190915260740160405160208183030381529060405280519060200120905090565b5f602080835283518060208501525f5b8181101561170b578581018301518582016040015282016116ef565b505f604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114611741575f80fd5b919050565b5f8060408385031215611757575f80fd5b6117608361172b565b946020939093013593505050565b5f6020828403121561177e575f80fd5b5035919050565b5f805f60608486031215611797575f80fd5b6117a08461172b565b92506117ae6020850161172b565b9150604084013590509250925092565b5f80604083850312156117cf575f80fd5b50508035926020909101359150565b6001600160a01b0391909116815260200190565b5f60208284031215611802575f80fd5b61180b8261172b565b9392505050565b5f805f60608486031215611824575f80fd5b505081359360208301359350604090920135919050565b602080825282518282018190525f9190848201906040850190845b8181101561187b5783516001600160a01b031683529284019291840191600101611856565b50909695505050505050565b6001600160401b0381168114610acb575f80fd5b5f80604083850312156118ac575f80fd5b823561176081611887565b5f602082840312156118c7575f80fd5b8135801515811461180b575f80fd5b5f80604083850312156118e7575f80fd5b6118f08361172b565b91506118fe6020840161172b565b90509250929050565b600181811c9082168061191b57607f821691505b60208210810361193957634e487b7160e01b5f52602260045260245ffd5b50919050565b6020808252600b908201526a1b9bdd081cdd185c9d195960aa1b604082015260600190565b634e487b7160e01b5f52601160045260245ffd5b80820281158282048414176108d5576108d5611964565b6020808252601690820152751a5b9cdd59999a58da595b9d081b5a5b994818dbdcdd60521b604082015260600190565b808201808211156108d5576108d5611964565b818103818111156108d5576108d5611964565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601260045260245ffd5b5f82611a2f57611a2f611a0d565b500690565b602080825260139082015272185b1c9958591e481a5b9a5d1a585b1a5e9959606a1b604082015260600190565b6001600160a01b039390931683526020830191909152604082015260600190565b5f60018201611a9357611a93611964565b5060010190565b5f60208284031215611aaa575f80fd5b815161180b81611887565b5f82611ac357611ac3611a0d565b50049056fea26469706673582212209e55290d411a2c0e48c5e4d34230e6b2effd9c4a32469046f5195bb3095e84f064736f6c63430008180033

Deployed Bytecode

0x608060405260043610610244575f3560e01c80637dc0d1d011610137578063b9414b2b116100af578063b9414b2b14610696578063be9a6555146106b5578063c415b95c146106c9578063c85ea4ec146106e8578063ce3f865f146106fd578063ce86ea901461071c578063dd62ed3e14610747578063e54ad23714610766578063e6deaf4f1461077b578063e78857cc1461079a578063f25b3f99146107b3578063f2fde38b14610813575f80fd5b80637dc0d1d01461052057806380f929721461053f578063826233121461056b5780638da5cb5b1461058a57806395d89b41146105a7578063a412c493146105bb578063a42dce80146105da578063a84edc08146105f9578063a9059cbb14610624578063ac7d70ce14610643578063add55ccb14610662578063affed0e014610681575f80fd5b80634d474898116101ca5780634d474898146103af578063544736e6146103c25780635665fb4d146103e257806357e871e7146103f757806361c56a1c1461040c5780636a47aa06146104375780636db7ebb61461044c57806370a0823114610490578063714b8246146104c4578063715018a6146104d8578063724b2f5a146104ec5780637adbf97314610501575f80fd5b806306fdde0314610248578063095ea7b3146102725780631770492e146102a157806318160ddd146102da57806323b872dd146102ee578063313ce5671461030d57806332cb6b0c1461032857806335c4377b1461034657806338885ac11461035a5780633a7ba4fc1461036f5780634ac2d1031461039a575b5f80fd5b348015610253575f80fd5b5061025c610832565b60405161026991906116df565b60405180910390f35b34801561027d575f80fd5b5061029161028c366004611746565b6108c2565b6040519015158152602001610269565b3480156102ac575f80fd5b506102cc6102bb36600461176e565b60106020525f908152604090205481565b604051908152602001610269565b3480156102e5575f80fd5b506002546102cc565b3480156102f9575f80fd5b50610291610308366004611785565b6108db565b348015610318575f80fd5b5060405160128152602001610269565b348015610333575f80fd5b506102cc6a115eec47f6cf7e3500000081565b348015610351575f80fd5b506102cc603c81565b61036d6103683660046117be565b6108fe565b005b34801561037a575f80fd5b506102cc61038936600461176e565b600e6020525f908152604090205481565b3480156103a5575f80fd5b506102cc60075481565b61036d6103bd36600461176e565b610a11565b3480156103cd575f80fd5b5060055461029190600160a01b900460ff1681565b3480156103ed575f80fd5b506102cc60125481565b348015610402575f80fd5b506102cc60085481565b348015610417575f80fd5b506102cc61042636600461176e565b5f9081526010602052604090205490565b348015610442575f80fd5b506102cc600a5481565b348015610457575f80fd5b5061048361046636600461176e565b5f908152600d60205260409020600101546001600160a01b031690565b60405161026991906117de565b34801561049b575f80fd5b506102cc6104aa3660046117f2565b6001600160a01b03165f9081526020819052604090205490565b3480156104cf575f80fd5b506102cc610ace565b3480156104e3575f80fd5b5061036d610ae4565b3480156104f7575f80fd5b506102cc600b5481565b34801561050c575f80fd5b5061036d61051b3660046117f2565b610af7565b34801561052b575f80fd5b50600f54610483906001600160a01b031681565b34801561054a575f80fd5b5061055e610559366004611812565b610b55565b604051610269919061183b565b348015610576575f80fd5b5061036d61058536600461189b565b610c31565b348015610595575f80fd5b506005546001600160a01b0316610483565b3480156105b2575f80fd5b5061025c610dc6565b3480156105c6575f80fd5b5061055e6105d536600461176e565b610dd5565b3480156105e5575f80fd5b5061036d6105f43660046117f2565b610e3e565b348015610604575f80fd5b506102cc61061336600461176e565b5f908152600d602052604090205490565b34801561062f575f80fd5b5061029161063e366004611746565b610e91565b34801561064e575f80fd5b5061036d61065d36600461176e565b610e9e565b34801561066d575f80fd5b5061036d61067c3660046118b7565b610edb565b34801561068c575f80fd5b506102cc60115481565b3480156106a1575f80fd5b5061036d6106b036600461176e565b610ef6565b3480156106c0575f80fd5b5061036d610f03565b3480156106d4575f80fd5b50600c54610483906001600160a01b031681565b3480156106f3575f80fd5b506102cc60095481565b348015610708575f80fd5b5061036d61071736600461176e565b610f4e565b348015610727575f80fd5b506102cc61073636600461176e565b5f908152600e602052604090205490565b348015610752575f80fd5b506102cc6107613660046118d6565b611043565b348015610771575f80fd5b506102cc60065481565b348015610786575f80fd5b5061036d61079536600461176e565b61106d565b3480156107a5575f80fd5b506013546102919060ff1681565b3480156107be575f80fd5b506107f46107cd36600461176e565b600d6020525f9081526040902060018101546002909101546001600160a01b039091169082565b604080516001600160a01b039093168352602083019190915201610269565b34801561081e575f80fd5b5061036d61082d3660046117f2565b6110d1565b60606003805461084190611907565b80601f016020809104026020016040519081016040528092919081815260200182805461086d90611907565b80156108b85780601f1061088f576101008083540402835291602001916108b8565b820191905f5260205f20905b81548152906001019060200180831161089b57829003601f168201915b5050505050905090565b5f336108cf81858561110b565b60019150505b92915050565b5f336108e8858285611118565b6108f3858585611169565b506001949350505050565b600554600160a01b900460ff166109305760405162461bcd60e51b81526004016109279061193f565b60405180910390fd5b5f8211801561093e57505f81115b6109945760405162461bcd60e51b815260206004820152602160248201527f696e76616c6964206d696e6520636f756e74206f7220626c6f636b20636f756e6044820152601d60fa1b6064820152608401610927565b80826006546109a39190611978565b6109ad9190611978565b34146109cb5760405162461bcd60e51b81526004016109279061198f565b5f60085460016109db91906119bf565b90505f5b82811015610a03576109fb336109f583856119bf565b866111c6565b6001016109df565b50610a0c611259565b505050565b600554600160a01b900460ff16610a3a5760405162461bcd60e51b81526004016109279061193f565b5f8111610a7e5760405162461bcd60e51b81526020600482015260126024820152711a5b9d985b1a59081b5a5b994818dbdd5b9d60721b6044820152606401610927565b80600654610a8c9190611978565b3414610aaa5760405162461bcd60e51b81526004016109279061198f565b610ac3336008546001610abd91906119bf565b836111c6565b610acb611259565b50565b5f600a54600b54610adf91906119bf565b905090565b610aec6113f8565b610af55f611425565b565b610aff6113f8565b600f80546001600160a01b0319166001600160a01b0383161790556040517f3f32684a32a11dabdbb8c0177de80aa3ae36a004d75210335b49e544e48cd0aa90610b4a9083906117de565b60405180910390a150565b60605f610b6284846119d2565b90505f816001600160401b03811115610b7d57610b7d6119e5565b604051908082528060200260200182016040528015610ba6578160200160208202803683370190505b5090505f5b82811015610c27575f878152600d60205260409020610bca82886119bf565b81548110610bda57610bda6119f9565b905f5260205f20015f9054906101000a90046001600160a01b0316828281518110610c0757610c076119f9565b6001600160a01b0390921660209283029190910190910152600101610bab565b5095945050505050565b600f546001600160a01b03163314610c8b5760405162461bcd60e51b815260206004820152601c60248201527f6f6e6c79206f7261636c652063616e2073656c656374206d696e6572000000006044820152606401610927565b6001600160401b0382165f90815260106020908152604080832054808452600d90925290912060018101546001600160a01b031615610cca5750505050565b5f828152600d602052604081205490819003610ce7575050505050565b5f610cf28286611a21565b90505f835f018281548110610d0957610d096119f9565b5f9182526020909120015460028501546001600160a01b0390911691506a115eec47f6cf7e3500000090610d3c60025490565b610d4691906119bf565b11610d5957610d59818560020154611476565b6001840180546001600160a01b0319166001600160a01b03831690811790915560028501546040805188815260208101939093528201527f7751b7b286227379c21dd3b9309e4067a6f5aac577b3c039d776102f96ecfde89060600160405180910390a150505050505050565b60606004805461084190611907565b5f818152600d6020908152604091829020805483518184028101840190945280845260609392830182828015610e3257602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610e14575b50505050509050919050565b610e466113f8565b600c80546001600160a01b0319166001600160a01b0383161790556040517f12e1d17016b94668449f97876f4a8d5cc2c19f314db337418894734037cc19d490610b4a9083906117de565b5f336108cf818585611169565b610ea66113f8565b60068190556040518181527f85e42fa5726036a226dc1d1785b502dba7b9c3bd18702c51ff6f101a45518b4f90602001610b4a565b610ee36113f8565b6013805460ff1916911515919091179055565b610efe6113f8565b601255565b610f0b6113f8565b600554600160a01b900460ff1615610f355760405162461bcd60e51b815260040161092790611a34565b6005805460ff60a01b1916600160a01b17905542600955565b600c546001600160a01b03163314610fa85760405162461bcd60e51b815260206004820152601d60248201527f6f6e6c7920666565436f6c6c6563746f722063616e20636f6c6c6563740000006044820152606401610927565b600c546040515f916001600160a01b03169083908381818185875af1925050503d805f8114610ff2576040519150601f19603f3d011682016040523d82523d5f602084013e610ff7565b606091505b505090508061103f5760405162461bcd60e51b81526020600482015260146024820152733330b4b632b2103a379039b2b7321022ba3432b960611b6044820152606401610927565b5050565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b6110756113f8565b600554600160a01b900460ff161561109f5760405162461bcd60e51b815260040161092790611a34565b600781905560405181907ff23ed82b68ea318076849822f412a6c5637af4f338c3fa025676fc78e1ed489b905f90a250565b6110d96113f8565b6001600160a01b038116611102575f604051631e4fbdf760e01b815260040161092791906117de565b610acb81611425565b610a0c83838360016114aa565b5f6111238484611043565b90505f19811015611163578181101561115557828183604051637dc7a0d960e11b815260040161092793929190611a61565b61116384848484035f6114aa565b50505050565b6001600160a01b038316611192575f604051634b637e8f60e11b815260040161092791906117de565b6001600160a01b0382166111bb575f60405163ec442f0560e01b815260040161092791906117de565b610a0c83838361157c565b5f5b8181101561120f575f838152600d602090815260408220805460018082018355918452919092200180546001600160a01b0319166001600160a01b038716179055016111c8565b50826001600160a01b0316827f6624a09eb96dea85bd37279bab3c70e7198a4bf6a00a69c9361c5b3d85e560898360405161124c91815260200190565b60405180910390a3505050565b5f600854600161126991906119bf565b5f818152600d60205260408120546013549293509160ff1661128c576001611293565b6012548210155b9050603c6009546112a491906119bf565b42101580156112b05750805b15610a0c5760088054905f6112c483611a82565b9091555050426009555f6112d6611682565b600f54604051635e3b709f60e01b8152600481018390529192505f916001600160a01b0390911690635e3b709f906024016020604051808303815f875af1158015611323573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113479190611a9a565b9050611351610ace565b600854106113835760026007546113689190611ab5565b600755600a54611379906002611978565b600a55600854600b555b600880545f908152600e602090815260408083206001600160401b03861690819055845490845260108352818420819055600754908452600d90925280832060020191909155915491517fb94ac26c2af468926509f850d4c4c190d311538239d8aef8faa96a510a3585e39190a25050505050565b6005546001600160a01b03163314610af5573360405163118cdaa760e01b815260040161092791906117de565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b6001600160a01b03821661149f575f60405163ec442f0560e01b815260040161092791906117de565b61103f5f838361157c565b6001600160a01b0384166114d3575f60405163e602df0560e01b815260040161092791906117de565b6001600160a01b0383166114fc575f604051634a1406b160e11b815260040161092791906117de565b6001600160a01b038085165f908152600160209081526040808320938716835292905220829055801561116357826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161156e91815260200190565b60405180910390a350505050565b6001600160a01b0383166115a6578060025f82825461159b91906119bf565b909155506116039050565b6001600160a01b0383165f90815260208190526040902054818110156115e55783818360405163391434e360e21b815260040161092793929190611a61565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b03821661161f5760028054829003905561163d565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161124c91815260200190565b601180545f918261169283611a82565b9091555050601154604080514260208201526001600160601b03193360601b1691810191909152605481019190915260740160405160208183030381529060405280519060200120905090565b5f602080835283518060208501525f5b8181101561170b578581018301518582016040015282016116ef565b505f604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114611741575f80fd5b919050565b5f8060408385031215611757575f80fd5b6117608361172b565b946020939093013593505050565b5f6020828403121561177e575f80fd5b5035919050565b5f805f60608486031215611797575f80fd5b6117a08461172b565b92506117ae6020850161172b565b9150604084013590509250925092565b5f80604083850312156117cf575f80fd5b50508035926020909101359150565b6001600160a01b0391909116815260200190565b5f60208284031215611802575f80fd5b61180b8261172b565b9392505050565b5f805f60608486031215611824575f80fd5b505081359360208301359350604090920135919050565b602080825282518282018190525f9190848201906040850190845b8181101561187b5783516001600160a01b031683529284019291840191600101611856565b50909695505050505050565b6001600160401b0381168114610acb575f80fd5b5f80604083850312156118ac575f80fd5b823561176081611887565b5f602082840312156118c7575f80fd5b8135801515811461180b575f80fd5b5f80604083850312156118e7575f80fd5b6118f08361172b565b91506118fe6020840161172b565b90509250929050565b600181811c9082168061191b57607f821691505b60208210810361193957634e487b7160e01b5f52602260045260245ffd5b50919050565b6020808252600b908201526a1b9bdd081cdd185c9d195960aa1b604082015260600190565b634e487b7160e01b5f52601160045260245ffd5b80820281158282048414176108d5576108d5611964565b6020808252601690820152751a5b9cdd59999a58da595b9d081b5a5b994818dbdcdd60521b604082015260600190565b808201808211156108d5576108d5611964565b818103818111156108d5576108d5611964565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601260045260245ffd5b5f82611a2f57611a2f611a0d565b500690565b602080825260139082015272185b1c9958591e481a5b9a5d1a585b1a5e9959606a1b604082015260600190565b6001600160a01b039390931683526020830191909152604082015260600190565b5f60018201611a9357611a93611964565b5060010190565b5f60208284031215611aaa575f80fd5b815161180b81611887565b5f82611ac357611ac3611a0d565b50049056fea26469706673582212209e55290d411a2c0e48c5e4d34230e6b2effd9c4a32469046f5195bb3095e84f064736f6c63430008180033

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