Token Synth escrowed token

DEX  
 

Overview [ERC-20]

Price
$6.96 @ 0.002257 Eth (-14.50%)
Fully Diluted Market Cap
Max Total Supply:
36,938.867802788244834812 xSYNTH

Holders:
1,052 ( 0.190%)

Transfers:
-

Loading
[ Download CSV Export  ] 
Loading
[ Download CSV Export  ] 
Loading

OVERVIEW

Synthswap is a decentralized exchange (DEX) with an automated market-maker (AMM) in the Base ecosystem.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
XSynthToken

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 999999 runs

Other Settings:
default evmVersion
File 1 of 13 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

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

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

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

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

File 2 of 13 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // 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;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @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, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

File 3 of 13 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * 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}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * 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 value {ERC20} uses, unless this function is
     * 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, _allowances[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 = _allowances[owner][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * 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;
        }
        _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;
        _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;
        }
        _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 Spend `amount` form the allowance of `owner` toward `spender`.
     *
     * 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 {}
}

File 4 of 13 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.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);
}

File 5 of 13 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

File 6 of 13 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

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

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 8 of 13 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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;
    }
}

File 9 of 13 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol)

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastvalue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastvalue;
                // Update the index for the moved value
                set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        assembly {
            result := store
        }

        return result;
    }
}

File 10 of 13 : ISynthTokenV2.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface ISynthTokenV2 is IERC20 {
    function burnDead(uint256 amount) external;
}

File 11 of 13 : IXSynthToken.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IXSynthToken is IERC20 {
    function usageAllocations(
        address userAddress,
        address usageAddress
    ) external view returns (uint256 allocation);

    function allocateFromUsage(address userAddress, uint256 amount) external;

    function convertTo(uint256 amount, address to) external;

    function deallocateFromUsage(address userAddress, uint256 amount) external;

    function isTransferWhitelisted(
        address account
    ) external view returns (bool);
}

File 12 of 13 : IXSynthTokenUsage.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

interface IXSynthTokenUsage {
    function allocate(
        address userAddress,
        uint256 amount,
        bytes calldata data
    ) external;

    function deallocate(
        address userAddress,
        uint256 amount,
        bytes calldata data
    ) external;
}

File 13 of 13 : XSynthToken.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";

import "./interfaces//ISynthTokenV2.sol";
import "./interfaces/IXSynthToken.sol";
import "./interfaces/IXSynthTokenUsage.sol";

/*
 * xSYNTH is Synthswaps escrowed governance token obtainable by converting SYNTH to it
 * It's non-transferable, except from/to whitelisted addresses
 * It can be converted back to SYNTH through a vesting process
 * This contract is made to receive xSYNTH deposits from users in order to allocate them to Usages (plugins) contracts
 */
