Holesky Testnet

Contract

0x70818a53ddE5c2e78Edfb6f6b277Be9a71fa894E

Overview

ETH Balance

0 ETH

Multichain Info

N/A
Transaction Hash
Method
Block
From
To
Set Middleware24644702024-10-04 7:53:369 days ago1728028416IN
0x70818a53...a71fa894E
0 ETH0.000000760.02264827
Set Middleware24174232024-09-27 6:01:4816 days ago1727416908IN
0x70818a53...a71fa894E
0 ETH0.000123062.42500001
Set Middleware23989062024-09-24 10:42:2418 days ago1727174544IN
0x70818a53...a71fa894E
0 ETH0.000003110.09267865
Set Middleware23605902024-09-18 15:53:3624 days ago1726674816IN
0x70818a53...a71fa894E
0 ETH0.000011410.22494921
Set Middleware23278692024-09-13 14:19:3629 days ago1726237176IN
0x70818a53...a71fa894E
0 ETH0.000004380.08639614
Set Middleware22361952024-08-30 12:43:3643 days ago1725021816IN
0x70818a53...a71fa894E
0 ETH0.000000140.00280102
Set Middleware21817032024-08-22 6:30:4852 days ago1724308248IN
0x70818a53...a71fa894E
0 ETH0.000000250.005
0x60a0346020722572024-08-05 11:53:0068 days ago1722858780IN
 Create: NetworkMiddlewareService
0 ETH0.000001380.00737424

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
25102562024-10-11 7:15:002 days ago1728630900
0x70818a53...a71fa894E
0 ETH
25102332024-10-11 7:09:002 days ago1728630540
0x70818a53...a71fa894E
0 ETH
25102222024-10-11 7:06:482 days ago1728630408
0x70818a53...a71fa894E
0 ETH
25101662024-10-11 6:54:122 days ago1728629652
0x70818a53...a71fa894E
0 ETH
25101252024-10-11 6:44:362 days ago1728629076
0x70818a53...a71fa894E
0 ETH
25100842024-10-11 6:35:362 days ago1728628536
0x70818a53...a71fa894E
0 ETH
25100692024-10-11 6:32:122 days ago1728628332
0x70818a53...a71fa894E
0 ETH
25100622024-10-11 6:30:482 days ago1728628248
0x70818a53...a71fa894E
0 ETH
25042452024-10-10 9:11:363 days ago1728551496
0x70818a53...a71fa894E
0 ETH
25040122024-10-10 8:21:123 days ago1728548472
0x70818a53...a71fa894E
0 ETH
25039072024-10-10 7:58:363 days ago1728547116
0x70818a53...a71fa894E
0 ETH
25039052024-10-10 7:58:123 days ago1728547092
0x70818a53...a71fa894E
0 ETH
25038932024-10-10 7:55:243 days ago1728546924
0x70818a53...a71fa894E
0 ETH
25038912024-10-10 7:54:483 days ago1728546888
0x70818a53...a71fa894E
0 ETH
25038772024-10-10 7:52:003 days ago1728546720
0x70818a53...a71fa894E
0 ETH
24828912024-10-07 2:44:246 days ago1728269064
0x70818a53...a71fa894E
0 ETH
24777652024-10-06 8:05:247 days ago1728201924
0x70818a53...a71fa894E
0 ETH
24776522024-10-06 7:41:127 days ago1728200472
0x70818a53...a71fa894E
0 ETH
24769642024-10-06 5:13:367 days ago1728191616
0x70818a53...a71fa894E
0 ETH
24769212024-10-06 5:04:367 days ago1728191076
0x70818a53...a71fa894E
0 ETH
24769042024-10-06 5:01:007 days ago1728190860
0x70818a53...a71fa894E
0 ETH
24769012024-10-06 5:00:127 days ago1728190812
0x70818a53...a71fa894E
0 ETH
24763392024-10-06 2:57:247 days ago1728183444
0x70818a53...a71fa894E
0 ETH
24646712024-10-04 8:37:249 days ago1728031044
0x70818a53...a71fa894E
0 ETH
24646002024-10-04 8:21:369 days ago1728030096
0x70818a53...a71fa894E
0 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
NetworkMiddlewareService

Compiler Version
v0.8.25+commit.b61c2a91

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 3 : NetworkMiddlewareService.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.25;

import {INetworkMiddlewareService} from "src/interfaces/service/INetworkMiddlewareService.sol";
import {IRegistry} from "src/interfaces/common/IRegistry.sol";

contract NetworkMiddlewareService is INetworkMiddlewareService {
    /**
     * @inheritdoc INetworkMiddlewareService
     */
    address public immutable NETWORK_REGISTRY;

    /**
     * @inheritdoc INetworkMiddlewareService
     */
    mapping(address network => address value) public middleware;

    constructor(address networkRegistry) {
        NETWORK_REGISTRY = networkRegistry;
    }

    /**
     * @inheritdoc INetworkMiddlewareService
     */
    function setMiddleware(address middleware_) external {
        if (!IRegistry(NETWORK_REGISTRY).isEntity(msg.sender)) {
            revert NotNetwork();
        }

        if (middleware[msg.sender] == middleware_) {
            revert AlreadySet();
        }

        middleware[msg.sender] = middleware_;

        emit SetMiddleware(msg.sender, middleware_);
    }
}

File 2 of 3 : INetworkMiddlewareService.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.25;

