{"constructor_args":"0x0000000000000000000000006bde51212203ae5d592cc5180da2abbd41c922de","is_partially_verified":false,"is_changed_bytecode":false,"abi":[{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidAdapter","type":"error"},{"inputs":[],"name":"OnlyAdapter","type":"error"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"length","type":"uint256"}],"name":"StringsInsufficientHexLength","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"adapter","type":"address"}],"name":"AdapterSet","type":"event"},{"inputs":[],"name":"adapter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"burn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"deployer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_adapter","type":"address"}],"name":"setAdapter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IUSDSM","name":"","type":"address"}],"stateMutability":"view","type":"function"}],"conflicting_implementations":null,"certified":false,"additional_sources":[{"file_path":"@layerzerolabs/oft-evm/contracts/interfaces/IMintableBurnable.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.22;\n\n/// @title Interface for mintable and burnable tokens\ninterface IMintableBurnable {\n    \n    /**\n     * @notice Burns tokens from a specified account\n     * @param _from Address from which tokens will be burned\n     * @param _amount Amount of tokens to be burned\n     * @return success Indicates whether the operation was successful\n     */\n    function burn(address _from, uint256 _amount) external returns (bool success);\n\n    /**\n     * @notice Mints tokens to a specified account\n     * @param _to Address to which tokens will be minted\n     * @param _amount Amount of tokens to be minted\n     * @return success Indicates whether the operation was successful\n     */\n    function mint(address _to, uint256 _amount) external returns (bool success);\n}"},{"file_path":"@openzeppelin/contracts/token/ERC20/IERC20.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n\n    /**\n     * @dev Returns the value of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the value of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the\n     * allowance mechanism. `value` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n"},{"file_path":"@openzeppelin/contracts/utils/Strings.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n    bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n    uint8 private constant ADDRESS_LENGTH = 20;\n\n    /**\n     * @dev The `value` string doesn't fit in the specified `length`.\n     */\n    error StringsInsufficientHexLength(uint256 value, uint256 length);\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n     */\n    function toString(uint256 value) internal pure returns (string memory) {\n        unchecked {\n            uint256 length = Math.log10(value) + 1;\n            string memory buffer = new string(length);\n            uint256 ptr;\n            /// @solidity memory-safe-assembly\n            assembly {\n                ptr := add(buffer, add(32, length))\n            }\n            while (true) {\n                ptr--;\n                /// @solidity memory-safe-assembly\n                assembly {\n                    mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))\n                }\n                value /= 10;\n                if (value == 0) break;\n            }\n            return buffer;\n        }\n    }\n\n    /**\n     * @dev Converts a `int256` to its ASCII `string` decimal representation.\n     */\n    function toStringSigned(int256 value) internal pure returns (string memory) {\n        return string.concat(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value)));\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n     */\n    function toHexString(uint256 value) internal pure returns (string memory) {\n        unchecked {\n            return toHexString(value, Math.log256(value) + 1);\n        }\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n     */\n    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n        uint256 localValue = value;\n        bytes memory buffer = new bytes(2 * length + 2);\n        buffer[0] = \"0\";\n        buffer[1] = \"x\";\n        for (uint256 i = 2 * length + 1; i > 1; --i) {\n            buffer[i] = HEX_DIGITS[localValue & 0xf];\n            localValue >>= 4;\n        }\n        if (localValue != 0) {\n            revert StringsInsufficientHexLength(value, length);\n        }\n        return string(buffer);\n    }\n\n    /**\n     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal\n     * representation.\n     */\n    function toHexString(address addr) internal pure returns (string memory) {\n        return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);\n    }\n\n    /**\n     * @dev Returns true if the two strings are equal.\n     */\n    function equal(string memory a, string memory b) internal pure returns (bool) {\n        return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n    }\n}\n"},{"file_path":"@openzeppelin/contracts/utils/math/Math.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n    /**\n     * @dev Muldiv operation overflow.\n     */\n    error MathOverflowedMulDiv();\n\n    enum Rounding {\n        Floor, // Toward negative infinity\n        Ceil, // Toward positive infinity\n        Trunc, // Toward zero\n        Expand // Away from zero\n    }\n\n    /**\n     * @dev Returns the addition of two unsigned integers, with an overflow flag.\n     */\n    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            uint256 c = a + b;\n            if (c < a) return (false, 0);\n            return (true, c);\n        }\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\n     */\n    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b > a) return (false, 0);\n            return (true, a - b);\n        }\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n     */\n    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n            // benefit is lost if 'b' is also tested.\n            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n            if (a == 0) return (true, 0);\n            uint256 c = a * b;\n            if (c / a != b) return (false, 0);\n            return (true, c);\n        }\n    }\n\n    /**\n     * @dev Returns the division of two unsigned integers, with a division by zero flag.\n     */\n    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b == 0) return (false, 0);\n            return (true, a / b);\n        }\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n     */\n    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b == 0) return (false, 0);\n            return (true, a % b);\n        }\n    }\n\n    /**\n     * @dev Returns the largest of two numbers.\n     */\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a > b ? a : b;\n    }\n\n    /**\n     * @dev Returns the smallest of two numbers.\n     */\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a < b ? a : b;\n    }\n\n    /**\n     * @dev Returns the average of two numbers. The result is rounded towards\n     * zero.\n     */\n    function average(uint256 a, uint256 b) internal pure returns (uint256) {\n        // (a + b) / 2 can overflow.\n        return (a & b) + (a ^ b) / 2;\n    }\n\n    /**\n     * @dev Returns the ceiling of the division of two numbers.\n     *\n     * This differs from standard division with `/` in that it rounds towards infinity instead\n     * of rounding towards zero.\n     */\n    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n        if (b == 0) {\n            // Guarantee the same behavior as in a regular Solidity division.\n            return a / b;\n        }\n\n        // (a + b - 1) / b can overflow on addition, so we distribute.\n        return a == 0 ? 0 : (a - 1) / b + 1;\n    }\n\n    /**\n     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\n     * denominator == 0.\n     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n     * Uniswap Labs also under MIT license.\n     */\n    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n        unchecked {\n            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n            // variables such that product = prod1 * 2^256 + prod0.\n            uint256 prod0 = x * y; // Least significant 256 bits of the product\n            uint256 prod1; // Most significant 256 bits of the product\n            assembly {\n                let mm := mulmod(x, y, not(0))\n                prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n            }\n\n            // Handle non-overflow cases, 256 by 256 division.\n            if (prod1 == 0) {\n                // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n                // The surrounding unchecked block does not change this fact.\n                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n                return prod0 / denominator;\n            }\n\n            // Make sure the result is less than 2^256. Also prevents denominator == 0.\n            if (denominator <= prod1) {\n                revert MathOverflowedMulDiv();\n            }\n\n            ///////////////////////////////////////////////\n            // 512 by 256 division.\n            ///////////////////////////////////////////////\n\n            // Make division exact by subtracting the remainder from [prod1 prod0].\n            uint256 remainder;\n            assembly {\n                // Compute remainder using mulmod.\n                remainder := mulmod(x, y, denominator)\n\n                // Subtract 256 bit number from 512 bit number.\n                prod1 := sub(prod1, gt(remainder, prod0))\n                prod0 := sub(prod0, remainder)\n            }\n\n            // Factor powers of two out of denominator and compute largest power of two divisor of denominator.\n            // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n            uint256 twos = denominator & (0 - denominator);\n            assembly {\n                // Divide denominator by twos.\n                denominator := div(denominator, twos)\n\n                // Divide [prod1 prod0] by twos.\n                prod0 := div(prod0, twos)\n\n                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n                twos := add(div(sub(0, twos), twos), 1)\n            }\n\n            // Shift in bits from prod1 into prod0.\n            prod0 |= prod1 * twos;\n\n            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n            // four bits. That is, denominator * inv = 1 mod 2^4.\n            uint256 inverse = (3 * denominator) ^ 2;\n\n            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also\n            // works in modular arithmetic, doubling the correct bits in each step.\n            inverse *= 2 - denominator * inverse; // inverse mod 2^8\n            inverse *= 2 - denominator * inverse; // inverse mod 2^16\n            inverse *= 2 - denominator * inverse; // inverse mod 2^32\n            inverse *= 2 - denominator * inverse; // inverse mod 2^64\n            inverse *= 2 - denominator * inverse; // inverse mod 2^128\n            inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n            // is no longer required.\n            result = prod0 * inverse;\n            return result;\n        }\n    }\n\n    /**\n     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n     */\n    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n        uint256 result = mulDiv(x, y, denominator);\n        if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) {\n            result += 1;\n        }\n        return result;\n    }\n\n    /**\n     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded\n     * towards zero.\n     *\n     * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n     */\n    function sqrt(uint256 a) internal pure returns (uint256) {\n        if (a == 0) {\n            return 0;\n        }\n\n        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n        //\n        // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n        //\n        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n        //\n        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n        uint256 result = 1 << (log2(a) >> 1);\n\n        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n        // into the expected uint128 result.\n        unchecked {\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            return min(result, a / result);\n        }\n    }\n\n    /**\n     * @notice Calculates sqrt(a), following the selected rounding direction.\n     */\n    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = sqrt(a);\n            return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 2 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        unchecked {\n            if (value >> 128 > 0) {\n                value >>= 128;\n                result += 128;\n            }\n            if (value >> 64 > 0) {\n                value >>= 64;\n                result += 64;\n            }\n            if (value >> 32 > 0) {\n                value >>= 32;\n                result += 32;\n            }\n            if (value >> 16 > 0) {\n                value >>= 16;\n                result += 16;\n            }\n            if (value >> 8 > 0) {\n                value >>= 8;\n                result += 8;\n            }\n            if (value >> 4 > 0) {\n                value >>= 4;\n                result += 4;\n            }\n            if (value >> 2 > 0) {\n                value >>= 2;\n                result += 2;\n            }\n            if (value >> 1 > 0) {\n                result += 1;\n            }\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log2(value);\n            return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 10 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        unchecked {\n            if (value >= 10 ** 64) {\n                value /= 10 ** 64;\n                result += 64;\n            }\n            if (value >= 10 ** 32) {\n                value /= 10 ** 32;\n                result += 32;\n            }\n            if (value >= 10 ** 16) {\n                value /= 10 ** 16;\n                result += 16;\n            }\n            if (value >= 10 ** 8) {\n                value /= 10 ** 8;\n                result += 8;\n            }\n            if (value >= 10 ** 4) {\n                value /= 10 ** 4;\n                result += 4;\n            }\n            if (value >= 10 ** 2) {\n                value /= 10 ** 2;\n                result += 2;\n            }\n            if (value >= 10 ** 1) {\n                result += 1;\n            }\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log10(value);\n            return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 256 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     *\n     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n     */\n    function log256(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        unchecked {\n            if (value >> 128 > 0) {\n                value >>= 128;\n                result += 16;\n            }\n            if (value >> 64 > 0) {\n                value >>= 64;\n                result += 8;\n            }\n            if (value >> 32 > 0) {\n                value >>= 32;\n                result += 4;\n            }\n            if (value >> 16 > 0) {\n                value >>= 16;\n                result += 2;\n            }\n            if (value >> 8 > 0) {\n                result += 1;\n            }\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log256(value);\n            return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\n        }\n    }\n\n    /**\n     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n     */\n    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n        return uint8(rounding) % 2 == 1;\n    }\n}\n"},{"file_path":"@openzeppelin/contracts/utils/math/SignedMath.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n    /**\n     * @dev Returns the largest of two signed numbers.\n     */\n    function max(int256 a, int256 b) internal pure returns (int256) {\n        return a > b ? a : b;\n    }\n\n    /**\n     * @dev Returns the smallest of two signed numbers.\n     */\n    function min(int256 a, int256 b) internal pure returns (int256) {\n        return a < b ? a : b;\n    }\n\n    /**\n     * @dev Returns the average of two signed numbers without overflow.\n     * The result is rounded towards zero.\n     */\n    function average(int256 a, int256 b) internal pure returns (int256) {\n        // Formula from the book \"Hacker's Delight\"\n        int256 x = (a & b) + ((a ^ b) >> 1);\n        return x + (int256(uint256(x) >> 255) & (a ^ b));\n    }\n\n    /**\n     * @dev Returns the absolute unsigned value of a signed value.\n     */\n    function abs(int256 n) internal pure returns (uint256) {\n        unchecked {\n            // must be unchecked in order to support `n = type(int256).min`\n            return uint256(n >= 0 ? n : -n);\n        }\n    }\n}\n"}],"is_verified_via_sourcify":false,"can_be_visualized_via_sol2uml":true,"evm_version":"shanghai","language":"solidity","is_verified_via_eth_bytecode_db":false,"is_fully_verified":true,"license_type":"none","is_blueprint":false,"name":"USDSMMinterBurner","creation_bytecode":"0x60c060405234801561000f575f80fd5b50604051610b71380380610b7183398101604081905261002e9161008d565b6001600160a01b0381166100785760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103a37b5b2b760991b604482015260640160405180910390fd5b6001600160a01b03166080523360a0526100ba565b5f6020828403121561009d575f80fd5b81516001600160a01b03811681146100b3575f80fd5b9392505050565b60805160a051610a7b6100f65f395f818160e3015261038f01525f818161010a0152818161019701528181610260015261034d0152610a7b5ff3fe608060405234801561000f575f80fd5b5060043610610060575f3560e01c806303eadcfc1461006457806340c10f19146100935780639dc29fac146100b6578063ab1da79c146100c9578063d5f39488146100de578063fc0c546a14610105575b5f80fd5b5f54610076906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6100a66100a1366004610838565b61012c565b604051901515815260200161008a565b6100a66100c4366004610838565b610209565b6100dc6100d7366004610860565b610384565b005b6100767f000000000000000000000000000000000000000000000000000000000000000081565b6100767f000000000000000000000000000000000000000000000000000000000000000081565b5f80546001600160a01b03163314610157576040516308ce245d60e31b815260040160405180910390fd5b5f61017d604051806040016040528060048152602001631b5a5b9d60e21b8152506104c9565b6040516334ff261960e21b81529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063d3fc9864906101d0908790879086906004016108cd565b5f604051808303815f87803b1580156101e7575f80fd5b505af11580156101f9573d5f803e3d5ffd5b5050505060019150505b92915050565b5f80546001600160a01b03163314610234576040516308ce245d60e31b815260040160405180910390fd5b6040516323b872dd60e01b81526001600160a01b038481166004830152306024830152604482018490527f000000000000000000000000000000000000000000000000000000000000000016906323b872dd906064016020604051808303815f875af11580156102a6573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102ca91906108fc565b61030d5760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b60448201526064015b60405180910390fd5b5f61033360405180604001604052806004815260200163313ab93760e11b8152506104c9565b604051637641e6f360e01b81529091506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690637641e6f3906101d0908690859060040161091b565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103ec5760405162461bcd60e51b815260206004820152600d60248201526c27b7363c903232b83637bcb2b960991b6044820152606401610304565b5f546001600160a01b03161561043a5760405162461bcd60e51b81526020600482015260136024820152721059185c1d195c88185b1c9958591e481cd95d606a1b6044820152606401610304565b6001600160a01b0381166104825760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b21030b230b83a32b960891b6044820152606401610304565b5f80546001600160a01b0319166001600160a01b038316908117825560405190917f5686f5516b5fee5df87cc285ab1070586bb99a9823e20648cb8d3a4b2819f6f091a250565b600180546060915f6104da83610947565b9190505550816104e946610526565b6104f2306105b6565b6104fd600154610526565b604051602001610510949392919061095f565b6040516020818303038152906040529050919050565b60605f610532836105cc565b60010190505f8167ffffffffffffffff811115610551576105516109de565b6040519080825280601f01601f19166020018201604052801561057b576020820181803683370190505b5090508181016020015b5f19016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461058557509392505050565b60606102036001600160a01b03831660146106a3565b5f8072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061060a5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310610636576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061065457662386f26fc10000830492506010015b6305f5e100831061066c576305f5e100830492506008015b612710831061068057612710830492506004015b60648310610692576064830492506002015b600a83106102035760010192915050565b6060825f6106b28460026109f2565b6106bd906002610a09565b67ffffffffffffffff8111156106d5576106d56109de565b6040519080825280601f01601f1916602001820160405280156106ff576020820181803683370190505b509050600360fc1b815f8151811061071957610719610a1c565b60200101906001600160f81b03191690815f1a905350600f60fb1b8160018151811061074757610747610a1c565b60200101906001600160f81b03191690815f1a9053505f6107698560026109f2565b610774906001610a09565b90505b60018111156107eb576f181899199a1a9b1b9c1cb0b131b232b360811b83600f16601081106107a8576107a8610a1c565b1a60f81b8282815181106107be576107be610a1c565b60200101906001600160f81b03191690815f1a90535060049290921c916107e481610a30565b9050610777565b5081156108155760405163e22e27eb60e01b81526004810186905260248101859052604401610304565b949350505050565b80356001600160a01b0381168114610833575f80fd5b919050565b5f8060408385031215610849575f80fd5b6108528361081d565b946020939093013593505050565b5f60208284031215610870575f80fd5b6108798261081d565b9392505050565b5f5b8381101561089a578181015183820152602001610882565b50505f910152565b5f81518084526108b9816020860160208601610880565b601f01601f19169290920160200192915050565b60018060a01b0384168152826020820152606060408201525f6108f360608301846108a2565b95945050505050565b5f6020828403121561090c575f80fd5b81518015158114610879575f80fd5b828152604060208201525f61081560408301846108a2565b634e487b7160e01b5f52601160045260245ffd5b5f6001820161095857610958610933565b5060010190565b5f8551610970818460208a01610880565b632d6c7a2d60e01b9083019081528551610991816004840160208a01610880565b808201915050602d60f81b80600483015285516109b5816005850160208a01610880565b600592019182015283516109d0816006840160208801610880565b016006019695505050505050565b634e487b7160e01b5f52604160045260245ffd5b808202811582820484141761020357610203610933565b8082018082111561020357610203610933565b634e487b7160e01b5f52603260045260245ffd5b5f81610a3e57610a3e610933565b505f19019056fea2646970667358221220f3a95b14d40cf40c6999e4ade209d4da2781b709db87ecaf3373e0cc612eb8f664736f6c634300081600330000000000000000000000006bde51212203ae5d592cc5180da2abbd41c922de","external_libraries":[],"proxy_type":null,"implementations":[],"verified_at":"2026-03-19T14:08:29.738198Z","is_verified_via_verifier_alliance":false,"compiler_version":"v0.8.22+commit.4fc1097e","decoded_constructor_args":[["0x6bDE51212203aE5d592Cc5180DA2ABBd41c922dE",{"internalType":"address","name":"_token","type":"address"}]],"sourcify_repo_url":null,"optimization_runs":200,"compiler_settings":{"evmVersion":"shanghai","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":true,"runs":200},"outputSelection":{"*":{"":["*"],"*":["*"]}}},"is_verified":true,"verified_twin_address_hash":null,"optimization_enabled":true,"deployed_bytecode":"0x608060405234801561000f575f80fd5b5060043610610060575f3560e01c806303eadcfc1461006457806340c10f19146100935780639dc29fac146100b6578063ab1da79c146100c9578063d5f39488146100de578063fc0c546a14610105575b5f80fd5b5f54610076906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6100a66100a1366004610838565b61012c565b604051901515815260200161008a565b6100a66100c4366004610838565b610209565b6100dc6100d7366004610860565b610384565b005b6100767f0000000000000000000000001bb0b2666edd827f74b558136fdbe69e4ecec5fd81565b6100767f0000000000000000000000006bde51212203ae5d592cc5180da2abbd41c922de81565b5f80546001600160a01b03163314610157576040516308ce245d60e31b815260040160405180910390fd5b5f61017d604051806040016040528060048152602001631b5a5b9d60e21b8152506104c9565b6040516334ff261960e21b81529091506001600160a01b037f0000000000000000000000006bde51212203ae5d592cc5180da2abbd41c922de169063d3fc9864906101d0908790879086906004016108cd565b5f604051808303815f87803b1580156101e7575f80fd5b505af11580156101f9573d5f803e3d5ffd5b5050505060019150505b92915050565b5f80546001600160a01b03163314610234576040516308ce245d60e31b815260040160405180910390fd5b6040516323b872dd60e01b81526001600160a01b038481166004830152306024830152604482018490527f0000000000000000000000006bde51212203ae5d592cc5180da2abbd41c922de16906323b872dd906064016020604051808303815f875af11580156102a6573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102ca91906108fc565b61030d5760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b60448201526064015b60405180910390fd5b5f61033360405180604001604052806004815260200163313ab93760e11b8152506104c9565b604051637641e6f360e01b81529091506001600160a01b037f0000000000000000000000006bde51212203ae5d592cc5180da2abbd41c922de1690637641e6f3906101d0908690859060040161091b565b336001600160a01b037f0000000000000000000000001bb0b2666edd827f74b558136fdbe69e4ecec5fd16146103ec5760405162461bcd60e51b815260206004820152600d60248201526c27b7363c903232b83637bcb2b960991b6044820152606401610304565b5f546001600160a01b03161561043a5760405162461bcd60e51b81526020600482015260136024820152721059185c1d195c88185b1c9958591e481cd95d606a1b6044820152606401610304565b6001600160a01b0381166104825760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b21030b230b83a32b960891b6044820152606401610304565b5f80546001600160a01b0319166001600160a01b038316908117825560405190917f5686f5516b5fee5df87cc285ab1070586bb99a9823e20648cb8d3a4b2819f6f091a250565b600180546060915f6104da83610947565b9190505550816104e946610526565b6104f2306105b6565b6104fd600154610526565b604051602001610510949392919061095f565b6040516020818303038152906040529050919050565b60605f610532836105cc565b60010190505f8167ffffffffffffffff811115610551576105516109de565b6040519080825280601f01601f19166020018201604052801561057b576020820181803683370190505b5090508181016020015b5f19016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461058557509392505050565b60606102036001600160a01b03831660146106a3565b5f8072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061060a5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310610636576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061065457662386f26fc10000830492506010015b6305f5e100831061066c576305f5e100830492506008015b612710831061068057612710830492506004015b60648310610692576064830492506002015b600a83106102035760010192915050565b6060825f6106b28460026109f2565b6106bd906002610a09565b67ffffffffffffffff8111156106d5576106d56109de565b6040519080825280601f01601f1916602001820160405280156106ff576020820181803683370190505b509050600360fc1b815f8151811061071957610719610a1c565b60200101906001600160f81b03191690815f1a905350600f60fb1b8160018151811061074757610747610a1c565b60200101906001600160f81b03191690815f1a9053505f6107698560026109f2565b610774906001610a09565b90505b60018111156107eb576f181899199a1a9b1b9c1cb0b131b232b360811b83600f16601081106107a8576107a8610a1c565b1a60f81b8282815181106107be576107be610a1c565b60200101906001600160f81b03191690815f1a90535060049290921c916107e481610a30565b9050610777565b5081156108155760405163e22e27eb60e01b81526004810186905260248101859052604401610304565b949350505050565b80356001600160a01b0381168114610833575f80fd5b919050565b5f8060408385031215610849575f80fd5b6108528361081d565b946020939093013593505050565b5f60208284031215610870575f80fd5b6108798261081d565b9392505050565b5f5b8381101561089a578181015183820152602001610882565b50505f910152565b5f81518084526108b9816020860160208601610880565b601f01601f19169290920160200192915050565b60018060a01b0384168152826020820152606060408201525f6108f360608301846108a2565b95945050505050565b5f6020828403121561090c575f80fd5b81518015158114610879575f80fd5b828152604060208201525f61081560408301846108a2565b634e487b7160e01b5f52601160045260245ffd5b5f6001820161095857610958610933565b5060010190565b5f8551610970818460208a01610880565b632d6c7a2d60e01b9083019081528551610991816004840160208a01610880565b808201915050602d60f81b80600483015285516109b5816005850160208a01610880565b600592019182015283516109d0816006840160208801610880565b016006019695505050505050565b634e487b7160e01b5f52604160045260245ffd5b808202811582820484141761020357610203610933565b8082018082111561020357610203610933565b634e487b7160e01b5f52603260045260245ffd5b5f81610a3e57610a3e610933565b505f19019056fea2646970667358221220f3a95b14d40cf40c6999e4ade209d4da2781b709db87ecaf3373e0cc612eb8f664736f6c63430008160033","source_code":"// SPDX-License-Identifier: MIT\npragma solidity 0.8.22;\n\nimport \"@layerzerolabs/oft-evm/contracts/interfaces/IMintableBurnable.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport { Strings } from \"@openzeppelin/contracts/utils/Strings.sol\";\n\n/**\n * @title IUSDSM\n * @notice Interface for USDSM token's mint and burn functions\n */\ninterface IUSDSM is IERC20 {\n    function mint(address to, uint256 amount, string calldata id) external;\n    function burn(uint256 amount, string calldata id) external;\n}\n\n/**\n * @title USDSMMinterBurner\n * @notice Intermediary contract that implements IMintableBurnable for USDSM token\n * @dev This contract must have MINTER_ROLE and BURNER_ROLE on the USDSM token.\n *      It adapts USDSM's mint(to, amount, id) and burn(amount, id) to the standard\n *      IMintableBurnable interface: mint(to, amount) and burn(from, amount).\n *      Used by MintBurnOFTAdapter for LayerZero cross-chain transfers.\n */\ncontract USDSMMinterBurner is IMintableBurnable {\n    IUSDSM public immutable token;\n    address public immutable deployer;\n    address public adapter; // The MintBurnOFTAdapter that can call mint/burn\n    uint256 private nonce; // Used to generate unique IDs\n\n    error OnlyAdapter();\n    error InvalidAdapter();\n\n    event AdapterSet(address indexed adapter);\n\n    constructor(address _token) {\n        require(_token != address(0), \"Invalid token\");\n        token = IUSDSM(_token);\n        deployer = msg.sender;\n    }\n\n    /**\n     * @notice Set the adapter address (only callable once)\n     * @param _adapter The MintBurnOFTAdapter address\n     */\n    function setAdapter(address _adapter) external {\n        require(msg.sender == deployer, \"Only deployer\");\n        require(adapter == address(0), \"Adapter already set\");\n        require(_adapter != address(0), \"Invalid adapter\");\n        adapter = _adapter;\n        emit AdapterSet(_adapter);\n    }\n\n    /**\n     * @notice Mint tokens via USDSM's mint function\n     * @param _to Recipient address\n     * @param _amount Amount to mint\n     * @dev Only callable by the authorized adapter.\n     *      Generates unique ID using nonce and block data.\n     */\n    function mint(address _to, uint256 _amount) external override returns (bool) {\n        if (msg.sender != adapter) revert OnlyAdapter();\n\n        string memory id = _generateId(\"mint\");\n        token.mint(_to, _amount, id);\n\n        return true;\n    }\n\n    /**\n     * @notice Burn tokens via USDSM's burn function\n     * @param _from Address to burn from\n     * @param _amount Amount to burn\n     * @dev Only callable by the authorized adapter.\n     *      First transfers tokens to this contract, then burns them.\n     */\n    function burn(address _from, uint256 _amount) external override returns (bool) {\n        if (msg.sender != adapter) revert OnlyAdapter();\n\n        // Transfer tokens from user to this contract first\n        require(\n            token.transferFrom(_from, address(this), _amount),\n            \"Transfer failed\"\n        );\n\n        string memory id = _generateId(\"burn\");\n        token.burn(_amount, id);\n\n        return true;\n    }\n\n    /**\n     * @notice Generate a unique ID for mint/burn operations\n     * @param _operation The operation type (\"mint\" or \"burn\")\n     * @return Unique string ID\n     */\n    function _generateId(string memory _operation) internal returns (string memory) {\n        nonce++;\n        return string(\n            abi.encodePacked(\n                _operation,\n                \"-lz-\",\n                Strings.toString(block.chainid),\n                \"-\",\n                Strings.toHexString(address(this)),\n                \"-\",\n                Strings.toString(nonce)\n            )\n        );\n    }\n\n}\n","creation_status":"success","file_path":"contracts/layerzero/USDSMMinterBurner.sol"}