ETH Price: $2,345.28 (+1.21%)

Contract

0x4a99B95d5D35422fA6415c443af672F65FC2E3f3

Overview

ETH Balance

0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Log State Change4100362872025-12-13 1:03:1151 days ago1765587791IN
0x4a99B95d...65FC2E3f3
0 ETH0.000003410.01
Update Metadata4100339002025-12-13 0:53:1551 days ago1765587195IN
0x4a99B95d...65FC2E3f3
0 ETH0.000003980.01
Call Exchange4100338962025-12-13 0:53:1451 days ago1765587194IN
0x4a99B95d...65FC2E3f3
0 ETH0.000004120.01
Give Allowance4100338922025-12-13 0:53:1351 days ago1765587193IN
0x4a99B95d...65FC2E3f3
0 ETH0.000000450.01
Update Metadata4100338882025-12-13 0:53:1251 days ago1765587192IN
0x4a99B95d...65FC2E3f3
0 ETH0.000003760.01
Update Metadata4100315062025-12-13 0:43:1651 days ago1765586596IN
0x4a99B95d...65FC2E3f3
0 ETH0.000003980.01
Call Exchange4100315032025-12-13 0:43:1651 days ago1765586596IN
0x4a99B95d...65FC2E3f3
0 ETH0.000004340.01
Give Allowance4100314992025-12-13 0:43:1551 days ago1765586595IN
0x4a99B95d...65FC2E3f3
0 ETH0.000000650.01
Update Metadata4100314932025-12-13 0:43:1351 days ago1765586593IN
0x4a99B95d...65FC2E3f3
0 ETH0.000014330.01

Latest 1 internal transaction

Parent Transaction Hash Block From To
4100314862025-12-13 0:43:1151 days ago1765586591  Contract Creation0 ETH

Cross-Chain Transactions
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x59e1696b...25E91EB15
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
MExchangeTransaction

Compiler Version
v0.8.28+commit.7893614a

Optimization Enabled:
Yes with 200 runs

Other Settings:
cancun EvmVersion

Contract Source Code (Solidity Standard Json-Input format)

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.28;

import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./MDisablable.sol";
import "./interfaces/IExchangeTransaction.sol";

contract MExchangeTransaction is AccessControl, MDisablable, IExchangeTransaction {
    using SafeERC20 for IERC20;

    bytes32 public constant EXECUTOR_ROLE = MExchangerLib.EXECUTOR_ROLE;
    bytes32 public constant OWNER_ROLE = MExchangerLib.OWNER_ROLE;

    //Parameters
    address public owner;
    address public creator;
    address public token;

    //State
    MExchangerTransactionState public state = MExchangerTransactionState.NOT_STARTED;
    IExchangeTransaction.ExchangeTransactionLog[] public transactionLogs;
    uint256 public transactionLogCount;
    bytes public metadata;
    uint8 public retries;

    constructor(address _owner, address _executor, address[] memory _disablers, address _token) {
        require(_disablers.length > 0, "MExchanger: Disablers array is empty");
        _grantRole(OWNER_ROLE, _owner);
        _grantRole(EXECUTOR_ROLE, _executor);
        _grantRole(EXECUTOR_ROLE, _msgSender());
        for (uint256 i = 0; i < _disablers.length; i++) {
            _grantRole(DISABLER_ROLE, _disablers[i]);
        }
        owner = _owner;
        creator = _msgSender();
        token = _token;
    }

    //Owner functions
    function withdrawAllToken() external onlyRole(OWNER_ROLE) {
        IERC20(token).safeTransfer(owner, IERC20(token).balanceOf(address(this)));
    }

    function withdrawToken(uint256 _amount) external onlyRole(OWNER_ROLE) {
        IERC20(token).safeTransfer(owner, _amount);
    }

    function withdrawCustom(address _token, uint256 _amount) external onlyRole(OWNER_ROLE) {
        IERC20(_token).safeTransfer(owner, _amount);
    }

    //Executor functions
    function callExchange(address _exchange, bytes memory _data, uint256 _gasLimit, MExchangerTransactionState nextState) external onlyRole(EXECUTOR_ROLE) onlyEnabled {
        (bool success, bytes memory res) = _exchange.call{gas: _gasLimit}(_data);
        emit ExchangeCalled(_exchange, _data, _gasLimit, success, res);
        if (!success) {
            string memory revertMsg = _getRevertMsg(res);
            revert(revertMsg);
        }
        _log(state, nextState, 0, "", "");
    }

    function updateMetadata(bytes memory _metadata) external onlyRole(EXECUTOR_ROLE) onlyEnabled {
        metadata = _metadata;
    }

    function giveAllowance(address _spender, uint256 _amount) external onlyRole(EXECUTOR_ROLE) onlyEnabled {
        IERC20(token).approve(_spender, _amount);
    }

    function logStateChange(MExchangerTransactionState finalState) external onlyRole(EXECUTOR_ROLE) onlyEnabled {
        _log(state, finalState, 0, "", "");
    }

    function logStateChange(MExchangerTransactionState finalState, uint256 amountExchanged) external onlyRole(EXECUTOR_ROLE) onlyEnabled {
        _log(state, finalState, amountExchanged, "", "");
    }

    function logStateChange(
        MExchangerTransactionState finalState,
        uint256 amountExchanged,
        string calldata transactionHash,
        string calldata message,
        uint8 maxRetries
    ) external onlyRole(EXECUTOR_ROLE) onlyEnabled {
        if (finalState == MExchangerTransactionState.FAILED_RETRYING) {
            retries += 1;
            if (retries > maxRetries) {
                _withdrawToOwner();
                finalState = MExchangerTransactionState.FAILED;
            }
        }
        _log(state, finalState, amountExchanged, transactionHash, message);
    }

    //Views
    function getLastLog() external view returns (IExchangeTransaction.ExchangeTransactionLog memory) {
        if (transactionLogCount == 0) {
            return IExchangeTransaction.ExchangeTransactionLog(0, MExchangerTransactionState.NOT_STARTED, MExchangerTransactionState.NOT_STARTED, 0, "", "");
        }
        return transactionLogs[transactionLogCount - 1];
    }

    //Internal functions
    function _getRevertMsg(bytes memory _returnData) internal pure returns (string memory) {
        // If the _res length is less than 68, then the transaction failed silently (without a revert message)
        if (_returnData.length < 68) return "Transaction reverted silently";

        assembly {
            // Slice the sighash.
            _returnData := add(_returnData, 0x04)
        }
        return abi.decode(_returnData, (string)); // All that remains is the revert string
    }

    function _log(MExchangerTransactionState initialState, MExchangerTransactionState finalState, uint256 amountExchanged, string memory transactionHash, string memory message) internal {
        IExchangeTransaction.ExchangeTransactionLog memory logEntry = IExchangeTransaction.ExchangeTransactionLog({
            timestamp: block.timestamp,
            initialState: initialState,
            finalState: finalState,
            amountExchanged: amountExchanged,
            transactionHash: transactionHash,
            message: message
        });
        transactionLogs.push(logEntry);
        transactionLogCount++;
        state = finalState;

        emit ExchangeTransactionLogEvent(initialState, finalState, amountExchanged, transactionHash, message);
    }

    function _withdrawToOwner() internal {
        uint256 bal = IERC20(token).balanceOf(address(this));
        if (bal > 0) {
            IERC20(token).safeTransfer(owner, bal);
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (access/AccessControl.sol)

pragma solidity ^0.8.20;

import {IAccessControl} from "./IAccessControl.sol";
import {Context} from "../utils/Context.sol";
import {IERC165, 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);
        _;
    }

    /// @inheritdoc IERC165
    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` from `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;
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (access/IAccessControl.sol)

pragma solidity >=0.8.4;

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)

pragma solidity >=0.6.2;

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 5 of 15 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)

