S Price: $0.068227 (-0.13%)
Gas: 55 Gwei

Contract

0x547e55662Ef732FB6e22B4c875433Ab7Ddb21817

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To

There are no matching entries

> 10 Internal Transactions found.

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
471442022025-09-17 10:42:51131 days ago1758105771
0x547e5566...7Ddb21817
0 S
471442022025-09-17 10:42:51131 days ago1758105771
0x547e5566...7Ddb21817
0 S
471441492025-09-17 10:42:08131 days ago1758105728
0x547e5566...7Ddb21817
0 S
471441492025-09-17 10:42:08131 days ago1758105728
0x547e5566...7Ddb21817
0 S
471441492025-09-17 10:42:08131 days ago1758105728
0x547e5566...7Ddb21817
0 S
471441492025-09-17 10:42:08131 days ago1758105728
0x547e5566...7Ddb21817
0 S
471441492025-09-17 10:42:08131 days ago1758105728
0x547e5566...7Ddb21817
0 S
471441492025-09-17 10:42:08131 days ago1758105728
0x547e5566...7Ddb21817
0 S
471436682025-09-17 10:35:40131 days ago1758105340
0x547e5566...7Ddb21817
0 S
471436682025-09-17 10:35:40131 days ago1758105340
0x547e5566...7Ddb21817
0 S
471435992025-09-17 10:34:45131 days ago1758105285
0x547e5566...7Ddb21817
0 S
471435992025-09-17 10:34:45131 days ago1758105285
0x547e5566...7Ddb21817
0 S
471435842025-09-17 10:34:32131 days ago1758105272
0x547e5566...7Ddb21817
0 S
471435842025-09-17 10:34:32131 days ago1758105272
0x547e5566...7Ddb21817
0 S
471435692025-09-17 10:34:14131 days ago1758105254
0x547e5566...7Ddb21817
0 S
471435692025-09-17 10:34:14131 days ago1758105254
0x547e5566...7Ddb21817
0 S
471430232025-09-17 10:27:22131 days ago1758104842
0x547e5566...7Ddb21817
0 S
471430232025-09-17 10:27:22131 days ago1758104842
0x547e5566...7Ddb21817
0 S
471430232025-09-17 10:27:22131 days ago1758104842
0x547e5566...7Ddb21817
0 S
471430232025-09-17 10:27:22131 days ago1758104842
0x547e5566...7Ddb21817
0 S
471424702025-09-17 10:21:13131 days ago1758104473
0x547e5566...7Ddb21817
0 S
471424702025-09-17 10:21:13131 days ago1758104473
0x547e5566...7Ddb21817
0 S
471424702025-09-17 10:21:13131 days ago1758104473
0x547e5566...7Ddb21817
0 S
471424702025-09-17 10:21:13131 days ago1758104473
0x547e5566...7Ddb21817
0 S
471424702025-09-17 10:21:13131 days ago1758104473
0x547e5566...7Ddb21817
0 S
View All Internal Transactions
Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
GaugeRegistry

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import { ICustomConnectorRegistry } from "contracts/ConnectorRegistry.sol";

interface IGaugeRegistryVoter {
    function isGauge(
        address target
    ) external view returns (bool);

    function isClGauge(
        address target
    ) external view returns (bool);

    function isCLGauge(
        address target
    ) external view returns (bool);

    function poolForGauge(
        address gauge
    ) external view returns (address);
}

