ETH Price: $1,902.84 (-0.10%)

Contract

0xB5CF096A406C1D5297D2493073168F44EB4a1A1d

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

Parent Transaction Hash Block From To
View All Internal Transactions

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ERC20BridgedPermit

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 100000 runs

Other Settings:
default evmVersion
File 1 of 17 : ERC20BridgedPermit.sol
// SPDX-FileCopyrightText: 2024 OpenZeppelin, Lido <[email protected]>
// SPDX-License-Identifier: GPL-3.0

pragma solidity 0.8.10;

import {ERC20Bridged} from "./ERC20Bridged.sol";
import {PermitExtension} from "./PermitExtension.sol";
import {Versioned} from "../utils/Versioned.sol";

/// @author kovalgek
/// @notice extends ERC20Bridged functionality that allows to use permits and versioning.
contract ERC20BridgedPermit is ERC20Bridged, PermitExtension, Versioned {

    /// @param name_ The name of the token
    /// @param symbol_ The symbol of the token
    /// @param version_ The current major version of the signing domain (aka token version)
    /// @param decimals_ The decimals places of the token
    /// @param bridge_ The bridge address which allows to mint/burn tokens
    constructor(
        string memory name_,
        string memory symbol_,
        string memory version_,
        uint8 decimals_,
        address bridge_
    )
        ERC20Bridged(name_, symbol_, decimals_, bridge_)
        PermitExtension(name_, version_)
    {
    }

    /// @notice Initializes the contract from scratch.
    /// @param name_ The name of the token
    /// @param symbol_ The symbol of the token
    /// @param version_ The version of the token
    function initialize(string memory name_, string memory symbol_, string memory version_) external {
        if (_isMetadataInitialized()) {
            revert ErrorMetadataIsAlreadyInitialized();
        }
        _initializeERC20Metadata(name_, symbol_);
        _initialize_v2(name_, version_);
    }

    /// @notice A function to finalize upgrade to v2 (from v1).
    function finalizeUpgrade_v2(string memory name_, string memory version_) external {
        if (!_isMetadataInitialized()) {
            revert ErrorMetadataIsNotInitialized();
        }
        _initialize_v2(name_, version_);
    }

    function _initialize_v2(string memory name_, string memory version_) internal {
        _initializeContractVersionTo(2);
        _initializeEIP5267Metadata(name_, version_);
    }

    /// @inheritdoc PermitExtension
    function _permitAccepted(address owner_, address spender_, uint256 amount_) internal override {
        _approve(owner_, spender_, amount_);
    }

    error ErrorMetadataIsNotInitialized();
    error ErrorMetadataIsAlreadyInitialized();
}

File 2 of 17 : draft-IERC2612.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/draft-IERC2612.sol)

pragma solidity ^0.8.0;

import "../token/ERC20/extensions/draft-IERC20Permit.sol";

interface IERC2612 is IERC20Permit {}

File 3 of 17 : IERC1271.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC1271 standard signature validation method for
 * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].
 *
 * _Available since v4.1._
 */
interface IERC1271 {
    /**
     * @dev Should return whether the signature provided is valid for the provided data
     * @param hash      Hash of the data to be signed
     * @param signature Signature byte array associated with _data
     */
    function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);
}

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 7 of 17 : draft-EIP712.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)

pragma solidity ^0.8.0;

import "./ECDSA.sol";

/**
 * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
 *
 * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,
 * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding
 * they need in their contracts using a combination of `abi.encode` and `keccak256`.
 *
 * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
 * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
 * ({_hashTypedDataV4}).
 *
 * The implementation of the domain separator was designed to be as efficient as possible while still properly updating
 * the chain id to protect against replay attacks on an eventual fork of the chain.
 *
 * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
 * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
 *
 * _Available since v3.4._
 */
abstract contract EIP712 {
    /* solhint-disable var-name-mixedcase */
    // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to
    // invalidate the cached domain separator if the chain id changes.
    bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;
    uint256 private immutable _CACHED_CHAIN_ID;
    address private immutable _CACHED_THIS;

    bytes32 private immutable _HASHED_NAME;
    bytes32 private immutable _HASHED_VERSION;
    bytes32 private immutable _TYPE_HASH;

    /* solhint-enable var-name-mixedcase */

    /**
     * @dev Initializes the domain separator and parameter caches.
     *
     * The meaning of `name` and `version` is specified in
     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:
     *
     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
     * - `version`: the current major version of the signing domain.
     *
     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
     * contract upgrade].
     */
    constructor(string memory name, string memory version) {
        bytes32 hashedName = keccak256(bytes(name));
        bytes32 hashedVersion = keccak256(bytes(version));
        bytes32 typeHash = keccak256(
            "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
        );
        _HASHED_NAME = hashedName;
        _HASHED_VERSION = hashedVersion;
        _CACHED_CHAIN_ID = block.chainid;
        _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);
        _CACHED_THIS = address(this);
        _TYPE_HASH = typeHash;
    }

    /**
     * @dev Returns the domain separator for the current chain.
     */
    function _domainSeparatorV4() internal view returns (bytes32) {
        if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) {
            return _CACHED_DOMAIN_SEPARATOR;
        } else {
            return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);
        }
    }

    function _buildDomainSeparator(
        bytes32 typeHash,
        bytes32 nameHash,
        bytes32 versionHash
    ) private view returns (bytes32) {
        return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));
    }

    /**
     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
     * function returns the hash of the fully encoded EIP712 message for this domain.
     *
     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
     *
     * ```solidity
     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
     *     keccak256("Mail(address to,string contents)"),
     *     mailTo,
     *     keccak256(bytes(mailContents))
     * )));
     * address signer = ECDSA.recover(digest, signature);
     * ```
     */
    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
        return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);
    }
}

File 8 of 17 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @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 = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 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 Message, created from `s`. 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(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

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

File 9 of 17 : SignatureChecker.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/SignatureChecker.sol)

pragma solidity ^0.8.0;

import "./ECDSA.sol";
import "../Address.sol";
import "../../interfaces/IERC1271.sol";

/**
 * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA
 * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like
 * Argent and Gnosis Safe.
 *
 * _Available since v4.1._
 */
library SignatureChecker {
    /**
     * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the
     * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`.
     *
     * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus
     * change through time. It could return true at block N and false at block N+1 (or the opposite).
     */
    function isValidSignatureNow(
        address signer,
        bytes32 hash,
        bytes memory signature
    ) internal view returns (bool) {
        (address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover(hash, signature);
        if (error == ECDSA.RecoverError.NoError && recovered == signer) {
            return true;
        }

        (bool success, bytes memory result) = signer.staticcall(
            abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature)
        );
        return (success && result.length == 32 && abi.decode(result, (bytes4)) == IERC1271.isValidSignature.selector);
    }
}

File 10 of 17 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

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

File 11 of 17 : UnstructuredRefStorage.sol
// SPDX-FileCopyrightText: 2024 Lido <[email protected]>
// SPDX-License-Identifier: GPL-3.0

pragma solidity 0.8.10;

/// @dev A copy of UnstructuredRefStorage.sol library from Lido on Ethereum protocol.
///      https://github.com/lidofinance/lido-dao/blob/master/contracts/0.8.9/lib/UnstructuredRefStorage.sol
library UnstructuredRefStorage {
    function storageMapAddressMapAddressUint256(bytes32 _position) internal pure returns (
        mapping(address => mapping(address => uint256)) storage result
    ) {
        assembly { result.slot := _position }
    }

    function storageMapAddressAddressUint256(bytes32 _position) internal pure returns (
        mapping(address => uint256) storage result
    ) {
        assembly { result.slot := _position }
    }
}

