Overview
ETH Balance
0 ETH
ETH Value
$0.00More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
17210507 | 170 days ago | Contract Creation | 0 ETH |
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x0B7c73e7...2AEa2f57D The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
InverterBeaconProxy_v1
Compiler Version
v0.8.23+commit.f704f362
Optimization Enabled:
Yes with 750 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.23; // Internal Interfaces import {IInverterBeacon_v1} from "src/proxies/interfaces/IInverterBeacon_v1.sol"; // External Dependencies import {Proxy} from "@oz/proxy/Proxy.sol"; /** * @title Inverter Beacon Proxy * * @notice Acts as a proxy for Inverter Network's smart contracts, allowing for upgrades * to contract implementations without affecting the existing state or contract * addresses, thereby achieving upgradeable contracts. * * @dev Implements the Proxy pattern by referencing the {InverterBeacon_v1}, which holds * the address of the current implementation to which calls are delegated. * * @custom:security-contact [email protected] * In case of any concerns or findings, please refer to our Security Policy * at security.inverter.network or email us directly! * * @author Inverter Network */ contract InverterBeaconProxy_v1 is Proxy { //-------------------------------------------------------------------------- // Events /// @notice Proxy upgraded to new {InverterBeacon_v1} instance. /// @param beacon The new {InverterBeacon_v1} instance. event BeaconUpgraded(IInverterBeacon_v1 indexed beacon); //-------------------------------------------------------------------------- // State /// @notice {InverterBeacon_v1} instance that points to the implementation. IInverterBeacon_v1 private immutable _beacon; //-------------------------------------------------------------------------- // Constructor /// @notice Constructs the {InverterBeaconProxy_v1}. /// @dev Sets the {InverterBeacon_v1} instance that contains the implementation address. /// @param beacon The {InverterBeacon_v1} instance. constructor(IInverterBeacon_v1 beacon) { _beacon = beacon; emit BeaconUpgraded(beacon); } //-------------------------------------------------------------------------- // Public Functions /// @dev This overrides the possible use of a "version" function in the modules that are /// called via the Proxy Beacon structure. /// @notice Returns the version of the linked implementation. /// @return Major version. /// @return Minor version. /// @return Patch version. function version() external view returns (uint, uint, uint) { return _beacon.version(); } /// @dev Fallback function to delegate calls to the implementation contract /// even if the call data is empty but msg.value > 0. receive() external payable virtual { _fallback(); } //-------------------------------------------------------------------------- // Internal View Functions /// @inheritdoc Proxy function _implementation() internal view override returns (address) { return _beacon.implementation(); } }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity ^0.8.0; // External Interfaces import {IBeacon} from "@oz/proxy/beacon/IBeacon.sol"; interface IInverterBeacon_v1 is IBeacon { //-------------------------------------------------------------------------- // Errors /// @notice Given implementation invalid. error InverterBeacon__InvalidImplementation(); /// @notice Given implementation minor and patch version is not higher than previous minor version. error InverterBeacon__InvalidImplementationMinorOrPatchVersion(); //-------------------------------------------------------------------------- // Events /// @notice The {InverterBeacon_v1} was constructed. /// @param majorVersion The majorVersion of the implementation contract. event Constructed(uint majorVersion); /// @notice The {InverterBeacon_v1} was upgraded to a new implementation address. /// @param implementation The new implementation address. /// @param newMinorVersion The new minor version of the implementation contract. /// @param newPatchVersion The new patch version of the implementation contract. event Upgraded( address indexed implementation, uint newMinorVersion, uint newPatchVersion ); /// @notice The {InverterBeacon_v1} shutdown was initiated. event ShutdownInitiated(); /// @notice The {InverterBeacon_v1} shutdown was reversed. event ShutdownReversed(); //-------------------------------------------------------------------------- // Public View Functions /// @notice Returns the version of the linked implementation. /// @return Major version. /// @return Minor version. /// @return Patch version. function version() external view returns (uint, uint, uint); /// @notice Returns the {InverterReverter_v1} of the {InverterBeacon_v1}. /// @return ReverterAddress The address of the reverter contract. function getReverterAddress() external returns (address); /// @notice Returns the implementation address of the {InverterBeacon_v1}. /// @return ImplementationAddress The address of the implementation. function getImplementationAddress() external returns (address); /// @notice Returns wether the {InverterBeacon_v1} is in emergency mode or not. /// @return emergencyModeActive Is the beacon in emergency mode. function emergencyModeActive() external view returns (bool); //-------------------------------------------------------------------------- // onlyOwner Mutating Functions /// @notice Upgrades the {InverterBeacon_v1} to a new implementation address. /// @dev Only callable by owner. /// @dev `overrideShutdown` Doesnt do anything if {InverterBeacon_v1} is not in emergency mode. /// @dev Revert if new implementation invalid. /// @param newImplementation The new implementation address. /// @param newMinorVersion The new minor version of the implementation contract. /// @param newPatchVersion The new patch version of the implementation contract. /// @param overrideShutdown Flag to enable upgradeTo function to override the shutdown. function upgradeTo( address newImplementation, uint newMinorVersion, uint newPatchVersion, bool overrideShutdown ) external; //-------------------------------------------------------------------------- // onlyOwner Intervention Mechanism /// @notice Shuts down the {InverterBeacon_v1} and stops the system. /// @dev Only callable by owner. /// @dev Changes the implementation address to address(0). function shutDownImplementation() external; /// @notice Restarts the {InverterBeacon_v1} and the system. /// @dev Only callable by owner. /// @dev Changes the implementation address from address(0) to the original implementation. function restartImplementation() external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/Proxy.sol) pragma solidity ^0.8.20; /** * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to * be specified by overriding the virtual {_implementation} function. * * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a * different contract through the {_delegate} function. * * The success and return data of the delegated call will be returned back to the caller of the proxy. */ abstract contract Proxy { /** * @dev Delegates the current call to `implementation`. * * This function does not return to its internal call site, it will return directly to the external caller. */ function _delegate(address implementation) internal virtual { assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize()) // Call the implementation. // out and outsize are 0 because we don't know the size yet. let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) // Copy the returned data. returndatacopy(0, 0, returndatasize()) switch result // delegatecall returns 0 on error. case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } /** * @dev This is a virtual function that should be overridden so it returns the address to which the fallback * function and {_fallback} should delegate. */ function _implementation() internal view virtual returns (address); /** * @dev Delegates the current call to the address returned by `_implementation()`. * * This function does not return to its internal call site, it will return directly to the external caller. */ function _fallback() internal virtual { _delegate(_implementation()); } /** * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other * function in the contract matches the call data. */ fallback() external payable virtual { _fallback(); } }
// 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); }
{ "remappings": [ "@oz-up/=lib/openzeppelin-contracts-upgradeable/contracts/", "@oz/=lib/openzeppelin-contracts/contracts/", "@df/=lib/deterministic-factory/src/", "@uma/=lib/uma-protocol/packages/core/contracts/", "@ex/=src/external/", "@fm/=src/modules/fundingManager/", "@pp/=src/modules/paymentProcessor/", "@lm/=src/modules/logicModule/", "@lm_pc/=src/modules/logicModule/paymentClient/", "@aut/=src/modules/authorizer/", "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "deterministic-factory/=lib/deterministic-factory/", "ds-test/=lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/", "forge-std/=lib/forge-std/src/", "halmos-cheatcodes/=lib/deterministic-factory/lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/", "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "uma-protocol/=lib/uma-protocol/" ], "optimizer": { "enabled": true, "runs": 750 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "viaIR": false, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract IInverterBeacon_v1","name":"beacon","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IInverterBeacon_v1","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Deployed Bytecode
0x6080604052600436106100225760003560e01c806354fd4d501461003957610031565b366100315761002f61006d565b005b61002f61006d565b34801561004557600080fd5b5061004e61007f565b6040805193845260208401929092529082015260600160405180910390f35b61007d61007861011e565b6101b4565b565b60008060007f0000000000000000000000005c205c0bdb952e3b807a83d9c0b6d57403eb671873ffffffffffffffffffffffffffffffffffffffff166354fd4d506040518163ffffffff1660e01b8152600401606060405180830381865afa1580156100ef573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061011391906101d8565b925092509250909192565b60007f0000000000000000000000005c205c0bdb952e3b807a83d9c0b6d57403eb671873ffffffffffffffffffffffffffffffffffffffff16635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561018b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101af9190610206565b905090565b3660008037600080366000845af43d6000803e8080156101d3573d6000f35b3d6000fd5b6000806000606084860312156101ed57600080fd5b8351925060208401519150604084015190509250925092565b60006020828403121561021857600080fd5b815173ffffffffffffffffffffffffffffffffffffffff8116811461023c57600080fd5b939250505056fea2646970667358221220c128c6841c74365067d40b9eb9c039cd698a17fecb4b54e52439f93cbe989e9c64736f6c63430008170033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
[ 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.