FTM Price: $0.67 (-6.86%)
Gas: 25 GWei

Contract

0x9D4A8d7523a36f4a2E99870f1aFf232ded7e95Ae
 

Overview

FTM Balance

Fantom LogoFantom LogoFantom Logo0 FTM

FTM Value

$0.00

Sponsored

Transaction Hash
Method
Block
From
To
Value
0x60a06040459885112022-08-30 8:39:07595 days ago1661848747IN
 Create: ReferralManager
0 FTM0.003350532.55379978

Latest 1 internal transaction

Parent Txn Hash Block From To Value
459885112022-08-30 8:39:07595 days ago1661848747  Contract Creation0 FTM
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ReferralManager

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 7 : ReferralManager.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity 0.8.10;

import "../interfaces/IReferralManager.sol";
import "../components/SafeOwnableUpgradeable.sol";

contract ReferralManager is SafeOwnableUpgradeable, IReferralManager {
    uint256 public constant RATE_DENOMINATOR = 100000; // 1e5 = 100%
    uint256 public immutable PRIMARY_NETWORK = 42161; //  by default, 42161 (arbitrum)

    mapping(bytes32 => address) public referralCodeOwners;
    bytes32 private __deprecated0;
    bytes32 private __deprecated1;
    TierSetting[] public tierSettings;

    bytes32 private __deprecated2;
    mapping(address => bool) public isHandler;
    mapping(bytes32 => address) public rebateRecipients;
    mapping(address => bytes32) public referralCodeOf;
    mapping(address => uint256) public lastUpdatedTime;

    modifier onlyPrimaryNetwork() {
        require(block.chainid == PRIMARY_NETWORK, "ReferralManager::isValidReferralCode::OnlyPrimaryNetwork");
        _;
    }

    /// @notice Initialize contract, set owner
    function initialize() external initializer {
        __SafeOwnable_init();
    }

    // ================================= management methods =================================
    /// @notice Set handler of referralManager
    function setHandler(address handler, bool enable) external onlyOwner {
        require(isHandler[handler] != enable, "ReferralManager::setHandler::AlreadySet");
        isHandler[handler] = enable;
        emit SetHandler(handler, enable);
    }

    function getTiers() external view returns (TierSetting[] memory) {
        return tierSettings;
    }

    function setTiers(TierSetting[] memory newTierSettings) external onlyPrimaryNetwork onlyOwner {
        uint256 rawLength = tierSettings.length;
        uint256 expLength = newTierSettings.length;
        uint256 length = rawLength > expLength ? rawLength : expLength;
        for (uint256 i = 0; i < length; i++) {
            if (i >= expLength) {
                tierSettings.pop();
            } else {
                TierSetting memory setting = newTierSettings[i];
                require(setting.tier == i, "ReferralManager::setTier::TierOutOfOrder");
                require(setting.discountRate <= RATE_DENOMINATOR, "ReferralManager::setTier::DiscountOutOfRange");
                require(setting.rebateRate <= RATE_DENOMINATOR, "ReferralManager::setTier::RebateRateOutOfRange");
                if (i >= rawLength) {
                    tierSettings.push(setting);
                } else {
                    tierSettings[i] = setting;
                }
            }
        }
        emit SetTiers(newTierSettings);
    }

    // methods only available on primary network
    function isValidReferralCode(bytes32 referralCode) public view onlyPrimaryNetwork returns (bool) {
        return referralCodeOwners[referralCode] != address(0);
    }

    function registerReferralCode(bytes32 referralCode, address rebateRecipient) external onlyPrimaryNetwork {
        require(referralCode != bytes32(0), "ReferralManager::registerReferralCode::ZeroCode");
        require(!isValidReferralCode(referralCode), "ReferralManager::registerReferralCode::InvalidCode");
        referralCodeOwners[referralCode] = msg.sender;
        emit RegisterReferralCode(msg.sender, referralCode);

        _setRebateRecipient(referralCode, rebateRecipient);
    }

    function setRebateRecipient(bytes32 referralCode, address rebateRecipient) external onlyPrimaryNetwork {
        require(msg.sender == referralCodeOwners[referralCode], "ReferralManager::setRebateRecipient::OnlyCodeOwner");
        _setRebateRecipient(referralCode, rebateRecipient);
    }

    function transferReferralCode(bytes32 referralCode, address newOwner) external onlyPrimaryNetwork {
        require(msg.sender == referralCodeOwners[referralCode], "ReferralManager::setRebateRecipient::OnlyCodeOwner");
        referralCodeOwners[referralCode] = newOwner;
        emit TransferReferralCode(referralCode, msg.sender, newOwner);
        _setRebateRecipient(referralCode, newOwner);
    }

    function _setRebateRecipient(bytes32 referralCode, address rebateRecipient) internal {
        address codeOwner = referralCodeOwners[referralCode];
        address recipient = rebateRecipient == address(0) ? codeOwner : rebateRecipient;
        rebateRecipients[referralCode] = recipient;
        emit SetRebateRecipient(referralCode, codeOwner, recipient);
    }

    // methods available on secondary network
    function getReferralCodeOf(address trader) external view returns (bytes32, uint256) {
        return (referralCodeOf[trader], lastUpdatedTime[trader]);
    }

    function setReferrerCode(bytes32 referralCode) external {
        referralCodeOf[msg.sender] = referralCode;
        lastUpdatedTime[msg.sender] = block.timestamp;
        emit SetReferralCode(msg.sender, referralCode);
    }

    function setReferrerCodeFor(address trader, bytes32 referralCode) external {
        require(isHandler[msg.sender], "ReferralManager::setReferrerCodeFor::onlyHandler");
        if (referralCodeOf[trader] != referralCode) {
            referralCodeOf[trader] = referralCode;
            lastUpdatedTime[trader] = block.timestamp;
            emit SetReferralCode(trader, referralCode);
        }
    }
}