File 12 of 17 : UnstructuredStorage.sol
// SPDX-FileCopyrightText: 2024 Lido <[email protected]>
// SPDX-License-Identifier: GPL-3.0

pragma solidity 0.8.10;

/// @dev A copy of UnstructuredStorage.sol library from Lido on Ethereum protocol.
///      https://github.com/lidofinance/lido-dao/blob/master/contracts/0.8.9/lib/UnstructuredStorage.sol
library UnstructuredStorage {
    function getStorageBool(bytes32 position) internal view returns (bool data) {
        assembly { data := sload(position) }
    }

    function getStorageUint256(bytes32 position) internal view returns (uint256 data) {
        assembly { data := sload(position) }
    }

    function setStorageBool(bytes32 position, bool data) internal {
        assembly { sstore(position, data) }
    }

    function setStorageUint256(bytes32 position, uint256 data) internal {
        assembly { sstore(position, data) }
    }
}

File 13 of 17 : ERC20Bridged.sol
// SPDX-FileCopyrightText: 2024 Lido <[email protected]>
// SPDX-License-Identifier: GPL-3.0

pragma solidity 0.8.10;

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {ERC20Core} from "./ERC20Core.sol";
import {ERC20Metadata} from "./ERC20Metadata.sol";

/// @author psirex, kovalgek
/// @notice Extends the ERC20 functionality that allows the bridge to mint/burn tokens
interface IERC20Bridged is IERC20 {
    /// @notice Returns bridge which can mint and burn tokens on L2
    function bridge() external view returns (address);

    /// @notice Creates `amount_` tokens and assigns them to `account_`, increasing the total supply
    /// @param account_ An address of the account to mint tokens
    /// @param amount_ An amount of tokens to mint
    function bridgeMint(address account_, uint256 amount_) external;

    /// @notice Destroys `amount_` tokens from `account_`, reducing the total supply
    /// @param account_ An address of the account to burn tokens
    /// @param amount_ An amount of tokens to burn
    function bridgeBurn(address account_, uint256 amount_) external;
}

/// @author psirex, kovalgek
/// @notice Extends the ERC20 functionality that allows the bridge to mint/burn tokens
contract ERC20Bridged is IERC20Bridged, ERC20Core, ERC20Metadata {
    /// @inheritdoc IERC20Bridged
    address public immutable bridge;

    /// @param name_ The name of the token
    /// @param symbol_ The symbol of the token
    /// @param decimals_ The decimals places of the token
    /// @param bridge_ The bridge address which allows to mint/burn tokens
    constructor(
        string memory name_,
        string memory symbol_,
        uint8 decimals_,
        address bridge_
    ) ERC20Metadata(name_, symbol_, decimals_) {
        if (bridge_ == address(0)) {
            revert ErrorZeroAddressBridge();
        }
        bridge = bridge_;
    }

    /// @inheritdoc IERC20Bridged
    function bridgeMint(address account_, uint256 amount_) external onlyBridge {
        _mint(account_, amount_);
    }

    /// @inheritdoc IERC20Bridged
    function bridgeBurn(address account_, uint256 amount_) external onlyBridge {
        _burn(account_, amount_);
    }

    /// @notice Sets the name and the symbol of the tokens if they both are empty
    /// @param name_ The name of the token
    /// @param symbol_ The symbol of the token
    function _initializeERC20Metadata(string memory name_, string memory symbol_) internal {
        _setERC20MetadataName(name_);
        _setERC20MetadataSymbol(symbol_);
    }

    /// @dev Validates that sender of the transaction is the bridge
    modifier onlyBridge() {
        if (msg.sender != bridge) {
            revert ErrorNotBridge();
        }
        _;
    }

    error ErrorZeroAddressBridge();
    error ErrorNotBridge();
}

File 14 of 17 : ERC20Core.sol
// SPDX-FileCopyrightText: 2022 Lido <[email protected]>
// SPDX-License-Identifier: GPL-3.0

pragma solidity 0.8.10;

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

/// @author psirex
/// @notice Contains the required logic of the ERC20 standard as defined in the EIP. Additionally
///     provides methods for direct allowance increasing/decreasing.
contract ERC20Core is IERC20 {
    /// @inheritdoc IERC20
    uint256 public totalSupply;

    /// @inheritdoc IERC20
    mapping(address => uint256) public balanceOf;

    /// @inheritdoc IERC20
    mapping(address => mapping(address => uint256)) public allowance;

    /// @inheritdoc IERC20
    function approve(address spender_, uint256 amount_)
        external
        returns (bool)
    {
        _approve(msg.sender, spender_, amount_);
        return true;
    }

    /// @inheritdoc IERC20
    function transfer(address to_, uint256 amount_) external returns (bool) {
        _transfer(msg.sender, to_, amount_);
        return true;
    }

    /// @inheritdoc IERC20
    function transferFrom(
        address from_,
        address to_,
        uint256 amount_
    ) external returns (bool) {
        _spendAllowance(from_, msg.sender, amount_);
        _transfer(from_, to_, amount_);
        return true;
    }

    /// @dev Moves amount_ of tokens from sender_ to recipient_
    /// @param from_ An address of the sender of the tokens
    /// @param to_  An address of the recipient of the tokens
    /// @param amount_ An amount of tokens to transfer
    function _transfer(
        address from_,
        address to_,
        uint256 amount_
    ) internal onlyNonZeroAccount(from_) onlyNonZeroAccount(to_) {
        _decreaseBalance(from_, amount_);
        balanceOf[to_] += amount_;
        emit Transfer(from_, to_, amount_);
    }

    /// @dev Updates owner_'s allowance for spender_ based on spent amount_. Does not update
    ///     the allowance amount in case of infinite allowance
    /// @param owner_ An address of the account to spend allowance
    /// @param spender_  An address of the spender of the tokens
    /// @param amount_ An amount of allowance spend
    function _spendAllowance(
        address owner_,
        address spender_,
        uint256 amount_
    ) internal {
        uint256 currentAllowance = allowance[owner_][spender_];
        if (currentAllowance == type(uint256).max) {
            return;
        }
        if (amount_ > currentAllowance) {
            revert ErrorNotEnoughAllowance();
        }
        unchecked {
            _approve(owner_, spender_, currentAllowance - amount_);
        }
    }

    /// @dev Sets amount_ as the allowance of spender_ over the owner_'s tokens
    /// @param owner_ An address of the account to set allowance
    /// @param spender_  An address of the tokens spender
    /// @param amount_ An amount of tokens to allow to spend
    function _approve(
        address owner_,
        address spender_,
        uint256 amount_
    ) internal virtual onlyNonZeroAccount(owner_) onlyNonZeroAccount(spender_) {
        allowance[owner_][spender_] = amount_;
        emit Approval(owner_, spender_, amount_);
    }

    /// @dev Creates amount_ tokens and assigns them to account_, increasing the total supply
    /// @param account_ An address of the account to mint tokens
    /// @param amount_ An amount of tokens to mint
    function _mint(address account_, uint256 amount_)
        internal
        onlyNonZeroAccount(account_)
    {
        totalSupply += amount_;
        balanceOf[account_] += amount_;
        emit Transfer(address(0), account_, amount_);
    }

    /// @dev Destroys amount_ tokens from account_, reducing the total supply.
    /// @param account_ An address of the account to mint tokens
    /// @param amount_ An amount of tokens to mint
    function _burn(address account_, uint256 amount_)
        internal
        onlyNonZeroAccount(account_)
    {
        _decreaseBalance(account_, amount_);
        totalSupply -= amount_;
        emit Transfer(account_, address(0), amount_);
    }

    /// @dev Decreases the balance of the account_
    /// @param account_ An address of the account to decrease balance
    /// @param amount_ An amount of balance decrease
    function _decreaseBalance(address account_, uint256 amount_) internal {
        uint256 balance = balanceOf[account_];

        if (amount_ > balance) {
            revert ErrorNotEnoughBalance();
        }
        unchecked {
            balanceOf[account_] = balance - amount_;
        }
    }

    /// @dev validates that account_ is not zero address
    modifier onlyNonZeroAccount(address account_) {
        if (account_ == address(0)) {
            revert ErrorAccountIsZeroAddress();
        }
        _;
    }

    error ErrorNotEnoughBalance();
    error ErrorNotEnoughAllowance();
    error ErrorAccountIsZeroAddress();
}