contract GaugeRegistry is ICustomConnectorRegistry {
    IGaugeRegistryVoter public immutable voter;
    address public immutable connector;

    constructor(IGaugeRegistryVoter voter_, address connector_) {
        voter = voter_;
        connector = connector_;
    }

    function connectorOf(
        address target
    ) external view override returns (address) {
        if (voter.isGauge(target)) {
            return connector;
        }

        return address(0);
    }
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import { Admin } from "contracts/base/Admin.sol";
import { TimelockAdmin } from "contracts/base/TimelockAdmin.sol";

error ConnectorNotRegistered(address target);
error CustomRegistryAlreadyRegistered();

interface ICustomConnectorRegistry {
    function connectorOf(
        address target
    ) external view returns (address);
}

contract ConnectorRegistry is Admin, TimelockAdmin {
    event ConnectorChanged(address target, address connector);
    event CustomRegistryAdded(address registry);
    event CustomRegistryRemoved(address registry);

    error ConnectorAlreadySet(address target);
    error ConnectorNotSet(address target);
    error ArrayLengthMismatch();

    ICustomConnectorRegistry[] public customRegistries;

    mapping(address target => address connector) private connectors_;

    constructor(
        address admin_,
        address timelockAdmin_
    ) Admin(admin_) TimelockAdmin(timelockAdmin_) { }

    /// Admin functions

    /// @notice Update connector addresses for a batch of targets.
    /// @dev Controls which connector contracts are used for the specified
    /// targets.
    /// @custom:access Restricted to protocol admin.
    function setConnectors(
        address[] calldata targets,
        address[] calldata connectors
    ) external onlyAdmin {
        if (targets.length != connectors.length) {
            revert ArrayLengthMismatch();
        }
        for (uint256 i; i != targets.length;) {
            if (connectors_[targets[i]] != address(0)) {
                revert ConnectorAlreadySet(targets[i]);
            }
            connectors_[targets[i]] = connectors[i];
            emit ConnectorChanged(targets[i], connectors[i]);

            unchecked {
                ++i;
            }
        }
    }

    function updateConnectors(
        address[] calldata targets,
        address[] calldata connectors
    ) external onlyTimelockAdmin {
        if (targets.length != connectors.length) {
            revert ArrayLengthMismatch();
        }
        for (uint256 i; i != targets.length;) {
            if (connectors_[targets[i]] == address(0)) {
                revert ConnectorNotSet(targets[i]);
            }
            connectors_[targets[i]] = connectors[i];
            emit ConnectorChanged(targets[i], connectors[i]);

            unchecked {
                ++i;
            }
        }
    }

    /// @notice Append an address to the custom registries list.
    /// @custom:access Restricted to protocol admin.
    function addCustomRegistry(
        ICustomConnectorRegistry registry
    ) external onlyAdmin {
        if (isCustomRegistry(registry)) {
            revert CustomRegistryAlreadyRegistered();
        }

        customRegistries.push(registry);
        emit CustomRegistryAdded(address(registry));
    }

    /// @notice Replace an address in the custom registries list.
    /// @custom:access Restricted to protocol admin.
    function updateCustomRegistry(
        uint256 index,
        ICustomConnectorRegistry newRegistry
    ) external onlyTimelockAdmin {
        ICustomConnectorRegistry oldRegistry = customRegistries[index];
        emit CustomRegistryRemoved(address(oldRegistry));
        customRegistries[index] = newRegistry;
        if (address(newRegistry) != address(0)) {
            emit CustomRegistryAdded(address(newRegistry));
        }
    }

    /// Public functions

    function connectorOf(
        address target
    ) external view returns (address) {
        address connector = _getConnector(target);

        if (connector != address(0)) {
            return connector;
        }

        revert ConnectorNotRegistered(target);
    }

    function hasConnector(
        address target
    ) external view returns (bool) {
        return _getConnector(target) != address(0);
    }

    function isCustomRegistry(
        ICustomConnectorRegistry registry
    ) public view returns (bool) {
        for (uint256 i; i != customRegistries.length;) {
            if (address(customRegistries[i]) == address(registry)) {
                return true;
            }
            unchecked {
                ++i;
            }
        }
        return false;
    }

    /// Internal functions

    function _getConnector(
        address target
    ) internal view returns (address) {
        address connector = connectors_[target];
        if (connector != address(0)) {
            return connector;
        }
        uint256 length = customRegistries.length;
        for (uint256 i; i != length;) {
            if (address(customRegistries[i]) != address(0)) {
                (bool success, bytes memory data) = address(customRegistries[i])
                    .staticcall(
                    abi.encodeWithSelector(
                        ICustomConnectorRegistry.connectorOf.selector, target
                    )
                );
                if (success && data.length == 32) {
                    address _connector = abi.decode(data, (address));
                    if (_connector != address(0)) {
                        return _connector;
                    }
                }
            }

            unchecked {
                ++i;
            }
        }

        return address(0);
    }
}

File 3 of 4 : Admin.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

/// @title Admin contract
/// @author vfat.tools
/// @notice Provides an administration mechanism allowing restricted functions
abstract contract Admin {
    /// ERRORS ///

    /// @notice Thrown when the caller is not the admin
    error NotAdminError(); //0xb5c42b3b

    /// EVENTS ///

    /// @notice Emitted when a new admin is set
    /// @param oldAdmin Address of the old admin
    /// @param newAdmin Address of the new admin
    event AdminSet(address oldAdmin, address newAdmin);

    /// STORAGE ///

    /// @notice Address of the current admin
    address public admin;

    /// MODIFIERS ///

    /// @dev Restricts a function to the admin
    modifier onlyAdmin() {
        if (msg.sender != admin) revert NotAdminError();
        _;
    }

    /// WRITE FUNCTIONS ///

    /// @param admin_ Address of the admin
    constructor(
        address admin_
    ) {
        emit AdminSet(address(0), admin_);
        admin = admin_;
    }

    /// @notice Sets a new admin
    /// @param newAdmin Address of the new admin
    /// @custom:access Restricted to protocol admin.
    function setAdmin(
        address newAdmin
    ) external onlyAdmin {
        emit AdminSet(admin, newAdmin);
        admin = newAdmin;
    }
}

File 4 of 4 : TimelockAdmin.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

/// @title TimelockAdmin contract
/// @author vfat.tools
/// @notice Provides an timelockAdministration mechanism allowing restricted
/// functions
abstract contract TimelockAdmin {
    /// ERRORS ///

    /// @notice Thrown when the caller is not the timelockAdmin
    error NotTimelockAdminError();

    /// EVENTS ///

    /// @notice Emitted when a new timelockAdmin is set
    /// @param oldTimelockAdmin Address of the old timelockAdmin
    /// @param newTimelockAdmin Address of the new timelockAdmin
    event TimelockAdminSet(address oldTimelockAdmin, address newTimelockAdmin);

    /// STORAGE ///

    /// @notice Address of the current timelockAdmin
    address public timelockAdmin;

    /// MODIFIERS ///

    /// @dev Restricts a function to the timelockAdmin
    modifier onlyTimelockAdmin() {
        if (msg.sender != timelockAdmin) revert NotTimelockAdminError();
        _;
    }

    /// WRITE FUNCTIONS ///

    /// @param timelockAdmin_ Address of the timelockAdmin
    constructor(address timelockAdmin_) {
        emit TimelockAdminSet(timelockAdmin, timelockAdmin_);
        timelockAdmin = timelockAdmin_;
    }

    /// @notice Sets a new timelockAdmin
    /// @dev Can only be called by the current timelockAdmin
    /// @param newTimelockAdmin Address of the new timelockAdmin
    function setTimelockAdmin(address newTimelockAdmin)
        external
        onlyTimelockAdmin
    {
        emit TimelockAdminSet(timelockAdmin, newTimelockAdmin);
        timelockAdmin = newTimelockAdmin;
    }
}

Settings
{
  "remappings": [
    "solmate/=lib/solmate/src/",
    "@openzeppelin/=lib/openzeppelin-contracts/",
    "@morpho-blue/=lib/morpho-blue/src/",
    "ds-test/=lib/solmate/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "morpho-blue/=lib/morpho-blue/",
    "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": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"contract IGaugeRegistryVoter","name":"voter_","type":"address"},{"internalType":"address","name":"connector_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"connector","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"connectorOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"voter","outputs":[{"internalType":"contract IGaugeRegistryVoter","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60c060405234801561001057600080fd5b506040516102d13803806102d183398101604081905261002f9161005e565b6001600160a01b039182166080521660a052610098565b6001600160a01b038116811461005b57600080fd5b50565b6000806040838503121561007157600080fd5b825161007c81610046565b602084015190925061008d81610046565b809150509250929050565b60805160a0516102096100c860003960008181608e0152610155015260008181604b015260e001526102096000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806346c96aac1461004657806383f3084f14610089578063c79aeaae146100b0575b600080fd5b61006d7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b61006d7f000000000000000000000000000000000000000000000000000000000000000081565b61006d6100be366004610181565b60405163aa79979b60e01b81526001600160a01b0382811660048301526000917f00000000000000000000000000000000000000000000000000000000000000009091169063aa79979b90602401602060405180830381865afa158015610129573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061014d91906101b1565b1561017957507f0000000000000000000000000000000000000000000000000000000000000000919050565b506000919050565b60006020828403121561019357600080fd5b81356001600160a01b03811681146101aa57600080fd5b9392505050565b6000602082840312156101c357600080fd5b815180151581146101aa57600080fdfea264697066735822122019c076f264afd340dec40057ce8f64b1bff2b6ab30ad9988bc421f46d176784264736f6c6343000813003300000000000000000000000017fa9da6e01ad59513707f92033a6eb03ccb10b4000000000000000000000000b051f35a2b629ab6f9cd8ff2776caf8c0d800307

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100415760003560e01c806346c96aac1461004657806383f3084f14610089578063c79aeaae146100b0575b600080fd5b61006d7f00000000000000000000000017fa9da6e01ad59513707f92033a6eb03ccb10b481565b6040516001600160a01b03909116815260200160405180910390f35b61006d7f000000000000000000000000b051f35a2b629ab6f9cd8ff2776caf8c0d80030781565b61006d6100be366004610181565b60405163aa79979b60e01b81526001600160a01b0382811660048301526000917f00000000000000000000000017fa9da6e01ad59513707f92033a6eb03ccb10b49091169063aa79979b90602401602060405180830381865afa158015610129573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061014d91906101b1565b1561017957507f000000000000000000000000b051f35a2b629ab6f9cd8ff2776caf8c0d800307919050565b506000919050565b60006020828403121561019357600080fd5b81356001600160a01b03811681146101aa57600080fd5b9392505050565b6000602082840312156101c357600080fd5b815180151581146101aa57600080fdfea264697066735822122019c076f264afd340dec40057ce8f64b1bff2b6ab30ad9988bc421f46d176784264736f6c63430008130033

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

00000000000000000000000017fa9da6e01ad59513707f92033a6eb03ccb10b4000000000000000000000000b051f35a2b629ab6f9cd8ff2776caf8c0d800307

-----Decoded View---------------
Arg [0] : voter_ (address): 0x17fa9dA6e01aD59513707F92033a6eb03CcB10B4
Arg [1] : connector_ (address): 0xb051f35a2b629AB6f9cD8Ff2776CAF8c0d800307

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000017fa9da6e01ad59513707f92033a6eb03ccb10b4
Arg [1] : 000000000000000000000000b051f35a2b629ab6f9cd8ff2776caf8c0d800307


Block Transaction Gas Used Reward
view all blocks ##produced##

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
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.