ETH Price: $3,265.53 (+0.55%)
Gas: 3 Gwei

Contract

0x1bee35414De2691454bd7090DB64ececFB65581f
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60806040169352322023-03-29 20:12:35485 days ago1680120755IN
 Create: BeaconProxy
0 ETH0.0089599265

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BeaconProxy

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 3 : BeaconProxy.sol
// SPDX-License-Identifier: BUSL-1.1

/**
 *  █████╗ ███████╗████████╗ █████╗ ██████╗ ██╗ █████╗
 * ██╔══██╗██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██║██╔══██╗
 * ███████║███████╗   ██║   ███████║██████╔╝██║███████║
 * ██╔══██║╚════██║   ██║   ██╔══██║██╔══██╗██║██╔══██║
 * ██║  ██║███████║   ██║   ██║  ██║██║  ██║██║██║  ██║
 * ╚═╝  ╚═╝╚══════╝   ╚═╝   ╚═╝  ╚═╝╚═╝  ╚═╝╚═╝╚═╝  ╚═╝
 *
 * Astaria Labs, Inc
 */

pragma solidity =0.8.17;

import {IBeacon} from "core/interfaces/IBeacon.sol";
import {Clone} from "create2-clones-with-immutable-args/Clone.sol";

contract BeaconProxy is Clone {
  function _getBeacon() internal pure returns (IBeacon) {
    return IBeacon(_getArgAddress(0));
  }

  /**
   * @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 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 {
    _beforeFallback();

    _delegate(_getBeacon().getImpl(_getArgUint8(20)));
  }

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

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

  /**
   * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`
   * call, or as part of the Solidity `fallback` or `receive` functions.
   *
   * If overridden should call `super._beforeFallback()`.
   */
  function _beforeFallback() internal virtual {}
}

File 2 of 3 : Clone.sol
// SPDX-License-Identifier: BSD
pragma solidity ^0.8.4;

/// @title Clone
/// @author zefram.eth
/// @notice Provides helper functions for reading immutable args from calldata
contract Clone {
    /// @notice Reads an immutable arg with type address
    /// @param argOffset The offset of the arg in the packed data
    /// @return arg The arg value
    function _getArgAddress(uint256 argOffset) internal pure returns (address arg) {
        uint256 offset = _getImmutableArgsOffset();
        // solhint-disable-next-line no-inline-assembly
        assembly {
            arg := shr(0x60, calldataload(add(offset, argOffset)))
        }
    }

    /// @notice Reads an immutable arg with type uint256
    /// @param argOffset The offset of the arg in the packed data
    /// @return arg The arg value
    function _getArgUint256(uint256 argOffset) internal pure returns (uint256 arg) {
        uint256 offset = _getImmutableArgsOffset();
        // solhint-disable-next-line no-inline-assembly
        assembly {
            arg := calldataload(add(offset, argOffset))
        }
    }

    /// @notice Reads a uint256 array stored in the immutable args.
    /// @param argOffset The offset of the arg in the packed data
    /// @param arrLen Number of elements in the array
    /// @return arr The array
    function _getArgUint256Array(uint256 argOffset, uint64 arrLen) internal pure returns (uint256[] memory arr) {
        uint256 offset = _getImmutableArgsOffset();
        uint256 el;
        arr = new uint256[](arrLen);
        for (uint64 i = 0; i < arrLen; i++) {
            assembly {
                // solhint-disable-next-line no-inline-assembly
                el := calldataload(add(add(offset, argOffset), mul(i, 32)))
            }
            arr[i] = el;
        }
        return arr;
    }

    /// @notice Reads an immutable arg with type uint64
    /// @param argOffset The offset of the arg in the packed data
    /// @return arg The arg value
    function _getArgUint64(uint256 argOffset) internal pure returns (uint64 arg) {
        uint256 offset = _getImmutableArgsOffset();
        // solhint-disable-next-line no-inline-assembly
        assembly {
            arg := shr(0xc0, calldataload(add(offset, argOffset)))
        }
    }

    /// @notice Reads an immutable arg with type uint8
    /// @param argOffset The offset of the arg in the packed data
    /// @return arg The arg value
    function _getArgUint8(uint256 argOffset) internal pure returns (uint8 arg) {
        uint256 offset = _getImmutableArgsOffset();
        // solhint-disable-next-line no-inline-assembly
        assembly {
            arg := shr(0xf8, calldataload(add(offset, argOffset)))
        }
    }

    /// @return offset The offset of the packed immutable args in calldata
    function _getImmutableArgsOffset() internal pure returns (uint256 offset) {
        // solhint-disable-next-line no-inline-assembly
        assembly {
            offset := sub(calldatasize(), add(shr(240, calldataload(sub(calldatasize(), 2))), 2))
        }
    }
}

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

