MON Price: $0.019089 (+4.20%)

Contract

0xE02bC2Cb479Fbe2b1D78faBdA60746B0cfe03934

Overview

MON Balance

Monad Chain LogoMonad Chain LogoMonad Chain Logo0 MON

MON Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
EnableOnlyAssetsWhitelist

Compiler Version
v0.8.26+commit.8a97fa7a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, BSL 1.1 license

Contract Source Code (Solidity)

/**
 *Submitted for verification at monadscan.com on 2025-12-18
*/

// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0 ^0.8.20 ^0.8.3;

// lib/open-zeppelin/utils/Context.sol

// OpenZeppelin Contracts v4.4.1 (utils/Context.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 Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

// src/core/interfaces/IAggregatorV3Interface.sol

interface IAggregatorV3Interface {
  function decimals() external view returns (uint8);

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

  function version() external view returns (uint256);

  function getRoundData(
    uint80 _roundId
  ) external view returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);

  function latestRoundData()
    external
    view
    returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
}

// lib/open-zeppelin/token/ERC20/IERC20.sol

// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
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 amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

// src/core/interfaces/IEnableOnlyAssetsWhitelist.sol

interface IEnableOnlyAssetsWhitelist {
    error ZeroAddressError();
    error WhitelistLimitReached();
    error InvalidOraclePrice();
    error InvalidAddress();
    error ReferenceAssetNotPermitted();
    error InvalidDecimalPlaces();
    error AssetAlreadyEnabled();
    error StalePrice();
    error RoundNotComplete();
    error InvalidTimePeriod();
    error InvalidOracleTimestamp();

    struct OracleInfo {
        address oracleAddress;
        address tokenAddress;
        uint8 oracleDecimals;
        uint8 tokenDecimals;
    }

    function enableAsset(
        address depositableAssetAddr, 
        address oracleAddr,
        uint256 newOracleDuration
    ) external;

    function getWhitelistedAssets() external view returns (address[] memory);
    function isWhitelisted(address addr) external view returns (bool);
    function getOracleAddress(address assetAddr) external view returns (address);
    function fromInputAssetToReferenceAsset(address assetAddr, uint256 amount) external view returns (uint256);
    function getTotalAssetsValuation(uint256 externalAssets) external view returns (uint256);

    function convertToShares(
        address lpTokenAddress, 
        address assetInAddr,
        address vaultAddr,
        uint256 assetInAmount,
        uint256 externalAssets
    ) external view returns (uint256 shares, uint256 amountInReferenceTokens);

    function REFERENCE_ASSET() external view returns (address);
    function REFERENCE_ASSET_DECIMALS() external view returns (uint8);
}

// lib/open-zeppelin/utils/math/MathUpgradeable.sol

// OpenZeppelin Contracts (last updated v4.7.0) (utils/math/Math.sol)

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library MathUpgradeable {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator,
        Rounding rounding
    ) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10**64) {
                value /= 10**64;
                result += 64;
            }
            if (value >= 10**32) {
                value /= 10**32;
                result += 32;
            }
            if (value >= 10**16) {
                value /= 10**16;
                result += 16;
            }
            if (value >= 10**8) {
                value /= 10**8;
                result += 8;
            }
            if (value >= 10**4) {
                value /= 10**4;
                result += 4;
            }
            if (value >= 10**2) {
                value /= 10**2;
                result += 2;
            }
            if (value >= 10**1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);
        }
    }
}

// src/core/OwnableGuarded.sol

abstract contract OwnableGuarded {
    // ----------------------------------------------------------------------------------------------------
    // Constants
    // ----------------------------------------------------------------------------------------------------
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant NOT_ENTERED = 1;
    uint256 private constant ENTERED = 2;

    // ----------------------------------------------------------------------------------------------------
    // Errors
    // ----------------------------------------------------------------------------------------------------
    error OwnerOnly();
    error OwnerAddressRequired();
    error ReentrancyGuardReentrantCall();

    // ----------------------------------------------------------------------------------------------------
    // Storage layout
    // ----------------------------------------------------------------------------------------------------
    uint256 private _status;
    address internal _owner;

    // ----------------------------------------------------------------------------------------------------
    // Events
    // ----------------------------------------------------------------------------------------------------
    /**
     * @notice Triggers when contract ownership changes.
     * @param previousOwner The previous owner of the contract.
     * @param newOwner The new owner of the contract.
     */
    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    // ----------------------------------------------------------------------------------------------------
    // Modifiers
    // ----------------------------------------------------------------------------------------------------
    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

        // Any calls to nonReentrant after this point will fail
        _status = ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see https://eips.ethereum.org/EIPS/eip-2200)
        _status = NOT_ENTERED;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        if (msg.sender != _owner) revert OwnerOnly();
        _;
    }

    // ----------------------------------------------------------------------------------------------------
    // Functions
    // ----------------------------------------------------------------------------------------------------
    /**
     * @notice Transfers ownership of the contract to the account specified.
     * @param newOwner The address of the new owner.
     */
    function transferOwnership(address newOwner) external virtual nonReentrant onlyOwner {
        _transferOwnership(newOwner);
    }

    function _transferOwnership(address newOwner) internal virtual {
        if (newOwner == address(0)) revert OwnerAddressRequired();

        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }

    /**
     * @notice Gets the owner of the contract.
     * @return address The address who owns the contract.
     */
    function owner() external view virtual returns (address) {
        return _owner;
    }
}

// lib/open-zeppelin/token/ERC20/extensions/IERC20Metadata.sol

// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

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

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

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

// lib/open-zeppelin/token/ERC20/ERC20.sol

// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * The default value of {decimals} is 18. To change this, you should override
 * this function so it returns a different value.
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, allowance(owner, spender) + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        address owner = _msgSender();
        uint256 currentAllowance = allowance(owner, spender);
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(address from, address to, uint256 amount) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
            // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
            // decrementing then incrementing.
            _balances[to] += amount;
        }

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        unchecked {
            // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
            _balances[account] += amount;
        }
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
            // Overflow not possible: amount <= accountBalance <= totalSupply.
            _totalSupply -= amount;
        }

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(address owner, address spender, uint256 amount) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `amount`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

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

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}
}

// src/core/EnableOnlyAssetsWhitelist.sol

/**
 * @title Assets whitelist.
 * @dev Assets cannot be disabled once they're enabled. There is one whitelist per Reference Asset. 
 */
