ETH Price: $3,434.18 (-1.50%)

Contract

0x85F4173281f1314D558DAfA3Dc42287Ba2842784
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw161449072022-12-09 4:56:23748 days ago1670561783IN
0x85F41732...Ba2842784
0 ETH0.0004195513.07795893
Revoke Role161370222022-12-08 2:31:11749 days ago1670466671IN
0x85F41732...Ba2842784
0 ETH0.0004100615.09817532
Grant Role161370212022-12-08 2:30:59749 days ago1670466659IN
0x85F41732...Ba2842784
0 ETH0.0007653514.98349643
Grant Role161370192022-12-08 2:30:35749 days ago1670466635IN
0x85F41732...Ba2842784
0 ETH0.0007049213.80037881

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
161449072022-12-09 4:56:23748 days ago1670561783
0x85F41732...Ba2842784
3.64 ETH
161447382022-12-09 4:22:23748 days ago1670559743
0x85F41732...Ba2842784
0.01 ETH
161446482022-12-09 4:04:23748 days ago1670558663
0x85F41732...Ba2842784
0.01 ETH
161446432022-12-09 4:03:23748 days ago1670558603
0x85F41732...Ba2842784
0.01 ETH
161446432022-12-09 4:03:23748 days ago1670558603
0x85F41732...Ba2842784
0.01 ETH
161446372022-12-09 4:02:11748 days ago1670558531
0x85F41732...Ba2842784
0.01 ETH
161446352022-12-09 4:01:47748 days ago1670558507
0x85F41732...Ba2842784
0.01 ETH
161446302022-12-09 4:00:47748 days ago1670558447
0x85F41732...Ba2842784
0.01 ETH
161446242022-12-09 3:59:35748 days ago1670558375
0x85F41732...Ba2842784
0.01 ETH
161446202022-12-09 3:58:47748 days ago1670558327
0x85F41732...Ba2842784
0.01 ETH
161446182022-12-09 3:58:23748 days ago1670558303
0x85F41732...Ba2842784
0.01 ETH
161446182022-12-09 3:58:23748 days ago1670558303
0x85F41732...Ba2842784
0.01 ETH
161446182022-12-09 3:58:23748 days ago1670558303
0x85F41732...Ba2842784
0.01 ETH
161446172022-12-09 3:58:11748 days ago1670558291
0x85F41732...Ba2842784
0.01 ETH
161446172022-12-09 3:58:11748 days ago1670558291
0x85F41732...Ba2842784
0.01 ETH
161446162022-12-09 3:57:59748 days ago1670558279
0x85F41732...Ba2842784
0.01 ETH
161446162022-12-09 3:57:59748 days ago1670558279
0x85F41732...Ba2842784
0.01 ETH
161446162022-12-09 3:57:59748 days ago1670558279
0x85F41732...Ba2842784
0.01 ETH
161446112022-12-09 3:56:59748 days ago1670558219
0x85F41732...Ba2842784
0.01 ETH
161446042022-12-09 3:55:35748 days ago1670558135
0x85F41732...Ba2842784
0.01 ETH
161446022022-12-09 3:55:11748 days ago1670558111
0x85F41732...Ba2842784
0.01 ETH
161446022022-12-09 3:55:11748 days ago1670558111
0x85F41732...Ba2842784
0.01 ETH
161446002022-12-09 3:54:47748 days ago1670558087
0x85F41732...Ba2842784
0.01 ETH
161445962022-12-09 3:53:59748 days ago1670558039
0x85F41732...Ba2842784
0.01 ETH
161445912022-12-09 3:52:59748 days ago1670557979
0x85F41732...Ba2842784
0.01 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FeeHandler

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 8 : FeeHandler.sol
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/AccessControl.sol";
import "../interfaces/IFeeHandler.sol";

