FRAX Price: $0.87 (-14.67%)

Contract

0x10A6A2fFDf88D9a7C7E0cC34B0E84cc24F827E95

Overview

FRAX Balance | FXTL Balance

0 FRAX | 42 FXTL

FRAX Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Set Tokens301789592025-12-31 8:10:2925 days ago1767168629IN
0x10A6A2fF...24F827E95
0 FRAX0.000006860.00100025
Set Tokens299384112025-12-25 18:32:1330 days ago1766687533IN
0x10A6A2fF...24F827E95
0 FRAX0.000004650.00100025
Transfer Ownersh...299224902025-12-25 9:41:3131 days ago1766655691IN
0x10A6A2fF...24F827E95
0 FRAX0.000002240.00105026

View more zero value Internal Transactions in Advanced View mode

Advanced mode:

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
WhitelistV2

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: UNLICENSED
// Copyright (c) Eywa.Fi, 2021-2025 - all rights reserved
pragma solidity 0.8.17;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "./EndPoint.sol";
import {IWhitelist} from "./interfaces/IWhitelist.sol";
import {IAddressBook} from "./interfaces/IAddressBook.sol";
import {IUnifiedRouter} from "./interfaces/IRouterV3.sol";
import {IBasePoolAdapter} from "./interfaces/IBasePoolAdapter.sol";

contract WhitelistV2 is IWhitelist, EndPoint, Ownable {

    /// @dev fee denominator
    uint256 public constant FEE_DENOMINATOR = 10000;

    /// @dev fee denominator 2
    uint256 public constant FEE_DENOMINATOR_2 = 1000000;

    /// @dev array of token indices
    mapping(address => uint256) private _tokenIds;
    /// @dev tokens
    IWhitelist.TokenStatus[] private _tokens;
    /// @dev pools
    IWhitelist.PoolStatus[] private _pools;

    event TokenSet(address token, uint256 max, uint256 min, uint256 fee, IWhitelist.TokenState state);
    event PoolSet(address pool, uint256 fee, IWhitelist.PoolState state);

    constructor(address addressBook_) EndPoint(addressBook_) {}

    function setAddressBook(address addressBook_) external onlyOwner{
        _setAddressBook(addressBook_);
    }

    function tokenMin(address token_) external view returns (uint256) {
        return _getToken(token_).min;
    }
    
    function tokenMax(address token_) external view returns (uint256) {
        return _getToken(token_).max;
    }

    function tokenMinMax(address token_) external view returns (uint256, uint256) {
        IWhitelist.TokenStatus memory token = _getToken(token_);
        return (token.min, token.max);
    }

    function bridgeFee(address token_) external view returns (uint256) {
        return _getToken(token_).bridgeFee;
    }

    function tokenState(address token_) external view returns (uint8) {
        return uint8(_getToken(token_).state);
    }

    function tokenStatus(address token_) external view returns (IWhitelist.TokenStatus memory) {
        return _getToken(token_);
    }

    function aggregationFee(address pool_) external view returns (uint256) {
        return _poolStatus(pool_).aggregationFee;
    }

    function poolState(address pool_) external view returns (uint8){
        return uint8(_poolStatus(pool_).state);
    }

    function poolStatus(address pool_) external view returns (PoolStatus memory) {
        return _poolStatus(pool_);
    }

    function tokens(uint256 offset, uint256 count) external view returns (TokenStatus[] memory) {
        require(offset <= _tokens.length, "Whitelist: wrong offset");
        count = Math.min(_tokens.length, count + offset);
        IWhitelist.TokenStatus[] memory tokens_ = new IWhitelist.TokenStatus[](count - offset);
        for (uint256 i = offset; i < count; ++i) {
            tokens_[i] = _tokens[i];
        }
        return tokens_;
    }

    function pools(uint256 offset, uint256 count) external view returns (IWhitelist.PoolStatus[] memory) {
        require(offset <= _pools.length, "Whitelist: wrong offset");
        count = Math.min(_pools.length, count + offset);
        IWhitelist.PoolStatus[] memory pools_ = new IWhitelist.PoolStatus[](count - offset);
        for (uint256 i = offset; i < count; ++i) {
            pools_[i] = _pools[i];
        }
        return pools_;
    }

    function setTokens(IWhitelist.TokenStatus[] calldata tokens_) external onlyOwner {
        uint256 count = tokens_.length;
        for (uint256 i; i < count; ++i) {
            IWhitelist.TokenStatus memory status = tokens_[i];
            require(status.token != address(0), "Whitelist: zero address");
            require(status.max >= status.min, "Whitelist: min max wrong");
            require(status.bridgeFee <= FEE_DENOMINATOR, "Whitelist: fee > 100%");
            uint256 id = _tokenIds[status.token];
            if (id == 0) {
                _tokens.push(status);
                _tokenIds[status.token] = _tokens.length;
            } else {
                --id;
                _tokens[id] = status;
            }
            emit TokenSet(status.token, status.max, status.min, status.bridgeFee, status.state);
        }
    }

    function setPools(IWhitelist.PoolStatus[] calldata pools_) external onlyOwner {
        uint256 count = pools_.length;
        for (uint256 i; i < count; ++i) {
            IWhitelist.PoolStatus memory status = pools_[i];
            require(status.pool != address(0), "Whitelist: zero address");
            address poolAdapter = IUnifiedRouter(IAddressBook(addressBook).router(uint64(block.chainid))).poolAdapter(status.pool);
            require(poolAdapter != address(0), "Whitelist: pool adapter not set");
            IBasePoolAdapter(poolAdapter).setFee(status.pool, status.aggregationFee);
            emit PoolSet(status.pool, status.aggregationFee, status.state);
        }
    }

    function _getToken(address token) private view returns (IWhitelist.TokenStatus memory) {
        uint256 id = _tokenIds[token];
        require(id != 0, "Whitelist: token not set");
        --id;
        return _tokens[id];
    }

    function _poolStatus(address pool_) private view returns (PoolStatus memory poolStatus_) {
        address poolAdapter = IUnifiedRouter(IAddressBook(addressBook).router(uint64(block.chainid))).poolAdapter(pool_);
        if (poolAdapter != address(0)) {
            poolStatus_.pool = pool_;
            poolStatus_.aggregationFee = IBasePoolAdapter(poolAdapter).fee(pool_);
            poolStatus_.state = PoolState.AddSwapRemove;
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        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);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    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) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1, "Math: mulDiv overflow");

            ///////////////////////////////////////////////
            // 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 256, 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);
        }
    }
}

