ETH Price: $2,251.61 (-1.65%)
Gas: 2.13 Gwei

Token

 

Overview

Max Total Supply

0

Holders

0

Total Transfers

-

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
SwapContract

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 999999 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2021-09-23
*/

// SPDX-License-Identifier: MIT

pragma solidity 0.8.7;



// Part: OpenZeppelin/[email protected]/Context

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

// Part: OpenZeppelin/[email protected]/ECDSA

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return tryRecover(hash, r, vs);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s;
        uint8 v;
        assembly {
            s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
            v := add(shr(255, vs), 27)
        }
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }
        if (v != 27 && v != 28) {
            return (address(0), RecoverError.InvalidSignatureV);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

// Part: OpenZeppelin/[email protected]/EnumerableSet

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

// Part: OpenZeppelin/[email protected]/IAccessControl

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

// Part: OpenZeppelin/[email protected]/IERC165

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

// Part: OpenZeppelin/[email protected]/IERC20

/**
 * @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 `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, 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 `sender` to `recipient` 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 sender,
        address recipient,
        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);
}

// Part: OpenZeppelin/[email protected]/Strings

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

// Part: uniswap/[email protected]/TransferHelper

// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false
library TransferHelper {
    function safeApprove(
        address token,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('approve(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: APPROVE_FAILED');
    }

    function safeTransfer(
        address token,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('transfer(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FAILED');
    }

    function safeTransferFrom(
        address token,
        address from,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FROM_FAILED');
    }

    function safeTransferETH(address to, uint256 value) internal {
        (bool success, ) = to.call{value: value}(new bytes(0));
        require(success, 'TransferHelper: ETH_TRANSFER_FAILED');
    }
}

// Part: OpenZeppelin/[email protected]/ERC165

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

// Part: OpenZeppelin/[email protected]/IAccessControlEnumerable

/**
 * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.
 */
interface IAccessControlEnumerable is IAccessControl {
    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) external view returns (address);

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) external view returns (uint256);
}

// Part: OpenZeppelin/[email protected]/AccessControl

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    function _grantRole(bytes32 role, address account) private {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    function _revokeRole(bytes32 role, address account) private {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

// Part: OpenZeppelin/[email protected]/AccessControlEnumerable

/**
 * @dev Extension of {AccessControl} that allows enumerating the members of each role.
 */
abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {
    using EnumerableSet for EnumerableSet.AddressSet;

    mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) public view override returns (address) {
        return _roleMembers[role].at(index);
    }

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) public view override returns (uint256) {
        return _roleMembers[role].length();
    }

    /**
     * @dev Overload {grantRole} to track enumerable memberships
     */
    function grantRole(bytes32 role, address account) public virtual override(AccessControl, IAccessControl) {
        super.grantRole(role, account);
        _roleMembers[role].add(account);
    }

    /**
     * @dev Overload {revokeRole} to track enumerable memberships
     */
    function revokeRole(bytes32 role, address account) public virtual override(AccessControl, IAccessControl) {
        super.revokeRole(role, account);
        _roleMembers[role].remove(account);
    }

    /**
     * @dev Overload {renounceRole} to track enumerable memberships
     */
    function renounceRole(bytes32 role, address account) public virtual override(AccessControl, IAccessControl) {
        super.renounceRole(role, account);
        _roleMembers[role].remove(account);
    }

    /**
     * @dev Overload {_setupRole} to track enumerable memberships
     */
    function _setupRole(bytes32 role, address account) internal virtual override {
        super._setupRole(role, account);
        _roleMembers[role].add(account);
    }
}

// File: swapContract.sol