contract XSynthToken is
    Ownable,
    ReentrancyGuard,
    ERC20("Synth escrowed token", "xSYNTH"),
    IXSynthToken
{
    using Address for address;
    using EnumerableSet for EnumerableSet.AddressSet;
    using SafeERC20 for ISynthTokenV2;

    struct XSynthBalance {
        uint256 allocatedAmount; // Amount of xSYNTH allocated to a Usage
        uint256 redeemingAmount; // Total amount of xSYNTH currently being redeemed
    }

    struct RedeemInfo {
        uint256 synthAmount; // SYNTH amount to receive when vesting has ended
        uint256 xSynthAmount; // xSYNTH amount to redeem
        uint256 endTime; // end time of redeeming if left for the desired duration
        uint256 startTime; // start time of redeem action
        IXSynthTokenUsage dividendsAddress;
        uint256 dividendsAllocation; // Share of redeeming xSYNTH to allocate to the Dividends Usage contract
    }

    ISynthTokenV2 public immutable synthToken; // SYNTH token to convert to/from
    IXSynthTokenUsage public dividendsAddress; // Synthswap dividends contract

    EnumerableSet.AddressSet private _transferWhitelist; // addresses allowed to send/receive xSYNTH

    mapping(address => mapping(address => uint256)) public usageApprovals; // Usage approvals to allocate xSYNTH
    mapping(address => mapping(address => uint256))
        public
        override usageAllocations; // Active xSYNTH allocations to usages

    uint256 public constant MAX_DEALLOCATION_FEE = 2000; // 20%
    mapping(address => uint256) public usagesDeallocationFee; // Fee paid when deallocating xSYNTH

    uint256 public constant MAX_FIXED_RATIO = 1 ether; // 100%

    // Redeeming min/max settings
    uint256 public minRedeemRatio = MAX_FIXED_RATIO / 2; // 1:0.5 precision is 1**18
    uint256 public maxRedeemRatio = MAX_FIXED_RATIO; // 1:1 precision is 1**18
    uint256 public minRedeemDuration = 15 days;
    uint256 public maxRedeemDuration = 90 days;
    // Adjusted dividends rewards for redeeming xSYNTH
    uint256 public redeemDividendsAdjustment = MAX_FIXED_RATIO / 2; // 50% precision is 1**18
    uint256 public maxRedeemDurationDividendAdjust = 750000000000000000; // 75% precision is 1**18

    address internal constant BURN_ADDRESS =
        0x000000000000000000000000000000000000dEaD;

    mapping(address => XSynthBalance) public xSynthBalances; // User's xSYNTH balances
    mapping(address => RedeemInfo[]) public userRedeems; // User's redeeming instances

    constructor(ISynthTokenV2 _synthToken) {
        synthToken = _synthToken;
        _transferWhitelist.add(address(this));
    }

    /********************************************/
    /****************** EVENTS ******************/
    /********************************************/

    event ApproveUsage(
        address indexed userAddress,
        address indexed usageAddress,
        uint256 amount
    );
    event Convert(address indexed from, address to, uint256 amount);
    event UpdateRedeemSettings(
        uint256 minRedeemRatio,
        uint256 maxRedeemRatio,
        uint256 minRedeemDuration,
        uint256 maxRedeemDuration,
        uint256 redeemDividendsAdjustment
    );
    event UpdateDividendsAddress(
        address previousDividendsAddress,
        address newDividendsAddress
    );
    event UpdateDeallocationFee(address indexed usageAddress, uint256 fee);
    event SetTransferWhitelist(address account, bool add);
    event Redeem(
        address indexed userAddress,
        uint256 xSynthAmount,
        uint256 synthAmount,
        uint256 duration
    );
    event FinalizeRedeem(
        address indexed userAddress,
        uint256 xSynthAmount,
        uint256 synthAmount
    );
    event CancelRedeem(address indexed userAddress, uint256 xSynthAmount);
    event UpdateRedeemDividendsAddress(
        address indexed userAddress,
        uint256 redeemIndex,
        address previousDividendsAddress,
        address newDividendsAddress
    );
    event Allocate(
        address indexed userAddress,
        address indexed usageAddress,
        uint256 amount
    );
    event Deallocate(
        address indexed userAddress,
        address indexed usageAddress,
        uint256 amount,
        uint256 fee
    );

    /***********************************************/
    /****************** MODIFIERS ******************/
    /***********************************************/

    /*
     * @dev Check if a redeem entry exists
     */
    modifier validateRedeem(address userAddress, uint256 redeemIndex) {
        require(
            redeemIndex < userRedeems[userAddress].length,
            "validateRedeem: redeem entry does not exist"
        );
        _;
    }

    /**************************************************/
    /****************** PUBLIC VIEWS ******************/
    /**************************************************/

    /*
     * @dev Returns user's xSYNTH balances
     */
    function getXSynthBalance(
        address userAddress
    ) external view returns (uint256 allocatedAmount, uint256 redeemingAmount) {
        XSynthBalance storage balance = xSynthBalances[userAddress];
        return (balance.allocatedAmount, balance.redeemingAmount);
    }

    /*
     * @dev returns redeemable SYNTH for "amount" of xSYNTH vested for "duration" seconds
     */
    function getSynthByVestingDuration(
        uint256 amount,
        uint256 duration
    ) public view returns (uint256) {
        if (duration < minRedeemDuration) {
            return 0;
        }

        // capped to maxRedeemDuration
        if (duration > maxRedeemDuration) {
            return (amount * maxRedeemRatio) / MAX_FIXED_RATIO;
        }

        uint256 ratio = minRedeemRatio +
            ((duration - minRedeemDuration) *
                (maxRedeemRatio - minRedeemRatio)) /
            (maxRedeemDuration - minRedeemDuration);

        return (amount * ratio) / MAX_FIXED_RATIO;
    }

    /**
     * @dev returns quantity of "userAddress" pending redeems
     */
    function getUserRedeemsLength(
        address userAddress
    ) external view returns (uint256) {
        return userRedeems[userAddress].length;
    }

    /**
     * @dev returns "userAddress" info for a pending redeem identified by "redeemIndex"
     */
    function getUserRedeem(
        address userAddress,
        uint256 redeemIndex
    )
        external
        view
        validateRedeem(userAddress, redeemIndex)
        returns (
            uint256 synthAmount,
            uint256 xSynthAmount,
            uint256 endTime,
            uint256 startTime,
            address dividendsContract,
            uint256 dividendsAllocation
        )
    {
        RedeemInfo storage _redeem = userRedeems[userAddress][redeemIndex];
        return (
            _redeem.synthAmount,
            _redeem.xSynthAmount,
            _redeem.endTime,
            _redeem.startTime,
            address(_redeem.dividendsAddress),
            _redeem.dividendsAllocation
        );
    }

    /**
     * @dev returns approved xToken to allocate from "userAddress" to "usageAddress"
     */
    function getUsageApproval(
        address userAddress,
        address usageAddress
    ) external view returns (uint256) {
        return usageApprovals[userAddress][usageAddress];
    }

    /**
     * @dev returns allocated xToken from "userAddress" to "usageAddress"
     */
    function getUsageAllocation(
        address userAddress,
        address usageAddress
    ) external view returns (uint256) {
        return usageAllocations[userAddress][usageAddress];
    }

    /**
     * @dev returns length of transferWhitelist array
     */
    function transferWhitelistLength() external view returns (uint256) {
        return _transferWhitelist.length();
    }

    /**
     * @dev returns transferWhitelist array item's address for "index"
     */
    function transferWhitelist(uint256 index) external view returns (address) {
        return _transferWhitelist.at(index);
    }

    /**
     * @dev returns if "account" is allowed to send/receive xSYNTH
     */
    function isTransferWhitelisted(
        address account
    ) external view override returns (bool) {
        return _transferWhitelist.contains(account);
    }

    /*******************************************************/
    /****************** OWNABLE FUNCTIONS ******************/
    /*******************************************************/

    /**
     * @dev Updates all redeem ratios and durations
     *
     * Must only be called by owner
     */
    function updateRedeemSettings(
        uint256 minRedeemRatio_,
        uint256 maxRedeemRatio_,
        uint256 minRedeemDuration_,
        uint256 maxRedeemDuration_,
        uint256 redeemDividendsAdjustment_
    ) external onlyOwner {
        require(
            minRedeemRatio_ <= maxRedeemRatio_,
            "updateRedeemSettings: wrong ratio values"
        );
        require(
            minRedeemDuration_ < maxRedeemDuration_,
            "updateRedeemSettings: wrong duration values"
        );
        // should never exceed 100%
        require(
            maxRedeemRatio_ <= MAX_FIXED_RATIO &&
                redeemDividendsAdjustment_ <= MAX_FIXED_RATIO,
            "updateRedeemSettings: wrong ratio values"
        );

        minRedeemRatio = minRedeemRatio_;
        maxRedeemRatio = maxRedeemRatio_;
        minRedeemDuration = minRedeemDuration_;
        maxRedeemDuration = maxRedeemDuration_;
        redeemDividendsAdjustment = redeemDividendsAdjustment_;

        emit UpdateRedeemSettings(
            minRedeemRatio_,
            maxRedeemRatio_,
            minRedeemDuration_,
            maxRedeemDuration_,
            redeemDividendsAdjustment_
        );
    }

    /**
     * @dev Updates redeemDividendsAdjustment
     *
     * Must only be called by owner
     */
    function updateRedeemDividendsAdjustment(
        uint256 redeemDividendsAdjustment_
    ) external onlyOwner {
        require(
            redeemDividendsAdjustment_ <= MAX_FIXED_RATIO,
            "updateRedeemSettings: wrong ratio values"
        );

        redeemDividendsAdjustment = redeemDividendsAdjustment_;
    }

    function updateMaxDurationRedeemDividendsAdjst(
        uint256 _maxRedeemDurationDividendAdjust
    ) external onlyOwner {
        require(
            _maxRedeemDurationDividendAdjust <= MAX_FIXED_RATIO,
            "updateRedeemSettings: wrong ratio values"
        );

        maxRedeemDurationDividendAdjust = _maxRedeemDurationDividendAdjust;
    }

    /**
     * @dev Updates dividends contract address
     *
     * Must only be called by owner
     */
    function updateDividendsAddress(
        IXSynthTokenUsage dividendsAddress_
    ) external onlyOwner {
        // if set to 0, also set divs earnings while redeeming to 0
        if (address(dividendsAddress_) == address(0)) {
            redeemDividendsAdjustment = 0;
        }

        emit UpdateDividendsAddress(
            address(dividendsAddress),
            address(dividendsAddress_)
        );
        dividendsAddress = dividendsAddress_;
    }

    /**
     * @dev Updates fee paid by users when deallocating from "usageAddress"
     */
    function updateDeallocationFee(
        address usageAddress,
        uint256 fee
    ) external onlyOwner {
        require(fee <= MAX_DEALLOCATION_FEE, "updateDeallocationFee: too high");

        usagesDeallocationFee[usageAddress] = fee;
        emit UpdateDeallocationFee(usageAddress, fee);
    }

    /**
     * @dev Adds or removes addresses from the transferWhitelist
     */
    function updateTransferWhitelist(
        address account,
        bool add
    ) external onlyOwner {
        require(
            account != address(this),
            "updateTransferWhitelist: Cannot remove xToken from whitelist"
        );

        if (add) _transferWhitelist.add(account);
        else _transferWhitelist.remove(account);

        emit SetTransferWhitelist(account, add);
    }

    /*****************************************************************/
    /******************  EXTERNAL PUBLIC FUNCTIONS  ******************/
    /*****************************************************************/

    /**
     * @dev Approves "usage" address to get allocations up to "amount" of xSYNTH from msg.sender
     */
    function approveUsage(
        IXSynthTokenUsage usage,
        uint256 amount
    ) external nonReentrant {
        require(
            address(usage) != address(0),
            "approveUsage: approve to the zero address"
        );

        usageApprovals[msg.sender][address(usage)] = amount;
        emit ApproveUsage(msg.sender, address(usage), amount);
    }

    /**
     * @dev Convert caller's "amount" of SYNTH to xSYNTH
     */
    function convert(uint256 amount) external nonReentrant {
        _convert(amount, msg.sender);
    }

    /**
     * @dev Convert caller's "amount" of SYNTH to xSYNTH to "to" address
     */
    function convertTo(
        uint256 amount,
        address to
    ) external override nonReentrant {
        require(address(msg.sender).isContract(), "convertTo: not allowed");
        _convert(amount, to);
    }

    /**
     * @dev Initiates redeem process (xSYNTH to SYNTH)
     *
     * Handles dividends' compensation allocation during the vesting process if needed
     */
    function redeem(
        uint256 xSynthAmount,
        uint256 duration
    ) external nonReentrant {
        require(xSynthAmount > 0, "redeem: xSynthAmount cannot be null");
        require(duration >= minRedeemDuration, "redeem: duration too low");

        _transfer(msg.sender, address(this), xSynthAmount);
        XSynthBalance storage balance = xSynthBalances[msg.sender];

        // get corresponding SYNTH amount
        uint256 synthAmount = getSynthByVestingDuration(xSynthAmount, duration);
        emit Redeem(msg.sender, xSynthAmount, synthAmount, duration);

        // if redeeming is not immediate, go through vesting process
        if (duration > 0) {
            balance.redeemingAmount += xSynthAmount;

            // handle dividends during the vesting process
            uint256 dividendsAllocation = (xSynthAmount *
                (
                    duration == maxRedeemDuration
                        ? maxRedeemDurationDividendAdjust
                        : redeemDividendsAdjustment
                )) / MAX_FIXED_RATIO;

            // only if compensation is active
            if (dividendsAllocation > 0) {
                // allocate to dividends
                dividendsAddress.allocate(
                    msg.sender,
                    dividendsAllocation,
                    new bytes(0)
                );
            }

            // add redeeming entry
            userRedeems[msg.sender].push(
                RedeemInfo(
                    synthAmount,
                    xSynthAmount,
                    _currentBlockTimestamp() + duration,
                    _currentBlockTimestamp(),
                    dividendsAddress,
                    dividendsAllocation
                )
            );
        } else {
            // immediately redeem for SYNTH
            _finalizeRedeem(msg.sender, xSynthAmount, synthAmount);
        }
    }

    /**
     * @dev Finalizes redeem process when vesting duration has been reached
     *
     * Can only be called by the redeem entry owner
     */
    function finalizeRedeem(
        uint256 redeemIndex
    ) external nonReentrant validateRedeem(msg.sender, redeemIndex) {
        XSynthBalance storage balance = xSynthBalances[msg.sender];
        RedeemInfo storage _redeem = userRedeems[msg.sender][redeemIndex];
        require(
            _currentBlockTimestamp() >= _redeem.startTime + minRedeemDuration,
            "finalizeRedeem: min duration before redeem"
        );

        // remove from SBT total
        balance.redeemingAmount -= _redeem.xSynthAmount;

        uint256 duration = _currentBlockTimestamp() - _redeem.startTime;
        uint256 synthAmount = getSynthByVestingDuration(
            _redeem.xSynthAmount,
            duration
        );
        _finalizeRedeem(msg.sender, _redeem.xSynthAmount, synthAmount);

        // handle dividends compensation if any was active
        if (_redeem.dividendsAllocation > 0) {
            // deallocate from dividends
            IXSynthTokenUsage(_redeem.dividendsAddress).deallocate(
                msg.sender,
                _redeem.dividendsAllocation,
                new bytes(0)
            );
        }

        // remove redeem entry
        _deleteRedeemEntry(redeemIndex);
    }

    /**
     * @dev Updates dividends address for an existing active redeeming process
     *
     * Can only be called by the involved user
     * Should only be used if dividends contract was to be migrated
     */
    function updateRedeemDividendsAddress(
        uint256 redeemIndex
    ) external nonReentrant validateRedeem(msg.sender, redeemIndex) {
        RedeemInfo storage _redeem = userRedeems[msg.sender][redeemIndex];

        // only if the active dividends contract is not the same anymore
        if (
            dividendsAddress != _redeem.dividendsAddress &&
            address(dividendsAddress) != address(0)
        ) {
            if (_redeem.dividendsAllocation > 0) {
                // deallocate from old dividends contract
                _redeem.dividendsAddress.deallocate(
                    msg.sender,
                    _redeem.dividendsAllocation,
                    new bytes(0)
                );
                // allocate to new used dividends contract
                dividendsAddress.allocate(
                    msg.sender,
                    _redeem.dividendsAllocation,
                    new bytes(0)
                );
            }

            emit UpdateRedeemDividendsAddress(
                msg.sender,
                redeemIndex,
                address(_redeem.dividendsAddress),
                address(dividendsAddress)
            );
            _redeem.dividendsAddress = dividendsAddress;
        }
    }

    /**
     * @dev Cancels an ongoing redeem entry
     *
     * Can only be called by its owner
     */
    function cancelRedeem(
        uint256 redeemIndex
    ) external nonReentrant validateRedeem(msg.sender, redeemIndex) {
        XSynthBalance storage balance = xSynthBalances[msg.sender];
        RedeemInfo storage _redeem = userRedeems[msg.sender][redeemIndex];

        // make redeeming xSYNTH available again
        balance.redeemingAmount -= _redeem.xSynthAmount;

        _transfer(address(this), msg.sender, _redeem.xSynthAmount);

        // handle dividends compensation if any was active
        if (_redeem.dividendsAllocation > 0) {
            // deallocate from dividends
            IXSynthTokenUsage(_redeem.dividendsAddress).deallocate(
                msg.sender,
                _redeem.dividendsAllocation,
                new bytes(0)
            );
        }

        emit CancelRedeem(msg.sender, _redeem.xSynthAmount);

        // remove redeem entry
        _deleteRedeemEntry(redeemIndex);
    }

    /**
     * @dev Allocates caller's "amount" of available xSYNTH to "usageAddress" contract
     *
     * args specific to usage contract must be passed into "usageData"
     */
    function allocate(
        address usageAddress,
        uint256 amount,
        bytes calldata usageData
    ) external nonReentrant {
        _allocate(msg.sender, usageAddress, amount);

        // allocates xSYNTH to usageContract
        IXSynthTokenUsage(usageAddress).allocate(msg.sender, amount, usageData);
    }

    /**
     * @dev Allocates "amount" of available xSYNTH from "userAddress" to caller (ie usage contract)
     *
     * Caller must have an allocation approval for the required xToken xSYNTH from "userAddress"
     */
    function allocateFromUsage(
        address userAddress,
        uint256 amount
    ) external override nonReentrant {
        _allocate(userAddress, msg.sender, amount);
    }

    /**
     * @dev Deallocates caller's "amount" of available xSYNTH from "usageAddress" contract
     *
     * args specific to usage contract must be passed into "usageData"
     */
    function deallocate(
        address usageAddress,
        uint256 amount,
        bytes calldata usageData
    ) external nonReentrant {
        _deallocate(msg.sender, usageAddress, amount);

        // deallocate xSYNTH into usageContract
        IXSynthTokenUsage(usageAddress).deallocate(
            msg.sender,
            amount,
            usageData
        );
    }

    /**
     * @dev Deallocates "amount" of allocated xSYNTH belonging to "userAddress" from caller (ie usage contract)
     *
     * Caller can only deallocate xSYNTH from itself
     */
    function deallocateFromUsage(
        address userAddress,
        uint256 amount
    ) external override nonReentrant {
        _deallocate(userAddress, msg.sender, amount);
    }

    /********************************************************/
    /****************** INTERNAL FUNCTIONS ******************/
    /********************************************************/

    /**
     * @dev Convert caller's "amount" of SYNTH into xSYNTH to "to"
     */
    function _convert(uint256 amount, address to) internal {
        require(amount != 0, "convert: amount cannot be null");

        // mint new xSYNTH
        _mint(to, amount);

        emit Convert(msg.sender, to, amount);
        synthToken.safeTransferFrom(msg.sender, address(this), amount);
    }

    /**
     * @dev Finalizes the redeeming process for "userAddress" by transferring him "synthAmount" and removing "xSynthAmount" from supply
     *
     * Any vesting check should be ran before calling this
     * SYNTH excess is automatically burnt
     */
    function _finalizeRedeem(
        address userAddress,
        uint256 xSynthAmount,
        uint256 synthAmount
    ) internal {
        uint256 synthExcess = xSynthAmount - synthAmount;

        // sends due SYNTH tokens
        synthToken.safeTransfer(userAddress, synthAmount);

        // burns SYNTH excess if any
        if (synthExcess > 0) {
            synthToken.safeTransfer(BURN_ADDRESS, synthExcess);
        }

        _burn(address(this), xSynthAmount);

        emit FinalizeRedeem(userAddress, xSynthAmount, synthAmount);
    }

    /**
     * @dev Allocates "userAddress" user's "amount" of available xSYNTH to "usageAddress" contract
     *
     */
    function _allocate(
        address userAddress,
        address usageAddress,
        uint256 amount
    ) internal {
        require(amount > 0, "allocate: amount cannot be null");

        XSynthBalance storage balance = xSynthBalances[userAddress];

        // approval checks if allocation request amount has been approved by userAddress to be allocated to this usageAddress
        uint256 approvedXSynth = usageApprovals[userAddress][usageAddress];
        require(approvedXSynth >= amount, "allocate: non authorized amount");

        // remove allocated amount from usage's approved amount
        usageApprovals[userAddress][usageAddress] = approvedXSynth - amount;

        // update usage's allocatedAmount for userAddress
        usageAllocations[userAddress][usageAddress] =
            usageAllocations[userAddress][usageAddress] +
            amount;

        // adjust user's xSYNTH balances
        balance.allocatedAmount = balance.allocatedAmount + amount;
        _transfer(userAddress, address(this), amount);

        emit Allocate(userAddress, usageAddress, amount);
    }

    /**
     * @dev Deallocates "amount" of available xSYNTH to "usageAddress" contract
     *
     * args specific to usage contract must be passed into "usageData"
     */
    function _deallocate(
        address userAddress,
        address usageAddress,
        uint256 amount
    ) internal {
        require(amount > 0, "deallocate: amount cannot be null");

        // check if there is enough allocated xSYNTH to this usage to deallocate
        uint256 allocatedAmount = usageAllocations[userAddress][usageAddress];
        require(allocatedAmount >= amount, "deallocate: non authorized amount");

        // remove deallocated amount from usage's allocation
        usageAllocations[userAddress][usageAddress] = allocatedAmount - amount;

        uint256 deallocationFeeAmount = (amount *
            usagesDeallocationFee[usageAddress]) / 10000;

        // adjust user's xSYNTH balances
        XSynthBalance storage balance = xSynthBalances[userAddress];
        balance.allocatedAmount -= amount;

        _transfer(address(this), userAddress, amount - deallocationFeeAmount);
        // burn corresponding SYNTH and XSYNTH
        if (deallocationFeeAmount > 0) {
            synthToken.safeTransfer(BURN_ADDRESS, deallocationFeeAmount);
            _burn(address(this), deallocationFeeAmount);
        }
        emit Deallocate(
            userAddress,
            usageAddress,
            amount,
            deallocationFeeAmount
        );
    }

    function _deleteRedeemEntry(uint256 index) internal {
        userRedeems[msg.sender][index] = userRedeems[msg.sender][
            userRedeems[msg.sender].length - 1
        ];
        userRedeems[msg.sender].pop();
    }

    /**
     * @dev Hook override to forbid transfers except from whitelisted addresses and minting
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 /*amount*/
    ) internal view override {
        require(
            from == address(0) ||
                _transferWhitelist.contains(from) ||
                _transferWhitelist.contains(to),
            "transfer: not allowed"
        );
    }

    /**
     * @dev Utility function to get the current block timestamp
     */
    function _currentBlockTimestamp() internal view virtual returns (uint256) {
        /* solhint-disable not-rely-on-time */
        return block.timestamp;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract ISynthTokenV2","name":"_synthToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"userAddress","type":"address"},{"indexed":true,"internalType":"address","name":"usageAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Allocate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"userAddress","type":"address"},{"indexed":true,"internalType":"address","name":"usageAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ApproveUsage","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"xSynthAmount","type":"uint256"}],"name":"CancelRedeem","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Convert","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"userAddress","type":"address"},{"indexed":true,"internalType":"address","name":"usageAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"Deallocate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"xSynthAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"synthAmount","type":"uint256"}],"name":"FinalizeRedeem","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"xSynthAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"synthAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"}],"name":"Redeem","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"add","type":"bool"}],"name":"SetTransferWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"usageAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"UpdateDeallocationFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousDividendsAddress","type":"address"},{"indexed":false,"internalType":"address","name":"newDividendsAddress","type":"address"}],"name":"UpdateDividendsAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"redeemIndex","type":"uint256"},{"indexed":false,"internalType":"address","name":"previousDividendsAddress","type":"address"},{"indexed":false,"internalType":"address","name":"newDividendsAddress","type":"address"}],"name":"UpdateRedeemDividendsAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"minRedeemRatio","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"maxRedeemRatio","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"minRedeemDuration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"maxRedeemDuration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"redeemDividendsAdjustment","type":"uint256"}],"name":"UpdateRedeemSettings","type":"event"},{"inputs":[],"name":"MAX_DEALLOCATION_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_FIXED_RATIO","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"usageAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"usageData","type":"bytes"}],"name":"allocate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"allocateFromUsage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IXSynthTokenUsage","name":"usage","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approveUsage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"redeemIndex","type":"uint256"}],"name":"cancelRedeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"convert","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"convertTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"usageAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"usageData","type":"bytes"}],"name":"deallocate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deallocateFromUsage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dividendsAddress","outputs":[{"internalType":"contract IXSynthTokenUsage","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"redeemIndex","type":"uint256"}],"name":"finalizeRedeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"getSynthByVestingDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"address","name":"usageAddress","type":"address"}],"name":"getUsageAllocation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"address","name":"usageAddress","type":"address"}],"name":"getUsageApproval","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"uint256","name":"redeemIndex","type":"uint256"}],"name":"getUserRedeem","outputs":[{"internalType":"uint256","name":"synthAmount","type":"uint256"},{"internalType":"uint256","name":"xSynthAmount","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"address","name":"dividendsContract","type":"address"},{"internalType":"uint256","name":"dividendsAllocation","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"}],"name":"getUserRedeemsLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"}],"name":"getXSynthBalance","outputs":[{"internalType":"uint256","name":"allocatedAmount","type":"uint256"},{"internalType":"uint256","name":"redeemingAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isTransferWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxRedeemDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxRedeemDurationDividendAdjust","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxRedeemRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minRedeemDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minRedeemRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"xSynthAmount","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"redeemDividendsAdjustment","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"synthToken","outputs":[{"internalType":"contract ISynthTokenV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"transferWhitelist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"transferWhitelistLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"usageAddress","type":"address"},{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"updateDeallocationFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IXSynthTokenUsage","name":"dividendsAddress_","type":"address"}],"name":"updateDividendsAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxRedeemDurationDividendAdjust","type":"uint256"}],"name":"updateMaxDurationRedeemDividendsAdjst","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"redeemIndex","type":"uint256"}],"name":"updateRedeemDividendsAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"redeemDividendsAdjustment_","type":"uint256"}],"name":"updateRedeemDividendsAdjustment","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"minRedeemRatio_","type":"uint256"},{"internalType":"uint256","name":"maxRedeemRatio_","type":"uint256"},{"internalType":"uint256","name":"minRedeemDuration_","type":"uint256"},{"internalType":"uint256","name":"maxRedeemDuration_","type":"uint256"},{"internalType":"uint256","name":"redeemDividendsAdjustment_","type":"uint256"}],"name":"updateRedeemSettings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"add","type":"bool"}],"name":"updateTransferWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"usageAllocations","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"usageApprovals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"usagesDeallocationFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userRedeems","outputs":[{"internalType":"uint256","name":"synthAmount","type":"uint256"},{"internalType":"uint256","name":"xSynthAmount","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"contract IXSynthTokenUsage","name":"dividendsAddress","type":"address"},{"internalType":"uint256","name":"dividendsAllocation","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"xSynthBalances","outputs":[{"internalType":"uint256","name":"allocatedAmount","type":"uint256"},{"internalType":"uint256","name":"redeemingAmount","type":"uint256"}],"stateMutability":"view","type":"function"}]