// SPDX-License-Identifier: UNLICENSED
// Copyright (c) Eywa.Fi, 2021-2023 - all rights reserved
pragma solidity 0.8.17;

import "./utils/Typecast.sol";


contract EndPoint is Typecast {

    /// @dev version
    string public version;
    /// @dev clp address book
    address public addressBook;

    constructor (address addressBook_) {
        version = "2.2.3";
        _checkAddress(addressBook_);
        addressBook = addressBook_;
    }

    function _setAddressBook(address addressBook_) internal {
        _checkAddress(addressBook_);
        addressBook = addressBook_;
    }

    function _checkAddress(address checkingAddress) private pure {
        require(checkingAddress != address(0), "EndPoint: zero address");
    }
}

// SPDX-License-Identifier: UNLICENSED
// Copyright (c) Eywa.Fi, 2021-2025 - all rights reserved
pragma solidity ^0.8.17;


interface IAddressBook {
    /// @dev returns portal by given chainId
    function portal(uint64 chainId) external view returns (address);

    /// @dev returns synthesis by given chainId
    function synthesis(uint64 chainId) external view returns (address);

    /// @dev returns router by given chainId
    function router(uint64 chainId) external view returns (address);

    /// @dev returns portal by given chainId
    function portalV3(uint64 chainId) external view returns (bytes32);

    /// @dev returns synthesis by given chainId
    function synthesisV3(uint64 chainId) external view returns (bytes32);

    /// @dev returns router by given chainId
    function routerV3(uint64 chainId) external view returns (bytes32);

    /// @dev returns whitelist
    function whitelist() external view returns (address);

    /// @dev returns treasury
    function treasury() external view returns (address);

    /// @dev returns gateKeeper
    function gateKeeper() external view returns (address);

    /// @dev returns receiver
    function receiver() external view returns (address);

    /// @dev returns wrapped native asset (WETH)
    function WETH() external view returns (address);
}

// SPDX-License-Identifier: UNLICENSED
// Copyright (c) Eywa.Fi, 2021-2025 - all rights reserved
pragma solidity 0.8.17;

interface IBasePoolAdapter {

    /// @notice Returns the fee denominator constant.
    /// @dev Fee denominator constant used for percentage calculations.
    /// @return The fee denominator constant.
    function FEE_DENOMINATOR() external view returns (uint256);

    /// @notice Returns the max fee constant.
    /// @dev The maximum commission value that can be set is 100000, which corresponds to 10 %.
    /// @return The max fee constant.
    function MAX_FEE() external view returns (uint256);

    /// @notice Setting the fee value for specific pool.
    /// @dev You can only set the fee value by calling from the Whitelist contract
    /// or an account with the OPERATOR_ROLE role.
    /// @param pool_ the pool contract address.
    /// @param fee_ the fee value.
    function setFee(address pool_, uint256 fee_) external;

    /// @notice Returns the current value of the fee for specific pool.
    /// @dev If the fee is set explicitly, its value is returned.
    /// If the fee is not set explicitly, the default fee value is returned.
    /// If fee value is set to maximum - it is considered as zero fee
    /// @param pool_ the pool address.
    /// @return The the current fee value.
    function fee(address pool_) external view returns(uint256);
}

// SPDX-License-Identifier: UNLICENSED
// Copyright (c) Eywa.Fi, 2021-2025 - all rights reserved
pragma solidity ^0.8.17;


interface IRouterParams {

    struct Invoice {
        uint256 executionPrice;
        uint256 deadline;
        uint8 v;
        bytes32 r;
        bytes32 s;
    }

    struct PermitParams {
        bytes32 token;
        bytes32 owner;
        uint256 amount;
        uint256 deadline;
        uint8 v;
        bytes32 r;
        bytes32 s;
    }

    /**
     * @dev amount can be set as prev op result by using uint256 max. 
     */
    struct SynthParams {
        bytes32 tokenIn;
        uint256 amountIn; // amount | 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
        bytes32 from; // from | 0x0000000000000000000000000000000000000000
        bytes32 to;
        uint64 chainIdTo;
        uint64 tokenInChainIdFrom;
        bytes32 emergencyTo;
    }