contract FeeHandler is IFeeHandler, AccessControl {
    address public immutable bridgeAddress;
    uint256 public fee;

    event SetFee(uint256 newFee);
    event Withdraw(address indexed to, uint256 indexed amount);
    event CollectFee(
        address sender,
        uint8 fromDomainID,
        uint8 destinationDomainID,
        bytes32 resourceID,
        uint256 fee
    );

    modifier onlyAdmin() {
        require(
            hasRole(DEFAULT_ADMIN_ROLE, _msgSender()),
            "must have admin role"
        );
        _;
    }

    modifier onlyBridge() {
        require(_msgSender() == bridgeAddress, "not a bridge");
        _;
    }

    /// @param bridgeAddress_ Contract address of previously deployed Bridge.
    constructor(address bridgeAddress_, uint256 initialFee) {
        require(bridgeAddress_ != address(0), "zero address");
        bridgeAddress = bridgeAddress_;
        fee = initialFee;
        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
    }

    /// @notice Sets new value of the fee.
    ///
    /// @notice Requirements:
    /// - It must be called by only admin.
    ///
    /// @param newFee Value {_fee} will be updated to.
    ///
    /// @notice Emits a {FeeChanged} event.
    function setFee(uint256 newFee) external onlyAdmin {
        require(fee != newFee, "Current fee is equal to new fee");
        fee = newFee;
        emit SetFee(newFee);
    }

    /// @notice Withdraws funds.
    ///
    /// @notice Requirements:
    /// - It must be called by only admin.
    /// - the balance must be greater than zero.
    ///
    /// @notice Emits a {Withdraw} event.
    function withdraw() external onlyAdmin {
        uint256 balance = address(this).balance;
        require(balance > 0, "zero balance");

        emit Withdraw(_msgSender(), balance);

        // slither-disable-next-line low-level-calls,arbitrary-send-eth
        (bool success, ) = _msgSender().call{value: balance}("");
        require(success, "native token transfer failed");
    }

    /// @notice Collects fee for deposit.
    /// @param sender Sender of the deposit.
    /// @param originDomainID ID of the source chain.
    /// @param destinationDomainID ID of chain deposit will be bridged to.
    /// @param resourceID ResourceID to be used when making deposits.
    function collectFee(
        address sender,
        uint8 originDomainID,
        uint8 destinationDomainID,
        bytes32 resourceID
    ) external payable onlyBridge {
        require(msg.value == fee, "Incorrect fee supplied");
        emit CollectFee(
            sender,
            originDomainID,
            destinationDomainID,
            resourceID,
            fee
        );
    }
}

File 2 of 8 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * 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}:
 *
 * ```
 * 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.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    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 override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @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 override 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 override 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 override 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 `account`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * May emit a {RoleGranted} event.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @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 Grants `role` to `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 3 of 8 : IFeeHandler.sol
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity ^0.8.0;

interface IFeeHandler {
    /// @notice Collects fee for deposit.
    /// @param sender Sender of the deposit.
    /// @param fromDomainID ID of the source chain.
    /// @param destinationDomainID ID of chain deposit will be bridged to.
    /// @param resourceID ResourceID to be used when making deposits.
    function collectFee(
        address sender,
        uint8 fromDomainID,
        uint8 destinationDomainID,
        bytes32 resourceID
    ) external payable;

    /// @notice gets fee for deposit.
    function fee() external view returns (uint256);
}