/**
 *  █████╗ ███████╗████████╗ █████╗ ██████╗ ██╗ █████╗
 * ██╔══██╗██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██║██╔══██╗
 * ███████║███████╗   ██║   ███████║██████╔╝██║███████║
 * ██╔══██║╚════██║   ██║   ██╔══██║██╔══██╗██║██╔══██║
 * ██║  ██║███████║   ██║   ██║  ██║██║  ██║██║██║  ██║
 * ╚═╝  ╚═╝╚══════╝   ╚═╝   ╚═╝  ╚═╝╚═╝  ╚═╝╚═╝╚═╝  ╚═╝
 *
 * Astaria Labs, Inc
 */

pragma solidity =0.8.17;

interface IBeacon {
  /**
   * @dev Must return an address that can be used as a delegate call target.
   *
   * {BeaconProxy} will check that this address is a contract.
   */
  function getImpl(uint8) external view returns (address);
}

Settings
{
  "remappings": [
    "@rari-capital/=lib/seaport/node_modules/@rari-capital/",
    "@rari-capital/solmate/=lib/seaport/./lib/solmate/",
    "auction/=lib/gpl/lib/auction-house/src/",
    "clones-with-immutable-args/=lib/clones-with-immutable-args/src/",
    "contracts/=lib/seaport/contracts/",
    "core/=src/",
    "create2-clones-with-immutable-args/=lib/create2-clones-with-immutable-args/src/",
    "create2-helpers/=lib/create2-clones-with-immutable-args/lib/create2-helpers/src/",
    "ds-test/=lib/ds-test/src/",
    "eip4626/=lib/foundry_eip-4626/src/",
    "erc4626-tests/=lib/seaport/lib/openzeppelin-contracts/lib/erc4626-tests/",
    "eth-gas-reporter/=lib/seaport/node_modules/eth-gas-reporter/",
    "forge-std/=lib/forge-std/src/",
    "gpl/=lib/gpl/src/",
    "hardhat/=lib/seaport/node_modules/hardhat/",
    "murky/=lib/seaport/./lib/murky/src/",
    "openzeppelin-contracts/=lib/seaport/lib/openzeppelin-contracts/",
    "openzeppelin/=lib/gpl/lib/openzeppelin-contracts/contracts/",
    "seaport/=lib/seaport/contracts/",
    "solmate/=lib/solmate/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"stateMutability":"payable","type":"fallback"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b50610188806100206000396000f3fe60806040523661001357610011610017565b005b6100115b6100a16100226100a3565b6001600160a01b0316630472a61d61003a60146100b4565b6040516001600160e01b031960e084901b16815260ff9091166004820152602401602060405180830381865afa158015610078573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061009c9190610122565b6100d9565b565b60006100af60006100fd565b905090565b6000806100cb600119368181013560f01c90030190565b929092013560f81c92915050565b3660008037600080366000845af43d6000803e8080156100f8573d6000f35b3d6000fd5b600080610114600119368181013560f01c90030190565b929092013560601c92915050565b60006020828403121561013457600080fd5b81516001600160a01b038116811461014b57600080fd5b939250505056fea2646970667358221220d41e8db76d5c4f2ea1b0f99ea6a2d4c16f5d854f80d4768c81e9086fccb9e5f264736f6c63430008110033

Deployed Bytecode

0x60806040523661001357610011610017565b005b6100115b6100a16100226100a3565b6001600160a01b0316630472a61d61003a60146100b4565b6040516001600160e01b031960e084901b16815260ff9091166004820152602401602060405180830381865afa158015610078573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061009c9190610122565b6100d9565b565b60006100af60006100fd565b905090565b6000806100cb600119368181013560f01c90030190565b929092013560f81c92915050565b3660008037600080366000845af43d6000803e8080156100f8573d6000f35b3d6000fd5b600080610114600119368181013560f01c90030190565b929092013560601c92915050565b60006020828403121561013457600080fd5b81516001600160a01b038116811461014b57600080fd5b939250505056fea2646970667358221220d41e8db76d5c4f2ea1b0f99ea6a2d4c16f5d854f80d4768c81e9086fccb9e5f264736f6c63430008110033

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  ]

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.