Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 22 from a total of 22 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Authorized A... | 21278109 | 28 days ago | IN | 0 ETH | 0.00057194 | ||||
Set Authorized A... | 21278089 | 28 days ago | IN | 0 ETH | 0.00034175 | ||||
Set Authorized A... | 21278088 | 28 days ago | IN | 0 ETH | 0.00033466 | ||||
Set Authorized A... | 21277688 | 28 days ago | IN | 0 ETH | 0.00037318 | ||||
Set Authorized A... | 21277687 | 28 days ago | IN | 0 ETH | 0.00056763 | ||||
Set Authorized A... | 21220587 | 36 days ago | IN | 0 ETH | 0.00046713 | ||||
Set Authorized A... | 21220586 | 36 days ago | IN | 0 ETH | 0.00030493 | ||||
Set Authorized A... | 21220585 | 36 days ago | IN | 0 ETH | 0.00049893 | ||||
Set Authorized A... | 21220584 | 36 days ago | IN | 0 ETH | 0.00048037 | ||||
Set Authorized A... | 21220583 | 36 days ago | IN | 0 ETH | 0.00047262 | ||||
Set Authorized A... | 21220582 | 36 days ago | IN | 0 ETH | 0.00046847 | ||||
Set Authorized A... | 21220581 | 36 days ago | IN | 0 ETH | 0.00047746 | ||||
Set Authorized A... | 21220580 | 36 days ago | IN | 0 ETH | 0.00051861 | ||||
Set Authorized A... | 21220579 | 36 days ago | IN | 0 ETH | 0.00050814 | ||||
Set Authorized A... | 21220578 | 36 days ago | IN | 0 ETH | 0.00049459 | ||||
Set Authorized A... | 21220577 | 36 days ago | IN | 0 ETH | 0.00049635 | ||||
Set Authorized A... | 21220576 | 36 days ago | IN | 0 ETH | 0.00046593 | ||||
Set Authorized A... | 21220575 | 36 days ago | IN | 0 ETH | 0.00047636 | ||||
Set Authorized A... | 21220574 | 36 days ago | IN | 0 ETH | 0.00048762 | ||||
Set Authorized A... | 21220573 | 36 days ago | IN | 0 ETH | 0.00048428 | ||||
Set Authorized A... | 21220572 | 36 days ago | IN | 0 ETH | 0.00040487 | ||||
Set Authorized A... | 21220571 | 36 days ago | IN | 0 ETH | 0.00045345 |
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
21220557 | 36 days ago | Contract Creation | 0 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
Contract Source Code (Solidity Standard Json-Input format)
/// 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(); } }
// 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); }
/// 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); }
{ "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
- No Contract Security Audit Submitted- Submit Audit Here
[{"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
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.