interface INetworkMiddlewareService {
    error AlreadySet();
    error NotNetwork();

    /**
     * @notice Emitted when a middleware is set for a network.
     * @param network address of the network
     * @param middleware new middleware of the network
     */
    event SetMiddleware(address indexed network, address middleware);

    /**
     * @notice Get the network registry's address.
     * @return address of the network registry
     */
    function NETWORK_REGISTRY() external view returns (address);

    /**
     * @notice Get a given network's middleware.
     * @param network address of the network
     * @return middleware of the network
     */
    function middleware(address network) external view returns (address);

    /**
     * @notice Set a new middleware for a calling network.
     * @param middleware new middleware of the network
     */
    function setMiddleware(address middleware) external;
}

File 3 of 3 : IRegistry.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.25;

interface IRegistry {
    error EntityNotExist();

    /**
     * @notice Emitted when an entity is added.
     * @param entity address of the added entity
     */
    event AddEntity(address indexed entity);

    /**
     * @notice Get if a given address is an entity.
     * @param account address to check
     * @return if the given address is an entity
     */
    function isEntity(address account) external view returns (bool);

    /**
     * @notice Get a total number of entities.
     * @return total number of entities added
     */
    function totalEntities() external view returns (uint256);

    /**
     * @notice Get an entity given its index.
     * @param index index of the entity to get
     * @return address of the entity
     */
    function entity(uint256 index) external view returns (address);
}

Settings
{
  "remappings": [
    "forge-std/=lib/forge-std/src/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": true,
  "libraries": {}
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"networkRegistry","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadySet","type":"error"},{"inputs":[],"name":"NotNetwork","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"network","type":"address"},{"indexed":false,"internalType":"address","name":"middleware","type":"address"}],"name":"SetMiddleware","type":"event"},{"inputs":[],"name":"NETWORK_REGISTRY","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"network","type":"address"}],"name":"middleware","outputs":[{"internalType":"address","name":"value","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"middleware_","type":"address"}],"name":"setMiddleware","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a034606c57601f6102ef38819003918201601f19168301916001600160401b03831184841017607157808492602094604052833981010312606c57516001600160a01b0381168103606c5760805260405161026790816100888239608051818181605901526101120152f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe608060408181526004918236101561001657600080fd5b600092833560e01c918263b7d8e1a9146100d057508163bb5ed0321461008c575063c0cd7c3e1461004657600080fd5b34610088578160031936011261008857517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b5080fd5b9050346100cc5760203660031901126100cc576001600160a01b039035818116908190036100c857838391602095528085522054169051908152f35b8380fd5b8280fd5b849184346100c8576020918260031936011261022d576001600160a01b0381358181169590869003610205576302910f8b60e31b8152338382015284816024817f000000000000000000000000000000000000000000000000000000000000000086165afa9081156102235787916101bf575b50156101b057338652858452828620541684146101a257503380855284835281852080546001600160a01b031916851790559051928352917ff64e2a8734392e221de13f5e56deb22d308e292cad394052affa97dbaf41ec989190a280f35b905163a741a04560e01b8152fd5b5090516323d53b9760e21b8152fd5b9050843d861161021c575b601f8101601f1916820167ffffffffffffffff8111838210176102095786918391875281010312610205575180151581036102055787610143565b8680fd5b634e487b7160e01b895260418552602489fd5b503d6101ca565b84513d89823e3d90fd5b8480fdfea2646970667358221220893719a69d0000c015cf18a65f11afa8370ff98c5877e2d940e9b70fd1191e2f64736f6c634300081900330000000000000000000000005dea088d2be1473d948895cc26104bcf103cef3e

Deployed Bytecode

0x608060408181526004918236101561001657600080fd5b600092833560e01c918263b7d8e1a9146100d057508163bb5ed0321461008c575063c0cd7c3e1461004657600080fd5b34610088578160031936011261008857517f0000000000000000000000005dea088d2be1473d948895cc26104bcf103cef3e6001600160a01b03168152602090f35b5080fd5b9050346100cc5760203660031901126100cc576001600160a01b039035818116908190036100c857838391602095528085522054169051908152f35b8380fd5b8280fd5b849184346100c8576020918260031936011261022d576001600160a01b0381358181169590869003610205576302910f8b60e31b8152338382015284816024817f0000000000000000000000005dea088d2be1473d948895cc26104bcf103cef3e86165afa9081156102235787916101bf575b50156101b057338652858452828620541684146101a257503380855284835281852080546001600160a01b031916851790559051928352917ff64e2a8734392e221de13f5e56deb22d308e292cad394052affa97dbaf41ec989190a280f35b905163a741a04560e01b8152fd5b5090516323d53b9760e21b8152fd5b9050843d861161021c575b601f8101601f1916820167ffffffffffffffff8111838210176102095786918391875281010312610205575180151581036102055787610143565b8680fd5b634e487b7160e01b895260418552602489fd5b503d6101ca565b84513d89823e3d90fd5b8480fdfea2646970667358221220893719a69d0000c015cf18a65f11afa8370ff98c5877e2d940e9b70fd1191e2f64736f6c63430008190033

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

0000000000000000000000005dea088d2be1473d948895cc26104bcf103cef3e

-----Decoded View---------------
Arg [0] : networkRegistry (address): 0x5dEA088d2Be1473d948895cc26104bcf103CEf3E

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000005dea088d2be1473d948895cc26104bcf103cef3e


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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