File 15 of 17 : ERC20Metadata.sol
// SPDX-FileCopyrightText: 2022 Lido <[email protected]>
// SPDX-License-Identifier: GPL-3.0

pragma solidity 0.8.10;

/// @author psirex
/// @notice Interface for the optional metadata functions from the ERC20 standard.
interface IERC20Metadata {
    /// @dev Returns the name of the token.
    function name() external view returns (string memory);

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

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

/// @author psirex
/// @notice Contains the optional metadata functions from the ERC20 standard
/// @dev Uses the UnstructuredStorage pattern to store dynamic name and symbol data. Might be used
///     with the upgradable proxies
contract ERC20Metadata is IERC20Metadata {
    /// @dev Stores the dynamic metadata of the ERC20 token. Allows safely use of this
    ///     contract with upgradable proxies
    struct DynamicMetadata {
        string name;
        string symbol;
    }

    /// @dev Location of the slot with DynamicMetdata
    ///      The slot's index string has a misspelling, but the contract storage will be broken without it.
    bytes32 private constant DYNAMIC_METADATA_SLOT =
        keccak256("ERC20Metdata.dynamicMetadata");

    /// @inheritdoc IERC20Metadata
    uint8 public immutable decimals;

    /// @param name_ Name of the token
    /// @param symbol_ Symbol of the token
    /// @param decimals_ Decimals places of the token
    constructor(
        string memory name_,
        string memory symbol_,
        uint8 decimals_
    ) {
        if (decimals_ == 0) {
            revert ErrorZeroDecimals();
        }
        decimals = decimals_;
        _setERC20MetadataName(name_);
        _setERC20MetadataSymbol(symbol_);
    }

    /// @inheritdoc IERC20Metadata
    function name() public view returns (string memory) {
        return _loadDynamicMetadata().name;
    }

    /// @inheritdoc IERC20Metadata
    function symbol() public view returns (string memory) {
        return _loadDynamicMetadata().symbol;
    }

    /// @dev Sets the name of the token.
    function _setERC20MetadataName(string memory name_) internal {
        if (bytes(name_).length == 0) {
            revert ErrorNameIsEmpty();
        }
        _loadDynamicMetadata().name = name_;
    }

    /// @dev Sets the symbol of the token.
    function _setERC20MetadataSymbol(string memory symbol_) internal {
        if (bytes(symbol_).length == 0) {
            revert ErrorSymbolIsEmpty();
        }
        _loadDynamicMetadata().symbol = symbol_;
    }

    function _isMetadataInitialized() internal view returns (bool) {
        return bytes(name()).length != 0 && bytes(symbol()).length != 0;
    }

    /// @dev Returns the reference to the slot with DynamicMetadata struct
    function _loadDynamicMetadata()
        private
        pure
        returns (DynamicMetadata storage r)
    {
        bytes32 slot = DYNAMIC_METADATA_SLOT;
        assembly {
            r.slot := slot
        }
    }

    error ErrorZeroDecimals();
    error ErrorNameIsEmpty();
    error ErrorSymbolIsEmpty();
}

File 16 of 17 : PermitExtension.sol
// SPDX-FileCopyrightText: 2024 OpenZeppelin, Lido <[email protected]>
// SPDX-License-Identifier: GPL-3.0

pragma solidity 0.8.10;

import {IERC2612} from "@openzeppelin/contracts/interfaces/draft-IERC2612.sol";
import {EIP712} from "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol";
import {SignatureChecker} from "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol";
import {UnstructuredRefStorage} from "../lib//UnstructuredRefStorage.sol";

/// @author arwer13, kovalgek
abstract contract PermitExtension is IERC2612, EIP712 {
    using UnstructuredRefStorage for bytes32;

    /// @dev Stores the dynamic metadata of the PermitExtension. Allows safely use of this
    ///     contract with upgradable proxies
    struct EIP5267Metadata {
        string name;
        string version;
    }

    /// @dev user nonce slot position.
    bytes32 internal constant NONCE_BY_ADDRESS_POSITION = keccak256("PermitExtension.NONCE_BY_ADDRESS_POSITION");

    /// @dev Typehash constant for ERC-2612 (Permit)
    /// keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)")
    bytes32 internal constant PERMIT_TYPEHASH =
        0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;

    /// @dev Location of the slot with EIP5267Metadata
    bytes32 private constant EIP5267_METADATA_SLOT = keccak256("PermitExtension.eip5267MetadataSlot");

    /// @param name_ The name of the token
    /// @param version_ The current major version of the signing domain (aka token version)
    constructor(string memory name_, string memory version_) EIP712(name_, version_) {
        _initializeEIP5267Metadata(name_, version_);
    }

    /// @notice Sets `value_` as the allowance of `spender_` over `owner_`'s tokens, given `owner_`'s signed approval.
    /// @param owner_  Token owner's address (Authorizer). Cannot be the zero address.
    /// @param spender_  An address of the tokens spender. Cannot be the zero address.
    /// @param value_ An amount of tokens to allow to spend.
    /// @param deadline_ The time at which the signature expires (unix time). Must be a timestamp in the future.
    /// @param v_, r_, s_ must be a valid `secp256k1` signature from `owner`
    ///                   over the EIP712-formatted function arguments.
    ///                   The signature must use ``owner``'s current nonce (see {nonces}).
    function permit(
        address owner_,
        address spender_,
        uint256 value_,
        uint256 deadline_,
        uint8 v_,
        bytes32 r_,
        bytes32 s_
    ) external {
        _permit(owner_, spender_, value_, deadline_, abi.encodePacked(r_, s_, v_));
    }

    /// @notice Sets `value_` as the allowance of `spender_` over `owner_`'s tokens, given `owner_`'s signed approval.
    /// @param owner_  Token owner's address (Authorizer). Cannot be the zero address.
    /// @param spender_  An address of the tokens spender. Cannot be the zero address.
    /// @param value_ An amount of tokens to allow to spend.
    /// @param deadline_ The time at which the signature expires (unix time). Must be a timestamp in the future.
    /// @param signature_ Unstructured bytes signature signed by an EOA wallet or a contract wallet.
    function permit(
        address owner_,
        address spender_,
        uint256 value_,
        uint256 deadline_,
        bytes calldata signature_
    ) external {
        _permit(owner_, spender_, value_, deadline_, signature_);
    }

    function _permit(
        address owner_,
        address spender_,
        uint256 value_,
        uint256 deadline_,
        bytes memory signature_
    ) internal {
        if (block.timestamp > deadline_) {
            revert ErrorDeadlineExpired();
        }

        bytes32 hash = _hashTypedDataV4(
            keccak256(
                abi.encode(PERMIT_TYPEHASH, owner_, spender_, value_, _useNonce(owner_), deadline_)
            )
        );

        if (!SignatureChecker.isValidSignatureNow(owner_, hash, signature_)) {
            revert ErrorInvalidSignature();
        }

        _permitAccepted(owner_, spender_, value_);
    }

    /// @dev Returns the current nonce for `owner`. This value must be
    /// included whenever a signature is generated for {permit}.
    ///
    /// Every successful call to {permit} increases ``owner``'s nonce by one. This
    /// prevents a signature from being used multiple times.
    ///
    function nonces(address owner) external view returns (uint256) {
        return _getNonceByAddress()[owner];
    }

    /// @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32) {
        return _domainSeparatorV4();
    }