File 4 of 8 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @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.
     *
     * _Available since v3.1._
     */
    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, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    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 `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 5 of 8 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

File 6 of 8 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

File 7 of 8 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 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);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 8 of 8 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * 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[EIP 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);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"bridgeAddress_","type":"address"},{"internalType":"uint256","name":"initialFee","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint8","name":"fromDomainID","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"destinationDomainID","type":"uint8"},{"indexed":false,"internalType":"bytes32","name":"resourceID","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"CollectFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"SetFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bridgeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint8","name":"originDomainID","type":"uint8"},{"internalType":"uint8","name":"destinationDomainID","type":"uint8"},{"internalType":"bytes32","name":"resourceID","type":"bytes32"}],"name":"collectFee","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a060405234801561001057600080fd5b50604051610ddc380380610ddc83398101604081905261002f91610148565b6001600160a01b0382166100785760405162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b604482015260640160405180910390fd5b6001600160a01b038216608052600181905561009560003361009c565b5050610182565b6100a682826100aa565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166100a6576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556101043390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000806040838503121561015b57600080fd5b82516001600160a01b038116811461017257600080fd5b6020939093015192949293505050565b608051610c386101a4600039600081816101f001526104970152610c386000f3fe6080604052600436106100a75760003560e01c806369fe0e2d1161006457806369fe0e2d1461018957806391d14854146101a9578063a217fddf146101c9578063a3c573eb146101de578063d547741f1461022a578063ddca3f431461024a57600080fd5b806301ffc9a7146100ac578063248a9ca3146100e15780632f2ff15d1461011f57806336568abe146101415780633ccfd60b146101615780634e6ea3f014610176575b600080fd5b3480156100b857600080fd5b506100cc6100c73660046109cc565b610260565b60405190151581526020015b60405180910390f35b3480156100ed57600080fd5b506101116100fc3660046109f6565b60009081526020819052604090206001015490565b6040519081526020016100d8565b34801561012b57600080fd5b5061013f61013a366004610a2b565b610297565b005b34801561014d57600080fd5b5061013f61015c366004610a2b565b6102c1565b34801561016d57600080fd5b5061013f610344565b61013f610184366004610a68565b610494565b34801561019557600080fd5b5061013f6101a43660046109f6565b6105a8565b3480156101b557600080fd5b506100cc6101c4366004610a2b565b610681565b3480156101d557600080fd5b50610111600081565b3480156101ea57600080fd5b506102127f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100d8565b34801561023657600080fd5b5061013f610245366004610a2b565b6106aa565b34801561025657600080fd5b5061011160015481565b60006001600160e01b03198216637965db0b60e01b148061029157506301ffc9a760e01b6001600160e01b03198316145b92915050565b6000828152602081905260409020600101546102b2816106cf565b6102bc83836106dc565b505050565b6001600160a01b03811633146103365760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6103408282610760565b5050565b61034f600033610681565b6103925760405162461bcd60e51b81526020600482015260146024820152736d75737420686176652061646d696e20726f6c6560601b604482015260640161032d565b47806103cf5760405162461bcd60e51b815260206004820152600c60248201526b7a65726f2062616c616e636560a01b604482015260640161032d565b604051819033907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a942436490600090a3604051600090339083908381818185875af1925050503d806000811461043e576040519150601f19603f3d011682016040523d82523d6000602084013e610443565b606091505b50509050806103405760405162461bcd60e51b815260206004820152601c60248201527f6e617469766520746f6b656e207472616e73666572206661696c656400000000604482015260640161032d565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146104fb5760405162461bcd60e51b815260206004820152600c60248201526b6e6f7420612062726964676560a01b604482015260640161032d565b60015434146105455760405162461bcd60e51b8152602060048201526016602482015275125b98dbdc9c9958dd08199959481cdd5c1c1b1a595960521b604482015260640161032d565b600154604080516001600160a01b038716815260ff8681166020830152851681830152606081018490526080810192909252517f4d11f8929f6a625ca3fca9232e69862833459980a137e762aaaf202144e2ecde9181900360a00190a150505050565b6105b3600033610681565b6105f65760405162461bcd60e51b81526020600482015260146024820152736d75737420686176652061646d696e20726f6c6560601b604482015260640161032d565b80600154036106475760405162461bcd60e51b815260206004820152601f60248201527f43757272656e742066656520697320657175616c20746f206e65772066656500604482015260640161032d565b60018190556040518181527e172ddfc5ae88d08b3de01a5a187667c37a5a53989e8c175055cb6c993792a79060200160405180910390a150565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6000828152602081905260409020600101546106c5816106cf565b6102bc8383610760565b6106d981336107c5565b50565b6106e68282610681565b610340576000828152602081815260408083206001600160a01b03851684529091529020805460ff1916600117905561071c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61076a8282610681565b15610340576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6107cf8282610681565b610340576107e7816001600160a01b03166014610829565b6107f2836020610829565b604051602001610803929190610ad7565b60408051601f198184030181529082905262461bcd60e51b825261032d91600401610b4c565b60606000610838836002610b95565b610843906002610bac565b67ffffffffffffffff81111561085b5761085b610bbf565b6040519080825280601f01601f191660200182016040528015610885576020820181803683370190505b509050600360fc1b816000815181106108a0576108a0610bd5565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106108cf576108cf610bd5565b60200101906001600160f81b031916908160001a90535060006108f3846002610b95565b6108fe906001610bac565b90505b6001811115610976576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061093257610932610bd5565b1a60f81b82828151811061094857610948610bd5565b60200101906001600160f81b031916908160001a90535060049490941c9361096f81610beb565b9050610901565b5083156109c55760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161032d565b9392505050565b6000602082840312156109de57600080fd5b81356001600160e01b0319811681146109c557600080fd5b600060208284031215610a0857600080fd5b5035919050565b80356001600160a01b0381168114610a2657600080fd5b919050565b60008060408385031215610a3e57600080fd5b82359150610a4e60208401610a0f565b90509250929050565b803560ff81168114610a2657600080fd5b60008060008060808587031215610a7e57600080fd5b610a8785610a0f565b9350610a9560208601610a57565b9250610aa360408601610a57565b9396929550929360600135925050565b60005b83811015610ace578181015183820152602001610ab6565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351610b0f816017850160208801610ab3565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351610b40816028840160208801610ab3565b01602801949350505050565b6020815260008251806020840152610b6b816040850160208701610ab3565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761029157610291610b7f565b8082018082111561029157610291610b7f565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600081610bfa57610bfa610b7f565b50600019019056fea2646970667358221220c2f1b492c28ebab927bc669ec8ffa61cd24552dbd4e1970f64b1d0c5bceb68d864736f6c634300081100330000000000000000000000002b32374a2a1487d3fbbc2e6f3abb77646f35a810000000000000000000000000000000000000000000000000002386f26fc10000

Deployed Bytecode

0x6080604052600436106100a75760003560e01c806369fe0e2d1161006457806369fe0e2d1461018957806391d14854146101a9578063a217fddf146101c9578063a3c573eb146101de578063d547741f1461022a578063ddca3f431461024a57600080fd5b806301ffc9a7146100ac578063248a9ca3146100e15780632f2ff15d1461011f57806336568abe146101415780633ccfd60b146101615780634e6ea3f014610176575b600080fd5b3480156100b857600080fd5b506100cc6100c73660046109cc565b610260565b60405190151581526020015b60405180910390f35b3480156100ed57600080fd5b506101116100fc3660046109f6565b60009081526020819052604090206001015490565b6040519081526020016100d8565b34801561012b57600080fd5b5061013f61013a366004610a2b565b610297565b005b34801561014d57600080fd5b5061013f61015c366004610a2b565b6102c1565b34801561016d57600080fd5b5061013f610344565b61013f610184366004610a68565b610494565b34801561019557600080fd5b5061013f6101a43660046109f6565b6105a8565b3480156101b557600080fd5b506100cc6101c4366004610a2b565b610681565b3480156101d557600080fd5b50610111600081565b3480156101ea57600080fd5b506102127f0000000000000000000000002b32374a2a1487d3fbbc2e6f3abb77646f35a81081565b6040516001600160a01b0390911681526020016100d8565b34801561023657600080fd5b5061013f610245366004610a2b565b6106aa565b34801561025657600080fd5b5061011160015481565b60006001600160e01b03198216637965db0b60e01b148061029157506301ffc9a760e01b6001600160e01b03198316145b92915050565b6000828152602081905260409020600101546102b2816106cf565b6102bc83836106dc565b505050565b6001600160a01b03811633146103365760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6103408282610760565b5050565b61034f600033610681565b6103925760405162461bcd60e51b81526020600482015260146024820152736d75737420686176652061646d696e20726f6c6560601b604482015260640161032d565b47806103cf5760405162461bcd60e51b815260206004820152600c60248201526b7a65726f2062616c616e636560a01b604482015260640161032d565b604051819033907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a942436490600090a3604051600090339083908381818185875af1925050503d806000811461043e576040519150601f19603f3d011682016040523d82523d6000602084013e610443565b606091505b50509050806103405760405162461bcd60e51b815260206004820152601c60248201527f6e617469766520746f6b656e207472616e73666572206661696c656400000000604482015260640161032d565b337f0000000000000000000000002b32374a2a1487d3fbbc2e6f3abb77646f35a8106001600160a01b0316146104fb5760405162461bcd60e51b815260206004820152600c60248201526b6e6f7420612062726964676560a01b604482015260640161032d565b60015434146105455760405162461bcd60e51b8152602060048201526016602482015275125b98dbdc9c9958dd08199959481cdd5c1c1b1a595960521b604482015260640161032d565b600154604080516001600160a01b038716815260ff8681166020830152851681830152606081018490526080810192909252517f4d11f8929f6a625ca3fca9232e69862833459980a137e762aaaf202144e2ecde9181900360a00190a150505050565b6105b3600033610681565b6105f65760405162461bcd60e51b81526020600482015260146024820152736d75737420686176652061646d696e20726f6c6560601b604482015260640161032d565b80600154036106475760405162461bcd60e51b815260206004820152601f60248201527f43757272656e742066656520697320657175616c20746f206e65772066656500604482015260640161032d565b60018190556040518181527e172ddfc5ae88d08b3de01a5a187667c37a5a53989e8c175055cb6c993792a79060200160405180910390a150565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6000828152602081905260409020600101546106c5816106cf565b6102bc8383610760565b6106d981336107c5565b50565b6106e68282610681565b610340576000828152602081815260408083206001600160a01b03851684529091529020805460ff1916600117905561071c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61076a8282610681565b15610340576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6107cf8282610681565b610340576107e7816001600160a01b03166014610829565b6107f2836020610829565b604051602001610803929190610ad7565b60408051601f198184030181529082905262461bcd60e51b825261032d91600401610b4c565b60606000610838836002610b95565b610843906002610bac565b67ffffffffffffffff81111561085b5761085b610bbf565b6040519080825280601f01601f191660200182016040528015610885576020820181803683370190505b509050600360fc1b816000815181106108a0576108a0610bd5565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106108cf576108cf610bd5565b60200101906001600160f81b031916908160001a90535060006108f3846002610b95565b6108fe906001610bac565b90505b6001811115610976576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061093257610932610bd5565b1a60f81b82828151811061094857610948610bd5565b60200101906001600160f81b031916908160001a90535060049490941c9361096f81610beb565b9050610901565b5083156109c55760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161032d565b9392505050565b6000602082840312156109de57600080fd5b81356001600160e01b0319811681146109c557600080fd5b600060208284031215610a0857600080fd5b5035919050565b80356001600160a01b0381168114610a2657600080fd5b919050565b60008060408385031215610a3e57600080fd5b82359150610a4e60208401610a0f565b90509250929050565b803560ff81168114610a2657600080fd5b60008060008060808587031215610a7e57600080fd5b610a8785610a0f565b9350610a9560208601610a57565b9250610aa360408601610a57565b9396929550929360600135925050565b60005b83811015610ace578181015183820152602001610ab6565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351610b0f816017850160208801610ab3565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351610b40816028840160208801610ab3565b01602801949350505050565b6020815260008251806020840152610b6b816040850160208701610ab3565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761029157610291610b7f565b8082018082111561029157610291610b7f565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600081610bfa57610bfa610b7f565b50600019019056fea2646970667358221220c2f1b492c28ebab927bc669ec8ffa61cd24552dbd4e1970f64b1d0c5bceb68d864736f6c63430008110033

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

0000000000000000000000002b32374a2a1487d3fbbc2e6f3abb77646f35a810000000000000000000000000000000000000000000000000002386f26fc10000

-----Decoded View---------------
Arg [0] : bridgeAddress_ (address): 0x2B32374A2a1487D3FbBc2e6F3Abb77646F35A810
Arg [1] : initialFee (uint256): 10000000000000000

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000002b32374a2a1487d3fbbc2e6f3abb77646f35a810
Arg [1] : 000000000000000000000000000000000000000000000000002386f26fc10000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

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