pragma solidity >=0.4.16;

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

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

pragma solidity >=0.4.16;

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)

pragma solidity >=0.4.16;

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC1363} from "../../../interfaces/IERC1363.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 {
    /**
     * @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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.
     */
    function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {
        return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.
     */
    function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {
        return _callOptionalReturnBool(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.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    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.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    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.
     *
     * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function
     * only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being
     * set here.
     */
    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).
     *
     * This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements.
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            // bubble errors
            if iszero(success) {
                let ptr := mload(0x40)
                returndatacopy(ptr, 0, returndatasize())
                revert(ptr, returndatasize())
            }
            returnSize := returndatasize()
            returnValue := mload(0)
        }

        if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {
            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 silently catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        bool success;
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            returnSize := returndatasize()
            returnValue := mload(0)
        }
        return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);
    }
}

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.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 {
    /// @inheritdoc IERC165
    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)

pragma solidity >=0.4.16;

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

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.28;

interface IDisablable {
    error ContractDisabled();

    function disablers(uint256 index) external view returns (address);

    function disabled() external view returns (bool);

    function disableContract() external;

    function enableContract() external;
}

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.28;

interface IExchangeTransaction {
    // Events
    event ExchangeCalled(address indexed exchange, bytes data, uint256 gasLimit, bool success, bytes res);
    event ExchangeTransactionLogEvent(MExchangerTransactionState initialState, MExchangerTransactionState finalState, uint256 amountExchanged, string transactionHash, string message);

    //Types
    struct ExchangeTransactionLog {
        uint256 timestamp;
        MExchangerTransactionState initialState;
        MExchangerTransactionState finalState;
        uint256 amountExchanged;
        string transactionHash;
        string message;
    }

    enum MExchangerTransactionState {
        NOT_STARTED,
        GOT_LIQUIDITY,
        IN_DM2,
        GOT_DM2,
        PENDING_EXCHANGE,
        COMPLETED,
        FAILED_RETRYING,
        FAILED
    }

    // Parameters
    function owner() external view returns (address);

    function creator() external view returns (address);

    function token() external view returns (address);

    // State
    function state() external view returns (MExchangerTransactionState);

    function transactionLogs(
        uint256
    )
        external
        view
        returns (uint256 timestamp, MExchangerTransactionState initialState, MExchangerTransactionState finalState, uint256 amountExchanged, string memory transactionHash, string memory message);

    function metadata() external view returns (bytes memory);

    // Owner functions
    function withdrawAllToken() external;

    function withdrawToken(uint256 _amount) external;

    function withdrawCustom(address _token, uint256 _amount) external;

    // Executor functions
    function callExchange(address _exchange, bytes memory _data, uint256 _gasLimit, MExchangerTransactionState nextState) external;

    function updateMetadata(bytes memory _metadata) external;

    function giveAllowance(address _spender, uint256 _amount) external;

    function logStateChange(MExchangerTransactionState finalState) external;

    function logStateChange(MExchangerTransactionState finalState, uint256 amountExchanged) external;

    function logStateChange(MExchangerTransactionState finalState, uint256 amountExchanged, string calldata transactionHash, string calldata message, uint8 maxRetries) external;

    function getLastLog() external view returns (IExchangeTransaction.ExchangeTransactionLog memory);

    function transactionLogCount() external view returns (uint256);
}

File 14 of 15 : MExchangerLib.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.28;

library MExchangerLib {
    bytes32 public constant DISABLER_ROLE = keccak256("DISABLER_ROLE");
    bytes32 public constant OWNER_ROLE = keccak256("OWNER_ROLE");
    bytes32 public constant EXECUTOR_ROLE = keccak256("EXECUTOR_ROLE");
    bytes32 public constant FMGR_SETTER_ROLE = keccak256("FMGR_SETTER_ROLE");
}

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.28;

import "@openzeppelin/contracts/access/AccessControl.sol";
import "./libraries/MExchangerLib.sol";
import "./interfaces/IDisablable.sol";