    /// @dev EIP-5267. Returns the fields and values that describe the domain separator
    /// used by this contract for EIP-712 signature.
    function eip712Domain()
        external
        view
        virtual
        returns (
            bytes1 fields,
            string memory name,
            string memory version,
            uint256 chainId,
            address verifyingContract,
            bytes32 salt,
            uint256[] memory extensions
        )
    {
        return (
            hex"0f", // 01111
            _loadEIP5267Metadata().name,
            _loadEIP5267Metadata().version,
            block.chainid,
            address(this),
            bytes32(0),
            new uint256[](0)
        );
    }

    /// @notice Sets the name and the version of the tokens if they both are empty
    /// @param name_ The name of the token
    /// @param version_ The version of the token
    function _initializeEIP5267Metadata(string memory name_, string memory version_) internal {
        _setEIP5267MetadataName(name_);
        _setEIP5267MetadataVersion(version_);
    }

    /// @dev "Consume a nonce": return the current value and increment.
    function _useNonce(address _owner) internal returns (uint256 current) {
        current = _getNonceByAddress()[_owner];
        _getNonceByAddress()[_owner] = current + 1;
    }

    /// @notice Nonces for ERC-2612 (Permit)
    function _getNonceByAddress() internal pure returns (mapping(address => uint256) storage) {
        return NONCE_BY_ADDRESS_POSITION.storageMapAddressAddressUint256();
    }

    /// @dev Override this function in the inherited contract to invoke the approve() function of ERC20.
    function _permitAccepted(address owner_, address spender_, uint256 amount_) internal virtual;

    /// @dev Sets the name of the token. Might be called only when the name is empty
    function _setEIP5267MetadataName(string memory name_) internal {
        _loadEIP5267Metadata().name = name_;
    }

    /// @dev Sets the version of the token. Might be called only when the version is empty
    function _setEIP5267MetadataVersion(string memory version_) internal {
        _loadEIP5267Metadata().version = version_;
    }

    /// @dev Returns the reference to the slot with EIP5267Metadata struct
    function _loadEIP5267Metadata() private pure returns (EIP5267Metadata storage r) {
        bytes32 slot = EIP5267_METADATA_SLOT;
        assembly {
            r.slot := slot
        }
    }

    error ErrorInvalidSignature();
    error ErrorDeadlineExpired();
}

File 17 of 17 : Versioned.sol
// SPDX-FileCopyrightText: 2022 Lido <[email protected]>
// SPDX-License-Identifier: GPL-3.0

pragma solidity 0.8.10;

import {UnstructuredStorage} from "../lib/UnstructuredStorage.sol";

