false
false
0
The new Blockscout UI is now open source! Learn how to deploy it here

Contract Address Details

0xc42Dc8B290354c385925174E9788462437E42052

Contract Name
SecureBridge
Creator
0xdfef88–208669 at 0x4ed7eb–c8864c
Balance
0 ETH
Tokens
Fetching tokens...
Transactions
0 Transactions
Transfers
1 Transfers
Gas Used
Fetching gas used...
Last Balance Update
2431981
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
Contract name:
SecureBridge




Optimization enabled
true
Compiler version
v0.8.26+commit.8a97fa7a




Optimization runs
200
EVM Version
paris




Verified at
2025-03-02T09:33:12.099738Z

Contract source code

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant NOT_ENTERED = 1;
    uint256 private constant ENTERED = 2;

    uint256 private _status;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    constructor() {
        _status = NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

        // Any calls to nonReentrant after this point will fail
        _status = ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = NOT_ENTERED;
    }

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == ENTERED;
    }
}

// File: @openzeppelin/contracts/access/IAccessControl.sol


// OpenZeppelin Contracts (last updated v5.1.0) (access/IAccessControl.sol)

// ^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: @openzeppelin/contracts/utils/Context.sol


// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

// ^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: @openzeppelin/contracts/utils/introspection/IERC165.sol


// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)

// ^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: @openzeppelin/contracts/utils/introspection/ERC165.sol


// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/ERC165.sol)

// ^0.8.20;


/**
 * @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: @openzeppelin/contracts/access/AccessControl.sol


// OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol)

// ^0.8.20;




/**
 * @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: @openzeppelin/contracts/token/ERC20/IERC20.sol


// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)

// ^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: @openzeppelin/contracts/interfaces/IERC20.sol


// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)

// ^0.8.20;


// File: @openzeppelin/contracts/interfaces/IERC165.sol


// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)

// ^0.8.20;


// File: @openzeppelin/contracts/interfaces/IERC1363.sol


// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol)

// ^0.8.20;



/**
 * @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: @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol


// OpenZeppelin Contracts (last updated v5.2.0) (token/ERC20/utils/SafeERC20.sol)

// ^0.8.20;



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

// File: @openzeppelin/contracts/utils/Pausable.sol


// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)

// ^0.8.20;


/**
 * @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: @openzeppelin/contracts/utils/Errors.sol


// OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol)

// ^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.
 *
 * _Available since v5.1._
 */
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();

    /**
     * @dev A necessary precompile is missing.
     */
    error MissingPrecompile(address);
}

// File: @openzeppelin/contracts/utils/Address.sol


// OpenZeppelin Contracts (last updated v5.2.0) (utils/Address.sol)

// ^0.8.20;