contract SwapContract is AccessControlEnumerable
{
    bytes32 public constant VALIDATOR_ROLE = keccak256("VALIDATOR_ROLE");

    IERC20 public tokenAddress;
    uint256 public maxSwapAmountPerTx;
    uint256 public minSwapAmountPerTx;

    uint128 [3] public swapRatios;
    bool [3] public swapEnabled;

    mapping(address => bool) public swapLimitsSaved;
    mapping(address => uint256 [3]) swapLimits;

    event Deposit(address user, uint256 amount, uint256 amountToReceive, address newAddress);
    event TokensClaimed(address recipient, uint256 amount);

    /**
      * @dev throws if transaction sender is not in owner role
      */
    modifier onlyOwner() {
        require(
            hasRole(DEFAULT_ADMIN_ROLE, _msgSender()),
            "Caller is not in owner role"
        );
        _;
    }

    /**
      * @dev throws if transaction sender is not in owner or validator role
      */
    modifier onlyOwnerAndValidator() {
        require(
            hasRole(DEFAULT_ADMIN_ROLE, _msgSender()) || hasRole(VALIDATOR_ROLE, _msgSender()),
            "Caller is not in owner or validator role"
        );
        _;
    }

    /**
      * @dev Constructor of contract
      * @param _tokenAddress Token contract address
      * @param validatorAddress Swap limits validator address
      * @param _swapRatios Swap ratios array
      * @param _swapEnabled Array that represents if swap enabled for ratio
      * @param _minSwapAmountPerTx Minimum token amount for swap per transaction
      * @param _maxSwapAmountPerTx Maximum token amount for swap per transaction
      */
    constructor(
        IERC20 _tokenAddress,
        address validatorAddress,
        uint128 [3] memory _swapRatios,
        bool [3] memory _swapEnabled,
        uint256 _minSwapAmountPerTx,
        uint256 _maxSwapAmountPerTx
    )
    {
        swapRatios = _swapRatios;
        swapEnabled = _swapEnabled;
        maxSwapAmountPerTx = _maxSwapAmountPerTx;
        minSwapAmountPerTx = _minSwapAmountPerTx;
        tokenAddress = _tokenAddress;
        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
        _setupRole(VALIDATOR_ROLE, validatorAddress);
    }

     /**
      * @dev Transfers tokens from sender to the contract.
      * User calls this function when he wants to deposit tokens for the first time.
      * @param amountToSend Maximum amount of tokens to send
      * @param newAddress Address in the blockchain where the user wants to get tokens
      * @param signedAddress Signed Address
      * @param signedSwapLimits Signed swap limits
      * @param signature Signed address + swapLimits keccak hash
      */
    function depositWithSignature(
        uint256 amountToSend,
        address newAddress,
        address signedAddress,
        uint256 [3] memory signedSwapLimits,
        bytes memory signature
    ) external
    {
        address sender = _msgSender();
        uint256 senderBalance = tokenAddress.balanceOf(sender);
        require(senderBalance >= amountToSend, "swapContract: Insufficient balance");
        require(amountToSend >= minSwapAmountPerTx, "swapContract: Less than required minimum of tokens requested");
        require(amountToSend <= maxSwapAmountPerTx, "swapContract: Swap limit per transaction exceeded");
        require(sender == signedAddress, "swapContract: Signed and sender address does not match");
        require(!swapLimitsSaved[sender], "swapContract: Swap limits already saved");

        bytes32 hashedParams = keccak256(abi.encodePacked(signedAddress, signedSwapLimits));
        address validatorAddress = ECDSA.recover(ECDSA.toEthSignedMessageHash(hashedParams), signature);
        require(isValidator(validatorAddress), "swapContract: Invalid swap limits validator");

        (uint256[3] memory swapLimitsNew, uint256 amountToPay, uint256 amountToReceive) = calculateAmountsAfterSwap(
            signedSwapLimits, amountToSend, true
        );
        require(amountToPay > 0, "swapContract: Swap limit reached");
        require(amountToReceive > 0, "swapContract: Amount to receive is zero");

        swapLimits[sender] = swapLimitsNew;
        swapLimitsSaved[sender] = true;

        TransferHelper.safeTransferFrom(address(tokenAddress), sender, address(this), amountToPay);
        emit Deposit(sender, amountToPay, amountToReceive, newAddress);
    }

    /**
      * @dev Transfers tokens from sender to the contract.
      * User calls this function when he wants to deposit tokens
      * if the swap limits have been already saved into the contract storage
      * @param amountToSend Maximum amount of tokens to send
      * @param newAddress Address in the blockchain where the user wants to get tokens
      */
     function deposit(
        uint256 amountToSend,
        address newAddress
    ) external
    {
        address sender = _msgSender();
        uint256 senderBalance = tokenAddress.balanceOf(sender);
        require(senderBalance >= amountToSend, "swapContract: Not enough balance");
        require(amountToSend >= minSwapAmountPerTx, "swapContract: Less than required minimum of tokens requested");
        require(amountToSend <= maxSwapAmountPerTx, "swapContract: Swap limit per transaction exceeded");
        require(swapLimitsSaved[sender], "swapContract: Swap limits not saved");

        (uint256[3] memory swapLimitsNew, uint256 amountToPay, uint256 amountToReceive) = calculateAmountsAfterSwap(
            swapLimits[sender], amountToSend, true
        );

        require(amountToPay > 0, "swapContract: Swap limit reached");
        require(amountToReceive > 0, "swapContract: Amount to receive is zero");

        swapLimits[sender] = swapLimitsNew;

        TransferHelper.safeTransferFrom(address(tokenAddress), sender, address(this), amountToPay);
        emit Deposit(sender, amountToPay, amountToReceive, newAddress);
    }

    /**
      * @dev Calculates actual amount to pay, amount to receive and new swap limits after swap
      * @param _swapLimits Swap limits array
      * @param amountToSend Maximum amount of tokens to send
      * @param checkIfSwapEnabled Check if swap enabled for a ratio
      * @return swapLimitsNew Swap limits after deposit is processed
      * @return amountToPay Actual amount of tokens to pay (amountToPay <= amountToSend)
      * @return amountToReceive Amount of tokens to receive after deposit is processed
      */
    function calculateAmountsAfterSwap(
        uint256[3] memory _swapLimits,
        uint256 amountToSend,
        bool checkIfSwapEnabled
    ) public view returns (
        uint256[3] memory swapLimitsNew, uint256 amountToPay, uint256 amountToReceive)
    {
        amountToReceive = 0;
        uint256 remainder = amountToSend;
        for (uint256 i = 0; i < _swapLimits.length; i++) {
            if (checkIfSwapEnabled && !swapEnabled[i] || swapRatios[i] == 0) {
                continue;
            }
            uint256 swapLimit = _swapLimits[i];

            if (remainder <= swapLimit) {
                amountToReceive += remainder / swapRatios[i];
                _swapLimits[i] -= remainder;
                remainder = 0;
                break;
            } else {
                amountToReceive += swapLimit / swapRatios[i];
                remainder -= swapLimit;
                _swapLimits[i] = 0;
            }
        }
        amountToPay = amountToSend - remainder;
        swapLimitsNew = _swapLimits;
    }

    /**
      * @dev Claims the deposited tokens
      * @param recipient Tokens recipient
      * @param amount Tokens amount
      */
    function claimTokens(address recipient, uint256 amount) external onlyOwner
    {
        uint256 balance = tokenAddress.balanceOf(address(this));
        require(balance > 0, "swapContract: Token balance is zero");
        require(balance >= amount, "swapContract: Not enough balance to claim");
        if (amount == 0) {
            amount = balance;
        }
        TransferHelper.safeTransfer(address(tokenAddress), recipient, amount);
        emit TokensClaimed(recipient, amount);
    }

    /**
      * @dev Changes requirement for minimal token amount to deposit
      * @param _minSwapAmountPerTx Amount of tokens
      */
    function setMinSwapAmountPerTx(uint256 _minSwapAmountPerTx) external onlyOwner {
        minSwapAmountPerTx = _minSwapAmountPerTx;
    }

    /**
      * @dev Changes requirement for maximum token amount to deposit
      * @param _maxSwapAmountPerTx Amount of tokens
      */
    function setMaxSwapAmountPerTx(uint256 _maxSwapAmountPerTx) external onlyOwner {
        maxSwapAmountPerTx = _maxSwapAmountPerTx;
    }

    /**
      * @dev Changes swap ratio
      * @param index Ratio index
      * @param ratio Ratio value
      */
    function setSwapRatio(uint128 index, uint128 ratio) external onlyOwner {
        swapRatios[index] = ratio;
    }

    /**
      * @dev Enables swap for a ratio
      * @param index Swap rate index
      */
    function enableSwap(uint128 index) external onlyOwner {
        swapEnabled[index] = true;
    }

    /**
      * @dev Disables swap for a ratio
      * @param index Swap rate index
      */
    function disableSwap(uint128 index) external onlyOwner {
        swapEnabled[index] = false;
    }

    /**
      * @dev Function to check if address is belongs to owner role
      * @param account Account address to check
      */
    function isOwner(address account) public view returns (bool) {
        return hasRole(DEFAULT_ADMIN_ROLE, account);
    }

    /**
      * @dev Function to check if address is belongs to validator role
      * @param account Account address to check
      */
    function isValidator(address account) public view returns (bool) {
        return hasRole(VALIDATOR_ROLE, account);
    }

    /**
      * @dev Returns account swap limits array
      * @param account Account address
      * @return Account swap limits array
      */
    function swapLimitsArray(address account) external view returns (uint256[3] memory)
    {
        return swapLimits[account];
    }

    /**
      * @dev Returns array that represents if swap enabled for ratio
      * @return Array that represents if swap enabled for ratio
      */
    function swapEnabledArray() external view returns (bool[3] memory)
    {
        return swapEnabled;
    }

    /**
      * @dev Updates swap limits for account
      * @param account Account address
      * @param _swapLimits Swap limits array
      */
    function updateSwapLimits(address account, uint256[3] memory _swapLimits) external onlyOwnerAndValidator {
        swapLimits[account] = _swapLimits;
        swapLimitsSaved[account] = true;
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_tokenAddress","type":"address"},{"internalType":"address","name":"validatorAddress","type":"address"},{"internalType":"uint128[3]","name":"_swapRatios","type":"uint128[3]"},{"internalType":"bool[3]","name":"_swapEnabled","type":"bool[3]"},{"internalType":"uint256","name":"_minSwapAmountPerTx","type":"uint256"},{"internalType":"uint256","name":"_maxSwapAmountPerTx","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountToReceive","type":"uint256"},{"indexed":false,"internalType":"address","name":"newAddress","type":"address"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokensClaimed","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VALIDATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[3]","name":"_swapLimits","type":"uint256[3]"},{"internalType":"uint256","name":"amountToSend","type":"uint256"},{"internalType":"bool","name":"checkIfSwapEnabled","type":"bool"}],"name":"calculateAmountsAfterSwap","outputs":[{"internalType":"uint256[3]","name":"swapLimitsNew","type":"uint256[3]"},{"internalType":"uint256","name":"amountToPay","type":"uint256"},{"internalType":"uint256","name":"amountToReceive","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"claimTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountToSend","type":"uint256"},{"internalType":"address","name":"newAddress","type":"address"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountToSend","type":"uint256"},{"internalType":"address","name":"newAddress","type":"address"},{"internalType":"address","name":"signedAddress","type":"address"},{"internalType":"uint256[3]","name":"signedSwapLimits","type":"uint256[3]"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"depositWithSignature","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"index","type":"uint128"}],"name":"disableSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"index","type":"uint128"}],"name":"enableSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isValidator","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSwapAmountPerTx","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minSwapAmountPerTx","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxSwapAmountPerTx","type":"uint256"}],"name":"setMaxSwapAmountPerTx","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minSwapAmountPerTx","type":"uint256"}],"name":"setMinSwapAmountPerTx","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"index","type":"uint128"},{"internalType":"uint128","name":"ratio","type":"uint128"}],"name":"setSwapRatio","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"swapEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapEnabledArray","outputs":[{"internalType":"bool[3]","name":"","type":"bool[3]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"swapLimitsArray","outputs":[{"internalType":"uint256[3]","name":"","type":"uint256[3]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"swapLimitsSaved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"swapRatios","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenAddress","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[3]","name":"_swapLimits","type":"uint256[3]"}],"name":"updateSwapLimits","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50604051620039ef380380620039ef8339810160408190526200003491620003e1565b6200004360058560036200022a565b50620000536007846003620002d6565b5060038190556004829055600280546001600160a01b0319166001600160a01b0388161790556200008d6000620000873390565b620000c5565b620000b97f21702c8af46127c7fa207f89d0b0a8441bb32959a0ac7df790e9ab1a25c9892686620000c5565b5050505050506200050b565b620000dc82826200010860201b62001cca1760201c565b60008281526001602090815260409091206200010391839062001cd862000118821b17901c565b505050565b62000114828262000138565b5050565b60006200012f836001600160a01b038416620001d8565b90505b92915050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000114576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620001943390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000818152600183016020526040812054620002215750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000132565b50600062000132565b600283019183908215620002c45791602002820160005b838211156200028d57835183826101000a8154816001600160801b0302191690836001600160801b031602179055509260200192601001602081600f0104928301926001030262000241565b8015620002c25782816101000a8154906001600160801b030219169055601001602081600f010492830192600103026200028d565b505b50620002d29291506200035b565b5090565b600183019183908215620002c45791602002820160005b838211156200032c57835183826101000a81548160ff0219169083151502179055509260200192600101602081600001049283019260010302620002ed565b8015620002c25782816101000a81549060ff02191690556001016020816000010492830192600103026200032c565b5b80821115620002d257600081556001016200035c565b600082601f8301126200038457600080fd5b6200038e620004bb565b808385606086011115620003a157600080fd5b6000805b6003811015620003d55782518015158114620003bf578283fd5b85526020948501949290920191600101620003a5565b50919695505050505050565b6000806000806000806101408789031215620003fc57600080fd5b86516200040981620004f2565b809650506020808801516200041e81620004f2565b9550605f880189136200043057600080fd5b6200043a620004bb565b8060408a0160a08b018c8111156200045157600080fd5b6000805b6003811015620004895783516001600160801b038116811462000476578283fd5b8652948601949286019260010162000455565b50508298506200049a8d8262000372565b97505050505050610100870151915061012087015190509295509295509295565b604051606081016001600160401b0381118282101715620004ec57634e487b7160e01b600052604160045260246000fd5b60405290565b6001600160a01b03811681146200050857600080fd5b50565b6134d4806200051b6000396000f3fe608060405234801561001057600080fd5b50600436106101d95760003560e01c806376d9e51211610104578063c49baebe116100a2578063fabcd54411610071578063fabcd544146104a2578063facd743b146104ab578063fe417fa5146104be578063fea8a7ac146104d157600080fd5b8063c49baebe14610433578063ca15c8731461045a578063ccbe0a5c1461046d578063d547741f1461048f57600080fd5b806391d14854116100de57806391d14854146103b45780639d76ea58146103f8578063a217fddf14610418578063b7c34c7d1461042057600080fd5b806376d9e5121461035657806385d9cd09146103695780639010d07c1461037c57600080fd5b8063360cf57d1161017c5780635d14823c1161014b5780635d14823c146103145780636a8e291d1461031d5780636e553f65146103305780636f63e2971461034357600080fd5b8063360cf57d146102bb57806336568abe146102ce578063388e480c146102e157806355891b27146102f457600080fd5b8063248a9ca3116101b8578063248a9ca31461023057806328334451146102615780632f2ff15d146102955780632f54bf6e146102a857600080fd5b8062fb481c146101de57806301ffc9a7146101f35780631d1f9f0c1461021b575b600080fd5b6101f16101ec366004612d93565b6104f4565b005b610206610201366004612ead565b610642565b60405190151581526020015b60405180910390f35b61022361069e565b6040516102129190613164565b61025361023e366004612e4f565b60009081526020819052604090206001015490565b604051908152602001610212565b61027461026f366004612e4f565b6106f8565b6040516fffffffffffffffffffffffffffffffff9091168152602001610212565b6101f16102a3366004612e68565b610734565b6102066102b6366004612d78565b61075b565b6101f16102c9366004612f0a565b6107a8565b6101f16102dc366004612e68565b610884565b6101f16102ef366004612eef565b6108a6565b610307610302366004612d78565b610960565b6040516102129190613197565b61025360045481565b6101f161032b366004612e4f565b6109bf565b6101f161033e366004612e68565b610a35565b610206610351366004612e4f565b610f43565b6101f1610364366004612f4d565b610f6d565b6101f1610377366004612eef565b611674565b61038f61038a366004612e8b565b61170c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610212565b6102066103c2366004612e68565b60009182526020828152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b60025461038f9073ffffffffffffffffffffffffffffffffffffffff1681565b610253600081565b6101f161042e366004612e4f565b61172b565b6102537f21702c8af46127c7fa207f89d0b0a8441bb32959a0ac7df790e9ab1a25c9892681565b610253610468366004612e4f565b6117a1565b61048061047b366004612df1565b6117b8565b604051610212939291906131a5565b6101f161049d366004612e68565b6119bd565b61025360035481565b6102066104b9366004612d78565b6119c7565b6101f16104cc366004612dc7565b611a14565b6102066104df366004612d78565b60086020526000908152604090205460ff1681565b6104ff6000336103c2565b8061052f575061052f7f21702c8af46127c7fa207f89d0b0a8441bb32959a0ac7df790e9ab1a25c98926336103c2565b6105c0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f43616c6c6572206973206e6f7420696e206f776e6572206f722076616c69646160448201527f746f7220726f6c6500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821660009081526009602052604090206105f190826003612c48565b505073ffffffffffffffffffffffffffffffffffffffff16600090815260086020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f000000000000000000000000000000000000000000000000000000001480610698575061069882611cfa565b92915050565b6106a6612c86565b60408051606081019182905290600790600390826000855b825461010083900a900460ff1615158152602060019283018181049485019490930390920291018084116106be5790505050505050905090565b6005816003811061070857600080fd5b60029182820401919006601002915054906101000a90046fffffffffffffffffffffffffffffffff1681565b61073e8282611d91565b60008281526001602052604090206107569082611cd8565b505050565b73ffffffffffffffffffffffffffffffffffffffff811660009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604081205460ff16610698565b6107b36000336103c2565b610819576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f43616c6c6572206973206e6f7420696e206f776e657220726f6c65000000000060448201526064016105b7565b806005836fffffffffffffffffffffffffffffffff166003811061083f5761083f613432565b600291828204019190066010026101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055505050565b61088e8282611db7565b60008281526001602052604090206107569082611e66565b6108b16000336103c2565b610917576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f43616c6c6572206973206e6f7420696e206f776e657220726f6c65000000000060448201526064016105b7565b60016007826fffffffffffffffffffffffffffffffff166003811061093e5761093e613432565b602091828204019190066101000a81548160ff02191690831515021790555050565b610968612c86565b73ffffffffffffffffffffffffffffffffffffffff821660009081526009602052604090819020815160608101928390529160039082845b8154815260200190600101908083116109a05750505050509050919050565b6109ca6000336103c2565b610a30576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f43616c6c6572206973206e6f7420696e206f776e657220726f6c65000000000060448201526064016105b7565b600455565b6000336002546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8084166004830152929350600092909116906370a082319060240160206040518083038186803b158015610aa957600080fd5b505afa158015610abd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae19190612f34565b905083811015610b4d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f73776170436f6e74726163743a204e6f7420656e6f7567682062616c616e636560448201526064016105b7565b600454841015610bdf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603c60248201527f73776170436f6e74726163743a204c657373207468616e20726571756972656460448201527f206d696e696d756d206f6620746f6b656e73207265717565737465640000000060648201526084016105b7565b600354841115610c71576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f73776170436f6e74726163743a2053776170206c696d6974207065722074726160448201527f6e73616374696f6e20657863656564656400000000000000000000000000000060648201526084016105b7565b73ffffffffffffffffffffffffffffffffffffffff821660009081526008602052604090205460ff16610d26576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f73776170436f6e74726163743a2053776170206c696d697473206e6f7420736160448201527f766564000000000000000000000000000000000000000000000000000000000060648201526084016105b7565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600960205260408082208151606081019283905283928392610d85929160039082845b815481526020019060010190808311610d655750505050508860016117b8565b92509250925060008211610df5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f73776170436f6e74726163743a2053776170206c696d6974207265616368656460448201526064016105b7565b60008111610e85576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f73776170436f6e74726163743a20416d6f756e7420746f20726563656976652060448201527f6973207a65726f0000000000000000000000000000000000000000000000000060648201526084016105b7565b73ffffffffffffffffffffffffffffffffffffffff85166000908152600960205260409020610eb690846003612c48565b50600254610edc9073ffffffffffffffffffffffffffffffffffffffff16863085611e88565b6040805173ffffffffffffffffffffffffffffffffffffffff8781168252602082018590528183018490528816606082015290517f02d7e648dd130fc184d383e55bb126ac4c9c60e8f94bf05acdf557ba2d540b479181900360800190a150505050505050565b60078160038110610f5357600080fd5b60209182820401919006915054906101000a900460ff1681565b6000336002546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8084166004830152929350600092909116906370a082319060240160206040518083038186803b158015610fe157600080fd5b505afa158015610ff5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110199190612f34565b9050868110156110ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f73776170436f6e74726163743a20496e73756666696369656e742062616c616e60448201527f636500000000000000000000000000000000000000000000000000000000000060648201526084016105b7565b60045487101561113d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603c60248201527f73776170436f6e74726163743a204c657373207468616e20726571756972656460448201527f206d696e696d756d206f6620746f6b656e73207265717565737465640000000060648201526084016105b7565b6003548711156111cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f73776170436f6e74726163743a2053776170206c696d6974207065722074726160448201527f6e73616374696f6e20657863656564656400000000000000000000000000000060648201526084016105b7565b8473ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161461128a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f73776170436f6e74726163743a205369676e656420616e642073656e6465722060448201527f6164647265737320646f6573206e6f74206d617463680000000000000000000060648201526084016105b7565b73ffffffffffffffffffffffffffffffffffffffff821660009081526008602052604090205460ff1615611340576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f73776170436f6e74726163743a2053776170206c696d69747320616c7265616460448201527f792073617665640000000000000000000000000000000000000000000000000060648201526084016105b7565b60008585604051602001611355929190613066565b60405160208183030381529060405280519060200120905060006113cf6113c9836040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b86612026565b90506113da816119c7565b611466576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f73776170436f6e74726163743a20496e76616c69642073776170206c696d697460448201527f732076616c696461746f7200000000000000000000000000000000000000000060648201526084016105b7565b6000806000611477898d60016117b8565b925092509250600082116114e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f73776170436f6e74726163743a2053776170206c696d6974207265616368656460448201526064016105b7565b60008111611577576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f73776170436f6e74726163743a20416d6f756e7420746f20726563656976652060448201527f6973207a65726f0000000000000000000000000000000000000000000000000060648201526084016105b7565b73ffffffffffffffffffffffffffffffffffffffff871660009081526009602052604090206115a890846003612c48565b5073ffffffffffffffffffffffffffffffffffffffff808816600090815260086020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556002546116089116883085611e88565b6040805173ffffffffffffffffffffffffffffffffffffffff8981168252602082018590528183018490528d16606082015290517f02d7e648dd130fc184d383e55bb126ac4c9c60e8f94bf05acdf557ba2d540b479181900360800190a1505050505050505050505050565b61167f6000336103c2565b6116e5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f43616c6c6572206973206e6f7420696e206f776e657220726f6c65000000000060448201526064016105b7565b60006007826fffffffffffffffffffffffffffffffff166003811061093e5761093e613432565b6000828152600160205260408120611724908361204a565b9392505050565b6117366000336103c2565b61179c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f43616c6c6572206973206e6f7420696e206f776e657220726f6c65000000000060448201526064016105b7565b600355565b600081815260016020526040812061069890612056565b6117c0612c86565b60008084815b60038110156119a5578580156118025750600781600381106117ea576117ea613432565b602081049091015460ff601f9092166101000a900416155b8061184657506005816003811061181b5761181b613432565b60028104919091015460019091166010026101000a90046fffffffffffffffffffffffffffffffff16155b1561185057611993565b600088826003811061186457611864613432565b60200201519050808311611908576005826003811061188557611885613432565b600291828204019190066010029054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16836118ca919061327c565b6118d49085613264565b9350828983600381106118e9576118e9613432565b602002018181516118fa91906132f4565b905250600092506119a59050565b6005826003811061191b5761191b613432565b600291828204019190066010029054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1681611960919061327c565b61196a9085613264565b935061197681846132f4565b9250600089836003811061198c5761198c613432565b6020020152505b8061199d8161336c565b9150506117c6565b506119b081876132f4565b9697919550909350505050565b61088e8282612060565b73ffffffffffffffffffffffffffffffffffffffff811660009081527f5111aeae4aa79889928e72f88b5872109754de9d419ea9a4e3df5fba21d4d46f602052604081205460ff16610698565b611a1f6000336103c2565b611a85576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f43616c6c6572206973206e6f7420696e206f776e657220726f6c65000000000060448201526064016105b7565b6002546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009173ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b158015611aef57600080fd5b505afa158015611b03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b279190612f34565b905060008111611bb9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f73776170436f6e74726163743a20546f6b656e2062616c616e6365206973207a60448201527f65726f000000000000000000000000000000000000000000000000000000000060648201526084016105b7565b81811015611c49576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f73776170436f6e74726163743a204e6f7420656e6f7567682062616c616e636560448201527f20746f20636c61696d000000000000000000000000000000000000000000000060648201526084016105b7565b81611c52578091505b600254611c769073ffffffffffffffffffffffffffffffffffffffff168484612086565b6040805173ffffffffffffffffffffffffffffffffffffffff85168152602081018490527f896e034966eaaf1adc54acc0f257056febbd300c9e47182cf761982cf1f5e430910160405180910390a1505050565b611cd482826121f6565b5050565b60006117248373ffffffffffffffffffffffffffffffffffffffff84166122e6565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061069857507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610698565b600082815260208190526040902060010154611dad8133612335565b61075683836121f6565b73ffffffffffffffffffffffffffffffffffffffff81163314611e5c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016105b7565b611cd48282612405565b60006117248373ffffffffffffffffffffffffffffffffffffffff84166124bc565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790529151600092839290881691611f2791906130c7565b6000604051808303816000865af19150503d8060008114611f64576040519150601f19603f3d011682016040523d82523d6000602084013e611f69565b606091505b5091509150818015611f93575080511580611f93575080806020019051810190611f939190612e32565b61201e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f5472616e7366657248656c7065723a205452414e534645525f46524f4d5f464160448201527f494c45440000000000000000000000000000000000000000000000000000000060648201526084016105b7565b505050505050565b600080600061203585856125af565b915091506120428161261f565b509392505050565b6000611724838361287b565b6000610698825490565b60008281526020819052604090206001015461207c8133612335565b6107568383612405565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052915160009283929087169161211d91906130c7565b6000604051808303816000865af19150503d806000811461215a576040519150601f19603f3d011682016040523d82523d6000602084013e61215f565b606091505b50915091508180156121895750805115806121895750808060200190518101906121899190612e32565b6121ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c45440060448201526064016105b7565b5050505050565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16611cd45760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556122883390565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600081815260018301602052604081205461232d57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610698565b506000610698565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16611cd45761238b8173ffffffffffffffffffffffffffffffffffffffff1660146128a5565b6123968360206128a5565b6040516020016123a79291906130e3565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290527f08c379a00000000000000000000000000000000000000000000000000000000082526105b7916004016131c4565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff1615611cd45760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600081815260018301602052604081205480156125a55760006124e06001836132f4565b85549091506000906124f4906001906132f4565b905081811461255957600086600001828154811061251457612514613432565b906000526020600020015490508087600001848154811061253757612537613432565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061256a5761256a613403565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610698565b6000915050610698565b6000808251604114156125e65760208301516040840151606085015160001a6125da87828585612ae8565b94509450505050612618565b8251604014156126105760208301516040840151612605868383612c00565b935093505050612618565b506000905060025b9250929050565b6000816004811115612633576126336133d4565b141561263c5750565b6001816004811115612650576126506133d4565b14156126b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016105b7565b60028160048111156126cc576126cc6133d4565b1415612734576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016105b7565b6003816004811115612748576127486133d4565b14156127d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016105b7565b60048160048111156127ea576127ea6133d4565b1415612878576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016105b7565b50565b600082600001828154811061289257612892613432565b9060005260206000200154905092915050565b606060006128b48360026132b7565b6128bf906002613264565b67ffffffffffffffff8111156128d7576128d7613461565b6040519080825280601f01601f191660200182016040528015612901576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061293857612938613432565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061299b5761299b613432565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006129d78460026132b7565b6129e2906001613264565b90505b6001811115612a7f577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110612a2357612a23613432565b1a60f81b828281518110612a3957612a39613432565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c93612a7881613337565b90506129e5565b508315611724576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105b7565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612b1f5750600090506003612bf7565b8460ff16601b14158015612b3757508460ff16601c14155b15612b485750600090506004612bf7565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612b9c573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116612bf057600060019250925050612bf7565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831660ff84901c601b01612c3a87828885612ae8565b935093505050935093915050565b8260038101928215612c76579160200282015b82811115612c76578251825591602001919060010190612c5b565b50612c82929150612ca4565b5090565b60405180606001604052806003906020820280368337509192915050565b5b80821115612c825760008155600101612ca5565b803573ffffffffffffffffffffffffffffffffffffffff81168114612cdd57600080fd5b919050565b600082601f830112612cf357600080fd5b6040516060810181811067ffffffffffffffff82111715612d1657612d16613461565b604052808360608101861015612d2b57600080fd5b60005b6003811015612d4d578135835260209283019290910190600101612d2e565b509195945050505050565b80356fffffffffffffffffffffffffffffffff81168114612cdd57600080fd5b600060208284031215612d8a57600080fd5b61172482612cb9565b60008060808385031215612da657600080fd5b612daf83612cb9565b9150612dbe8460208501612ce2565b90509250929050565b60008060408385031215612dda57600080fd5b612de383612cb9565b946020939093013593505050565b600080600060a08486031215612e0657600080fd5b612e108585612ce2565b9250606084013591506080840135612e2781613490565b809150509250925092565b600060208284031215612e4457600080fd5b815161172481613490565b600060208284031215612e6157600080fd5b5035919050565b60008060408385031215612e7b57600080fd5b82359150612dbe60208401612cb9565b60008060408385031215612e9e57600080fd5b50508035926020909101359150565b600060208284031215612ebf57600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461172457600080fd5b600060208284031215612f0157600080fd5b61172482612d58565b60008060408385031215612f1d57600080fd5b612f2683612d58565b9150612dbe60208401612d58565b600060208284031215612f4657600080fd5b5051919050565b600080600080600060e08688031215612f6557600080fd5b853594506020612f76818801612cb9565b9450612f8460408801612cb9565b9350612f938860608901612ce2565b925060c087013567ffffffffffffffff80821115612fb057600080fd5b818901915089601f830112612fc457600080fd5b813581811115612fd657612fd6613461565b613006847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601613215565b91508082528a8482850101111561301c57600080fd5b80848401858401376000848284010152508093505050509295509295909350565b8060005b6003811015613060578151845260209384019390910190600101613041565b50505050565b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008360601b1681526000601482018360005b60038110156130b7578151835260209283019290910190600101613098565b5050506074820190509392505050565b600082516130d981846020870161330b565b9190910192915050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161311b81601785016020880161330b565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161315881602884016020880161330b565b01602801949350505050565b60608101818360005b600381101561318e578151151583526020928301929091019060010161316d565b50505092915050565b60608101610698828461303d565b60a081016131b3828661303d565b606082019390935260800152919050565b60208152600082518060208401526131e381604085016020870161330b565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561325c5761325c613461565b604052919050565b60008219821115613277576132776133a5565b500190565b6000826132b2577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156132ef576132ef6133a5565b500290565b600082821015613306576133066133a5565b500390565b60005b8381101561332657818101518382015260200161330e565b838111156130605750506000910152565b600081613346576133466133a5565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561339e5761339e6133a5565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b801515811461287857600080fdfea26469706673582212203446fcfc37b7c5469c50f812c77b4eae62eb2a3e8cce3cb2e97ee642fb612f3664736f6c6343000807003300000000000000000000000041ab1b6fcbb2fa9dced81acbdec13ea6315f2bf20000000000000000000000003a6b1dbf58b0d816fe4ab16f973a064c01602217000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000152d02c7e14af6800000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101d95760003560e01c806376d9e51211610104578063c49baebe116100a2578063fabcd54411610071578063fabcd544146104a2578063facd743b146104ab578063fe417fa5146104be578063fea8a7ac146104d157600080fd5b8063c49baebe14610433578063ca15c8731461045a578063ccbe0a5c1461046d578063d547741f1461048f57600080fd5b806391d14854116100de57806391d14854146103b45780639d76ea58146103f8578063a217fddf14610418578063b7c34c7d1461042057600080fd5b806376d9e5121461035657806385d9cd09146103695780639010d07c1461037c57600080fd5b8063360cf57d1161017c5780635d14823c1161014b5780635d14823c146103145780636a8e291d1461031d5780636e553f65146103305780636f63e2971461034357600080fd5b8063360cf57d146102bb57806336568abe146102ce578063388e480c146102e157806355891b27146102f457600080fd5b8063248a9ca3116101b8578063248a9ca31461023057806328334451146102615780632f2ff15d146102955780632f54bf6e146102a857600080fd5b8062fb481c146101de57806301ffc9a7146101f35780631d1f9f0c1461021b575b600080fd5b6101f16101ec366004612d93565b6104f4565b005b610206610201366004612ead565b610642565b60405190151581526020015b60405180910390f35b61022361069e565b6040516102129190613164565b61025361023e366004612e4f565b60009081526020819052604090206001015490565b604051908152602001610212565b61027461026f366004612e4f565b6106f8565b6040516fffffffffffffffffffffffffffffffff9091168152602001610212565b6101f16102a3366004612e68565b610734565b6102066102b6366004612d78565b61075b565b6101f16102c9366004612f0a565b6107a8565b6101f16102dc366004612e68565b610884565b6101f16102ef366004612eef565b6108a6565b610307610302366004612d78565b610960565b6040516102129190613197565b61025360045481565b6101f161032b366004612e4f565b6109bf565b6101f161033e366004612e68565b610a35565b610206610351366004612e4f565b610f43565b6101f1610364366004612f4d565b610f6d565b6101f1610377366004612eef565b611674565b61038f61038a366004612e8b565b61170c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610212565b6102066103c2366004612e68565b60009182526020828152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b60025461038f9073ffffffffffffffffffffffffffffffffffffffff1681565b610253600081565b6101f161042e366004612e4f565b61172b565b6102537f21702c8af46127c7fa207f89d0b0a8441bb32959a0ac7df790e9ab1a25c9892681565b610253610468366004612e4f565b6117a1565b61048061047b366004612df1565b6117b8565b604051610212939291906131a5565b6101f161049d366004612e68565b6119bd565b61025360035481565b6102066104b9366004612d78565b6119c7565b6101f16104cc366004612dc7565b611a14565b6102066104df366004612d78565b60086020526000908152604090205460ff1681565b6104ff6000336103c2565b8061052f575061052f7f21702c8af46127c7fa207f89d0b0a8441bb32959a0ac7df790e9ab1a25c98926336103c2565b6105c0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f43616c6c6572206973206e6f7420696e206f776e6572206f722076616c69646160448201527f746f7220726f6c6500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821660009081526009602052604090206105f190826003612c48565b505073ffffffffffffffffffffffffffffffffffffffff16600090815260086020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f000000000000000000000000000000000000000000000000000000001480610698575061069882611cfa565b92915050565b6106a6612c86565b60408051606081019182905290600790600390826000855b825461010083900a900460ff1615158152602060019283018181049485019490930390920291018084116106be5790505050505050905090565b6005816003811061070857600080fd5b60029182820401919006601002915054906101000a90046fffffffffffffffffffffffffffffffff1681565b61073e8282611d91565b60008281526001602052604090206107569082611cd8565b505050565b73ffffffffffffffffffffffffffffffffffffffff811660009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604081205460ff16610698565b6107b36000336103c2565b610819576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f43616c6c6572206973206e6f7420696e206f776e657220726f6c65000000000060448201526064016105b7565b806005836fffffffffffffffffffffffffffffffff166003811061083f5761083f613432565b600291828204019190066010026101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055505050565b61088e8282611db7565b60008281526001602052604090206107569082611e66565b6108b16000336103c2565b610917576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f43616c6c6572206973206e6f7420696e206f776e657220726f6c65000000000060448201526064016105b7565b60016007826fffffffffffffffffffffffffffffffff166003811061093e5761093e613432565b602091828204019190066101000a81548160ff02191690831515021790555050565b610968612c86565b73ffffffffffffffffffffffffffffffffffffffff821660009081526009602052604090819020815160608101928390529160039082845b8154815260200190600101908083116109a05750505050509050919050565b6109ca6000336103c2565b610a30576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f43616c6c6572206973206e6f7420696e206f776e657220726f6c65000000000060448201526064016105b7565b600455565b6000336002546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8084166004830152929350600092909116906370a082319060240160206040518083038186803b158015610aa957600080fd5b505afa158015610abd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae19190612f34565b905083811015610b4d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f73776170436f6e74726163743a204e6f7420656e6f7567682062616c616e636560448201526064016105b7565b600454841015610bdf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603c60248201527f73776170436f6e74726163743a204c657373207468616e20726571756972656460448201527f206d696e696d756d206f6620746f6b656e73207265717565737465640000000060648201526084016105b7565b600354841115610c71576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f73776170436f6e74726163743a2053776170206c696d6974207065722074726160448201527f6e73616374696f6e20657863656564656400000000000000000000000000000060648201526084016105b7565b73ffffffffffffffffffffffffffffffffffffffff821660009081526008602052604090205460ff16610d26576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f73776170436f6e74726163743a2053776170206c696d697473206e6f7420736160448201527f766564000000000000000000000000000000000000000000000000000000000060648201526084016105b7565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600960205260408082208151606081019283905283928392610d85929160039082845b815481526020019060010190808311610d655750505050508860016117b8565b92509250925060008211610df5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f73776170436f6e74726163743a2053776170206c696d6974207265616368656460448201526064016105b7565b60008111610e85576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f73776170436f6e74726163743a20416d6f756e7420746f20726563656976652060448201527f6973207a65726f0000000000000000000000000000000000000000000000000060648201526084016105b7565b73ffffffffffffffffffffffffffffffffffffffff85166000908152600960205260409020610eb690846003612c48565b50600254610edc9073ffffffffffffffffffffffffffffffffffffffff16863085611e88565b6040805173ffffffffffffffffffffffffffffffffffffffff8781168252602082018590528183018490528816606082015290517f02d7e648dd130fc184d383e55bb126ac4c9c60e8f94bf05acdf557ba2d540b479181900360800190a150505050505050565b60078160038110610f5357600080fd5b60209182820401919006915054906101000a900460ff1681565b6000336002546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8084166004830152929350600092909116906370a082319060240160206040518083038186803b158015610fe157600080fd5b505afa158015610ff5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110199190612f34565b9050868110156110ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f73776170436f6e74726163743a20496e73756666696369656e742062616c616e60448201527f636500000000000000000000000000000000000000000000000000000000000060648201526084016105b7565b60045487101561113d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603c60248201527f73776170436f6e74726163743a204c657373207468616e20726571756972656460448201527f206d696e696d756d206f6620746f6b656e73207265717565737465640000000060648201526084016105b7565b6003548711156111cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f73776170436f6e74726163743a2053776170206c696d6974207065722074726160448201527f6e73616374696f6e20657863656564656400000000000000000000000000000060648201526084016105b7565b8473ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161461128a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f73776170436f6e74726163743a205369676e656420616e642073656e6465722060448201527f6164647265737320646f6573206e6f74206d617463680000000000000000000060648201526084016105b7565b73ffffffffffffffffffffffffffffffffffffffff821660009081526008602052604090205460ff1615611340576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f73776170436f6e74726163743a2053776170206c696d69747320616c7265616460448201527f792073617665640000000000000000000000000000000000000000000000000060648201526084016105b7565b60008585604051602001611355929190613066565b60405160208183030381529060405280519060200120905060006113cf6113c9836040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b86612026565b90506113da816119c7565b611466576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f73776170436f6e74726163743a20496e76616c69642073776170206c696d697460448201527f732076616c696461746f7200000000000000000000000000000000000000000060648201526084016105b7565b6000806000611477898d60016117b8565b925092509250600082116114e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f73776170436f6e74726163743a2053776170206c696d6974207265616368656460448201526064016105b7565b60008111611577576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f73776170436f6e74726163743a20416d6f756e7420746f20726563656976652060448201527f6973207a65726f0000000000000000000000000000000000000000000000000060648201526084016105b7565b73ffffffffffffffffffffffffffffffffffffffff871660009081526009602052604090206115a890846003612c48565b5073ffffffffffffffffffffffffffffffffffffffff808816600090815260086020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556002546116089116883085611e88565b6040805173ffffffffffffffffffffffffffffffffffffffff8981168252602082018590528183018490528d16606082015290517f02d7e648dd130fc184d383e55bb126ac4c9c60e8f94bf05acdf557ba2d540b479181900360800190a1505050505050505050505050565b61167f6000336103c2565b6116e5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f43616c6c6572206973206e6f7420696e206f776e657220726f6c65000000000060448201526064016105b7565b60006007826fffffffffffffffffffffffffffffffff166003811061093e5761093e613432565b6000828152600160205260408120611724908361204a565b9392505050565b6117366000336103c2565b61179c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f43616c6c6572206973206e6f7420696e206f776e657220726f6c65000000000060448201526064016105b7565b600355565b600081815260016020526040812061069890612056565b6117c0612c86565b60008084815b60038110156119a5578580156118025750600781600381106117ea576117ea613432565b602081049091015460ff601f9092166101000a900416155b8061184657506005816003811061181b5761181b613432565b60028104919091015460019091166010026101000a90046fffffffffffffffffffffffffffffffff16155b1561185057611993565b600088826003811061186457611864613432565b60200201519050808311611908576005826003811061188557611885613432565b600291828204019190066010029054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16836118ca919061327c565b6118d49085613264565b9350828983600381106118e9576118e9613432565b602002018181516118fa91906132f4565b905250600092506119a59050565b6005826003811061191b5761191b613432565b600291828204019190066010029054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1681611960919061327c565b61196a9085613264565b935061197681846132f4565b9250600089836003811061198c5761198c613432565b6020020152505b8061199d8161336c565b9150506117c6565b506119b081876132f4565b9697919550909350505050565b61088e8282612060565b73ffffffffffffffffffffffffffffffffffffffff811660009081527f5111aeae4aa79889928e72f88b5872109754de9d419ea9a4e3df5fba21d4d46f602052604081205460ff16610698565b611a1f6000336103c2565b611a85576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f43616c6c6572206973206e6f7420696e206f776e657220726f6c65000000000060448201526064016105b7565b6002546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009173ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b158015611aef57600080fd5b505afa158015611b03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b279190612f34565b905060008111611bb9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f73776170436f6e74726163743a20546f6b656e2062616c616e6365206973207a60448201527f65726f000000000000000000000000000000000000000000000000000000000060648201526084016105b7565b81811015611c49576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f73776170436f6e74726163743a204e6f7420656e6f7567682062616c616e636560448201527f20746f20636c61696d000000000000000000000000000000000000000000000060648201526084016105b7565b81611c52578091505b600254611c769073ffffffffffffffffffffffffffffffffffffffff168484612086565b6040805173ffffffffffffffffffffffffffffffffffffffff85168152602081018490527f896e034966eaaf1adc54acc0f257056febbd300c9e47182cf761982cf1f5e430910160405180910390a1505050565b611cd482826121f6565b5050565b60006117248373ffffffffffffffffffffffffffffffffffffffff84166122e6565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061069857507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610698565b600082815260208190526040902060010154611dad8133612335565b61075683836121f6565b73ffffffffffffffffffffffffffffffffffffffff81163314611e5c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016105b7565b611cd48282612405565b60006117248373ffffffffffffffffffffffffffffffffffffffff84166124bc565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790529151600092839290881691611f2791906130c7565b6000604051808303816000865af19150503d8060008114611f64576040519150601f19603f3d011682016040523d82523d6000602084013e611f69565b606091505b5091509150818015611f93575080511580611f93575080806020019051810190611f939190612e32565b61201e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f5472616e7366657248656c7065723a205452414e534645525f46524f4d5f464160448201527f494c45440000000000000000000000000000000000000000000000000000000060648201526084016105b7565b505050505050565b600080600061203585856125af565b915091506120428161261f565b509392505050565b6000611724838361287b565b6000610698825490565b60008281526020819052604090206001015461207c8133612335565b6107568383612405565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052915160009283929087169161211d91906130c7565b6000604051808303816000865af19150503d806000811461215a576040519150601f19603f3d011682016040523d82523d6000602084013e61215f565b606091505b50915091508180156121895750805115806121895750808060200190518101906121899190612e32565b6121ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c45440060448201526064016105b7565b5050505050565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16611cd45760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556122883390565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600081815260018301602052604081205461232d57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610698565b506000610698565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16611cd45761238b8173ffffffffffffffffffffffffffffffffffffffff1660146128a5565b6123968360206128a5565b6040516020016123a79291906130e3565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290527f08c379a00000000000000000000000000000000000000000000000000000000082526105b7916004016131c4565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff1615611cd45760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600081815260018301602052604081205480156125a55760006124e06001836132f4565b85549091506000906124f4906001906132f4565b905081811461255957600086600001828154811061251457612514613432565b906000526020600020015490508087600001848154811061253757612537613432565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061256a5761256a613403565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610698565b6000915050610698565b6000808251604114156125e65760208301516040840151606085015160001a6125da87828585612ae8565b94509450505050612618565b8251604014156126105760208301516040840151612605868383612c00565b935093505050612618565b506000905060025b9250929050565b6000816004811115612633576126336133d4565b141561263c5750565b6001816004811115612650576126506133d4565b14156126b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016105b7565b60028160048111156126cc576126cc6133d4565b1415612734576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016105b7565b6003816004811115612748576127486133d4565b14156127d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016105b7565b60048160048111156127ea576127ea6133d4565b1415612878576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016105b7565b50565b600082600001828154811061289257612892613432565b9060005260206000200154905092915050565b606060006128b48360026132b7565b6128bf906002613264565b67ffffffffffffffff8111156128d7576128d7613461565b6040519080825280601f01601f191660200182016040528015612901576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061293857612938613432565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061299b5761299b613432565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006129d78460026132b7565b6129e2906001613264565b90505b6001811115612a7f577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110612a2357612a23613432565b1a60f81b828281518110612a3957612a39613432565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c93612a7881613337565b90506129e5565b508315611724576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105b7565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612b1f5750600090506003612bf7565b8460ff16601b14158015612b3757508460ff16601c14155b15612b485750600090506004612bf7565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612b9c573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116612bf057600060019250925050612bf7565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831660ff84901c601b01612c3a87828885612ae8565b935093505050935093915050565b8260038101928215612c76579160200282015b82811115612c76578251825591602001919060010190612c5b565b50612c82929150612ca4565b5090565b60405180606001604052806003906020820280368337509192915050565b5b80821115612c825760008155600101612ca5565b803573ffffffffffffffffffffffffffffffffffffffff81168114612cdd57600080fd5b919050565b600082601f830112612cf357600080fd5b6040516060810181811067ffffffffffffffff82111715612d1657612d16613461565b604052808360608101861015612d2b57600080fd5b60005b6003811015612d4d578135835260209283019290910190600101612d2e565b509195945050505050565b80356fffffffffffffffffffffffffffffffff81168114612cdd57600080fd5b600060208284031215612d8a57600080fd5b61172482612cb9565b60008060808385031215612da657600080fd5b612daf83612cb9565b9150612dbe8460208501612ce2565b90509250929050565b60008060408385031215612dda57600080fd5b612de383612cb9565b946020939093013593505050565b600080600060a08486031215612e0657600080fd5b612e108585612ce2565b9250606084013591506080840135612e2781613490565b809150509250925092565b600060208284031215612e4457600080fd5b815161172481613490565b600060208284031215612e6157600080fd5b5035919050565b60008060408385031215612e7b57600080fd5b82359150612dbe60208401612cb9565b60008060408385031215612e9e57600080fd5b50508035926020909101359150565b600060208284031215612ebf57600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461172457600080fd5b600060208284031215612f0157600080fd5b61172482612d58565b60008060408385031215612f1d57600080fd5b612f2683612d58565b9150612dbe60208401612d58565b600060208284031215612f4657600080fd5b5051919050565b600080600080600060e08688031215612f6557600080fd5b853594506020612f76818801612cb9565b9450612f8460408801612cb9565b9350612f938860608901612ce2565b925060c087013567ffffffffffffffff80821115612fb057600080fd5b818901915089601f830112612fc457600080fd5b813581811115612fd657612fd6613461565b613006847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601613215565b91508082528a8482850101111561301c57600080fd5b80848401858401376000848284010152508093505050509295509295909350565b8060005b6003811015613060578151845260209384019390910190600101613041565b50505050565b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008360601b1681526000601482018360005b60038110156130b7578151835260209283019290910190600101613098565b5050506074820190509392505050565b600082516130d981846020870161330b565b9190910192915050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161311b81601785016020880161330b565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161315881602884016020880161330b565b01602801949350505050565b60608101818360005b600381101561318e578151151583526020928301929091019060010161316d565b50505092915050565b60608101610698828461303d565b60a081016131b3828661303d565b606082019390935260800152919050565b60208152600082518060208401526131e381604085016020870161330b565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561325c5761325c613461565b604052919050565b60008219821115613277576132776133a5565b500190565b6000826132b2577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156132ef576132ef6133a5565b500290565b600082821015613306576133066133a5565b500390565b60005b8381101561332657818101518382015260200161330e565b838111156130605750506000910152565b600081613346576133466133a5565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561339e5761339e6133a5565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b801515811461287857600080fdfea26469706673582212203446fcfc37b7c5469c50f812c77b4eae62eb2a3e8cce3cb2e97ee642fb612f3664736f6c63430008070033

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

00000000000000000000000041ab1b6fcbb2fa9dced81acbdec13ea6315f2bf20000000000000000000000003a6b1dbf58b0d816fe4ab16f973a064c01602217000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000152d02c7e14af6800000

-----Decoded View---------------
Arg [0] : _tokenAddress (address): 0x41AB1b6fcbB2fA9DCEd81aCbdeC13Ea6315F2Bf2
Arg [1] : validatorAddress (address): 0x3A6B1DBF58B0d816fE4AB16f973a064c01602217
Arg [2] : _swapRatios (uint128[3]): 1,3,5
Arg [3] : _swapEnabled (bool[3]): True,False,False
Arg [4] : _minSwapAmountPerTx (uint256): 0
Arg [5] : _maxSwapAmountPerTx (uint256): 100000000000000000000000

-----Encoded View---------------
10 Constructor Arguments found :
Arg [0] : 00000000000000000000000041ab1b6fcbb2fa9dced81acbdec13ea6315f2bf2
Arg [1] : 0000000000000000000000003a6b1dbf58b0d816fe4ab16f973a064c01602217
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [9] : 00000000000000000000000000000000000000000000152d02c7e14af6800000


Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.