ETH Price: $3,480.76 (+0.95%)

Contract

0x2060f76cF8fB21AfEa53E7273156E4a72f3B66c3
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Authorized A...212781092024-11-27 9:11:1128 days ago1732698671IN
0x2060f76c...72f3B66c3
0 ETH0.0005719411.05964758
Set Authorized A...212780892024-11-27 9:07:1128 days ago1732698431IN
0x2060f76c...72f3B66c3
0 ETH0.0003417511.97332203
Set Authorized A...212780882024-11-27 9:06:5928 days ago1732698419IN
0x2060f76c...72f3B66c3
0 ETH0.0003346611.72497089
Set Authorized A...212776882024-11-27 7:46:4728 days ago1732693607IN
0x2060f76c...72f3B66c3
0 ETH0.0003731811.90648432
Set Authorized A...212776872024-11-27 7:46:3528 days ago1732693595IN
0x2060f76c...72f3B66c3
0 ETH0.0005676311.71750722
Set Authorized A...212205872024-11-19 8:29:3536 days ago1732004975IN
0x2060f76c...72f3B66c3
0 ETH0.000467139.64289235
Set Authorized A...212205862024-11-19 8:29:2336 days ago1732004963IN
0x2060f76c...72f3B66c3
0 ETH0.000304939.56090442
Set Authorized A...212205852024-11-19 8:29:1136 days ago1732004951IN
0x2060f76c...72f3B66c3
0 ETH0.000498939.63310009
Set Authorized A...212205842024-11-19 8:28:5936 days ago1732004939IN
0x2060f76c...72f3B66c3
0 ETH0.000480379.91636542
Set Authorized A...212205832024-11-19 8:28:4736 days ago1732004927IN
0x2060f76c...72f3B66c3
0 ETH0.000472629.75621291
Set Authorized A...212205822024-11-19 8:28:3536 days ago1732004915IN
0x2060f76c...72f3B66c3
0 ETH0.000468479.67306717
Set Authorized A...212205812024-11-19 8:28:2336 days ago1732004903IN
0x2060f76c...72f3B66c3
0 ETH0.000477469.85869152
Set Authorized A...212205802024-11-19 8:28:1136 days ago1732004891IN
0x2060f76c...72f3B66c3
0 ETH0.0005186110.0192541
Set Authorized A...212205792024-11-19 8:27:5936 days ago1732004879IN
0x2060f76c...72f3B66c3
0 ETH0.000508149.81886391
Set Authorized A...212205782024-11-19 8:27:4736 days ago1732004867IN
0x2060f76c...72f3B66c3
0 ETH0.000494599.55715378
Set Authorized A...212205772024-11-19 8:27:3536 days ago1732004855IN
0x2060f76c...72f3B66c3
0 ETH0.000496359.59523687
Set Authorized A...212205762024-11-19 8:27:2336 days ago1732004843IN
0x2060f76c...72f3B66c3
0 ETH0.000465939.1259057
Set Authorized A...212205752024-11-19 8:27:1136 days ago1732004831IN
0x2060f76c...72f3B66c3
0 ETH0.000476369.20881831
Set Authorized A...212205742024-11-19 8:26:5936 days ago1732004819IN
0x2060f76c...72f3B66c3
0 ETH0.000487629.42055662
Set Authorized A...212205732024-11-19 8:26:4736 days ago1732004807IN
0x2060f76c...72f3B66c3
0 ETH0.000484289.35597971
Set Authorized A...212205722024-11-19 8:26:3536 days ago1732004795IN
0x2060f76c...72f3B66c3
0 ETH0.000404878.35783981
Set Authorized A...212205712024-11-19 8:26:2336 days ago1732004783IN
0x2060f76c...72f3B66c3
0 ETH0.000453458.76217868

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block
From
To
212205572024-11-19 8:23:3536 days ago1732004615  Contract Creation0 ETH
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x6FCf22e2...69287E229
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
AddressProvider

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 20000 runs

Other Settings:
paris EvmVersion
File 1 of 3 : AddressProvider.sol
/// SPDX-License-Identifier: BUSL-1.1

/// Copyright (C) 2023 Brahma.fi

pragma solidity 0.8.19;

import {IAddressProviderService} from "interfaces/IAddressProviderService.sol";
import {Constants} from "src/core/Constants.sol";

/**
 * @title AddressProvider
 * @author Brahma.fi
 * @notice Single source of truth for resolving addresses of core components and external contracts
 */
