ETH Price: $1,879.28 (-3.55%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StarkgateRegistry

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, Apache-2.0 license
File 1 of 14 : StarkgateRegistry.sol
/*
  Copyright 2019-2024 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.8.20;

import "src/solidity/IStarkgateRegistry.sol";
import "src/solidity/IStarkgateService.sol";
import "src/solidity/StarkgateConstants.sol";
import "starkware/solidity/interfaces/Identity.sol";
import "starkware/solidity/interfaces/ProxySupport.sol";
import "starkware/solidity/libraries/Addresses.sol";
import "starkware/solidity/libraries/NamedStorage.sol";

contract StarkgateRegistry is Identity, ProxySupport, IStarkgateRegistry {
    using Addresses for address;
    // Named storage slot tags.
    string internal constant MANAGER_TAG = "STARKGATE_REGISTRY_MANAGER_SLOT_TAG";
    string internal constant TOKEN_TO_BRIDGE_TAG = "STARKGATE_REGISTRY_TOKEN_TO_BRIDGE_SLOT_TAG";
    string internal constant TOKEN_TO_WITHDRAWAL_BRIDGES_TAG =
        "STARKGATE_REGISTRY_TOKEN_TO_WITHDRAWAL_BRIDGES_SLOT_TAG";
    event TokenSelfRemoved(address indexed token, address indexed bridge);
    event TokenStatusBlocked(address indexed token);
    event TokenEnlisted(address indexed token, address indexed bridge);

    // Storage Getters.
    function manager() internal view returns (address) {
        return NamedStorage.getAddressValue(MANAGER_TAG);
    }

    // Mapping that establishes a connection between tokens and their respective active bridge
    // contract addresses, enabling seamless deposits for each token.
    function tokenToBridge() internal pure returns (mapping(address => address) storage) {
        return NamedStorage.addressToAddressMapping(TOKEN_TO_BRIDGE_TAG);
    }

    // Mapping connecting token contract addresses to arrays of bridge contract addresses,
    // indicating bridges that have supported withdrawals for each respective token.
    function tokenToWithdrawalBridges()
        internal
        pure
        returns (mapping(address => address[]) storage)
    {
        return NamedStorage.addressToAddressListMapping(TOKEN_TO_WITHDRAWAL_BRIDGES_TAG);
    }

    modifier onlyManager() {
        require(manager() == msg.sender, "ONLY_MANAGER");
        _;
    }

    function identify() external pure override returns (string memory) {
        return "StarkWare_StarkgateRegistry_2.0_1";
    }

    /*
      Initializes the contract.
    */
    function initializeContractState(bytes calldata data) internal override {
        address manager_ = abi.decode(data, (address));
        NamedStorage.setAddressValueOnce(MANAGER_TAG, manager_);
    }

    function isInitialized() internal view override returns (bool) {
        return manager() != address(0);
    }

    function numOfSubContracts() internal pure override returns (uint256) {
        return 0;
    }

    /*
      No processing needed, as there are no sub-contracts to this contract.
    */
    function processSubContractAddresses(bytes calldata subContractAddresses) internal override {}

    function validateInitData(bytes calldata data) internal view virtual override {
        require(data.length == 32, "ILLEGAL_DATA_SIZE");
        address manager_ = abi.decode(data, (address));
        require(manager_.isContract(), "INVALID_MANAGER_CONTRACT_ADDRESS");
    }

    function getBridge(address token) external view returns (address) {
        return tokenToBridge()[token];
    }

    /**
      Add a mapping between a token and the bridge handling it.
      Ensuring unique enrollment.
    */
    function enlistToken(address token, address bridge) external onlyManager {
        address currentBridge = tokenToBridge()[token];
        require(
            currentBridge == address(0) || currentBridge == BLOCKED_TOKEN,
            "TOKEN_ALREADY_ENROLLED"
        );
        emit TokenEnlisted(token, bridge);
        tokenToBridge()[token] = bridge;
        if (!containsAddress(tokenToWithdrawalBridges()[token], bridge)) {
            tokenToWithdrawalBridges()[token].push(bridge);
        }
    }

    /**
      Block a specific token from being used in the StarkGate.
      A blocked token cannot be deployed.
    */
    function blockToken(address token) external onlyManager {
        emit TokenStatusBlocked(token);
        tokenToBridge()[token] = BLOCKED_TOKEN;
    }

    function getWithdrawalBridges(address token) external view returns (address[] memory bridges) {
        return tokenToWithdrawalBridges()[token];
    }

    /**
      Using this function a bridge removes enlisting of its token from the registry.
      The bridge must implement `isServicingToken(address token)` (see `IStarkgateService`).
    */
    function selfRemove(address token) external {
        require(tokenToBridge()[token] == msg.sender, "BRIDGE_MISMATCH_CANNOT_REMOVE_TOKEN");
        require(!IStarkgateService(msg.sender).isServicingToken(token), "TOKEN_IS_STILL_SERVICED");
        emit TokenSelfRemoved(token, msg.sender);
        tokenToBridge()[token] = address(0x0);
    }

    function containsAddress(address[] memory addresses, address target)
        internal
        pure
        returns (bool)
    {
        for (uint256 i = 0; i < addresses.length; i++) {
            if (addresses[i] == target) {
                return true;
            }
        }
        return false;
    }
}