contract EnableOnlyAssetsWhitelist is IEnableOnlyAssetsWhitelist, OwnableGuarded {
    using MathUpgradeable for uint256;

    // --------------------------------------------------------------------------
    // Storage layout
    // --------------------------------------------------------------------------
    /// @dev The list of whitelisted assets
    address[] internal _whitelistedAssets;

    /// @notice The address of the reference asset
    address public immutable override REFERENCE_ASSET;

    /// @notice The decimal places of the reference asset
    uint8 public immutable override REFERENCE_ASSET_DECIMALS;

    /// @dev Tracks the oracle assigned to a synthetic pair (input asset => OracleInfo)
    mapping (address => OracleInfo) internal _oracleOfInputAsset;

    /// @notice The difference between the current timestamp and the quote from the external oracle, expressed in seconds.
    mapping (address => uint256) public maxOracleUpdatesDuration;

    // --------------------------------------------------------------------------
    // Constructor
    // --------------------------------------------------------------------------
    constructor(address ownerAddr, address referenceAssetAddr) {
        if (ownerAddr == address(0)) revert OwnerAddressRequired();
        if (referenceAssetAddr == address(0)) revert InvalidAddress();

        _owner = ownerAddr;
        REFERENCE_ASSET = referenceAssetAddr;
        REFERENCE_ASSET_DECIMALS = ERC20(referenceAssetAddr).decimals();
    }

    // --------------------------------------------------------------------------
    // Functions
    // --------------------------------------------------------------------------
    /**
     * @notice Enables the asset specified.
     * @dev Enabling an asset requires assigning an oracle to the synthetic pair.
     * @param assetAddr The address of the asset to enable.
     * @param oracleAddr The oracle assigned to the asset specified.
     * @param newOracleDuration The lag accepted on the oracle of this asset
     */
    function enableAsset(
        address assetAddr, 
        address oracleAddr,
        uint256 newOracleDuration
    ) external override nonReentrant onlyOwner {
        if ((oracleAddr == address(0)) || (assetAddr == address(0))) revert ZeroAddressError();
        if (_whitelistedAssets.length > 30) revert WhitelistLimitReached();
        if (assetAddr == REFERENCE_ASSET) revert ReferenceAssetNotPermitted();

        // Make sure the asset is not duplicated
        if (_oracleOfInputAsset[assetAddr].tokenAddress != address(0)) revert AssetAlreadyEnabled();
        _whitelistedAssets.push(assetAddr);

        uint8 tokenDecimals = ERC20(assetAddr).decimals();
        
        // Make sure the token has 6 decimal positions at least
        if (tokenDecimals < 6) revert InvalidDecimalPlaces();

        uint8 oracleDecimals = IAggregatorV3Interface(oracleAddr).decimals();

        _oracleOfInputAsset[assetAddr] = OracleInfo({
            oracleAddress: oracleAddr,
            tokenAddress: assetAddr,
            oracleDecimals: oracleDecimals,
            tokenDecimals: tokenDecimals
        });

        maxOracleUpdatesDuration[assetAddr] = newOracleDuration;
    }

    /**
     * @notice Updates the maximum lag of oracles.
     * @param newMaxOracleUpdatesDuration The lag we are willing to accept.
     * @param assetAddr The asset address
     */
    function updateOracleLagDuration(uint256 newMaxOracleUpdatesDuration, address assetAddr) external nonReentrant onlyOwner {
        maxOracleUpdatesDuration[assetAddr] = newMaxOracleUpdatesDuration;
    }

    /**
     * @notice Shares conversion function.
     * @param lpTokenAddress The address of the LP token.
     * @param assetInAddr The address of the deposit token.
     * @param vaultAddr The address of the vault.
     * @param assetInAmount The deposit amount.
     * @param externalAssets The external assets reported by the vault.
     * @return shares The number of shares
     * @return amountInReferenceTokens The amount expressed in reference tokens
     */
    function convertToShares(
        address lpTokenAddress, 
        address assetInAddr,
        address vaultAddr,
        uint256 assetInAmount,
        uint256 externalAssets
    ) external view override returns (
        uint256 shares, 
        uint256 amountInReferenceTokens
    ) {
        if (assetInAmount < 1) return (0, 0);

        uint256 tSupply = IERC20(lpTokenAddress).totalSupply();
        amountInReferenceTokens = (assetInAddr == REFERENCE_ASSET) ? assetInAmount : _fromInputAssetToReferenceAsset(assetInAddr, assetInAmount);
        uint256 totalAssetsInReferenceTokens = _getTotalAssetsValuation(vaultAddr, externalAssets);

        shares = (tSupply < 1) ? amountInReferenceTokens : amountInReferenceTokens.mulDiv(tSupply, totalAssetsInReferenceTokens, MathUpgradeable.Rounding.Down);
    }

    /**
     * @notice Gets the oracle assigned to the asset specified.
     * @return address Returns the address of the oracle.
     */
    function getOracleAddress(address assetAddr) external view override returns (address) {
        return _oracleOfInputAsset[assetAddr].oracleAddress;
    }

    /**
     * @notice Indicates if a given asset is whitelisted.
     * @return bool Returns true if the asset is whitelisted.
     */
    function isWhitelisted(address assetAddr) external view override returns (bool) {
        return _oracleOfInputAsset[assetAddr].oracleAddress != address(0);
    }

    /**
     * @notice Gets the list of whitelisted assets.
     * @return address[] Returns an array of asset addresses.
     */
    function getWhitelistedAssets() external view override returns (address[] memory) {
        return _whitelistedAssets;
    }

    /**
     * @notice Converts the input amount into the respective amount of reference tokens.
     * @param assetAddr The asset address.
     * @param amount The asset amount.
     */
    function fromInputAssetToReferenceAsset(
        address assetAddr, 
        uint256 amount
    ) external view override returns (uint256) {
        return _fromInputAssetToReferenceAsset(assetAddr, amount);
    }

    /**
     * @notice Gets the valuation (total assets) of the sender specified. The sender is a vault.
     * @param externalAssets The external assets reported by the vault.
     * @return uint256 The total valuation of the vault.
     */
    function getTotalAssetsValuation(uint256 externalAssets) external view override returns (uint256) {
        return _getTotalAssetsValuation(msg.sender, externalAssets);
    }

    function _convertToAssets(
        address vaultAddr,
        address lpTokenAddress, 
        uint256 externalAssets, 
        uint256 shares, 
        MathUpgradeable.Rounding rounding
    ) internal view returns (uint256) {
        uint256 tSupply = IERC20(lpTokenAddress).totalSupply();
        return (tSupply < 1) ? shares : shares.mulDiv(_getTotalAssetsValuation(vaultAddr, externalAssets), tSupply, rounding);
    }

    /// @dev Calculates the valuation of the vault specified. The result is expressed in reference tokens.
    function _getTotalAssetsValuation(
        address vaultAddr,
        uint256 externalAssets
    ) internal view returns (uint256) {
        address assetAddr;
        uint256 assetBalance;
        uint256 balanceInReferenceTokens;
        uint256 t = _whitelistedAssets.length;

        uint256 acum = externalAssets + IERC20(REFERENCE_ASSET).balanceOf(vaultAddr);

        for (uint256 i; i < t; i++) {
            assetAddr = _whitelistedAssets[i];
            assetBalance = IERC20(assetAddr).balanceOf(vaultAddr);

            if (assetBalance > 0) {
                balanceInReferenceTokens = _fromInputAssetToReferenceAsset(assetAddr, assetBalance);
                acum += balanceInReferenceTokens;
            }
        }

        // External assets + multi assets liquidity + liquidity of the reference token
        return acum;
    }

    /// @dev Converts the input amount into the respective amount of reference tokens
    function _fromInputAssetToReferenceAsset(
        address assetAddr, 
        uint256 amount
    ) internal view returns (uint256) {
        address oracleAddr = _oracleOfInputAsset[assetAddr].oracleAddress;
        uint8 tokenDecimals = _oracleOfInputAsset[assetAddr].tokenDecimals;
        uint8 oracleDecimals = _oracleOfInputAsset[assetAddr].oracleDecimals;

        // Query the external Oracle
        (
            uint80 quoteRoundId, 
            int256 quoteAnswer,
            , 
            uint256 quoteTimestamp, 
            uint80 quoteAnsweredInRound
        ) = IAggregatorV3Interface(oracleAddr).latestRoundData();

        // Validate the Oracle's response
        if (quoteAnswer < 1) revert InvalidOraclePrice();
        if (quoteAnsweredInRound < quoteRoundId) revert StalePrice();
        if (quoteTimestamp < 1) revert RoundNotComplete();
        if (quoteTimestamp > block.timestamp) revert InvalidOracleTimestamp(); // Cannot trust in the external contract/oracle, thus the check.
        if (block.timestamp - quoteTimestamp > maxOracleUpdatesDuration[assetAddr]) revert InvalidTimePeriod();

        // Distance between the decimals of the oracle and the decimals of the token
        uint256 d1 = (oracleDecimals > tokenDecimals) ? 10 ** (oracleDecimals - tokenDecimals) : 1;
        uint256 d2 = (REFERENCE_ASSET_DECIMALS > oracleDecimals) ? 10 ** (REFERENCE_ASSET_DECIMALS - oracleDecimals) : 1;
        uint256 amountInNormalized = amount * d1;

        // Distance between the maximum scale and the scale provided by the oracle
        uint256 d3 = 10 ** (18 - oracleDecimals);
        uint256 ratio = (10 ** oracleDecimals) * d3 / uint256(quoteAnswer); // Scaled to d2
        uint256 result = ratio * amountInNormalized * d2 / d3;

        if (tokenDecimals == REFERENCE_ASSET_DECIMALS) {
            if (REFERENCE_ASSET_DECIMALS == 6) {
                result /= d1;
            }
            else if (REFERENCE_ASSET_DECIMALS > 17) {
                ratio = uint256(quoteAnswer);
                result = ratio * amountInNormalized * d2 / d3 / 1e18;                
            }
        }

        if (REFERENCE_ASSET_DECIMALS == 6) {
            if (tokenDecimals == 18) result /= 1e12;
            else if (tokenDecimals == 8) result /= 1e2;
        }

        return result;
    }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"ownerAddr","type":"address"},{"internalType":"address","name":"referenceAssetAddr","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AssetAlreadyEnabled","type":"error"},{"inputs":[],"name":"InvalidAddress","type":"error"},{"inputs":[],"name":"InvalidDecimalPlaces","type":"error"},{"inputs":[],"name":"InvalidOraclePrice","type":"error"},{"inputs":[],"name":"InvalidOracleTimestamp","type":"error"},{"inputs":[],"name":"InvalidTimePeriod","type":"error"},{"inputs":[],"name":"OwnerAddressRequired","type":"error"},{"inputs":[],"name":"OwnerOnly","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[],"name":"ReferenceAssetNotPermitted","type":"error"},{"inputs":[],"name":"RoundNotComplete","type":"error"},{"inputs":[],"name":"StalePrice","type":"error"},{"inputs":[],"name":"WhitelistLimitReached","type":"error"},{"inputs":[],"name":"ZeroAddressError","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"REFERENCE_ASSET","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REFERENCE_ASSET_DECIMALS","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"lpTokenAddress","type":"address"},{"internalType":"address","name":"assetInAddr","type":"address"},{"internalType":"address","name":"vaultAddr","type":"address"},{"internalType":"uint256","name":"assetInAmount","type":"uint256"},{"internalType":"uint256","name":"externalAssets","type":"uint256"}],"name":"convertToShares","outputs":[{"internalType":"uint256","name":"shares","type":"uint256"},{"internalType":"uint256","name":"amountInReferenceTokens","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"assetAddr","type":"address"},{"internalType":"address","name":"oracleAddr","type":"address"},{"internalType":"uint256","name":"newOracleDuration","type":"uint256"}],"name":"enableAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"assetAddr","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"fromInputAssetToReferenceAsset","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"assetAddr","type":"address"}],"name":"getOracleAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"externalAssets","type":"uint256"}],"name":"getTotalAssetsValuation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getWhitelistedAssets","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"assetAddr","type":"address"}],"name":"isWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"maxOracleUpdatesDuration","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":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMaxOracleUpdatesDuration","type":"uint256"},{"internalType":"address","name":"assetAddr","type":"address"}],"name":"updateOracleLagDuration","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c060405234801561000f575f80fd5b5060405161148f38038061148f83398101604081905261002e91610129565b6001600160a01b0382166100555760405163156fee5160e31b815260040160405180910390fd5b6001600160a01b03811661007c5760405163e6c4247b60e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0384811691909117909155811660808190526040805163313ce56760e01b8152905163313ce567916004808201926020929091908290030181865afa1580156100dc573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610100919061015a565b60ff1660a052506101819050565b80516001600160a01b0381168114610124575f80fd5b919050565b5f806040838503121561013a575f80fd5b6101438361010e565b91506101516020840161010e565b90509250929050565b5f6020828403121561016a575f80fd5b815160ff8116811461017a575f80fd5b9392505050565b60805160a0516112af6101e05f395f818160d4015281816109b4015281816109e801528181610a8801528181610ab501528181610af30152610b5601525f818161025b0152818161037b015281816105310152610bf901526112af5ff3fe608060405234801561000f575f80fd5b50600436106100cb575f3560e01c80638da5cb5b11610088578063c8d2df5611610063578063c8d2df5614610230578063d861811514610243578063ded4a6fe14610256578063f2fde38b1461027d575f80fd5b80638da5cb5b146101f7578063a22484d914610208578063ad0780211461021d575f80fd5b8063304cef9d146100cf5780633af32abf1461010d57806348ad6f5c1461014a578063544821731461015f57806356f1b546146101a2578063803bc5e2146101ca575b5f80fd5b6100f67f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020015b60405180910390f35b61013a61011b366004610ecd565b6001600160a01b039081165f9081526003602052604090205416151590565b6040519015158152602001610104565b61015d610158366004610ee6565b610290565b005b61018a61016d366004610ecd565b6001600160a01b039081165f908152600360205260409020541690565b6040516001600160a01b039091168152602001610104565b6101b56101b0366004610f10565b610301565b60408051928352602083019190915201610104565b6101e96101d8366004610ecd565b60046020525f908152604090205481565b604051908152602001610104565b6001546001600160a01b031661018a565b6102106103fc565b6040516101049190610f61565b6101e961022b366004610fac565b61045c565b6101e961023e366004610fc3565b61046d565b61015d610251366004610feb565b61047f565b61018a7f000000000000000000000000000000000000000000000000000000000000000081565b61015d61028b366004610ecd565b610797565b60025f54036102b257604051633ee5aeb560e01b815260040160405180910390fd5b60025f556001546001600160a01b031633146102e157604051630b2db9b760e31b815260040160405180910390fd5b6001600160a01b03165f9081526004602052604081209190915560019055565b5f80600184101561031657505f9050806103f2565b5f876001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610353573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103779190611025565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316876001600160a01b0316146103c1576103bc87866107f8565b6103c3565b845b91505f6103d08786610bcc565b9050600182106103eb576103e68383835f610d37565b6103ed565b825b935050505b9550959350505050565b6060600280548060200260200160405190810160405280929190818152602001828054801561045257602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610434575b5050505050905090565b5f6104673383610bcc565b92915050565b5f61047883836107f8565b9392505050565b60025f54036104a157604051633ee5aeb560e01b815260040160405180910390fd5b60025f556001546001600160a01b031633146104d057604051630b2db9b760e31b815260040160405180910390fd5b6001600160a01b03821615806104ed57506001600160a01b038316155b1561050b57604051633efa09af60e01b815260040160405180910390fd5b600254601e101561052f5760405163be8f94e960e01b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b031603610581576040516319fc848960e21b815260040160405180910390fd5b6001600160a01b038381165f9081526003602052604090206001015416156105bc57604051635405c10760e11b815260040160405180910390fd5b600280546001810182555f9182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b0319166001600160a01b0386169081179091556040805163313ce56760e01b8152905163313ce567916004808201926020929091908290030181865afa158015610641573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610665919061103c565b905060068160ff16101561068c57604051630da74dab60e01b815260040160405180910390fd5b5f836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106c9573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106ed919061103c565b604080516080810182526001600160a01b039687168152968616602080890182815260ff9485168a850190815296851660608b019081525f938452600383528484209a518b54908b166001600160a01b0319909116178b55905160019a8b018054985192518716600160a81b0260ff60a81b1993909716600160a01b026001600160a81b031990991691909a16179690961795909516929092179095556004909252509182205555565b60025f54036107b957604051633ee5aeb560e01b815260040160405180910390fd5b60025f556001546001600160a01b031633146107e857604051630b2db9b760e31b815260040160405180910390fd5b6107f181610d92565b5060015f55565b6001600160a01b038083165f9081526003602052604080822080546001909101548251633fabe5a360e21b815292519394919091169260ff600160a81b8304811693600160a01b90930416918591829182918291889163feaf968c9160048082019260a0929091908290030181865afa158015610877573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061089b9190611075565b94509450509350935060018312156108c55760405162fc7cad60e51b815260040160405180910390fd5b8369ffffffffffffffffffff168169ffffffffffffffffffff1610156108fe57604051630cd5fa0760e11b815260040160405180910390fd5b600182101561091f5760405162ace4c560e51b815260040160405180910390fd5b42821115610940576040516352c4db3960e11b815260040160405180910390fd5b6001600160a01b038a165f9081526004602052604090205461096283426110d7565b1115610981576040516329fc802760e11b815260040160405180910390fd5b5f8660ff168660ff16116109965760016109ab565b6109a087876110ea565b6109ab90600a6111e6565b90505f8660ff167f000000000000000000000000000000000000000000000000000000000000000060ff16116109e2576001610a17565b610a0c877f00000000000000000000000000000000000000000000000000000000000000006110ea565b610a1790600a6111e6565b90505f610a24838d6111f4565b90505f610a328960126110ea565b610a3d90600a6111e6565b90505f8782610a4d8c600a6111e6565b610a5791906111f4565b610a61919061121f565b90505f8285610a7086856111f4565b610a7a91906111f4565b610a84919061121f565b90507f000000000000000000000000000000000000000000000000000000000000000060ff168c60ff1603610b54577f000000000000000000000000000000000000000000000000000000000000000060ff16600603610aef57610ae8868261121f565b9050610b54565b60117f000000000000000000000000000000000000000000000000000000000000000060ff161115610b5457889150670de0b6b3a76400008386610b3387866111f4565b610b3d91906111f4565b610b47919061121f565b610b51919061121f565b90505b7f000000000000000000000000000000000000000000000000000000000000000060ff16600603610bb9578b60ff16601203610ba057610b9964e8d4a510008261121f565b9050610bb9565b8b60ff16600803610bb957610bb660648261121f565b90505b9f9e505050505050505050505050505050565b6002546040516370a0823160e01b81526001600160a01b0384811660048301525f928392839283929183917f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015610c3e573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c629190611025565b610c6c908861123e565b90505f5b82811015610d2b5760028181548110610c8b57610c8b611251565b5f918252602090912001546040516370a0823160e01b81526001600160a01b038b81166004830152909116965086906370a0823190602401602060405180830381865afa158015610cde573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d029190611025565b94508415610d2357610d1486866107f8565b9350610d20848361123e565b91505b600101610c70565b50979650505050505050565b5f80610d44868686610e0a565b90506001836002811115610d5a57610d5a611265565b148015610d7657505f8480610d7157610d7161120b565b868809115b15610d8957610d8660018261123e565b90505b95945050505050565b6001600160a01b038116610db95760405163156fee5160e31b815260040160405180910390fd5b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f80805f19858709858702925082811083820303915050805f03610e4157838281610e3757610e3761120b565b0492505050610478565b808411610e4c575f80fd5b5f84868809600260036001881981018916988990049182028318808302840302808302840302808302840302808302840302808302840302918202909203025f889003889004909101858311909403939093029303949094049190911702949350505050565b80356001600160a01b0381168114610ec8575f80fd5b919050565b5f60208284031215610edd575f80fd5b61047882610eb2565b5f8060408385031215610ef7575f80fd5b82359150610f0760208401610eb2565b90509250929050565b5f805f805f60a08688031215610f24575f80fd5b610f2d86610eb2565b9450610f3b60208701610eb2565b9350610f4960408701610eb2565b94979396509394606081013594506080013592915050565b602080825282518282018190525f918401906040840190835b81811015610fa15783516001600160a01b0316835260209384019390920191600101610f7a565b509095945050505050565b5f60208284031215610fbc575f80fd5b5035919050565b5f8060408385031215610fd4575f80fd5b610fdd83610eb2565b946020939093013593505050565b5f805f60608486031215610ffd575f80fd5b61100684610eb2565b925061101460208501610eb2565b929592945050506040919091013590565b5f60208284031215611035575f80fd5b5051919050565b5f6020828403121561104c575f80fd5b815160ff81168114610478575f80fd5b805169ffffffffffffffffffff81168114610ec8575f80fd5b5f805f805f60a08688031215611089575f80fd5b6110928661105c565b602087015160408801516060890151929750909550935091506110b76080870161105c565b90509295509295909350565b634e487b7160e01b5f52601160045260245ffd5b81810381811115610467576104676110c3565b60ff8281168282160390811115610467576104676110c3565b6001815b600184111561113e57808504811115611122576111226110c3565b600184161561113057908102905b60019390931c928002611107565b935093915050565b5f8261115457506001610467565b8161116057505f610467565b816001811461117657600281146111805761119c565b6001915050610467565b60ff841115611191576111916110c3565b50506001821b610467565b5060208310610133831016604e8410600b84101617156111bf575081810a610467565b6111cb5f198484611103565b805f19048211156111de576111de6110c3565b029392505050565b5f61047860ff841683611146565b8082028115828204841417610467576104676110c3565b634e487b7160e01b5f52601260045260245ffd5b5f8261123957634e487b7160e01b5f52601260045260245ffd5b500490565b80820180821115610467576104676110c3565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52602160045260245ffdfea26469706673582212204a6c7c46697a9cbc74561e28da4cf8e0773ba2b0214768b9d0c2f3938472b11664736f6c634300081a0033000000000000000000000000c573100a879f480c9ae5290f865a1e354f4ba67f00000000000000000000000000000000efe302beaa2b3e6e1b18d08d69a9012a

