Overview
S Balance
S Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xBA4F8ef6...3d6b66CCd The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
AMBeacon
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 200 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/UpgradeableBeacon.sol)// Modified by Spectra to use AccessManager instead of Ownable for access controlpragma solidity 0.8.20;import {IBeacon} from "openzeppelin-contracts/proxy/beacon/IBeacon.sol";import "openzeppelin-contracts/access/manager/AccessManaged.sol";/*** @title AMBeacon* @dev This contract is used in conjunction with one or more instances of {BeaconProxy} to determine their* implementation contract, which is where they will delegate all function calls.** Previously, the contract relied on the Ownable pattern from OpenZeppelin.* It has been modified by Spectra to use the AccessManaged for access control instead.** The authority can change the implementation the beacon points to, thus upgrading the proxies that use this beacon.*/contract AMBeacon is IBeacon, AccessManaged {address private _implementation;/*** @dev The `implementation` of the beacon is invalid.*/error BeaconInvalidImplementation(address implementation);
12345678910111213141516// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/IBeacon.sol)pragma solidity ^0.8.20;/*** @dev This is the interface that {BeaconProxy} expects of its beacon.*/interface IBeacon {/*** @dev Must return an address that can be used as a delegate call target.** {UpgradeableBeacon} will check that this address is a contract.*/function implementation() external view returns (address);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (access/manager/AccessManaged.sol)pragma solidity ^0.8.20;import {IAuthority} from "./IAuthority.sol";import {AuthorityUtils} from "./AuthorityUtils.sol";import {IAccessManager} from "./IAccessManager.sol";import {IAccessManaged} from "./IAccessManaged.sol";import {Context} from "../../utils/Context.sol";/*** @dev This contract module makes available a {restricted} modifier. Functions decorated with this modifier will be* permissioned according to an "authority": a contract like {AccessManager} that follows the {IAuthority} interface,* implementing a policy that allows certain callers to access certain functions.** IMPORTANT: The `restricted` modifier should never be used on `internal` functions, judiciously used in `public`* functions, and ideally only used in `external` functions. See {restricted}.*/abstract contract AccessManaged is Context, IAccessManaged {address private _authority;bool private _consumingSchedule;/*** @dev Initializes the contract connected to an initial authority.
1234567891011121314// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (access/manager/IAuthority.sol)pragma solidity ^0.8.20;/*** @dev Standard interface for permissioning originally defined in Dappsys.*/interface IAuthority {/*** @dev Returns true if the caller can invoke on a target the function identified by a function selector.*/function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (access/manager/AuthorityUtils.sol)pragma solidity ^0.8.20;import {IAuthority} from "./IAuthority.sol";library AuthorityUtils {/*** @dev Since `AccessManager` implements an extended IAuthority interface, invoking `canCall` with backwards compatibility* for the preexisting `IAuthority` interface requires special care to avoid reverting on insufficient return data.* This helper function takes care of invoking `canCall` in a backwards compatible way without reverting.*/function canCallWithDelay(address authority,address caller,address target,bytes4 selector) internal view returns (bool immediate, uint32 delay) {(bool success, bytes memory data) = authority.staticcall(abi.encodeCall(IAuthority.canCall, (caller, target, selector)));if (success) {if (data.length >= 0x40) {(immediate, delay) = abi.decode(data, (bool, uint32));} else if (data.length >= 0x20) {
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (access/manager/IAccessManager.sol)pragma solidity ^0.8.20;import {IAccessManaged} from "./IAccessManaged.sol";import {Time} from "../../utils/types/Time.sol";interface IAccessManager {/*** @dev A delayed operation was scheduled.*/event OperationScheduled(bytes32 indexed operationId,uint32 indexed nonce,uint48 schedule,address caller,address target,bytes data);/*** @dev A scheduled operation was executed.*/event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (access/manager/IAccessManaged.sol)pragma solidity ^0.8.20;interface IAccessManaged {/*** @dev Authority that manages this contract was updated.*/event AuthorityUpdated(address authority);error AccessManagedUnauthorized(address caller);error AccessManagedRequiredDelay(address caller, uint32 delay);error AccessManagedInvalidAuthority(address authority);/*** @dev Returns the current authority.*/function authority() external view returns (address);/*** @dev Transfers control to a new authority. The caller must be the current authority.*/function setAuthority(address) external;/**
123456789101112131415161718192021222324// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)pragma solidity ^0.8.20;/*** @dev Provides information about the current execution context, including the* sender of the transaction and its data. While these are generally available* via msg.sender and msg.data, they should not be accessed in such a direct* manner, since when dealing with meta-transactions the account sending and* paying for execution may not be the actual sender (as far as an application* is concerned).** This contract is only required for intermediate, library-like contracts.*/abstract contract Context {function _msgSender() internal view virtual returns (address) {return msg.sender;}function _msgData() internal view virtual returns (bytes calldata) {return msg.data;}}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (utils/types/Time.sol)pragma solidity ^0.8.20;import {Math} from "../math/Math.sol";import {SafeCast} from "../math/SafeCast.sol";/*** @dev This library provides helpers for manipulating time-related objects.** It uses the following types:* - `uint48` for timepoints* - `uint32` for durations** While the library doesn't provide specific types for timepoints and duration, it does provide:* - a `Delay` type to represent duration that can be programmed to change value automatically at a given point* - additional helper functions*/library Time {using Time for *;/*** @dev Get the block timestamp as a Timepoint.*/function timestamp() internal view returns (uint48) {
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)pragma solidity ^0.8.20;/*** @dev Standard math utilities missing in the Solidity language.*/library Math {/*** @dev Muldiv operation overflow.*/error MathOverflowedMulDiv();enum Rounding {Floor, // Toward negative infinityCeil, // Toward positive infinityTrunc, // Toward zeroExpand // Away from zero}/*** @dev Returns the addition of two unsigned integers, with an overflow flag.*/function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {unchecked {
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SafeCast.sol)// This file was procedurally generated from scripts/generate/templates/SafeCast.js.pragma solidity ^0.8.20;/*** @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow* checks.** Downcasting from uint256/int256 in Solidity does not revert on overflow. This can* easily result in undesired exploitation or bugs, since developers usually* assume that overflows raise errors. `SafeCast` restores this intuition by* reverting the transaction when such an operation overflows.** Using this library instead of the unchecked operations eliminates an entire* class of bugs, so it's recommended to use it always.*/library SafeCast {/*** @dev Value doesn't fit in an uint of `bits` size.*/error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);/*** @dev An int value doesn't fit in an uint of `bits` size.
1234567891011121314151617181920212223242526{"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-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/","openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/","openzeppelin-erc20-basic/=lib/openzeppelin-contracts/contracts/token/ERC20/","openzeppelin-erc20-extensions/=lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/","openzeppelin-erc20/=lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/","openzeppelin-math/=lib/openzeppelin-contracts/contracts/utils/math/","openzeppelin-proxy/=lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/","openzeppelin-utils/=lib/openzeppelin-contracts/contracts/utils/","@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/","@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/"],"optimizer": {"enabled": true,"runs": 200},"metadata": {"useLiteralContent": false,"bytecodeHash": "ipfs","appendCBOR": true},"outputSelection": {
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"implementation_","type":"address"},{"internalType":"address","name":"initialAuthority","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"authority","type":"address"}],"name":"AccessManagedInvalidAuthority","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"},{"internalType":"uint32","name":"delay","type":"uint32"}],"name":"AccessManagedRequiredDelay","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"AccessManagedUnauthorized","type":"error"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"name":"BeaconInvalidImplementation","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"authority","type":"address"}],"name":"AuthorityUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"authority","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isConsumingScheduledOp","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newAuthority","type":"address"}],"name":"setAuthority","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Deployed Bytecode
0x608060405234801561000f575f80fd5b5060043610610055575f3560e01c80633659cfe6146100595780635c60da1b1461006e5780637a9e5e4b146100985780638fb36037146100ab578063bf7e214f146100cc575b5f80fd5b61006c610067366004610461565b6100dc565b005b6001546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b61006c6100a6366004610461565b6100f3565b6100b3610170565b6040516001600160e01b0319909116815260200161008f565b5f546001600160a01b031661007b565b6100e7335f36610192565b6100f081610288565b50565b5f5433906001600160a01b0316811461012e5760405162d1953b60e31b81526001600160a01b03821660048201526024015b60405180910390fd5b816001600160a01b03163b5f03610163576040516361798f2f60e11b81526001600160a01b0383166004820152602401610125565b61016c82610306565b5050565b5f8054600160a01b900460ff1661018657505f90565b50638fb3603760e01b90565b5f806101c56101a85f546001600160a01b031690565b86306101b760045f898b61048e565b6101c0916104b5565b610359565b91509150816102815763ffffffff81161561025e575f805460ff60a01b198116600160a01b17909155604051634a63ebf760e11b81526001600160a01b03909116906394c7d7ee9061021f908890889088906004016104e5565b5f604051808303815f87803b158015610236575f80fd5b505af1158015610248573d5f803e3d5ffd5b50505f805460ff60a01b19169055506102819050565b60405162d1953b60e31b81526001600160a01b0386166004820152602401610125565b5050505050565b806001600160a01b03163b5f036102bd5760405163211eb15960e21b81526001600160a01b0382166004820152602401610125565b600180546001600160a01b0319166001600160a01b0383169081179091556040517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a250565b5f80546001600160a01b0319166001600160a01b0383169081179091556040519081527f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad9060200160405180910390a150565b6040516001600160a01b03848116602483015283811660448301526001600160e01b0319831660648301525f9182918291829189169060840160408051601f198184030181529181526020820180516001600160e01b031663b700961360e01b179052516103c79190610524565b5f60405180830381855afa9150503d805f81146103ff576040519150601f19603f3d011682016040523d82523d5f602084013e610404565b606091505b50915091508115610456576040815110610436578080602001905181019061042c9190610564565b9094509250610456565b6020815110610456578080602001905181019061045391906105a1565b93505b505094509492505050565b5f60208284031215610471575f80fd5b81356001600160a01b0381168114610487575f80fd5b9392505050565b5f808585111561049c575f80fd5b838611156104a8575f80fd5b5050820193919092039150565b6001600160e01b031981358181169160048510156104dd5780818660040360031b1b83161692505b505092915050565b6001600160a01b03841681526040602082018190528101829052818360608301375f818301606090810191909152601f909201601f1916010192915050565b5f82515f5b818110156105435760208186018101518583015201610529565b505f920191825250919050565b8051801515811461055f575f80fd5b919050565b5f8060408385031215610575575f80fd5b61057e83610550565b9150602083015163ffffffff81168114610596575f80fd5b809150509250929050565b5f602082840312156105b1575f80fd5b6104878261055056fea2646970667358221220a0e68323aa3965b57d7b644e930bb7c164f64dfc6ab549890f54f48ab4b3afb364736f6c63430008140033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 35 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
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.