Blockchain / Global / Address

Contract

0xbfCb6F2f811a0DA4D54386458bF888B769EbFc5F

Balance
0 SOMI
Transactions sent
1
Type
Contract · 1,225 bytes of code

RemoteAdmin Verified

Compiler
solc 0.8.23+commit.f704f362
Language
Solidity
Optimization
Yes, 1000000 runs
EVM version
shanghai
License
—
Verified
2026-10-12

src/contracts/RemoteAdmin.sol

and 1 more files

Solidity
pragma solidity 0.8.23;

import { IHopComposer } from "src/contracts/interfaces/IHopComposer.sol";

/// @notice Contract to remotely set admin functions on contracts via hops
/// @dev must be authorized as DEFAULT_ADMIN_ROLE on target HopV2 contract
contract RemoteAdmin is IHopComposer {
    uint32 internal constant FRAXTAL_EID = 30_255;

    address public immutable frxUsdOft;
    address public immutable hopV2;
    bytes32 public immutable fraxtalMsig;

    error NotAuthorized();
    error InvalidSourceEid();
    error InvalidOFT();
    error FailedRemoteCall();

    constructor(address _frxUsdOft, address _hopV2, address _fraxtalMsig) {
        frxUsdOft = _frxUsdOft;
        hopV2 = _hopV2;
        fraxtalMsig = bytes32(uint256(uint160(_fraxtalMsig)));
    }

    function hopCompose(
        uint32 _srcEid,
        bytes32 _sender,
        address _oft,
        uint256,
        /* _amount */
        bytes memory _data
    ) external override {
        // Only allow composes from the RemoteHop via the hopCompose() call inside lzCompose()
        // where the original sender is the fraxtal msig
        if (msg.sender != hopV2 || _sender != fraxtalMsig) {
            revert NotAuthorized();
        }

        if (_srcEid != FRAXTAL_EID) {
            revert InvalidSourceEid();
        }

        if (_oft != frxUsdOft) {
            revert InvalidOFT();
        }

        (address target, bytes memory data) = abi.decode(_data, (address, bytes));
        (bool success, ) = target.call(data);
        if (!success) revert FailedRemoteCall();
    }
}

Other files

  • src/contracts/interfaces/IHopComposer.sol
    // SPDX-License-Identifier: MIT
    pragma solidity ^0.8.0;
    
    interface IHopComposer {
        function hopCompose(uint32 _srcEid, bytes32 _sender, address _oft, uint256 _amount, bytes memory _data) external;
    }
    
ABI · 9 entries
json
[
  {
    "type": "constructor",
    "inputs": [
      {
        "name": "_frxUsdOft",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "_hopV2",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "_fraxtalMsig",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "name": "FailedRemoteCall",
    "type": "error",
    "inputs": []
  },
  {
    "name": "InvalidOFT",
    "type": "error",
    "inputs": []
  },
  {
    "name": "InvalidSourceEid",
    "type": "error",
    "inputs": []
  },
  {
    "name": "NotAuthorized",
    "type": "error",
    "inputs": []
  },
  {
    "name": "fraxtalMsig",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "frxUsdOft",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "hopCompose",
    "type": "function",
    "inputs": [
      {
        "name": "_srcEid",
        "type": "uint32",
        "internalType": "uint32"
      },
      {
        "name": "_sender",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "_oft",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "_data",
        "type": "bytes",
        "internalType": "bytes"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "hopV2",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "view"
  }
]

Send feedback

Agents: POST the same to /api/feedback.