ETH Price: $3,719.80 (-5.06%)

Contract

0xC059f95da3218d4e5051063e0c5f896572d1ef53

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Add Delegate1267659892024-10-17 2:05:5554 days ago1729130755IN
0xC059f95d...572d1ef53
0 ETH0.0000007553650.0105115

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To
1144989082024-01-07 3:03:13338 days ago1704596593  Contract Creation0 ETH

Loading...
Loading

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

Contract Name:
BakedBeanManagement

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 1000000 runs

Other Settings:
default evmVersion, GNU GPLv3 license
/**
 *Submitted for verification at optimistic.etherscan.io on 2023-04-22
*/

// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.18;



contract BakedBeanManagement{
    /*//////////////////////////////////////////////////////////////
                           STORAGE MANAGEMENT
    //////////////////////////////////////////////////////////////*/

    bytes32 internal constant _BEACON_STORAGE_SLOT =
        bytes32(uint256(keccak256("eip1967.proxy.beacon")) - 1);

    /// @dev struct to store beacon address
    struct AddressSlot {
        address value;
    }
    error BeaconNotSet();
    error ImplementationNotSet();
    error BeaconCallFailed();
    /// @dev returns the storage slot where the beacon address is stored
    function _getAddressSlot(bytes32 slot)
        internal
        pure
        returns (AddressSlot storage r)
    {
        // solhint-disable-next-line no-inline-assembly
        assembly {
            r.slot := slot
        }
    }

    /*//////////////////////////////////////////////////////////////
                              CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    /// @notice constructor for proxy
    /// @param _beaconAddress: address of beacon (i.e. factory address)
    /// @dev {Factory.sol} will store the implementation address,
    /// thus acting as the beacon
    constructor(address _beaconAddress) {
        _getAddressSlot(_BEACON_STORAGE_SLOT).value = _beaconAddress;
    }

    /*//////////////////////////////////////////////////////////////
                              BEACON LOGIC
    //////////////////////////////////////////////////////////////*/

    /// @return beacon address (i.e. the factory address)
    function _beacon() internal view returns (address beacon) {
        beacon = _getAddressSlot(_BEACON_STORAGE_SLOT).value;
        if (beacon == address(0)) revert BeaconNotSet();
    }

    /*//////////////////////////////////////////////////////////////
                          IMPLEMENTATION LOGIC
    //////////////////////////////////////////////////////////////*/

    /// @return implementation address (i.e. the account logic address)
    function _implementation() internal returns (address implementation) {
        (bool success, bytes memory data) =
            _beacon().call(abi.encodeWithSignature("implementation()"));
        if (!success) revert BeaconCallFailed();
        implementation = abi.decode(data, (address));
        if (implementation == address(0)) revert ImplementationNotSet();
    }

    /*//////////////////////////////////////////////////////////////
                            FORWARDING LOGIC
    //////////////////////////////////////////////////////////////*/

    /// @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 {
        _fallback();
    }

    /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.
    /// Will run if call data is empty.
    receive() external payable {
        _fallback();
    }

    /// @notice Delegates the current call to the address returned by `_implementation()`.
    /// @dev This function does not return to its internal call site,
    /// it will return directly to the external caller.
    function _fallback() internal {
        _delegate(_implementation());
    }

    /// @notice delegates the current call to `implementation`.
    /// @dev This function does not return to its internal call site,
    /// it will return directly to the external caller.
    function _delegate(address implementation) internal virtual {
        // solhint-disable-next-line no-inline-assembly
        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()) }
        }
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_beaconAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"BeaconCallFailed","type":"error"},{"inputs":[],"name":"BeaconNotSet","type":"error"},{"inputs":[],"name":"ImplementationNotSet","type":"error"},{"stateMutability":"payable","type":"fallback"},{"stateMutability":"payable","type":"receive"}]

Deployed Bytecode

0x60806040523661001357610011610017565b005b6100115b610027610022610029565b610198565b565b60008060006100366101bc565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f5c60da1b00000000000000000000000000000000000000000000000000000000179052905173ffffffffffffffffffffffffffffffffffffffff92909216916100b2919061023f565b6000604051808303816000865af19150503d80600081146100ef576040519150601f19603f3d011682016040523d82523d6000602084013e6100f4565b606091505b509150915081610130576040517f73a769bf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80806020019051810190610144919061026e565b925073ffffffffffffffffffffffffffffffffffffffff8316610193576040517f40dde93500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505090565b3660008037600080366000845af43d6000803e8080156101b7573d6000f35b3d6000fd5b60006101ef6101ec60017fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d516102ab565b90565b5473ffffffffffffffffffffffffffffffffffffffff169050806101ec576040517fee755c3e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000825160005b818110156102605760208186018101518583015201610246565b506000920191825250919050565b60006020828403121561028057600080fd5b815173ffffffffffffffffffffffffffffffffffffffff811681146102a457600080fd5b9392505050565b818103818111156102e5577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b9291505056fea2646970667358221220a9fe180b118f059af22133ae7f06251ccb7ca886e7c85092c4cf14b7a43fce0064736f6c63430008120033

Deployed Bytecode Sourcemap

77:4543:0:-:0;;;;;;3162:11;:9;:11::i;:::-;77:4543;;2955:11;3409:77;3450:28;3460:17;:15;:17::i;:::-;3450:9;:28::i;:::-;3409:77::o;2166:375::-;2211:22;2247:12;2261:17;2295:9;:7;:9::i;:::-;2310:43;;;;;;;;;;;;;;;;;;;;;;2295:59;;:14;;;;;;:59;;2310:43;2295:59;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2246:108;;;;2370:7;2365:39;;2386:18;;;;;;;;;;;;;;2365:39;2443:4;2432:27;;;;;;;;;;;;:::i;:::-;2415:44;-1:-1:-1;2474:28:0;;;2470:63;;2511:22;;;;;;;;;;;;;;2470:63;2235:306;;2166:375;:::o;3687:930::-;4087:14;4084:1;4081;4068:34;4322:1;4319;4303:14;4300:1;4284:14;4277:5;4264:60;4401:16;4398:1;4395;4380:38;4439:6;4508:38;;;;4580:16;4577:1;4570:27;4508:38;4527:16;4524:1;4517:27;1708:187;1750:14;1786:37;367:46;412:1;375:33;367:46;:::i;:::-;911:4;692:241;1786:37;:43;;;;-1:-1:-1;1786:43:0;1840:47;;1873:14;;;;;;;;;;;;;;14:412:1;143:3;181:6;175:13;206:1;216:129;230:6;227:1;224:13;216:129;;;328:4;312:14;;;308:25;;302:32;289:11;;;282:53;245:12;216:129;;;-1:-1:-1;400:1:1;364:16;;389:13;;;-1:-1:-1;364:16:1;14:412;-1:-1:-1;14:412:1:o;431:321::-;509:6;562:2;550:9;541:7;537:23;533:32;530:52;;;578:1;575;568:12;530:52;610:9;604:16;660:42;653:5;649:54;642:5;639:65;629:93;;718:1;715;708:12;629:93;741:5;431:321;-1:-1:-1;;;431:321:1:o;757:282::-;824:9;;;845:11;;;842:191;;;889:77;886:1;879:88;990:4;987:1;980:15;1018:4;1015:1;1008:15;842:191;757:282;;;;:::o

Swarm Source

ipfs://a9fe180b118f059af22133ae7f06251ccb7ca886e7c85092c4cf14b7a43fce00

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
[ 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.