ETH Price: $2,455.56 (+1.29%)

Contract

0xF3588eA537b66EA59e9a0B0337aBBD39d00CFe09
 
Transaction Hash
Method
Block
From
To
Deposit70145632024-08-05 6:22:2191 days ago1722838941IN
0xF3588eA5...9d00CFe09
0 ETH0.000000250.00251295
Deposit69765092024-08-04 9:13:5392 days ago1722762833IN
0xF3588eA5...9d00CFe09
0 ETH0.000000110.0011
Deposit69608882024-08-04 0:33:1192 days ago1722731591IN
0xF3588eA5...9d00CFe09
0 ETH0.000000110.0011
Deposit69526242024-08-03 19:57:4392 days ago1722715063IN
0xF3588eA5...9d00CFe09
0 ETH0.000000050.0004008
Deposit69525792024-08-03 19:56:1392 days ago1722714973IN
0xF3588eA5...9d00CFe09
0 ETH0.000000050.00041276
Deposit69525292024-08-03 19:54:3392 days ago1722714873IN
0xF3588eA5...9d00CFe09
0 ETH0.000000050.00042106
Deposit69210742024-08-03 2:26:0393 days ago1722651963IN
0xF3588eA5...9d00CFe09
0 ETH0.00000120.01080273
Deposit69205852024-08-03 2:09:4593 days ago1722650985IN
0xF3588eA5...9d00CFe09
0 ETH0.000001580.01418057
Deposit69167522024-08-03 0:01:5993 days ago1722643319IN
0xF3588eA5...9d00CFe09
0 ETH0.00000080.0071
Deposit69139222024-08-02 22:27:3993 days ago1722637659IN
0xF3588eA5...9d00CFe09
0 ETH0.000001610.01246177
Deposit69110122024-08-02 20:50:3993 days ago1722631839IN
0xF3588eA5...9d00CFe09
0 ETH0.000000530.00472756
Deposit69101902024-08-02 20:23:1593 days ago1722630195IN
0xF3588eA5...9d00CFe09
0 ETH0.000000510.00396483
Deposit69020872024-08-02 15:53:0993 days ago1722613989IN
0xF3588eA5...9d00CFe09
0 ETH0.000000720.00616094
Deposit68925042024-08-02 10:33:4394 days ago1722594823IN
0xF3588eA5...9d00CFe09
0 ETH0.000000380.00285474
Deposit68898922024-08-02 9:06:3994 days ago1722589599IN
0xF3588eA5...9d00CFe09
0 ETH0.000000360.0029
Deposit68230092024-07-31 19:57:1395 days ago1722455833IN
0xF3588eA5...9d00CFe09
0 ETH0.000000480.00380885
Deposit68046892024-07-31 9:46:3396 days ago1722419193IN
0xF3588eA5...9d00CFe09
0 ETH0.000000560.0042
Grant Role68019532024-07-31 8:15:2196 days ago1722413721IN
0xF3588eA5...9d00CFe09
0 ETH0.000000330.0066
Grant Role68019472024-07-31 8:15:0996 days ago1722413709IN
0xF3588eA5...9d00CFe09
0 ETH0.000000330.0066
0x60c0346168018032024-07-31 8:10:2196 days ago1722413421IN
 Create: VaultV2
0 ETH0.000005120.00536887

Parent Transaction Hash Block From To
View All Internal Transactions

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
VaultV2

Compiler Version
v0.8.24+commit.e11b9ed9

Optimization Enabled:
Yes with 200 runs

Other Settings:
cancun EvmVersion
File 1 of 15 : vaultV2.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.21;

import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/Pausable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

import "./utils/SafeMath.sol";

interface IERC20Decimals {
    function decimals() external view returns (uint8);
}

/**
 * @title A vault for obtaining USDz outside ETH mainnet.
 */
