Contract

0xBd6a6a0378e9C074D6EE17Cb106624027ccfC208

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

-

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Seed Market9155592024-12-20 18:37:379 hrs ago1734719857IN
0xBd6a6a03...27ccfC208
0 S0.000055611.1

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

Contract Source Code Verified (Exact Match)

Contract Name:
SonicT

Compiler Version
v0.8.28+commit.7893614a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at SonicScan.org on 2024-12-20
*/

/**
 *Submitted for verification at basescan.org on 2024-11-18
*/

// SPDX-License-Identifier: MIT
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);
}

/**
 * @dev Interface of the ERC-165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[ERC].
 *
 * 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[ERC 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);
}

/**
 * @title IERC1363
 * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].
 *
 * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract
 * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.
 */
interface IERC1363 is IERC20, IERC165 {
    /*
     * Note: the ERC-165 identifier for this interface is 0xb0202a11.
     * 0xb0202a11 ===
     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^
     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))
     */

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @param data Additional data with no specified format, sent in call to `spender`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);
}




/**
 * @dev Collection of common custom errors used in multiple contracts
 *
 * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.
 * It is recommended to avoid relying on the error API for critical functionality.
 *
 * _Available since v5.1._
 */
library Errors {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error InsufficientBalance(uint256 balance, uint256 needed);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedCall();

    /**
     * @dev The deployment failed.
     */
    error FailedDeployment();

    /**
     * @dev A necessary precompile is missing.
     */
    error MissingPrecompile(address);
}

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

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

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert Errors.FailedCall();
        }
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert Errors.InsufficientBalance(address(this).balance, value);
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case
     * of an unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {Errors.FailedCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

    /**
     * @dev Reverts with returndata if present. Otherwise reverts with {Errors.FailedCall}.
     */
    function _revert(bytes memory returndata) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            assembly ("memory-safe") {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert Errors.FailedCall();
        }
    }
}

/**
 * @title SafeERC20
 * @dev Wrappers around ERC-20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    /**
     * @dev An operation with an ERC-20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     *
     * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function
     * only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being
     * set here.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            safeTransfer(token, to, value);
        } else if (!token.transferAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target
     * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferFromAndCallRelaxed(
        IERC1363 token,
        address from,
        address to,
        uint256 value,
        bytes memory data
    ) internal {
        if (to.code.length == 0) {
            safeTransferFrom(token, from, to, value);
        } else if (!token.transferFromAndCall(from, to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.
     * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}
     * once without retrying, and relies on the returned value to be true.
     *
     * Reverts if the returned value is other than `true`.
     */
    function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            forceApprove(token, to, value);
        } else if (!token.approveAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements.
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            // bubble errors
            if iszero(success) {
                let ptr := mload(0x40)
                returndatacopy(ptr, 0, returndatasize())
                revert(ptr, returndatasize())
            }
            returnSize := returndatasize()
            returnValue := mload(0)
        }

        if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        bool success;
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            returnSize := returndatasize()
            returnValue := mload(0)
        }
        return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);
    }
}





/**
 * @dev Library of standard hash functions.
 *
 * _Available since v5.1._
 */