File 2 of 7 : IReferralManager.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity 0.8.10;

interface IReferralManager {
    struct TierSetting {
        uint8 tier;
        uint64 stakeThreshold;
        uint64 discountRate;
        uint64 rebateRate;
    }

    event RegisterReferralCode(address referralCodeOwner, bytes32 referralCode);
    event SetReferralCode(address trader, bytes32 referralCode);
    event SetHandler(address handler, bool enable);
    event SetTiers(TierSetting[] newTierSettings);
    event SetMaintainer(address previousMaintainer, address newMaintainer);
    event SetRebateRecipient(bytes32 referralCode, address referralCodeOwner, address rebateRecipient);
    event TransferReferralCode(bytes32 referralCode, address previousOwner, address newOwner);

    function isHandler(address handler) external view returns (bool);

    function rebateRecipients(bytes32 referralCode) external view returns (address);

    // management methods
    function setHandler(address handler, bool enable) external;

    function setTiers(TierSetting[] memory newTierSettings) external;

    // methods only available on primary network
    function isValidReferralCode(bytes32 referralCode) external view returns (bool);

    function registerReferralCode(bytes32 referralCode, address rebateRecipient) external;

    function setRebateRecipient(bytes32 referralCode, address rebateRecipient) external;

    function transferReferralCode(bytes32 referralCode, address newOwner) external;

    // methods available on secondary network
    function getReferralCodeOf(address trader) external view returns (bytes32, uint256);

    function setReferrerCode(bytes32 referralCode) external;

    function setReferrerCodeFor(address trader, bytes32 referralCode) external;
}

File 2 of 7 : SafeOwnableUpgradeable.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity 0.8.10;

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

contract SafeOwnableUpgradeable is OwnableUpgradeable {
    address internal _pendingOwner;

    event PrepareToTransferOwnership(address indexed pendingOwner);

    function __SafeOwnable_init() internal onlyInitializing {
        __Ownable_init();
    }

    function transferOwnership(address newOwner) public virtual override onlyOwner {
        require(newOwner != address(0), "O=0"); // Owner Is Zero
        require(newOwner != owner(), "O=O"); // Owner is the same as the old Owner
        _pendingOwner = newOwner;
        emit PrepareToTransferOwnership(_pendingOwner);
    }

    function takeOwnership() public virtual {
        require(_msgSender() == _pendingOwner, "SND"); // SeNDer is not authorized
        _transferOwnership(_pendingOwner);
        _pendingOwner = address(0);
    }

    function renounceOwnership() public virtual override onlyOwner {
        _pendingOwner = address(0);
        _transferOwnership(address(0));
    }
}