60a0604052620000196002670de0b6b3a764000062000207565b600d55670de0b6b3a7640000600e556213c680600f556276a7006010556002670de0b6b3a76400006200004d919062000207565b601155670a688906bd8b00006012553480156200006957600080fd5b5060405162004c8138038062004c818339810160408190526200008c916200022a565b6040518060400160405280601481526020017f53796e746820657363726f77656420746f6b656e000000000000000000000000815250604051806040016040528060068152602001650f0a6b29ca8960d31b815250620000fb620000f56200014160201b60201c565b62000145565b6001805560056200010d838262000301565b5060066200011c828262000301565b5050506001600160a01b0381166080526200013960083062000195565b5050620003cd565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000620001ac836001600160a01b038416620001b5565b90505b92915050565b6000818152600183016020526040812054620001fe57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620001af565b506000620001af565b6000826200022557634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156200023d57600080fd5b81516001600160a01b03811681146200025557600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200028757607f821691505b602082108103620002a857634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620002fc57600081815260208120601f850160051c81016020861015620002d75750805b601f850160051c820191505b81811015620002f857828155600101620002e3565b5050505b505050565b81516001600160401b038111156200031d576200031d6200025c565b62000335816200032e845462000272565b84620002ae565b602080601f8311600181146200036d5760008415620003545750858301515b600019600386901b1c1916600185901b178555620002f8565b600085815260208120601f198616915b828110156200039e578886015182559484019460019091019084016200037d565b5085821015620003bd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805161487c6200040560003960008181610833015281816137020152818161388c01528181613955015261399c015261487c6000f3fe608060405234801561001057600080fd5b506004361061036d5760003560e01c80635a1d34dc116101d3578063a3908e1b11610104578063c4b10766116100a2578063e3a2950b1161007c578063e3a2950b14610900578063e9ed87f814610909578063f255d26e14610912578063f2fde38b1461092557600080fd5b8063c4b107661461089e578063cc6c5423146108a7578063dd62ed3e146108ba57600080fd5b8063aff6cbf1116100de578063aff6cbf11461081b578063b6838cfa1461082e578063b90c2b5214610855578063c360ed1c1461088b57600080fd5b8063a3908e1b146107e2578063a457c2d7146107f5578063a9059cbb1461080857600080fd5b80637ddfa28c116101715780638975f9181161014b5780638975f918146107895780638da5cb5b146107a957806395d89b41146107c7578063a0bdc7cb146107cf57600080fd5b80637ddfa28c1461075a5780638541390e1461076d578063890836541461077657600080fd5b806370a08231116101ad57806370a08231146106f6578063715018a61461072c57806376c608f7146107345780637cbc23731461074757600080fd5b80635a1d34dc14610696578063619ac95b146106a95780636bd91a8f146106b857600080fd5b80632cc2f5ce116102ad578063488c83031161024b5780634b359d38116102255780634b359d38146106075780634f62b7ec1461061a578063539ffb7714610670578063549230c91461068357600080fd5b8063488c83031461058e578063497965ee146105b95780634a5b406e146105fe57600080fd5b806331124ce31161028757806331124ce314610546578063313ce5671461055957806339509351146105685780633b90f9a01461057b57600080fd5b80632cc2f5ce146104995780632e7f3c50146104c45780632e9a76e41461050057600080fd5b8063161aab431161031a5780631c75e369116102f45780631c75e3691461041a5780631eee7e601461042d57806323b872dd146104405780632b4896791461045357600080fd5b8063161aab431461040157806318160ddd146104095780631c3526791461041157600080fd5b8063093220b71161034b578063093220b7146103b8578063095ea7b3146103cb5780630f7d3a69146103ee57600080fd5b806302f91e551461037257806306045a211461038e57806306fdde03146103a3575b600080fd5b61037b6107d081565b6040519081526020015b60405180910390f35b6103a161039c366004614362565b610938565b005b6103ab610a7a565b60405161038591906143ed565b6103a16103c6366004614400565b610b0c565b6103de6103d936600461443b565b610dc7565b6040519015158152602001610385565b6103a16103fc36600461443b565b610de1565b61037b610f34565b60045461037b565b61037b600d5481565b6103a1610428366004614467565b610f45565b6103de61043b366004614362565b611055565b6103de61044e3660046144f0565b611062565b61037b610461366004614531565b73ffffffffffffffffffffffffffffffffffffffff9182166000908152600a6020908152604080832093909416825291909152205490565b61037b6104a7366004614531565b600b60209081526000928352604080842090915290825290205481565b6104eb6104d2366004614362565b6013602052600090815260409020805460019091015482565b60408051928352602083019190915201610385565b61037b61050e366004614531565b73ffffffffffffffffffffffffffffffffffffffff9182166000908152600b6020908152604080832093909416825291909152205490565b6103a161055436600461456a565b611088565b60405160128152602001610385565b6103de61057636600461443b565b611417565b6103a161058936600461443b565b611463565b61037b61059c366004614531565b600a60209081526000928352604080842090915290825290205481565b6007546105d99073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610385565b61037b60115481565b6105d961061536600461456a565b6114e7565b61062d61062836600461443b565b6114f4565b60408051968752602087019590955293850192909252606084015273ffffffffffffffffffffffffffffffffffffffff16608083015260a082015260c001610385565b6103a161067e36600461456a565b611561565b6103a1610691366004614467565b6117d6565b6103a16106a4366004614583565b6118aa565b61037b670de0b6b3a764000081565b6104eb6106c6366004614362565b73ffffffffffffffffffffffffffffffffffffffff16600090815260136020526040902080546001909101549091565b61037b610704366004614362565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b6103a161198d565b61037b6107423660046145a8565b611a1a565b6103a16107553660046145a8565b611ad7565b6103a161076836600461456a565b611e92565b61037b60125481565b6103a16107843660046145d8565b611fb0565b61037b610797366004614362565b600c6020526000908152604090205481565b60005473ffffffffffffffffffffffffffffffffffffffff166105d9565b6103ab61214e565b6103a16107dd36600461443b565b61215d565b6103a16107f036600461456a565b6121d9565b6103de61080336600461443b565b61225b565b6103de61081636600461443b565b612337565b6103a161082936600461456a565b612345565b6105d97f000000000000000000000000000000000000000000000000000000000000000081565b61037b610863366004614362565b73ffffffffffffffffffffffffffffffffffffffff1660009081526014602052604090205490565b6103a161089936600461443b565b612647565b61037b600f5481565b61062d6108b536600461443b565b6127cb565b61037b6108c8366004614531565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260036020908152604080832093909416825291909152205490565b61037b600e5481565b61037b60105481565b6103a161092036600461456a565b612923565b6103a1610933366004614362565b612a41565b60005473ffffffffffffffffffffffffffffffffffffffff1633146109be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166109df5760006011555b6007546040805173ffffffffffffffffffffffffffffffffffffffff928316815291831660208301527f044c75b8fa43ce72364b4c23fdb8451beafbda46505bf44c76f0853a01ed4ade910160405180910390a1600780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b606060058054610a8990614606565b80601f0160208091040260200160405190810160405280929190818152602001828054610ab590614606565b8015610b025780601f10610ad757610100808354040283529160200191610b02565b820191906000526020600020905b815481529060010190602001808311610ae557829003601f168201915b5050505050905090565b60005473ffffffffffffffffffffffffffffffffffffffff163314610b8d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109b5565b83851115610c1d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f75706461746552656465656d53657474696e67733a2077726f6e67207261746960448201527f6f2076616c75657300000000000000000000000000000000000000000000000060648201526084016109b5565b818310610cac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f75706461746552656465656d53657474696e67733a2077726f6e67206475726160448201527f74696f6e2076616c75657300000000000000000000000000000000000000000060648201526084016109b5565b670de0b6b3a76400008411158015610ccc5750670de0b6b3a76400008111155b610d58576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f75706461746552656465656d53657474696e67733a2077726f6e67207261746960448201527f6f2076616c75657300000000000000000000000000000000000000000000000060648201526084016109b5565b600d859055600e849055600f83905560108290556011819055604080518681526020810186905290810184905260608101839052608081018290527f5b37d10782e41a6539b50d59366d4112a880236e4187e85b6d1514d20e07d9b89060a00160405180910390a15050505050565b600033610dd5818585612b71565b60019150505b92915050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610e62576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109b5565b6107d0811115610ece576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f7570646174654465616c6c6f636174696f6e4665653a20746f6f20686967680060448201526064016109b5565b73ffffffffffffffffffffffffffffffffffffffff82166000818152600c602052604090819020839055517f6ff024152fc2cd8071bc701f966036513eb03e243863f21d8218646faac0eaef90610f289084815260200190565b60405180910390a25050565b6000610f406008612d24565b905090565b600260015403610fb1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109b5565b6002600155610fc1338585612d2e565b6040517f1c75e36900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff851690631c75e36990611019903390879087908790600401614659565b600060405180830381600087803b15801561103357600080fd5b505af1158015611047573d6000803e3d6000fd5b505060018055505050505050565b6000610ddb600883612f59565b600033611070858285612f88565b61107b85858561305f565b60019150505b9392505050565b6002600154036110f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109b5565b60026001553360008181526014602052604090205482908110611199576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f76616c696461746552656465656d3a2072656465656d20656e74727920646f6560448201527f73206e6f7420657869737400000000000000000000000000000000000000000060648201526084016109b5565b3360009081526014602052604081208054859081106111ba576111ba6146ca565b60009182526020909120600690910201600481015460075491925073ffffffffffffffffffffffffffffffffffffffff908116911614801590611214575060075473ffffffffffffffffffffffffffffffffffffffff1615155b1561140d576005810154156113605760048101546005820154604080516000815260208101918290527f549230c90000000000000000000000000000000000000000000000000000000090915273ffffffffffffffffffffffffffffffffffffffff9092169163549230c99161129091339190602481016146f9565b600060405180830381600087803b1580156112aa57600080fd5b505af11580156112be573d6000803e3d6000fd5b50506007546005840154604080516000815260208101918290527f1c75e3690000000000000000000000000000000000000000000000000000000090915273ffffffffffffffffffffffffffffffffffffffff9092169350631c75e369925061132d91339190602481016146f9565b600060405180830381600087803b15801561134757600080fd5b505af115801561135b573d6000803e3d6000fd5b505050505b60048101546007546040805187815273ffffffffffffffffffffffffffffffffffffffff9384166020820152929091169082015233907fa60c8f9118be22c9277a8129333d64ffda3de44ca7a5831d077a3127f1237a189060600160405180910390a26007546004820180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790555b5050600180555050565b33600081815260036020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168452909152812054909190610dd5908290869061145e908790614766565b612b71565b6002600154036114cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109b5565b60026001556114df823383612d2e565b505060018055565b6000610ddb60088361331d565b6014602052816000526040600020818154811061151057600080fd5b600091825260209091206006909102018054600182015460028301546003840154600485015460059095015493965091945092909173ffffffffffffffffffffffffffffffffffffffff9091169086565b6002600154036115cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109b5565b60026001553360008181526014602052604090205482908110611672576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f76616c696461746552656465656d3a2072656465656d20656e74727920646f6560448201527f73206e6f7420657869737400000000000000000000000000000000000000000060648201526084016109b5565b336000908152601360209081526040808320601490925282208054919291869081106116a0576116a06146ca565b9060005260206000209060060201905080600101548260010160008282546116c89190614779565b925050819055506116de3033836001015461305f565b6005810154156117885760048101546005820154604080516000815260208101918290527f549230c90000000000000000000000000000000000000000000000000000000090915273ffffffffffffffffffffffffffffffffffffffff9092169163549230c99161175591339190602481016146f9565b600060405180830381600087803b15801561176f57600080fd5b505af1158015611783573d6000803e3d6000fd5b505050505b600181015460405190815233907f56d7520e387607a8daa892e3fed116badc2a636307bdc794b1c1aed97ae203f49060200160405180910390a26117cb85613329565b505060018055505050565b600260015403611842576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109b5565b60026001556118523385856134d9565b6040517f549230c900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063549230c990611019903390879087908790600401614659565b600260015403611916576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109b5565b6002600155333b611983576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f636f6e76657274546f3a206e6f7420616c6c6f7765640000000000000000000060448201526064016109b5565b6114df82826137ad565b60005473ffffffffffffffffffffffffffffffffffffffff163314611a0e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109b5565b611a1860006138b8565b565b6000600f54821015611a2e57506000610ddb565b601054821115611a6057670de0b6b3a7640000600e5484611a4f919061478c565b611a5991906147a3565b9050610ddb565b6000600f54601054611a729190614779565b600d54600e54611a829190614779565b600f54611a8f9086614779565b611a99919061478c565b611aa391906147a3565b600d54611ab09190614766565b9050670de0b6b3a7640000611ac5828661478c565b611acf91906147a3565b949350505050565b600260015403611b43576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109b5565b600260015581611bd5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f72656465656d3a207853796e7468416d6f756e742063616e6e6f74206265206e60448201527f756c6c000000000000000000000000000000000000000000000000000000000060648201526084016109b5565b600f54811015611c41576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f72656465656d3a206475726174696f6e20746f6f206c6f77000000000000000060448201526064016109b5565b611c4c33308461305f565b33600090815260136020526040812090611c668484611a1a565b604080518681526020810183905290810185905290915033907fbd5034ffbd47e4e72a94baa2cdb74c6fad73cb3bcdc13036b72ec8306f5a76469060600160405180910390a28215611e875783826001016000828254611cc69190614766565b925050819055506000670de0b6b3a76400006010548514611ce957601154611ced565b6012545b611cf7908761478c565b611d0191906147a3565b90508015611da357600754604080516000815260208101918290527f1c75e3690000000000000000000000000000000000000000000000000000000090915273ffffffffffffffffffffffffffffffffffffffff90911690631c75e36990611d709033908590602481016146f9565b600060405180830381600087803b158015611d8a57600080fd5b505af1158015611d9e573d6000803e3d6000fd5b505050505b33600090815260146020908152604091829020825160c081018452858152918201889052918101611dd48742614766565b815260200142815260075473ffffffffffffffffffffffffffffffffffffffff9081166020808401919091526040928301959095528354600180820186556000958652948690208451600690920201908155948301519385019390935581015160028401556060810151600384015560808101516004840180547fffffffffffffffffffffffff000000000000000000000000000000000000000016919093161790915560a0015160059091015561140d565b61140d33858361392d565b60005473ffffffffffffffffffffffffffffffffffffffff163314611f13576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109b5565b670de0b6b3a7640000811115611fab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f75706461746552656465656d53657474696e67733a2077726f6e67207261746960448201527f6f2076616c75657300000000000000000000000000000000000000000000000060648201526084016109b5565b601155565b60005473ffffffffffffffffffffffffffffffffffffffff163314612031576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109b5565b3073ffffffffffffffffffffffffffffffffffffffff8316036120d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603c60248201527f7570646174655472616e7366657257686974656c6973743a2043616e6e6f742060448201527f72656d6f76652078546f6b656e2066726f6d2077686974656c6973740000000060648201526084016109b5565b80156120ed576120e7600883613a26565b506120fa565b6120f8600883613a48565b505b6040805173ffffffffffffffffffffffffffffffffffffffff8416815282151560208201527f3a34209cb941a5d23a56dea730a13738454bc7daefd4bb32e8d7df58c1bd920d910160405180910390a15050565b606060068054610a8990614606565b6002600154036121c9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109b5565b60026001556114df8233836134d9565b600260015403612245576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109b5565b600260015561225481336137ad565b5060018055565b33600081815260036020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684529091528120549091908381101561231f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084016109b5565b61232c8286868403612b71565b506001949350505050565b600033610dd581858561305f565b6002600154036123b1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109b5565b60026001553360008181526014602052604090205482908110612456576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f76616c696461746552656465656d3a2072656465656d20656e74727920646f6560448201527f73206e6f7420657869737400000000000000000000000000000000000000000060648201526084016109b5565b33600090815260136020908152604080832060149092528220805491929186908110612484576124846146ca565b90600052602060002090600602019050600f5481600301546124a69190614766565b421015612535576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f66696e616c697a6552656465656d3a206d696e206475726174696f6e2062656660448201527f6f72652072656465656d0000000000000000000000000000000000000000000060648201526084016109b5565b806001015482600101600082825461254d9190614779565b909155505060038101546000906125649042614779565b90506000612576836001015483611a1a565b90506125873384600101548361392d565b6005830154156126315760048301546005840154604080516000815260208101918290527f549230c90000000000000000000000000000000000000000000000000000000090915273ffffffffffffffffffffffffffffffffffffffff9092169163549230c9916125fe91339190602481016146f9565b600060405180830381600087803b15801561261857600080fd5b505af115801561262c573d6000803e3d6000fd5b505050505b61263a87613329565b5050600180555050505050565b6002600154036126b3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109b5565b600260015573ffffffffffffffffffffffffffffffffffffffff821661275b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f617070726f766555736167653a20617070726f766520746f20746865207a657260448201527f6f2061646472657373000000000000000000000000000000000000000000000060648201526084016109b5565b336000818152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff871680855290835292819020859055518481529192917fe75ec259c38e4601f24580968665ec00b21cca4f996689b260ec598aec5c08db910160405180910390a3505060018055565b73ffffffffffffffffffffffffffffffffffffffff82166000908152601460205260408120548190819081908190819088908890811061288d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f76616c696461746552656465656d3a2072656465656d20656e74727920646f6560448201527f73206e6f7420657869737400000000000000000000000000000000000000000060648201526084016109b5565b73ffffffffffffffffffffffffffffffffffffffff8a16600090815260146020526040812080548b9081106128c4576128c46146ca565b6000918252602090912060069091020180546001820154600283015460038401546004850154600590950154939d50919b509950975073ffffffffffffffffffffffffffffffffffffffff909116955093505050509295509295509295565b60005473ffffffffffffffffffffffffffffffffffffffff1633146129a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109b5565b670de0b6b3a7640000811115612a3c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f75706461746552656465656d53657474696e67733a2077726f6e67207261746960448201527f6f2076616c75657300000000000000000000000000000000000000000000000060648201526084016109b5565b601255565b60005473ffffffffffffffffffffffffffffffffffffffff163314612ac2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109b5565b73ffffffffffffffffffffffffffffffffffffffff8116612b65576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016109b5565b612b6e816138b8565b50565b73ffffffffffffffffffffffffffffffffffffffff8316612c13576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016109b5565b73ffffffffffffffffffffffffffffffffffffffff8216612cb6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f737300000000000000000000000000000000000000000000000000000000000060648201526084016109b5565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610ddb825490565b60008111612d98576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f616c6c6f636174653a20616d6f756e742063616e6e6f74206265206e756c6c0060448201526064016109b5565b73ffffffffffffffffffffffffffffffffffffffff8084166000908152601360209081526040808320600a835281842094871684529390915290205482811015612e3e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f616c6c6f636174653a206e6f6e20617574686f72697a656420616d6f756e740060448201526064016109b5565b612e488382614779565b73ffffffffffffffffffffffffffffffffffffffff8087166000818152600a60209081526040808320948a1680845294825280832095909555918152600b82528381209281529190522054612e9e908490614766565b73ffffffffffffffffffffffffffffffffffffffff8087166000908152600b60209081526040808320938916835292905220558154612ede908490614766565b8255612eeb85308561305f565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f5168bfb88d6125d4580e2b91ecb103a730312c3e8b0be9c4031a0fc794e2cd5f85604051612f4a91815260200190565b60405180910390a35050505050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001830160205260408120541515611081565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600360209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114613059578181101561304c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016109b5565b6130598484848403612b71565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8316613102576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016109b5565b73ffffffffffffffffffffffffffffffffffffffff82166131a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016109b5565b6131b0838383613a6a565b73ffffffffffffffffffffffffffffffffffffffff831660009081526002602052604090205481811015613266576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016109b5565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600260205260408082208585039055918516815290812080548492906132aa908490614766565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161331091815260200190565b60405180910390a3613059565b60006110818383613b0f565b336000908152601460205260409020805461334690600190614779565b81548110613356576133566146ca565b9060005260206000209060060201601460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002082815481106133b4576133b46146ca565b60009182526020808320845460069093020191825560018085015490830155600280850154908301556003808501549083015560048085015490830180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055600593840154939091019290925533815260149091526040902080548061345b5761345b6147de565b60008281526020812060067fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909301928302018181556001810182905560028101829055600381018290556004810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905560050155905550565b60008111613569576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f6465616c6c6f636174653a20616d6f756e742063616e6e6f74206265206e756c60448201527f6c0000000000000000000000000000000000000000000000000000000000000060648201526084016109b5565b73ffffffffffffffffffffffffffffffffffffffff8084166000908152600b60209081526040808320938616835292905220548181101561362c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f6465616c6c6f636174653a206e6f6e20617574686f72697a656420616d6f756e60448201527f740000000000000000000000000000000000000000000000000000000000000060648201526084016109b5565b6136368282614779565b73ffffffffffffffffffffffffffffffffffffffff8086166000908152600b60209081526040808320938816835292815282822093909355600c90925281205461271090613684908561478c565b61368e91906147a3565b73ffffffffffffffffffffffffffffffffffffffff86166000908152601360205260408120805492935091859183916136c8908490614779565b909155506136e2905030876136dd8588614779565b61305f565b81156137355761372b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001661dead84613b39565b6137353083613c0d565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167f7d613f7bd1a777aeeefdd38ae61201003086575188df50618d02482220f5c147868560405161379d929190918252602082015260400190565b60405180910390a3505050505050565b81600003613817576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f636f6e766572743a20616d6f756e742063616e6e6f74206265206e756c6c000060448201526064016109b5565b6138218183613e06565b6040805173ffffffffffffffffffffffffffffffffffffffff831681526020810184905233917fccfaeb3043a96a967dc036ab72e078a9632af809671bc2a1ac30a8043645f89e910160405180910390a26138b473ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016333085613f32565b5050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006139398284614779565b905061397c73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168584613b39565b80156139c5576139c573ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001661dead83613b39565b6139cf3084613c0d565b604080518481526020810184905273ffffffffffffffffffffffffffffffffffffffff8616917f0da072ebd7a5649099f43a3776eb0cda17aca79426ee9f28aae203f5dfa04eda910160405180910390a250505050565b60006110818373ffffffffffffffffffffffffffffffffffffffff8416613f90565b60006110818373ffffffffffffffffffffffffffffffffffffffff8416613fdf565b73ffffffffffffffffffffffffffffffffffffffff83161580613a935750613a93600884612f59565b80613aa45750613aa4600883612f59565b613b0a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f7472616e736665723a206e6f7420616c6c6f776564000000000000000000000060448201526064016109b5565b505050565b6000826000018281548110613b2657613b266146ca565b9060005260206000200154905092915050565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052613b0a9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526140d2565b73ffffffffffffffffffffffffffffffffffffffff8216613cb0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016109b5565b613cbc82600083613a6a565b73ffffffffffffffffffffffffffffffffffffffff821660009081526002602052604090205481811015613d72576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f636500000000000000000000000000000000000000000000000000000000000060648201526084016109b5565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600260205260408120838303905560048054849290613dae908490614779565b909155505060405182815260009073ffffffffffffffffffffffffffffffffffffffff8516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8216613e83576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016109b5565b613e8f60008383613a6a565b8060046000828254613ea19190614766565b909155505073ffffffffffffffffffffffffffffffffffffffff821660009081526002602052604081208054839290613edb908490614766565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526130599085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401613b8b565b6000818152600183016020526040812054613fd757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610ddb565b506000610ddb565b600081815260018301602052604081205480156140c8576000614003600183614779565b855490915060009061401790600190614779565b905081811461407c576000866000018281548110614037576140376146ca565b906000526020600020015490508087600001848154811061405a5761405a6146ca565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061408d5761408d6147de565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610ddb565b6000915050610ddb565b6000614134826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166141de9092919063ffffffff16565b805190915015613b0a5780806020019051810190614152919061480d565b613b0a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016109b5565b6060611acf84846000858573ffffffffffffffffffffffffffffffffffffffff85163b614267576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016109b5565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051614290919061482a565b60006040518083038185875af1925050503d80600081146142cd576040519150601f19603f3d011682016040523d82523d6000602084013e6142d2565b606091505b50915091506142e28282866142ed565b979650505050505050565b606083156142fc575081611081565b82511561430c5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109b591906143ed565b73ffffffffffffffffffffffffffffffffffffffff81168114612b6e57600080fd5b60006020828403121561437457600080fd5b813561108181614340565b60005b8381101561439a578181015183820152602001614382565b50506000910152565b600081518084526143bb81602086016020860161437f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061108160208301846143a3565b600080600080600060a0868803121561441857600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b6000806040838503121561444e57600080fd5b823561445981614340565b946020939093013593505050565b6000806000806060858703121561447d57600080fd5b843561448881614340565b935060208501359250604085013567ffffffffffffffff808211156144ac57600080fd5b818701915087601f8301126144c057600080fd5b8135818111156144cf57600080fd5b8860208285010111156144e157600080fd5b95989497505060200194505050565b60008060006060848603121561450557600080fd5b833561451081614340565b9250602084013561452081614340565b929592945050506040919091013590565b6000806040838503121561454457600080fd5b823561454f81614340565b9150602083013561455f81614340565b809150509250929050565b60006020828403121561457c57600080fd5b5035919050565b6000806040838503121561459657600080fd5b82359150602083013561455f81614340565b600080604083850312156145bb57600080fd5b50508035926020909101359150565b8015158114612b6e57600080fd5b600080604083850312156145eb57600080fd5b82356145f681614340565b9150602083013561455f816145ca565b600181811c9082168061461a57607f821691505b602082108103614653577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b73ffffffffffffffffffffffffffffffffffffffff8516815283602082015260606040820152816060820152818360808301376000818301608090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01601019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8416815282602082015260606040820152600061472e60608301846143a3565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820180821115610ddb57610ddb614737565b81810381811115610ddb57610ddb614737565b8082028115828204841417610ddb57610ddb614737565b6000826147d9577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60006020828403121561481f57600080fd5b8151611081816145ca565b6000825161483c81846020870161437f565b919091019291505056fea2646970667358221220e50da6f8541273fcadf241b6bdb9a585afe9a805bde2fcf10ed6285b7952462f64736f6c63430008130033000000000000000000000000bd2dbb8ecea9743ca5b16423b4eaa26bdcfe5ed2

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061036d5760003560e01c80635a1d34dc116101d3578063a3908e1b11610104578063c4b10766116100a2578063e3a2950b1161007c578063e3a2950b14610900578063e9ed87f814610909578063f255d26e14610912578063f2fde38b1461092557600080fd5b8063c4b107661461089e578063cc6c5423146108a7578063dd62ed3e146108ba57600080fd5b8063aff6cbf1116100de578063aff6cbf11461081b578063b6838cfa1461082e578063b90c2b5214610855578063c360ed1c1461088b57600080fd5b8063a3908e1b146107e2578063a457c2d7146107f5578063a9059cbb1461080857600080fd5b80637ddfa28c116101715780638975f9181161014b5780638975f918146107895780638da5cb5b146107a957806395d89b41146107c7578063a0bdc7cb146107cf57600080fd5b80637ddfa28c1461075a5780638541390e1461076d578063890836541461077657600080fd5b806370a08231116101ad57806370a08231146106f6578063715018a61461072c57806376c608f7146107345780637cbc23731461074757600080fd5b80635a1d34dc14610696578063619ac95b146106a95780636bd91a8f146106b857600080fd5b80632cc2f5ce116102ad578063488c83031161024b5780634b359d38116102255780634b359d38146106075780634f62b7ec1461061a578063539ffb7714610670578063549230c91461068357600080fd5b8063488c83031461058e578063497965ee146105b95780634a5b406e146105fe57600080fd5b806331124ce31161028757806331124ce314610546578063313ce5671461055957806339509351146105685780633b90f9a01461057b57600080fd5b80632cc2f5ce146104995780632e7f3c50146104c45780632e9a76e41461050057600080fd5b8063161aab431161031a5780631c75e369116102f45780631c75e3691461041a5780631eee7e601461042d57806323b872dd146104405780632b4896791461045357600080fd5b8063161aab431461040157806318160ddd146104095780631c3526791461041157600080fd5b8063093220b71161034b578063093220b7146103b8578063095ea7b3146103cb5780630f7d3a69146103ee57600080fd5b806302f91e551461037257806306045a211461038e57806306fdde03146103a3575b600080fd5b61037b6107d081565b6040519081526020015b60405180910390f35b6103a161039c366004614362565b610938565b005b6103ab610a7a565b60405161038591906143ed565b6103a16103c6366004614400565b610b0c565b6103de6103d936600461443b565b610dc7565b6040519015158152602001610385565b6103a16103fc36600461443b565b610de1565b61037b610f34565b60045461037b565b61037b600d5481565b6103a1610428366004614467565b610f45565b6103de61043b366004614362565b611055565b6103de61044e3660046144f0565b611062565b61037b610461366004614531565b73ffffffffffffffffffffffffffffffffffffffff9182166000908152600a6020908152604080832093909416825291909152205490565b61037b6104a7366004614531565b600b60209081526000928352604080842090915290825290205481565b6104eb6104d2366004614362565b6013602052600090815260409020805460019091015482565b60408051928352602083019190915201610385565b61037b61050e366004614531565b73ffffffffffffffffffffffffffffffffffffffff9182166000908152600b6020908152604080832093909416825291909152205490565b6103a161055436600461456a565b611088565b60405160128152602001610385565b6103de61057636600461443b565b611417565b6103a161058936600461443b565b611463565b61037b61059c366004614531565b600a60209081526000928352604080842090915290825290205481565b6007546105d99073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610385565b61037b60115481565b6105d961061536600461456a565b6114e7565b61062d61062836600461443b565b6114f4565b60408051968752602087019590955293850192909252606084015273ffffffffffffffffffffffffffffffffffffffff16608083015260a082015260c001610385565b6103a161067e36600461456a565b611561565b6103a1610691366004614467565b6117d6565b6103a16106a4366004614583565b6118aa565b61037b670de0b6b3a764000081565b6104eb6106c6366004614362565b73ffffffffffffffffffffffffffffffffffffffff16600090815260136020526040902080546001909101549091565b61037b610704366004614362565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b6103a161198d565b61037b6107423660046145a8565b611a1a565b6103a16107553660046145a8565b611ad7565b6103a161076836600461456a565b611e92565b61037b60125481565b6103a16107843660046145d8565b611fb0565b61037b610797366004614362565b600c6020526000908152604090205481565b60005473ffffffffffffffffffffffffffffffffffffffff166105d9565b6103ab61214e565b6103a16107dd36600461443b565b61215d565b6103a16107f036600461456a565b6121d9565b6103de61080336600461443b565b61225b565b6103de61081636600461443b565b612337565b6103a161082936600461456a565b612345565b6105d97f000000000000000000000000bd2dbb8ecea9743ca5b16423b4eaa26bdcfe5ed281565b61037b610863366004614362565b73ffffffffffffffffffffffffffffffffffffffff1660009081526014602052604090205490565b6103a161089936600461443b565b612647565b61037b600f5481565b61062d6108b536600461443b565b6127cb565b61037b6108c8366004614531565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260036020908152604080832093909416825291909152205490565b61037b600e5481565b61037b60105481565b6103a161092036600461456a565b612923565b6103a1610933366004614362565b612a41565b60005473ffffffffffffffffffffffffffffffffffffffff1633146109be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166109df5760006011555b6007546040805173ffffffffffffffffffffffffffffffffffffffff928316815291831660208301527f044c75b8fa43ce72364b4c23fdb8451beafbda46505bf44c76f0853a01ed4ade910160405180910390a1600780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b606060058054610a8990614606565b80601f0160208091040260200160405190810160405280929190818152602001828054610ab590614606565b8015610b025780601f10610ad757610100808354040283529160200191610b02565b820191906000526020600020905b815481529060010190602001808311610ae557829003601f168201915b5050505050905090565b60005473ffffffffffffffffffffffffffffffffffffffff163314610b8d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109b5565b83851115610c1d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f75706461746552656465656d53657474696e67733a2077726f6e67207261746960448201527f6f2076616c75657300000000000000000000000000000000000000000000000060648201526084016109b5565b818310610cac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f75706461746552656465656d53657474696e67733a2077726f6e67206475726160448201527f74696f6e2076616c75657300000000000000000000000000000000000000000060648201526084016109b5565b670de0b6b3a76400008411158015610ccc5750670de0b6b3a76400008111155b610d58576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f75706461746552656465656d53657474696e67733a2077726f6e67207261746960448201527f6f2076616c75657300000000000000000000000000000000000000000000000060648201526084016109b5565b600d859055600e849055600f83905560108290556011819055604080518681526020810186905290810184905260608101839052608081018290527f5b37d10782e41a6539b50d59366d4112a880236e4187e85b6d1514d20e07d9b89060a00160405180910390a15050505050565b600033610dd5818585612b71565b60019150505b92915050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610e62576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109b5565b6107d0811115610ece576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f7570646174654465616c6c6f636174696f6e4665653a20746f6f20686967680060448201526064016109b5565b73ffffffffffffffffffffffffffffffffffffffff82166000818152600c602052604090819020839055517f6ff024152fc2cd8071bc701f966036513eb03e243863f21d8218646faac0eaef90610f289084815260200190565b60405180910390a25050565b6000610f406008612d24565b905090565b600260015403610fb1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109b5565b6002600155610fc1338585612d2e565b6040517f1c75e36900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff851690631c75e36990611019903390879087908790600401614659565b600060405180830381600087803b15801561103357600080fd5b505af1158015611047573d6000803e3d6000fd5b505060018055505050505050565b6000610ddb600883612f59565b600033611070858285612f88565b61107b85858561305f565b60019150505b9392505050565b6002600154036110f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109b5565b60026001553360008181526014602052604090205482908110611199576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f76616c696461746552656465656d3a2072656465656d20656e74727920646f6560448201527f73206e6f7420657869737400000000000000000000000000000000000000000060648201526084016109b5565b3360009081526014602052604081208054859081106111ba576111ba6146ca565b60009182526020909120600690910201600481015460075491925073ffffffffffffffffffffffffffffffffffffffff908116911614801590611214575060075473ffffffffffffffffffffffffffffffffffffffff1615155b1561140d576005810154156113605760048101546005820154604080516000815260208101918290527f549230c90000000000000000000000000000000000000000000000000000000090915273ffffffffffffffffffffffffffffffffffffffff9092169163549230c99161129091339190602481016146f9565b600060405180830381600087803b1580156112aa57600080fd5b505af11580156112be573d6000803e3d6000fd5b50506007546005840154604080516000815260208101918290527f1c75e3690000000000000000000000000000000000000000000000000000000090915273ffffffffffffffffffffffffffffffffffffffff9092169350631c75e369925061132d91339190602481016146f9565b600060405180830381600087803b15801561134757600080fd5b505af115801561135b573d6000803e3d6000fd5b505050505b60048101546007546040805187815273ffffffffffffffffffffffffffffffffffffffff9384166020820152929091169082015233907fa60c8f9118be22c9277a8129333d64ffda3de44ca7a5831d077a3127f1237a189060600160405180910390a26007546004820180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790555b5050600180555050565b33600081815260036020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168452909152812054909190610dd5908290869061145e908790614766565b612b71565b6002600154036114cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109b5565b60026001556114df823383612d2e565b505060018055565b6000610ddb60088361331d565b6014602052816000526040600020818154811061151057600080fd5b600091825260209091206006909102018054600182015460028301546003840154600485015460059095015493965091945092909173ffffffffffffffffffffffffffffffffffffffff9091169086565b6002600154036115cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109b5565b60026001553360008181526014602052604090205482908110611672576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f76616c696461746552656465656d3a2072656465656d20656e74727920646f6560448201527f73206e6f7420657869737400000000000000000000000000000000000000000060648201526084016109b5565b336000908152601360209081526040808320601490925282208054919291869081106116a0576116a06146ca565b9060005260206000209060060201905080600101548260010160008282546116c89190614779565b925050819055506116de3033836001015461305f565b6005810154156117885760048101546005820154604080516000815260208101918290527f549230c90000000000000000000000000000000000000000000000000000000090915273ffffffffffffffffffffffffffffffffffffffff9092169163549230c99161175591339190602481016146f9565b600060405180830381600087803b15801561176f57600080fd5b505af1158015611783573d6000803e3d6000fd5b505050505b600181015460405190815233907f56d7520e387607a8daa892e3fed116badc2a636307bdc794b1c1aed97ae203f49060200160405180910390a26117cb85613329565b505060018055505050565b600260015403611842576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109b5565b60026001556118523385856134d9565b6040517f549230c900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063549230c990611019903390879087908790600401614659565b600260015403611916576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109b5565b6002600155333b611983576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f636f6e76657274546f3a206e6f7420616c6c6f7765640000000000000000000060448201526064016109b5565b6114df82826137ad565b60005473ffffffffffffffffffffffffffffffffffffffff163314611a0e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109b5565b611a1860006138b8565b565b6000600f54821015611a2e57506000610ddb565b601054821115611a6057670de0b6b3a7640000600e5484611a4f919061478c565b611a5991906147a3565b9050610ddb565b6000600f54601054611a729190614779565b600d54600e54611a829190614779565b600f54611a8f9086614779565b611a99919061478c565b611aa391906147a3565b600d54611ab09190614766565b9050670de0b6b3a7640000611ac5828661478c565b611acf91906147a3565b949350505050565b600260015403611b43576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109b5565b600260015581611bd5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f72656465656d3a207853796e7468416d6f756e742063616e6e6f74206265206e60448201527f756c6c000000000000000000000000000000000000000000000000000000000060648201526084016109b5565b600f54811015611c41576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f72656465656d3a206475726174696f6e20746f6f206c6f77000000000000000060448201526064016109b5565b611c4c33308461305f565b33600090815260136020526040812090611c668484611a1a565b604080518681526020810183905290810185905290915033907fbd5034ffbd47e4e72a94baa2cdb74c6fad73cb3bcdc13036b72ec8306f5a76469060600160405180910390a28215611e875783826001016000828254611cc69190614766565b925050819055506000670de0b6b3a76400006010548514611ce957601154611ced565b6012545b611cf7908761478c565b611d0191906147a3565b90508015611da357600754604080516000815260208101918290527f1c75e3690000000000000000000000000000000000000000000000000000000090915273ffffffffffffffffffffffffffffffffffffffff90911690631c75e36990611d709033908590602481016146f9565b600060405180830381600087803b158015611d8a57600080fd5b505af1158015611d9e573d6000803e3d6000fd5b505050505b33600090815260146020908152604091829020825160c081018452858152918201889052918101611dd48742614766565b815260200142815260075473ffffffffffffffffffffffffffffffffffffffff9081166020808401919091526040928301959095528354600180820186556000958652948690208451600690920201908155948301519385019390935581015160028401556060810151600384015560808101516004840180547fffffffffffffffffffffffff000000000000000000000000000000000000000016919093161790915560a0015160059091015561140d565b61140d33858361392d565b60005473ffffffffffffffffffffffffffffffffffffffff163314611f13576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109b5565b670de0b6b3a7640000811115611fab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f75706461746552656465656d53657474696e67733a2077726f6e67207261746960448201527f6f2076616c75657300000000000000000000000000000000000000000000000060648201526084016109b5565b601155565b60005473ffffffffffffffffffffffffffffffffffffffff163314612031576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109b5565b3073ffffffffffffffffffffffffffffffffffffffff8316036120d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603c60248201527f7570646174655472616e7366657257686974656c6973743a2043616e6e6f742060448201527f72656d6f76652078546f6b656e2066726f6d2077686974656c6973740000000060648201526084016109b5565b80156120ed576120e7600883613a26565b506120fa565b6120f8600883613a48565b505b6040805173ffffffffffffffffffffffffffffffffffffffff8416815282151560208201527f3a34209cb941a5d23a56dea730a13738454bc7daefd4bb32e8d7df58c1bd920d910160405180910390a15050565b606060068054610a8990614606565b6002600154036121c9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109b5565b60026001556114df8233836134d9565b600260015403612245576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109b5565b600260015561225481336137ad565b5060018055565b33600081815260036020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684529091528120549091908381101561231f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084016109b5565b61232c8286868403612b71565b506001949350505050565b600033610dd581858561305f565b6002600154036123b1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109b5565b60026001553360008181526014602052604090205482908110612456576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f76616c696461746552656465656d3a2072656465656d20656e74727920646f6560448201527f73206e6f7420657869737400000000000000000000000000000000000000000060648201526084016109b5565b33600090815260136020908152604080832060149092528220805491929186908110612484576124846146ca565b90600052602060002090600602019050600f5481600301546124a69190614766565b421015612535576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f66696e616c697a6552656465656d3a206d696e206475726174696f6e2062656660448201527f6f72652072656465656d0000000000000000000000000000000000000000000060648201526084016109b5565b806001015482600101600082825461254d9190614779565b909155505060038101546000906125649042614779565b90506000612576836001015483611a1a565b90506125873384600101548361392d565b6005830154156126315760048301546005840154604080516000815260208101918290527f549230c90000000000000000000000000000000000000000000000000000000090915273ffffffffffffffffffffffffffffffffffffffff9092169163549230c9916125fe91339190602481016146f9565b600060405180830381600087803b15801561261857600080fd5b505af115801561262c573d6000803e3d6000fd5b505050505b61263a87613329565b5050600180555050505050565b6002600154036126b3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109b5565b600260015573ffffffffffffffffffffffffffffffffffffffff821661275b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f617070726f766555736167653a20617070726f766520746f20746865207a657260448201527f6f2061646472657373000000000000000000000000000000000000000000000060648201526084016109b5565b336000818152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff871680855290835292819020859055518481529192917fe75ec259c38e4601f24580968665ec00b21cca4f996689b260ec598aec5c08db910160405180910390a3505060018055565b73ffffffffffffffffffffffffffffffffffffffff82166000908152601460205260408120548190819081908190819088908890811061288d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f76616c696461746552656465656d3a2072656465656d20656e74727920646f6560448201527f73206e6f7420657869737400000000000000000000000000000000000000000060648201526084016109b5565b73ffffffffffffffffffffffffffffffffffffffff8a16600090815260146020526040812080548b9081106128c4576128c46146ca565b6000918252602090912060069091020180546001820154600283015460038401546004850154600590950154939d50919b509950975073ffffffffffffffffffffffffffffffffffffffff909116955093505050509295509295509295565b60005473ffffffffffffffffffffffffffffffffffffffff1633146129a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109b5565b670de0b6b3a7640000811115612a3c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f75706461746552656465656d53657474696e67733a2077726f6e67207261746960448201527f6f2076616c75657300000000000000000000000000000000000000000000000060648201526084016109b5565b601255565b60005473ffffffffffffffffffffffffffffffffffffffff163314612ac2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109b5565b73ffffffffffffffffffffffffffffffffffffffff8116612b65576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016109b5565b612b6e816138b8565b50565b73ffffffffffffffffffffffffffffffffffffffff8316612c13576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016109b5565b73ffffffffffffffffffffffffffffffffffffffff8216612cb6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f737300000000000000000000000000000000000000000000000000000000000060648201526084016109b5565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610ddb825490565b60008111612d98576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f616c6c6f636174653a20616d6f756e742063616e6e6f74206265206e756c6c0060448201526064016109b5565b73ffffffffffffffffffffffffffffffffffffffff8084166000908152601360209081526040808320600a835281842094871684529390915290205482811015612e3e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f616c6c6f636174653a206e6f6e20617574686f72697a656420616d6f756e740060448201526064016109b5565b612e488382614779565b73ffffffffffffffffffffffffffffffffffffffff8087166000818152600a60209081526040808320948a1680845294825280832095909555918152600b82528381209281529190522054612e9e908490614766565b73ffffffffffffffffffffffffffffffffffffffff8087166000908152600b60209081526040808320938916835292905220558154612ede908490614766565b8255612eeb85308561305f565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f5168bfb88d6125d4580e2b91ecb103a730312c3e8b0be9c4031a0fc794e2cd5f85604051612f4a91815260200190565b60405180910390a35050505050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001830160205260408120541515611081565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600360209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114613059578181101561304c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016109b5565b6130598484848403612b71565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8316613102576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016109b5565b73ffffffffffffffffffffffffffffffffffffffff82166131a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016109b5565b6131b0838383613a6a565b73ffffffffffffffffffffffffffffffffffffffff831660009081526002602052604090205481811015613266576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016109b5565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600260205260408082208585039055918516815290812080548492906132aa908490614766565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161331091815260200190565b60405180910390a3613059565b60006110818383613b0f565b336000908152601460205260409020805461334690600190614779565b81548110613356576133566146ca565b9060005260206000209060060201601460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002082815481106133b4576133b46146ca565b60009182526020808320845460069093020191825560018085015490830155600280850154908301556003808501549083015560048085015490830180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055600593840154939091019290925533815260149091526040902080548061345b5761345b6147de565b60008281526020812060067fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909301928302018181556001810182905560028101829055600381018290556004810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905560050155905550565b60008111613569576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f6465616c6c6f636174653a20616d6f756e742063616e6e6f74206265206e756c60448201527f6c0000000000000000000000000000000000000000000000000000000000000060648201526084016109b5565b73ffffffffffffffffffffffffffffffffffffffff8084166000908152600b60209081526040808320938616835292905220548181101561362c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f6465616c6c6f636174653a206e6f6e20617574686f72697a656420616d6f756e60448201527f740000000000000000000000000000000000000000000000000000000000000060648201526084016109b5565b6136368282614779565b73ffffffffffffffffffffffffffffffffffffffff8086166000908152600b60209081526040808320938816835292815282822093909355600c90925281205461271090613684908561478c565b61368e91906147a3565b73ffffffffffffffffffffffffffffffffffffffff86166000908152601360205260408120805492935091859183916136c8908490614779565b909155506136e2905030876136dd8588614779565b61305f565b81156137355761372b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000bd2dbb8ecea9743ca5b16423b4eaa26bdcfe5ed21661dead84613b39565b6137353083613c0d565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167f7d613f7bd1a777aeeefdd38ae61201003086575188df50618d02482220f5c147868560405161379d929190918252602082015260400190565b60405180910390a3505050505050565b81600003613817576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f636f6e766572743a20616d6f756e742063616e6e6f74206265206e756c6c000060448201526064016109b5565b6138218183613e06565b6040805173ffffffffffffffffffffffffffffffffffffffff831681526020810184905233917fccfaeb3043a96a967dc036ab72e078a9632af809671bc2a1ac30a8043645f89e910160405180910390a26138b473ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000bd2dbb8ecea9743ca5b16423b4eaa26bdcfe5ed216333085613f32565b5050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006139398284614779565b905061397c73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000bd2dbb8ecea9743ca5b16423b4eaa26bdcfe5ed2168584613b39565b80156139c5576139c573ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000bd2dbb8ecea9743ca5b16423b4eaa26bdcfe5ed21661dead83613b39565b6139cf3084613c0d565b604080518481526020810184905273ffffffffffffffffffffffffffffffffffffffff8616917f0da072ebd7a5649099f43a3776eb0cda17aca79426ee9f28aae203f5dfa04eda910160405180910390a250505050565b60006110818373ffffffffffffffffffffffffffffffffffffffff8416613f90565b60006110818373ffffffffffffffffffffffffffffffffffffffff8416613fdf565b73ffffffffffffffffffffffffffffffffffffffff83161580613a935750613a93600884612f59565b80613aa45750613aa4600883612f59565b613b0a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f7472616e736665723a206e6f7420616c6c6f776564000000000000000000000060448201526064016109b5565b505050565b6000826000018281548110613b2657613b266146ca565b9060005260206000200154905092915050565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052613b0a9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526140d2565b73ffffffffffffffffffffffffffffffffffffffff8216613cb0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016109b5565b613cbc82600083613a6a565b73ffffffffffffffffffffffffffffffffffffffff821660009081526002602052604090205481811015613d72576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f636500000000000000000000000000000000000000000000000000000000000060648201526084016109b5565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600260205260408120838303905560048054849290613dae908490614779565b909155505060405182815260009073ffffffffffffffffffffffffffffffffffffffff8516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8216613e83576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016109b5565b613e8f60008383613a6a565b8060046000828254613ea19190614766565b909155505073ffffffffffffffffffffffffffffffffffffffff821660009081526002602052604081208054839290613edb908490614766565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526130599085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401613b8b565b6000818152600183016020526040812054613fd757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610ddb565b506000610ddb565b600081815260018301602052604081205480156140c8576000614003600183614779565b855490915060009061401790600190614779565b905081811461407c576000866000018281548110614037576140376146ca565b906000526020600020015490508087600001848154811061405a5761405a6146ca565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061408d5761408d6147de565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610ddb565b6000915050610ddb565b6000614134826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166141de9092919063ffffffff16565b805190915015613b0a5780806020019051810190614152919061480d565b613b0a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016109b5565b6060611acf84846000858573ffffffffffffffffffffffffffffffffffffffff85163b614267576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016109b5565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051614290919061482a565b60006040518083038185875af1925050503d80600081146142cd576040519150601f19603f3d011682016040523d82523d6000602084013e6142d2565b606091505b50915091506142e28282866142ed565b979650505050505050565b606083156142fc575081611081565b82511561430c5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109b591906143ed565b73ffffffffffffffffffffffffffffffffffffffff81168114612b6e57600080fd5b60006020828403121561437457600080fd5b813561108181614340565b60005b8381101561439a578181015183820152602001614382565b50506000910152565b600081518084526143bb81602086016020860161437f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061108160208301846143a3565b600080600080600060a0868803121561441857600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b6000806040838503121561444e57600080fd5b823561445981614340565b946020939093013593505050565b6000806000806060858703121561447d57600080fd5b843561448881614340565b935060208501359250604085013567ffffffffffffffff808211156144ac57600080fd5b818701915087601f8301126144c057600080fd5b8135818111156144cf57600080fd5b8860208285010111156144e157600080fd5b95989497505060200194505050565b60008060006060848603121561450557600080fd5b833561451081614340565b9250602084013561452081614340565b929592945050506040919091013590565b6000806040838503121561454457600080fd5b823561454f81614340565b9150602083013561455f81614340565b809150509250929050565b60006020828403121561457c57600080fd5b5035919050565b6000806040838503121561459657600080fd5b82359150602083013561455f81614340565b600080604083850312156145bb57600080fd5b50508035926020909101359150565b8015158114612b6e57600080fd5b600080604083850312156145eb57600080fd5b82356145f681614340565b9150602083013561455f816145ca565b600181811c9082168061461a57607f821691505b602082108103614653577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b73ffffffffffffffffffffffffffffffffffffffff8516815283602082015260606040820152816060820152818360808301376000818301608090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01601019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8416815282602082015260606040820152600061472e60608301846143a3565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820180821115610ddb57610ddb614737565b81810381811115610ddb57610ddb614737565b8082028115828204841417610ddb57610ddb614737565b6000826147d9577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60006020828403121561481f57600080fd5b8151611081816145ca565b6000825161483c81846020870161437f565b919091019291505056fea2646970667358221220e50da6f8541273fcadf241b6bdb9a585afe9a805bde2fcf10ed6285b7952462f64736f6c63430008130033

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

000000000000000000000000bd2dbb8ecea9743ca5b16423b4eaa26bdcfe5ed2

-----Decoded View---------------
Arg [0] : _synthToken (address): 0xbd2DBb8eceA9743CA5B16423b4eAa26bDcfE5eD2

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000bd2dbb8ecea9743ca5b16423b4eaa26bdcfe5ed2


Loading