Deployed Bytecode

0x608060405234801561000f575f80fd5b50600436106100cb575f3560e01c80638da5cb5b11610088578063c8d2df5611610063578063c8d2df5614610230578063d861811514610243578063ded4a6fe14610256578063f2fde38b1461027d575f80fd5b80638da5cb5b146101f7578063a22484d914610208578063ad0780211461021d575f80fd5b8063304cef9d146100cf5780633af32abf1461010d57806348ad6f5c1461014a578063544821731461015f57806356f1b546146101a2578063803bc5e2146101ca575b5f80fd5b6100f67f000000000000000000000000000000000000000000000000000000000000000681565b60405160ff90911681526020015b60405180910390f35b61013a61011b366004610ecd565b6001600160a01b039081165f9081526003602052604090205416151590565b6040519015158152602001610104565b61015d610158366004610ee6565b610290565b005b61018a61016d366004610ecd565b6001600160a01b039081165f908152600360205260409020541690565b6040516001600160a01b039091168152602001610104565b6101b56101b0366004610f10565b610301565b60408051928352602083019190915201610104565b6101e96101d8366004610ecd565b60046020525f908152604090205481565b604051908152602001610104565b6001546001600160a01b031661018a565b6102106103fc565b6040516101049190610f61565b6101e961022b366004610fac565b61045c565b6101e961023e366004610fc3565b61046d565b61015d610251366004610feb565b61047f565b61018a7f00000000000000000000000000000000efe302beaa2b3e6e1b18d08d69a9012a81565b61015d61028b366004610ecd565b610797565b60025f54036102b257604051633ee5aeb560e01b815260040160405180910390fd5b60025f556001546001600160a01b031633146102e157604051630b2db9b760e31b815260040160405180910390fd5b6001600160a01b03165f9081526004602052604081209190915560019055565b5f80600184101561031657505f9050806103f2565b5f876001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610353573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103779190611025565b90507f00000000000000000000000000000000efe302beaa2b3e6e1b18d08d69a9012a6001600160a01b0316876001600160a01b0316146103c1576103bc87866107f8565b6103c3565b845b91505f6103d08786610bcc565b9050600182106103eb576103e68383835f610d37565b6103ed565b825b935050505b9550959350505050565b6060600280548060200260200160405190810160405280929190818152602001828054801561045257602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610434575b5050505050905090565b5f6104673383610bcc565b92915050565b5f61047883836107f8565b9392505050565b60025f54036104a157604051633ee5aeb560e01b815260040160405180910390fd5b60025f556001546001600160a01b031633146104d057604051630b2db9b760e31b815260040160405180910390fd5b6001600160a01b03821615806104ed57506001600160a01b038316155b1561050b57604051633efa09af60e01b815260040160405180910390fd5b600254601e101561052f5760405163be8f94e960e01b815260040160405180910390fd5b7f00000000000000000000000000000000efe302beaa2b3e6e1b18d08d69a9012a6001600160a01b0316836001600160a01b031603610581576040516319fc848960e21b815260040160405180910390fd5b6001600160a01b038381165f9081526003602052604090206001015416156105bc57604051635405c10760e11b815260040160405180910390fd5b600280546001810182555f9182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b0319166001600160a01b0386169081179091556040805163313ce56760e01b8152905163313ce567916004808201926020929091908290030181865afa158015610641573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610665919061103c565b905060068160ff16101561068c57604051630da74dab60e01b815260040160405180910390fd5b5f836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106c9573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106ed919061103c565b604080516080810182526001600160a01b039687168152968616602080890182815260ff9485168a850190815296851660608b019081525f938452600383528484209a518b54908b166001600160a01b0319909116178b55905160019a8b018054985192518716600160a81b0260ff60a81b1993909716600160a01b026001600160a81b031990991691909a16179690961795909516929092179095556004909252509182205555565b60025f54036107b957604051633ee5aeb560e01b815260040160405180910390fd5b60025f556001546001600160a01b031633146107e857604051630b2db9b760e31b815260040160405180910390fd5b6107f181610d92565b5060015f55565b6001600160a01b038083165f9081526003602052604080822080546001909101548251633fabe5a360e21b815292519394919091169260ff600160a81b8304811693600160a01b90930416918591829182918291889163feaf968c9160048082019260a0929091908290030181865afa158015610877573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061089b9190611075565b94509450509350935060018312156108c55760405162fc7cad60e51b815260040160405180910390fd5b8369ffffffffffffffffffff168169ffffffffffffffffffff1610156108fe57604051630cd5fa0760e11b815260040160405180910390fd5b600182101561091f5760405162ace4c560e51b815260040160405180910390fd5b42821115610940576040516352c4db3960e11b815260040160405180910390fd5b6001600160a01b038a165f9081526004602052604090205461096283426110d7565b1115610981576040516329fc802760e11b815260040160405180910390fd5b5f8660ff168660ff16116109965760016109ab565b6109a087876110ea565b6109ab90600a6111e6565b90505f8660ff167f000000000000000000000000000000000000000000000000000000000000000660ff16116109e2576001610a17565b610a0c877f00000000000000000000000000000000000000000000000000000000000000066110ea565b610a1790600a6111e6565b90505f610a24838d6111f4565b90505f610a328960126110ea565b610a3d90600a6111e6565b90505f8782610a4d8c600a6111e6565b610a5791906111f4565b610a61919061121f565b90505f8285610a7086856111f4565b610a7a91906111f4565b610a84919061121f565b90507f000000000000000000000000000000000000000000000000000000000000000660ff168c60ff1603610b54577f000000000000000000000000000000000000000000000000000000000000000660ff16600603610aef57610ae8868261121f565b9050610b54565b60117f000000000000000000000000000000000000000000000000000000000000000660ff161115610b5457889150670de0b6b3a76400008386610b3387866111f4565b610b3d91906111f4565b610b47919061121f565b610b51919061121f565b90505b7f000000000000000000000000000000000000000000000000000000000000000660ff16600603610bb9578b60ff16601203610ba057610b9964e8d4a510008261121f565b9050610bb9565b8b60ff16600803610bb957610bb660648261121f565b90505b9f9e505050505050505050505050505050565b6002546040516370a0823160e01b81526001600160a01b0384811660048301525f928392839283929183917f00000000000000000000000000000000efe302beaa2b3e6e1b18d08d69a9012a16906370a0823190602401602060405180830381865afa158015610c3e573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c629190611025565b610c6c908861123e565b90505f5b82811015610d2b5760028181548110610c8b57610c8b611251565b5f918252602090912001546040516370a0823160e01b81526001600160a01b038b81166004830152909116965086906370a0823190602401602060405180830381865afa158015610cde573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d029190611025565b94508415610d2357610d1486866107f8565b9350610d20848361123e565b91505b600101610c70565b50979650505050505050565b5f80610d44868686610e0a565b90506001836002811115610d5a57610d5a611265565b148015610d7657505f8480610d7157610d7161120b565b868809115b15610d8957610d8660018261123e565b90505b95945050505050565b6001600160a01b038116610db95760405163156fee5160e31b815260040160405180910390fd5b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f80805f19858709858702925082811083820303915050805f03610e4157838281610e3757610e3761120b565b0492505050610478565b808411610e4c575f80fd5b5f84868809600260036001881981018916988990049182028318808302840302808302840302808302840302808302840302808302840302918202909203025f889003889004909101858311909403939093029303949094049190911702949350505050565b80356001600160a01b0381168114610ec8575f80fd5b919050565b5f60208284031215610edd575f80fd5b61047882610eb2565b5f8060408385031215610ef7575f80fd5b82359150610f0760208401610eb2565b90509250929050565b5f805f805f60a08688031215610f24575f80fd5b610f2d86610eb2565b9450610f3b60208701610eb2565b9350610f4960408701610eb2565b94979396509394606081013594506080013592915050565b602080825282518282018190525f918401906040840190835b81811015610fa15783516001600160a01b0316835260209384019390920191600101610f7a565b509095945050505050565b5f60208284031215610fbc575f80fd5b5035919050565b5f8060408385031215610fd4575f80fd5b610fdd83610eb2565b946020939093013593505050565b5f805f60608486031215610ffd575f80fd5b61100684610eb2565b925061101460208501610eb2565b929592945050506040919091013590565b5f60208284031215611035575f80fd5b5051919050565b5f6020828403121561104c575f80fd5b815160ff81168114610478575f80fd5b805169ffffffffffffffffffff81168114610ec8575f80fd5b5f805f805f60a08688031215611089575f80fd5b6110928661105c565b602087015160408801516060890151929750909550935091506110b76080870161105c565b90509295509295909350565b634e487b7160e01b5f52601160045260245ffd5b81810381811115610467576104676110c3565b60ff8281168282160390811115610467576104676110c3565b6001815b600184111561113e57808504811115611122576111226110c3565b600184161561113057908102905b60019390931c928002611107565b935093915050565b5f8261115457506001610467565b8161116057505f610467565b816001811461117657600281146111805761119c565b6001915050610467565b60ff841115611191576111916110c3565b50506001821b610467565b5060208310610133831016604e8410600b84101617156111bf575081810a610467565b6111cb5f198484611103565b805f19048211156111de576111de6110c3565b029392505050565b5f61047860ff841683611146565b8082028115828204841417610467576104676110c3565b634e487b7160e01b5f52601260045260245ffd5b5f8261123957634e487b7160e01b5f52601260045260245ffd5b500490565b80820180821115610467576104676110c3565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52602160045260245ffdfea26469706673582212204a6c7c46697a9cbc74561e28da4cf8e0773ba2b0214768b9d0c2f3938472b11664736f6c634300081a0033

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

