NetworkConfig

Description:

Smart contract deployed on Ethereum with Factory features.

Blockchain: Ethereum

Source Code: View Code On The Blockchain

Solidity Source Code:

{{
  "language": "Solidity",
  "sources": {
    "config/NetworkConfig.sol": {
      "content": "// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

contract NetworkConfig {
    struct NetworkInfo {
        address safeProxyFactory;
        address safeSingleton;
        address fallbackHandler;
        string networkName;
        uint256 chainId;
    }
    
    mapping(uint256 => NetworkInfo) public networks;
    
    constructor() {
        // Ethereum Sepolia
        networks[11155111] = NetworkInfo({
            safeProxyFactory: 0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2,
            safeSingleton: 0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552,
            fallbackHandler: 0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4,
            networkName: "Ethereum Sepolia",
            chainId: 11155111
        });
        
        // Base Sepolia
        networks[84532] = NetworkInfo({
            safeProxyFactory: 0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2,
            safeSingleton: 0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552,
            fallbackHandler: 0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4,
            networkName: "Base Sepolia",
            chainId: 84532
        });
        
        // Ethereum Mainnet
        networks[1] = NetworkInfo({
            safeProxyFactory: 0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2,
            safeSingleton: 0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552,
            fallbackHandler: 0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4,
            networkName: "Ethereum Mainnet",
            chainId: 1
        });
        
        // Base Mainnet
        networks[8453] = NetworkInfo({
            safeProxyFactory: 0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2,
            safeSingleton: 0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552,
            fallbackHandler: 0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4,
            networkName: "Base Mainnet",
            chainId: 8453
        });
    }
    
    function getNetworkConfig(uint256 chainId) external view returns (NetworkInfo memory) {
        require(networks[chainId].chainId != 0, "Network not supported");
        return networks[chainId];
    }
    
    function isNetworkSupported(uint256 chainId) external view returns (bool) {
        return networks[chainId].chainId != 0;
    }
}"
    }
  },
  "settings": {
    "remappings": [
      "ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",
      "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
      "forge-std/=lib/forge-std/src/",
      "openzeppelin-contracts/=lib/openzeppelin-contracts/",
      "openzeppelin/=lib/openzeppelin-contracts/contracts/",
      "safe-contracts/=lib/safe-contracts/",
      "safe-smart-account/=lib/safe-smart-account/"
    ],
    "optimizer": {
      "enabled": false,
      "runs": 200
    },
    "metadata": {
      "useLiteralContent": false,
      "bytecodeHash": "ipfs",
      "appendCBOR": true
    },
    "outputSelection": {
      "*": {
        "*": [
          "evm.bytecode",
          "evm.deployedBytecode",
          "devdoc",
          "userdoc",
          "metadata",
          "abi"
        ]
      }
    },
    "evmVersion": "cancun",
    "viaIR": false
  }
}}

Tags:
Factory|addr:0xcaf61ae365053ce1761b5b9f1ac6be94bbca946d|verified:true|block:23449767|tx:0x52775c9a234257fe42dd7aedffe0e39fbff59c39a10bbb67e02697e9fdb7533c|first_check:1758962775

Submitted on: 2025-09-27 10:46:16

Comments

Log in to comment.

No comments yet.