    /**
     * @dev Cancellation applicable only for cross-chain ops (LM, BU, BM).
     */
    struct CancelParams {
        bytes32 requestId;
        uint64 chainIdTo;
        SynthParams emergencyParams;
    }

    /**
     * @dev amountIn can be set as prev op result by using uint256 max. 
     */
    struct AddParams {
        bytes32 tokenIn;
        uint256 amountIn; // amount | 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
        bytes32 from;  // from | 0x0000000000000000000000000000000000000000
        bytes32 to;
        bytes32 pool;
        uint256 minAmountOut;
        uint8 i;
        bytes32 emergencyTo;
    }

    /**
     * @dev amountIn can be set as prev op result by using uint256 max. 
     */
    struct RemoveParams {
        bytes32 tokenIn;
        uint256 amountIn; // amount | 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
        bytes32 from;  // from | 0x0000000000000000000000000000000000000000
        bytes32 to;
        bytes32 pool;
        uint256 minAmountOut;
        uint8 j;
        bytes32 emergencyTo;
    }

    /**
     * @dev amountIn can be set as prev op result by using uint256 max. 
     */
    struct SwapParams {
        bytes32 tokenIn;
        uint256 amountIn; // amount | 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
        bytes32 from;  // from | 0x0000000000000000000000000000000000000000
        bytes32 to;
        bytes32 pool;
        uint256 minAmountOut;
        uint8 i;
        uint8 j;
        bytes32 emergencyTo;
    }

    /**
     * @dev amount can be set as prev op result by using uint256 max.
     */
    struct WrapParams {
        bytes32 tokenIn;
        uint256 amountIn; // amount | 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
        bytes32 from;  // from | 0x0000000000000000000000000000000000000000
        bytes32 to; // router if op not last
    }
}

interface IRouter is IRouterParams {
    function start(
        string[] calldata operations,
        bytes[] calldata params,
        Invoice calldata receipt,
        bytes calldata options
    ) external payable;

    function resume(
        bytes32 requestId,
        uint8 cPos,
        string[] calldata operations,
        bytes[] calldata params,
        bytes calldata options
    ) external;
}

interface IUnifiedRouter is IRouter {
    function poolAdapter(address pool_) external view returns(address poolAdapter_);
}

// SPDX-License-Identifier: UNLICENSED
// Copyright (c) Eywa.Fi, 2021-2023 - all rights reserved
pragma solidity ^0.8.17;


interface IWhitelist {

    enum TokenState { NotSet, InOut }
    enum PoolState { NotSet, AddSwapRemove }

    struct TokenStatus {
        address token;
        uint256 min;
        uint256 max;
        uint256 bridgeFee;
        TokenState state;
    }

    struct PoolStatus {
        address pool;
        uint256 aggregationFee;
        PoolState state;
    }
    
    function tokenMin(address token) external view returns (uint256);
    function tokenMax(address token) external view returns (uint256);
    function tokenMinMax(address token) external view returns (uint256, uint256);
    function bridgeFee(address token) external view returns (uint256);
    function tokenState(address token) external view returns (uint8);
    function tokenStatus(address token) external view returns (TokenStatus memory);
    function tokens(uint256 offset, uint256 count) external view returns (TokenStatus[] memory);

    function aggregationFee(address pool) external view returns (uint256);
    function poolState(address pool) external view returns (uint8);
    function poolStatus(address pool) external view returns (PoolStatus memory);
}

// SPDX-License-Identifier: UNLICENSED
// Copyright (c) Eywa.Fi, 2021-2023 - all rights reserved
pragma solidity ^0.8.17;


abstract contract Typecast {
    function castToAddress(bytes32 x) public pure returns (address) {
        return address(uint160(uint256(x)));
    }

    function castToBytes32(address a) public pure returns (bytes32) {
        return bytes32(uint256(uint160(a)));
    }
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"addressBook_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"pool","type":"address"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"},{"indexed":false,"internalType":"enum IWhitelist.PoolState","name":"state","type":"uint8"}],"name":"PoolSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"max","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"min","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"},{"indexed":false,"internalType":"enum IWhitelist.TokenState","name":"state","type":"uint8"}],"name":"TokenSet","type":"event"},{"inputs":[],"name":"FEE_DENOMINATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FEE_DENOMINATOR_2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"addressBook","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool_","type":"address"}],"name":"aggregationFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token_","type":"address"}],"name":"bridgeFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"x","type":"bytes32"}],"name":"castToAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"a","type":"address"}],"name":"castToBytes32","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool_","type":"address"}],"name":"poolState","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool_","type":"address"}],"name":"poolStatus","outputs":[{"components":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"uint256","name":"aggregationFee","type":"uint256"},{"internalType":"enum IWhitelist.PoolState","name":"state","type":"uint8"}],"internalType":"struct IWhitelist.PoolStatus","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"offset","type":"uint256"},{"internalType":"uint256","name":"count","type":"uint256"}],"name":"pools","outputs":[{"components":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"uint256","name":"aggregationFee","type":"uint256"},{"internalType":"enum IWhitelist.PoolState","name":"state","type":"uint8"}],"internalType":"struct IWhitelist.PoolStatus[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addressBook_","type":"address"}],"name":"setAddressBook","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"uint256","name":"aggregationFee","type":"uint256"},{"internalType":"enum IWhitelist.PoolState","name":"state","type":"uint8"}],"internalType":"struct IWhitelist.PoolStatus[]","name":"pools_","type":"tuple[]"}],"name":"setPools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"},{"internalType":"uint256","name":"bridgeFee","type":"uint256"},{"internalType":"enum IWhitelist.TokenState","name":"state","type":"uint8"}],"internalType":"struct IWhitelist.TokenStatus[]","name":"tokens_","type":"tuple[]"}],"name":"setTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token_","type":"address"}],"name":"tokenMax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token_","type":"address"}],"name":"tokenMin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token_","type":"address"}],"name":"tokenMinMax","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token_","type":"address"}],"name":"tokenState","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token_","type":"address"}],"name":"tokenStatus","outputs":[{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"},{"internalType":"uint256","name":"bridgeFee","type":"uint256"},{"internalType":"enum IWhitelist.TokenState","name":"state","type":"uint8"}],"internalType":"struct IWhitelist.TokenStatus","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"offset","type":"uint256"},{"internalType":"uint256","name":"count","type":"uint256"}],"name":"tokens","outputs":[{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"},{"internalType":"uint256","name":"bridgeFee","type":"uint256"},{"internalType":"enum IWhitelist.TokenState","name":"state","type":"uint8"}],"internalType":"struct IWhitelist.TokenStatus[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]