000000000000000000000000c573100a879f480c9ae5290f865a1e354f4ba67f00000000000000000000000000000000efe302beaa2b3e6e1b18d08d69a9012a

-----Decoded View---------------
Arg [0] : ownerAddr (address): 0xc573100a879f480c9AE5290f865a1e354F4BA67F
Arg [1] : referenceAssetAddr (address): 0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000c573100a879f480c9ae5290f865a1e354f4ba67f
Arg [1] : 00000000000000000000000000000000efe302beaa2b3e6e1b18d08d69a9012a


Deployed Bytecode Sourcemap

37419:10646:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;37998:56;;;;;;;;186:4:1;174:17;;;156:36;;144:2;129:18;37998:56:0;;;;;;;;42890:164;;;;;;:::i;:::-;-1:-1:-1;;;;;42988:30:0;;;42964:4;42988:30;;;:19;:30;;;;;:44;;:58;;;42890:164;;;;737:14:1;;730:22;712:41;;700:2;685:18;42890:164:0;572:187:1;40913:205:0;;;;;;:::i;:::-;;:::i;:::-;;42586:156;;;;;;:::i;:::-;-1:-1:-1;;;;;42690:30:0;;;42663:7;42690:30;;;:19;:30;;;;;:44;;;42586:156;;;;-1:-1:-1;;;;;1233:32:1;;;1215:51;;1203:2;1188:18;42586:156:0;1069:203:1;41606:830:0;;;;;;:::i;:::-;;:::i;:::-;;;;2026:25:1;;;2082:2;2067:18;;2060:34;;;;1999:18;41606:830:0;1852:248:1;38345:60:0;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;2251:25:1;;;2239:2;2224:18;38345:60:0;2105:177:1;23351:89:0;23426:6;;-1:-1:-1;;;;;23426:6:0;23351:89;;43196:126;;;:::i;:::-;;;;;;;:::i;43995:176::-;;;;;;:::i;:::-;;:::i;43522:218::-;;;;;;:::i;:::-;;:::i;39507:1208::-;;;;;;:::i;:::-;;:::i;37881:49::-;;;;;22817:132;;;;;;:::i;:::-;;:::i;40913:205::-;19979:1;21878:7;;:18;21874:88;;21920:30;;-1:-1:-1;;;21920:30:0;;;;;;;;;;;21874:88;19979:1;22039:7;:17;22377:6:::1;::::0;-1:-1:-1;;;;;22377:6:0::1;22363:10;:20;22359:44;;22392:11;;-1:-1:-1::0;;;22392:11:0::1;;;;;;;;;;;22359:44;-1:-1:-1::0;;;;;41045:35:0::2;;::::0;;;:24:::2;:35;::::0;;;;:65;;;;19936:1;22205:21;;40913:205::o;41606:830::-;41837:14;41863:31;41933:1;41917:13;:17;41913:36;;;-1:-1:-1;41944:1:0;;-1:-1:-1;41944:1:0;41936:13;;41913:36;41962:15;41987:14;-1:-1:-1;;;;;41980:34:0;;:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;41962:54;;42069:15;-1:-1:-1;;;;;42054:30:0;:11;-1:-1:-1;;;;;42054:30:0;;42053:110;;42104:59;42136:11;42149:13;42104:31;:59::i;:::-;42053:110;;;42088:13;42053:110;42027:136;;42174:36;42213:51;42238:9;42249:14;42213:24;:51::i;:::-;42174:90;;42297:1;42287:7;:11;42286:142;;42328:100;:23;42359:7;42368:28;42398:29;42328:30;:100::i;:::-;42286:142;;;42302:23;42286:142;42277:151;;41902:534;;41606:830;;;;;;;;;:::o;43196:126::-;43260:16;43296:18;43289:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;43289:25:0;;;;;;;;;;;;;;;;;;;;;;;43196:126;:::o;43995:176::-;44084:7;44111:52;44136:10;44148:14;44111:24;:52::i;:::-;44104:59;43995:176;-1:-1:-1;;43995:176:0:o;43522:218::-;43655:7;43682:50;43714:9;43725:6;43682:31;:50::i;:::-;43675:57;43522:218;-1:-1:-1;;;43522:218:0:o;39507:1208::-;19979:1;21878:7;;:18;21874:88;;21920:30;;-1:-1:-1;;;21920:30:0;;;;;;;;;;;21874:88;19979:1;22039:7;:17;22377:6:::1;::::0;-1:-1:-1;;;;;22377:6:0::1;22363:10;:20;22359:44;;22392:11;;-1:-1:-1::0;;;22392:11:0::1;;;;;;;;;;;22359:44;-1:-1:-1::0;;;;;39686:24:0;::::2;::::0;;39685:55:::2;;-1:-1:-1::0;;;;;;39716:23:0;::::2;::::0;39685:55:::2;39681:86;;;39749:18;;-1:-1:-1::0;;;39749:18:0::2;;;;;;;;;;;39681:86;39782:18;:25:::0;39810:2:::2;-1:-1:-1::0;39778:66:0::2;;;39821:23;;-1:-1:-1::0;;;39821:23:0::2;;;;;;;;;;;39778:66;39872:15;-1:-1:-1::0;;;;;39859:28:0::2;:9;-1:-1:-1::0;;;;;39859:28:0::2;::::0;39855:69:::2;;39896:28;;-1:-1:-1::0;;;39896:28:0::2;;;;;;;;;;;39855:69;-1:-1:-1::0;;;;;39991:30:0;;::::2;40046:1;39991:30:::0;;;:19:::2;:30;::::0;;;;:43:::2;;::::0;::::2;:57:::0;39987:91:::2;;40057:21;;-1:-1:-1::0;;;40057:21:0::2;;;;;;;;;;;39987:91;40089:18;:34:::0;;::::2;::::0;::::2;::::0;;-1:-1:-1;40089:34:0;;;;::::2;::::0;;-1:-1:-1;;;;;;40089:34:0::2;-1:-1:-1::0;;;;;40089:34:0;::::2;::::0;;::::2;::::0;;;40158:27:::2;::::0;;-1:-1:-1;;;40158:27:0;;;;:25:::2;::::0;:27:::2;::::0;;::::2;::::0;40089:34:::2;::::0;40158:27;;;;;;;;40089:34;40158:27:::2;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;40136:49;;40291:1;40275:13;:17;;;40271:52;;;40301:22;;-1:-1:-1::0;;;40301:22:0::2;;;;;;;;;;;40271:52;40336:20;40382:10;-1:-1:-1::0;;;;;40359:43:0::2;;:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;40450:189;::::0;;::::2;::::0;::::2;::::0;;-1:-1:-1;;;;;40450:189:0;;::::2;::::0;;;;::::2;;::::0;;::::2;::::0;;;::::2;::::0;;::::2;::::0;;;;;;;;::::2;::::0;;;;;;-1:-1:-1;40417:30:0;;;:19:::2;:30:::0;;;;;:222;;;;;;::::2;-1:-1:-1::0;;;;;;40417:222:0;;::::2;;::::0;;;;;;;::::2;::::0;;;;;;;::::2;-1:-1:-1::0;;;40417:222:0::2;-1:-1:-1::0;;;;40417:222:0;;;::::2;-1:-1:-1::0;;;40417:222:0::2;-1:-1:-1::0;;;;;;40417:222:0;;;;;;::::2;::::0;;;;::::2;::::0;;;::::2;::::0;;;::::2;::::0;;;40652:24:::2;:35:::0;;;-1:-1:-1;40652:35:0;;;:55;22205:21;39507:1208::o;22817:132::-;19979:1;21878:7;;:18;21874:88;;21920:30;;-1:-1:-1;;;21920:30:0;;;;;;;;;;;21874:88;19979:1;22039:7;:17;22377:6:::1;::::0;-1:-1:-1;;;;;22377:6:0::1;22363:10;:20;22359:44;;22392:11;;-1:-1:-1::0;;;22392:11:0::1;;;;;;;;;;;22359:44;22913:28:::2;22932:8;22913:18;:28::i;:::-;-1:-1:-1::0;19936:1:0;22205:7;:21;22817:132::o;45690:2372::-;-1:-1:-1;;;;;45856:30:0;;;45815:7;45856:30;;;:19;:30;;;;;;:44;;;45933;;;;46285:52;;-1:-1:-1;;;46285:52:0;;;;45815:7;;45856:44;;;;;45933;-1:-1:-1;;;45933:44:0;;;;;-1:-1:-1;;;46011:45:0;;;;;45815:7;;;;;;;;45856:44;;46285:50;;:52;;;;;;;;;;;;;;;45856:44;46285:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;46107:230;;;;;;;;;46411:1;46397:11;:15;46393:48;;;46421:20;;-1:-1:-1;;;46421:20:0;;;;;;;;;;;46393:48;46479:12;46456:35;;:20;:35;;;46452:60;;;46500:12;;-1:-1:-1;;;46500:12:0;;;;;;;;;;;46452:60;46544:1;46527:14;:18;46523:49;;;46554:18;;-1:-1:-1;;;46554:18:0;;;;;;;;;;;46523:49;46604:15;46587:14;:32;46583:69;;;46628:24;;-1:-1:-1;;;46628:24:0;;;;;;;;;;;46583:69;-1:-1:-1;;;;;46767:35:0;;;;;;:24;:35;;;;;;46732:32;46750:14;46732:15;:32;:::i;:::-;:70;46728:102;;;46811:19;;-1:-1:-1;;;46811:19:0;;;;;;;;;;;46728:102;46929:10;46960:13;46943:30;;:14;:30;;;46942:77;;47018:1;46942:77;;;46984:30;47001:13;46984:14;:30;:::i;:::-;46977:38;;:2;:38;:::i;:::-;46929:90;;47030:10;47071:14;47044:41;;:24;:41;;;47043:99;;47141:1;47043:99;;;47096:41;47123:14;47096:24;:41;:::i;:::-;47089:49;;:2;:49;:::i;:::-;47030:112;-1:-1:-1;47153:26:0;47182:11;47191:2;47182:6;:11;:::i;:::-;47153:40;-1:-1:-1;47290:10:0;47310:19;47315:14;47310:2;:19;:::i;:::-;47303:27;;:2;:27;:::i;:::-;47290:40;-1:-1:-1;47341:13:0;47395:11;47290:40;47358:20;47364:14;47358:2;:20;:::i;:::-;47357:27;;;;:::i;:::-;:50;;;;:::i;:::-;47341:66;-1:-1:-1;47434:14:0;47485:2;47480;47451:26;47459:18;47341:66;47451:26;:::i;:::-;:31;;;;:::i;:::-;:36;;;;:::i;:::-;47434:53;;47521:24;47504:41;;:13;:41;;;47500:359;;47566:24;:29;;47594:1;47566:29;47562:286;;47616:12;47626:2;47616:12;;:::i;:::-;;;47562:286;;;47694:2;47667:24;:29;;;47663:185;;;47733:11;;-1:-1:-1;47812:4:0;47807:2;47802;47773:26;47781:18;47733:11;47773:26;:::i;:::-;:31;;;;:::i;:::-;:36;;;;:::i;:::-;:43;;;;:::i;:::-;47764:52;;47663:185;47875:24;:29;;47903:1;47875:29;47871:158;;47925:13;:19;;47942:2;47925:19;47921:96;;47946:14;47956:4;47946:14;;:::i;:::-;;;47921:96;;;47984:13;:18;;48001:1;47984:18;47980:37;;48004:13;48014:3;48004:13;;:::i;:::-;;;47980:37;48048:6;45690:2372;-1:-1:-1;;;;;;;;;;;;;;;45690:2372:0:o;44727:868::-;44986:18;:25;45056:44;;-1:-1:-1;;;45056:44:0;;-1:-1:-1;;;;;1233:32:1;;;45056:44:0;;;1215:51:1;44852:7:0;;;;;;;;44986:25;44852:7;;45063:15;45056:33;;;;1188:18:1;;45056:44:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;45039:61;;:14;:61;:::i;:::-;45024:76;;45118:9;45113:363;45133:1;45129;:5;45113:363;;;45168:18;45187:1;45168:21;;;;;;;;:::i;:::-;;;;;;;;;;;45219:38;;-1:-1:-1;;;45219:38:0;;-1:-1:-1;;;;;1233:32:1;;;45219:38:0;;;1215:51:1;45168:21:0;;;;-1:-1:-1;45168:21:0;;45219:27;;1188:18:1;;45219:38:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;45204:53;-1:-1:-1;45278:16:0;;45274:191;;45342:56;45374:9;45385:12;45342:31;:56::i;:::-;45315:83;-1:-1:-1;45417:32:0;45315:83;45417:32;;:::i;:::-;;;45274:191;45136:3;;45113:363;;;-1:-1:-1;45583:4:0;44727:868;-1:-1:-1;;;;;;;44727:868:0:o;11838:348::-;11982:7;12002:14;12019:25;12026:1;12029;12032:11;12019:6;:25::i;:::-;12002:42;-1:-1:-1;12071:11:0;12059:8;:23;;;;;;;;:::i;:::-;;:56;;;;;12114:1;12099:11;12086:25;;;;;:::i;:::-;12096:1;12093;12086:25;:29;12059:56;12055:100;;;12132:11;12142:1;12132:11;;:::i;:::-;;;12055:100;12172:6;11838:348;-1:-1:-1;;;;;11838:348:0:o;22957:261::-;-1:-1:-1;;;;;23035:22:0;;23031:57;;23066:22;;-1:-1:-1;;;23066:22:0;;;;;;;;;;;23031:57;23120:6;;;-1:-1:-1;;;;;23137:17:0;;;-1:-1:-1;;;;;;23137:17:0;;;;;;;23170:40;;23120:6;;;23137:17;23120:6;;23170:40;;23101:16;;23170:40;23020:198;22957:261;:::o;7696:4005::-;7812:14;;;-1:-1:-1;;8357:1:0;8354;8347:20;8401:1;8398;8394:9;8385:18;;8457:5;8453:2;8450:13;8442:5;8438:2;8434:14;8430:34;8421:43;;;8563:5;8572:1;8563:10;8559:77;;8609:11;8601:5;:19;;;;;:::i;:::-;;8594:26;;;;;;8559:77;8763:5;8749:11;:19;8741:28;;;;;;9032:17;9170:11;9167:1;9164;9157:25;10577:1;10558;9729;9714:12;;:16;;9699:32;;9837:22;;;;10558:15;;;10557:21;;10814;;;10810:25;;10799:36;10884:21;;;10880:25;;10869:36;10955:21;;;10951:25;;10940:36;11026:21;;;11022:25;;11011:36;11097:21;;;11093:25;;11082:36;11169:21;;;11165:25;;;11154:36;9684:12;10088;;;10084:23;;;10080:31;;;9287:20;;;9276:32;;;10204:12;;;;9335:21;;9938:16;;;;10195:21;;;;11639:15;;7696:4005;-1:-1:-1;;;;7696:4005:0:o;203:173:1:-;271:20;;-1:-1:-1;;;;;320:31:1;;310:42;;300:70;;366:1;363;356:12;300:70;203:173;;;:::o;381:186::-;440:6;493:2;481:9;472:7;468:23;464:32;461:52;;;509:1;506;499:12;461:52;532:29;551:9;532:29;:::i;764:300::-;832:6;840;893:2;881:9;872:7;868:23;864:32;861:52;;;909:1;906;899:12;861:52;954:23;;;-1:-1:-1;1020:38:1;1054:2;1039:18;;1020:38;:::i;:::-;1010:48;;764:300;;;;;:::o;1277:570::-;1372:6;1380;1388;1396;1404;1457:3;1445:9;1436:7;1432:23;1428:33;1425:53;;;1474:1;1471;1464:12;1425:53;1497:29;1516:9;1497:29;:::i;:::-;1487:39;;1545:38;1579:2;1568:9;1564:18;1545:38;:::i;:::-;1535:48;;1602:38;1636:2;1625:9;1621:18;1602:38;:::i;:::-;1277:570;;;;-1:-1:-1;1592:48:1;;1709:2;1694:18;;1681:32;;-1:-1:-1;1810:3:1;1795:19;1782:33;;1277:570;-1:-1:-1;;1277:570:1:o;2287:637::-;2477:2;2489:21;;;2559:13;;2462:18;;;2581:22;;;2429:4;;2660:15;;;2634:2;2619:18;;;2429:4;2703:195;2717:6;2714:1;2711:13;2703:195;;;2782:13;;-1:-1:-1;;;;;2778:39:1;2766:52;;2847:2;2873:15;;;;2838:12;;;;2814:1;2732:9;2703:195;;;-1:-1:-1;2915:3:1;;2287:637;-1:-1:-1;;;;;2287:637:1:o;2929:226::-;2988:6;3041:2;3029:9;3020:7;3016:23;3012:32;3009:52;;;3057:1;3054;3047:12;3009:52;-1:-1:-1;3102:23:1;;2929:226;-1:-1:-1;2929:226:1:o;3160:300::-;3228:6;3236;3289:2;3277:9;3268:7;3264:23;3260:32;3257:52;;;3305:1;3302;3295:12;3257:52;3328:29;3347:9;3328:29;:::i;:::-;3318:39;3426:2;3411:18;;;;3398:32;;-1:-1:-1;;;3160:300:1:o;3465:374::-;3542:6;3550;3558;3611:2;3599:9;3590:7;3586:23;3582:32;3579:52;;;3627:1;3624;3617:12;3579:52;3650:29;3669:9;3650:29;:::i;:::-;3640:39;;3698:38;3732:2;3721:9;3717:18;3698:38;:::i;:::-;3465:374;;3688:48;;-1:-1:-1;;;3805:2:1;3790:18;;;;3777:32;;3465:374::o;3844:230::-;3914:6;3967:2;3955:9;3946:7;3942:23;3938:32;3935:52;;;3983:1;3980;3973:12;3935:52;-1:-1:-1;4028:16:1;;3844:230;-1:-1:-1;3844:230:1:o;4079:273::-;4147:6;4200:2;4188:9;4179:7;4175:23;4171:32;4168:52;;;4216:1;4213;4206:12;4168:52;4248:9;4242:16;4298:4;4291:5;4287:16;4280:5;4277:27;4267:55;;4318:1;4315;4308:12;4357:179;4435:13;;4488:22;4477:34;;4467:45;;4457:73;;4526:1;4523;4516:12;4541:571;4644:6;4652;4660;4668;4676;4729:3;4717:9;4708:7;4704:23;4700:33;4697:53;;;4746:1;4743;4736:12;4697:53;4769:39;4798:9;4769:39;:::i;:::-;4848:2;4833:18;;4827:25;4914:2;4899:18;;4893:25;5008:2;4993:18;;4987:25;4759:49;;-1:-1:-1;4827:25:1;;-1:-1:-1;4893:25:1;-1:-1:-1;4987:25:1;-1:-1:-1;5057:49:1;5101:3;5086:19;;5057:49;:::i;:::-;5047:59;;4541:571;;;;;;;;:::o;5117:127::-;5178:10;5173:3;5169:20;5166:1;5159:31;5209:4;5206:1;5199:15;5233:4;5230:1;5223:15;5249:128;5316:9;;;5337:11;;;5334:37;;;5351:18;;:::i;5382:151::-;5472:4;5465:12;;;5451;;;5447:31;;5490:14;;5487:40;;;5507:18;;:::i;5538:375::-;5626:1;5644:5;5658:249;5679:1;5669:8;5666:15;5658:249;;;5729:4;5724:3;5720:14;5714:4;5711:24;5708:50;;;5738:18;;:::i;:::-;5788:1;5778:8;5774:16;5771:49;;;5802:16;;;;5771:49;5885:1;5881:16;;;;;5841:15;;5658:249;;;5538:375;;;;;;:::o;5918:902::-;5967:5;5997:8;5987:80;;-1:-1:-1;6038:1:1;6052:5;;5987:80;6086:4;6076:76;;-1:-1:-1;6123:1:1;6137:5;;6076:76;6168:4;6186:1;6181:59;;;;6254:1;6249:174;;;;6161:262;;6181:59;6211:1;6202:10;;6225:5;;;6249:174;6286:3;6276:8;6273:17;6270:43;;;6293:18;;:::i;:::-;-1:-1:-1;;6349:1:1;6335:16;;6408:5;;6161:262;;6507:2;6497:8;6494:16;6488:3;6482:4;6479:13;6475:36;6469:2;6459:8;6456:16;6451:2;6445:4;6442:12;6438:35;6435:77;6432:203;;;-1:-1:-1;6544:19:1;;;6620:5;;6432:203;6667:42;-1:-1:-1;;6692:8:1;6686:4;6667:42;:::i;:::-;6745:6;6741:1;6737:6;6733:19;6724:7;6721:32;6718:58;;;6756:18;;:::i;:::-;6794:20;;5918:902;-1:-1:-1;;;5918:902:1:o;6825:140::-;6883:5;6912:47;6953:4;6943:8;6939:19;6933:4;6912:47;:::i;6970:168::-;7043:9;;;7074;;7091:15;;;7085:22;;7071:37;7061:71;;7112:18;;:::i;7143:127::-;7204:10;7199:3;7195:20;7192:1;7185:31;7235:4;7232:1;7225:15;7259:4;7256:1;7249:15;7275:217;7315:1;7341;7331:132;;7385:10;7380:3;7376:20;7373:1;7366:31;7420:4;7417:1;7410:15;7448:4;7445:1;7438:15;7331:132;-1:-1:-1;7477:9:1;;7275:217::o;7497:125::-;7562:9;;;7583:10;;;7580:36;;;7596:18;;:::i;7627:127::-;7688:10;7683:3;7679:20;7676:1;7669:31;7719:4;7716:1;7709:15;7743:4;7740:1;7733:15;7759:127;7820:10;7815:3;7811:20;7808:1;7801:31;7851:4;7848:1;7841:15;7875:4;7872:1;7865:15

Swarm Source

ipfs://4a6c7c46697a9cbc74561e28da4cf8e0773ba2b0214768b9d0c2f3938472b116

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

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits

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