abstract contract MDisablable is AccessControl, IDisablable {
    address[] public disablers;
    bool public disabled = false;
    bytes32 public constant DISABLER_ROLE = MExchangerLib.DISABLER_ROLE;

    modifier onlyEnabled() {
        require(!disabled, IDisablable.ContractDisabled());
        _;
    }

    //Disabler functions
    function disableContract() external onlyRole(DISABLER_ROLE) {
        disabled = true;
    }

    function enableContract() external onlyRole(DISABLER_ROLE) {
        disabled = false;
    }
}

Settings
{
  "evmVersion": "cancun",
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "remappings": [
    "project/:@openzeppelin/contracts/=npm/@openzeppelin/[email protected]/",
    "project/:@openzeppelin/contracts/=npm/@openzeppelin/[email protected]/",
    "project/:@openzeppelin/contracts/=npm/@openzeppelin/[email protected]/"
  ]
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_executor","type":"address"},{"internalType":"address[]","name":"_disablers","type":"address[]"},{"internalType":"address","name":"_token","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":[],"name":"ContractDisabled","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"exchange","type":"address"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"gasLimit","type":"uint256"},{"indexed":false,"internalType":"bool","name":"success","type":"bool"},{"indexed":false,"internalType":"bytes","name":"res","type":"bytes"}],"name":"ExchangeCalled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"enum IExchangeTransaction.MExchangerTransactionState","name":"initialState","type":"uint8"},{"indexed":false,"internalType":"enum IExchangeTransaction.MExchangerTransactionState","name":"finalState","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"amountExchanged","type":"uint256"},{"indexed":false,"internalType":"string","name":"transactionHash","type":"string"},{"indexed":false,"internalType":"string","name":"message","type":"string"}],"name":"ExchangeTransactionLogEvent","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"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DISABLER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EXECUTOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OWNER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_exchange","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"},{"internalType":"uint256","name":"_gasLimit","type":"uint256"},{"internalType":"enum IExchangeTransaction.MExchangerTransactionState","name":"nextState","type":"uint8"}],"name":"callExchange","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"creator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"disableContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"disabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"disablers","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"enableContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getLastLog","outputs":[{"components":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"enum IExchangeTransaction.MExchangerTransactionState","name":"initialState","type":"uint8"},{"internalType":"enum IExchangeTransaction.MExchangerTransactionState","name":"finalState","type":"uint8"},{"internalType":"uint256","name":"amountExchanged","type":"uint256"},{"internalType":"string","name":"transactionHash","type":"string"},{"internalType":"string","name":"message","type":"string"}],"internalType":"struct IExchangeTransaction.ExchangeTransactionLog","name":"","type":"tuple"}],"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":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"giveAllowance","outputs":[],"stateMutability":"nonpayable","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":"enum IExchangeTransaction.MExchangerTransactionState","name":"finalState","type":"uint8"},{"internalType":"uint256","name":"amountExchanged","type":"uint256"},{"internalType":"string","name":"transactionHash","type":"string"},{"internalType":"string","name":"message","type":"string"},{"internalType":"uint8","name":"maxRetries","type":"uint8"}],"name":"logStateChange","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum IExchangeTransaction.MExchangerTransactionState","name":"finalState","type":"uint8"}],"name":"logStateChange","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum IExchangeTransaction.MExchangerTransactionState","name":"finalState","type":"uint8"},{"internalType":"uint256","name":"amountExchanged","type":"uint256"}],"name":"logStateChange","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"metadata","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"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":[],"name":"retries","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"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":[],"name":"state","outputs":[{"internalType":"enum IExchangeTransaction.MExchangerTransactionState","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"transactionLogCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"transactionLogs","outputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"enum IExchangeTransaction.MExchangerTransactionState","name":"initialState","type":"uint8"},{"internalType":"enum IExchangeTransaction.MExchangerTransactionState","name":"finalState","type":"uint8"},{"internalType":"uint256","name":"amountExchanged","type":"uint256"},{"internalType":"string","name":"transactionHash","type":"string"},{"internalType":"string","name":"message","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_metadata","type":"bytes"}],"name":"updateMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAllToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawCustom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"}]