File 2 of 14 : AccessControl.sol
/*
  Copyright 2019-2024 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: MIT
// Based on OpenZeppelin Contract (access/AccessControl.sol)
// StarkWare modification (storage slot, change to library).

pragma solidity ^0.8.0;

import "third_party/open_zeppelin/utils/Strings.sol";

/*
  Library module that allows using contracts 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.
 
  OpenZeppelin implementation changed as following:
  1. Converted to library.
  2. Storage valiable {_roles} moved outside of linear storage,
     to avoid potential storage conflicts or corruption.
  3. Removed ERC165 support.
*/
library AccessControl {
    /*
      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
    );

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

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

    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    // Context interface functions.
    function _msgSender() internal view returns (address) {
        return msg.sender;
    }

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

    // The storage variable `_roles` is located away from the contract linear area (low storage addresses)
    // to prevent potential collision/corruption in upgrade scenario.
    // Slot = Web3.keccak(text="AccesControl_Storage_Slot").
    bytes32 constant rolesSlot = 0x53e43b954ba190a7e49386f1f78b01dcd9f628db23f432fa029a7dfd6d98e8fb;

    function _roles() private pure returns (mapping(bytes32 => RoleData) storage roles) {
        assembly {
            roles.slot := rolesSlot
        }
    }

    bytes32 constant DEFAULT_ADMIN_ROLE = 0x00;

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

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

    /*
      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 {
        _checkRole(role, _msgSender());
    }

    /*
      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 {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

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

    /*
      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) internal onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /*
      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) internal onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /*
      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) internal {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /*
      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]virtual
      ====
      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 {
        _grantRole(role, account);
    }

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

    /*
      Grants `role` to `account`.
     
      Internal function without access restriction.
     
      May emit a {RoleGranted} event.
    */
    function _grantRole(bytes32 role, address account) internal {
        if (!hasRole(role, account)) {
            _roles()[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

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

File 3 of 14 : Addresses.sol
/*
  Copyright 2019-2024 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.8.0;

/*
  Common Utility Libraries.
  I. Addresses (extending address).
*/
library Addresses {
    /*
      Note: isContract function has some known limitation.
      See https://github.com/OpenZeppelin/
      openzeppelin-contracts/blob/master/contracts/utils/Address.sol.
    */
    function isContract(address account) internal view returns (bool) {
        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    function performEthTransfer(address recipient, uint256 amount) internal {
        if (amount == 0) return;
        (bool success, ) = recipient.call{value: amount}(""); // NOLINT: low-level-calls.
        require(success, "ETH_TRANSFER_FAILED");
    }

    /*
      Safe wrapper around ERC20/ERC721 calls.
      This is required because many deployed ERC20 contracts don't return a value.
      See https://github.com/ethereum/solidity/issues/4116.
    */
    function safeTokenContractCall(address tokenAddress, bytes memory callData) internal {
        require(isContract(tokenAddress), "BAD_TOKEN_ADDRESS");
        // NOLINTNEXTLINE: low-level-calls.
        (bool success, bytes memory returndata) = tokenAddress.call(callData);
        require(success, string(returndata));

        if (returndata.length > 0) {
            require(abi.decode(returndata, (bool)), "TOKEN_OPERATION_FAILED");
        }
    }
}

File 4 of 14 : BlockDirectCall.sol
/*
  Copyright 2019-2024 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.8.0;

/*
  This contract provides means to block direct call of an external function.
  A derived contract (e.g. MainDispatcherBase) should decorate sensitive functions with the
  notCalledDirectly modifier, thereby preventing it from being called directly, and allowing only
  calling using delegate_call.
*/
abstract contract BlockDirectCall {
    address immutable this_;

    constructor() {
        this_ = address(this);
    }

    modifier notCalledDirectly() {
        require(this_ != address(this), "DIRECT_CALL_DISALLOWED");
        _;
    }
}

File 5 of 14 : ContractInitializer.sol
/*
  Copyright 2019-2024 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.8.0;

/**
  Interface for contract initialization.
  The functions it exposes are the app specific parts of the contract initialization,
  and are called by the ProxySupport contract that implement the generic part of behind-proxy
  initialization.
*/
abstract contract ContractInitializer {
    /*
      The number of sub-contracts that the proxied contract consists of.
    */
    function numOfSubContracts() internal pure virtual returns (uint256);

    /*
      Indicates if the proxied contract has already been initialized.
      Used to prevent re-init.
    */
    function isInitialized() internal view virtual returns (bool);

    /*
      Validates the init data that is passed into the proxied contract.
    */
    function validateInitData(bytes calldata data) internal view virtual;

    /*
      For a proxied contract that consists of sub-contracts, this function processes
      the sub-contract addresses, e.g. validates them, stores them etc.
    */
    function processSubContractAddresses(bytes calldata subContractAddresses) internal virtual;

    /*
      This function applies the logic of initializing the proxied contract state,
      e.g. setting root values etc.
    */
    function initializeContractState(bytes calldata data) internal virtual;
}

File 6 of 14 : IStarkgateRegistry.sol
/*
  Copyright 2019-2024 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.8.0;

interface IStarkgateRegistry {
    /**
      Returns the bridge that handles the given token.
    */
    function getBridge(address token) external view returns (address);

    /**
      Add a mapping between a token and the bridge handling it.
    */
    function enlistToken(address token, address bridge) external;

    /**
      Block a specific token from being used in the StarkGate.
      A blocked token cannot be deployed.
      */
    function blockToken(address token) external;

    /**
      Retrieves a list of bridge addresses that have facilitated withdrawals 
      for the specified token.
     */
    function getWithdrawalBridges(address token) external view returns (address[] memory bridges);

    /**
      Using this function a bridge removes enlisting of its token from the registry.
      The bridge must implement `isServicingToken(address token)` (see `IStarkgateService`).
     */
    function selfRemove(address token) external;
}

File 7 of 14 : IStarkgateService.sol
/*
  Copyright 2019-2024 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.8.0;

interface IStarkgateService {
    /**
    Checks whether the calling contract is providing a service for the specified token.
    Returns True if the calling contract is providing a service for the token, otherwise false.
   */
    function isServicingToken(address token) external view returns (bool);
}

File 8 of 14 : Identity.sol
/*
  Copyright 2019-2024 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.8.0;

interface Identity {
    /*
      Allows a caller to ensure that the provided address is of the expected type and version.
    */
    function identify() external pure returns (string memory);
}

File 9 of 14 : NamedStorage.sol
/*
  Copyright 2019-2024 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.8.0;

/*
  Library to provide basic storage, in storage location out of the low linear address space.

  New types of storage variables should be added here upon need.
*/
library NamedStorage {
    function bytes32ToBoolMapping(string memory tag_)
        internal
        pure
        returns (mapping(bytes32 => bool) storage randomVariable)
    {
        bytes32 location = keccak256(abi.encodePacked(tag_));
        assembly {
            randomVariable.slot := location
        }
    }

    function bytes32ToUint256Mapping(string memory tag_)
        internal
        pure
        returns (mapping(bytes32 => uint256) storage randomVariable)
    {
        bytes32 location = keccak256(abi.encodePacked(tag_));
        assembly {
            randomVariable.slot := location
        }
    }

    function addressToUint256Mapping(string memory tag_)
        internal
        pure
        returns (mapping(address => uint256) storage randomVariable)
    {
        bytes32 location = keccak256(abi.encodePacked(tag_));
        assembly {
            randomVariable.slot := location
        }
    }

    function bytes32ToAddressMapping(string memory tag_)
        internal
        pure
        returns (mapping(bytes32 => address) storage randomVariable)
    {
        bytes32 location = keccak256(abi.encodePacked(tag_));
        assembly {
            randomVariable.slot := location
        }
    }

    function uintToAddressMapping(string memory tag_)
        internal
        pure
        returns (mapping(uint256 => address) storage randomVariable)
    {
        bytes32 location = keccak256(abi.encodePacked(tag_));
        assembly {
            randomVariable.slot := location
        }
    }

    function addressToAddressMapping(string memory tag_)
        internal
        pure
        returns (mapping(address => address) storage randomVariable)
    {
        bytes32 location = keccak256(abi.encodePacked(tag_));
        assembly {
            randomVariable.slot := location
        }
    }

    function addressToAddressListMapping(string memory tag_)
        internal
        pure
        returns (mapping(address => address[]) storage randomVariable)
    {
        bytes32 location = keccak256(abi.encodePacked(tag_));
        assembly {
            randomVariable.slot := location
        }
    }

    function addressToBoolMapping(string memory tag_)
        internal
        pure
        returns (mapping(address => bool) storage randomVariable)
    {
        bytes32 location = keccak256(abi.encodePacked(tag_));
        assembly {
            randomVariable.slot := location
        }
    }

    function getUintValue(string memory tag_) internal view returns (uint256 retVal) {
        bytes32 slot = keccak256(abi.encodePacked(tag_));
        assembly {
            retVal := sload(slot)
        }
    }

    function setUintValue(string memory tag_, uint256 value) internal {
        bytes32 slot = keccak256(abi.encodePacked(tag_));
        assembly {
            sstore(slot, value)
        }
    }

    function setUintValueOnce(string memory tag_, uint256 value) internal {
        require(getUintValue(tag_) == 0, "ALREADY_SET");
        setUintValue(tag_, value);
    }

    function getAddressValue(string memory tag_) internal view returns (address retVal) {
        bytes32 slot = keccak256(abi.encodePacked(tag_));
        assembly {
            retVal := sload(slot)
        }
    }

    function setAddressValue(string memory tag_, address value) internal {
        bytes32 slot = keccak256(abi.encodePacked(tag_));
        assembly {
            sstore(slot, value)
        }
    }

    function setAddressValueOnce(string memory tag_, address value) internal {
        require(getAddressValue(tag_) == address(0x0), "ALREADY_SET");
        setAddressValue(tag_, value);
    }

    function getBoolValue(string memory tag_) internal view returns (bool retVal) {
        bytes32 slot = keccak256(abi.encodePacked(tag_));
        assembly {
            retVal := sload(slot)
        }
    }

    function setBoolValue(string memory tag_, bool value) internal {
        bytes32 slot = keccak256(abi.encodePacked(tag_));
        assembly {
            sstore(slot, value)
        }
    }
}

File 10 of 14 : ProxySupport.sol
/*
  Copyright 2019-2024 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.8.0;

import "starkware/solidity/components/Roles.sol";
import "starkware/solidity/libraries/RolesLib.sol";
import "starkware/solidity/libraries/Addresses.sol";
import "starkware/solidity/interfaces/BlockDirectCall.sol";
import "starkware/solidity/interfaces/ContractInitializer.sol";

/**
  This contract contains the code commonly needed for a contract to be deployed behind
  an upgradability proxy.
  It perform the required semantics of the proxy pattern,
  but in a generic manner.
*/
abstract contract ProxySupport is BlockDirectCall, ContractInitializer, Roles(true) {
    using Addresses for address;

    // The two function below (isFrozen & initialize) needed to bind to the Proxy.
    function isFrozen() external view virtual returns (bool) {
        return false;
    }

    /*
      The initialize() function serves as an alternative constructor for a proxied deployment.

      Flow and notes:
      1. This function cannot be called directly on the deployed contract, but only via
         delegate call.
      2. If an EIC is provided - init is passed onto EIC and the standard init flow is skipped.
         This true for both first intialization or a later one.
      3. The data passed to this function is as follows:
         [sub_contracts addresses, eic address, initData].

         When calling on an initialized contract (no EIC scenario), initData.length must be 0.
    */
    function initialize(bytes calldata data) external notCalledDirectly {
        uint256 eicOffset = 32 * numOfSubContracts();
        uint256 expectedBaseSize = eicOffset + 32;
        require(data.length >= expectedBaseSize, "INIT_DATA_TOO_SMALL");
        address eicAddress = abi.decode(data[eicOffset:expectedBaseSize], (address));

        bytes calldata subContractAddresses = data[:eicOffset];

        processSubContractAddresses(subContractAddresses);

        bytes calldata initData = data[expectedBaseSize:];

        // EIC Provided - Pass initData to EIC and the skip standard init flow.
        if (eicAddress != address(0x0)) {
            callExternalInitializer(eicAddress, initData);
            return;
        }

        if (isInitialized()) {
            require(initData.length == 0, "UNEXPECTED_INIT_DATA");
        } else {
            // Contract was not initialized yet.
            validateInitData(initData);
            initializeContractState(initData);
            RolesLib.initialize();
        }
    }

    function callExternalInitializer(address externalInitializerAddr, bytes calldata eicData)
        private
    {
        require(externalInitializerAddr.isContract(), "EIC_NOT_A_CONTRACT");

        // NOLINTNEXTLINE: low-level-calls, controlled-delegatecall.
        (bool success, bytes memory returndata) = externalInitializerAddr.delegatecall(
            abi.encodeWithSelector(this.initialize.selector, eicData)
        );
        require(success, string(returndata));
        require(returndata.length == 0, string(returndata));
    }
}

File 11 of 14 : Roles.sol
/*
  Copyright 2019-2024 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.8.0;

import "starkware/solidity/libraries/RolesLib.sol";

abstract contract Roles {
    // This flag dermine if the GOVERNANCE_ADMIN role can be renounced.
    bool immutable fullyRenouncable;

    constructor(bool renounceable) {
        fullyRenouncable = renounceable;
        RolesLib.initialize();
    }

    // MODIFIERS.
    modifier onlyAppGovernor() {
        require(isAppGovernor(AccessControl._msgSender()), "ONLY_APP_GOVERNOR");
        _;
    }

    modifier onlyOperator() {
        require(isOperator(AccessControl._msgSender()), "ONLY_OPERATOR");
        _;
    }

    modifier onlySecurityAdmin() {
        require(isSecurityAdmin(AccessControl._msgSender()), "ONLY_SECURITY_ADMIN");
        _;
    }

    modifier onlySecurityAgent() {
        require(isSecurityAgent(AccessControl._msgSender()), "ONLY_SECURITY_AGENT");
        _;
    }

    modifier onlyTokenAdmin() {
        require(isTokenAdmin(AccessControl._msgSender()), "ONLY_TOKEN_ADMIN");
        _;
    }

    modifier onlyUpgradeGovernor() {
        require(isUpgradeGovernor(AccessControl._msgSender()), "ONLY_UPGRADE_GOVERNOR");
        _;
    }

    modifier notSelf(address account) {
        require(account != AccessControl._msgSender(), "CANNOT_PERFORM_ON_SELF");
        _;
    }

    // Is holding role.
    function isAppGovernor(address account) public view returns (bool) {
        return AccessControl.hasRole(APP_GOVERNOR, account);
    }

    function isAppRoleAdmin(address account) public view returns (bool) {
        return AccessControl.hasRole(APP_ROLE_ADMIN, account);
    }

    function isGovernanceAdmin(address account) public view returns (bool) {
        return AccessControl.hasRole(GOVERNANCE_ADMIN, account);
    }

    function isOperator(address account) public view returns (bool) {
        return AccessControl.hasRole(OPERATOR, account);
    }

    function isSecurityAdmin(address account) public view returns (bool) {
        return AccessControl.hasRole(SECURITY_ADMIN, account);
    }

    function isSecurityAgent(address account) public view returns (bool) {
        return AccessControl.hasRole(SECURITY_AGENT, account);
    }

    function isTokenAdmin(address account) public view returns (bool) {
        return AccessControl.hasRole(TOKEN_ADMIN, account);
    }

    function isUpgradeGovernor(address account) public view returns (bool) {
        return AccessControl.hasRole(UPGRADE_GOVERNOR, account);
    }

    // Register Role.
    function registerAppGovernor(address account) external {
        AccessControl.grantRole(APP_GOVERNOR, account);
    }

    function registerAppRoleAdmin(address account) external {
        AccessControl.grantRole(APP_ROLE_ADMIN, account);
    }

    function registerGovernanceAdmin(address account) external {
        AccessControl.grantRole(GOVERNANCE_ADMIN, account);
    }

    function registerOperator(address account) external {
        AccessControl.grantRole(OPERATOR, account);
    }

    function registerSecurityAdmin(address account) external {
        AccessControl.grantRole(SECURITY_ADMIN, account);
    }

    function registerSecurityAgent(address account) external {
        AccessControl.grantRole(SECURITY_AGENT, account);
    }

    function registerTokenAdmin(address account) external {
        AccessControl.grantRole(TOKEN_ADMIN, account);
    }

    function registerUpgradeGovernor(address account) external {
        AccessControl.grantRole(UPGRADE_GOVERNOR, account);
    }

    // Revoke Role.
    function revokeAppGovernor(address account) external {
        AccessControl.revokeRole(APP_GOVERNOR, account);
    }

    function revokeAppRoleAdmin(address account) external notSelf(account) {
        AccessControl.revokeRole(APP_ROLE_ADMIN, account);
    }

    function revokeGovernanceAdmin(address account) external notSelf(account) {
        AccessControl.revokeRole(GOVERNANCE_ADMIN, account);
    }

    function revokeOperator(address account) external {
        AccessControl.revokeRole(OPERATOR, account);
    }

    function revokeSecurityAdmin(address account) external notSelf(account) {
        AccessControl.revokeRole(SECURITY_ADMIN, account);
    }

    function revokeSecurityAgent(address account) external {
        AccessControl.revokeRole(SECURITY_AGENT, account);
    }

    function revokeTokenAdmin(address account) external {
        AccessControl.revokeRole(TOKEN_ADMIN, account);
    }

    function revokeUpgradeGovernor(address account) external {
        AccessControl.revokeRole(UPGRADE_GOVERNOR, account);
    }

    // Renounce Role.
    function renounceRole(bytes32 role, address account) external {
        if (role == GOVERNANCE_ADMIN && !fullyRenouncable) {
            revert("CANNOT_RENOUNCE_GOVERNANCE_ADMIN");
        }
        AccessControl.renounceRole(role, account);
    }
}

File 12 of 14 : RolesLib.sol
/*
  Copyright 2019-2024 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.8.0;

import "starkware/solidity/libraries/AccessControl.sol";

// int.from_bytes(Web3.keccak(text="ROLE_APP_GOVERNOR"), "big") & MASK_250 .
bytes32 constant APP_GOVERNOR = bytes32(
    uint256(0xd2ead78c620e94b02d0a996e99298c59ddccfa1d8a0149080ac3a20de06068)
);

// int.from_bytes(Web3.keccak(text="ROLE_APP_ROLE_ADMIN"), "big") & MASK_250 .
bytes32 constant APP_ROLE_ADMIN = bytes32(
    uint256(0x03e615638e0b79444a70f8c695bf8f2a47033bf1cf95691ec3130f64939cee99)
);

// int.from_bytes(Web3.keccak(text="ROLE_GOVERNANCE_ADMIN"), "big") & MASK_250 .
bytes32 constant GOVERNANCE_ADMIN = bytes32(
    uint256(0x03711c9d994faf6055172091cb841fd4831aa743e6f3315163b06a122c841846)
);

// int.from_bytes(Web3.keccak(text="ROLE_OPERATOR"), "big") & MASK_250 .
bytes32 constant OPERATOR = bytes32(
    uint256(0x023edb77f7c8cc9e38e8afe78954f703aeeda7fffe014eeb6e56ea84e62f6da7)
);

// int.from_bytes(Web3.keccak(text="ROLE_SECURITY_ADMIN"), "big") & MASK_250 .
bytes32 constant SECURITY_ADMIN = bytes32(
    uint256(0x026bd110619d11cfdfc28e281df893bc24828e89177318e9dbd860cdaedeb6b3)
);

// int.from_bytes(Web3.keccak(text="ROLE_SECURITY_AGENT"), "big") & MASK_250 .
bytes32 constant SECURITY_AGENT = bytes32(
    uint256(0x037693ba312785932d430dccf0f56ffedd0aa7c0f8b6da2cc4530c2717689b96)
);

// int.from_bytes(Web3.keccak(text="ROLE_TOKEN_ADMIN"), "big") & MASK_250 .
bytes32 constant TOKEN_ADMIN = bytes32(
    uint256(0x0128d63adbf6b09002c26caf55c47e2f26635807e3ef1b027218aa74c8d61a3e)
);

// int.from_bytes(Web3.keccak(text="ROLE_UPGRADE_GOVERNOR"), "big") & MASK_250 .
bytes32 constant UPGRADE_GOVERNOR = bytes32(
    uint256(0x0251e864ca2a080f55bce5da2452e8cfcafdbc951a3e7fff5023d558452ec228)
);

/*
  Role                |   Role Admin
  ----------------------------------------
  GOVERNANCE_ADMIN    |   GOVERNANCE_ADMIN
  UPGRADE_GOVERNOR    |   GOVERNANCE_ADMIN
  APP_ROLE_ADMIN      |   GOVERNANCE_ADMIN
  APP_GOVERNOR        |   APP_ROLE_ADMIN
  OPERATOR            |   APP_ROLE_ADMIN
  TOKEN_ADMIN         |   APP_ROLE_ADMIN
  SECURITY_ADMIN      |   SECURITY_ADMIN
  SECURITY_AGENT      |   SECURITY_ADMIN .
*/
library RolesLib {
    // INITIALIZERS.
    function governanceRolesInitialized() internal view returns (bool) {
        return AccessControl.getRoleAdmin(GOVERNANCE_ADMIN) != bytes32(0x00);
    }

    function securityRolesInitialized() internal view returns (bool) {
        return AccessControl.getRoleAdmin(SECURITY_ADMIN) != bytes32(0x00);
    }

    function initialize() internal {
        address provisional = AccessControl._msgSender();
        initialize(provisional, provisional);
    }

    function initialize(address provisionalGovernor, address provisionalSecAdmin) internal {
        if (governanceRolesInitialized()) {
            // Support Proxied contract initialization.
            // In case the Proxy already initialized the roles,
            // init will succeed IFF the provisionalGovernor is already `GovernanceAdmin`.
            require(
                AccessControl.hasRole(GOVERNANCE_ADMIN, provisionalGovernor),
                "ROLES_ALREADY_INITIALIZED"
            );
        } else {
            initGovernanceRoles(provisionalGovernor);
        }

        if (securityRolesInitialized()) {
            // If SecurityAdmin initialized,
            // then provisionalSecAdmin must already be a `SecurityAdmin`.
            // If it's not initilized - initialize it.
            require(
                AccessControl.hasRole(SECURITY_ADMIN, provisionalSecAdmin),
                "SECURITY_ROLES_ALREADY_INITIALIZED"
            );
        } else {
            initSecurityRoles(provisionalSecAdmin);
        }
    }

    function initSecurityRoles(address provisionalSecAdmin) private {
        AccessControl._setRoleAdmin(SECURITY_ADMIN, SECURITY_ADMIN);
        AccessControl._setRoleAdmin(SECURITY_AGENT, SECURITY_ADMIN);
        AccessControl._grantRole(SECURITY_ADMIN, provisionalSecAdmin);
    }

    function initGovernanceRoles(address provisionalGovernor) private {
        AccessControl._grantRole(GOVERNANCE_ADMIN, provisionalGovernor);
        AccessControl._setRoleAdmin(APP_GOVERNOR, APP_ROLE_ADMIN);
        AccessControl._setRoleAdmin(APP_ROLE_ADMIN, GOVERNANCE_ADMIN);
        AccessControl._setRoleAdmin(GOVERNANCE_ADMIN, GOVERNANCE_ADMIN);
        AccessControl._setRoleAdmin(OPERATOR, APP_ROLE_ADMIN);
        AccessControl._setRoleAdmin(TOKEN_ADMIN, APP_ROLE_ADMIN);
        AccessControl._setRoleAdmin(UPGRADE_GOVERNOR, GOVERNANCE_ADMIN);
    }
}

File 13 of 14 : StarkgateConstants.sol
/*
  Copyright 2019-2024 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.8.20;

// Starknet L1 handler selectors.
uint256 constant HANDLE_DEPOSIT_SELECTOR = 1285101517810983806491589552491143496277809242732141897358598292095611420389;
uint256 constant HANDLE_TOKEN_DEPOSIT_SELECTOR = 774397379524139446221206168840917193112228400237242521560346153613428128537;

uint256 constant HANDLE_DEPOSIT_WITH_MESSAGE_SELECTOR = 247015267890530308727663503380700973440961674638638362173641612402089762826;

uint256 constant HANDLE_TOKEN_DEPLOYMENT_SELECTOR = 1737780302748468118210503507461757847859991634169290761669750067796330642876;

uint256 constant TRANSFER_FROM_STARKNET = 0;
uint256 constant UINT256_PART_SIZE_BITS = 128;
uint256 constant UINT256_PART_SIZE = 2**UINT256_PART_SIZE_BITS;
uint256 constant MAX_PENDING_DURATION = 5 days;
address constant BLOCKED_TOKEN = address(0x1);

// Cairo felt252 value (short string) of 'ETH'
address constant ETH = address(0x455448);

File 14 of 14 : Strings.sol
/*
  Copyright 2019-2024 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// 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);
    }
}

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

Contract Security Audit

Contract ABI

API
[{"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":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"bridge","type":"address"}],"name":"TokenEnlisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"bridge","type":"address"}],"name":"TokenSelfRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"}],"name":"TokenStatusBlocked","type":"event"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"blockToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"bridge","type":"address"}],"name":"enlistToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"getBridge","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"getWithdrawalBridges","outputs":[{"internalType":"address[]","name":"bridges","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"identify","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isAppGovernor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isAppRoleAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isFrozen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isGovernanceAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isOperator","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isSecurityAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isSecurityAgent","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isTokenAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isUpgradeGovernor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"registerAppGovernor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"registerAppRoleAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"registerGovernanceAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"registerOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"registerSecurityAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"registerSecurityAgent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"registerTokenAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"registerUpgradeGovernor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"revokeAppGovernor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"revokeAppRoleAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"revokeGovernanceAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"revokeOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"revokeSecurityAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"revokeSecurityAgent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"revokeTokenAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"revokeUpgradeGovernor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"selfRemove","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c060405234801562000010575f80fd5b5030608052600160a0819052620000266200002d565b50620004dd565b336200003a81806200003d565b50565b620000476200019c565b15620000df576001600160a01b0382165f9081527fa5fdb349cc4ffac7e8ce7d3b075149d1bc847367d814e69a9beca89ef02db8b0602052604090205460ff16620000d95760405162461bcd60e51b815260206004820152601960248201527f524f4c45535f414c52454144595f494e495449414c495a45440000000000000060448201526064015b60405180910390fd5b620000ea565b620000ea82620001ed565b620000f462000330565b1562000191576001600160a01b0381165f9081527f2c11a1f9c63817dbb9f0faa966615764d2db5d6e008269e948a99e0b52181c23602052604090205460ff166200018d5760405162461bcd60e51b815260206004820152602260248201527f53454355524954595f524f4c45535f414c52454144595f494e495449414c495a604482015261115160f21b6064820152608401620000d0565b5050565b6200018d816200037f565b5f80516020620023ac8339815191525f9081525f80516020620023ec8339815191526020527fa5fdb349cc4ffac7e8ce7d3b075149d1bc847367d814e69a9beca89ef02db8b15481905b1415905090565b620002075f80516020620023ac83398151915282620003e8565b620002407ed2ead78c620e94b02d0a996e99298c59ddccfa1d8a0149080ac3a20de060685f805160206200240c83398151915262000486565b620002685f805160206200240c8339815191525f80516020620023ac83398151915262000486565b620002825f80516020620023ac8339815191528062000486565b620002bc7f023edb77f7c8cc9e38e8afe78954f703aeeda7fffe014eeb6e56ea84e62f6da75f805160206200240c83398151915262000486565b620002f67f0128d63adbf6b09002c26caf55c47e2f26635807e3ef1b027218aa74c8d61a3e5f805160206200240c83398151915262000486565b6200003a7f0251e864ca2a080f55bce5da2452e8cfcafdbc951a3e7fff5023d558452ec2285f80516020620023ac83398151915262000486565b5f80516020620023cc8339815191525f9081525f80516020620023ec8339815191526020527f2c11a1f9c63817dbb9f0faa966615764d2db5d6e008269e948a99e0b52181c24548190620001e6565b620003995f80516020620023cc8339815191528062000486565b620003d37f037693ba312785932d430dccf0f56ffedd0aa7c0f8b6da2cc4530c2717689b965f80516020620023cc83398151915262000486565b6200003a5f80516020620023cc833981519152825b5f8281525f80516020620023ec833981519152602090815260408083206001600160a01b038516845290915290205460ff166200018d575f8281525f80516020620023ec833981519152602090815260408083206001600160a01b0385168085529252808320805460ff1916600117905551339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b5f8281525f80516020620023ec8339815191526020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b60805160a051611ead620004ff5f395f61054401525f6105d60152611ead5ff3fe608060405234801561000f575f80fd5b50600436106101f2575f3560e01c8063757bd9ab11610114578063d08fb6cb116100a9578063ee0e680711610079578063ee0e68071461041d578063eeb7286614610430578063f44c7c8f14610445578063fa0f73ba14610470578063fad8b32a14610483575f80fd5b8063d08fb6cb146103d1578063d9fa7091146103e4578063deec9c5a146103f7578063ed9ef16a1461040a575f80fd5b8063a2bdde3d116100e4578063a2bdde3d14610385578063a3ecff8f14610398578063cb1cccce146103ab578063cdd1f70d146103be575f80fd5b8063757bd9ab146103395780638101b64c1461034c5780638e5224ff1461035f5780639463629a14610372575f80fd5b8063557133f61161018a5780636c04d9d51161015a5780636c04d9d5146102ed5780636d70f7ae146103005780636fc97cbf14610313578063726176e814610326575f80fd5b8063557133f6146102945780635a5d1bb9146102b457806362a14376146102c757806365650288146102da575f80fd5b806333eeb147116101c557806333eeb1471461024457806336568abe1461025b5780633682a4501461026e578063439fab9114610281575f80fd5b80630b3a2d21146101f65780630e770f231461020b578063178963831461021e5780632f95198514610231575b5f80fd5b61020961020436600461196a565b610496565b005b61020961021936600461196a565b6104b0565b61020961022c36600461196a565b6104c7565b61020961023f36600461196a565b6104de565b5f5b60405190151581526020015b60405180910390f35b610209610269366004611985565b61052b565b61020961027c36600461196a565b6105bc565b61020961028f3660046119b3565b6105d3565b6102a76102a236600461196a565b61077f565b6040516102529190611a1f565b6102466102c236600461196a565b6107fb565b6102096102d536600461196a565b610819565b6102096102e836600461196a565b610830565b6102466102fb36600461196a565b6109cd565b61024661030e36600461196a565b6109e5565b61020961032136600461196a565b6109fd565b61020961033436600461196a565b610a14565b61024661034736600461196a565b610a9f565b61020961035a36600461196a565b610ab7565b61024661036d36600461196a565b610af7565b61020961038036600461196a565b610b0f565b61024661039336600461196a565b610b26565b6102096103a6366004611a6b565b610b3e565b6102466103b936600461196a565b610d53565b6102096103cc36600461196a565b610d6b565b6102466103df36600461196a565b610d82565b6102096103f236600461196a565b610d9a565b61020961040536600461196a565b610db1565b61020961041836600461196a565b610dc8565b61020961042b36600461196a565b610ddf565b610438610e1f565b6040516102529190611ab9565b61045861045336600461196a565b610e3f565b6040516001600160a01b039091168152602001610252565b61020961047e36600461196a565b610e6a565b61020961049136600461196a565b610e81565b6104ad5f80516020611e5883398151915282610e98565b50565b6104ad5f80516020611d8983398151915282610e98565b6104ad5f80516020611da983398151915282610e98565b80336001600160a01b038216036105105760405162461bcd60e51b815260040161050790611aeb565b60405180910390fd5b6105275f80516020611da983398151915283610eb4565b5050565b5f80516020611cb28339815191528214801561056557507f0000000000000000000000000000000000000000000000000000000000000000155b156105b25760405162461bcd60e51b815260206004820181905260248201527f43414e4e4f545f52454e4f554e43455f474f5645524e414e43455f41444d494e6044820152606401610507565b6105278282610ed0565b6104ad5f80516020611e3883398151915282610e98565b307f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316036106445760405162461bcd60e51b81526020600482015260166024820152751112549150d517d0d0531317d11254d0531313d5d15160521b6044820152606401610507565b5f610650816020611b2f565b90505f61065e826020611b46565b9050808310156106a65760405162461bcd60e51b81526020600482015260136024820152721253925517d110551057d513d3d7d4d3505313606a1b6044820152606401610507565b5f6106b382848688611b59565b8101906106c0919061196a565b9050365f6106d08582888a611b59565b91509150365f6106e28887818c611b59565b90925090506001600160a01b0385161561070c57610701858383610f4a565b505050505050505050565b610714611088565b1561076357801561075e5760405162461bcd60e51b8152602060048201526014602482015273554e45585045435445445f494e49545f4441544160601b6044820152606401610507565b610701565b61076d82826110a2565b610777828261114c565b61070161117d565b6060610789611188565b6001600160a01b0383165f9081526020918252604090819020805482518185028101850190935280835291929091908301828280156107ef57602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116107d1575b50505050509050919050565b5f6108135f80516020611d29833981519152836111af565b92915050565b6104ad5f80516020611cd283398151915282610e98565b336108396111e5565b6001600160a01b038084165f90815260209290925260409091205416146108ae5760405162461bcd60e51b815260206004820152602360248201527f4252494447455f4d49534d415443485f43414e4e4f545f52454d4f56455f544f60448201526225a2a760e91b6064820152608401610507565b60405163031be19960e21b81526001600160a01b03821660048201523390630c6f866490602401602060405180830381865afa1580156108f0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109149190611b80565b156109615760405162461bcd60e51b815260206004820152601760248201527f544f4b454e5f49535f5354494c4c5f53455256494345440000000000000000006044820152606401610507565b60405133906001600160a01b038316907f0d8ce137b708fa1f68a42ceb628ec64227e0381c4ecfd1c920804fa9e718a308905f90a35f61099f6111e5565b6001600160a01b039283165f9081526020919091526040902080546001600160a01b03191691909216179055565b5f6108135f80516020611d49833981519152836111af565b5f6108135f80516020611e38833981519152836111af565b6104ad5f80516020611d4983398151915282610e98565b33610a1d611207565b6001600160a01b031614610a625760405162461bcd60e51b815260206004820152600c60248201526b27a7262cafa6a0a720a3a2a960a11b6044820152606401610507565b6040516001600160a01b038216907f8f41c4654c849cdf55aec592405d4ed6fcad4c16895633c4e8ff23bb4ebdd2a2905f90a2600161099f6111e5565b5f6108135f80516020611d89833981519152836111af565b80336001600160a01b03821603610ae05760405162461bcd60e51b815260040161050790611aeb565b6105275f80516020611cd283398151915283610eb4565b5f6108135f80516020611da9833981519152836111af565b6104ad5f80516020611cb283398151915282610e98565b5f6108135f80516020611e58833981519152836111af565b33610b47611207565b6001600160a01b031614610b8c5760405162461bcd60e51b815260206004820152600c60248201526b27a7262cafa6a0a720a3a2a960a11b6044820152606401610507565b5f610b956111e5565b6001600160a01b038085165f908152602092909252604090912054169050801580610bc957506001600160a01b0381166001145b610c0e5760405162461bcd60e51b81526020600482015260166024820152751513d2d15397d053149150511657d1539493d313115160521b6044820152606401610507565b816001600160a01b0316836001600160a01b03167f169097aa60be141cd725083125ddf0d1330273f15ba137cf74914d24b4c6d36260405160405180910390a381610c576111e5565b6001600160a01b038581165f908152602092909252604090912080546001600160a01b03191692909116919091179055610d03610c92611188565b6001600160a01b0385165f908152602091825260409081902080548251818502810185019093528083529192909190830182828015610cf857602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610cda575b505050505083611229565b610d4e57610d0f611188565b6001600160a01b038481165f908152602092835260408120805460018101825590825292902090910180546001600160a01b0319169184169190911790555b505050565b5f6108135f80516020611cb2833981519152836111af565b6104ad5f80516020611d2983398151915282610e98565b5f6108135f80516020611cd2833981519152836111af565b6104ad5f80516020611d8983398151915282610eb4565b6104ad5f80516020611d2983398151915282610eb4565b6104ad5f80516020611d4983398151915282610eb4565b80336001600160a01b03821603610e085760405162461bcd60e51b815260040161050790611aeb565b6105275f80516020611cb283398151915283610eb4565b6060604051806060016040528060218152602001611dc960219139905090565b5f610e486111e5565b6001600160a01b039283165f9081526020919091526040902054909116919050565b6104ad5f80516020611e5883398151915282610eb4565b6104ad5f80516020611e3883398151915282610eb4565b610ea18261128c565b610eaa816112ac565b610d4e83836112b6565b610ebd8261128c565b610ec6816112ac565b610d4e838361132a565b6001600160a01b0381163314610f405760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610507565b610527828261132a565b6001600160a01b0383163b610f965760405162461bcd60e51b8152602060048201526012602482015271115250d7d393d517d057d0d3d395149050d560721b6044820152606401610507565b5f80846001600160a01b031663439fab9160e01b8585604051602401610fbd929190611b9f565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051610ffb9190611bcd565b5f60405180830381855af49150503d805f8114611033576040519150601f19603f3d011682016040523d82523d5f602084013e611038565b606091505b509150915081819061105d5760405162461bcd60e51b81526004016105079190611ab9565b5080518190156110805760405162461bcd60e51b81526004016105079190611ab9565b505050505050565b5f80611092611207565b6001600160a01b03161415905090565b602081146110e65760405162461bcd60e51b8152602060048201526011602482015270494c4c4547414c5f444154415f53495a4560781b6044820152606401610507565b5f6110f38284018461196a565b90506001600160a01b0381163b610d4e5760405162461bcd60e51b815260206004820181905260248201527f494e56414c49445f4d414e414745525f434f4e54524143545f414444524553536044820152606401610507565b5f6111598284018461196a565b9050610d4e604051806060016040528060238152602001611e15602391398261139c565b336104ad81806113f4565b5f6111aa604051806060016040528060378152602001611cf2603791396114f6565b905090565b5f9182525f80516020611d69833981519152602090815260408084206001600160a01b0393909316845291905290205460ff1690565b5f6111aa6040518060600160405280602b8152602001611dea602b91396114f6565b5f6111aa604051806060016040528060238152602001611e1560239139611528565b5f805b835181101561128357826001600160a01b031684828151811061125157611251611be8565b60200260200101516001600160a01b031603611271576001915050610813565b8061127b81611bfc565b91505061122c565b505f9392505050565b5f9081525f80516020611d69833981519152602052604090206001015490565b6104ad813361155b565b6112c082826111af565b610527575f8281525f80516020611d69833981519152602090815260408083206001600160a01b0385168085529252808320805460ff1916600117905551339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b61133482826111af565b15610527575f8281525f80516020611d69833981519152602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b5f6113a683611528565b6001600160a01b0316146113ea5760405162461bcd60e51b815260206004820152600b60248201526a1053149150511657d4d15560aa1b6044820152606401610507565b61052782826115bf565b6113fc6115f1565b15611469576114185f80516020611cb2833981519152836111af565b6114645760405162461bcd60e51b815260206004820152601960248201527f524f4c45535f414c52454144595f494e495449414c495a4544000000000000006044820152606401610507565b611472565b61147282611610565b61147a6116f2565b156114ed576114965f80516020611cd2833981519152826111af565b6105275760405162461bcd60e51b815260206004820152602260248201527f53454355524954595f524f4c45535f414c52454144595f494e495449414c495a604482015261115160f21b6064820152608401610507565b6105278161170a565b5f80826040516020016115099190611bcd565b60408051601f1981840301815291905280516020909101209392505050565b5f808260405160200161153b9190611bcd565b60408051601f198184030181529190528051602090910120549392505050565b61156582826111af565b6105275761157d816001600160a01b0316601461175c565b61158883602061175c565b604051602001611599929190611c14565b60408051601f198184030181529082905262461bcd60e51b825261050791600401611ab9565b5f826040516020016115d19190611bcd565b604051602081830303815290604052805190602001209050818155505050565b5f806116095f80516020611cb283398151915261128c565b1415905090565b6116275f80516020611cb2833981519152826112b6565b61164b5f80516020611d298339815191525f80516020611da98339815191526118f9565b61166f5f80516020611da98339815191525f80516020611cb28339815191526118f9565b6116865f80516020611cb2833981519152806118f9565b6116aa5f80516020611e388339815191525f80516020611da98339815191526118f9565b6116ce5f80516020611e588339815191525f80516020611da98339815191526118f9565b6104ad5f80516020611d498339815191525f80516020611cb28339815191526118f9565b5f806116095f80516020611cd283398151915261128c565b6117215f80516020611cd2833981519152806118f9565b6117455f80516020611d898339815191525f80516020611cd28339815191526118f9565b6104ad5f80516020611cd2833981519152826112b6565b60605f61176a836002611b2f565b611775906002611b46565b67ffffffffffffffff81111561178d5761178d611c88565b6040519080825280601f01601f1916602001820160405280156117b7576020820181803683370190505b509050600360fc1b815f815181106117d1576117d1611be8565b60200101906001600160f81b03191690815f1a905350600f60fb1b816001815181106117ff576117ff611be8565b60200101906001600160f81b03191690815f1a9053505f611821846002611b2f565b61182c906001611b46565b90505b60018111156118a3576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061186057611860611be8565b1a60f81b82828151811061187657611876611be8565b60200101906001600160f81b03191690815f1a90535060049490941c9361189c81611c9c565b905061182f565b5083156118f25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610507565b9392505050565b5f6119038361128c565b5f8481525f80516020611d698339815191526020526040808220600101859055519192508391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6001600160a01b03811681146104ad575f80fd5b5f6020828403121561197a575f80fd5b81356118f281611956565b5f8060408385031215611996575f80fd5b8235915060208301356119a881611956565b809150509250929050565b5f80602083850312156119c4575f80fd5b823567ffffffffffffffff808211156119db575f80fd5b818501915085601f8301126119ee575f80fd5b8135818111156119fc575f80fd5b866020828501011115611a0d575f80fd5b60209290920196919550909350505050565b602080825282518282018190525f9190848201906040850190845b81811015611a5f5783516001600160a01b031683529284019291840191600101611a3a565b50909695505050505050565b5f8060408385031215611a7c575f80fd5b8235611a8781611956565b915060208301356119a881611956565b5f5b83811015611ab1578181015183820152602001611a99565b50505f910152565b602081525f8251806020840152611ad7816040850160208701611a97565b601f01601f19169190910160400192915050565b60208082526016908201527521a0a72727aa2fa822a92327a926afa7a72fa9a2a62360511b604082015260600190565b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761081357610813611b1b565b8082018082111561081357610813611b1b565b5f8085851115611b67575f80fd5b83861115611b73575f80fd5b5050820193919092039150565b5f60208284031215611b90575f80fd5b815180151581146118f2575f80fd5b60208152816020820152818360408301375f818301604090810191909152601f909201601f19160101919050565b5f8251611bde818460208701611a97565b9190910192915050565b634e487b7160e01b5f52603260045260245ffd5b5f60018201611c0d57611c0d611b1b565b5060010190565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081525f8351611c4b816017850160208801611a97565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611c7c816028840160208801611a97565b01602801949350505050565b634e487b7160e01b5f52604160045260245ffd5b5f81611caa57611caa611b1b565b505f19019056fe03711c9d994faf6055172091cb841fd4831aa743e6f3315163b06a122c841846026bd110619d11cfdfc28e281df893bc24828e89177318e9dbd860cdaedeb6b3535441524b474154455f52454749535452595f544f4b454e5f544f5f5749544844524157414c5f425249444745535f534c4f545f54414700d2ead78c620e94b02d0a996e99298c59ddccfa1d8a0149080ac3a20de060680251e864ca2a080f55bce5da2452e8cfcafdbc951a3e7fff5023d558452ec22853e43b954ba190a7e49386f1f78b01dcd9f628db23f432fa029a7dfd6d98e8fb037693ba312785932d430dccf0f56ffedd0aa7c0f8b6da2cc4530c2717689b9603e615638e0b79444a70f8c695bf8f2a47033bf1cf95691ec3130f64939cee99537461726b576172655f537461726b6761746552656769737472795f322e305f31535441524b474154455f52454749535452595f544f4b454e5f544f5f4252494447455f534c4f545f544147535441524b474154455f52454749535452595f4d414e414745525f534c4f545f544147023edb77f7c8cc9e38e8afe78954f703aeeda7fffe014eeb6e56ea84e62f6da70128d63adbf6b09002c26caf55c47e2f26635807e3ef1b027218aa74c8d61a3ea264697066735822122078308b6899eb15cdd38980d8d26f43b44c8b2d344086420211de1281200f105c64736f6c6343000814003303711c9d994faf6055172091cb841fd4831aa743e6f3315163b06a122c841846026bd110619d11cfdfc28e281df893bc24828e89177318e9dbd860cdaedeb6b353e43b954ba190a7e49386f1f78b01dcd9f628db23f432fa029a7dfd6d98e8fb03e615638e0b79444a70f8c695bf8f2a47033bf1cf95691ec3130f64939cee99

Deployed Bytecode

0x608060405234801561000f575f80fd5b50600436106101f2575f3560e01c8063757bd9ab11610114578063d08fb6cb116100a9578063ee0e680711610079578063ee0e68071461041d578063eeb7286614610430578063f44c7c8f14610445578063fa0f73ba14610470578063fad8b32a14610483575f80fd5b8063d08fb6cb146103d1578063d9fa7091146103e4578063deec9c5a146103f7578063ed9ef16a1461040a575f80fd5b8063a2bdde3d116100e4578063a2bdde3d14610385578063a3ecff8f14610398578063cb1cccce146103ab578063cdd1f70d146103be575f80fd5b8063757bd9ab146103395780638101b64c1461034c5780638e5224ff1461035f5780639463629a14610372575f80fd5b8063557133f61161018a5780636c04d9d51161015a5780636c04d9d5146102ed5780636d70f7ae146103005780636fc97cbf14610313578063726176e814610326575f80fd5b8063557133f6146102945780635a5d1bb9146102b457806362a14376146102c757806365650288146102da575f80fd5b806333eeb147116101c557806333eeb1471461024457806336568abe1461025b5780633682a4501461026e578063439fab9114610281575f80fd5b80630b3a2d21146101f65780630e770f231461020b578063178963831461021e5780632f95198514610231575b5f80fd5b61020961020436600461196a565b610496565b005b61020961021936600461196a565b6104b0565b61020961022c36600461196a565b6104c7565b61020961023f36600461196a565b6104de565b5f5b60405190151581526020015b60405180910390f35b610209610269366004611985565b61052b565b61020961027c36600461196a565b6105bc565b61020961028f3660046119b3565b6105d3565b6102a76102a236600461196a565b61077f565b6040516102529190611a1f565b6102466102c236600461196a565b6107fb565b6102096102d536600461196a565b610819565b6102096102e836600461196a565b610830565b6102466102fb36600461196a565b6109cd565b61024661030e36600461196a565b6109e5565b61020961032136600461196a565b6109fd565b61020961033436600461196a565b610a14565b61024661034736600461196a565b610a9f565b61020961035a36600461196a565b610ab7565b61024661036d36600461196a565b610af7565b61020961038036600461196a565b610b0f565b61024661039336600461196a565b610b26565b6102096103a6366004611a6b565b610b3e565b6102466103b936600461196a565b610d53565b6102096103cc36600461196a565b610d6b565b6102466103df36600461196a565b610d82565b6102096103f236600461196a565b610d9a565b61020961040536600461196a565b610db1565b61020961041836600461196a565b610dc8565b61020961042b36600461196a565b610ddf565b610438610e1f565b6040516102529190611ab9565b61045861045336600461196a565b610e3f565b6040516001600160a01b039091168152602001610252565b61020961047e36600461196a565b610e6a565b61020961049136600461196a565b610e81565b6104ad5f80516020611e5883398151915282610e98565b50565b6104ad5f80516020611d8983398151915282610e98565b6104ad5f80516020611da983398151915282610e98565b80336001600160a01b038216036105105760405162461bcd60e51b815260040161050790611aeb565b60405180910390fd5b6105275f80516020611da983398151915283610eb4565b5050565b5f80516020611cb28339815191528214801561056557507f0000000000000000000000000000000000000000000000000000000000000001155b156105b25760405162461bcd60e51b815260206004820181905260248201527f43414e4e4f545f52454e4f554e43455f474f5645524e414e43455f41444d494e6044820152606401610507565b6105278282610ed0565b6104ad5f80516020611e3883398151915282610e98565b307f000000000000000000000000642f04899b6ca155c2a5eadd4e4ed634f1b07dd76001600160a01b0316036106445760405162461bcd60e51b81526020600482015260166024820152751112549150d517d0d0531317d11254d0531313d5d15160521b6044820152606401610507565b5f610650816020611b2f565b90505f61065e826020611b46565b9050808310156106a65760405162461bcd60e51b81526020600482015260136024820152721253925517d110551057d513d3d7d4d3505313606a1b6044820152606401610507565b5f6106b382848688611b59565b8101906106c0919061196a565b9050365f6106d08582888a611b59565b91509150365f6106e28887818c611b59565b90925090506001600160a01b0385161561070c57610701858383610f4a565b505050505050505050565b610714611088565b1561076357801561075e5760405162461bcd60e51b8152602060048201526014602482015273554e45585045435445445f494e49545f4441544160601b6044820152606401610507565b610701565b61076d82826110a2565b610777828261114c565b61070161117d565b6060610789611188565b6001600160a01b0383165f9081526020918252604090819020805482518185028101850190935280835291929091908301828280156107ef57602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116107d1575b50505050509050919050565b5f6108135f80516020611d29833981519152836111af565b92915050565b6104ad5f80516020611cd283398151915282610e98565b336108396111e5565b6001600160a01b038084165f90815260209290925260409091205416146108ae5760405162461bcd60e51b815260206004820152602360248201527f4252494447455f4d49534d415443485f43414e4e4f545f52454d4f56455f544f60448201526225a2a760e91b6064820152608401610507565b60405163031be19960e21b81526001600160a01b03821660048201523390630c6f866490602401602060405180830381865afa1580156108f0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109149190611b80565b156109615760405162461bcd60e51b815260206004820152601760248201527f544f4b454e5f49535f5354494c4c5f53455256494345440000000000000000006044820152606401610507565b60405133906001600160a01b038316907f0d8ce137b708fa1f68a42ceb628ec64227e0381c4ecfd1c920804fa9e718a308905f90a35f61099f6111e5565b6001600160a01b039283165f9081526020919091526040902080546001600160a01b03191691909216179055565b5f6108135f80516020611d49833981519152836111af565b5f6108135f80516020611e38833981519152836111af565b6104ad5f80516020611d4983398151915282610e98565b33610a1d611207565b6001600160a01b031614610a625760405162461bcd60e51b815260206004820152600c60248201526b27a7262cafa6a0a720a3a2a960a11b6044820152606401610507565b6040516001600160a01b038216907f8f41c4654c849cdf55aec592405d4ed6fcad4c16895633c4e8ff23bb4ebdd2a2905f90a2600161099f6111e5565b5f6108135f80516020611d89833981519152836111af565b80336001600160a01b03821603610ae05760405162461bcd60e51b815260040161050790611aeb565b6105275f80516020611cd283398151915283610eb4565b5f6108135f80516020611da9833981519152836111af565b6104ad5f80516020611cb283398151915282610e98565b5f6108135f80516020611e58833981519152836111af565b33610b47611207565b6001600160a01b031614610b8c5760405162461bcd60e51b815260206004820152600c60248201526b27a7262cafa6a0a720a3a2a960a11b6044820152606401610507565b5f610b956111e5565b6001600160a01b038085165f908152602092909252604090912054169050801580610bc957506001600160a01b0381166001145b610c0e5760405162461bcd60e51b81526020600482015260166024820152751513d2d15397d053149150511657d1539493d313115160521b6044820152606401610507565b816001600160a01b0316836001600160a01b03167f169097aa60be141cd725083125ddf0d1330273f15ba137cf74914d24b4c6d36260405160405180910390a381610c576111e5565b6001600160a01b038581165f908152602092909252604090912080546001600160a01b03191692909116919091179055610d03610c92611188565b6001600160a01b0385165f908152602091825260409081902080548251818502810185019093528083529192909190830182828015610cf857602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610cda575b505050505083611229565b610d4e57610d0f611188565b6001600160a01b038481165f908152602092835260408120805460018101825590825292902090910180546001600160a01b0319169184169190911790555b505050565b5f6108135f80516020611cb2833981519152836111af565b6104ad5f80516020611d2983398151915282610e98565b5f6108135f80516020611cd2833981519152836111af565b6104ad5f80516020611d8983398151915282610eb4565b6104ad5f80516020611d2983398151915282610eb4565b6104ad5f80516020611d4983398151915282610eb4565b80336001600160a01b03821603610e085760405162461bcd60e51b815260040161050790611aeb565b6105275f80516020611cb283398151915283610eb4565b6060604051806060016040528060218152602001611dc960219139905090565b5f610e486111e5565b6001600160a01b039283165f9081526020919091526040902054909116919050565b6104ad5f80516020611e5883398151915282610eb4565b6104ad5f80516020611e3883398151915282610eb4565b610ea18261128c565b610eaa816112ac565b610d4e83836112b6565b610ebd8261128c565b610ec6816112ac565b610d4e838361132a565b6001600160a01b0381163314610f405760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610507565b610527828261132a565b6001600160a01b0383163b610f965760405162461bcd60e51b8152602060048201526012602482015271115250d7d393d517d057d0d3d395149050d560721b6044820152606401610507565b5f80846001600160a01b031663439fab9160e01b8585604051602401610fbd929190611b9f565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051610ffb9190611bcd565b5f60405180830381855af49150503d805f8114611033576040519150601f19603f3d011682016040523d82523d5f602084013e611038565b606091505b509150915081819061105d5760405162461bcd60e51b81526004016105079190611ab9565b5080518190156110805760405162461bcd60e51b81526004016105079190611ab9565b505050505050565b5f80611092611207565b6001600160a01b03161415905090565b602081146110e65760405162461bcd60e51b8152602060048201526011602482015270494c4c4547414c5f444154415f53495a4560781b6044820152606401610507565b5f6110f38284018461196a565b90506001600160a01b0381163b610d4e5760405162461bcd60e51b815260206004820181905260248201527f494e56414c49445f4d414e414745525f434f4e54524143545f414444524553536044820152606401610507565b5f6111598284018461196a565b9050610d4e604051806060016040528060238152602001611e15602391398261139c565b336104ad81806113f4565b5f6111aa604051806060016040528060378152602001611cf2603791396114f6565b905090565b5f9182525f80516020611d69833981519152602090815260408084206001600160a01b0393909316845291905290205460ff1690565b5f6111aa6040518060600160405280602b8152602001611dea602b91396114f6565b5f6111aa604051806060016040528060238152602001611e1560239139611528565b5f805b835181101561128357826001600160a01b031684828151811061125157611251611be8565b60200260200101516001600160a01b031603611271576001915050610813565b8061127b81611bfc565b91505061122c565b505f9392505050565b5f9081525f80516020611d69833981519152602052604090206001015490565b6104ad813361155b565b6112c082826111af565b610527575f8281525f80516020611d69833981519152602090815260408083206001600160a01b0385168085529252808320805460ff1916600117905551339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b61133482826111af565b15610527575f8281525f80516020611d69833981519152602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b5f6113a683611528565b6001600160a01b0316146113ea5760405162461bcd60e51b815260206004820152600b60248201526a1053149150511657d4d15560aa1b6044820152606401610507565b61052782826115bf565b6113fc6115f1565b15611469576114185f80516020611cb2833981519152836111af565b6114645760405162461bcd60e51b815260206004820152601960248201527f524f4c45535f414c52454144595f494e495449414c495a4544000000000000006044820152606401610507565b611472565b61147282611610565b61147a6116f2565b156114ed576114965f80516020611cd2833981519152826111af565b6105275760405162461bcd60e51b815260206004820152602260248201527f53454355524954595f524f4c45535f414c52454144595f494e495449414c495a604482015261115160f21b6064820152608401610507565b6105278161170a565b5f80826040516020016115099190611bcd565b60408051601f1981840301815291905280516020909101209392505050565b5f808260405160200161153b9190611bcd565b60408051601f198184030181529190528051602090910120549392505050565b61156582826111af565b6105275761157d816001600160a01b0316601461175c565b61158883602061175c565b604051602001611599929190611c14565b60408051601f198184030181529082905262461bcd60e51b825261050791600401611ab9565b5f826040516020016115d19190611bcd565b604051602081830303815290604052805190602001209050818155505050565b5f806116095f80516020611cb283398151915261128c565b1415905090565b6116275f80516020611cb2833981519152826112b6565b61164b5f80516020611d298339815191525f80516020611da98339815191526118f9565b61166f5f80516020611da98339815191525f80516020611cb28339815191526118f9565b6116865f80516020611cb2833981519152806118f9565b6116aa5f80516020611e388339815191525f80516020611da98339815191526118f9565b6116ce5f80516020611e588339815191525f80516020611da98339815191526118f9565b6104ad5f80516020611d498339815191525f80516020611cb28339815191526118f9565b5f806116095f80516020611cd283398151915261128c565b6117215f80516020611cd2833981519152806118f9565b6117455f80516020611d898339815191525f80516020611cd28339815191526118f9565b6104ad5f80516020611cd2833981519152826112b6565b60605f61176a836002611b2f565b611775906002611b46565b67ffffffffffffffff81111561178d5761178d611c88565b6040519080825280601f01601f1916602001820160405280156117b7576020820181803683370190505b509050600360fc1b815f815181106117d1576117d1611be8565b60200101906001600160f81b03191690815f1a905350600f60fb1b816001815181106117ff576117ff611be8565b60200101906001600160f81b03191690815f1a9053505f611821846002611b2f565b61182c906001611b46565b90505b60018111156118a3576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061186057611860611be8565b1a60f81b82828151811061187657611876611be8565b60200101906001600160f81b03191690815f1a90535060049490941c9361189c81611c9c565b905061182f565b5083156118f25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610507565b9392505050565b5f6119038361128c565b5f8481525f80516020611d698339815191526020526040808220600101859055519192508391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6001600160a01b03811681146104ad575f80fd5b5f6020828403121561197a575f80fd5b81356118f281611956565b5f8060408385031215611996575f80fd5b8235915060208301356119a881611956565b809150509250929050565b5f80602083850312156119c4575f80fd5b823567ffffffffffffffff808211156119db575f80fd5b818501915085601f8301126119ee575f80fd5b8135818111156119fc575f80fd5b866020828501011115611a0d575f80fd5b60209290920196919550909350505050565b602080825282518282018190525f9190848201906040850190845b81811015611a5f5783516001600160a01b031683529284019291840191600101611a3a565b50909695505050505050565b5f8060408385031215611a7c575f80fd5b8235611a8781611956565b915060208301356119a881611956565b5f5b83811015611ab1578181015183820152602001611a99565b50505f910152565b602081525f8251806020840152611ad7816040850160208701611a97565b601f01601f19169190910160400192915050565b60208082526016908201527521a0a72727aa2fa822a92327a926afa7a72fa9a2a62360511b604082015260600190565b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761081357610813611b1b565b8082018082111561081357610813611b1b565b5f8085851115611b67575f80fd5b83861115611b73575f80fd5b5050820193919092039150565b5f60208284031215611b90575f80fd5b815180151581146118f2575f80fd5b60208152816020820152818360408301375f818301604090810191909152601f909201601f19160101919050565b5f8251611bde818460208701611a97565b9190910192915050565b634e487b7160e01b5f52603260045260245ffd5b5f60018201611c0d57611c0d611b1b565b5060010190565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081525f8351611c4b816017850160208801611a97565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611c7c816028840160208801611a97565b01602801949350505050565b634e487b7160e01b5f52604160045260245ffd5b5f81611caa57611caa611b1b565b505f19019056fe03711c9d994faf6055172091cb841fd4831aa743e6f3315163b06a122c841846026bd110619d11cfdfc28e281df893bc24828e89177318e9dbd860cdaedeb6b3535441524b474154455f52454749535452595f544f4b454e5f544f5f5749544844524157414c5f425249444745535f534c4f545f54414700d2ead78c620e94b02d0a996e99298c59ddccfa1d8a0149080ac3a20de060680251e864ca2a080f55bce5da2452e8cfcafdbc951a3e7fff5023d558452ec22853e43b954ba190a7e49386f1f78b01dcd9f628db23f432fa029a7dfd6d98e8fb037693ba312785932d430dccf0f56ffedd0aa7c0f8b6da2cc4530c2717689b9603e615638e0b79444a70f8c695bf8f2a47033bf1cf95691ec3130f64939cee99537461726b576172655f537461726b6761746552656769737472795f322e305f31535441524b474154455f52454749535452595f544f4b454e5f544f5f4252494447455f534c4f545f544147535441524b474154455f52454749535452595f4d414e414745525f534c4f545f544147023edb77f7c8cc9e38e8afe78954f703aeeda7fffe014eeb6e56ea84e62f6da70128d63adbf6b09002c26caf55c47e2f26635807e3ef1b027218aa74c8d61a3ea264697066735822122078308b6899eb15cdd38980d8d26f43b44c8b2d344086420211de1281200f105c64736f6c63430008140033

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

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.