contract AddressProvider is Constants {
    error RegistryAlreadyExists();
    error AddressProviderUnsupported();
    error NotGovernance(address);
    error NotPendingGovernance(address);
    error NullAddress();

    event RegistryInitialised(address indexed registry, bytes32 indexed key);
    event AuthorizedAddressInitialised(address indexed authorizedAddress, bytes32 indexed key);
    event GovernanceTransferRequested(address indexed previousGovernance, address indexed newGovernance);
    event GovernanceTransferred(address indexed previousGovernance, address indexed newGovernance);

    /// @notice address of governance
    address public governance;
    /// @notice address of pending governance before accepting
    address public pendingGovernance;

    /**
     * @notice keccak256 hash of authorizedAddress keys mapped to their addresses
     * @dev Core & Roles are used as keys for this mapping. These addresses are mutable
     * @dev authorizedAddresses are updatable by governance
     */
    mapping(bytes32 => address) internal authorizedAddresses;

    /**
     * @notice keccak256 hash of registry keys mapped to their addresses
     * @dev registries are only set once by governance and immutable
     */
    mapping(bytes32 => address) internal registries;

    constructor(address _governance, address walletRegistry, address policyRegistry, address executorRegistry) {
        _notNull(_governance);
        governance = _governance;

        _notNull(walletRegistry);
        _notNull(policyRegistry);
        _notNull(executorRegistry);
        registries[_WALLET_REGISTRY_HASH] = walletRegistry;
        registries[_POLICY_REGISTRY_HASH] = policyRegistry;
        registries[_EXECUTOR_REGISTRY_HASH] = executorRegistry;
    }

    /**
     * @notice Governance setter
     * @param _newGovernance address of new governance
     */
    function setGovernance(address _newGovernance) external {
        _notNull(_newGovernance);
        _onlyGov();
        emit GovernanceTransferRequested(governance, _newGovernance);
        pendingGovernance = _newGovernance;
    }

    /**
     * @notice Governance accepter
     */
    function acceptGovernance() external {
        if (msg.sender != pendingGovernance) {
            revert NotPendingGovernance(msg.sender);
        }
        emit GovernanceTransferred(governance, msg.sender);
        governance = msg.sender;
        delete pendingGovernance;
    }

    /**
     * @notice Authorized address setter
     * @param _key key of authorizedAddress
     * @param _authorizedAddress address to set
     * @param _overrideCheck overrides check for supported address provider
     */
    function setAuthorizedAddress(bytes32 _key, address _authorizedAddress, bool _overrideCheck) external {
        _onlyGov();
        _notNull(_authorizedAddress);

        /// @dev skips checks for supported `addressProvider()` if `_overrideCheck` is true
        if (!_overrideCheck) {
            /// @dev skips checks for supported `addressProvider()` if `_authorizedAddress` is an EOA
            if (_authorizedAddress.code.length != 0) _ensureAddressProvider(_authorizedAddress);
        }

        authorizedAddresses[_key] = _authorizedAddress;

        emit AuthorizedAddressInitialised(_authorizedAddress, _key);
    }

    /**
     * @notice Registry address setter
     * @param _key key of registry address
     * @param _registry address to set
     */
    function setRegistry(bytes32 _key, address _registry) external {
        _onlyGov();
        _ensureAddressProvider(_registry);

        if (registries[_key] != address(0)) revert RegistryAlreadyExists();
        registries[_key] = _registry;

        emit RegistryInitialised(_registry, _key);
    }

    /**
     * @notice Authorized address getter
     * @param _key key of authorized address
     * @return address of authorized address
     */
    function getAuthorizedAddress(bytes32 _key) external view returns (address) {
        return authorizedAddresses[_key];
    }

    /**
     * @notice Registry address getter
     * @param _key key of registry address
     * @return address of registry address
     */
    function getRegistry(bytes32 _key) external view returns (address) {
        return registries[_key];
    }

    /**
     * @notice Ensures that the new address supports the AddressProviderService interface
     * and is pointing to this AddressProvider
     * @param _newAddress address to check
     */
    function _ensureAddressProvider(address _newAddress) internal view {
        if (IAddressProviderService(_newAddress).addressProviderTarget() != address(this)) {
            revert AddressProviderUnsupported();
        }
    }

    /**
     * @notice Checks if msg.sender is governance
     */
    function _onlyGov() internal view {
        if (msg.sender != governance) revert NotGovernance(msg.sender);
    }

    /**
     * @notice Checks and reverts if address is null
     * @param addr address to check if null
     */
    function _notNull(address addr) internal pure {
        if (addr == address(0)) revert NullAddress();
    }
}

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

interface IAddressProviderService {
    /// @notice Returns the address of the AddressProvider
    function addressProviderTarget() external view returns (address);
}