60806040523480156200001157600080fd5b5060405162001c1b38038062001c1b833981016040819052620000349162000158565b8060405180604001604052806005815260200164322e322e3360d81b815250600090816200006391906200022f565b506200006f81620000a8565b600180546001600160a01b0319166001600160a01b0392909216919091179055620000a16200009b3390565b62000106565b50620002fb565b6001600160a01b038116620001035760405162461bcd60e51b815260206004820152601660248201527f456e64506f696e743a207a65726f206164647265737300000000000000000000604482015260640160405180910390fd5b50565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000602082840312156200016b57600080fd5b81516001600160a01b03811681146200018357600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620001b557607f821691505b602082108103620001d657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200022a57600081815260208120601f850160051c81016020861015620002055750805b601f850160051c820191505b81811015620002265782815560010162000211565b5050505b505050565b81516001600160401b038111156200024b576200024b6200018a565b62000263816200025c8454620001a0565b84620001dc565b602080601f8311600181146200029b5760008415620002825750858301515b600019600386901b1c1916600185901b17855562000226565b600085815260208120601f198616915b82811015620002cc57888601518255948401946001909101908401620002ab565b5085821015620002eb5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b611910806200030b6000396000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c806367742bd4116100c3578063d73792a91161007c578063d73792a914610302578063df1cd6381461030b578063e8f11c4514610315578063f2fde38b1461033d578063f5887cdd14610350578063f59ae9ae1461036357600080fd5b806367742bd414610283578063715018a6146102965780637450e2de1461029e5780638b4864d6146102be5780638da5cb5b146102de57806399cd120f146102ef57600080fd5b80633b8b70bb116101155780633b8b70bb146101e95780633c38ccbb146101fc5780633e7e25c11461021c5780633fc8e65e1461023657806354fd4d501461024957806359b6f0dc1461025e57600080fd5b806308fe73b4146101525780630acac942146101785780630b3448a8146101985780630e03e490146101ad578063171ed7e9146101d6575b600080fd5b610165610160366004611389565b610376565b6040519081526020015b60405180910390f35b61018b610186366004611389565b61038b565b60405161016f919061141e565b6101ab6101a6366004611389565b6103a2565b005b6101be6101bb36600461142c565b90565b6040516001600160a01b03909116815260200161016f565b6101656101e4366004611389565b6103b6565b6101656101f7366004611389565b6103cb565b61020f61020a366004611389565b6103e0565b60405161016f9190611475565b61016561022a366004611389565b6001600160a01b031690565b6101ab610244366004611483565b61040a565b6102516106ae565b60405161016f91906114f8565b61027161026c366004611389565b61073c565b60405160ff909116815260200161016f565b610165610291366004611389565b61075c565b6101ab610767565b6102b16102ac366004611546565b61077b565b60405161016f9190611568565b6102d16102cc366004611546565b61091a565b60405161016f91906115b6565b6002546001600160a01b03166101be565b6102716102fd366004611389565b610ac6565b61016561271081565b610165620f424081565b610328610323366004611389565b610ae6565b6040805192835260208301919091520161016f565b6101ab61034b366004611389565b610b0a565b6001546101be906001600160a01b031681565b6101ab6103713660046115f8565b610b80565b600061038182610f21565b6060015192915050565b61039361132c565b61039c82610f21565b92915050565b6103aa611055565b6103b3816110af565b50565b60006103c182610f21565b6020015192915050565b60006103d682610f21565b6040015192915050565b61040160408051606081018252600080825260208201819052909182015290565b61039c826110da565b610412611055565b8060005b818110156106a85760008484838181106104325761043261165b565b9050606002018036038101906104489190611694565b80519091506001600160a01b03166104a15760405162461bcd60e51b815260206004820152601760248201527657686974656c6973743a207a65726f206164647265737360481b60448201526064015b60405180910390fd5b60015460405163687f4b5760e11b815267ffffffffffffffff461660048201526000916001600160a01b03169063d0fe96ae90602401602060405180830381865afa1580156104f4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610518919061170b565b8251604051634ad6b84d60e11b81526001600160a01b0391821660048201529116906395ad709a90602401602060405180830381865afa158015610560573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610584919061170b565b90506001600160a01b0381166105dc5760405162461bcd60e51b815260206004820152601f60248201527f57686974656c6973743a20706f6f6c2061646170746572206e6f7420736574006044820152606401610498565b8151602083015160405163e55156b560e01b81526001600160a01b0384169263e55156b592610621926004016001600160a01b03929092168252602082015260400190565b600060405180830381600087803b15801561063b57600080fd5b505af115801561064f573d6000803e3d6000fd5b50508351602085015160408087015190517f35cf0ed869165a43444185b5768c9d223379438ca00add4ec553b761d7967148955061068d9450611728565b60405180910390a15050806106a19061176c565b9050610416565b50505050565b600080546106bb90611785565b80601f01602080910402602001604051908101604052809291908181526020018280546106e790611785565b80156107345780601f1061070957610100808354040283529160200191610734565b820191906000526020600020905b81548152906001019060200180831161071757829003601f168201915b505050505081565b600061074782610f21565b60800151600181111561039c5761039c6113a6565b60006103c1826110da565b61076f611055565b6107796000611273565b565b6005546060908311156107ca5760405162461bcd60e51b815260206004820152601760248201527615da1a5d195b1a5cdd0e881ddc9bdb99c81bd9999cd95d604a1b6044820152606401610498565b6005546107e0906107db85856117b9565b6112c5565b915060006107ee84846117cc565b67ffffffffffffffff81111561080657610806611671565b60405190808252806020026020018201604052801561085857816020015b61084560408051606081018252600080825260208201819052909182015290565b8152602001906001900390816108245790505b509050835b8381101561091257600581815481106108785761087861165b565b600091825260209182902060408051606081018252600390930290910180546001600160a01b03168352600180820154948401949094526002810154929390929184019160ff16908111156108cf576108cf6113a6565b60018111156108e0576108e06113a6565b815250508282815181106108f6576108f661165b565b60200260200101819052508061090b9061176c565b905061085d565b509392505050565b6004546060908311156109695760405162461bcd60e51b815260206004820152601760248201527615da1a5d195b1a5cdd0e881ddc9bdb99c81bd9999cd95d604a1b6044820152606401610498565b60045461097a906107db85856117b9565b9150600061098884846117cc565b67ffffffffffffffff8111156109a0576109a0611671565b6040519080825280602002602001820160405280156109d957816020015b6109c661132c565b8152602001906001900390816109be5790505b509050835b8381101561091257600481815481106109f9576109f961165b565b90600052602060002090600502016040518060a00160405290816000820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020016001820154815260200160028201548152602001600382015481526020016004820160009054906101000a900460ff166001811115610a8357610a836113a6565b6001811115610a9457610a946113a6565b81525050828281518110610aaa57610aaa61165b565b602002602001018190525080610abf9061176c565b90506109de565b6000610ad1826110da565b60400151600181111561039c5761039c6113a6565b6000806000610af484610f21565b9050806020015181604001519250925050915091565b610b12611055565b6001600160a01b038116610b775760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610498565b6103b381611273565b610b88611055565b8060005b818110156106a8576000848483818110610ba857610ba861165b565b905060a00201803603810190610bbe91906117df565b80519091506001600160a01b0316610c125760405162461bcd60e51b815260206004820152601760248201527657686974656c6973743a207a65726f206164647265737360481b6044820152606401610498565b806020015181604001511015610c6a5760405162461bcd60e51b815260206004820152601860248201527f57686974656c6973743a206d696e206d61782077726f6e6700000000000000006044820152606401610498565b61271081606001511115610cb85760405162461bcd60e51b815260206004820152601560248201527457686974656c6973743a20666565203e203130302560581b6044820152606401610498565b80516001600160a01b031660009081526003602052604081205490819003610e1d576004805460018181018355600092909252835160059091027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b810180546001600160a01b039093166001600160a01b031990931692909217825560208501517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c82015560408501517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d82015560608501517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19e82015560808501517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19f9091018054869460ff19909116908381811115610df457610df46113a6565b02179055505060045483516001600160a01b031660009081526003602052604090205550610ebb565b610e268161186c565b90508160048281548110610e3c57610e3c61165b565b600091825260209182902083516005929092020180546001600160a01b0319166001600160a01b0390921691909117815590820151600180830191909155604083015160028301556060830151600383015560808301516004830180549192909160ff1916908381811115610eb357610eb36113a6565b021790555050505b7f0d7b343ecd56f9990d6289234e875fec1546a589555b41e8c68d1b0bce612b6582600001518360400151846020015185606001518660800151604051610f06959493929190611883565b60405180910390a1505080610f1a9061176c565b9050610b8c565b610f2961132c565b6001600160a01b03821660009081526003602052604081205490819003610f925760405162461bcd60e51b815260206004820152601860248201527f57686974656c6973743a20746f6b656e206e6f742073657400000000000000006044820152606401610498565b610f9b8161186c565b905060048181548110610fb057610fb061165b565b90600052602060002090600502016040518060a00160405290816000820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020016001820154815260200160028201548152602001600382015481526020016004820160009054906101000a900460ff16600181111561103a5761103a6113a6565b600181111561104b5761104b6113a6565b9052509392505050565b6002546001600160a01b031633146107795760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610498565b6110b8816112dd565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6110fb60408051606081018252600080825260208201819052909182015290565b60015460405163687f4b5760e11b815267ffffffffffffffff461660048201526000916001600160a01b03169063d0fe96ae90602401602060405180830381865afa15801561114e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611172919061170b565b604051634ad6b84d60e11b81526001600160a01b03858116600483015291909116906395ad709a90602401602060405180830381865afa1580156111ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111de919061170b565b90506001600160a01b0381161561126d576001600160a01b03838116808452604051636fcca69b60e01b8152600481019190915290821690636fcca69b90602401602060405180830381865afa15801561123c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061126091906118c1565b6020830152600160408301525b50919050565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008183106112d457816112d6565b825b9392505050565b6001600160a01b0381166103b35760405162461bcd60e51b8152602060048201526016602482015275456e64506f696e743a207a65726f206164647265737360501b6044820152606401610498565b6040518060a0016040528060006001600160a01b031681526020016000815260200160008152602001600081526020016000600181111561136f5761136f6113a6565b905290565b6001600160a01b03811681146103b357600080fd5b60006020828403121561139b57600080fd5b81356112d681611374565b634e487b7160e01b600052602160045260246000fd5b600281106103b357634e487b7160e01b600052602160045260246000fd5b80516001600160a01b031682526020808201519083015260408082015190830152606080820151908301526080810151611413816113bc565b806080840152505050565b60a0810161039c82846113da565b60006020828403121561143e57600080fd5b5035919050565b80516001600160a01b0316825260208082015190830152604081015161146a816113bc565b806040840152505050565b6060810161039c8284611445565b6000806020838503121561149657600080fd5b823567ffffffffffffffff808211156114ae57600080fd5b818501915085601f8301126114c257600080fd5b8135818111156114d157600080fd5b8660206060830285010111156114e657600080fd5b60209290920196919550909350505050565b600060208083528351808285015260005b8181101561152557858101830151858201604001528201611509565b506000604082860101526040601f19601f8301168501019250505092915050565b6000806040838503121561155957600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b818110156115aa57611597838551611445565b9284019260609290920191600101611584565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156115aa576115e58385516113da565b9284019260a092909201916001016115d2565b6000806020838503121561160b57600080fd5b823567ffffffffffffffff8082111561162357600080fd5b818501915085601f83011261163757600080fd5b81358181111561164657600080fd5b86602060a0830285010111156114e657600080fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600281106103b357600080fd5b6000606082840312156116a657600080fd5b6040516060810181811067ffffffffffffffff821117156116d757634e487b7160e01b600052604160045260246000fd5b60405282356116e581611374565b81526020838101359082015260408301356116ff81611687565b60408201529392505050565b60006020828403121561171d57600080fd5b81516112d681611374565b6001600160a01b03841681526020810183905260608101611748836113bc565b826040830152949350505050565b634e487b7160e01b600052601160045260246000fd5b60006001820161177e5761177e611756565b5060010190565b600181811c9082168061179957607f821691505b60208210810361126d57634e487b7160e01b600052602260045260246000fd5b8082018082111561039c5761039c611756565b8181038181111561039c5761039c611756565b600060a082840312156117f157600080fd5b60405160a0810181811067ffffffffffffffff8211171561182257634e487b7160e01b600052604160045260246000fd5b604052823561183081611374565b80825250602083013560208201526040830135604082015260608301356060820152608083013561186081611687565b60808201529392505050565b60008161187b5761187b611756565b506000190190565b6001600160a01b038616815260208101859052604081018490526060810183905260a081016118b1836113bc565b8260808301529695505050505050565b6000602082840312156118d357600080fd5b505191905056fea264697066735822122062e6d9dae1bfa26ed26896453ee0c712657dcaba218d22d381387fe84724256a64736f6c634300081100330000000000000000000000009949ced50abccfcf182662e9b42c2b5384146045

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061014d5760003560e01c806367742bd4116100c3578063d73792a91161007c578063d73792a914610302578063df1cd6381461030b578063e8f11c4514610315578063f2fde38b1461033d578063f5887cdd14610350578063f59ae9ae1461036357600080fd5b806367742bd414610283578063715018a6146102965780637450e2de1461029e5780638b4864d6146102be5780638da5cb5b146102de57806399cd120f146102ef57600080fd5b80633b8b70bb116101155780633b8b70bb146101e95780633c38ccbb146101fc5780633e7e25c11461021c5780633fc8e65e1461023657806354fd4d501461024957806359b6f0dc1461025e57600080fd5b806308fe73b4146101525780630acac942146101785780630b3448a8146101985780630e03e490146101ad578063171ed7e9146101d6575b600080fd5b610165610160366004611389565b610376565b6040519081526020015b60405180910390f35b61018b610186366004611389565b61038b565b60405161016f919061141e565b6101ab6101a6366004611389565b6103a2565b005b6101be6101bb36600461142c565b90565b6040516001600160a01b03909116815260200161016f565b6101656101e4366004611389565b6103b6565b6101656101f7366004611389565b6103cb565b61020f61020a366004611389565b6103e0565b60405161016f9190611475565b61016561022a366004611389565b6001600160a01b031690565b6101ab610244366004611483565b61040a565b6102516106ae565b60405161016f91906114f8565b61027161026c366004611389565b61073c565b60405160ff909116815260200161016f565b610165610291366004611389565b61075c565b6101ab610767565b6102b16102ac366004611546565b61077b565b60405161016f9190611568565b6102d16102cc366004611546565b61091a565b60405161016f91906115b6565b6002546001600160a01b03166101be565b6102716102fd366004611389565b610ac6565b61016561271081565b610165620f424081565b610328610323366004611389565b610ae6565b6040805192835260208301919091520161016f565b6101ab61034b366004611389565b610b0a565b6001546101be906001600160a01b031681565b6101ab6103713660046115f8565b610b80565b600061038182610f21565b6060015192915050565b61039361132c565b61039c82610f21565b92915050565b6103aa611055565b6103b3816110af565b50565b60006103c182610f21565b6020015192915050565b60006103d682610f21565b6040015192915050565b61040160408051606081018252600080825260208201819052909182015290565b61039c826110da565b610412611055565b8060005b818110156106a85760008484838181106104325761043261165b565b9050606002018036038101906104489190611694565b80519091506001600160a01b03166104a15760405162461bcd60e51b815260206004820152601760248201527657686974656c6973743a207a65726f206164647265737360481b60448201526064015b60405180910390fd5b60015460405163687f4b5760e11b815267ffffffffffffffff461660048201526000916001600160a01b03169063d0fe96ae90602401602060405180830381865afa1580156104f4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610518919061170b565b8251604051634ad6b84d60e11b81526001600160a01b0391821660048201529116906395ad709a90602401602060405180830381865afa158015610560573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610584919061170b565b90506001600160a01b0381166105dc5760405162461bcd60e51b815260206004820152601f60248201527f57686974656c6973743a20706f6f6c2061646170746572206e6f7420736574006044820152606401610498565b8151602083015160405163e55156b560e01b81526001600160a01b0384169263e55156b592610621926004016001600160a01b03929092168252602082015260400190565b600060405180830381600087803b15801561063b57600080fd5b505af115801561064f573d6000803e3d6000fd5b50508351602085015160408087015190517f35cf0ed869165a43444185b5768c9d223379438ca00add4ec553b761d7967148955061068d9450611728565b60405180910390a15050806106a19061176c565b9050610416565b50505050565b600080546106bb90611785565b80601f01602080910402602001604051908101604052809291908181526020018280546106e790611785565b80156107345780601f1061070957610100808354040283529160200191610734565b820191906000526020600020905b81548152906001019060200180831161071757829003601f168201915b505050505081565b600061074782610f21565b60800151600181111561039c5761039c6113a6565b60006103c1826110da565b61076f611055565b6107796000611273565b565b6005546060908311156107ca5760405162461bcd60e51b815260206004820152601760248201527615da1a5d195b1a5cdd0e881ddc9bdb99c81bd9999cd95d604a1b6044820152606401610498565b6005546107e0906107db85856117b9565b6112c5565b915060006107ee84846117cc565b67ffffffffffffffff81111561080657610806611671565b60405190808252806020026020018201604052801561085857816020015b61084560408051606081018252600080825260208201819052909182015290565b8152602001906001900390816108245790505b509050835b8381101561091257600581815481106108785761087861165b565b600091825260209182902060408051606081018252600390930290910180546001600160a01b03168352600180820154948401949094526002810154929390929184019160ff16908111156108cf576108cf6113a6565b60018111156108e0576108e06113a6565b815250508282815181106108f6576108f661165b565b60200260200101819052508061090b9061176c565b905061085d565b509392505050565b6004546060908311156109695760405162461bcd60e51b815260206004820152601760248201527615da1a5d195b1a5cdd0e881ddc9bdb99c81bd9999cd95d604a1b6044820152606401610498565b60045461097a906107db85856117b9565b9150600061098884846117cc565b67ffffffffffffffff8111156109a0576109a0611671565b6040519080825280602002602001820160405280156109d957816020015b6109c661132c565b8152602001906001900390816109be5790505b509050835b8381101561091257600481815481106109f9576109f961165b565b90600052602060002090600502016040518060a00160405290816000820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020016001820154815260200160028201548152602001600382015481526020016004820160009054906101000a900460ff166001811115610a8357610a836113a6565b6001811115610a9457610a946113a6565b81525050828281518110610aaa57610aaa61165b565b602002602001018190525080610abf9061176c565b90506109de565b6000610ad1826110da565b60400151600181111561039c5761039c6113a6565b6000806000610af484610f21565b9050806020015181604001519250925050915091565b610b12611055565b6001600160a01b038116610b775760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610498565b6103b381611273565b610b88611055565b8060005b818110156106a8576000848483818110610ba857610ba861165b565b905060a00201803603810190610bbe91906117df565b80519091506001600160a01b0316610c125760405162461bcd60e51b815260206004820152601760248201527657686974656c6973743a207a65726f206164647265737360481b6044820152606401610498565b806020015181604001511015610c6a5760405162461bcd60e51b815260206004820152601860248201527f57686974656c6973743a206d696e206d61782077726f6e6700000000000000006044820152606401610498565b61271081606001511115610cb85760405162461bcd60e51b815260206004820152601560248201527457686974656c6973743a20666565203e203130302560581b6044820152606401610498565b80516001600160a01b031660009081526003602052604081205490819003610e1d576004805460018181018355600092909252835160059091027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b810180546001600160a01b039093166001600160a01b031990931692909217825560208501517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c82015560408501517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d82015560608501517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19e82015560808501517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19f9091018054869460ff19909116908381811115610df457610df46113a6565b02179055505060045483516001600160a01b031660009081526003602052604090205550610ebb565b610e268161186c565b90508160048281548110610e3c57610e3c61165b565b600091825260209182902083516005929092020180546001600160a01b0319166001600160a01b0390921691909117815590820151600180830191909155604083015160028301556060830151600383015560808301516004830180549192909160ff1916908381811115610eb357610eb36113a6565b021790555050505b7f0d7b343ecd56f9990d6289234e875fec1546a589555b41e8c68d1b0bce612b6582600001518360400151846020015185606001518660800151604051610f06959493929190611883565b60405180910390a1505080610f1a9061176c565b9050610b8c565b610f2961132c565b6001600160a01b03821660009081526003602052604081205490819003610f925760405162461bcd60e51b815260206004820152601860248201527f57686974656c6973743a20746f6b656e206e6f742073657400000000000000006044820152606401610498565b610f9b8161186c565b905060048181548110610fb057610fb061165b565b90600052602060002090600502016040518060a00160405290816000820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020016001820154815260200160028201548152602001600382015481526020016004820160009054906101000a900460ff16600181111561103a5761103a6113a6565b600181111561104b5761104b6113a6565b9052509392505050565b6002546001600160a01b031633146107795760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610498565b6110b8816112dd565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6110fb60408051606081018252600080825260208201819052909182015290565b60015460405163687f4b5760e11b815267ffffffffffffffff461660048201526000916001600160a01b03169063d0fe96ae90602401602060405180830381865afa15801561114e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611172919061170b565b604051634ad6b84d60e11b81526001600160a01b03858116600483015291909116906395ad709a90602401602060405180830381865afa1580156111ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111de919061170b565b90506001600160a01b0381161561126d576001600160a01b03838116808452604051636fcca69b60e01b8152600481019190915290821690636fcca69b90602401602060405180830381865afa15801561123c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061126091906118c1565b6020830152600160408301525b50919050565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008183106112d457816112d6565b825b9392505050565b6001600160a01b0381166103b35760405162461bcd60e51b8152602060048201526016602482015275456e64506f696e743a207a65726f206164647265737360501b6044820152606401610498565b6040518060a0016040528060006001600160a01b031681526020016000815260200160008152602001600081526020016000600181111561136f5761136f6113a6565b905290565b6001600160a01b03811681146103b357600080fd5b60006020828403121561139b57600080fd5b81356112d681611374565b634e487b7160e01b600052602160045260246000fd5b600281106103b357634e487b7160e01b600052602160045260246000fd5b80516001600160a01b031682526020808201519083015260408082015190830152606080820151908301526080810151611413816113bc565b806080840152505050565b60a0810161039c82846113da565b60006020828403121561143e57600080fd5b5035919050565b80516001600160a01b0316825260208082015190830152604081015161146a816113bc565b806040840152505050565b6060810161039c8284611445565b6000806020838503121561149657600080fd5b823567ffffffffffffffff808211156114ae57600080fd5b818501915085601f8301126114c257600080fd5b8135818111156114d157600080fd5b8660206060830285010111156114e657600080fd5b60209290920196919550909350505050565b600060208083528351808285015260005b8181101561152557858101830151858201604001528201611509565b506000604082860101526040601f19601f8301168501019250505092915050565b6000806040838503121561155957600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b818110156115aa57611597838551611445565b9284019260609290920191600101611584565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156115aa576115e58385516113da565b9284019260a092909201916001016115d2565b6000806020838503121561160b57600080fd5b823567ffffffffffffffff8082111561162357600080fd5b818501915085601f83011261163757600080fd5b81358181111561164657600080fd5b86602060a0830285010111156114e657600080fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600281106103b357600080fd5b6000606082840312156116a657600080fd5b6040516060810181811067ffffffffffffffff821117156116d757634e487b7160e01b600052604160045260246000fd5b60405282356116e581611374565b81526020838101359082015260408301356116ff81611687565b60408201529392505050565b60006020828403121561171d57600080fd5b81516112d681611374565b6001600160a01b03841681526020810183905260608101611748836113bc565b826040830152949350505050565b634e487b7160e01b600052601160045260246000fd5b60006001820161177e5761177e611756565b5060010190565b600181811c9082168061179957607f821691505b60208210810361126d57634e487b7160e01b600052602260045260246000fd5b8082018082111561039c5761039c611756565b8181038181111561039c5761039c611756565b600060a082840312156117f157600080fd5b60405160a0810181811067ffffffffffffffff8211171561182257634e487b7160e01b600052604160045260246000fd5b604052823561183081611374565b80825250602083013560208201526040830135604082015260608301356060820152608083013561186081611687565b60808201529392505050565b60008161187b5761187b611756565b506000190190565b6001600160a01b038616815260208101859052604081018490526060810183905260a081016118b1836113bc565b8260808301529695505050505050565b6000602082840312156118d357600080fd5b505191905056fea264697066735822122062e6d9dae1bfa26ed26896453ee0c712657dcaba218d22d381387fe84724256a64736f6c63430008110033

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

0000000000000000000000009949ced50abccfcf182662e9b42c2b5384146045

-----Decoded View---------------
Arg [0] : addressBook_ (address): 0x9949CEd50aBCCFCF182662e9B42c2b5384146045

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000009949ced50abccfcf182662e9b42c2b5384146045


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

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ 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.