library Hashes {
    /**
     * @dev Commutative Keccak256 hash of a sorted pair of bytes32. Frequently used when working with merkle proofs.
     *
     * NOTE: Equivalent to the `standardNodeHash` in our https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
     */
    function commutativeKeccak256(bytes32 a, bytes32 b) internal pure returns (bytes32) {
        return a < b ? _efficientKeccak256(a, b) : _efficientKeccak256(b, a);
    }

    /**
     * @dev Implementation of keccak256(abi.encode(a, b)) that doesn't allocate or expand memory.
     */
    function _efficientKeccak256(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        assembly ("memory-safe") {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The tree and the proofs can be generated using our
 * https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
 * You will find a quickstart guide in the readme.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the Merkle tree could be reinterpreted as a leaf value.
 * OpenZeppelin's JavaScript library generates Merkle trees that are safe
 * against this attack out of the box.
 *
 * IMPORTANT: Consider memory side-effects when using custom hashing functions
 * that access memory in an unsafe way.
 *
 * NOTE: This library supports proof verification for merkle trees built using
 * custom _commutative_ hashing functions (i.e. `H(a, b) == H(b, a)`). Proving
 * leaf inclusion in trees built using non-commutative hashing functions requires
 * additional logic that is not supported by this library.
 */
library MerkleProof {
    /**
     *@dev The multiproof provided is not valid.
     */
    error MerkleProofInvalidMultiproof();

    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     *
     * This version handles proofs in memory with the default hashing function.
     */
    function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leaves & pre-images are assumed to be sorted.
     *
     * This version handles proofs in memory with the default hashing function.
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = Hashes.commutativeKeccak256(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     *
     * This version handles proofs in memory with a custom hashing function.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf,
        function(bytes32, bytes32) view returns (bytes32) hasher
    ) internal view returns (bool) {
        return processProof(proof, leaf, hasher) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leaves & pre-images are assumed to be sorted.
     *
     * This version handles proofs in memory with a custom hashing function.
     */
    function processProof(
        bytes32[] memory proof,
        bytes32 leaf,
        function(bytes32, bytes32) view returns (bytes32) hasher
    ) internal view returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = hasher(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     *
     * This version handles proofs in calldata with the default hashing function.
     */
    function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
        return processProofCalldata(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leaves & pre-images are assumed to be sorted.
     *
     * This version handles proofs in calldata with the default hashing function.
     */
    function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = Hashes.commutativeKeccak256(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     *
     * This version handles proofs in calldata with a custom hashing function.
     */
    function verifyCalldata(
        bytes32[] calldata proof,
        bytes32 root,
        bytes32 leaf,
        function(bytes32, bytes32) view returns (bytes32) hasher
    ) internal view returns (bool) {
        return processProofCalldata(proof, leaf, hasher) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leaves & pre-images are assumed to be sorted.
     *
     * This version handles proofs in calldata with a custom hashing function.
     */
    function processProofCalldata(
        bytes32[] calldata proof,
        bytes32 leaf,
        function(bytes32, bytes32) view returns (bytes32) hasher
    ) internal view returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = hasher(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * This version handles multiproofs in memory with the default hashing function.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * NOTE: Consider the case where `root == proof[0] && leaves.length == 0` as it will return `true`.
     * The `leaves` must be validated independently. See {processMultiProof}.
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
     * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
     * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
     * respectively.
     *
     * This version handles multiproofs in memory with the default hashing function.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
     * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
     * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
     *
     * NOTE: The _empty set_ (i.e. the case where `proof.length == 1 && leaves.length == 0`) is considered a no-op,
     * and therefore a valid multiproof (i.e. it returns `proof[0]`). Consider disallowing this case if you're not
     * validating the leaves elsewhere.
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the Merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 proofFlagsLen = proofFlags.length;

        // Check proof validity.
        if (leavesLen + proof.length != proofFlagsLen + 1) {
            revert MerkleProofInvalidMultiproof();
        }

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](proofFlagsLen);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < proofFlagsLen; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i]
                ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
                : proof[proofPos++];
            hashes[i] = Hashes.commutativeKeccak256(a, b);
        }

        if (proofFlagsLen > 0) {
            if (proofPos != proof.length) {
                revert MerkleProofInvalidMultiproof();
            }
            unchecked {
                return hashes[proofFlagsLen - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * This version handles multiproofs in memory with a custom hashing function.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * NOTE: Consider the case where `root == proof[0] && leaves.length == 0` as it will return `true`.
     * The `leaves` must be validated independently. See {processMultiProof}.
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves,
        function(bytes32, bytes32) view returns (bytes32) hasher
    ) internal view returns (bool) {
        return processMultiProof(proof, proofFlags, leaves, hasher) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
     * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
     * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
     * respectively.
     *
     * This version handles multiproofs in memory with a custom hashing function.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
     * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
     * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
     *
     * NOTE: The _empty set_ (i.e. the case where `proof.length == 1 && leaves.length == 0`) is considered a no-op,
     * and therefore a valid multiproof (i.e. it returns `proof[0]`). Consider disallowing this case if you're not
     * validating the leaves elsewhere.
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves,
        function(bytes32, bytes32) view returns (bytes32) hasher
    ) internal view returns (bytes32 merkleRoot) {
        // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the Merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 proofFlagsLen = proofFlags.length;

        // Check proof validity.
        if (leavesLen + proof.length != proofFlagsLen + 1) {
            revert MerkleProofInvalidMultiproof();
        }

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](proofFlagsLen);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < proofFlagsLen; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i]
                ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
                : proof[proofPos++];
            hashes[i] = hasher(a, b);
        }

        if (proofFlagsLen > 0) {
            if (proofPos != proof.length) {
                revert MerkleProofInvalidMultiproof();
            }
            unchecked {
                return hashes[proofFlagsLen - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * This version handles multiproofs in calldata with the default hashing function.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * NOTE: Consider the case where `root == proof[0] && leaves.length == 0` as it will return `true`.
     * The `leaves` must be validated independently. See {processMultiProofCalldata}.
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
     * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
     * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
     * respectively.
     *
     * This version handles multiproofs in calldata with the default hashing function.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
     * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
     * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
     *
     * NOTE: The _empty set_ (i.e. the case where `proof.length == 1 && leaves.length == 0`) is considered a no-op,
     * and therefore a valid multiproof (i.e. it returns `proof[0]`). Consider disallowing this case if you're not
     * validating the leaves elsewhere.
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the Merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 proofFlagsLen = proofFlags.length;

        // Check proof validity.
        if (leavesLen + proof.length != proofFlagsLen + 1) {
            revert MerkleProofInvalidMultiproof();
        }

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](proofFlagsLen);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < proofFlagsLen; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i]
                ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
                : proof[proofPos++];
            hashes[i] = Hashes.commutativeKeccak256(a, b);
        }

        if (proofFlagsLen > 0) {
            if (proofPos != proof.length) {
                revert MerkleProofInvalidMultiproof();
            }
            unchecked {
                return hashes[proofFlagsLen - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * This version handles multiproofs in calldata with a custom hashing function.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * NOTE: Consider the case where `root == proof[0] && leaves.length == 0` as it will return `true`.
     * The `leaves` must be validated independently. See {processMultiProofCalldata}.
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves,
        function(bytes32, bytes32) view returns (bytes32) hasher
    ) internal view returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves, hasher) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
     * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
     * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
     * respectively.
     *
     * This version handles multiproofs in calldata with a custom hashing function.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
     * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
     * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
     *
     * NOTE: The _empty set_ (i.e. the case where `proof.length == 1 && leaves.length == 0`) is considered a no-op,
     * and therefore a valid multiproof (i.e. it returns `proof[0]`). Consider disallowing this case if you're not
     * validating the leaves elsewhere.
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves,
        function(bytes32, bytes32) view returns (bytes32) hasher
    ) internal view returns (bytes32 merkleRoot) {
        // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the Merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 proofFlagsLen = proofFlags.length;

        // Check proof validity.
        if (leavesLen + proof.length != proofFlagsLen + 1) {
            revert MerkleProofInvalidMultiproof();
        }

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](proofFlagsLen);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < proofFlagsLen; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i]
                ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
                : proof[proofPos++];
            hashes[i] = hasher(a, b);
        }

        if (proofFlagsLen > 0) {
            if (proofPos != proof.length) {
                revert MerkleProofInvalidMultiproof();
            }
            unchecked {
                return hashes[proofFlagsLen - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }
}

interface IRouter {
    /**
     * @notice Swap exact ETH for tokens on Uniswap.
     * @param amountOutMin Minimum amount of token to receive.
     * @param path The path of the trade, with the first address being the input token (ETH) and the last one the output token (BRETT).
     * @param to The address to send the resulting tokens.
     * @param deadline The time by which the transaction must be confirmed.
     * @return amounts Array of amounts (input amount, intermediary amounts, and output amount).
     */
    function swapExactETHForTokens(
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable returns (uint256[] memory amounts);

    /**
     * @notice Retourne l'adresse du WETH (Wrapped ETH) sur la blockchain Base.
     * @return L'adresse de WETH.
     */
    function WETH() external view returns (address);
}

contract SonicT {
    using SafeERC20 for IERC20;

    uint256 public POINTS_TO_GENERATE_1MINER = 864000;
    uint256 PSN = 10000;
    uint256 PSNH = 5000;
    bool public initialized = false;

    IERC20 public BRETT;
    IRouter public ROUTER;
    bytes32 public merkleRoot;

    address public treasuryAddress;
    address public owner;

    mapping(address => uint256) public inkjetMiners;
    mapping(address => uint256) public claimedPoints;
    mapping(address => uint256) public lastInk;
    mapping(address => uint256) public lastWithdraw;
    mapping(address => address) public referrals;

    uint256 constant INK_STEP = 1 days;
    uint256 constant INK_STEP_MODIFIER = 0.1e18;
    uint256 constant BASE_PERCENTAGE = 0.5e18;

    uint256 public marketPoints;

    modifier onlyOwner() {
        require(msg.sender == owner, "Not owner");
        _;
    }

    constructor(address _treasuryAddress, bytes32 _merkleRoot) {
        owner = msg.sender;

        // Définition des adresses spécifiques
        BRETT = IERC20(0xc1aC6D480966CED520Eff0e9B081B8Ec30548790);
        ROUTER = IRouter(0x591cf6942c422fA53E8D81c62a9692D7BeA72F61);

        treasuryAddress = _treasuryAddress;
        merkleRoot = _merkleRoot;
    }

    function compound(address ref) public {
        require(initialized, "Not initialized");
        if (ref == msg.sender) {
            ref = address(0);
        }
        if (
            referrals[msg.sender] == address(0) &&
            referrals[msg.sender] != msg.sender
        ) {
            referrals[msg.sender] = ref;
        }
        uint256 pointsUsed = getMyPoints();

        uint256 newMiners = pointsUsed / POINTS_TO_GENERATE_1MINER;
        inkjetMiners[msg.sender] += newMiners;
        claimedPoints[msg.sender] = 0;
        lastInk[msg.sender] = block.timestamp;

        // Envoi des points de referral
        claimedPoints[referrals[msg.sender]] += pointsUsed / 10;

        // Boost du marché pour équilibrer les stocks
        marketPoints += pointsUsed / 2;
    }

    function withdraw() external {
        require(initialized, "Not initialized");
        uint256 hasPoints = getMyPoints();

        require(hasPoints > 0, "No points to withdraw");
        uint256 pointValue = calculatePointSell(hasPoints);
        uint256 fee = devFee(pointValue);

        claimedPoints[msg.sender] = 0;
        lastInk[msg.sender] = block.timestamp;
        lastWithdraw[msg.sender] = block.timestamp;

        // Boost du marché
        marketPoints += hasPoints;

        BRETT.safeTransfer(treasuryAddress, fee);
        BRETT.safeTransfer(msg.sender, pointValue - fee);
    }

    function depositETH(uint minAmount, address ref) external payable {
        require(initialized, "Not initialized");
        require(msg.value > 0, "Invalid amount");

        uint amount = _swap(minAmount);
        _deposit(amount, ref, false);
    }

        function depositBrett(uint amount, address ref) external {
        require(initialized, "Not initialized");
        require(amount > 0, "Invalid amount");

        BRETT.safeTransferFrom(msg.sender, address(this), amount);
        _deposit(amount, ref, false);
    }

    function depositBrettWithProof(
        uint amount,
        address ref,
        bytes32[] memory proof
    ) external {
        require(initialized, "Not initialized");
        require(amount > 0, "Invalid amount");

        bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
        require(MerkleProof.verify(proof, merkleRoot, leaf), "Invalid proof");

        BRETT.safeTransferFrom(msg.sender, address(this), amount);
        _deposit(amount, ref, true); // Utilisateur validé
    }

    function _deposit(uint amount, address ref, bool holder) internal {
        uint256 pointsBought = calculatePointBuy(amount, getBalance() - amount);

        if (holder) {
            pointsBought += (pointsBought * 2) / 100; // Bonus de 2 % pour les holders
        }

        pointsBought -= devFee(pointsBought);
        uint256 fee = devFee(amount);

        BRETT.safeTransfer(treasuryAddress, fee);

        claimedPoints[msg.sender] += pointsBought;
        compound(ref);
    }

    function _swap(uint minTokenOut) internal returns (uint) {
        uint initialBalance = getBalance();

        address[] memory path = new address[](2);
        
        path[0] = 0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38; // Adresse de $ws
        path[1] = address(BRETT);
        
        ROUTER.swapExactETHForTokens{value: msg.value}(
            minTokenOut,
            path,
            address(this),
            block.timestamp
        );

        return getBalance() - initialBalance;
    }

    function calculateTrade(
        uint256 rt,
        uint256 rs,
        uint256 bs
    ) public view returns (uint256) {
        return (PSN * bs) / (PSNH + ((PSN * rs + PSNH * rt) / rt));
    }

    function calculatePointSell(uint256 points) public view returns (uint256) {
        if (points == 0) return 0;
        return calculateTrade(points, marketPoints, getBalance());
    }

    function calculatePointBuy(
        uint256 eth,
        uint256 contractBalance
    ) public view returns (uint256) {
        return calculateTrade(eth, contractBalance, marketPoints);
    }

    function calculatePointBuySimple(uint256 eth) public view returns (uint256) {
        return calculatePointBuy(eth, getBalance());
    }

    function devFee(uint256 amount) public pure returns (uint256) {
        return (amount * 5) / 100;
    }

    function seedMarket() public payable onlyOwner {
        require(marketPoints == 0, "Market already seeded");
        initialized = true;
        marketPoints = 86400000000;
    }

    function getBalance() public view returns (uint256) {
        return BRETT.balanceOf(address(this));
    }

    function getMyMiners() public view returns (uint256) {
        return inkjetMiners[msg.sender];
    }

    function getMyPoints() public view returns (uint256) {
        return claimedPoints[msg.sender] + getPointsSinceLastInk(msg.sender);
    }

    function getPointsSinceLastInk(address adr) public view returns (uint256) {
        uint256 steps = (block.timestamp - lastWithdraw[msg.sender]) /
            INK_STEP;

        uint256 percentage = min(
            1e18,
            BASE_PERCENTAGE + steps * INK_STEP_MODIFIER
        );

        uint256 secondsPassed = min(
            POINTS_TO_GENERATE_1MINER,
            block.timestamp - lastInk[adr]
        );
        return ((secondsPassed * inkjetMiners[adr]) * percentage) / 1e18;
    }

    function getHalvingPercentage() public view returns (uint256) {
        uint256 steps = (block.timestamp - lastWithdraw[msg.sender]) /
            INK_STEP;

        return min(1e18, BASE_PERCENTAGE + steps * INK_STEP_MODIFIER);
    }

    function min(uint256 a, uint256 b) private pure returns (uint256) {
        return a < b ? a : b;
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_treasuryAddress","type":"address"},{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[],"name":"BRETT","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"POINTS_TO_GENERATE_1MINER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROUTER","outputs":[{"internalType":"contract IRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"eth","type":"uint256"},{"internalType":"uint256","name":"contractBalance","type":"uint256"}],"name":"calculatePointBuy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"eth","type":"uint256"}],"name":"calculatePointBuySimple","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"points","type":"uint256"}],"name":"calculatePointSell","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"rt","type":"uint256"},{"internalType":"uint256","name":"rs","type":"uint256"},{"internalType":"uint256","name":"bs","type":"uint256"}],"name":"calculateTrade","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimedPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"ref","type":"address"}],"name":"compound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"ref","type":"address"}],"name":"depositBrett","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"ref","type":"address"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"depositBrettWithProof","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"minAmount","type":"uint256"},{"internalType":"address","name":"ref","type":"address"}],"name":"depositETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"devFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getHalvingPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMyMiners","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMyPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"adr","type":"address"}],"name":"getPointsSinceLastInk","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"inkjetMiners","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastInk","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastWithdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"marketPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"referrals","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"seedMarket","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"treasuryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052620d2f005f556127106001556113886002556003805460ff1916905534801561002b575f5ffd5b5060405161153938038061153983398101604081905261004a916100c8565b60078054336001600160a01b03199182161790915560038054610100600160a81b03191674c1ac6d480966ced520eff0e9b081b8ec30548790001790556004805473591cf6942c422fa53e8d81c62a9692d7bea72f61908316179055600680549091166001600160a01b0393909316929092179091556005556100ff565b5f5f604083850312156100d9575f5ffd5b82516001600160a01b03811681146100ef575f5ffd5b6020939093015192949293505050565b61142d8061010c5f395ff3fe6080604052600436106101ba575f3560e01c806345d8da96116100f25780639ca423b311610092578063ba9c463711610062578063ba9c4637146104eb578063c5f956af146104ff578063d34bfc281461051e578063ea6493aa14610532575f5ffd5b80639ca423b31461044e578063a3315a3d14610482578063abb93488146104a1578063b7013cf3146104c0575f5ffd5b8063624d7b72116100cd578063624d7b72146103c657806374640ee4146103f15780638b144a33146104105780638da5cb5b1461042f575f5ffd5b806345d8da961461037f5780635578ce021461039457806356150edf146103b3575f5ffd5b80632eb4a7ab1161015d5780633bc0461a116101385780633bc0461a146103305780633bda33b11461034f5780633c5f07cb146103635780633ccfd60b1461036b575f5ffd5b80632eb4a7ab146102c057806331d7c606146102d557806332fe7b2614610311575f5ffd5b8063158ef93e11610198578063158ef93e1461022c5780631a99fa7814610255578063229824c414610280578063284dac231461029f575f5ffd5b80630a76e5ed146101be57806310dff60e146101ed57806312065fe014610218575b5f5ffd5b3480156101c9575f5ffd5b50335f908152600860205260409020545b6040519081526020015b60405180910390f35b3480156101f8575f5ffd5b506101da610207366004611055565b60096020525f908152604090205481565b348015610223575f5ffd5b506101da610551565b348015610237575f5ffd5b506003546102459060ff1681565b60405190151581526020016101e4565b348015610260575f5ffd5b506101da61026f366004611055565b600a6020525f908152604090205481565b34801561028b575f5ffd5b506101da61029a36600461106e565b6105c5565b3480156102aa575f5ffd5b506102be6102b9366004611055565b610624565b005b3480156102cb575f5ffd5b506101da60055481565b3480156102e0575f5ffd5b506003546102f99061010090046001600160a01b031681565b6040516001600160a01b0390911681526020016101e4565b34801561031c575f5ffd5b506004546102f9906001600160a01b031681565b34801561033b575f5ffd5b506101da61034a366004611097565b610794565b34801561035a575f5ffd5b506101da5f5481565b6102be6107b2565b348015610376575f5ffd5b506102be610858565b34801561038a575f5ffd5b506101da600d5481565b34801561039f575f5ffd5b506102be6103ae366004611116565b610973565b6102be6103c13660046111c7565b610a64565b3480156103d1575f5ffd5b506101da6103e0366004611055565b600b6020525f908152604090205481565b3480156103fc575f5ffd5b506101da61040b3660046111f1565b610abc565b34801561041b575f5ffd5b506101da61042a366004611097565b610ad1565b34801561043a575f5ffd5b506007546102f9906001600160a01b031681565b348015610459575f5ffd5b506102f9610468366004611055565b600c6020525f90815260409020546001600160a01b031681565b34801561048d575f5ffd5b506101da61049c366004611097565b610ade565b3480156104ac575f5ffd5b506102be6104bb3660046111c7565b610afc565b3480156104cb575f5ffd5b506101da6104da366004611055565b60086020525f908152604090205481565b3480156104f6575f5ffd5b506101da610b69565b34801561050a575f5ffd5b506006546102f9906001600160a01b031681565b348015610529575f5ffd5b506101da610b8c565b34801561053d575f5ffd5b506101da61054c366004611055565b610bf3565b6003546040516370a0823160e01b81523060048201525f9161010090046001600160a01b0316906370a0823190602401602060405180830381865afa15801561059c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105c09190611211565b905090565b5f83846002546105d5919061123c565b846001546105e3919061123c565b6105ed9190611253565b6105f79190611266565b6002546106049190611253565b82600154610612919061123c565b61061c9190611266565b949350505050565b60035460ff1661064f5760405162461bcd60e51b815260040161064690611285565b60405180910390fd5b336001600160a01b0382160361066257505f5b335f908152600c60205260409020546001600160a01b031615801561069d5750335f818152600c60205260409020546001600160a01b031614155b156106ca57335f908152600c6020526040902080546001600160a01b0319166001600160a01b0383161790555b5f6106d3610b69565b90505f5f54826106e39190611266565b335f90815260086020526040812080549293508392909190610706908490611253565b9091555050335f908152600960209081526040808320839055600a918290529091204290556107359083611266565b335f908152600c60209081526040808320546001600160a01b03168352600990915281208054909190610769908490611253565b9091555061077a9050600283611266565b600d5f82825461078a9190611253565b9091555050505050565b5f60646107a283600561123c565b6107ac9190611266565b92915050565b6007546001600160a01b031633146107f85760405162461bcd60e51b81526020600482015260096024820152682737ba1037bbb732b960b91b6044820152606401610646565b600d54156108405760405162461bcd60e51b815260206004820152601560248201527413585c9ad95d08185b1c9958591e481cd959591959605a1b6044820152606401610646565b6003805460ff1916600117905564141dd76000600d55565b60035460ff1661087a5760405162461bcd60e51b815260040161064690611285565b5f610883610b69565b90505f81116108cc5760405162461bcd60e51b81526020600482015260156024820152744e6f20706f696e747320746f20776974686472617760581b6044820152606401610646565b5f6108d682610ade565b90505f6108e282610794565b335f908152600960209081526040808320839055600a82528083204290819055600b909252822055600d80549293508592909190610921908490611253565b9091555050600654600354610948916001600160a01b036101009092048216911683610cb9565b61096e3361095683856112ae565b60035461010090046001600160a01b03169190610cb9565b505050565b60035460ff166109955760405162461bcd60e51b815260040161064690611285565b5f83116109b45760405162461bcd60e51b8152600401610646906112c1565b6040516bffffffffffffffffffffffff193360601b1660208201525f906034016040516020818303038152906040528051906020012090506109f98260055483610d18565b610a355760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210383937b7b360991b6044820152606401610646565b600354610a529061010090046001600160a01b0316333087610d2d565b610a5e84846001610d66565b50505050565b60035460ff16610a865760405162461bcd60e51b815260040161064690611285565b5f3411610aa55760405162461bcd60e51b8152600401610646906112c1565b5f610aaf83610e22565b905061096e81835f610d66565b5f610aca8383600d546105c5565b9392505050565b5f6107ac8261040b610551565b5f815f03610aed57505f919050565b6107ac82600d5461029a610551565b60035460ff16610b1e5760405162461bcd60e51b815260040161064690611285565b5f8211610b3d5760405162461bcd60e51b8152600401610646906112c1565b600354610b5a9061010090046001600160a01b0316333085610d2d565b610b6582825f610d66565b5050565b5f610b7333610bf3565b335f908152600960205260409020546105c09190611253565b335f908152600b602052604081205481906201518090610bac90426112ae565b610bb69190611266565b9050610bed670de0b6b3a7640000610bd667016345785d8a00008461123c565b610be8906706f05b59d3b20000611253565b610f4b565b91505090565b335f908152600b602052604081205481906201518090610c1390426112ae565b610c1d9190611266565b90505f610c3e670de0b6b3a7640000610bd667016345785d8a00008561123c565b5f80546001600160a01b0387168252600a60205260408220549293509091610c6b9190610be890426112ae565b6001600160a01b0386165f90815260086020526040902054909150670de0b6b3a7640000908390610c9c908461123c565b610ca6919061123c565b610cb09190611266565b95945050505050565b6040516001600160a01b0383811660248301526044820183905261096e91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050610f60565b5f82610d248584610fcc565b14949350505050565b6040516001600160a01b038481166024830152838116604483015260648201839052610a5e9186918216906323b872dd90608401610ce6565b5f610d7e8485610d74610551565b61040b91906112ae565b90508115610daa576064610d9382600261123c565b610d9d9190611266565b610da79082611253565b90505b610db381610794565b610dbd90826112ae565b90505f610dc985610794565b600654600354919250610dee9161010090046001600160a01b03908116911683610cb9565b335f9081526009602052604081208054849290610e0c908490611253565b90915550610e1b905084610624565b5050505050565b5f5f610e2c610551565b6040805160028082526060820183529293505f92909160208301908036833701905050905073039e2fb66102314ce7b64ce5ce3e5183bc94ad38815f81518110610e7857610e786112e9565b6001600160a01b03928316602091820292909201015260035482516101009091049091169082906001908110610eb057610eb06112e9565b6001600160a01b03928316602091820292909201015260048054604051637ff36ab560e01b8152921691637ff36ab5913491610ef4918991879130914291016112fd565b5f6040518083038185885af1158015610f0f573d5f5f3e3d5ffd5b50505050506040513d5f823e601f3d908101601f19168201604052610f379190810190611366565b5081610f41610551565b61061c91906112ae565b5f818310610f595781610aca565b5090919050565b5f5f60205f8451602086015f885af180610f7f576040513d5f823e3d81fd5b50505f513d91508115610f96578060011415610fa3565b6001600160a01b0384163b155b15610a5e57604051635274afe760e01b81526001600160a01b0385166004820152602401610646565b5f81815b845181101561100657610ffc82868381518110610fef57610fef6112e9565b602002602001015161100e565b9150600101610fd0565b509392505050565b5f818310611028575f828152602084905260409020610aca565b5f838152602083905260409020610aca565b80356001600160a01b0381168114611050575f5ffd5b919050565b5f60208284031215611065575f5ffd5b610aca8261103a565b5f5f5f60608486031215611080575f5ffd5b505081359360208301359350604090920135919050565b5f602082840312156110a7575f5ffd5b5035919050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156110eb576110eb6110ae565b604052919050565b5f67ffffffffffffffff82111561110c5761110c6110ae565b5060051b60200190565b5f5f5f60608486031215611128575f5ffd5b833592506111386020850161103a565b9150604084013567ffffffffffffffff811115611153575f5ffd5b8401601f81018613611163575f5ffd5b8035611176611171826110f3565b6110c2565b8082825260208201915060208360051b850101925088831115611197575f5ffd5b6020840193505b828410156111b957833582526020938401939091019061119e565b809450505050509250925092565b5f5f604083850312156111d8575f5ffd5b823591506111e86020840161103a565b90509250929050565b5f5f60408385031215611202575f5ffd5b50508035926020909101359150565b5f60208284031215611221575f5ffd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b80820281158282048414176107ac576107ac611228565b808201808211156107ac576107ac611228565b5f8261128057634e487b7160e01b5f52601260045260245ffd5b500490565b6020808252600f908201526e139bdd081a5b9a5d1a585b1a5e9959608a1b604082015260600190565b818103818111156107ac576107ac611228565b6020808252600e908201526d125b9d985b1a5908185b5bdd5b9d60921b604082015260600190565b634e487b7160e01b5f52603260045260245ffd5b5f608082018683526080602084015280865180835260a0850191506020880192505f5b818110156113475783516001600160a01b0316835260209384019390920191600101611320565b50506001600160a01b0395909516604084015250506060015292915050565b5f60208284031215611376575f5ffd5b815167ffffffffffffffff81111561138c575f5ffd5b8201601f8101841361139c575f5ffd5b80516113aa611171826110f3565b8082825260208201915060208360051b8501019250868311156113cb575f5ffd5b6020840193505b828410156113ed5783518252602093840193909101906113d2565b969550505050505056fea2646970667358221220a62d0d96e7af6bd2c63fc9dae12f5cb3cb96a0fab550f835a1e7d2a01b7fdfa664736f6c634300081c0033000000000000000000000000487881a26683ec96f7b67b0907846a0b2f3ae3120000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106101ba575f3560e01c806345d8da96116100f25780639ca423b311610092578063ba9c463711610062578063ba9c4637146104eb578063c5f956af146104ff578063d34bfc281461051e578063ea6493aa14610532575f5ffd5b80639ca423b31461044e578063a3315a3d14610482578063abb93488146104a1578063b7013cf3146104c0575f5ffd5b8063624d7b72116100cd578063624d7b72146103c657806374640ee4146103f15780638b144a33146104105780638da5cb5b1461042f575f5ffd5b806345d8da961461037f5780635578ce021461039457806356150edf146103b3575f5ffd5b80632eb4a7ab1161015d5780633bc0461a116101385780633bc0461a146103305780633bda33b11461034f5780633c5f07cb146103635780633ccfd60b1461036b575f5ffd5b80632eb4a7ab146102c057806331d7c606146102d557806332fe7b2614610311575f5ffd5b8063158ef93e11610198578063158ef93e1461022c5780631a99fa7814610255578063229824c414610280578063284dac231461029f575f5ffd5b80630a76e5ed146101be57806310dff60e146101ed57806312065fe014610218575b5f5ffd5b3480156101c9575f5ffd5b50335f908152600860205260409020545b6040519081526020015b60405180910390f35b3480156101f8575f5ffd5b506101da610207366004611055565b60096020525f908152604090205481565b348015610223575f5ffd5b506101da610551565b348015610237575f5ffd5b506003546102459060ff1681565b60405190151581526020016101e4565b348015610260575f5ffd5b506101da61026f366004611055565b600a6020525f908152604090205481565b34801561028b575f5ffd5b506101da61029a36600461106e565b6105c5565b3480156102aa575f5ffd5b506102be6102b9366004611055565b610624565b005b3480156102cb575f5ffd5b506101da60055481565b3480156102e0575f5ffd5b506003546102f99061010090046001600160a01b031681565b6040516001600160a01b0390911681526020016101e4565b34801561031c575f5ffd5b506004546102f9906001600160a01b031681565b34801561033b575f5ffd5b506101da61034a366004611097565b610794565b34801561035a575f5ffd5b506101da5f5481565b6102be6107b2565b348015610376575f5ffd5b506102be610858565b34801561038a575f5ffd5b506101da600d5481565b34801561039f575f5ffd5b506102be6103ae366004611116565b610973565b6102be6103c13660046111c7565b610a64565b3480156103d1575f5ffd5b506101da6103e0366004611055565b600b6020525f908152604090205481565b3480156103fc575f5ffd5b506101da61040b3660046111f1565b610abc565b34801561041b575f5ffd5b506101da61042a366004611097565b610ad1565b34801561043a575f5ffd5b506007546102f9906001600160a01b031681565b348015610459575f5ffd5b506102f9610468366004611055565b600c6020525f90815260409020546001600160a01b031681565b34801561048d575f5ffd5b506101da61049c366004611097565b610ade565b3480156104ac575f5ffd5b506102be6104bb3660046111c7565b610afc565b3480156104cb575f5ffd5b506101da6104da366004611055565b60086020525f908152604090205481565b3480156104f6575f5ffd5b506101da610b69565b34801561050a575f5ffd5b506006546102f9906001600160a01b031681565b348015610529575f5ffd5b506101da610b8c565b34801561053d575f5ffd5b506101da61054c366004611055565b610bf3565b6003546040516370a0823160e01b81523060048201525f9161010090046001600160a01b0316906370a0823190602401602060405180830381865afa15801561059c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105c09190611211565b905090565b5f83846002546105d5919061123c565b846001546105e3919061123c565b6105ed9190611253565b6105f79190611266565b6002546106049190611253565b82600154610612919061123c565b61061c9190611266565b949350505050565b60035460ff1661064f5760405162461bcd60e51b815260040161064690611285565b60405180910390fd5b336001600160a01b0382160361066257505f5b335f908152600c60205260409020546001600160a01b031615801561069d5750335f818152600c60205260409020546001600160a01b031614155b156106ca57335f908152600c6020526040902080546001600160a01b0319166001600160a01b0383161790555b5f6106d3610b69565b90505f5f54826106e39190611266565b335f90815260086020526040812080549293508392909190610706908490611253565b9091555050335f908152600960209081526040808320839055600a918290529091204290556107359083611266565b335f908152600c60209081526040808320546001600160a01b03168352600990915281208054909190610769908490611253565b9091555061077a9050600283611266565b600d5f82825461078a9190611253565b9091555050505050565b5f60646107a283600561123c565b6107ac9190611266565b92915050565b6007546001600160a01b031633146107f85760405162461bcd60e51b81526020600482015260096024820152682737ba1037bbb732b960b91b6044820152606401610646565b600d54156108405760405162461bcd60e51b815260206004820152601560248201527413585c9ad95d08185b1c9958591e481cd959591959605a1b6044820152606401610646565b6003805460ff1916600117905564141dd76000600d55565b60035460ff1661087a5760405162461bcd60e51b815260040161064690611285565b5f610883610b69565b90505f81116108cc5760405162461bcd60e51b81526020600482015260156024820152744e6f20706f696e747320746f20776974686472617760581b6044820152606401610646565b5f6108d682610ade565b90505f6108e282610794565b335f908152600960209081526040808320839055600a82528083204290819055600b909252822055600d80549293508592909190610921908490611253565b9091555050600654600354610948916001600160a01b036101009092048216911683610cb9565b61096e3361095683856112ae565b60035461010090046001600160a01b03169190610cb9565b505050565b60035460ff166109955760405162461bcd60e51b815260040161064690611285565b5f83116109b45760405162461bcd60e51b8152600401610646906112c1565b6040516bffffffffffffffffffffffff193360601b1660208201525f906034016040516020818303038152906040528051906020012090506109f98260055483610d18565b610a355760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210383937b7b360991b6044820152606401610646565b600354610a529061010090046001600160a01b0316333087610d2d565b610a5e84846001610d66565b50505050565b60035460ff16610a865760405162461bcd60e51b815260040161064690611285565b5f3411610aa55760405162461bcd60e51b8152600401610646906112c1565b5f610aaf83610e22565b905061096e81835f610d66565b5f610aca8383600d546105c5565b9392505050565b5f6107ac8261040b610551565b5f815f03610aed57505f919050565b6107ac82600d5461029a610551565b60035460ff16610b1e5760405162461bcd60e51b815260040161064690611285565b5f8211610b3d5760405162461bcd60e51b8152600401610646906112c1565b600354610b5a9061010090046001600160a01b0316333085610d2d565b610b6582825f610d66565b5050565b5f610b7333610bf3565b335f908152600960205260409020546105c09190611253565b335f908152600b602052604081205481906201518090610bac90426112ae565b610bb69190611266565b9050610bed670de0b6b3a7640000610bd667016345785d8a00008461123c565b610be8906706f05b59d3b20000611253565b610f4b565b91505090565b335f908152600b602052604081205481906201518090610c1390426112ae565b610c1d9190611266565b90505f610c3e670de0b6b3a7640000610bd667016345785d8a00008561123c565b5f80546001600160a01b0387168252600a60205260408220549293509091610c6b9190610be890426112ae565b6001600160a01b0386165f90815260086020526040902054909150670de0b6b3a7640000908390610c9c908461123c565b610ca6919061123c565b610cb09190611266565b95945050505050565b6040516001600160a01b0383811660248301526044820183905261096e91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050610f60565b5f82610d248584610fcc565b14949350505050565b6040516001600160a01b038481166024830152838116604483015260648201839052610a5e9186918216906323b872dd90608401610ce6565b5f610d7e8485610d74610551565b61040b91906112ae565b90508115610daa576064610d9382600261123c565b610d9d9190611266565b610da79082611253565b90505b610db381610794565b610dbd90826112ae565b90505f610dc985610794565b600654600354919250610dee9161010090046001600160a01b03908116911683610cb9565b335f9081526009602052604081208054849290610e0c908490611253565b90915550610e1b905084610624565b5050505050565b5f5f610e2c610551565b6040805160028082526060820183529293505f92909160208301908036833701905050905073039e2fb66102314ce7b64ce5ce3e5183bc94ad38815f81518110610e7857610e786112e9565b6001600160a01b03928316602091820292909201015260035482516101009091049091169082906001908110610eb057610eb06112e9565b6001600160a01b03928316602091820292909201015260048054604051637ff36ab560e01b8152921691637ff36ab5913491610ef4918991879130914291016112fd565b5f6040518083038185885af1158015610f0f573d5f5f3e3d5ffd5b50505050506040513d5f823e601f3d908101601f19168201604052610f379190810190611366565b5081610f41610551565b61061c91906112ae565b5f818310610f595781610aca565b5090919050565b5f5f60205f8451602086015f885af180610f7f576040513d5f823e3d81fd5b50505f513d91508115610f96578060011415610fa3565b6001600160a01b0384163b155b15610a5e57604051635274afe760e01b81526001600160a01b0385166004820152602401610646565b5f81815b845181101561100657610ffc82868381518110610fef57610fef6112e9565b602002602001015161100e565b9150600101610fd0565b509392505050565b5f818310611028575f828152602084905260409020610aca565b5f838152602083905260409020610aca565b80356001600160a01b0381168114611050575f5ffd5b919050565b5f60208284031215611065575f5ffd5b610aca8261103a565b5f5f5f60608486031215611080575f5ffd5b505081359360208301359350604090920135919050565b5f602082840312156110a7575f5ffd5b5035919050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156110eb576110eb6110ae565b604052919050565b5f67ffffffffffffffff82111561110c5761110c6110ae565b5060051b60200190565b5f5f5f60608486031215611128575f5ffd5b833592506111386020850161103a565b9150604084013567ffffffffffffffff811115611153575f5ffd5b8401601f81018613611163575f5ffd5b8035611176611171826110f3565b6110c2565b8082825260208201915060208360051b850101925088831115611197575f5ffd5b6020840193505b828410156111b957833582526020938401939091019061119e565b809450505050509250925092565b5f5f604083850312156111d8575f5ffd5b823591506111e86020840161103a565b90509250929050565b5f5f60408385031215611202575f5ffd5b50508035926020909101359150565b5f60208284031215611221575f5ffd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b80820281158282048414176107ac576107ac611228565b808201808211156107ac576107ac611228565b5f8261128057634e487b7160e01b5f52601260045260245ffd5b500490565b6020808252600f908201526e139bdd081a5b9a5d1a585b1a5e9959608a1b604082015260600190565b818103818111156107ac576107ac611228565b6020808252600e908201526d125b9d985b1a5908185b5bdd5b9d60921b604082015260600190565b634e487b7160e01b5f52603260045260245ffd5b5f608082018683526080602084015280865180835260a0850191506020880192505f5b818110156113475783516001600160a01b0316835260209384019390920191600101611320565b50506001600160a01b0395909516604084015250506060015292915050565b5f60208284031215611376575f5ffd5b815167ffffffffffffffff81111561138c575f5ffd5b8201601f8101841361139c575f5ffd5b80516113aa611171826110f3565b8082825260208201915060208360051b8501019250868311156113cb575f5ffd5b6020840193505b828410156113ed5783518252602093840193909101906113d2565b969550505050505056fea2646970667358221220a62d0d96e7af6bd2c63fc9dae12f5cb3cb96a0fab550f835a1e7d2a01b7fdfa664736f6c634300081c0033

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

000000000000000000000000487881a26683ec96f7b67b0907846a0b2f3ae3120000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _treasuryAddress (address): 0x487881a26683EC96f7b67b0907846a0B2f3ae312
Arg [1] : _merkleRoot (bytes32): 0x0000000000000000000000000000000000000000000000000000000000000000

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000487881a26683ec96f7b67b0907846a0b2f3ae312
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000000


Deployed Bytecode Sourcemap

50534:7136:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;56535:103;;;;;;;;;;-1:-1:-1;56619:10:0;56579:7;56606:24;;;:12;:24;;;;;;56535:103;;;160:25:1;;;148:2;133:18;56535:103:0;;;;;;;;50948:48;;;;;;;;;;-1:-1:-1;50948:48:0;;;;;:::i;:::-;;;;;;;;;;;;;;56419:108;;;;;;;;;;;;;:::i;50700:31::-;;;;;;;;;;-1:-1:-1;50700:31:0;;;;;;;;;;;730:14:1;;723:22;705:41;;693:2;678:18;50700:31:0;565:187:1;51003:42:0;;;;;;;;;;-1:-1:-1;51003:42:0;;;;;:::i;:::-;;;;;;;;;;;;;;55361:201;;;;;;;;;;-1:-1:-1;55361:201:0;;;;;:::i;:::-;;:::i;51815:814::-;;;;;;;;;;-1:-1:-1;51815:814:0;;;;;:::i;:::-;;:::i;:::-;;50794:25;;;;;;;;;;;;;;;;50740:19;;;;;;;;;;-1:-1:-1;50740:19:0;;;;;;;-1:-1:-1;;;;;50740:19:0;;;;;;-1:-1:-1;;;;;1587:32:1;;;1569:51;;1557:2;1542:18;50740:19:0;1410:216:1;50766:21:0;;;;;;;;;;-1:-1:-1;50766:21:0;;;;-1:-1:-1;;;;;50766:21:0;;;56114:106;;;;;;;;;;-1:-1:-1;56114:106:0;;;;;:::i;:::-;;:::i;50592:49::-;;;;;;;;;;;;;;;;56228:183;;;:::i;52637:617::-;;;;;;;;;;;;;:::i;51300:27::-;;;;;;;;;;;;;;;;53811:508;;;;;;;;;;-1:-1:-1;53811:508:0;;;;;:::i;:::-;;:::i;53262:257::-;;;;;;:::i;:::-;;:::i;51052:47::-;;;;;;;;;;-1:-1:-1;51052:47:0;;;;;:::i;:::-;;;;;;;;;;;;;;55764:196;;;;;;;;;;-1:-1:-1;55764:196:0;;;;;:::i;:::-;;:::i;55968:138::-;;;;;;;;;;-1:-1:-1;55968:138:0;;;;;:::i;:::-;;:::i;50865:20::-;;;;;;;;;;-1:-1:-1;50865:20:0;;;;-1:-1:-1;;;;;50865:20:0;;;51106:44;;;;;;;;;;-1:-1:-1;51106:44:0;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;;;;;51106:44:0;;;55570:186;;;;;;;;;;-1:-1:-1;55570:186:0;;;;;:::i;:::-;;:::i;53531:272::-;;;;;;;;;;-1:-1:-1;53531:272:0;;;;;:::i;:::-;;:::i;50894:47::-;;;;;;;;;;-1:-1:-1;50894:47:0;;;;;:::i;:::-;;;;;;;;;;;;;;56646:140;;;;;;;;;;;;;:::i;50828:30::-;;;;;;;;;;-1:-1:-1;50828:30:0;;;;-1:-1:-1;;;;;50828:30:0;;;57315:239;;;;;;;;;;;;;:::i;56794:513::-;;;;;;;;;;-1:-1:-1;56794:513:0;;;;;:::i;:::-;;:::i;56419:108::-;56489:5;;:30;;-1:-1:-1;;;56489:30:0;;56513:4;56489:30;;;1569:51:1;56462:7:0;;56489:5;;;-1:-1:-1;;;;;56489:5:0;;:15;;1542:18:1;;56489:30:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;56482:37;;56419:108;:::o;55361:201::-;55476:7;55550:2;55544;55537:4;;:9;;;;:::i;:::-;55532:2;55526:3;;:8;;;;:::i;:::-;:20;;;;:::i;:::-;55525:27;;;;:::i;:::-;55517:4;;:36;;;;:::i;:::-;55510:2;55504:3;;:8;;;;:::i;:::-;55503:51;;;;:::i;:::-;55496:58;55361:201;-1:-1:-1;;;;55361:201:0:o;51815:814::-;51872:11;;;;51864:39;;;;-1:-1:-1;;;51864:39:0;;;;;;;:::i;:::-;;;;;;;;;51925:10;-1:-1:-1;;;;;51918:17:0;;;51914:66;;-1:-1:-1;51966:1:0;51914:66;52018:10;52041:1;52008:21;;;:9;:21;;;;;;-1:-1:-1;;;;;52008:21:0;:35;:87;;;;-1:-1:-1;52085:10:0;52060:21;;;;:9;:21;;;;;;-1:-1:-1;;;;;52060:21:0;:35;;52008:87;51990:171;;;52132:10;52122:21;;;;:9;:21;;;;;:27;;-1:-1:-1;;;;;;52122:27:0;-1:-1:-1;;;;;52122:27:0;;;;;51990:171;52171:18;52192:13;:11;:13::i;:::-;52171:34;;52218:17;52251:25;;52238:10;:38;;;;:::i;:::-;52300:10;52287:24;;;;:12;:24;;;;;:37;;52218:58;;-1:-1:-1;52218:58:0;;52287:24;;;:37;;52218:58;;52287:37;:::i;:::-;;;;-1:-1:-1;;52349:10:0;52363:1;52335:25;;;:13;:25;;;;;;;;:29;;;52375:7;:19;;;;;;;52397:15;52375:37;;52506:15;;:10;:15;:::i;:::-;52490:10;52466:36;52480:21;;;:9;:21;;;;;;;;;-1:-1:-1;;;;;52480:21:0;52466:36;;:13;:36;;;;;:55;;:36;;;:55;;;;;:::i;:::-;;;;-1:-1:-1;52607:14:0;;-1:-1:-1;52620:1:0;52607:10;:14;:::i;:::-;52591:12;;:30;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;51815:814:0:o;56114:106::-;56167:7;56209:3;56195:10;:6;56204:1;56195:10;:::i;:::-;56194:18;;;;:::i;:::-;56187:25;56114:106;-1:-1:-1;;56114:106:0:o;56228:183::-;51390:5;;-1:-1:-1;;;;;51390:5:0;51376:10;:19;51368:41;;;;-1:-1:-1;;;51368:41:0;;6067:2:1;51368:41:0;;;6049:21:1;6106:1;6086:18;;;6079:29;-1:-1:-1;;;6124:18:1;;;6117:39;6173:18;;51368:41:0;5865:332:1;51368:41:0;56294:12:::1;::::0;:17;56286:51:::1;;;::::0;-1:-1:-1;;;56286:51:0;;6404:2:1;56286:51:0::1;::::0;::::1;6386:21:1::0;6443:2;6423:18;;;6416:30;-1:-1:-1;;;6462:18:1;;;6455:51;6523:18;;56286:51:0::1;6202:345:1::0;56286:51:0::1;56348:11;:18:::0;;-1:-1:-1;;56348:18:0::1;56362:4;56348:18;::::0;;56392:11:::1;56377:12;:26:::0;56228:183::o;52637:617::-;52685:11;;;;52677:39;;;;-1:-1:-1;;;52677:39:0;;;;;;;:::i;:::-;52727:17;52747:13;:11;:13::i;:::-;52727:33;;52793:1;52781:9;:13;52773:47;;;;-1:-1:-1;;;52773:47:0;;6754:2:1;52773:47:0;;;6736:21:1;6793:2;6773:18;;;6766:30;-1:-1:-1;;;6812:18:1;;;6805:51;6873:18;;52773:47:0;6552:345:1;52773:47:0;52831:18;52852:29;52871:9;52852:18;:29::i;:::-;52831:50;;52892:11;52906:18;52913:10;52906:6;:18::i;:::-;52951:10;52965:1;52937:25;;;:13;:25;;;;;;;;:29;;;52977:7;:19;;;;;52999:15;52977:37;;;;53025:12;:24;;;;;:42;53109:12;:25;;52892:32;;-1:-1:-1;53125:9:0;;53109:12;;52965:1;53109:25;;53125:9;;53109:25;:::i;:::-;;;;-1:-1:-1;;53166:15:0;;53147:5;;:40;;-1:-1:-1;;;;;53166:15:0;53147:5;;;;;;53166:15;53183:3;53147:18;:40::i;:::-;53198:48;53217:10;53229:16;53242:3;53229:10;:16;:::i;:::-;53198:5;;;;;-1:-1:-1;;;;;53198:5:0;;;:18;:48::i;:::-;52666:588;;;52637:617::o;53811:508::-;53954:11;;;;53946:39;;;;-1:-1:-1;;;53946:39:0;;;;;;;:::i;:::-;54013:1;54004:6;:10;53996:37;;;;-1:-1:-1;;;53996:37:0;;;;;;;:::i;:::-;54071:28;;-1:-1:-1;;54088:10:0;7527:2:1;7523:15;7519:53;54071:28:0;;;7507:66:1;54046:12:0;;7589::1;;54071:28:0;;;;;;;;;;;;54061:39;;;;;;54046:54;;54119:43;54138:5;54145:10;;54157:4;54119:18;:43::i;:::-;54111:69;;;;-1:-1:-1;;;54111:69:0;;7814:2:1;54111:69:0;;;7796:21:1;7853:2;7833:18;;;7826:30;-1:-1:-1;;;7872:18:1;;;7865:43;7925:18;;54111:69:0;7612:337:1;54111:69:0;54193:5;;:57;;:5;;;-1:-1:-1;;;;;54193:5:0;54216:10;54236:4;54243:6;54193:22;:57::i;:::-;54261:27;54270:6;54278:3;54283:4;54261:8;:27::i;:::-;53935:384;53811:508;;;:::o;53262:257::-;53347:11;;;;53339:39;;;;-1:-1:-1;;;53339:39:0;;;;;;;:::i;:::-;53409:1;53397:9;:13;53389:40;;;;-1:-1:-1;;;53389:40:0;;;;;;;:::i;:::-;53442:11;53456:16;53462:9;53456:5;:16::i;:::-;53442:30;;53483:28;53492:6;53500:3;53505:5;53483:8;:28::i;55764:196::-;55875:7;55902:50;55917:3;55922:15;55939:12;;55902:14;:50::i;:::-;55895:57;55764:196;-1:-1:-1;;;55764:196:0:o;55968:138::-;56035:7;56062:36;56080:3;56085:12;:10;:12::i;55570:186::-;55635:7;55659:6;55669:1;55659:11;55655:25;;-1:-1:-1;55679:1:0;;55570:186;-1:-1:-1;55570:186:0:o;55655:25::-;55698:50;55713:6;55721:12;;55735;:10;:12::i;53531:272::-;53607:11;;;;53599:39;;;;-1:-1:-1;;;53599:39:0;;;;;;;:::i;:::-;53666:1;53657:6;:10;53649:37;;;;-1:-1:-1;;;53649:37:0;;;;;;;:::i;:::-;53699:5;;:57;;:5;;;-1:-1:-1;;;;;53699:5:0;53722:10;53742:4;53749:6;53699:22;:57::i;:::-;53767:28;53776:6;53784:3;53789:5;53767:8;:28::i;:::-;53531:272;;:::o;56646:140::-;56690:7;56745:33;56767:10;56745:21;:33::i;:::-;56731:10;56717:25;;;;:13;:25;;;;;;:61;;;;:::i;57315:239::-;57436:10;57368:7;57423:24;;;:12;:24;;;;;;57368:7;;51187:6;;57405:42;;:15;:42;:::i;:::-;57404:68;;;;:::i;:::-;57388:84;-1:-1:-1;57492:54:0;57496:4;57520:25;51237:6;57388:84;57520:25;:::i;:::-;57502:43;;51285:6;57502:43;:::i;:::-;57492:3;:54::i;:::-;57485:61;;;57315:239;:::o;56794:513::-;56927:10;56859:7;56914:24;;;:12;:24;;;;;;56859:7;;51187:6;;56896:42;;:15;:42;:::i;:::-;56895:68;;;;:::i;:::-;56879:84;-1:-1:-1;56976:18:0;56997:91;57015:4;57052:25;51237:6;56879:84;57052:25;:::i;56997:91::-;57101:21;57143:25;;-1:-1:-1;;;;;57201:12:0;;;;:7;:12;;;;;;56976:112;;-1:-1:-1;57101:21:0;;57125:99;;57143:25;57183:30;;:15;:30;:::i;57125:99::-;-1:-1:-1;;;;;57260:17:0;;;;;;:12;:17;;;;;;57101:123;;-1:-1:-1;57295:4:0;;57281:10;;57244:33;;57101:123;57244:33;:::i;:::-;57243:48;;;;:::i;:::-;57242:57;;;;:::i;:::-;57235:64;56794:513;-1:-1:-1;;;;;56794:513:0:o;15755:162::-;15865:43;;-1:-1:-1;;;;;8146:32:1;;;15865:43:0;;;8128:51:1;8195:18;;;8188:34;;;15838:71:0;;15858:5;;15880:14;;;;;8101:18:1;;15865:43:0;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;15865:43:0;;;;;;;;;;;15838:19;:71::i;26695:156::-;26786:4;26839;26810:25;26823:5;26830:4;26810:12;:25::i;:::-;:33;;26695:156;-1:-1:-1;;;;26695:156:0:o;16162:190::-;16290:53;;-1:-1:-1;;;;;8453:32:1;;;16290:53:0;;;8435:51:1;8522:32;;;8502:18;;;8495:60;8571:18;;;8564:34;;;16263:81:0;;16283:5;;16305:18;;;;;8408::1;;16290:53:0;8233:371:1;54327:499:0;54404:20;54427:48;54445:6;54468;54453:12;:10;:12::i;:::-;:21;;;;:::i;54427:48::-;54404:71;;54492:6;54488:112;;;54552:3;54532:16;:12;54547:1;54532:16;:::i;:::-;54531:24;;;;:::i;:::-;54515:40;;;;:::i;:::-;;;54488:112;54628:20;54635:12;54628:6;:20::i;:::-;54612:36;;;;:::i;:::-;;;54659:11;54673:14;54680:6;54673;:14::i;:::-;54719:15;;54700:5;;54659:28;;-1:-1:-1;54700:40:0;;54719:15;54700:5;;-1:-1:-1;;;;;54700:5:0;;;;54719:15;54659:28;54700:18;:40::i;:::-;54767:10;54753:25;;;;:13;:25;;;;;:41;;54782:12;;54753:25;:41;;54782:12;;54753:41;:::i;:::-;;;;-1:-1:-1;54805:13:0;;-1:-1:-1;54814:3:0;54805:8;:13::i;:::-;54393:433;;54327:499;;;:::o;54834:519::-;54885:4;54902:19;54924:12;:10;:12::i;:::-;54973:16;;;54987:1;54973:16;;;;;;;;54902:34;;-1:-1:-1;54949:21:0;;54973:16;;;;;;;;;;;;-1:-1:-1;54973:16:0;54949:40;;55020:42;55010:4;55015:1;55010:7;;;;;;;;:::i;:::-;-1:-1:-1;;;;;55010:52:0;;;:7;;;;;;;;;:52;55109:5;;55091:7;;55109:5;;;;;;;;55091:4;;55109:5;;55091:7;;;;;;:::i;:::-;-1:-1:-1;;;;;55091:24:0;;;:7;;;;;;;;;:24;55136:6;;;:160;;-1:-1:-1;;;55136:160:0;;:6;;;:28;;55172:9;;55136:160;;55197:11;;55223:4;;55250;;55270:15;;55136:160;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;55136:160:0;;;;;;;;;;;;:::i;:::-;;55331:14;55316:12;:10;:12::i;:::-;:29;;;;:::i;57562:105::-;57619:7;57650:1;57646;:5;:13;;57658:1;57646:13;;;-1:-1:-1;57654:1:0;;57562:105;-1:-1:-1;57562:105:0:o;22348:738::-;22429:18;22458:19;22598:4;22595:1;22588:4;22582:11;22575:4;22569;22565:15;22562:1;22555:5;22548;22543:60;22657:7;22647:180;;22702:4;22696:11;22748:16;22745:1;22740:3;22725:40;22795:16;22790:3;22783:29;22647:180;-1:-1:-1;;22906:1:0;22900:8;22855:16;;-1:-1:-1;22935:15:0;;:68;;22987:11;23002:1;22987:16;;22935:68;;;-1:-1:-1;;;;;22953:26:0;;;:31;22935:68;22931:148;;;23027:40;;-1:-1:-1;;;23027:40:0;;-1:-1:-1;;;;;1587:32:1;;23027:40:0;;;1569:51:1;1542:18;;23027:40:0;1410:216:1;27262:314:0;27345:7;27388:4;27345:7;27403:136;27427:5;:12;27423:1;:16;27403:136;;;27476:51;27504:12;27518:5;27524:1;27518:8;;;;;;;;:::i;:::-;;;;;;;27476:27;:51::i;:::-;27461:66;-1:-1:-1;27441:3:0;;27403:136;;;-1:-1:-1;27556:12:0;27262:314;-1:-1:-1;;;27262:314:0:o;24479:171::-;24554:7;24585:1;24581;:5;:61;;24848:13;24914:15;;;24950:4;24943:15;;;24997:4;24981:21;;24581:61;;;24848:13;24914:15;;;24950:4;24943:15;;;24997:4;24981:21;;24589:25;24775:245;196:173:1;264:20;;-1:-1:-1;;;;;313:31:1;;303:42;;293:70;;359:1;356;349:12;293:70;196:173;;;:::o;374:186::-;433:6;486:2;474:9;465:7;461:23;457:32;454:52;;;502:1;499;492:12;454:52;525:29;544:9;525:29;:::i;757:466::-;834:6;842;850;903:2;891:9;882:7;878:23;874:32;871:52;;;919:1;916;909:12;871:52;-1:-1:-1;;964:23:1;;;1084:2;1069:18;;1056:32;;-1:-1:-1;1187:2:1;1172:18;;;1159:32;;757:466;-1:-1:-1;757:466:1:o;1855:226::-;1914:6;1967:2;1955:9;1946:7;1942:23;1938:32;1935:52;;;1983:1;1980;1973:12;1935:52;-1:-1:-1;2028:23:1;;1855:226;-1:-1:-1;1855:226:1:o;2086:127::-;2147:10;2142:3;2138:20;2135:1;2128:31;2178:4;2175:1;2168:15;2202:4;2199:1;2192:15;2218:275;2289:2;2283:9;2354:2;2335:13;;-1:-1:-1;;2331:27:1;2319:40;;2389:18;2374:34;;2410:22;;;2371:62;2368:88;;;2436:18;;:::i;:::-;2472:2;2465:22;2218:275;;-1:-1:-1;2218:275:1:o;2498:183::-;2558:4;2591:18;2583:6;2580:30;2577:56;;;2613:18;;:::i;:::-;-1:-1:-1;2658:1:1;2654:14;2670:4;2650:25;;2498:183::o;2686:1074::-;2788:6;2796;2804;2857:2;2845:9;2836:7;2832:23;2828:32;2825:52;;;2873:1;2870;2863:12;2825:52;2918:23;;;-1:-1:-1;2984:38:1;3018:2;3003:18;;2984:38;:::i;:::-;2974:48;;3073:2;3062:9;3058:18;3045:32;3100:18;3092:6;3089:30;3086:50;;;3132:1;3129;3122:12;3086:50;3155:22;;3208:4;3200:13;;3196:27;-1:-1:-1;3186:55:1;;3237:1;3234;3227:12;3186:55;3277:2;3264:16;3300:64;3316:47;3356:6;3316:47;:::i;:::-;3300:64;:::i;:::-;3386:3;3410:6;3405:3;3398:19;3442:2;3437:3;3433:12;3426:19;;3497:2;3487:6;3484:1;3480:14;3476:2;3472:23;3468:32;3454:46;;3523:7;3515:6;3512:19;3509:39;;;3544:1;3541;3534:12;3509:39;3576:2;3572;3568:11;3557:22;;3588:142;3604:6;3599:3;3596:15;3588:142;;;3670:17;;3658:30;;3717:2;3621:12;;;;3708;;;;3588:142;;;3749:5;3739:15;;;;;;2686:1074;;;;;:::o;3765:300::-;3833:6;3841;3894:2;3882:9;3873:7;3869:23;3865:32;3862:52;;;3910:1;3907;3900:12;3862:52;3955:23;;;-1:-1:-1;4021:38:1;4055:2;4040:18;;4021:38;:::i;:::-;4011:48;;3765:300;;;;;:::o;4070:346::-;4138:6;4146;4199:2;4187:9;4178:7;4174:23;4170:32;4167:52;;;4215:1;4212;4205:12;4167:52;-1:-1:-1;;4260:23:1;;;4380:2;4365:18;;;4352:32;;-1:-1:-1;4070:346:1:o;4629:230::-;4699:6;4752:2;4740:9;4731:7;4727:23;4723:32;4720:52;;;4768:1;4765;4758:12;4720:52;-1:-1:-1;4813:16:1;;4629:230;-1:-1:-1;4629:230:1:o;4864:127::-;4925:10;4920:3;4916:20;4913:1;4906:31;4956:4;4953:1;4946:15;4980:4;4977:1;4970:15;4996:168;5069:9;;;5100;;5117:15;;;5111:22;;5097:37;5087:71;;5138:18;;:::i;5169:125::-;5234:9;;;5255:10;;;5252:36;;;5268:18;;:::i;5299:217::-;5339:1;5365;5355:132;;5409:10;5404:3;5400:20;5397:1;5390:31;5444:4;5441:1;5434:15;5472:4;5469:1;5462:15;5355:132;-1:-1:-1;5501:9:1;;5299:217::o;5521:339::-;5723:2;5705:21;;;5762:2;5742:18;;;5735:30;-1:-1:-1;;;5796:2:1;5781:18;;5774:45;5851:2;5836:18;;5521:339::o;6902:128::-;6969:9;;;6990:11;;;6987:37;;;7004:18;;:::i;7035:338::-;7237:2;7219:21;;;7276:2;7256:18;;;7249:30;-1:-1:-1;;;7310:2:1;7295:18;;7288:44;7364:2;7349:18;;7035:338::o;8609:127::-;8670:10;8665:3;8661:20;8658:1;8651:31;8701:4;8698:1;8691:15;8725:4;8722:1;8715:15;8741:879;8967:4;9015:3;9004:9;9000:19;9046:6;9035:9;9028:25;9089:3;9084:2;9073:9;9069:18;9062:31;9113:6;9148;9142:13;9179:6;9171;9164:22;9217:3;9206:9;9202:19;9195:26;;9256:2;9248:6;9244:15;9230:29;;9277:1;9287:195;9301:6;9298:1;9295:13;9287:195;;;9366:13;;-1:-1:-1;;;;;9362:39:1;9350:52;;9431:2;9457:15;;;;9422:12;;;;9398:1;9316:9;9287:195;;;-1:-1:-1;;;;;;;9538:32:1;;;;9533:2;9518:18;;9511:60;-1:-1:-1;;9602:2:1;9587:18;9580:34;9499:3;8741:879;-1:-1:-1;;8741:879:1:o;9625:930::-;9720:6;9773:2;9761:9;9752:7;9748:23;9744:32;9741:52;;;9789:1;9786;9779:12;9741:52;9822:9;9816:16;9855:18;9847:6;9844:30;9841:50;;;9887:1;9884;9877:12;9841:50;9910:22;;9963:4;9955:13;;9951:27;-1:-1:-1;9941:55:1;;9992:1;9989;9982:12;9941:55;10025:2;10019:9;10048:64;10064:47;10104:6;10064:47;:::i;10048:64::-;10134:3;10158:6;10153:3;10146:19;10190:2;10185:3;10181:12;10174:19;;10245:2;10235:6;10232:1;10228:14;10224:2;10220:23;10216:32;10202:46;;10271:7;10263:6;10260:19;10257:39;;;10292:1;10289;10282:12;10257:39;10324:2;10320;10316:11;10305:22;;10336:189;10352:6;10347:3;10344:15;10336:189;;;10442:10;;10465:18;;10512:2;10369:12;;;;10503;;;;10336:189;;;10544:5;9625:930;-1:-1:-1;;;;;;9625:930:1:o

Swarm Source

ipfs://a62d0d96e7af6bd2c63fc9dae12f5cb3cb96a0fab550f835a1e7d2a01b7fdfa6

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.