File 3 of 3 : Constants.sol
/// SPDX-License-Identifier: BUSL-1.1

/// Copyright (C) 2023 Brahma.fi

pragma solidity 0.8.19;

/**
 * @title Constants
 * @author Brahma.fi
 * @notice Contains constants used by multiple contracts
 * @dev Inflates bytecode size by approximately 560 bytes on deployment, but saves gas on runtime
 */
abstract contract Constants {
    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                        REGISTRIES                          */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
    /// @notice Key to map address of ExecutorRegistry
    bytes32 internal constant _EXECUTOR_REGISTRY_HASH = bytes32(uint256(keccak256("console.core.ExecutorRegistry")) - 1);

    /// @notice Key to map address of WalletRegistry
    bytes32 internal constant _WALLET_REGISTRY_HASH = bytes32(uint256(keccak256("console.core.WalletRegistry")) - 1);

    /// @notice Key to map address of PolicyRegistry
    bytes32 internal constant _POLICY_REGISTRY_HASH = bytes32(uint256(keccak256("console.core.PolicyRegistry")) - 1);

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                          CORE                              */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
    /// @notice Key to map address of ExecutorPlugin
    bytes32 internal constant _EXECUTOR_PLUGIN_HASH = bytes32(uint256(keccak256("console.core.ExecutorPlugin")) - 1);

    /// @notice Key to map address of ConsoleFallbackHandler
    bytes32 internal constant _CONSOLE_FALLBACK_HANDLER_HASH =
        bytes32(uint256(keccak256("console.core.FallbackHandler")) - 1);

    /// @notice Key to map address of Safe FallbackHandler
    bytes32 internal constant _SAFE_FALLBACK_HANDLER_HASH = bytes32(uint256(keccak256("safe.FallbackHandler")) - 1);

    /// @notice Key to map address of Safe MultiSend
    bytes32 internal constant _SAFE_MULTI_SEND_HASH = bytes32(uint256(keccak256("safe.MultiSend")) - 1);

    /// @notice Key to map address of SafeProxyFactory
    bytes32 internal constant _SAFE_PROXY_FACTORY_HASH = bytes32(uint256(keccak256("safe.ProxyFactory")) - 1);

    /// @notice Key to map address of SafeSingleton
    bytes32 internal constant _SAFE_SINGLETON_HASH = bytes32(uint256(keccak256("safe.Singleton")) - 1);

    /// @notice Key to map address of PolicyValidator
    bytes32 internal constant _POLICY_VALIDATOR_HASH = bytes32(uint256(keccak256("console.core.PolicyValidator")) - 1);

    /// @notice Key to map address of SafeDeployer
    bytes32 internal constant _SAFE_DEPLOYER_HASH = bytes32(uint256(keccak256("console.core.SafeDeployer")) - 1);

    /// @notice Key to map address of SafeEnabler
    bytes32 internal constant _SAFE_ENABLER_HASH = bytes32(uint256(keccak256("console.core.SafeEnabler")) - 1);

    /// @notice Key to map address of SafeModerator
    bytes32 internal constant _SAFE_MODERATOR_HASH = bytes32(uint256(keccak256("console.core.SafeModerator")) - 1);

    /// @notice Key to map address of SafeModeratorOverridable
    bytes32 internal constant _SAFE_MODERATOR_OVERRIDABLE_HASH =
        bytes32(uint256(keccak256("console.core.SafeModeratorOverridable")) - 1);

    /// @notice Key to map address of TransactionValidator
    bytes32 internal constant _TRANSACTION_VALIDATOR_HASH =
        bytes32(uint256(keccak256("console.core.TransactionValidator")) - 1);

    /// @notice Key to map address of ConsoleOpBuilder
    bytes32 internal constant _CONSOLE_OP_BUILDER_HASH =
        bytes32(uint256(keccak256("console.core.ConsoleOpBuilder")) - 1);

    /// @notice Key to map address of ExecutionBlocker
    bytes32 internal constant _EXECUTION_BLOCKER_HASH = bytes32(uint256(keccak256("console.core.ExecutionBlocker")) - 1);

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                          ROLES                             */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @notice Key to map address of Role PolicyAuthenticator
    bytes32 internal constant _POLICY_AUTHENTICATOR_HASH =
        bytes32(uint256(keccak256("console.roles.PolicyAuthenticator")) - 1);
}