File 2 of 7 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal onlyInitializing {
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal onlyInitializing {
        _transferOwnership(_msgSender());
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }

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

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

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pendingOwner","type":"address"}],"name":"PrepareToTransferOwnership","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"referralCodeOwner","type":"address"},{"indexed":false,"internalType":"bytes32","name":"referralCode","type":"bytes32"}],"name":"RegisterReferralCode","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"handler","type":"address"},{"indexed":false,"internalType":"bool","name":"enable","type":"bool"}],"name":"SetHandler","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousMaintainer","type":"address"},{"indexed":false,"internalType":"address","name":"newMaintainer","type":"address"}],"name":"SetMaintainer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"referralCode","type":"bytes32"},{"indexed":false,"internalType":"address","name":"referralCodeOwner","type":"address"},{"indexed":false,"internalType":"address","name":"rebateRecipient","type":"address"}],"name":"SetRebateRecipient","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"trader","type":"address"},{"indexed":false,"internalType":"bytes32","name":"referralCode","type":"bytes32"}],"name":"SetReferralCode","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint8","name":"tier","type":"uint8"},{"internalType":"uint64","name":"stakeThreshold","type":"uint64"},{"internalType":"uint64","name":"discountRate","type":"uint64"},{"internalType":"uint64","name":"rebateRate","type":"uint64"}],"indexed":false,"internalType":"struct IReferralManager.TierSetting[]","name":"newTierSettings","type":"tuple[]"}],"name":"SetTiers","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"referralCode","type":"bytes32"},{"indexed":false,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"TransferReferralCode","type":"event"},{"inputs":[],"name":"PRIMARY_NETWORK","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RATE_DENOMINATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"trader","type":"address"}],"name":"getReferralCodeOf","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTiers","outputs":[{"components":[{"internalType":"uint8","name":"tier","type":"uint8"},{"internalType":"uint64","name":"stakeThreshold","type":"uint64"},{"internalType":"uint64","name":"discountRate","type":"uint64"},{"internalType":"uint64","name":"rebateRate","type":"uint64"}],"internalType":"struct IReferralManager.TierSetting[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isHandler","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"referralCode","type":"bytes32"}],"name":"isValidReferralCode","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastUpdatedTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"rebateRecipients","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"referralCodeOf","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"referralCodeOwners","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"referralCode","type":"bytes32"},{"internalType":"address","name":"rebateRecipient","type":"address"}],"name":"registerReferralCode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"handler","type":"address"},{"internalType":"bool","name":"enable","type":"bool"}],"name":"setHandler","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"referralCode","type":"bytes32"},{"internalType":"address","name":"rebateRecipient","type":"address"}],"name":"setRebateRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"referralCode","type":"bytes32"}],"name":"setReferrerCode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"trader","type":"address"},{"internalType":"bytes32","name":"referralCode","type":"bytes32"}],"name":"setReferrerCodeFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint8","name":"tier","type":"uint8"},{"internalType":"uint64","name":"stakeThreshold","type":"uint64"},{"internalType":"uint64","name":"discountRate","type":"uint64"},{"internalType":"uint64","name":"rebateRate","type":"uint64"}],"internalType":"struct IReferralManager.TierSetting[]","name":"newTierSettings","type":"tuple[]"}],"name":"setTiers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"takeOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tierSettings","outputs":[{"internalType":"uint8","name":"tier","type":"uint8"},{"internalType":"uint64","name":"stakeThreshold","type":"uint64"},{"internalType":"uint64","name":"discountRate","type":"uint64"},{"internalType":"uint64","name":"rebateRate","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"referralCode","type":"bytes32"},{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferReferralCode","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a060405261a4b160805234801561001657600080fd5b506080516116c9610055600039600081816103ce015281816103f20152818161082201528181610a1e01528181610b8b0152610d6c01526116c96000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c80638f427ff2116100c3578063c362a66c1161007c578063c362a66c14610330578063ca1a82ad14610343578063d69fd7b914610356578063de170570146103a1578063f2fde38b146103b6578063f4d1f047146103c957600080fd5b80638f427ff21461029b57806393bc0a49146102bb5780639cb7de4b146102ce578063aa122229146102e1578063ae44d5321461030a578063bfb7d70d1461031d57600080fd5b80635d430302116101155780635d430302146102275780636053617214610268578063715018a6146102705780637efad8e0146102785780638129fc1c146102825780638da5cb5b1461028a57600080fd5b80632a8b9d11146101525780632ef3ac9d1461016757806334f5cfc9146101b357806344af2edb146101c657806346ea87af146101f4575b600080fd5b6101656101603660046112ae565b6103f0565b005b61017a6101753660046113b5565b6107d7565b6040805160ff909516855267ffffffffffffffff9384166020860152918316918401919091521660608201526080015b60405180910390f35b6101656101c13660046113e5565b610820565b6101e66101d4366004611411565b606d6020526000908152604090205481565b6040519081526020016101aa565b610217610202366004611411565b606b6020526000908152604090205460ff1681565b60405190151581526020016101aa565b6102506102353660046113b5565b6066602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016101aa565b6101656108a3565b610165610913565b6101e6620186a081565b610165610959565b6033546001600160a01b0316610250565b6101e66102a9366004611411565b606e6020526000908152604090205481565b6102176102c93660046113b5565b610a1a565b6101656102dc366004611433565b610a7c565b6102506102ef3660046113b5565b606c602052600090815260409020546001600160a01b031681565b6101656103183660046113e5565b610b89565b61016561032b36600461146f565b610c78565b61016561033e3660046113e5565b610d6a565b6101656103513660046113b5565b610ed7565b61038c610364366004611411565b6001600160a01b03166000908152606d6020908152604080832054606e909252909120549091565b604080519283526020830191909152016101aa565b6103a9610f2f565b6040516101aa9190611499565b6101656103c4366004611411565b610fc2565b6101e67f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000046146104385760405162461bcd60e51b815260040161042f9061150f565b60405180910390fd5b6033546001600160a01b031633146104625760405162461bcd60e51b815260040161042f9061156c565b606954815160008183116104765781610478565b825b905060005b81811015610799578281106104c457606980548061049d5761049d6115a1565b600082815260209020810160001990810180546001600160c81b0319169055019055610787565b60008582815181106104d8576104d86115b7565b6020026020010151905081816000015160ff16146105495760405162461bcd60e51b815260206004820152602860248201527f526566657272616c4d616e616765723a3a736574546965723a3a546965724f756044820152673a27b327b93232b960c11b606482015260840161042f565b620186a0816040015167ffffffffffffffff1611156105bf5760405162461bcd60e51b815260206004820152602c60248201527f526566657272616c4d616e616765723a3a736574546965723a3a446973636f7560448201526b6e744f75744f6652616e676560a01b606482015260840161042f565b620186a0816060015167ffffffffffffffff1611156106375760405162461bcd60e51b815260206004820152602e60248201527f526566657272616c4d616e616765723a3a736574546965723a3a52656261746560448201526d526174654f75744f6652616e676560901b606482015260840161042f565b8482106106ed576069805460018101825560009190915281517f7fb4302e8e91f9110a6554c2c0a24601252c2a42c2220ca988efcfe399914308909101805460208401516040850151606086015160ff90951668ffffffffffffffffff199093169290921761010067ffffffffffffffff9283160217600160481b600160c81b031916600160481b9282169290920267ffffffffffffffff60881b191691909117600160881b9190931602919091179055610785565b8060698381548110610701576107016115b7565b600091825260209182902083519101805492840151604085015160609095015160ff90931668ffffffffffffffffff199094169390931761010067ffffffffffffffff9485160217600160481b600160c81b031916600160481b9484169490940267ffffffffffffffff60881b191693909317600160881b92909116919091021790555b505b80610791816115cd565b91505061047d565b507f906d4c093df21930319322a1f1566da2f4cd87bafdb7f5350a97b5faafc6cb3d846040516107c99190611499565b60405180910390a150505050565b606981815481106107e757600080fd5b60009182526020909120015460ff8116915067ffffffffffffffff6101008204811691600160481b8104821691600160881b9091041684565b7f0000000000000000000000000000000000000000000000000000000000000000461461085f5760405162461bcd60e51b815260040161042f9061150f565b6000828152606660205260409020546001600160a01b031633146108955760405162461bcd60e51b815260040161042f906115f6565b61089f82826110b6565b5050565b6065546001600160a01b0316336001600160a01b0316146108ec5760405162461bcd60e51b815260206004820152600360248201526214d39160ea1b604482015260640161042f565b606554610901906001600160a01b0316611150565b606580546001600160a01b0319169055565b6033546001600160a01b0316331461093d5760405162461bcd60e51b815260040161042f9061156c565b606580546001600160a01b03191690556109576000611150565b565b600054610100900460ff166109745760005460ff1615610978565b303b155b6109db5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161042f565b600054610100900460ff161580156109fd576000805461ffff19166101011790555b610a056111a2565b8015610a17576000805461ff00191690555b50565b60007f00000000000000000000000000000000000000000000000000000000000000004614610a5b5760405162461bcd60e51b815260040161042f9061150f565b506000818152606660205260409020546001600160a01b031615155b919050565b6033546001600160a01b03163314610aa65760405162461bcd60e51b815260040161042f9061156c565b6001600160a01b0382166000908152606b602052604090205460ff1615158115151415610b255760405162461bcd60e51b815260206004820152602760248201527f526566657272616c4d616e616765723a3a73657448616e646c65723a3a416c726044820152661958591e54d95d60ca1b606482015260840161042f565b6001600160a01b0382166000818152606b6020908152604091829020805460ff19168515159081179091558251938452908301527fd373464a39404e5f98fdb4b152b8ba9a094561e97e5c4b4ea11eb18cd9e6695e91015b60405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000004614610bc85760405162461bcd60e51b815260040161042f9061150f565b6000828152606660205260409020546001600160a01b03163314610bfe5760405162461bcd60e51b815260040161042f906115f6565b60008281526066602090815260409182902080546001600160a01b0319166001600160a01b03851690811790915582518581523392810192909252918101919091527fa0304d35bd5f5a7399738488f9615c0af31f17e9e92982a27e5fa7e94121fd85906060015b60405180910390a161089f82826110b6565b336000908152606b602052604090205460ff16610cf05760405162461bcd60e51b815260206004820152603060248201527f526566657272616c4d616e616765723a3a7365745265666572726572436f646560448201526f2337b91d1d37b7363ca430b7323632b960811b606482015260840161042f565b6001600160a01b0382166000908152606d6020526040902054811461089f576001600160a01b0382166000818152606d60209081526040808320859055606e825291829020429055815192835282018390527f60750994fdf9995c19bee1ac3f38a6fbf271ecd405e8bd0d55c99f7f14f86e0f9101610b7d565b7f00000000000000000000000000000000000000000000000000000000000000004614610da95760405162461bcd60e51b815260040161042f9061150f565b81610e0e5760405162461bcd60e51b815260206004820152602f60248201527f526566657272616c4d616e616765723a3a72656769737465725265666572726160448201526e6c436f64653a3a5a65726f436f646560881b606482015260840161042f565b610e1782610a1a565b15610e7f5760405162461bcd60e51b815260206004820152603260248201527f526566657272616c4d616e616765723a3a7265676973746572526566657272616044820152716c436f64653a3a496e76616c6964436f646560701b606482015260840161042f565b60008281526066602090815260409182902080546001600160a01b0319163390811790915582519081529081018490527f93e8f987df019b8236630f5e68cee5fa4d36cc05fc26fd3d1b066801bb65cd0a9101610c66565b336000818152606d60209081526040808320859055606e825291829020429055815192835282018390527f60750994fdf9995c19bee1ac3f38a6fbf271ecd405e8bd0d55c99f7f14f86e0f910160405180910390a150565b60606069805480602002602001604051908101604052809291908181526020016000905b82821015610fb9576000848152602090819020604080516080810182529185015460ff8116835267ffffffffffffffff6101008204811684860152600160481b8204811692840192909252600160881b9004166060820152825260019092019101610f53565b50505050905090565b6033546001600160a01b03163314610fec5760405162461bcd60e51b815260040161042f9061156c565b6001600160a01b0381166110285760405162461bcd60e51b815260206004820152600360248201526204f3d360ec1b604482015260640161042f565b6033546001600160a01b038281169116141561106c5760405162461bcd60e51b81526020600482015260036024820152624f3d4f60e81b604482015260640161042f565b606580546001600160a01b0319166001600160a01b0383169081179091556040517fb501f5dc3610d10a179d924f686fc89ddcdd3abb05afd7a1baeead166b2f122c90600090a250565b6000828152606660205260408120546001600160a01b0390811691908316156110df57826110e1565b815b6000858152606c602090815260409182902080546001600160a01b0319166001600160a01b03858116918217909255835189815291871692820192909252918201529091507f5318876bb9b1e7ba33aae80c880cb398c7888ae233dac69e2e97a01f73cfd333906060016107c9565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166111c95760405162461bcd60e51b815260040161042f90611648565b610957600054610100900460ff166111f35760405162461bcd60e51b815260040161042f90611648565b610957600054610100900460ff1661121d5760405162461bcd60e51b815260040161042f90611648565b61095733611150565b634e487b7160e01b600052604160045260246000fd5b6040516080810167ffffffffffffffff8111828210171561125f5761125f611226565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561128e5761128e611226565b604052919050565b803567ffffffffffffffff81168114610a7757600080fd5b600060208083850312156112c157600080fd5b823567ffffffffffffffff808211156112d957600080fd5b818501915085601f8301126112ed57600080fd5b8135818111156112ff576112ff611226565b61130d848260051b01611265565b818152848101925060079190911b83018401908782111561132d57600080fd5b928401925b818410156113aa576080848903121561134b5760008081fd5b61135361123c565b843560ff811681146113655760008081fd5b8152611372858701611296565b868201526040611383818701611296565b908201526060611394868201611296565b9082015283526080939093019291840191611332565b979650505050505050565b6000602082840312156113c757600080fd5b5035919050565b80356001600160a01b0381168114610a7757600080fd5b600080604083850312156113f857600080fd5b82359150611408602084016113ce565b90509250929050565b60006020828403121561142357600080fd5b61142c826113ce565b9392505050565b6000806040838503121561144657600080fd5b61144f836113ce565b91506020830135801515811461146457600080fd5b809150509250929050565b6000806040838503121561148257600080fd5b61148b836113ce565b946020939093013593505050565b602080825282518282018190526000919060409081850190868401855b82811015611502578151805160ff1685528681015167ffffffffffffffff90811688870152868201518116878701526060918201511690850152608090930192908501906001016114b6565b5091979650505050505050565b60208082526038908201527f526566657272616c4d616e616765723a3a697356616c6964526566657272616c60408201527f436f64653a3a4f6e6c795072696d6172794e6574776f726b0000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60006000198214156115ef57634e487b7160e01b600052601160045260246000fd5b5060010190565b60208082526032908201527f526566657272616c4d616e616765723a3a73657452656261746552656369706960408201527132b73a1d1d27b7363ca1b7b232a7bbb732b960711b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea2646970667358221220032e39fb1eb8920b012b21cdadb1c20ce48dcd3d9b6472230e9aaf78599f581f64736f6c634300080a0033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061014d5760003560e01c80638f427ff2116100c3578063c362a66c1161007c578063c362a66c14610330578063ca1a82ad14610343578063d69fd7b914610356578063de170570146103a1578063f2fde38b146103b6578063f4d1f047146103c957600080fd5b80638f427ff21461029b57806393bc0a49146102bb5780639cb7de4b146102ce578063aa122229146102e1578063ae44d5321461030a578063bfb7d70d1461031d57600080fd5b80635d430302116101155780635d430302146102275780636053617214610268578063715018a6146102705780637efad8e0146102785780638129fc1c146102825780638da5cb5b1461028a57600080fd5b80632a8b9d11146101525780632ef3ac9d1461016757806334f5cfc9146101b357806344af2edb146101c657806346ea87af146101f4575b600080fd5b6101656101603660046112ae565b6103f0565b005b61017a6101753660046113b5565b6107d7565b6040805160ff909516855267ffffffffffffffff9384166020860152918316918401919091521660608201526080015b60405180910390f35b6101656101c13660046113e5565b610820565b6101e66101d4366004611411565b606d6020526000908152604090205481565b6040519081526020016101aa565b610217610202366004611411565b606b6020526000908152604090205460ff1681565b60405190151581526020016101aa565b6102506102353660046113b5565b6066602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016101aa565b6101656108a3565b610165610913565b6101e6620186a081565b610165610959565b6033546001600160a01b0316610250565b6101e66102a9366004611411565b606e6020526000908152604090205481565b6102176102c93660046113b5565b610a1a565b6101656102dc366004611433565b610a7c565b6102506102ef3660046113b5565b606c602052600090815260409020546001600160a01b031681565b6101656103183660046113e5565b610b89565b61016561032b36600461146f565b610c78565b61016561033e3660046113e5565b610d6a565b6101656103513660046113b5565b610ed7565b61038c610364366004611411565b6001600160a01b03166000908152606d6020908152604080832054606e909252909120549091565b604080519283526020830191909152016101aa565b6103a9610f2f565b6040516101aa9190611499565b6101656103c4366004611411565b610fc2565b6101e67f000000000000000000000000000000000000000000000000000000000000a4b181565b7f000000000000000000000000000000000000000000000000000000000000a4b146146104385760405162461bcd60e51b815260040161042f9061150f565b60405180910390fd5b6033546001600160a01b031633146104625760405162461bcd60e51b815260040161042f9061156c565b606954815160008183116104765781610478565b825b905060005b81811015610799578281106104c457606980548061049d5761049d6115a1565b600082815260209020810160001990810180546001600160c81b0319169055019055610787565b60008582815181106104d8576104d86115b7565b6020026020010151905081816000015160ff16146105495760405162461bcd60e51b815260206004820152602860248201527f526566657272616c4d616e616765723a3a736574546965723a3a546965724f756044820152673a27b327b93232b960c11b606482015260840161042f565b620186a0816040015167ffffffffffffffff1611156105bf5760405162461bcd60e51b815260206004820152602c60248201527f526566657272616c4d616e616765723a3a736574546965723a3a446973636f7560448201526b6e744f75744f6652616e676560a01b606482015260840161042f565b620186a0816060015167ffffffffffffffff1611156106375760405162461bcd60e51b815260206004820152602e60248201527f526566657272616c4d616e616765723a3a736574546965723a3a52656261746560448201526d526174654f75744f6652616e676560901b606482015260840161042f565b8482106106ed576069805460018101825560009190915281517f7fb4302e8e91f9110a6554c2c0a24601252c2a42c2220ca988efcfe399914308909101805460208401516040850151606086015160ff90951668ffffffffffffffffff199093169290921761010067ffffffffffffffff9283160217600160481b600160c81b031916600160481b9282169290920267ffffffffffffffff60881b191691909117600160881b9190931602919091179055610785565b8060698381548110610701576107016115b7565b600091825260209182902083519101805492840151604085015160609095015160ff90931668ffffffffffffffffff199094169390931761010067ffffffffffffffff9485160217600160481b600160c81b031916600160481b9484169490940267ffffffffffffffff60881b191693909317600160881b92909116919091021790555b505b80610791816115cd565b91505061047d565b507f906d4c093df21930319322a1f1566da2f4cd87bafdb7f5350a97b5faafc6cb3d846040516107c99190611499565b60405180910390a150505050565b606981815481106107e757600080fd5b60009182526020909120015460ff8116915067ffffffffffffffff6101008204811691600160481b8104821691600160881b9091041684565b7f000000000000000000000000000000000000000000000000000000000000a4b1461461085f5760405162461bcd60e51b815260040161042f9061150f565b6000828152606660205260409020546001600160a01b031633146108955760405162461bcd60e51b815260040161042f906115f6565b61089f82826110b6565b5050565b6065546001600160a01b0316336001600160a01b0316146108ec5760405162461bcd60e51b815260206004820152600360248201526214d39160ea1b604482015260640161042f565b606554610901906001600160a01b0316611150565b606580546001600160a01b0319169055565b6033546001600160a01b0316331461093d5760405162461bcd60e51b815260040161042f9061156c565b606580546001600160a01b03191690556109576000611150565b565b600054610100900460ff166109745760005460ff1615610978565b303b155b6109db5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161042f565b600054610100900460ff161580156109fd576000805461ffff19166101011790555b610a056111a2565b8015610a17576000805461ff00191690555b50565b60007f000000000000000000000000000000000000000000000000000000000000a4b14614610a5b5760405162461bcd60e51b815260040161042f9061150f565b506000818152606660205260409020546001600160a01b031615155b919050565b6033546001600160a01b03163314610aa65760405162461bcd60e51b815260040161042f9061156c565b6001600160a01b0382166000908152606b602052604090205460ff1615158115151415610b255760405162461bcd60e51b815260206004820152602760248201527f526566657272616c4d616e616765723a3a73657448616e646c65723a3a416c726044820152661958591e54d95d60ca1b606482015260840161042f565b6001600160a01b0382166000818152606b6020908152604091829020805460ff19168515159081179091558251938452908301527fd373464a39404e5f98fdb4b152b8ba9a094561e97e5c4b4ea11eb18cd9e6695e91015b60405180910390a15050565b7f000000000000000000000000000000000000000000000000000000000000a4b14614610bc85760405162461bcd60e51b815260040161042f9061150f565b6000828152606660205260409020546001600160a01b03163314610bfe5760405162461bcd60e51b815260040161042f906115f6565b60008281526066602090815260409182902080546001600160a01b0319166001600160a01b03851690811790915582518581523392810192909252918101919091527fa0304d35bd5f5a7399738488f9615c0af31f17e9e92982a27e5fa7e94121fd85906060015b60405180910390a161089f82826110b6565b336000908152606b602052604090205460ff16610cf05760405162461bcd60e51b815260206004820152603060248201527f526566657272616c4d616e616765723a3a7365745265666572726572436f646560448201526f2337b91d1d37b7363ca430b7323632b960811b606482015260840161042f565b6001600160a01b0382166000908152606d6020526040902054811461089f576001600160a01b0382166000818152606d60209081526040808320859055606e825291829020429055815192835282018390527f60750994fdf9995c19bee1ac3f38a6fbf271ecd405e8bd0d55c99f7f14f86e0f9101610b7d565b7f000000000000000000000000000000000000000000000000000000000000a4b14614610da95760405162461bcd60e51b815260040161042f9061150f565b81610e0e5760405162461bcd60e51b815260206004820152602f60248201527f526566657272616c4d616e616765723a3a72656769737465725265666572726160448201526e6c436f64653a3a5a65726f436f646560881b606482015260840161042f565b610e1782610a1a565b15610e7f5760405162461bcd60e51b815260206004820152603260248201527f526566657272616c4d616e616765723a3a7265676973746572526566657272616044820152716c436f64653a3a496e76616c6964436f646560701b606482015260840161042f565b60008281526066602090815260409182902080546001600160a01b0319163390811790915582519081529081018490527f93e8f987df019b8236630f5e68cee5fa4d36cc05fc26fd3d1b066801bb65cd0a9101610c66565b336000818152606d60209081526040808320859055606e825291829020429055815192835282018390527f60750994fdf9995c19bee1ac3f38a6fbf271ecd405e8bd0d55c99f7f14f86e0f910160405180910390a150565b60606069805480602002602001604051908101604052809291908181526020016000905b82821015610fb9576000848152602090819020604080516080810182529185015460ff8116835267ffffffffffffffff6101008204811684860152600160481b8204811692840192909252600160881b9004166060820152825260019092019101610f53565b50505050905090565b6033546001600160a01b03163314610fec5760405162461bcd60e51b815260040161042f9061156c565b6001600160a01b0381166110285760405162461bcd60e51b815260206004820152600360248201526204f3d360ec1b604482015260640161042f565b6033546001600160a01b038281169116141561106c5760405162461bcd60e51b81526020600482015260036024820152624f3d4f60e81b604482015260640161042f565b606580546001600160a01b0319166001600160a01b0383169081179091556040517fb501f5dc3610d10a179d924f686fc89ddcdd3abb05afd7a1baeead166b2f122c90600090a250565b6000828152606660205260408120546001600160a01b0390811691908316156110df57826110e1565b815b6000858152606c602090815260409182902080546001600160a01b0319166001600160a01b03858116918217909255835189815291871692820192909252918201529091507f5318876bb9b1e7ba33aae80c880cb398c7888ae233dac69e2e97a01f73cfd333906060016107c9565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166111c95760405162461bcd60e51b815260040161042f90611648565b610957600054610100900460ff166111f35760405162461bcd60e51b815260040161042f90611648565b610957600054610100900460ff1661121d5760405162461bcd60e51b815260040161042f90611648565b61095733611150565b634e487b7160e01b600052604160045260246000fd5b6040516080810167ffffffffffffffff8111828210171561125f5761125f611226565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561128e5761128e611226565b604052919050565b803567ffffffffffffffff81168114610a7757600080fd5b600060208083850312156112c157600080fd5b823567ffffffffffffffff808211156112d957600080fd5b818501915085601f8301126112ed57600080fd5b8135818111156112ff576112ff611226565b61130d848260051b01611265565b818152848101925060079190911b83018401908782111561132d57600080fd5b928401925b818410156113aa576080848903121561134b5760008081fd5b61135361123c565b843560ff811681146113655760008081fd5b8152611372858701611296565b868201526040611383818701611296565b908201526060611394868201611296565b9082015283526080939093019291840191611332565b979650505050505050565b6000602082840312156113c757600080fd5b5035919050565b80356001600160a01b0381168114610a7757600080fd5b600080604083850312156113f857600080fd5b82359150611408602084016113ce565b90509250929050565b60006020828403121561142357600080fd5b61142c826113ce565b9392505050565b6000806040838503121561144657600080fd5b61144f836113ce565b91506020830135801515811461146457600080fd5b809150509250929050565b6000806040838503121561148257600080fd5b61148b836113ce565b946020939093013593505050565b602080825282518282018190526000919060409081850190868401855b82811015611502578151805160ff1685528681015167ffffffffffffffff90811688870152868201518116878701526060918201511690850152608090930192908501906001016114b6565b5091979650505050505050565b60208082526038908201527f526566657272616c4d616e616765723a3a697356616c6964526566657272616c60408201527f436f64653a3a4f6e6c795072696d6172794e6574776f726b0000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60006000198214156115ef57634e487b7160e01b600052601160045260246000fd5b5060010190565b60208082526032908201527f526566657272616c4d616e616765723a3a73657452656261746552656369706960408201527132b73a1d1d27b7363ca1b7b232a7bbb732b960711b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea2646970667358221220032e39fb1eb8920b012b21cdadb1c20ce48dcd3d9b6472230e9aaf78599f581f64736f6c634300080a0033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]
[ Download: CSV Export  ]

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