contract VaultV2 is AccessControl, Pausable {
    using SafeERC20 for IERC20;
    using SafeMath for uint256;

    bytes32 public constant POOL_MANAGER_ROLE = keccak256("POOL_MANAGER_ROLE");

    // Max cap for now (cap * decimals)
    uint256 public cap;
    // Used to calculate reserve USDz in pool; 18 decimals
    uint256 public reserve;
    // Used to calculate USDC in pool; 6 decimals
    uint256 public pooledUSDC;
    // Used to calculate total executed USDC; 6 decimals
    uint256 public executed;

    // Deposit token.
    IERC20 public immutable usdc;
    // Get back token.
    IERC20 public immutable USDz;

    event Deposit(address indexed user, uint256 indexed amount);
    event IncreaseCap(uint256 indexed amount);
    event Execute(uint256 indexed amount);

    constructor(address admin, IERC20 _usdc, IERC20 _USDz) {
        _grantRole(DEFAULT_ADMIN_ROLE, admin);
        usdc = _usdc;
        USDz = _USDz;
    }

    /**
     * @notice Pause the contract. Revert if already paused.
     */
    function pause() external onlyRole(DEFAULT_ADMIN_ROLE) {
        _pause();
    }

    /**
     * @notice Unpause the contract. Revert if already unpaused.
     */
    function unpause() external onlyRole(DEFAULT_ADMIN_ROLE) {
        _unpause();
    }

    function stablecoinScalingFactor() internal view returns (uint256) {
        return uint256(1e18).div(10 ** IERC20Decimals(address(usdc)).decimals()) ;
    }

    /**
     * @notice Deposit USDC.
     * Emits a `Deposit` event.
     * input is 6 decimals
     * @param _amount the amount of USDC
     */
    function deposit(uint256 _amount) external whenNotPaused {
        require(_amount > 0, "DEPOSIT_AMOUNT_IS_ZERO");
        require(stablecoinScalingFactor() >= 1, "Incorrect stablecoin decimals");
        require(stablecoinScalingFactor() <= 1e12, "Incorrect stablecoin decimals");
        require(reserve >= _amount.mul(stablecoinScalingFactor()), "DEPOSIT_AMOUNT_EXCEED_LIMIT");

        IERC20(usdc).safeTransferFrom(msg.sender, address(this), _amount);
        uint256 USDzAmount = _amount.mul(stablecoinScalingFactor());
        pooledUSDC = pooledUSDC.add(_amount);
        reserve = reserve.sub(USDzAmount);
        IERC20(USDz).safeTransfer(msg.sender, USDzAmount);

        emit Deposit(msg.sender, _amount);
    }

    /**
     * @notice Increase cap.
     * Emits a `IncreaseCap` event.
     *
     * @param _amount the amount of USDz
     */
    function increaseCap(uint256 _amount) external onlyRole(DEFAULT_ADMIN_ROLE) {
        require(_amount > 0, "DEPOSIT_AMOUNT_IS_ZERO");

        IERC20(USDz).safeTransferFrom(msg.sender, address(this), _amount);
        cap = cap.add(_amount);
        reserve = reserve.add(_amount);

        emit IncreaseCap(_amount);
    }

    /**
     * @notice Execute USDC to buy private credit.
     * Emits a `Execute` event.
     *
     * @param _amount the amount of USDC (6 decimals).
     */
    function execute(uint256 _amount) external onlyRole(POOL_MANAGER_ROLE) {
        require(_amount > 0, "EXECUTE_AMOUNT_IS_ZERO");

        executed = executed.add(_amount);
        pooledUSDC = pooledUSDC.sub(_amount);
        IERC20(usdc).safeTransfer(msg.sender, _amount);

        emit Execute(_amount);
    }

    /**
     * @notice Rescue ERC20 tokens locked up in this contract.
     * @param token ERC20 token contract address.
     * @param to recipient address.
     * @param amount amount to withdraw.
     */
    function rescueERC20(IERC20 token, address to, uint256 amount) external onlyRole(POOL_MANAGER_ROLE) {
        // If is USDC, check total executed amount first.
        if (address(token) == address(usdc)) {
            require(amount <= usdc.balanceOf(address(this)).sub(pooledUSDC), "USDC_RESCUE_AMOUNT_EXCEED_DEBIT");
        }
        if (address(token) == address(USDz)) {
            require(amount <= USDz.balanceOf(address(this)).sub(reserve), "USDz_RESCUE_AMOUNT_EXCEED_DEBIT");
        }
        token.safeTransfer(to, amount);
    }
}

File 2 of 15 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol)

pragma solidity ^0.8.20;