/// @dev A copy of Versioned.sol contract from Lido on Ethereum protocol
///      https://github.com/lidofinance/lido-dao/blob/master/contracts/0.8.9/utils/Versioned.sol
contract Versioned {
    using UnstructuredStorage for bytes32;

    event ContractVersionSet(uint256 version);

    error NonZeroContractVersionOnInit();
    error InvalidContractVersionIncrement();
    error UnexpectedContractVersion(uint256 expected, uint256 received);

    /// @dev Storage slot: uint256 version
    /// Version of the initialized contract storage.
    /// The version stored in CONTRACT_VERSION_POSITION equals to:
    /// - 0 right after the deployment, before an initializer is invoked (and only at that moment);
    /// - N after calling initialize(), where N is the initially deployed contract version;
    /// - N after upgrading contract by calling finalizeUpgrade_vN().
    bytes32 internal constant CONTRACT_VERSION_POSITION = keccak256("lido.Versioned.contractVersion");

    uint256 internal constant PETRIFIED_VERSION_MARK = type(uint256).max;

    constructor() {
        // lock version in the implementation's storage to prevent initialization
        CONTRACT_VERSION_POSITION.setStorageUint256(PETRIFIED_VERSION_MARK);
    }

    /// @notice Returns the current contract version.
    function getContractVersion() public view returns (uint256) {
        return CONTRACT_VERSION_POSITION.getStorageUint256();
    }

    function _checkContractVersion(uint256 version) internal view {
        uint256 expectedVersion = getContractVersion();
        if (version != expectedVersion) {
            revert UnexpectedContractVersion(expectedVersion, version);
        }
    }

    /// @dev Sets the contract version to N. Should be called from the initialize() function.
    function _initializeContractVersionTo(uint256 version) internal {
        if (getContractVersion() != 0) revert NonZeroContractVersionOnInit();
        _setContractVersion(version);
    }

    /// @dev Updates the contract version. Should be called from a finalizeUpgrade_vN() function.
    function _updateContractVersion(uint256 newVersion) internal {
        if (newVersion != getContractVersion() + 1) revert InvalidContractVersionIncrement();
        _setContractVersion(newVersion);
    }

    function _setContractVersion(uint256 version) private {
        CONTRACT_VERSION_POSITION.setStorageUint256(version);
        emit ContractVersionSet(version);
    }
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"string","name":"version_","type":"string"},{"internalType":"uint8","name":"decimals_","type":"uint8"},{"internalType":"address","name":"bridge_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ErrorAccountIsZeroAddress","type":"error"},{"inputs":[],"name":"ErrorDeadlineExpired","type":"error"},{"inputs":[],"name":"ErrorInvalidSignature","type":"error"},{"inputs":[],"name":"ErrorMetadataIsAlreadyInitialized","type":"error"},{"inputs":[],"name":"ErrorMetadataIsNotInitialized","type":"error"},{"inputs":[],"name":"ErrorNameIsEmpty","type":"error"},{"inputs":[],"name":"ErrorNotBridge","type":"error"},{"inputs":[],"name":"ErrorNotEnoughAllowance","type":"error"},{"inputs":[],"name":"ErrorNotEnoughBalance","type":"error"},{"inputs":[],"name":"ErrorSymbolIsEmpty","type":"error"},{"inputs":[],"name":"ErrorZeroAddressBridge","type":"error"},{"inputs":[],"name":"ErrorZeroDecimals","type":"error"},{"inputs":[],"name":"InvalidContractVersionIncrement","type":"error"},{"inputs":[],"name":"NonZeroContractVersionOnInit","type":"error"},{"inputs":[{"internalType":"uint256","name":"expected","type":"uint256"},{"internalType":"uint256","name":"received","type":"uint256"}],"name":"UnexpectedContractVersion","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"version","type":"uint256"}],"name":"ContractVersionSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bridge","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"bridgeBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"bridgeMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"version_","type":"string"}],"name":"finalizeUpgrade_v2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getContractVersion","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"string","name":"version_","type":"string"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"},{"internalType":"address","name":"spender_","type":"address"},{"internalType":"uint256","name":"value_","type":"uint256"},{"internalType":"uint256","name":"deadline_","type":"uint256"},{"internalType":"bytes","name":"signature_","type":"bytes"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"},{"internalType":"address","name":"spender_","type":"address"},{"internalType":"uint256","name":"value_","type":"uint256"},{"internalType":"uint256","name":"deadline_","type":"uint256"},{"internalType":"uint8","name":"v_","type":"uint8"},{"internalType":"bytes32","name":"r_","type":"bytes32"},{"internalType":"bytes32","name":"s_","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from_","type":"address"},{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]

6101806040523480156200001257600080fd5b506040516200248f3803806200248f8339810160408190526200003591620003eb565b848381818188878783838360ff81166200006257604051635b15e36d60e11b815260040160405180910390fd5b60ff81166080526200007483620001a5565b6200007f82620001ec565b5050506001600160a01b038116620000aa576040516326ffb7d960e21b815260040160405180910390fd5b6001600160a01b031660a090815285516020968701208551958701959095206101208690526101408190524660e0819052604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818b018190528183019990995260608101939093526080830191909152308284018190528151808403909401845260c092830190915282519290970191909120905250505061010091909152610160526200015c828262000236565b50506200019a6000197f4dd0f6662ba1d6b081f08b350f5e9a6a7b15cf586926ba66f753594928fa64a66200025d60201b6200091f1790919060201c565b5050505050620004f6565b8051620001c55760405163348120a360e01b815260040160405180910390fd5b806000805160206200244f8339815191525b8151620001e8926020019062000278565b5050565b80516200020c5760405163a02a947f60e01b815260040160405180910390fd5b806000805160206200244f8339815191525b6001019080519060200190620001e892919062000278565b620002418262000261565b620001e881806000805160206200246f8339815191526200021e565b9055565b806000805160206200246f833981519152620001d7565b8280546200028690620004b9565b90600052602060002090601f016020900481019282620002aa5760008555620002f5565b82601f10620002c557805160ff1916838001178555620002f5565b82800160010185558215620002f5579182015b82811115620002f5578251825591602001919060010190620002d8565b506200030392915062000307565b5090565b5b8082111562000303576000815560010162000308565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200034657600080fd5b81516001600160401b03808211156200036357620003636200031e565b604051601f8301601f19908116603f011681019082821181831017156200038e576200038e6200031e565b81604052838152602092508683858801011115620003ab57600080fd5b600091505b83821015620003cf5785820183015181830184015290820190620003b0565b83821115620003e15760008385830101525b9695505050505050565b600080600080600060a086880312156200040457600080fd5b85516001600160401b03808211156200041c57600080fd5b6200042a89838a0162000334565b965060208801519150808211156200044157600080fd5b6200044f89838a0162000334565b955060408801519150808211156200046657600080fd5b50620004758882890162000334565b935050606086015160ff811681146200048d57600080fd5b60808701519092506001600160a01b0381168114620004ab57600080fd5b809150509295509295909350565b600181811c90821680620004ce57607f821691505b60208210811415620004f057634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05160e05161010051610120516101405161016051611ee56200056a6000396000610cb601526000610d0501526000610ce001526000610c3901526000610c6301526000610c8d01526000818161037401528181610518015261076e015260006101e10152611ee56000f3fe608060405234801561001057600080fd5b506004361061016c5760003560e01c806384b0196e116100cd578063a6487c5311610081578063d505accf11610066578063d505accf14610331578063dd62ed3e14610344578063e78cea921461036f57600080fd5b8063a6487c531461030b578063a9059cbb1461031e57600080fd5b80638c2a993e116100b25780638c2a993e146102dd57806395d89b41146102f05780639fd5a6cf146102f857600080fd5b806384b0196e146102ba5780638aa10435146102d557600080fd5b80633644e5151161012457806371a4f22b1161010957806371a4f22b1461023d57806374f4f547146102525780637ecebe001461026557600080fd5b80633644e5151461021557806370a082311461021d57600080fd5b806318160ddd1161015557806318160ddd146101b257806323b872dd146101c9578063313ce567146101dc57600080fd5b806306fdde0314610171578063095ea7b31461018f575b600080fd5b6101796103bb565b60405161018691906118c1565b60405180910390f35b6101a261019d3660046118fd565b61046c565b6040519015158152602001610186565b6101bb60005481565b604051908152602001610186565b6101a26101d7366004611927565b610482565b6102037f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff9091168152602001610186565b6101bb6104a5565b6101bb61022b366004611963565b60016020526000908152604090205481565b61025061024b366004611a58565b6104b4565b005b6102506102603660046118fd565b610500565b6101bb610273366004611963565b73ffffffffffffffffffffffffffffffffffffffff1660009081527fdaad28896b706a809236aec38dc84ce99b9d9cf68b8751e946a9258d6de2c8f1602052604090205490565b6102c2610579565b6040516101869796959493929190611abc565b6101bb61072c565b6102506102eb3660046118fd565b610756565b6101796107cf565b610250610306366004611b7b565b610800565b610250610319366004611c21565b61084b565b6101a261032c3660046118fd565b6108a3565b61025061033f366004611ca9565b6108b0565b6101bb610352366004611d1c565b600260209081526000928352604080842090915290825290205481565b6103967f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610186565b60607f3470f8373d566de7ab61e14a030ae865a1f164b610b931eb8aa08ad044e2e68e80546103e990611d4f565b80601f016020809104026020016040519081016040528092919081815260200182805461041590611d4f565b80156104625780601f1061043757610100808354040283529160200191610462565b820191906000526020600020905b81548152906001019060200180831161044557829003601f168201915b5050505050905090565b6000610479338484610923565b50600192915050565b600061048f843384610a30565b61049a848484610ade565b5060015b9392505050565b60006104af610c1f565b905090565b6104bc610d53565b6104f2576040517f7f3c77d300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104fc8282610d77565b5050565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461056f576040517fb5f1e21f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104fc8282610d8b565b6000606080828080837f056ad441bfb3f4908fe527102b709e6e33a099187a55402844d65a5cc26af2198060010146306000806040519080825280602002602001820160405280156105d5578160200160208202803683370190505b507f0f0000000000000000000000000000000000000000000000000000000000000095949392919085805461060990611d4f565b80601f016020809104026020016040519081016040528092919081815260200182805461063590611d4f565b80156106825780601f1061065757610100808354040283529160200191610682565b820191906000526020600020905b81548152906001019060200180831161066557829003601f168201915b5050505050955084805461069590611d4f565b80601f01602080910402602001604051908101604052809291908181526020018280546106c190611d4f565b801561070e5780601f106106e35761010080835404028352916020019161070e565b820191906000526020600020905b8154815290600101906020018083116106f157829003601f168201915b50505050509450965096509650965096509650965090919293949596565b60006104af7f4dd0f6662ba1d6b081f08b350f5e9a6a7b15cf586926ba66f753594928fa64a65490565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146107c5576040517fb5f1e21f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104fc8282610e4d565b60607f3470f8373d566de7ab61e14a030ae865a1f164b610b931eb8aa08ad044e2e68e60010180546103e990611d4f565b6108438686868686868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610f3692505050565b505050505050565b610853610d53565b1561088a576040517fbcab4d2f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108948383611050565b61089e8382610d77565b505050565b6000610479338484610ade565b6109168787878786868960405160200161090293929190928352602083019190915260f81b7fff0000000000000000000000000000000000000000000000000000000000000016604082015260410190565b604051602081830303815290604052610f36565b50505050505050565b9055565b8273ffffffffffffffffffffffffffffffffffffffff8116610971576040517fef6b416200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff81166109bf576040517fef6b416200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff85811660008181526002602090815260408083209489168084529482529182902087905590518681527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a35050505050565b73ffffffffffffffffffffffffffffffffffffffff8084166000908152600260209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811415610a915750505050565b80821115610acb576040517fc213972500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ad88484848403610923565b50505050565b8273ffffffffffffffffffffffffffffffffffffffff8116610b2c576040517fef6b416200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff8116610b7a576040517fef6b416200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b848584611062565b73ffffffffffffffffffffffffffffffffffffffff841660009081526001602052604081208054859290610bb9908490611dd2565b925050819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051610a2191815260200190565b60003073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148015610c8557507f000000000000000000000000000000000000000000000000000000000000000046145b15610caf57507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6000610d5d6103bb565b51158015906104af5750610d6f6107cf565b511515905090565b610d8160026110ed565b6104fc8282611138565b8173ffffffffffffffffffffffffffffffffffffffff8116610dd9576040517fef6b416200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610de38383611062565b81600080828254610df49190611dea565b909155505060405182815260009073ffffffffffffffffffffffffffffffffffffffff8516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020015b60405180910390a3505050565b8173ffffffffffffffffffffffffffffffffffffffff8116610e9b576040517fef6b416200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600080828254610eac9190611dd2565b909155505073ffffffffffffffffffffffffffffffffffffffff831660009081526001602052604081208054849290610ee6908490611dd2565b909155505060405182815273ffffffffffffffffffffffffffffffffffffffff8416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610e40565b81421115610f70576040517f6015a46400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006110027f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9878787610fa28361114a565b60408051602081019690965273ffffffffffffffffffffffffffffffffffffffff94851690860152929091166060840152608083015260a082015260c0810185905260e001604051602081830303815290604052805190602001206111e7565b905061100f868284611256565b611045576040517f3f88fec700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610843868686611445565b61105982611450565b6104fc816114ba565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260016020526040902054808211156110c1576040517eb284f200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff909216600090815260016020526040902091039055565b6110f561072c565b1561112c576040517f61394a8400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6111358161152b565b50565b6111418261158a565b6104fc816115b1565b73ffffffffffffffffffffffffffffffffffffffff811660009081527fdaad28896b706a809236aec38dc84ce99b9d9cf68b8751e946a9258d6de2c8f1602052604090205461119a816001611dd2565b73ffffffffffffffffffffffffffffffffffffffff9290921660009081527fdaad28896b706a809236aec38dc84ce99b9d9cf68b8751e946a9258d6de2c8f1602052604090209190915590565b60006112506111f4610c1f565b836040517f19010000000000000000000000000000000000000000000000000000000000006020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b92915050565b600080600061126585856115d8565b9092509050600081600481111561127e5761127e611e01565b1480156112b657508573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b156112c65760019250505061049e565b6000808773ffffffffffffffffffffffffffffffffffffffff16631626ba7e60e01b88886040516024016112fb929190611e30565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290516113849190611e51565b600060405180830381855afa9150503d80600081146113bf576040519150601f19603f3d011682016040523d82523d6000602084013e6113c4565b606091505b50915091508180156113d7575080516020145b8015611439575080517f1626ba7e00000000000000000000000000000000000000000000000000000000906114159083016020908101908401611e6d565b7fffffffff0000000000000000000000000000000000000000000000000000000016145b98975050505050505050565b61089e838383610923565b8051611488576040517f348120a300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b807f3470f8373d566de7ab61e14a030ae865a1f164b610b931eb8aa08ad044e2e68e5b81516104fc92602001906117b2565b80516114f2576040517fa02a947f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b807f3470f8373d566de7ab61e14a030ae865a1f164b610b931eb8aa08ad044e2e68e5b60010190805190602001906104fc9291906117b2565b6115547f4dd0f6662ba1d6b081f08b350f5e9a6a7b15cf586926ba66f753594928fa64a6829055565b6040518181527ffddcded6b4f4730c226821172046b48372d3cd963c159701ae1b7c3bcac541bb9060200160405180910390a150565b807f056ad441bfb3f4908fe527102b709e6e33a099187a55402844d65a5cc26af2196114ab565b807f056ad441bfb3f4908fe527102b709e6e33a099187a55402844d65a5cc26af219611515565b60008082516041141561160f5760208301516040840151606085015160001a61160387828585611648565b94509450505050611641565b825160401415611639576020830151604084015161162e868383611760565b935093505050611641565b506000905060025b9250929050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561167f5750600090506003611757565b8460ff16601b1415801561169757508460ff16601c14155b156116a85750600090506004611757565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156116fc573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811661175057600060019250925050611757565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83168161179660ff86901c601b611dd2565b90506117a487828885611648565b935093505050935093915050565b8280546117be90611d4f565b90600052602060002090601f0160209004810192826117e05760008555611826565b82601f106117f957805160ff1916838001178555611826565b82800160010185558215611826579182015b8281111561182657825182559160200191906001019061180b565b50611832929150611836565b5090565b5b808211156118325760008155600101611837565b60005b8381101561186657818101518382015260200161184e565b83811115610ad85750506000910152565b6000815180845261188f81602086016020860161184b565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061049e6020830184611877565b803573ffffffffffffffffffffffffffffffffffffffff811681146118f857600080fd5b919050565b6000806040838503121561191057600080fd5b611919836118d4565b946020939093013593505050565b60008060006060848603121561193c57600080fd5b611945846118d4565b9250611953602085016118d4565b9150604084013590509250925092565b60006020828403121561197557600080fd5b61049e826118d4565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f8301126119be57600080fd5b813567ffffffffffffffff808211156119d9576119d961197e565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715611a1f57611a1f61197e565b81604052838152866020858801011115611a3857600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060408385031215611a6b57600080fd5b823567ffffffffffffffff80821115611a8357600080fd5b611a8f868387016119ad565b93506020850135915080821115611aa557600080fd5b50611ab2858286016119ad565b9150509250929050565b7fff00000000000000000000000000000000000000000000000000000000000000881681526000602060e081840152611af860e084018a611877565b8381036040850152611b0a818a611877565b6060850189905273ffffffffffffffffffffffffffffffffffffffff8816608086015260a0850187905284810360c0860152855180825283870192509083019060005b81811015611b6957835183529284019291840191600101611b4d565b50909c9b505050505050505050505050565b60008060008060008060a08789031215611b9457600080fd5b611b9d876118d4565b9550611bab602088016118d4565b94506040870135935060608701359250608087013567ffffffffffffffff80821115611bd657600080fd5b818901915089601f830112611bea57600080fd5b813581811115611bf957600080fd5b8a6020828501011115611c0b57600080fd5b6020830194508093505050509295509295509295565b600080600060608486031215611c3657600080fd5b833567ffffffffffffffff80821115611c4e57600080fd5b611c5a878388016119ad565b94506020860135915080821115611c7057600080fd5b611c7c878388016119ad565b93506040860135915080821115611c9257600080fd5b50611c9f868287016119ad565b9150509250925092565b600080600080600080600060e0888a031215611cc457600080fd5b611ccd886118d4565b9650611cdb602089016118d4565b95506040880135945060608801359350608088013560ff81168114611cff57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215611d2f57600080fd5b611d38836118d4565b9150611d46602084016118d4565b90509250929050565b600181811c90821680611d6357607f821691505b60208210811415611d9d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115611de557611de5611da3565b500190565b600082821015611dfc57611dfc611da3565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b828152604060208201526000611e496040830184611877565b949350505050565b60008251611e6381846020870161184b565b9190910192915050565b600060208284031215611e7f57600080fd5b81517fffffffff000000000000000000000000000000000000000000000000000000008116811461049e57600080fdfea264697066735822122004be3e0da108645291cd28a96bef2b6d2f0fa9a8e1dbc431a09d09ee713867b264736f6c634300080a00333470f8373d566de7ab61e14a030ae865a1f164b610b931eb8aa08ad044e2e68e056ad441bfb3f4908fe527102b709e6e33a099187a55402844d65a5cc26af21900000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000120000000000000000000000001a513e9b6434a12c7bb5b9af3b21963308dee372000000000000000000000000000000000000000000000000000000000000001f57726170706564206c6971756964207374616b656420457468657220322e30000000000000000000000000000000000000000000000000000000000000000006777374455448000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013200000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061016c5760003560e01c806384b0196e116100cd578063a6487c5311610081578063d505accf11610066578063d505accf14610331578063dd62ed3e14610344578063e78cea921461036f57600080fd5b8063a6487c531461030b578063a9059cbb1461031e57600080fd5b80638c2a993e116100b25780638c2a993e146102dd57806395d89b41146102f05780639fd5a6cf146102f857600080fd5b806384b0196e146102ba5780638aa10435146102d557600080fd5b80633644e5151161012457806371a4f22b1161010957806371a4f22b1461023d57806374f4f547146102525780637ecebe001461026557600080fd5b80633644e5151461021557806370a082311461021d57600080fd5b806318160ddd1161015557806318160ddd146101b257806323b872dd146101c9578063313ce567146101dc57600080fd5b806306fdde0314610171578063095ea7b31461018f575b600080fd5b6101796103bb565b60405161018691906118c1565b60405180910390f35b6101a261019d3660046118fd565b61046c565b6040519015158152602001610186565b6101bb60005481565b604051908152602001610186565b6101a26101d7366004611927565b610482565b6102037f000000000000000000000000000000000000000000000000000000000000001281565b60405160ff9091168152602001610186565b6101bb6104a5565b6101bb61022b366004611963565b60016020526000908152604090205481565b61025061024b366004611a58565b6104b4565b005b6102506102603660046118fd565b610500565b6101bb610273366004611963565b73ffffffffffffffffffffffffffffffffffffffff1660009081527fdaad28896b706a809236aec38dc84ce99b9d9cf68b8751e946a9258d6de2c8f1602052604090205490565b6102c2610579565b6040516101869796959493929190611abc565b6101bb61072c565b6102506102eb3660046118fd565b610756565b6101796107cf565b610250610306366004611b7b565b610800565b610250610319366004611c21565b61084b565b6101a261032c3660046118fd565b6108a3565b61025061033f366004611ca9565b6108b0565b6101bb610352366004611d1c565b600260209081526000928352604080842090915290825290205481565b6103967f0000000000000000000000001a513e9b6434a12c7bb5b9af3b21963308dee37281565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610186565b60607f3470f8373d566de7ab61e14a030ae865a1f164b610b931eb8aa08ad044e2e68e80546103e990611d4f565b80601f016020809104026020016040519081016040528092919081815260200182805461041590611d4f565b80156104625780601f1061043757610100808354040283529160200191610462565b820191906000526020600020905b81548152906001019060200180831161044557829003601f168201915b5050505050905090565b6000610479338484610923565b50600192915050565b600061048f843384610a30565b61049a848484610ade565b5060015b9392505050565b60006104af610c1f565b905090565b6104bc610d53565b6104f2576040517f7f3c77d300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104fc8282610d77565b5050565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000001a513e9b6434a12c7bb5b9af3b21963308dee372161461056f576040517fb5f1e21f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104fc8282610d8b565b6000606080828080837f056ad441bfb3f4908fe527102b709e6e33a099187a55402844d65a5cc26af2198060010146306000806040519080825280602002602001820160405280156105d5578160200160208202803683370190505b507f0f0000000000000000000000000000000000000000000000000000000000000095949392919085805461060990611d4f565b80601f016020809104026020016040519081016040528092919081815260200182805461063590611d4f565b80156106825780601f1061065757610100808354040283529160200191610682565b820191906000526020600020905b81548152906001019060200180831161066557829003601f168201915b5050505050955084805461069590611d4f565b80601f01602080910402602001604051908101604052809291908181526020018280546106c190611d4f565b801561070e5780601f106106e35761010080835404028352916020019161070e565b820191906000526020600020905b8154815290600101906020018083116106f157829003601f168201915b50505050509450965096509650965096509650965090919293949596565b60006104af7f4dd0f6662ba1d6b081f08b350f5e9a6a7b15cf586926ba66f753594928fa64a65490565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000001a513e9b6434a12c7bb5b9af3b21963308dee37216146107c5576040517fb5f1e21f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104fc8282610e4d565b60607f3470f8373d566de7ab61e14a030ae865a1f164b610b931eb8aa08ad044e2e68e60010180546103e990611d4f565b6108438686868686868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610f3692505050565b505050505050565b610853610d53565b1561088a576040517fbcab4d2f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108948383611050565b61089e8382610d77565b505050565b6000610479338484610ade565b6109168787878786868960405160200161090293929190928352602083019190915260f81b7fff0000000000000000000000000000000000000000000000000000000000000016604082015260410190565b604051602081830303815290604052610f36565b50505050505050565b9055565b8273ffffffffffffffffffffffffffffffffffffffff8116610971576040517fef6b416200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff81166109bf576040517fef6b416200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff85811660008181526002602090815260408083209489168084529482529182902087905590518681527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a35050505050565b73ffffffffffffffffffffffffffffffffffffffff8084166000908152600260209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811415610a915750505050565b80821115610acb576040517fc213972500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ad88484848403610923565b50505050565b8273ffffffffffffffffffffffffffffffffffffffff8116610b2c576040517fef6b416200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff8116610b7a576040517fef6b416200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b848584611062565b73ffffffffffffffffffffffffffffffffffffffff841660009081526001602052604081208054859290610bb9908490611dd2565b925050819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051610a2191815260200190565b60003073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000b5cf096a406c1d5297d2493073168f44eb4a1a1d16148015610c8557507f000000000000000000000000000000000000000000000000000000000000008246145b15610caf57507f1525a2ef461e8f6d95147b8a3b72b947abaa8d05cd87350c868a766f8701b67290565b50604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6020808301919091527fb6d02a790ca4952ed9faa11074863de95b4c8bc405a22873605ff97356993b36828401527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a560608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6000610d5d6103bb565b51158015906104af5750610d6f6107cf565b511515905090565b610d8160026110ed565b6104fc8282611138565b8173ffffffffffffffffffffffffffffffffffffffff8116610dd9576040517fef6b416200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610de38383611062565b81600080828254610df49190611dea565b909155505060405182815260009073ffffffffffffffffffffffffffffffffffffffff8516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020015b60405180910390a3505050565b8173ffffffffffffffffffffffffffffffffffffffff8116610e9b576040517fef6b416200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600080828254610eac9190611dd2565b909155505073ffffffffffffffffffffffffffffffffffffffff831660009081526001602052604081208054849290610ee6908490611dd2565b909155505060405182815273ffffffffffffffffffffffffffffffffffffffff8416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610e40565b81421115610f70576040517f6015a46400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006110027f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9878787610fa28361114a565b60408051602081019690965273ffffffffffffffffffffffffffffffffffffffff94851690860152929091166060840152608083015260a082015260c0810185905260e001604051602081830303815290604052805190602001206111e7565b905061100f868284611256565b611045576040517f3f88fec700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610843868686611445565b61105982611450565b6104fc816114ba565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260016020526040902054808211156110c1576040517eb284f200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff909216600090815260016020526040902091039055565b6110f561072c565b1561112c576040517f61394a8400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6111358161152b565b50565b6111418261158a565b6104fc816115b1565b73ffffffffffffffffffffffffffffffffffffffff811660009081527fdaad28896b706a809236aec38dc84ce99b9d9cf68b8751e946a9258d6de2c8f1602052604090205461119a816001611dd2565b73ffffffffffffffffffffffffffffffffffffffff9290921660009081527fdaad28896b706a809236aec38dc84ce99b9d9cf68b8751e946a9258d6de2c8f1602052604090209190915590565b60006112506111f4610c1f565b836040517f19010000000000000000000000000000000000000000000000000000000000006020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b92915050565b600080600061126585856115d8565b9092509050600081600481111561127e5761127e611e01565b1480156112b657508573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b156112c65760019250505061049e565b6000808773ffffffffffffffffffffffffffffffffffffffff16631626ba7e60e01b88886040516024016112fb929190611e30565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290516113849190611e51565b600060405180830381855afa9150503d80600081146113bf576040519150601f19603f3d011682016040523d82523d6000602084013e6113c4565b606091505b50915091508180156113d7575080516020145b8015611439575080517f1626ba7e00000000000000000000000000000000000000000000000000000000906114159083016020908101908401611e6d565b7fffffffff0000000000000000000000000000000000000000000000000000000016145b98975050505050505050565b61089e838383610923565b8051611488576040517f348120a300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b807f3470f8373d566de7ab61e14a030ae865a1f164b610b931eb8aa08ad044e2e68e5b81516104fc92602001906117b2565b80516114f2576040517fa02a947f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b807f3470f8373d566de7ab61e14a030ae865a1f164b610b931eb8aa08ad044e2e68e5b60010190805190602001906104fc9291906117b2565b6115547f4dd0f6662ba1d6b081f08b350f5e9a6a7b15cf586926ba66f753594928fa64a6829055565b6040518181527ffddcded6b4f4730c226821172046b48372d3cd963c159701ae1b7c3bcac541bb9060200160405180910390a150565b807f056ad441bfb3f4908fe527102b709e6e33a099187a55402844d65a5cc26af2196114ab565b807f056ad441bfb3f4908fe527102b709e6e33a099187a55402844d65a5cc26af219611515565b60008082516041141561160f5760208301516040840151606085015160001a61160387828585611648565b94509450505050611641565b825160401415611639576020830151604084015161162e868383611760565b935093505050611641565b506000905060025b9250929050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561167f5750600090506003611757565b8460ff16601b1415801561169757508460ff16601c14155b156116a85750600090506004611757565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156116fc573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811661175057600060019250925050611757565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83168161179660ff86901c601b611dd2565b90506117a487828885611648565b935093505050935093915050565b8280546117be90611d4f565b90600052602060002090601f0160209004810192826117e05760008555611826565b82601f106117f957805160ff1916838001178555611826565b82800160010185558215611826579182015b8281111561182657825182559160200191906001019061180b565b50611832929150611836565b5090565b5b808211156118325760008155600101611837565b60005b8381101561186657818101518382015260200161184e565b83811115610ad85750506000910152565b6000815180845261188f81602086016020860161184b565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061049e6020830184611877565b803573ffffffffffffffffffffffffffffffffffffffff811681146118f857600080fd5b919050565b6000806040838503121561191057600080fd5b611919836118d4565b946020939093013593505050565b60008060006060848603121561193c57600080fd5b611945846118d4565b9250611953602085016118d4565b9150604084013590509250925092565b60006020828403121561197557600080fd5b61049e826118d4565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f8301126119be57600080fd5b813567ffffffffffffffff808211156119d9576119d961197e565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715611a1f57611a1f61197e565b81604052838152866020858801011115611a3857600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060408385031215611a6b57600080fd5b823567ffffffffffffffff80821115611a8357600080fd5b611a8f868387016119ad565b93506020850135915080821115611aa557600080fd5b50611ab2858286016119ad565b9150509250929050565b7fff00000000000000000000000000000000000000000000000000000000000000881681526000602060e081840152611af860e084018a611877565b8381036040850152611b0a818a611877565b6060850189905273ffffffffffffffffffffffffffffffffffffffff8816608086015260a0850187905284810360c0860152855180825283870192509083019060005b81811015611b6957835183529284019291840191600101611b4d565b50909c9b505050505050505050505050565b60008060008060008060a08789031215611b9457600080fd5b611b9d876118d4565b9550611bab602088016118d4565b94506040870135935060608701359250608087013567ffffffffffffffff80821115611bd657600080fd5b818901915089601f830112611bea57600080fd5b813581811115611bf957600080fd5b8a6020828501011115611c0b57600080fd5b6020830194508093505050509295509295509295565b600080600060608486031215611c3657600080fd5b833567ffffffffffffffff80821115611c4e57600080fd5b611c5a878388016119ad565b94506020860135915080821115611c7057600080fd5b611c7c878388016119ad565b93506040860135915080821115611c9257600080fd5b50611c9f868287016119ad565b9150509250925092565b600080600080600080600060e0888a031215611cc457600080fd5b611ccd886118d4565b9650611cdb602089016118d4565b95506040880135945060608801359350608088013560ff81168114611cff57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215611d2f57600080fd5b611d38836118d4565b9150611d46602084016118d4565b90509250929050565b600181811c90821680611d6357607f821691505b60208210811415611d9d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115611de557611de5611da3565b500190565b600082821015611dfc57611dfc611da3565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b828152604060208201526000611e496040830184611877565b949350505050565b60008251611e6381846020870161184b565b9190910192915050565b600060208284031215611e7f57600080fd5b81517fffffffff000000000000000000000000000000000000000000000000000000008116811461049e57600080fdfea264697066735822122004be3e0da108645291cd28a96bef2b6d2f0fa9a8e1dbc431a09d09ee713867b264736f6c634300080a0033

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

00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000120000000000000000000000001a513e9b6434a12c7bb5b9af3b21963308dee372000000000000000000000000000000000000000000000000000000000000001f57726170706564206c6971756964207374616b656420457468657220322e30000000000000000000000000000000000000000000000000000000000000000006777374455448000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013200000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : name_ (string): Wrapped liquid staked Ether 2.0
Arg [1] : symbol_ (string): wstETH
Arg [2] : version_ (string): 2
Arg [3] : decimals_ (uint8): 18
Arg [4] : bridge_ (address): 0x1A513e9B6434a12C7bB5B9AF3B21963308DEE372

-----Encoded View---------------
11 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000012
Arg [4] : 0000000000000000000000001a513e9b6434a12c7bb5b9af3b21963308dee372
Arg [5] : 000000000000000000000000000000000000000000000000000000000000001f
Arg [6] : 57726170706564206c6971756964207374616b656420457468657220322e3000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [8] : 7773744554480000000000000000000000000000000000000000000000000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [10] : 3200000000000000000000000000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits

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