/**
 * @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, bytes memory returndata) = recipient.call{value: amount}("");
        if (!success) {
            _revert(returndata);
        }
    }

    /**
     * @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
            assembly ("memory-safe") {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert Errors.FailedCall();
        }
    }
}







interface IPeggedToken {
    function mint(address to, uint256 amount) external;

    function burnFrom(address from, uint256 amount) external;
}

contract SecureBridge is AccessControl, ReentrancyGuard, Pausable {
    using SafeERC20 for IERC20;
    using Address for address payable;

    bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");
    bytes32 public constant EXECUTOR_ROLE = keccak256("EXECUTOR_ROLE");

    uint256 private constant GOVERNANCE_DELAY = 2 days;
    uint256 private constant MAX_BATCH_SIZE = 100;

    address public feeCollector;

    struct PendingAdmin {
        address newAdmin;
        uint256 timestamp;
    }

    PendingAdmin public pendingAdmin;

    mapping(address => bool) public isPeggedToken;
    mapping(address => bool) public isAllowedToken;
    mapping(bytes32 => bool) public processedHashes;
    mapping(address => uint256) public accumulatedFees;
    mapping(uint256 => mapping(address => address))
        public sourceChainTokenToDestinationToken;

    address[] private listedTokens;

    event Deposited(
        address indexed token,
        address indexed depositor,
        uint256 amount,
        uint256 indexed targetChainId,
        uint256 nonce
    );
    event Transferred(
        bytes32 indexed transferHash,
        address indexed token,
        address indexed recipient,
        uint256 amount,
        uint256 fee
    );
    event FeeClaimed(address indexed token, uint256 amount);
    event AdminChangeInitiated(
        address indexed currentAdmin,
        address indexed newAdmin
    );
    event AdminUpdated(address indexed oldAdmin, address indexed newAdmin);
    event RemoteTokenSet(
        uint256 indexed chainId,
        address sourceToken,
        address destinationToken
    );
    event TokenStatusUpdated(
        address indexed token,
        bool isPegged,
        bool isAllowed
    );
    event FeeCollectorUpdated(
        address indexed oldCollector,
        address indexed newCollector
    );

    error InvalidInput();
    error Unauthorized();
    error TokenError(address token);
    error AlreadyProcessed();
    error InvalidAmount();
    error TransferFailed();
    error PendingAdminNotSet();
    error GovernanceDelayNotMet();
    error InvalidAddress();
    error TokenAlreadyListed();
    error BatchTooLarge();

    constructor() {
        _grantRole(
            DEFAULT_ADMIN_ROLE,
            msg.sender
        );
        _grantRole(ADMIN_ROLE, msg.sender);
        _grantRole(EXECUTOR_ROLE, msg.sender);

        // Set the fee collector to be the contract deployer initially
        feeCollector = msg.sender;

        listedTokens.push(address(0));
        listedTokens.push(0xB24322100F51196272502BA10DA1bDE657323e74);
    }

    modifier validAddress(address _address) {
        if (_address == address(0)) revert InvalidAddress();
        _;
    }

    modifier validAmount(uint256 _amount) {
        if (_amount == 0) revert InvalidAmount();
        _;
    }

    function setFeeCollector(
        address newCollector
    ) external onlyRole(DEFAULT_ADMIN_ROLE) validAddress(newCollector) {
        address oldCollector = feeCollector;
        feeCollector = newCollector;
        emit FeeCollectorUpdated(oldCollector, newCollector);
    }

    function initiateAdminChange(
        address newAdmin
    ) external onlyRole(DEFAULT_ADMIN_ROLE) validAddress(newAdmin) {
        pendingAdmin = PendingAdmin({
            newAdmin: newAdmin,
            timestamp: block.timestamp
        });
        emit AdminChangeInitiated(msg.sender, newAdmin);
    }

    function confirmAdminChange() external onlyRole(DEFAULT_ADMIN_ROLE) {
        if (pendingAdmin.newAdmin == address(0)) revert PendingAdminNotSet();
        if (block.timestamp < pendingAdmin.timestamp + GOVERNANCE_DELAY)
            revert GovernanceDelayNotMet();

        address oldAdmin = msg.sender;
        _revokeRole(ADMIN_ROLE, oldAdmin);
        _grantRole(ADMIN_ROLE, pendingAdmin.newAdmin);
        _grantRole(EXECUTOR_ROLE, pendingAdmin.newAdmin);

        emit AdminUpdated(oldAdmin, pendingAdmin.newAdmin);
        delete pendingAdmin;
    }

    function setRemoteToken(
        uint256 chainId,
        address sourceToken,
        address destinationToken
    )
        external
        onlyRole(ADMIN_ROLE)
        validAddress(sourceToken)
        validAddress(destinationToken)
    {
        sourceChainTokenToDestinationToken[chainId][
            sourceToken
        ] = destinationToken;
        emit RemoteTokenSet(chainId, sourceToken, destinationToken);
    }

    function deposit(
        address token,
        uint256 amount,
        uint256 targetChainId,
        uint256 nonce
    ) external payable nonReentrant whenNotPaused validAmount(amount) {
        address sender = msg.sender;

        if (token == address(0)) {
            if (msg.value != amount) revert InvalidInput();
        } else {
            if (!isAllowedToken[token] && !isPeggedToken[token])
                revert TokenError(token);

            if (isPeggedToken[token]) {
                IPeggedToken(token).burnFrom(sender, amount);
            } else {
                IERC20(token).safeTransferFrom(sender, address(this), amount);
            }
        }

        emit Deposited(token, sender, amount, targetChainId, nonce);
    }

    function executeTransfers(
        address[] calldata tokens,
        address[] calldata recipients,
        uint256[] calldata amounts,
        uint256[] calldata fees,
        uint256[] calldata nonces,
        uint256 chainId
    ) external onlyRole(EXECUTOR_ROLE) nonReentrant whenNotPaused {
        require(tokens.length <= MAX_BATCH_SIZE, "BatchTooLarge");
        require(
            recipients.length == tokens.length &&
                amounts.length == tokens.length &&
                fees.length == tokens.length &&
                nonces.length == tokens.length,
            "Array length mismatch"
        );

        for (uint256 i = 0; i < tokens.length; ++i) {
            _executeTransfer(
                tokens[i],
                recipients[i],
                amounts[i],
                fees[i],
                nonces[i],
                chainId
            );
        }
    }

    function _executeTransfer(
        address token,
        address recipient,
        uint256 amount,
        uint256 fee,
        uint256 nonce,
        uint256 chainId
    ) private validAddress(recipient) validAmount(amount) {
        if (amount <= fee) revert InvalidAmount();

        bytes32 transferHash = keccak256(
            abi.encodePacked(token, recipient, amount, fee, nonce, chainId)
        );

        if (processedHashes[transferHash]) revert AlreadyProcessed();
        processedHashes[transferHash] = true;

        uint256 transferAmount = amount - fee;

        if (fee > 0) {
            accumulatedFees[token] += fee;
        }

        if (token == address(0)) {
            payable(recipient).sendValue(transferAmount);
        } else {
            if (isPeggedToken[token]) {
                IPeggedToken(token).mint(recipient, transferAmount);
                if (fee > 0) {
                    IPeggedToken(token).mint(address(this), fee);
                }
            } else {
                IERC20(token).safeTransfer(recipient, transferAmount);
            }
        }

        emit Transferred(transferHash, token, recipient, amount, fee);
    }

    function claimFees(
        address token
    )
        external
        onlyRole(ADMIN_ROLE)
        nonReentrant
        validAmount(accumulatedFees[token])
    {
        uint256 fees = accumulatedFees[token];
        accumulatedFees[token] = 0;

        if (token == address(0)) {
            payable(feeCollector).sendValue(fees);
        } else {
            IERC20(token).safeTransfer(feeCollector, fees);
        }

        emit FeeClaimed(token, fees);
    }

    function manageTokenStatus(
        address token,
        bool isPegged,
        bool isAllowed
    ) external onlyRole(ADMIN_ROLE) validAddress(token) {
        require(
            !(isPeggedToken[token] && isAllowedToken[token]),
            "Token already configured"
        );

        if (isPegged) {
            isPeggedToken[token] = true;
            isAllowedToken[token] = false;
        } else {
            isAllowedToken[token] = isAllowed;
            isPeggedToken[token] = false;
        }

        emit TokenStatusUpdated(token, isPegged, isAllowed);
    }

    function listToken(
        address token
    ) external onlyRole(ADMIN_ROLE) validAddress(token) {
        require(
            !isAllowedToken[token] && !isPeggedToken[token],
            "TokenAlreadyListed"
        );
        isAllowedToken[token] = true;
        listedTokens.push(token);
    }

    function getListedTokens() external view returns (address[] memory) {
        return listedTokens;
    }

    function pause() external onlyRole(DEFAULT_ADMIN_ROLE) {
        _pause();
    }

    function unpause() external onlyRole(DEFAULT_ADMIN_ROLE) {
        _unpause();
    }

    function emergencyWithdraw(
        address token,
        uint256 amount
    ) external onlyRole(DEFAULT_ADMIN_ROLE) nonReentrant validAmount(amount) {
        if (token == address(0)) {
            payable(msg.sender).sendValue(amount);
        } else {
            IERC20(token).safeTransfer(msg.sender, amount);
        }
    }

    receive() external payable {}
}
        

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[]},{"type":"error","name":"AccessControlBadConfirmation","inputs":[]},{"type":"error","name":"AccessControlUnauthorizedAccount","inputs":[{"type":"address","name":"account","internalType":"address"},{"type":"bytes32","name":"neededRole","internalType":"bytes32"}]},{"type":"error","name":"AlreadyProcessed","inputs":[]},{"type":"error","name":"BatchTooLarge","inputs":[]},{"type":"error","name":"EnforcedPause","inputs":[]},{"type":"error","name":"ExpectedPause","inputs":[]},{"type":"error","name":"FailedCall","inputs":[]},{"type":"error","name":"GovernanceDelayNotMet","inputs":[]},{"type":"error","name":"InsufficientBalance","inputs":[{"type":"uint256","name":"balance","internalType":"uint256"},{"type":"uint256","name":"needed","internalType":"uint256"}]},{"type":"error","name":"InvalidAddress","inputs":[]},{"type":"error","name":"InvalidAmount","inputs":[]},{"type":"error","name":"InvalidInput","inputs":[]},{"type":"error","name":"PendingAdminNotSet","inputs":[]},{"type":"error","name":"ReentrancyGuardReentrantCall","inputs":[]},{"type":"error","name":"SafeERC20FailedOperation","inputs":[{"type":"address","name":"token","internalType":"address"}]},{"type":"error","name":"TokenAlreadyListed","inputs":[]},{"type":"error","name":"TokenError","inputs":[{"type":"address","name":"token","internalType":"address"}]},{"type":"error","name":"TransferFailed","inputs":[]},{"type":"error","name":"Unauthorized","inputs":[]},{"type":"event","name":"AdminChangeInitiated","inputs":[{"type":"address","name":"currentAdmin","internalType":"address","indexed":true},{"type":"address","name":"newAdmin","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"AdminUpdated","inputs":[{"type":"address","name":"oldAdmin","internalType":"address","indexed":true},{"type":"address","name":"newAdmin","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"Deposited","inputs":[{"type":"address","name":"token","internalType":"address","indexed":true},{"type":"address","name":"depositor","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false},{"type":"uint256","name":"targetChainId","internalType":"uint256","indexed":true},{"type":"uint256","name":"nonce","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"FeeClaimed","inputs":[{"type":"address","name":"token","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"FeeCollectorUpdated","inputs":[{"type":"address","name":"oldCollector","internalType":"address","indexed":true},{"type":"address","name":"newCollector","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"Paused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"RemoteTokenSet","inputs":[{"type":"uint256","name":"chainId","internalType":"uint256","indexed":true},{"type":"address","name":"sourceToken","internalType":"address","indexed":false},{"type":"address","name":"destinationToken","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"RoleAdminChanged","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32","indexed":true},{"type":"bytes32","name":"previousAdminRole","internalType":"bytes32","indexed":true},{"type":"bytes32","name":"newAdminRole","internalType":"bytes32","indexed":true}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32","indexed":true},{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"address","name":"sender","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32","indexed":true},{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"address","name":"sender","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"TokenStatusUpdated","inputs":[{"type":"address","name":"token","internalType":"address","indexed":true},{"type":"bool","name":"isPegged","internalType":"bool","indexed":false},{"type":"bool","name":"isAllowed","internalType":"bool","indexed":false}],"anonymous":false},{"type":"event","name":"Transferred","inputs":[{"type":"bytes32","name":"transferHash","internalType":"bytes32","indexed":true},{"type":"address","name":"token","internalType":"address","indexed":true},{"type":"address","name":"recipient","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false},{"type":"uint256","name":"fee","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Unpaused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"ADMIN_ROLE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"DEFAULT_ADMIN_ROLE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"EXECUTOR_ROLE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"accumulatedFees","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"claimFees","inputs":[{"type":"address","name":"token","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"confirmAdminChange","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"deposit","inputs":[{"type":"address","name":"token","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"},{"type":"uint256","name":"targetChainId","internalType":"uint256"},{"type":"uint256","name":"nonce","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"emergencyWithdraw","inputs":[{"type":"address","name":"token","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"executeTransfers","inputs":[{"type":"address[]","name":"tokens","internalType":"address[]"},{"type":"address[]","name":"recipients","internalType":"address[]"},{"type":"uint256[]","name":"amounts","internalType":"uint256[]"},{"type":"uint256[]","name":"fees","internalType":"uint256[]"},{"type":"uint256[]","name":"nonces","internalType":"uint256[]"},{"type":"uint256","name":"chainId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"feeCollector","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address[]","name":"","internalType":"address[]"}],"name":"getListedTokens","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"getRoleAdmin","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"grantRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"hasRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initiateAdminChange","inputs":[{"type":"address","name":"newAdmin","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isAllowedToken","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isPeggedToken","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"listToken","inputs":[{"type":"address","name":"token","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"manageTokenStatus","inputs":[{"type":"address","name":"token","internalType":"address"},{"type":"bool","name":"isPegged","internalType":"bool"},{"type":"bool","name":"isAllowed","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"pause","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"paused","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"newAdmin","internalType":"address"},{"type":"uint256","name":"timestamp","internalType":"uint256"}],"name":"pendingAdmin","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"processedHashes","inputs":[{"type":"bytes32","name":"","internalType":"bytes32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"callerConfirmation","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"revokeRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setFeeCollector","inputs":[{"type":"address","name":"newCollector","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setRemoteToken","inputs":[{"type":"uint256","name":"chainId","internalType":"uint256"},{"type":"address","name":"sourceToken","internalType":"address"},{"type":"address","name":"destinationToken","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"sourceChainTokenToDestinationToken","inputs":[{"type":"uint256","name":"","internalType":"uint256"},{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"supportsInterface","inputs":[{"type":"bytes4","name":"interfaceId","internalType":"bytes4"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unpause","inputs":[]},{"type":"receive","stateMutability":"payable"}]
              

Contract Creation Code

Verify & Publish
0x608060405234801561001057600080fd5b50600180556002805460ff1916905561002a60003361010a565b506100557fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217753361010a565b506100807fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e633361010a565b50600280546101003302610100600160a81b0319909116179055600a80546001818101835560008390527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a891820180546001600160a01b0319908116909155835491820190935501805490911673b24322100f51196272502ba10da1bde657323e741790556101b6565b6000828152602081815260408083206001600160a01b038516845290915281205460ff166101ac576000838152602081815260408083206001600160a01b03861684529091529020805460ff191660011790556101643390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016101b0565b5060005b92915050565b611d8c806101c56000396000f3fe6080604052600436106101d15760003560e01c806375b238fc116100f7578063a74b678311610095578063ce88b43911610064578063ce88b439146105a6578063d547741f146105b9578063f5995e26146105d9578063fcf666641461061a57600080fd5b8063a74b678314610504578063acf2a60014610519578063c415b95c14610539578063cbe230c31461057657600080fd5b806391d14854116100d157806391d148541461048f57806395ccea67146104af578063a217fddf146104cf578063a42dce80146104e457600080fd5b806375b238fc146104385780638456cb591461045a57806384e017d11461046f57600080fd5b8063267822471161016f5780633f4ba83a1161013e5780633f4ba83a146103bb5780635c975abb146103d05780635f35e68e146103e85780636ec1db521461041857600080fd5b806326782247146103165780632ba996a5146103595780632f2ff15d1461037b57806336568abe1461039b57600080fd5b806315a0ea6a116101ab57806315a0ea6a146102845780631fc1e25f146102a6578063227143ca146102c6578063248a9ca3146102e657600080fd5b806301ffc9a7146101dd57806307bd02651461021257806307d9c5341461025457600080fd5b366101d857005b600080fd5b3480156101e957600080fd5b506101fd6101f83660046119a1565b610647565b60405190151581526020015b60405180910390f35b34801561021e57600080fd5b506102467fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6381565b604051908152602001610209565b34801561026057600080fd5b506101fd61026f3660046119d2565b60076020526000908152604090205460ff1681565b34801561029057600080fd5b506102a461029f366004611a07565b61067e565b005b3480156102b257600080fd5b506102a46102c1366004611a07565b61078b565b3480156102d257600080fd5b506102a46102e1366004611a32565b6108bb565b3480156102f257600080fd5b506102466103013660046119d2565b60009081526020819052604090206001015490565b34801561032257600080fd5b5060035460045461033a916001600160a01b03169082565b604080516001600160a01b039093168352602083019190915201610209565b34801561036557600080fd5b5061036e610a53565b6040516102099190611a75565b34801561038757600080fd5b506102a4610396366004611ac1565b610ab5565b3480156103a757600080fd5b506102a46103b6366004611ac1565b610ae0565b3480156103c757600080fd5b506102a4610b18565b3480156103dc57600080fd5b5060025460ff166101fd565b3480156103f457600080fd5b506101fd610403366004611a07565b60056020526000908152604090205460ff1681565b34801561042457600080fd5b506102a4610433366004611aed565b610b2e565b34801561044457600080fd5b50610246600080516020611d3783398151915281565b34801561046657600080fd5b506102a4610c11565b34801561047b57600080fd5b506102a461048a366004611a07565b610c24565b34801561049b57600080fd5b506101fd6104aa366004611ac1565b610cbd565b3480156104bb57600080fd5b506102a46104ca366004611b20565b610ce6565b3480156104db57600080fd5b50610246600081565b3480156104f057600080fd5b506102a46104ff366004611a07565b610d56565b34801561051057600080fd5b506102a4610de5565b34801561052557600080fd5b506102a4610534366004611b96565b610f16565b34801561054557600080fd5b5060025461055e9061010090046001600160a01b031681565b6040516001600160a01b039091168152602001610209565b34801561058257600080fd5b506101fd610591366004611a07565b60066020526000908152604090205460ff1681565b6102a46105b4366004611cab565b6110c6565b3480156105c557600080fd5b506102a46105d4366004611ac1565b611296565b3480156105e557600080fd5b5061055e6105f4366004611ac1565b60096020908152600092835260408084209091529082529020546001600160a01b031681565b34801561062657600080fd5b50610246610635366004611a07565b60086020526000908152604090205481565b60006001600160e01b03198216637965db0b60e01b148061067857506301ffc9a760e01b6001600160e01b03198316145b92915050565b600080516020611d37833981519152610696816112bb565b61069e6112c5565b6001600160a01b038216600090815260086020526040812054908190036106d85760405163162908e360e11b815260040160405180910390fd5b6001600160a01b038316600081815260086020526040812080549190559061071a576002546107159061010090046001600160a01b0316826112ef565b610739565b600254610739906001600160a01b03868116916101009004168361137f565b836001600160a01b03167f20ca5094f3a20c321cbe4123d0f01b276b81df0fa24cd4d83d9253956035d8638260405161077491815260200190565b60405180910390a2505061078760018055565b5050565b600080516020611d378339815191526107a3816112bb565b816001600160a01b0381166107cb5760405163e6c4247b60e01b815260040160405180910390fd5b6001600160a01b03831660009081526006602052604090205460ff1615801561080d57506001600160a01b03831660009081526005602052604090205460ff16155b6108535760405162461bcd60e51b8152602060048201526012602482015271151bdad95b905b1c9958591e531a5cdd195960721b60448201526064015b60405180910390fd5b50506001600160a01b03166000818152600660205260408120805460ff19166001908117909155600a805491820181559091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80180546001600160a01b0319169091179055565b600080516020611d378339815191526108d3816112bb565b836001600160a01b0381166108fb5760405163e6c4247b60e01b815260040160405180910390fd5b6001600160a01b03851660009081526005602052604090205460ff16801561093b57506001600160a01b03851660009081526006602052604090205460ff165b156109885760405162461bcd60e51b815260206004820152601860248201527f546f6b656e20616c726561647920636f6e666967757265640000000000000000604482015260640161084a565b83156109cb576001600160a01b0385166000908152600560209081526040808320805460ff19908116600117909155600690925290912080549091169055610a05565b6001600160a01b0385166000908152600660209081526040808320805487151560ff19918216179091556005909252909120805490911690555b60408051851515815284151560208201526001600160a01b038716917fbe5a94eb473ce29d9ca29971dcc4a8bfacfe412d78270602b69899bc5d498374910160405180910390a25050505050565b6060600a805480602002602001604051908101604052809291908181526020018280548015610aab57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610a8d575b5050505050905090565b600082815260208190526040902060010154610ad0816112bb565b610ada83836113de565b50505050565b6001600160a01b0381163314610b095760405163334bd91960e11b815260040160405180910390fd5b610b138282611470565b505050565b6000610b23816112bb565b610b2b6114db565b50565b600080516020611d37833981519152610b46816112bb565b826001600160a01b038116610b6e5760405163e6c4247b60e01b815260040160405180910390fd5b826001600160a01b038116610b965760405163e6c4247b60e01b815260040160405180910390fd5b60008681526009602090815260408083206001600160a01b038981168086529184529382902080546001600160a01b031916948916948517905581519081529182019290925287917f0548894a5c5a630a02fc2ba2443b70acbada385c045ea781ef9798741d7a748c910160405180910390a2505050505050565b6000610c1c816112bb565b610b2b61152d565b6000610c2f816112bb565b816001600160a01b038116610c575760405163e6c4247b60e01b815260040160405180910390fd5b6040805180820182526001600160a01b038516808252426020909201829052600380546001600160a01b03191682179055600491909155905133907fbc49f85c3bdd90a11b9ff1b8da6dc5e51907354adf6267ed440f7e4c69603ae090600090a3505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6000610cf1816112bb565b610cf96112c5565b8180600003610d1b5760405163162908e360e11b815260040160405180910390fd5b6001600160a01b038416610d3857610d3333846112ef565b610d4c565b610d4c6001600160a01b038516338561137f565b50610b1360018055565b6000610d61816112bb565b816001600160a01b038116610d895760405163e6c4247b60e01b815260040160405180910390fd5b600280546001600160a01b03858116610100818102610100600160a81b031985161790945560405193909204169182907f5d16ad41baeb009cd23eb8f6c7cde5c2e0cd5acf4a33926ab488875c37c37f3890600090a350505050565b6000610df0816112bb565b6003546001600160a01b0316610e19576040516320d16ecb60e11b815260040160405180910390fd5b600454610e2a906202a30090611cfa565b421015610e4a576040516348a7923f60e11b815260040160405180910390fd5b33610e63600080516020611d3783398151915282611470565b50600354610e8990600080516020611d37833981519152906001600160a01b03166113de565b50600354610ec1907fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63906001600160a01b03166113de565b506003546040516001600160a01b03918216918316907f101b8081ff3b56bbf45deb824d86a3b0fd38b7e3dd42421105cf8abe9106db0b90600090a35050600380546001600160a01b03191690556000600455565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63610f40816112bb565b610f486112c5565b610f5061156a565b60648b1115610f915760405162461bcd60e51b815260206004820152600d60248201526c4261746368546f6f4c6172676560981b604482015260640161084a565b888b148015610f9f5750868b145b8015610faa5750848b145b8015610fb55750828b145b610ff95760405162461bcd60e51b8152602060048201526015602482015274082e4e4c2f240d8cadccee8d040dad2e6dac2e8c6d605b1b604482015260640161084a565b60005b8b8110156110ae576110a68d8d8381811061101957611019611d0d565b905060200201602081019061102e9190611a07565b8c8c8481811061104057611040611d0d565b90506020020160208101906110559190611a07565b8b8b8581811061106757611067611d0d565b905060200201358a8a8681811061108057611080611d0d565b9050602002013589898781811061109957611099611d0d565b9050602002013588611590565b600101610ffc565b506110b860018055565b505050505050505050505050565b6110ce6112c5565b6110d661156a565b82806000036110f85760405163162908e360e11b815260040160405180910390fd5b336001600160a01b03861661112c578434146111275760405163b4fa3fb360e01b815260040160405180910390fd5b611234565b6001600160a01b03861660009081526006602052604090205460ff1615801561116e57506001600160a01b03861660009081526005602052604090205460ff16155b1561119757604051630af950d560e01b81526001600160a01b038716600482015260240161084a565b6001600160a01b03861660009081526005602052604090205460ff161561121f5760405163079cc67960e41b81526001600160a01b038281166004830152602482018790528716906379cc679090604401600060405180830381600087803b15801561120257600080fd5b505af1158015611216573d6000803e3d6000fd5b50505050611234565b6112346001600160a01b038716823088611872565b83816001600160a01b0316876001600160a01b03167f8bab6aed5a508937051a144e61d6e61336834a66aaee250a00613ae6f744c4228887604051611283929190918252602082015260400190565b60405180910390a45050610ada60018055565b6000828152602081905260409020600101546112b1816112bb565b610ada8383611470565b610b2b81336118ab565b6002600154036112e857604051633ee5aeb560e01b815260040160405180910390fd5b6002600155565b804710156113195760405163cf47918160e01b81524760048201526024810182905260440161084a565b600080836001600160a01b03168360405160006040518083038185875af1925050503d8060008114611367576040519150601f19603f3d011682016040523d82523d6000602084013e61136c565b606091505b509150915081610ada57610ada816118e4565b6040516001600160a01b03838116602483015260448201839052610b1391859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b03838183161783525050505061190d565b60006113ea8383610cbd565b611468576000838152602081815260408083206001600160a01b03861684529091529020805460ff191660011790556114203390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4506001610678565b506000610678565b600061147c8383610cbd565b15611468576000838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a4506001610678565b6114e361197e565b6002805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b61153561156a565b6002805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586115103390565b60025460ff161561158e5760405163d93c066560e01b815260040160405180910390fd5b565b846001600160a01b0381166115b85760405163e6c4247b60e01b815260040160405180910390fd5b84806000036115da5760405163162908e360e11b815260040160405180910390fd5b8486116115fa5760405163162908e360e11b815260040160405180910390fd5b6040516bffffffffffffffffffffffff1960608a811b8216602084015289901b16603482015260488101879052606881018690526088810185905260a8810184905260009060c80160408051601f1981840301815291815281516020928301206000818152600790935291205490915060ff161561168b57604051632bf773b360e11b815260040160405180910390fd5b6000818152600760205260408120805460ff191660011790556116ae8789611d23565b905086156116e4576001600160a01b038a16600090815260086020526040812080548992906116de908490611cfa565b90915550505b6001600160a01b038a1661170a576117056001600160a01b038a16826112ef565b61180f565b6001600160a01b038a1660009081526005602052604090205460ff16156117fb576040516340c10f1960e01b81526001600160a01b038a81166004830152602482018390528b16906340c10f1990604401600060405180830381600087803b15801561177557600080fd5b505af1158015611789573d6000803e3d6000fd5b505050506000871115611705576040516340c10f1960e01b8152306004820152602481018890526001600160a01b038b16906340c10f1990604401600060405180830381600087803b1580156117de57600080fd5b505af11580156117f2573d6000803e3d6000fd5b5050505061180f565b61180f6001600160a01b038b168a8361137f565b886001600160a01b03168a6001600160a01b0316837f15d34ac2256871aef780df69d4cb6524e17c48711e054696e459f5b8ff090d8c8b8b60405161185e929190918252602082015260400190565b60405180910390a450505050505050505050565b6040516001600160a01b038481166024830152838116604483015260648201839052610ada9186918216906323b872dd906084016113ac565b6118b58282610cbd565b6107875760405163e2517d3f60e01b81526001600160a01b03821660048201526024810183905260440161084a565b8051156118f45780518082602001fd5b60405163d6bda27560e01b815260040160405180910390fd5b600080602060008451602086016000885af180611930576040513d6000823e3d81fd5b50506000513d91508115611948578060011415611955565b6001600160a01b0384163b155b15610ada57604051635274afe760e01b81526001600160a01b038516600482015260240161084a565b60025460ff1661158e57604051638dfc202b60e01b815260040160405180910390fd5b6000602082840312156119b357600080fd5b81356001600160e01b0319811681146119cb57600080fd5b9392505050565b6000602082840312156119e457600080fd5b5035919050565b80356001600160a01b0381168114611a0257600080fd5b919050565b600060208284031215611a1957600080fd5b6119cb826119eb565b80358015158114611a0257600080fd5b600080600060608486031215611a4757600080fd5b611a50846119eb565b9250611a5e60208501611a22565b9150611a6c60408501611a22565b90509250925092565b602080825282518282018190526000918401906040840190835b81811015611ab65783516001600160a01b0316835260209384019390920191600101611a8f565b509095945050505050565b60008060408385031215611ad457600080fd5b82359150611ae4602084016119eb565b90509250929050565b600080600060608486031215611b0257600080fd5b83359250611b12602085016119eb565b9150611a6c604085016119eb565b60008060408385031215611b3357600080fd5b611b3c836119eb565b946020939093013593505050565b60008083601f840112611b5c57600080fd5b50813567ffffffffffffffff811115611b7457600080fd5b6020830191508360208260051b8501011115611b8f57600080fd5b9250929050565b600080600080600080600080600080600060c08c8e031215611bb757600080fd5b8b3567ffffffffffffffff811115611bce57600080fd5b611bda8e828f01611b4a565b909c509a505060208c013567ffffffffffffffff811115611bfa57600080fd5b611c068e828f01611b4a565b909a5098505060408c013567ffffffffffffffff811115611c2657600080fd5b611c328e828f01611b4a565b90985096505060608c013567ffffffffffffffff811115611c5257600080fd5b611c5e8e828f01611b4a565b90965094505060808c013567ffffffffffffffff811115611c7e57600080fd5b611c8a8e828f01611b4a565b9c9f9b9e50999c989b979a969995989497959660a090950135949350505050565b60008060008060808587031215611cc157600080fd5b611cca856119eb565b966020860135965060408601359560600135945092505050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561067857610678611ce4565b634e487b7160e01b600052603260045260246000fd5b8181038181111561067857610678611ce456fea49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a26469706673582212200282af8169b03774405e11a33e81bab5eb4f6a80510f6c7c5f3508750c7e6ada64736f6c634300081a0033

Deployed ByteCode

0x6080604052600436106101d15760003560e01c806375b238fc116100f7578063a74b678311610095578063ce88b43911610064578063ce88b439146105a6578063d547741f146105b9578063f5995e26146105d9578063fcf666641461061a57600080fd5b8063a74b678314610504578063acf2a60014610519578063c415b95c14610539578063cbe230c31461057657600080fd5b806391d14854116100d157806391d148541461048f57806395ccea67146104af578063a217fddf146104cf578063a42dce80146104e457600080fd5b806375b238fc146104385780638456cb591461045a57806384e017d11461046f57600080fd5b8063267822471161016f5780633f4ba83a1161013e5780633f4ba83a146103bb5780635c975abb146103d05780635f35e68e146103e85780636ec1db521461041857600080fd5b806326782247146103165780632ba996a5146103595780632f2ff15d1461037b57806336568abe1461039b57600080fd5b806315a0ea6a116101ab57806315a0ea6a146102845780631fc1e25f146102a6578063227143ca146102c6578063248a9ca3146102e657600080fd5b806301ffc9a7146101dd57806307bd02651461021257806307d9c5341461025457600080fd5b366101d857005b600080fd5b3480156101e957600080fd5b506101fd6101f83660046119a1565b610647565b60405190151581526020015b60405180910390f35b34801561021e57600080fd5b506102467fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6381565b604051908152602001610209565b34801561026057600080fd5b506101fd61026f3660046119d2565b60076020526000908152604090205460ff1681565b34801561029057600080fd5b506102a461029f366004611a07565b61067e565b005b3480156102b257600080fd5b506102a46102c1366004611a07565b61078b565b3480156102d257600080fd5b506102a46102e1366004611a32565b6108bb565b3480156102f257600080fd5b506102466103013660046119d2565b60009081526020819052604090206001015490565b34801561032257600080fd5b5060035460045461033a916001600160a01b03169082565b604080516001600160a01b039093168352602083019190915201610209565b34801561036557600080fd5b5061036e610a53565b6040516102099190611a75565b34801561038757600080fd5b506102a4610396366004611ac1565b610ab5565b3480156103a757600080fd5b506102a46103b6366004611ac1565b610ae0565b3480156103c757600080fd5b506102a4610b18565b3480156103dc57600080fd5b5060025460ff166101fd565b3480156103f457600080fd5b506101fd610403366004611a07565b60056020526000908152604090205460ff1681565b34801561042457600080fd5b506102a4610433366004611aed565b610b2e565b34801561044457600080fd5b50610246600080516020611d3783398151915281565b34801561046657600080fd5b506102a4610c11565b34801561047b57600080fd5b506102a461048a366004611a07565b610c24565b34801561049b57600080fd5b506101fd6104aa366004611ac1565b610cbd565b3480156104bb57600080fd5b506102a46104ca366004611b20565b610ce6565b3480156104db57600080fd5b50610246600081565b3480156104f057600080fd5b506102a46104ff366004611a07565b610d56565b34801561051057600080fd5b506102a4610de5565b34801561052557600080fd5b506102a4610534366004611b96565b610f16565b34801561054557600080fd5b5060025461055e9061010090046001600160a01b031681565b6040516001600160a01b039091168152602001610209565b34801561058257600080fd5b506101fd610591366004611a07565b60066020526000908152604090205460ff1681565b6102a46105b4366004611cab565b6110c6565b3480156105c557600080fd5b506102a46105d4366004611ac1565b611296565b3480156105e557600080fd5b5061055e6105f4366004611ac1565b60096020908152600092835260408084209091529082529020546001600160a01b031681565b34801561062657600080fd5b50610246610635366004611a07565b60086020526000908152604090205481565b60006001600160e01b03198216637965db0b60e01b148061067857506301ffc9a760e01b6001600160e01b03198316145b92915050565b600080516020611d37833981519152610696816112bb565b61069e6112c5565b6001600160a01b038216600090815260086020526040812054908190036106d85760405163162908e360e11b815260040160405180910390fd5b6001600160a01b038316600081815260086020526040812080549190559061071a576002546107159061010090046001600160a01b0316826112ef565b610739565b600254610739906001600160a01b03868116916101009004168361137f565b836001600160a01b03167f20ca5094f3a20c321cbe4123d0f01b276b81df0fa24cd4d83d9253956035d8638260405161077491815260200190565b60405180910390a2505061078760018055565b5050565b600080516020611d378339815191526107a3816112bb565b816001600160a01b0381166107cb5760405163e6c4247b60e01b815260040160405180910390fd5b6001600160a01b03831660009081526006602052604090205460ff1615801561080d57506001600160a01b03831660009081526005602052604090205460ff16155b6108535760405162461bcd60e51b8152602060048201526012602482015271151bdad95b905b1c9958591e531a5cdd195960721b60448201526064015b60405180910390fd5b50506001600160a01b03166000818152600660205260408120805460ff19166001908117909155600a805491820181559091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80180546001600160a01b0319169091179055565b600080516020611d378339815191526108d3816112bb565b836001600160a01b0381166108fb5760405163e6c4247b60e01b815260040160405180910390fd5b6001600160a01b03851660009081526005602052604090205460ff16801561093b57506001600160a01b03851660009081526006602052604090205460ff165b156109885760405162461bcd60e51b815260206004820152601860248201527f546f6b656e20616c726561647920636f6e666967757265640000000000000000604482015260640161084a565b83156109cb576001600160a01b0385166000908152600560209081526040808320805460ff19908116600117909155600690925290912080549091169055610a05565b6001600160a01b0385166000908152600660209081526040808320805487151560ff19918216179091556005909252909120805490911690555b60408051851515815284151560208201526001600160a01b038716917fbe5a94eb473ce29d9ca29971dcc4a8bfacfe412d78270602b69899bc5d498374910160405180910390a25050505050565b6060600a805480602002602001604051908101604052809291908181526020018280548015610aab57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610a8d575b5050505050905090565b600082815260208190526040902060010154610ad0816112bb565b610ada83836113de565b50505050565b6001600160a01b0381163314610b095760405163334bd91960e11b815260040160405180910390fd5b610b138282611470565b505050565b6000610b23816112bb565b610b2b6114db565b50565b600080516020611d37833981519152610b46816112bb565b826001600160a01b038116610b6e5760405163e6c4247b60e01b815260040160405180910390fd5b826001600160a01b038116610b965760405163e6c4247b60e01b815260040160405180910390fd5b60008681526009602090815260408083206001600160a01b038981168086529184529382902080546001600160a01b031916948916948517905581519081529182019290925287917f0548894a5c5a630a02fc2ba2443b70acbada385c045ea781ef9798741d7a748c910160405180910390a2505050505050565b6000610c1c816112bb565b610b2b61152d565b6000610c2f816112bb565b816001600160a01b038116610c575760405163e6c4247b60e01b815260040160405180910390fd5b6040805180820182526001600160a01b038516808252426020909201829052600380546001600160a01b03191682179055600491909155905133907fbc49f85c3bdd90a11b9ff1b8da6dc5e51907354adf6267ed440f7e4c69603ae090600090a3505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6000610cf1816112bb565b610cf96112c5565b8180600003610d1b5760405163162908e360e11b815260040160405180910390fd5b6001600160a01b038416610d3857610d3333846112ef565b610d4c565b610d4c6001600160a01b038516338561137f565b50610b1360018055565b6000610d61816112bb565b816001600160a01b038116610d895760405163e6c4247b60e01b815260040160405180910390fd5b600280546001600160a01b03858116610100818102610100600160a81b031985161790945560405193909204169182907f5d16ad41baeb009cd23eb8f6c7cde5c2e0cd5acf4a33926ab488875c37c37f3890600090a350505050565b6000610df0816112bb565b6003546001600160a01b0316610e19576040516320d16ecb60e11b815260040160405180910390fd5b600454610e2a906202a30090611cfa565b421015610e4a576040516348a7923f60e11b815260040160405180910390fd5b33610e63600080516020611d3783398151915282611470565b50600354610e8990600080516020611d37833981519152906001600160a01b03166113de565b50600354610ec1907fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63906001600160a01b03166113de565b506003546040516001600160a01b03918216918316907f101b8081ff3b56bbf45deb824d86a3b0fd38b7e3dd42421105cf8abe9106db0b90600090a35050600380546001600160a01b03191690556000600455565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63610f40816112bb565b610f486112c5565b610f5061156a565b60648b1115610f915760405162461bcd60e51b815260206004820152600d60248201526c4261746368546f6f4c6172676560981b604482015260640161084a565b888b148015610f9f5750868b145b8015610faa5750848b145b8015610fb55750828b145b610ff95760405162461bcd60e51b8152602060048201526015602482015274082e4e4c2f240d8cadccee8d040dad2e6dac2e8c6d605b1b604482015260640161084a565b60005b8b8110156110ae576110a68d8d8381811061101957611019611d0d565b905060200201602081019061102e9190611a07565b8c8c8481811061104057611040611d0d565b90506020020160208101906110559190611a07565b8b8b8581811061106757611067611d0d565b905060200201358a8a8681811061108057611080611d0d565b9050602002013589898781811061109957611099611d0d565b9050602002013588611590565b600101610ffc565b506110b860018055565b505050505050505050505050565b6110ce6112c5565b6110d661156a565b82806000036110f85760405163162908e360e11b815260040160405180910390fd5b336001600160a01b03861661112c578434146111275760405163b4fa3fb360e01b815260040160405180910390fd5b611234565b6001600160a01b03861660009081526006602052604090205460ff1615801561116e57506001600160a01b03861660009081526005602052604090205460ff16155b1561119757604051630af950d560e01b81526001600160a01b038716600482015260240161084a565b6001600160a01b03861660009081526005602052604090205460ff161561121f5760405163079cc67960e41b81526001600160a01b038281166004830152602482018790528716906379cc679090604401600060405180830381600087803b15801561120257600080fd5b505af1158015611216573d6000803e3d6000fd5b50505050611234565b6112346001600160a01b038716823088611872565b83816001600160a01b0316876001600160a01b03167f8bab6aed5a508937051a144e61d6e61336834a66aaee250a00613ae6f744c4228887604051611283929190918252602082015260400190565b60405180910390a45050610ada60018055565b6000828152602081905260409020600101546112b1816112bb565b610ada8383611470565b610b2b81336118ab565b6002600154036112e857604051633ee5aeb560e01b815260040160405180910390fd5b6002600155565b804710156113195760405163cf47918160e01b81524760048201526024810182905260440161084a565b600080836001600160a01b03168360405160006040518083038185875af1925050503d8060008114611367576040519150601f19603f3d011682016040523d82523d6000602084013e61136c565b606091505b509150915081610ada57610ada816118e4565b6040516001600160a01b03838116602483015260448201839052610b1391859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b03838183161783525050505061190d565b60006113ea8383610cbd565b611468576000838152602081815260408083206001600160a01b03861684529091529020805460ff191660011790556114203390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4506001610678565b506000610678565b600061147c8383610cbd565b15611468576000838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a4506001610678565b6114e361197e565b6002805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b61153561156a565b6002805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586115103390565b60025460ff161561158e5760405163d93c066560e01b815260040160405180910390fd5b565b846001600160a01b0381166115b85760405163e6c4247b60e01b815260040160405180910390fd5b84806000036115da5760405163162908e360e11b815260040160405180910390fd5b8486116115fa5760405163162908e360e11b815260040160405180910390fd5b6040516bffffffffffffffffffffffff1960608a811b8216602084015289901b16603482015260488101879052606881018690526088810185905260a8810184905260009060c80160408051601f1981840301815291815281516020928301206000818152600790935291205490915060ff161561168b57604051632bf773b360e11b815260040160405180910390fd5b6000818152600760205260408120805460ff191660011790556116ae8789611d23565b905086156116e4576001600160a01b038a16600090815260086020526040812080548992906116de908490611cfa565b90915550505b6001600160a01b038a1661170a576117056001600160a01b038a16826112ef565b61180f565b6001600160a01b038a1660009081526005602052604090205460ff16156117fb576040516340c10f1960e01b81526001600160a01b038a81166004830152602482018390528b16906340c10f1990604401600060405180830381600087803b15801561177557600080fd5b505af1158015611789573d6000803e3d6000fd5b505050506000871115611705576040516340c10f1960e01b8152306004820152602481018890526001600160a01b038b16906340c10f1990604401600060405180830381600087803b1580156117de57600080fd5b505af11580156117f2573d6000803e3d6000fd5b5050505061180f565b61180f6001600160a01b038b168a8361137f565b886001600160a01b03168a6001600160a01b0316837f15d34ac2256871aef780df69d4cb6524e17c48711e054696e459f5b8ff090d8c8b8b60405161185e929190918252602082015260400190565b60405180910390a450505050505050505050565b6040516001600160a01b038481166024830152838116604483015260648201839052610ada9186918216906323b872dd906084016113ac565b6118b58282610cbd565b6107875760405163e2517d3f60e01b81526001600160a01b03821660048201526024810183905260440161084a565b8051156118f45780518082602001fd5b60405163d6bda27560e01b815260040160405180910390fd5b600080602060008451602086016000885af180611930576040513d6000823e3d81fd5b50506000513d91508115611948578060011415611955565b6001600160a01b0384163b155b15610ada57604051635274afe760e01b81526001600160a01b038516600482015260240161084a565b60025460ff1661158e57604051638dfc202b60e01b815260040160405180910390fd5b6000602082840312156119b357600080fd5b81356001600160e01b0319811681146119cb57600080fd5b9392505050565b6000602082840312156119e457600080fd5b5035919050565b80356001600160a01b0381168114611a0257600080fd5b919050565b600060208284031215611a1957600080fd5b6119cb826119eb565b80358015158114611a0257600080fd5b600080600060608486031215611a4757600080fd5b611a50846119eb565b9250611a5e60208501611a22565b9150611a6c60408501611a22565b90509250925092565b602080825282518282018190526000918401906040840190835b81811015611ab65783516001600160a01b0316835260209384019390920191600101611a8f565b509095945050505050565b60008060408385031215611ad457600080fd5b82359150611ae4602084016119eb565b90509250929050565b600080600060608486031215611b0257600080fd5b83359250611b12602085016119eb565b9150611a6c604085016119eb565b60008060408385031215611b3357600080fd5b611b3c836119eb565b946020939093013593505050565b60008083601f840112611b5c57600080fd5b50813567ffffffffffffffff811115611b7457600080fd5b6020830191508360208260051b8501011115611b8f57600080fd5b9250929050565b600080600080600080600080600080600060c08c8e031215611bb757600080fd5b8b3567ffffffffffffffff811115611bce57600080fd5b611bda8e828f01611b4a565b909c509a505060208c013567ffffffffffffffff811115611bfa57600080fd5b611c068e828f01611b4a565b909a5098505060408c013567ffffffffffffffff811115611c2657600080fd5b611c328e828f01611b4a565b90985096505060608c013567ffffffffffffffff811115611c5257600080fd5b611c5e8e828f01611b4a565b90965094505060808c013567ffffffffffffffff811115611c7e57600080fd5b611c8a8e828f01611b4a565b9c9f9b9e50999c989b979a969995989497959660a090950135949350505050565b60008060008060808587031215611cc157600080fd5b611cca856119eb565b966020860135965060408601359560600135945092505050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561067857610678611ce4565b634e487b7160e01b600052603260045260246000fd5b8181038181111561067857610678611ce456fea49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a26469706673582212200282af8169b03774405e11a33e81bab5eb4f6a80510f6c7c5f3508750c7e6ada64736f6c634300081a0033
<script src="{@file}"> </script>