0x60806040526002805460ff191690556004805460ff60a01b19169055348015610026575f5ffd5b5060405161207238038061207283398101604081905261004591610295565b5f8251116100a55760405162461bcd60e51b8152602060048201526024808201527f4d45786368616e6765723a2044697361626c65727320617272617920697320656044820152636d70747960e01b606482015260840160405180910390fd5b6100cf7fb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e856101bd565b506100e75f5160206120525f395f51905f52846101bd565b506100ff5f5160206120525f395f51905f52336101bd565b505f5b825181101561015d576101547fb0fdd1623e42dbffda4acd8bd643e1cb69f00f0e83abeaa8150ee42cf0fd105e84838151811061014157610141610392565b60200260200101516101bd60201b60201c565b50600101610102565b5060028054610100600160a81b0319166101006001600160a01b038716021790556101853390565b600380546001600160a01b039283166001600160a01b03199182161790915560048054939092169216919091179055506103a6915050565b5f828152602081815260408083206001600160a01b038516845290915281205460ff1661025d575f838152602081815260408083206001600160a01b03861684529091529020805460ff191660011790556102153390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4506001610260565b505f5b92915050565b80516001600160a01b038116811461027c575f5ffd5b919050565b634e487b7160e01b5f52604160045260245ffd5b5f5f5f5f608085870312156102a8575f5ffd5b6102b185610266565b93506102bf60208601610266565b60408601519093506001600160401b038111156102da575f5ffd5b8501601f810187136102ea575f5ffd5b80516001600160401b0381111561030357610303610281565b604051600582901b90603f8201601f191681016001600160401b038111828210171561033157610331610281565b60405291825260208184018101929081018a84111561034e575f5ffd5b6020850194505b838510156103745761036685610266565b815260209485019401610355565b5094506103879250505060608601610266565b905092959194509250565b634e487b7160e01b5f52603260045260245ffd5b611c9f806103b35f395ff3fe608060405234801561000f575f5ffd5b50600436106101e7575f3560e01c80638da5cb5b11610109578063d547741f1161009e578063ee0708051161006e578063ee0708051461044d578063f1f69f221461045a578063fc0c546a1461047f578063fc582d4114610492575f5ffd5b8063d547741f14610400578063d6014b4a14610413578063dcc0a5ae14610426578063e58378bb14610439575f5ffd5b8063c19d93fb116100d9578063c19d93fb1461039c578063c734975f146103bd578063d2351cee146103d0578063d520c93b146103f7575f5ffd5b80638da5cb5b1461035757806391d148541461036f578063958ff7fb14610382578063a217fddf14610395575f5ffd5b8063367edd321161017f5780636196d5a21161014f5780636196d5a2146103165780637af41be014610329578063894ba8331461033c5780638c06f11b14610344575f5ffd5b8063367edd32146102d1578063392f37e9146102d957806350baa622146102ee578063547c09a814610301575f5ffd5b80631c7c3773116101ba5780631c7c37731461026a578063248a9ca3146102895780632f2ff15d146102ab57806336568abe146102be575f5ffd5b806301ffc9a7146101eb57806302d05d3f1461021357806307bd02651461023e57806314870d2c14610260575b5f5ffd5b6101fe6101f93660046114a8565b6104a5565b60405190151581526020015b60405180910390f35b600354610226906001600160a01b031681565b6040516001600160a01b03909116815260200161020a565b6102525f516020611c4a5f395f51905f5281565b60405190815260200161020a565b6102686104db565b005b6008546102779060ff1681565b60405160ff909116815260200161020a565b6102526102973660046114d6565b5f9081526020819052604090206001015490565b6102686102b9366004611508565b610584565b6102686102cc366004611508565b6105ae565b6102686105e6565b6102e161061d565b60405161020a9190611560565b6102686102fc3660046114d6565b6106a9565b6103096106e7565b60405161020a91906115a6565b610268610324366004611674565b610950565b610268610337366004611715565b610a80565b610268610ab6565b6102266103523660046114d6565b610af0565b6002546102269061010090046001600160a01b031681565b6101fe61037d366004611508565b610b18565b610268610390366004611715565b610b40565b6102525f81565b6004546103b090600160a01b900460ff1681565b60405161020a919061173d565b6102686103cb36600461174b565b610bf1565b6102527fb0fdd1623e42dbffda4acd8bd643e1cb69f00f0e83abeaa8150ee42cf0fd105e81565b61025260065481565b61026861040e366004611508565b610c64565b610268610421366004611822565b610c88565b610268610434366004611886565b610dde565b6102525f516020611c2a5f395f51905f5281565b6002546101fe9060ff1681565b61046d6104683660046114d6565b610e51565b60405161020a969594939291906118a0565b600454610226906001600160a01b031681565b6102686104a03660046118f7565b610fab565b5f6001600160e01b03198216637965db0b60e01b14806104d557506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f516020611c2a5f395f51905f526104f281610ff2565b600254600480546040516370a0823160e01b815230928101929092526105819261010090046001600160a01b03908116929116906370a0823190602401602060405180830381865afa15801561054a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061056e9190611931565b6004546001600160a01b03169190610ffc565b50565b5f8281526020819052604090206001015461059e81610ff2565b6105a8838361104e565b50505050565b6001600160a01b03811633146105d75760405163334bd91960e11b815260040160405180910390fd5b6105e182826110dd565b505050565b7fb0fdd1623e42dbffda4acd8bd643e1cb69f00f0e83abeaa8150ee42cf0fd105e61061081610ff2565b506002805460ff19169055565b6007805461062a90611948565b80601f016020809104026020016040519081016040528092919081815260200182805461065690611948565b80156106a15780601f10610678576101008083540402835291602001916106a1565b820191905f5260205f20905b81548152906001019060200180831161068457829003601f168201915b505050505081565b5f516020611c2a5f395f51905f526106c081610ff2565b6002546004546106e3916001600160a01b03918216916101009091041684610ffc565b5050565b61071e6040805160c081019091525f808252602082019081526020015f81526020015f815260200160608152602001606081525090565b6006545f0361076f57506040805160c0810182525f8082526020808301829052828401829052606083018290528351808201855282815260808401528351908101909352825260a081019190915290565b600560016006546107809190611994565b81548110610790576107906119a7565b905f5260205f2090600502016040518060c00160405290815f8201548152602001600182015f9054906101000a900460ff1660078111156107d3576107d3611572565b60078111156107e4576107e4611572565b81526020016001820160019054906101000a900460ff16600781111561080c5761080c611572565b600781111561081d5761081d611572565b81526020016002820154815260200160038201805461083b90611948565b80601f016020809104026020016040519081016040528092919081815260200182805461086790611948565b80156108b25780601f10610889576101008083540402835291602001916108b2565b820191905f5260205f20905b81548152906001019060200180831161089557829003601f168201915b505050505081526020016004820180546108cb90611948565b80601f01602080910402602001604051908101604052809291908181526020018280546108f790611948565b80156109425780601f1061091957610100808354040283529160200191610942565b820191905f5260205f20905b81548152906001019060200180831161092557829003601f168201915b505050505081525050905090565b5f516020611c4a5f395f51905f5261096781610ff2565b60025460ff161561098b576040516303b14e6560e51b815260040160405180910390fd5b600688600781111561099f5761099f611572565b036109f35760088054600191905f906109bc90849060ff166119bb565b82546101009290920a60ff8181021990931691831602179091556008548482169116111590506109f3576109ee611146565b600797505b610a76600460149054906101000a900460ff16898989898080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525050604080516020601f8d018190048102820181019092528b815292508b91508a90819084018382808284375f920191909152506111e092505050565b5050505050505050565b5f516020611c2a5f395f51905f52610a9781610ff2565b6002546105e1906001600160a01b038581169161010090041684610ffc565b7fb0fdd1623e42dbffda4acd8bd643e1cb69f00f0e83abeaa8150ee42cf0fd105e610ae081610ff2565b506002805460ff19166001179055565b60018181548110610aff575f80fd5b5f918252602090912001546001600160a01b0316905081565b5f918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b5f516020611c4a5f395f51905f52610b5781610ff2565b60025460ff1615610b7b576040516303b14e6560e51b815260040160405180910390fd5b6004805460405163095ea7b360e01b81526001600160a01b03868116938201939093526024810185905291169063095ea7b3906044016020604051808303815f875af1158015610bcd573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105a891906119d4565b5f516020611c4a5f395f51905f52610c0881610ff2565b60025460ff1615610c2c576040516303b14e6560e51b815260040160405180910390fd5b6106e3600460149054906101000a900460ff16835f60405180602001604052805f81525060405180602001604052805f8152506111e0565b5f82815260208190526040902060010154610c7e81610ff2565b6105a883836110dd565b5f516020611c4a5f395f51905f52610c9f81610ff2565b60025460ff1615610cc3576040516303b14e6560e51b815260040160405180910390fd5b5f5f866001600160a01b03168587604051610cde91906119f3565b5f604051808303815f8787f1925050503d805f8114610d18576040519150601f19603f3d011682016040523d82523d5f602084013e610d1d565b606091505b5091509150866001600160a01b03167ffe4390ec6739283b5a252253424f5d27a7404f6080ccdc2bf72fa646437d22a387878585604051610d619493929190611a09565b60405180910390a281610d9d575f610d78826113a4565b90508060405162461bcd60e51b8152600401610d949190611560565b60405180910390fd5b610dd5600460149054906101000a900460ff16855f60405180602001604052805f81525060405180602001604052805f8152506111e0565b50505050505050565b5f516020611c4a5f395f51905f52610df581610ff2565b60025460ff1615610e19576040516303b14e6560e51b815260040160405180910390fd5b6105e1600460149054906101000a900460ff16848460405180602001604052805f81525060405180602001604052805f8152506111e0565b60058181548110610e60575f80fd5b5f918252602090912060059091020180546001820154600283015460038401805493955060ff808416956101009094041693919291610e9e90611948565b80601f0160208091040260200160405190810160405280929190818152602001828054610eca90611948565b8015610f155780601f10610eec57610100808354040283529160200191610f15565b820191905f5260205f20905b815481529060010190602001808311610ef857829003601f168201915b505050505090806004018054610f2a90611948565b80601f0160208091040260200160405190810160405280929190818152602001828054610f5690611948565b8015610fa15780601f10610f7857610100808354040283529160200191610fa1565b820191905f5260205f20905b815481529060010190602001808311610f8457829003601f168201915b5050505050905086565b5f516020611c4a5f395f51905f52610fc281610ff2565b60025460ff1615610fe6576040516303b14e6560e51b815260040160405180910390fd5b60076105e18382611a91565b6105818133611403565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526105e190849061143c565b5f6110598383610b18565b6110d6575f838152602081815260408083206001600160a01b03861684529091529020805460ff1916600117905561108e3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016104d5565b505f6104d5565b5f6110e88383610b18565b156110d6575f838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016104d5565b600480546040516370a0823160e01b815230928101929092525f916001600160a01b03909116906370a0823190602401602060405180830381865afa158015611191573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111b59190611931565b9050801561058157600254600454610581916001600160a01b03918216916101009091041683610ffc565b5f6040518060c0016040528042815260200187600781111561120457611204611572565b815260200186600781111561121b5761121b611572565b8152602080820187905260408201869052606090910184905260058054600181810183555f8390528451919092027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db08101918255928401517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db190930180549495508594919392909160ff1916908360078111156112ba576112ba611572565b0217905550604082015160018201805461ff0019166101008360078111156112e4576112e4611572565b021790555060608201516002820155608082015160038201906113079082611a91565b5060a0820151600482019061131c9082611a91565b50506006805491505f61132e83611b4c565b90915550506004805486919060ff60a01b1916600160a01b83600781111561135857611358611572565b02179055507f037c9601db24498b19ea624a38591528bb3dbbea772973438a34f70abd67370a8686868686604051611394959493929190611b64565b60405180910390a1505050505050565b60606044825110156113e957505060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c79000000602082015290565b600482019150818060200190518101906104d59190611bb4565b61140d8282610b18565b6106e35760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610d94565b5f5f60205f8451602086015f885af18061145b576040513d5f823e3d81fd5b50505f513d9150811561147257806001141561147f565b6001600160a01b0384163b155b156105a857604051635274afe760e01b81526001600160a01b0385166004820152602401610d94565b5f602082840312156114b8575f5ffd5b81356001600160e01b0319811681146114cf575f5ffd5b9392505050565b5f602082840312156114e6575f5ffd5b5035919050565b80356001600160a01b0381168114611503575f5ffd5b919050565b5f5f60408385031215611519575f5ffd5b82359150611529602084016114ed565b90509250929050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6114cf6020830184611532565b634e487b7160e01b5f52602160045260245ffd5b600881106115a257634e487b7160e01b5f52602160045260245ffd5b9052565b60208152815160208201525f60208301516115c46040840182611586565b5060408301516115d76060840182611586565b5060608301516080830152608083015160c060a08401526115fb60e0840182611532565b905060a0840151601f198483030160c08501526116188282611532565b95945050505050565b803560088110611503575f5ffd5b5f5f83601f84011261163f575f5ffd5b50813567ffffffffffffffff811115611656575f5ffd5b60208301915083602082850101111561166d575f5ffd5b9250929050565b5f5f5f5f5f5f5f60a0888a03121561168a575f5ffd5b61169388611621565b965060208801359550604088013567ffffffffffffffff8111156116b5575f5ffd5b6116c18a828b0161162f565b909650945050606088013567ffffffffffffffff8111156116e0575f5ffd5b6116ec8a828b0161162f565b909450925050608088013560ff81168114611705575f5ffd5b8091505092959891949750929550565b5f5f60408385031215611726575f5ffd5b61172f836114ed565b946020939093013593505050565b602081016104d58284611586565b5f6020828403121561175b575f5ffd5b6114cf82611621565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156117a1576117a1611764565b604052919050565b5f67ffffffffffffffff8211156117c2576117c2611764565b50601f01601f191660200190565b5f82601f8301126117df575f5ffd5b81356117f26117ed826117a9565b611778565b818152846020838601011115611806575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f5f60808587031215611835575f5ffd5b61183e856114ed565b9350602085013567ffffffffffffffff811115611859575f5ffd5b611865878288016117d0565b9350506040850135915061187b60608601611621565b905092959194509250565b5f5f60408385031215611897575f5ffd5b61172f83611621565b8681526118b06020820187611586565b6118bd6040820186611586565b83606082015260c060808201525f6118d860c0830185611532565b82810360a08401526118ea8185611532565b9998505050505050505050565b5f60208284031215611907575f5ffd5b813567ffffffffffffffff81111561191d575f5ffd5b611929848285016117d0565b949350505050565b5f60208284031215611941575f5ffd5b5051919050565b600181811c9082168061195c57607f821691505b60208210810361197a57634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156104d5576104d5611980565b634e487b7160e01b5f52603260045260245ffd5b60ff81811683821601908111156104d5576104d5611980565b5f602082840312156119e4575f5ffd5b815180151581146114cf575f5ffd5b5f82518060208501845e5f920191825250919050565b608081525f611a1b6080830187611532565b85602084015284151560408401528281036060840152611a3b8185611532565b979650505050505050565b601f8211156105e157805f5260205f20601f840160051c81016020851015611a6b5750805b601f840160051c820191505b81811015611a8a575f8155600101611a77565b5050505050565b815167ffffffffffffffff811115611aab57611aab611764565b611abf81611ab98454611948565b84611a46565b6020601f821160018114611af1575f8315611ada5750848201515b5f19600385901b1c1916600184901b178455611a8a565b5f84815260208120601f198516915b82811015611b205787850151825560209485019460019092019101611b00565b5084821015611b3d57868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b5f60018201611b5d57611b5d611980565b5060010190565b611b6e8187611586565b611b7b6020820186611586565b83604082015260a060608201525f611b9660a0830185611532565b8281036080840152611ba88185611532565b98975050505050505050565b5f60208284031215611bc4575f5ffd5b815167ffffffffffffffff811115611bda575f5ffd5b8201601f81018413611bea575f5ffd5b8051611bf86117ed826117a9565b818152856020838501011115611c0c575f5ffd5b8160208401602083015e5f9181016020019190915294935050505056feb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214ed8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63a2646970667358221220a371cc0246dabc3c3b0e4e95260f9df55cdc7bdae2389e873cf4c5aaaa4613ac64736f6c634300081c0033d8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63000000000000000000000000570f35a9c06631a9b506ccfe531a9a89995fc69900000000000000000000000007e6d977873aff7287537a3751cbbb6706cc264a0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000af88d065e77c8cc2239327c5edb3a432268e5831000000000000000000000000000000000000000000000000000000000000000300000000000000000000000066c9269d75ab52941e325d9c1e3b156a325e8a90000000000000000000000000c628d9cb35abb3d7643503a06380255c0a609be0000000000000000000000000570f35a9c06631a9b506ccfe531a9a89995fc699

