Skip to content
Verified contractPartialMIT

BoredMen

Address0x5ad31ceebb606aee85a18a4ea3f1ea0c4a58a572
Balance

0 ETH

 

Transactions

20

 

Compiler

solc 0.8.18

 

Same code

Only this contract

 

Details

Compiler
solc 0.8.18+commit.87f61d96
Language
solidity
Optimization
Yes, 1,000 runs
License
MIT
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
17,518,593
Creation transaction
0xb5474796fe…10c0849e79
Proxy implementation
0xc1e97d3f…59481700HeyMintERC721AReference

66 files

The source code is large: one file is shown at a time. Choose a file in the list.

contracts/BoredMen.sol

// SPDX-License-Identifier: MIT
pragma solidity 0.8.18;






// 
// ██████╗  ██████╗ ██████╗ ███████╗██████╗     ███╗   ███╗███████╗███╗   ██╗
// ██╔══██╗██╔═══██╗██╔══██╗██╔════╝██╔══██╗    ████╗ ████║██╔════╝████╗  ██║
// ██████╔╝██║   ██║██████╔╝█████╗  ██║  ██║    ██╔████╔██║█████╗  ██╔██╗ ██║
// ██╔══██╗██║   ██║██╔══██╗██╔══╝  ██║  ██║    ██║╚██╔╝██║██╔══╝  ██║╚██╗██║
// ██████╔╝╚██████╔╝██║  ██║███████╗██████╔╝    ██║ ╚═╝ ██║███████╗██║ ╚████║
// ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝     ╚═╝     ╚═╝╚══════╝╚═╝  ╚═══╝
//                                                                           
// Bored Men - generated with HeyMint.xyz Launchpad - https://nft-launchpad.heymint.xyz
// 








import {StorageSlot} from "@openzeppelin/contracts/utils/StorageSlot.sol";
import {IAddressRelay} from "./interfaces/IAddressRelay.sol";
import {BaseConfig} from "./libraries/HeyMintStorage.sol";

contract BoredMen {
    bytes32 internal constant _IMPLEMENTATION_SLOT =
        0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
    bytes32 internal constant _ADDRESS_RELAY_SLOT =
        keccak256("heymint.launchpad.addressRelay");

    /**
     * @notice Initializes the child contract with the base implementation address and the configuration settings
     * @param _name The name of the NFT
     * @param _symbol The symbol of the NFT
     * @param _baseConfig Base configuration settings
     */
    constructor(
        string memory _name,
        string memory _symbol,
        address _addressRelay,
        address _implementation,
        BaseConfig memory _baseConfig
    ) {
        StorageSlot
            .getAddressSlot(_IMPLEMENTATION_SLOT)
            .value = _implementation;
        StorageSlot.getAddressSlot(_ADDRESS_RELAY_SLOT).value = _addressRelay;
        IAddressRelay addressRelay = IAddressRelay(
            StorageSlot.getAddressSlot(_ADDRESS_RELAY_SLOT).value
        );
        address implContract = addressRelay.fallbackImplAddress();
        (bool success, ) = implContract.delegatecall(
            abi.encodeWithSelector(0x35a825b0, _name, _symbol, _baseConfig)
        );
        require(success);
    }

    /**
     * @dev Delegates the current call to nftImplementation
     *
     * This function does not return to its internal call site - it will return directly to the external caller.
     */
    fallback() external payable {
        IAddressRelay addressRelay = IAddressRelay(
            StorageSlot.getAddressSlot(_ADDRESS_RELAY_SLOT).value
        );
        address implContract = addressRelay.getImplAddress(msg.sig);

        assembly {
            calldatacopy(0, 0, calldatasize())
            let result := delegatecall(
                gas(),
                implContract,
                0,
                calldatasize(),
                0,
                0
            )
            returndatacopy(0, 0, returndatasize())
            switch result
            case 0 {
                revert(0, returndatasize())
            }
            default {
                return(0, returndatasize())
            }
        }
    }

    receive() external payable {}
}
Compiler settingsShow
{
  "optimizer": {
    "runs": 1000,
    "enabled": true
  }
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.