import {IAccessControl} from "./IAccessControl.sol";
import {Context} from "../utils/Context.sol";
import {ERC165} from "../utils/introspection/ERC165.sol";

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

    mapping(bytes32 role => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with an {AccessControlUnauthorizedAccount} error including the required role.
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

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

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

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`
     * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`
     * is missing `role`.
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert AccessControlUnauthorizedAccount(account, role);
        }
    }

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

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

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

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

        _revokeRole(role, callerConfirmation);
    }

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

    /**
     * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual returns (bool) {
        if (!hasRole(role, account)) {
            _roles[role].hasRole[account] = true;
            emit RoleGranted(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {
        if (hasRole(role, account)) {
            _roles[role].hasRole[account] = false;
            emit RoleRevoked(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }
}

File 3 of 15 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    bool private _paused;

    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    /**
     * @dev The operation failed because the contract is paused.
     */
    error EnforcedPause();

    /**
     * @dev The operation failed because the contract is not paused.
     */
    error ExpectedPause();

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        if (paused()) {
            revert EnforcedPause();
        }
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        if (!paused()) {
            revert ExpectedPause();
        }
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 4 of 15 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC1363} from "../../../interfaces/IERC1363.sol";
import {Address} from "../../../utils/Address.sol";

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

    /**
     * @dev An operation with an ERC-20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            safeTransfer(token, to, value);
        } else if (!token.transferAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target
     * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferFromAndCallRelaxed(
        IERC1363 token,
        address from,
        address to,
        uint256 value,
        bytes memory data
    ) internal {
        if (to.code.length == 0) {
            safeTransferFrom(token, from, to, value);
        } else if (!token.transferFromAndCall(from, to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.
     * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}
     * once without retrying, and relies on the returned value to be true.
     *
     * Reverts if the returned value is other than `true`.
     */
    function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            forceApprove(token, to, value);
        } else if (!token.approveAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

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

        bytes memory returndata = address(token).functionCall(data);
        if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0;
    }
}

File 5 of 15 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 6 of 15 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol)

pragma solidity ^0.8.20;

/**
 * @dev External interface of AccessControl declared to support ERC-165 detection.
 */
interface IAccessControl {
    /**
     * @dev The `account` is missing a role.
     */
    error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);

    /**
     * @dev The caller of a function is not the expected one.
     *
     * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.
     */
    error AccessControlBadConfirmation();

    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call. This account bears the admin role (for the granted role).
     * Expected in cases where the role was granted using the internal {AccessControl-_grantRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

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

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

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

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

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

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

File 7 of 15 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

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

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

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

File 8 of 15 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)

pragma solidity ^0.8.20;

import {IERC165} from "./IERC165.sol";

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

File 9 of 15 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-20 standard as defined in the ERC.
 */
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 value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

    /**
     * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` 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 value) external returns (bool);
}

File 10 of 15 : IERC1363.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1363.sol)

pragma solidity ^0.8.20;

import {IERC20} from "./IERC20.sol";
import {IERC165} from "./IERC165.sol";

/**
 * @title IERC1363
 * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].
 *
 * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract
 * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.
 */
interface IERC1363 is IERC20, IERC165 {
    /*
     * Note: the ERC-165 identifier for this interface is 0xb0202a11.
     * 0xb0202a11 ===
     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^
     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))
     */

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @param data Additional data with no specified format, sent in call to `spender`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);
}

File 11 of 15 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)

pragma solidity ^0.8.20;

import {Errors} from "./Errors.sol";

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @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://consensys.net/diligence/blog/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.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        if (address(this).balance < amount) {
            revert Errors.InsufficientBalance(address(this).balance, amount);
        }

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert Errors.FailedCall();
        }
    }

    /**
     * @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 or custom error, it is bubbled
     * up by this function (like regular Solidity function calls). However, if
     * the call reverted with no returned reason, this function reverts with a
     * {Errors.FailedCall} error.
     *
     * 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.
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0);
    }

    /**
     * @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`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert Errors.InsufficientBalance(address(this).balance, value);
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case
     * of an unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {Errors.FailedCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

    /**
     * @dev Reverts with returndata if present. Otherwise reverts with {Errors.FailedCall}.
     */
    function _revert(bytes memory returndata) private pure {
        // 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
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert Errors.FailedCall();
        }
    }
}

File 12 of 15 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

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

File 13 of 15 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)

pragma solidity ^0.8.20;

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