Deployed Bytecode

0x608060405234801561000f575f5ffd5b50600436106101e7575f3560e01c80638da5cb5b11610109578063d547741f1161009e578063ee0708051161006e578063ee0708051461044d578063f1f69f221461045a578063fc0c546a1461047f578063fc582d4114610492575f5ffd5b8063d547741f14610400578063d6014b4a14610413578063dcc0a5ae14610426578063e58378bb14610439575f5ffd5b8063c19d93fb116100d9578063c19d93fb1461039c578063c734975f146103bd578063d2351cee146103d0578063d520c93b146103f7575f5ffd5b80638da5cb5b1461035757806391d148541461036f578063958ff7fb14610382578063a217fddf14610395575f5ffd5b8063367edd321161017f5780636196d5a21161014f5780636196d5a2146103165780637af41be014610329578063894ba8331461033c5780638c06f11b14610344575f5ffd5b8063367edd32146102d1578063392f37e9146102d957806350baa622146102ee578063547c09a814610301575f5ffd5b80631c7c3773116101ba5780631c7c37731461026a578063248a9ca3146102895780632f2ff15d146102ab57806336568abe146102be575f5ffd5b806301ffc9a7146101eb57806302d05d3f1461021357806307bd02651461023e57806314870d2c14610260575b5f5ffd5b6101fe6101f93660046114a8565b6104a5565b60405190151581526020015b60405180910390f35b600354610226906001600160a01b031681565b6040516001600160a01b03909116815260200161020a565b6102525f516020611c4a5f395f51905f5281565b60405190815260200161020a565b6102686104db565b005b6008546102779060ff1681565b60405160ff909116815260200161020a565b6102526102973660046114d6565b5f9081526020819052604090206001015490565b6102686102b9366004611508565b610584565b6102686102cc366004611508565b6105ae565b6102686105e6565b6102e161061d565b60405161020a9190611560565b6102686102fc3660046114d6565b6106a9565b6103096106e7565b60405161020a91906115a6565b610268610324366004611674565b610950565b610268610337366004611715565b610a80565b610268610ab6565b6102266103523660046114d6565b610af0565b6002546102269061010090046001600160a01b031681565b6101fe61037d366004611508565b610b18565b610268610390366004611715565b610b40565b6102525f81565b6004546103b090600160a01b900460ff1681565b60405161020a919061173d565b6102686103cb36600461174b565b610bf1565b6102527fb0fdd1623e42dbffda4acd8bd643e1cb69f00f0e83abeaa8150ee42cf0fd105e81565b61025260065481565b61026861040e366004611508565b610c64565b610268610421366004611822565b610c88565b610268610434366004611886565b610dde565b6102525f516020611c2a5f395f51905f5281565b6002546101fe9060ff1681565b61046d6104683660046114d6565b610e51565b60405161020a969594939291906118a0565b600454610226906001600160a01b031681565b6102686104a03660046118f7565b610fab565b5f6001600160e01b03198216637965db0b60e01b14806104d557506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f516020611c2a5f395f51905f526104f281610ff2565b600254600480546040516370a0823160e01b815230928101929092526105819261010090046001600160a01b03908116929116906370a0823190602401602060405180830381865afa15801561054a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061056e9190611931565b6004546001600160a01b03169190610ffc565b50565b5f8281526020819052604090206001015461059e81610ff2565b6105a8838361104e565b50505050565b6001600160a01b03811633146105d75760405163334bd91960e11b815260040160405180910390fd5b6105e182826110dd565b505050565b7fb0fdd1623e42dbffda4acd8bd643e1cb69f00f0e83abeaa8150ee42cf0fd105e61061081610ff2565b506002805460ff19169055565b6007805461062a90611948565b80601f016020809104026020016040519081016040528092919081815260200182805461065690611948565b80156106a15780601f10610678576101008083540402835291602001916106a1565b820191905f5260205f20905b81548152906001019060200180831161068457829003601f168201915b505050505081565b5f516020611c2a5f395f51905f526106c081610ff2565b6002546004546106e3916001600160a01b03918216916101009091041684610ffc565b5050565b61071e6040805160c081019091525f808252602082019081526020015f81526020015f815260200160608152602001606081525090565b6006545f0361076f57506040805160c0810182525f8082526020808301829052828401829052606083018290528351808201855282815260808401528351908101909352825260a081019190915290565b600560016006546107809190611994565b81548110610790576107906119a7565b905f5260205f2090600502016040518060c00160405290815f8201548152602001600182015f9054906101000a900460ff1660078111156107d3576107d3611572565b60078111156107e4576107e4611572565b81526020016001820160019054906101000a900460ff16600781111561080c5761080c611572565b600781111561081d5761081d611572565b81526020016002820154815260200160038201805461083b90611948565b80601f016020809104026020016040519081016040528092919081815260200182805461086790611948565b80156108b25780601f10610889576101008083540402835291602001916108b2565b820191905f5260205f20905b81548152906001019060200180831161089557829003601f168201915b505050505081526020016004820180546108cb90611948565b80601f01602080910402602001604051908101604052809291908181526020018280546108f790611948565b80156109425780601f1061091957610100808354040283529160200191610942565b820191905f5260205f20905b81548152906001019060200180831161092557829003601f168201915b505050505081525050905090565b5f516020611c4a5f395f51905f5261096781610ff2565b60025460ff161561098b576040516303b14e6560e51b815260040160405180910390fd5b600688600781111561099f5761099f611572565b036109f35760088054600191905f906109bc90849060ff166119bb565b82546101009290920a60ff8181021990931691831602179091556008548482169116111590506109f3576109ee611146565b600797505b610a76600460149054906101000a900460ff16898989898080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525050604080516020601f8d018190048102820181019092528b815292508b91508a90819084018382808284375f920191909152506111e092505050565b5050505050505050565b5f516020611c2a5f395f51905f52610a9781610ff2565b6002546105e1906001600160a01b038581169161010090041684610ffc565b7fb0fdd1623e42dbffda4acd8bd643e1cb69f00f0e83abeaa8150ee42cf0fd105e610ae081610ff2565b506002805460ff19166001179055565b60018181548110610aff575f80fd5b5f918252602090912001546001600160a01b0316905081565b5f918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b5f516020611c4a5f395f51905f52610b5781610ff2565b60025460ff1615610b7b576040516303b14e6560e51b815260040160405180910390fd5b6004805460405163095ea7b360e01b81526001600160a01b03868116938201939093526024810185905291169063095ea7b3906044016020604051808303815f875af1158015610bcd573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105a891906119d4565b5f516020611c4a5f395f51905f52610c0881610ff2565b60025460ff1615610c2c576040516303b14e6560e51b815260040160405180910390fd5b6106e3600460149054906101000a900460ff16835f60405180602001604052805f81525060405180602001604052805f8152506111e0565b5f82815260208190526040902060010154610c7e81610ff2565b6105a883836110dd565b5f516020611c4a5f395f51905f52610c9f81610ff2565b60025460ff1615610cc3576040516303b14e6560e51b815260040160405180910390fd5b5f5f866001600160a01b03168587604051610cde91906119f3565b5f604051808303815f8787f1925050503d805f8114610d18576040519150601f19603f3d011682016040523d82523d5f602084013e610d1d565b606091505b5091509150866001600160a01b03167ffe4390ec6739283b5a252253424f5d27a7404f6080ccdc2bf72fa646437d22a387878585604051610d619493929190611a09565b60405180910390a281610d9d575f610d78826113a4565b90508060405162461bcd60e51b8152600401610d949190611560565b60405180910390fd5b610dd5600460149054906101000a900460ff16855f60405180602001604052805f81525060405180602001604052805f8152506111e0565b50505050505050565b5f516020611c4a5f395f51905f52610df581610ff2565b60025460ff1615610e19576040516303b14e6560e51b815260040160405180910390fd5b6105e1600460149054906101000a900460ff16848460405180602001604052805f81525060405180602001604052805f8152506111e0565b60058181548110610e60575f80fd5b5f918252602090912060059091020180546001820154600283015460038401805493955060ff808416956101009094041693919291610e9e90611948565b80601f0160208091040260200160405190810160405280929190818152602001828054610eca90611948565b8015610f155780601f10610eec57610100808354040283529160200191610f15565b820191905f5260205f20905b815481529060010190602001808311610ef857829003601f168201915b505050505090806004018054610f2a90611948565b80601f0160208091040260200160405190810160405280929190818152602001828054610f5690611948565b8015610fa15780601f10610f7857610100808354040283529160200191610fa1565b820191905f5260205f20905b815481529060010190602001808311610f8457829003601f168201915b5050505050905086565b5f516020611c4a5f395f51905f52610fc281610ff2565b60025460ff1615610fe6576040516303b14e6560e51b815260040160405180910390fd5b60076105e18382611a91565b6105818133611403565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526105e190849061143c565b5f6110598383610b18565b6110d6575f838152602081815260408083206001600160a01b03861684529091529020805460ff1916600117905561108e3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016104d5565b505f6104d5565b5f6110e88383610b18565b156110d6575f838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016104d5565b600480546040516370a0823160e01b815230928101929092525f916001600160a01b03909116906370a0823190602401602060405180830381865afa158015611191573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111b59190611931565b9050801561058157600254600454610581916001600160a01b03918216916101009091041683610ffc565b5f6040518060c0016040528042815260200187600781111561120457611204611572565b815260200186600781111561121b5761121b611572565b8152602080820187905260408201869052606090910184905260058054600181810183555f8390528451919092027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db08101918255928401517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db190930180549495508594919392909160ff1916908360078111156112ba576112ba611572565b0217905550604082015160018201805461ff0019166101008360078111156112e4576112e4611572565b021790555060608201516002820155608082015160038201906113079082611a91565b5060a0820151600482019061131c9082611a91565b50506006805491505f61132e83611b4c565b90915550506004805486919060ff60a01b1916600160a01b83600781111561135857611358611572565b02179055507f037c9601db24498b19ea624a38591528bb3dbbea772973438a34f70abd67370a8686868686604051611394959493929190611b64565b60405180910390a1505050505050565b60606044825110156113e957505060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c79000000602082015290565b600482019150818060200190518101906104d59190611bb4565b61140d8282610b18565b6106e35760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610d94565b5f5f60205f8451602086015f885af18061145b576040513d5f823e3d81fd5b50505f513d9150811561147257806001141561147f565b6001600160a01b0384163b155b156105a857604051635274afe760e01b81526001600160a01b0385166004820152602401610d94565b5f602082840312156114b8575f5ffd5b81356001600160e01b0319811681146114cf575f5ffd5b9392505050565b5f602082840312156114e6575f5ffd5b5035919050565b80356001600160a01b0381168114611503575f5ffd5b919050565b5f5f60408385031215611519575f5ffd5b82359150611529602084016114ed565b90509250929050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6114cf6020830184611532565b634e487b7160e01b5f52602160045260245ffd5b600881106115a257634e487b7160e01b5f52602160045260245ffd5b9052565b60208152815160208201525f60208301516115c46040840182611586565b5060408301516115d76060840182611586565b5060608301516080830152608083015160c060a08401526115fb60e0840182611532565b905060a0840151601f198483030160c08501526116188282611532565b95945050505050565b803560088110611503575f5ffd5b5f5f83601f84011261163f575f5ffd5b50813567ffffffffffffffff811115611656575f5ffd5b60208301915083602082850101111561166d575f5ffd5b9250929050565b5f5f5f5f5f5f5f60a0888a03121561168a575f5ffd5b61169388611621565b965060208801359550604088013567ffffffffffffffff8111156116b5575f5ffd5b6116c18a828b0161162f565b909650945050606088013567ffffffffffffffff8111156116e0575f5ffd5b6116ec8a828b0161162f565b909450925050608088013560ff81168114611705575f5ffd5b8091505092959891949750929550565b5f5f60408385031215611726575f5ffd5b61172f836114ed565b946020939093013593505050565b602081016104d58284611586565b5f6020828403121561175b575f5ffd5b6114cf82611621565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156117a1576117a1611764565b604052919050565b5f67ffffffffffffffff8211156117c2576117c2611764565b50601f01601f191660200190565b5f82601f8301126117df575f5ffd5b81356117f26117ed826117a9565b611778565b818152846020838601011115611806575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f5f60808587031215611835575f5ffd5b61183e856114ed565b9350602085013567ffffffffffffffff811115611859575f5ffd5b611865878288016117d0565b9350506040850135915061187b60608601611621565b905092959194509250565b5f5f60408385031215611897575f5ffd5b61172f83611621565b8681526118b06020820187611586565b6118bd6040820186611586565b83606082015260c060808201525f6118d860c0830185611532565b82810360a08401526118ea8185611532565b9998505050505050505050565b5f60208284031215611907575f5ffd5b813567ffffffffffffffff81111561191d575f5ffd5b611929848285016117d0565b949350505050565b5f60208284031215611941575f5ffd5b5051919050565b600181811c9082168061195c57607f821691505b60208210810361197a57634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156104d5576104d5611980565b634e487b7160e01b5f52603260045260245ffd5b60ff81811683821601908111156104d5576104d5611980565b5f602082840312156119e4575f5ffd5b815180151581146114cf575f5ffd5b5f82518060208501845e5f920191825250919050565b608081525f611a1b6080830187611532565b85602084015284151560408401528281036060840152611a3b8185611532565b979650505050505050565b601f8211156105e157805f5260205f20601f840160051c81016020851015611a6b5750805b601f840160051c820191505b81811015611a8a575f8155600101611a77565b5050505050565b815167ffffffffffffffff811115611aab57611aab611764565b611abf81611ab98454611948565b84611a46565b6020601f821160018114611af1575f8315611ada5750848201515b5f19600385901b1c1916600184901b178455611a8a565b5f84815260208120601f198516915b82811015611b205787850151825560209485019460019092019101611b00565b5084821015611b3d57868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b5f60018201611b5d57611b5d611980565b5060010190565b611b6e8187611586565b611b7b6020820186611586565b83604082015260a060608201525f611b9660a0830185611532565b8281036080840152611ba88185611532565b98975050505050505050565b5f60208284031215611bc4575f5ffd5b815167ffffffffffffffff811115611bda575f5ffd5b8201601f81018413611bea575f5ffd5b8051611bf86117ed826117a9565b818152856020838501011115611c0c575f5ffd5b8160208401602083015e5f9181016020019190915294935050505056feb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214ed8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63a2646970667358221220a371cc0246dabc3c3b0e4e95260f9df55cdc7bdae2389e873cf4c5aaaa4613ac64736f6c634300081c0033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ 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.