Settings
{
  "remappings": [
    "ds-test/=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/contracts/",
    "openzeppelin/=lib/openzeppelin-contracts/contracts/",
    "safe-contracts/=lib/safe-contracts/contracts/",
    "solady/=lib/solady/src/",
    "solmate/=lib/solady/lib/solmate/src/",
    "solidity-bytes-utils/=lib/solidity-bytes-utils/contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 20000
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_governance","type":"address"},{"internalType":"address","name":"walletRegistry","type":"address"},{"internalType":"address","name":"policyRegistry","type":"address"},{"internalType":"address","name":"executorRegistry","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AddressProviderUnsupported","type":"error"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"NotGovernance","type":"error"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"NotPendingGovernance","type":"error"},{"inputs":[],"name":"NullAddress","type":"error"},{"inputs":[],"name":"RegistryAlreadyExists","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"authorizedAddress","type":"address"},{"indexed":true,"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"AuthorizedAddressInitialised","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousGovernance","type":"address"},{"indexed":true,"internalType":"address","name":"newGovernance","type":"address"}],"name":"GovernanceTransferRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousGovernance","type":"address"},{"indexed":true,"internalType":"address","name":"newGovernance","type":"address"}],"name":"GovernanceTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"registry","type":"address"},{"indexed":true,"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"RegistryInitialised","type":"event"},{"inputs":[],"name":"acceptGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_key","type":"bytes32"}],"name":"getAuthorizedAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_key","type":"bytes32"}],"name":"getRegistry","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingGovernance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_key","type":"bytes32"},{"internalType":"address","name":"_authorizedAddress","type":"address"},{"internalType":"bool","name":"_overrideCheck","type":"bool"}],"name":"setAuthorizedAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newGovernance","type":"address"}],"name":"setGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_key","type":"bytes32"},{"internalType":"address","name":"_registry","type":"address"}],"name":"setRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100885760003560e01c8063ab033ea91161005b578063ab033ea914610129578063e51fd7a61461013c578063f39c38a014610172578063f9e733bf1461019257600080fd5b8063238efcbc1461008d5780632bf84475146100975780633ca2210a146100f65780635aa6e67514610109575b600080fd5b6100956101a5565b005b6100cd6100a5366004610630565b60009081526002602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b61009561010436600461066b565b61027a565b6000546100cd9073ffffffffffffffffffffffffffffffffffffffff1681565b6100956101373660046106b2565b610332565b6100cd61014a366004610630565b60009081526003602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b6001546100cd9073ffffffffffffffffffffffffffffffffffffffff1681565b6100956101a03660046106d6565b6103d0565b60015473ffffffffffffffffffffffffffffffffffffffff1633146101fd576040517f8396ca090000000000000000000000000000000000000000000000000000000081523360048201526024015b60405180910390fd5b60008054604051339273ffffffffffffffffffffffffffffffffffffffff909216917f5f56bee8cffbe9a78652a74a60705edede02af10b0bbb888ca44b79a0d42ce8091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000009081163317909155600180549091169055565b6102826104b8565b61028b8261050d565b806102b65773ffffffffffffffffffffffffffffffffffffffff82163b156102b6576102b68261055d565b60008381526002602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8616908117909155905185927f8821e1da51cb794bacf07ed655cc2aa1de95099659d6597da0f3369e7196615591a3505050565b61033b8161050d565b6103436104b8565b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917fb58a4216427d4ae442967a4327a125f3c639c81786d25008503f332a51b0f8e291a3600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6103d86104b8565b6103e18161055d565b60008281526003602052604090205473ffffffffffffffffffffffffffffffffffffffff161561043d576040517fea8d06c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526003602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8516908117909155905184927fd6229bb15e2ff7952b3e27eceb54250215f08cb021d54ba034374d48fc5b83f291a35050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461050b576040517f988d1f030000000000000000000000000000000000000000000000000000000081523360048201526024016101f4565b565b73ffffffffffffffffffffffffffffffffffffffff811661055a576040517fe99d5ac500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b3073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff166321b1e4806040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e39190610706565b73ffffffffffffffffffffffffffffffffffffffff161461055a576040517fcdc9753300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006020828403121561064257600080fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff8116811461055a57600080fd5b60008060006060848603121561068057600080fd5b83359250602084013561069281610649565b9150604084013580151581146106a757600080fd5b809150509250925092565b6000602082840312156106c457600080fd5b81356106cf81610649565b9392505050565b600080604083850312156106e957600080fd5b8235915060208301356106fb81610649565b809150509250929050565b60006020828403121561071857600080fd5b81516106cf8161064956fea26469706673582212205b514d2556b8c749992ae3faa8b190b0c32b70c00b7df9df60ef3d3c9e900b0464736f6c63430008130033

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
[ Download: CSV Export  ]
[ 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.