File 14 of 15 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../utils/introspection/IERC165.sol";

File 15 of 15 : Errors.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.20;

/**
 * @dev Collection of common custom errors used in multiple contracts
 *
 * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.
 * It is recommended to avoid relying on the error API for critical functionality.
 */
library Errors {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error InsufficientBalance(uint256 balance, uint256 needed);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedCall();

    /**
     * @dev The deployment failed.
     */
    error FailedDeployment();
}

Settings
{
  "remappings": [
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "@chainlink/contracts/=lib/chainlink/contracts/",
    "forge-std/=lib/forge-std/src/",
    "@layerzerolabs/lz-evm-protocol-v2/=lib/LayerZero-v2/packages/layerzero-v2/evm/protocol/",
    "@layerzerolabs/lz-evm-oapp-v2/=lib/LayerZero-v2/packages/layerzero-v2/evm/oapp/",
    "@createx/=lib/createx/src/",
    "@wormhole/ntt/=lib/example-native-token-transfers/evm/src/",
    "@axelar-network/axelar-gmp-sdk-solidity/contracts/=lib/axelar-gmp-sdk-solidity/contracts/",
    "LayerZero-v2/=lib/LayerZero-v2/",
    "chainlink/=lib/chainlink/contracts/",
    "createx/=lib/createx/src/",
    "ds-test/=lib/createx/lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "openzeppelin/=lib/createx/lib/openzeppelin-contracts/contracts/",
    "solady/=lib/createx/lib/solady/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "cancun",
  "viaIR": true,
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"admin","type":"address"},{"internalType":"contract IERC20","name":"_usdc","type":"address"},{"internalType":"contract IERC20","name":"_USDz","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[],"name":"FailedCall","type":"error"},{"inputs":[{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Execute","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"IncreaseCap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"POOL_MANAGER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDz","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"execute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"executed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"increaseCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pooledUSDC","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"rescueERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reserve","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"usdc","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60c0346100d557601f61115738819003918201601f19168301916001600160401b038311848410176100d9578084926060946040528339810103126100d5578051906001600160a01b03821682036100d55761007c61006c6040610065602085016100ed565b93016100ed565b9260ff1960015416600155610101565b5060805260a052604051610fb69081610181823960805181818161014f015281816102d90152818161043f0152818161084c0152610d9a015260a0518181816103390152818161046a0152818161076401526109800152f35b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b51906001600160a01b03821682036100d557565b6001600160a01b03165f8181525f80516020611137833981519152602052604090205460ff1661017b575f8181525f8051602061113783398151915260205260408120805460ff191660011790553391907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8180a4600190565b505f9056fe608060409080825260049081361015610016575f80fd5b5f3560e01c90816301ffc9a7146109af575080631c8ec0091461096c578063248a9ca3146109425780632af74b9f146109255780632f2ff15d146108fc57806331a38c89146108de578063355274ea146108c057806336568abe1461087b5780633e413bee146108385780633f4ba83a146107d0578063523e95511461073457806356d73568146106fa5780635c975abb146106d75780638456cb591461067f57806391d148541461063b578063a217fddf14610621578063b2118a8d146103ff578063b6b55f2514610259578063cd3293de1461023b578063d547741f146101ff5763fe0d94c114610107575f80fd5b346101fb5760203660031901126101fb57803591610123610b34565b82156101bf57506005548281018091116101ac57600555805490828203918211610199575561017381337f0000000000000000000000000000000000000000000000000000000000000000610d17565b7fddb556f1d2c1ec821e910b019d3685b229db152a0ecd517ca7e24b8bd71392895f80a2005b601190634e487b7160e01b5f525260245ffd5b601182634e487b7160e01b5f525260245ffd5b906020606492519162461bcd60e51b83528201526016602482015275455845435554455f414d4f554e545f49535f5a45524f60501b6044820152fd5b5f80fd5b5090346101fb57806003193601126101fb5761023991356102346001610223610a01565b93835f525f6020525f200154610bad565b610c4a565b005b82346101fb575f3660031901126101fb576020906003549051908152f35b5090346101fb5760203660031901126101fb57813590610277610d67565b8115906102848215610a17565b6102986001610291610d85565b1015610a92565b6102b064e8d4a510006102a9610d85565b1115610a92565b6003546102bb610d85565b9081850291858304148417156103ec57106103aa57506102fd8230337f0000000000000000000000000000000000000000000000000000000000000000610cbc565b610305610d85565b90818302918383041417156103975782548281018091116103845783556003548181039081116103845760035561035d90337f0000000000000000000000000000000000000000000000000000000000000000610d17565b337fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c5f80a3005b601184634e487b7160e01b5f525260245ffd5b601183634e487b7160e01b5f525260245ffd5b5162461bcd60e51b8152602081850152601b60248201527f4445504f5349545f414d4f554e545f4558434545445f4c494d495400000000006044820152606490fd5b601186634e487b7160e01b5f525260245ffd5b50346101fb5760603660031901126101fb576001600160a01b03908035828116918282036101fb5761042f610a01565b926044359461043c610b34565b807f000000000000000000000000000000000000000000000000000000000000000016808314610560575b507f00000000000000000000000000000000000000000000000000000000000000001680911461049e575b50506102399350610d17565b60206024918751928380926370a0823160e01b825230878301525afa908115610556575f91610524575b5060035481039081116101ac5784116104e15780610492565b606490602086519162461bcd60e51b8352820152601f60248201527f5553447a5f5245534355455f414d4f554e545f4558434545445f4445424954006044820152fd5b90506020813d60201161054e575b8161053f60209383610a5c565b810103126101fb57515f6104c8565b3d9150610532565b86513d5f823e3d90fd5b60206024918951928380926370a0823160e01b825230898301525afa908115610617575f916105e5575b50835481039081116103845786116105a2575f610467565b865162461bcd60e51b8152602081850152601f60248201527f555344435f5245534355455f414d4f554e545f4558434545445f4445424954006044820152606490fd5b90506020813d60201161060f575b8161060060209383610a5c565b810103126101fb57515f61058a565b3d91506105f3565b88513d5f823e3d90fd5b82346101fb575f3660031901126101fb57602090515f8152f35b5090346101fb57806003193601126101fb57602091610658610a01565b90355f525f8352815f209060018060a01b03165f52825260ff815f20541690519015158152f35b82346101fb575f3660031901126101fb5760207f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258916106bc610ade565b6106c4610d67565b600160ff198154161760015551338152a1005b82346101fb575f3660031901126101fb5760209060ff6001541690519015158152f35b82346101fb575f3660031901126101fb57602090517f6077685936c8169d09204a1d97db12e41713588c38e1d29a61867d3dcee98aff8152f35b50346101fb5760203660031901126101fb57803590610751610ade565b61075c821515610a17565b6107888230337f0000000000000000000000000000000000000000000000000000000000000000610cbc565b6002548281018091116101ac576002556003549082820180921161019957506003557ff4efe8faca8d26fe91934538378be1c5ffc6218fd0b2d5386dd4e904035031275f80a2005b5090346101fb575f3660031901126101fb576107ea610ade565b6001549160ff83161561082a577f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020838560ff191660015551338152a1005b9051638dfc202b60e01b8152fd5b82346101fb575f3660031901126101fb57517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b5090346101fb57806003193601126101fb57610895610a01565b90336001600160a01b038316036108b157506102399135610c4a565b5163334bd91960e11b81529050fd5b82346101fb575f3660031901126101fb576020906002549051908152f35b82346101fb575f3660031901126101fb576020906005549051908152f35b5090346101fb57806003193601126101fb5761023991356109206001610223610a01565b610bce565b5090346101fb575f3660031901126101fb57602091549051908152f35b5090346101fb5760203660031901126101fb57602091355f525f82526001815f2001549051908152f35b82346101fb575f3660031901126101fb57517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b82346101fb5760203660031901126101fb57359063ffffffff60e01b82168092036101fb57602091637965db0b60e01b81149081156109f0575b5015158152f35b6301ffc9a760e01b149050836109e9565b602435906001600160a01b03821682036101fb57565b15610a1e57565b60405162461bcd60e51b81526020600482015260166024820152754445504f5349545f414d4f554e545f49535f5a45524f60501b6044820152606490fd5b90601f8019910116810190811067ffffffffffffffff821117610a7e57604052565b634e487b7160e01b5f52604160045260245ffd5b15610a9957565b60405162461bcd60e51b815260206004820152601d60248201527f496e636f727265637420737461626c65636f696e20646563696d616c730000006044820152606490fd5b335f9081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff1615610b1657565b60405163e2517d3f60e01b81523360048201525f6024820152604490fd5b335f9081527f729ef9451dd492832bd2a98139702ced95dfa0cec7e99526dbbcb957abcbc47660205260409020547f6077685936c8169d09204a1d97db12e41713588c38e1d29a61867d3dcee98aff9060ff1615610b8f5750565b6044906040519063e2517d3f60e01b82523360048301526024820152fd5b805f525f60205260405f20335f5260205260ff60405f20541615610b8f5750565b90815f525f60205260405f209060018060a01b031690815f5260205260ff60405f205416155f14610c4457815f525f60205260405f20815f5260205260405f20600160ff1982541617905533917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d5f80a4600190565b50505f90565b90815f525f60205260405f209060018060a01b031690815f5260205260ff60405f2054165f14610c4457815f525f60205260405f20815f5260205260405f2060ff19815416905533917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b5f80a4600190565b6040516323b872dd60e01b60208201526001600160a01b03928316602482015292909116604483015260648083019390935291815260a081019181831067ffffffffffffffff841117610a7e57610d1592604052610e64565b565b60405163a9059cbb60e01b60208201526001600160a01b039092166024830152604480830193909352918152608081019167ffffffffffffffff831182841017610a7e57610d1592604052610e64565b60ff60015416610d7357565b60405163d93c066560e01b8152600490fd5b60405163313ce56760e01b81526020816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa8015610e59575f90610e1c575b60ff915016604d8111610e0857600a0a8015610df457670de0b6b3a76400000490565b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b506020813d602011610e51575b81610e3660209383610a5c565b810103126101fb575160ff811681036101fb5760ff90610dd1565b3d9150610e29565b6040513d5f823e3d90fd5b81516001600160a01b03909116915f91829160200182855af13d15610f11573d67ffffffffffffffff8111610a7e57610ebf9160405191610eaf6020601f19601f8401160184610a5c565b82523d5f602084013e5b83610f1d565b8051908115159182610eed575b5050610ed55750565b60249060405190635274afe760e01b82526004820152fd5b81925090602091810103126101fb57602001518015908115036101fb575f80610ecc565b610ebf90606090610eb9565b90610f445750805115610f3257805190602001fd5b60405163d6bda27560e01b8152600490fd5b81511580610f77575b610f55575090565b604051639996b31560e01b81526001600160a01b039091166004820152602490fd5b50803b15610f4d56fea2646970667358221220a590622ba8eadd11dcfbd6eacb5785a10975cfa5335bb4bcd94e45bd5aa0d1c464736f6c63430008180033ad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb50000000000000000000000003def017cd003f44aa7b49bdfcf95fd61cf5294cb000000000000000000000000430000000000000000000000000000000000000300000000000000000000000052056ed29fe015f4ba2e3b079d10c0b87f46e8c6

Deployed Bytecode

0x608060409080825260049081361015610016575f80fd5b5f3560e01c90816301ffc9a7146109af575080631c8ec0091461096c578063248a9ca3146109425780632af74b9f146109255780632f2ff15d146108fc57806331a38c89146108de578063355274ea146108c057806336568abe1461087b5780633e413bee146108385780633f4ba83a146107d0578063523e95511461073457806356d73568146106fa5780635c975abb146106d75780638456cb591461067f57806391d148541461063b578063a217fddf14610621578063b2118a8d146103ff578063b6b55f2514610259578063cd3293de1461023b578063d547741f146101ff5763fe0d94c114610107575f80fd5b346101fb5760203660031901126101fb57803591610123610b34565b82156101bf57506005548281018091116101ac57600555805490828203918211610199575561017381337f0000000000000000000000004300000000000000000000000000000000000003610d17565b7fddb556f1d2c1ec821e910b019d3685b229db152a0ecd517ca7e24b8bd71392895f80a2005b601190634e487b7160e01b5f525260245ffd5b601182634e487b7160e01b5f525260245ffd5b906020606492519162461bcd60e51b83528201526016602482015275455845435554455f414d4f554e545f49535f5a45524f60501b6044820152fd5b5f80fd5b5090346101fb57806003193601126101fb5761023991356102346001610223610a01565b93835f525f6020525f200154610bad565b610c4a565b005b82346101fb575f3660031901126101fb576020906003549051908152f35b5090346101fb5760203660031901126101fb57813590610277610d67565b8115906102848215610a17565b6102986001610291610d85565b1015610a92565b6102b064e8d4a510006102a9610d85565b1115610a92565b6003546102bb610d85565b9081850291858304148417156103ec57106103aa57506102fd8230337f0000000000000000000000004300000000000000000000000000000000000003610cbc565b610305610d85565b90818302918383041417156103975782548281018091116103845783556003548181039081116103845760035561035d90337f00000000000000000000000052056ed29fe015f4ba2e3b079d10c0b87f46e8c6610d17565b337fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c5f80a3005b601184634e487b7160e01b5f525260245ffd5b601183634e487b7160e01b5f525260245ffd5b5162461bcd60e51b8152602081850152601b60248201527f4445504f5349545f414d4f554e545f4558434545445f4c494d495400000000006044820152606490fd5b601186634e487b7160e01b5f525260245ffd5b50346101fb5760603660031901126101fb576001600160a01b03908035828116918282036101fb5761042f610a01565b926044359461043c610b34565b807f000000000000000000000000430000000000000000000000000000000000000316808314610560575b507f00000000000000000000000052056ed29fe015f4ba2e3b079d10c0b87f46e8c61680911461049e575b50506102399350610d17565b60206024918751928380926370a0823160e01b825230878301525afa908115610556575f91610524575b5060035481039081116101ac5784116104e15780610492565b606490602086519162461bcd60e51b8352820152601f60248201527f5553447a5f5245534355455f414d4f554e545f4558434545445f4445424954006044820152fd5b90506020813d60201161054e575b8161053f60209383610a5c565b810103126101fb57515f6104c8565b3d9150610532565b86513d5f823e3d90fd5b60206024918951928380926370a0823160e01b825230898301525afa908115610617575f916105e5575b50835481039081116103845786116105a2575f610467565b865162461bcd60e51b8152602081850152601f60248201527f555344435f5245534355455f414d4f554e545f4558434545445f4445424954006044820152606490fd5b90506020813d60201161060f575b8161060060209383610a5c565b810103126101fb57515f61058a565b3d91506105f3565b88513d5f823e3d90fd5b82346101fb575f3660031901126101fb57602090515f8152f35b5090346101fb57806003193601126101fb57602091610658610a01565b90355f525f8352815f209060018060a01b03165f52825260ff815f20541690519015158152f35b82346101fb575f3660031901126101fb5760207f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258916106bc610ade565b6106c4610d67565b600160ff198154161760015551338152a1005b82346101fb575f3660031901126101fb5760209060ff6001541690519015158152f35b82346101fb575f3660031901126101fb57602090517f6077685936c8169d09204a1d97db12e41713588c38e1d29a61867d3dcee98aff8152f35b50346101fb5760203660031901126101fb57803590610751610ade565b61075c821515610a17565b6107888230337f00000000000000000000000052056ed29fe015f4ba2e3b079d10c0b87f46e8c6610cbc565b6002548281018091116101ac576002556003549082820180921161019957506003557ff4efe8faca8d26fe91934538378be1c5ffc6218fd0b2d5386dd4e904035031275f80a2005b5090346101fb575f3660031901126101fb576107ea610ade565b6001549160ff83161561082a577f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020838560ff191660015551338152a1005b9051638dfc202b60e01b8152fd5b82346101fb575f3660031901126101fb57517f00000000000000000000000043000000000000000000000000000000000000036001600160a01b03168152602090f35b5090346101fb57806003193601126101fb57610895610a01565b90336001600160a01b038316036108b157506102399135610c4a565b5163334bd91960e11b81529050fd5b82346101fb575f3660031901126101fb576020906002549051908152f35b82346101fb575f3660031901126101fb576020906005549051908152f35b5090346101fb57806003193601126101fb5761023991356109206001610223610a01565b610bce565b5090346101fb575f3660031901126101fb57602091549051908152f35b5090346101fb5760203660031901126101fb57602091355f525f82526001815f2001549051908152f35b82346101fb575f3660031901126101fb57517f00000000000000000000000052056ed29fe015f4ba2e3b079d10c0b87f46e8c66001600160a01b03168152602090f35b82346101fb5760203660031901126101fb57359063ffffffff60e01b82168092036101fb57602091637965db0b60e01b81149081156109f0575b5015158152f35b6301ffc9a760e01b149050836109e9565b602435906001600160a01b03821682036101fb57565b15610a1e57565b60405162461bcd60e51b81526020600482015260166024820152754445504f5349545f414d4f554e545f49535f5a45524f60501b6044820152606490fd5b90601f8019910116810190811067ffffffffffffffff821117610a7e57604052565b634e487b7160e01b5f52604160045260245ffd5b15610a9957565b60405162461bcd60e51b815260206004820152601d60248201527f496e636f727265637420737461626c65636f696e20646563696d616c730000006044820152606490fd5b335f9081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff1615610b1657565b60405163e2517d3f60e01b81523360048201525f6024820152604490fd5b335f9081527f729ef9451dd492832bd2a98139702ced95dfa0cec7e99526dbbcb957abcbc47660205260409020547f6077685936c8169d09204a1d97db12e41713588c38e1d29a61867d3dcee98aff9060ff1615610b8f5750565b6044906040519063e2517d3f60e01b82523360048301526024820152fd5b805f525f60205260405f20335f5260205260ff60405f20541615610b8f5750565b90815f525f60205260405f209060018060a01b031690815f5260205260ff60405f205416155f14610c4457815f525f60205260405f20815f5260205260405f20600160ff1982541617905533917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d5f80a4600190565b50505f90565b90815f525f60205260405f209060018060a01b031690815f5260205260ff60405f2054165f14610c4457815f525f60205260405f20815f5260205260405f2060ff19815416905533917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b5f80a4600190565b6040516323b872dd60e01b60208201526001600160a01b03928316602482015292909116604483015260648083019390935291815260a081019181831067ffffffffffffffff841117610a7e57610d1592604052610e64565b565b60405163a9059cbb60e01b60208201526001600160a01b039092166024830152604480830193909352918152608081019167ffffffffffffffff831182841017610a7e57610d1592604052610e64565b60ff60015416610d7357565b60405163d93c066560e01b8152600490fd5b60405163313ce56760e01b81526020816004817f00000000000000000000000043000000000000000000000000000000000000036001600160a01b03165afa8015610e59575f90610e1c575b60ff915016604d8111610e0857600a0a8015610df457670de0b6b3a76400000490565b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b506020813d602011610e51575b81610e3660209383610a5c565b810103126101fb575160ff811681036101fb5760ff90610dd1565b3d9150610e29565b6040513d5f823e3d90fd5b81516001600160a01b03909116915f91829160200182855af13d15610f11573d67ffffffffffffffff8111610a7e57610ebf9160405191610eaf6020601f19601f8401160184610a5c565b82523d5f602084013e5b83610f1d565b8051908115159182610eed575b5050610ed55750565b60249060405190635274afe760e01b82526004820152fd5b81925090602091810103126101fb57602001518015908115036101fb575f80610ecc565b610ebf90606090610eb9565b90610f445750805115610f3257805190602001fd5b60405163d6bda27560e01b8152600490fd5b81511580610f77575b610f55575090565b604051639996b31560e01b81526001600160a01b039091166004820152602490fd5b50803b15610f4d56fea2646970667358221220a590622ba8eadd11dcfbd6eacb5785a10975cfa5335bb4bcd94e45bd5aa0d1c464736f6c63430008180033

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

0000000000000000000000003def017cd003f44aa7b49bdfcf95fd61cf5294cb000000000000000000000000430000000000000000000000000000000000000300000000000000000000000052056ed29fe015f4ba2e3b079d10c0b87f46e8c6

-----Decoded View---------------
Arg [0] : admin (address): 0x3deF017cd003f44aa7b49BdFcF95fD61cF5294Cb
Arg [1] : _usdc (address): 0x4300000000000000000000000000000000000003
Arg [2] : _USDz (address): 0x52056ED29Fe015f4Ba2e3b079D10C0B87f46e8c6

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000003def017cd003f44aa7b49bdfcf95fd61cf5294cb
Arg [1] : 0000000000000000000000004300000000000000000000000000000000000003
Arg [2] : 00000000000000000000000052056ed29fe015f4ba2e3b079d10c0b87f46e8c6


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
[ Download: CSV Export  ]

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