Cryo Explorer Ethereum Mainnet

Address Contract Verified

Address 0xB4Ea05f133b2562866A800475eDc7dB57950E0d3
Balance 0 ETH
Nonce 1
Code Size 2554 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

2554 bytes
0x6080604052600436106100435760003560e01c8063715018a61461004f5780638da5cb5b14610066578063d3db60e014610091578063f2fde38b146100ad5761004a565b3661004a57005b600080fd5b34801561005b57600080fd5b506100646100d6565b005b34801561007257600080fd5b5061007b6100ea565b60405161008891906105cb565b60405180910390f35b6100ab60048036038101906100a69190610789565b610113565b005b3480156100b957600080fd5b506100d460048036038101906100cf91906107fe565b610362565b005b6100de6103e8565b6100e8600061046f565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61011b610533565b600081511161015f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015690610888565b60405180910390fd5b600081513461016e9190610906565b90506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600034476101a59190610937565b905060005b845181101561024c5760008582815181106101c8576101c761096b565b5b602002602001015190508373ffffffffffffffffffffffffffffffffffffffff1663091dbfd286836040518363ffffffff1660e01b815260040161020c91906109a9565b6000604051808303818588803b15801561022557600080fd5b505af1158015610239573d6000803e3d6000fd5b50505050505080806001019150506101aa565b5060005b84518110156102f157600085828151811061026e5761026d61096b565b5b602002602001015190508373ffffffffffffffffffffffffffffffffffffffff1663979bc638826040518263ffffffff1660e01b81526004016102b191906109a9565b600060405180830381600087803b1580156102cb57600080fd5b505af11580156102df573d6000803e3d6000fd5b50505050508080600101915050610250565b50600081476103009190610937565b90506000811115610353573373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610351573d6000803e3d6000fd5b505b5050505061035f610579565b50565b61036a6103e8565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036103dc5760006040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016103d391906105cb565b60405180910390fd5b6103e58161046f565b50565b6103f0610582565b73ffffffffffffffffffffffffffffffffffffffff1661040e6100ea565b73ffffffffffffffffffffffffffffffffffffffff161461046d57610431610582565b6040517f118cdaa700000000000000000000000000000000000000000000000000000000815260040161046491906105cb565b60405180910390fd5b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60026001540361056f576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600181905550565b60018081905550565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006105b58261058a565b9050919050565b6105c5816105aa565b82525050565b60006020820190506105e060008301846105bc565b92915050565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610648826105ff565b810181811067ffffffffffffffff8211171561066757610666610610565b5b80604052505050565b600061067a6105e6565b9050610686828261063f565b919050565b600067ffffffffffffffff8211156106a6576106a5610610565b5b602082029050602081019050919050565b600080fd5b6000819050919050565b6106cf816106bc565b81146106da57600080fd5b50565b6000813590506106ec816106c6565b92915050565b60006107056107008461068b565b610670565b90508083825260208201905060208402830185811115610728576107276106b7565b5b835b81811015610751578061073d88826106dd565b84526020840193505060208101905061072a565b5050509392505050565b600082601f8301126107705761076f6105fa565b5b81356107808482602086016106f2565b91505092915050565b60006020828403121561079f5761079e6105f0565b5b600082013567ffffffffffffffff8111156107bd576107bc6105f5565b5b6107c98482850161075b565b91505092915050565b6107db816105aa565b81146107e657600080fd5b50565b6000813590506107f8816107d2565b92915050565b600060208284031215610814576108136105f0565b5b6000610822848285016107e9565b91505092915050565b600082825260208201905092915050565b7f4e6f2070756e6b732070726f7669646564000000000000000000000000000000600082015250565b600061087260118361082b565b915061087d8261083c565b602082019050919050565b600060208201905081810360008301526108a181610865565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610911826106bc565b915061091c836106bc565b92508261092c5761092b6108a8565b5b828204905092915050565b6000610942826106bc565b915061094d836106bc565b9250828203905081811115610965576109646108d7565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6109a3816106bc565b82525050565b60006020820190506109be600083018461099a565b9291505056fea264697066735822122029355061bb983086c91765dda48fc2f1badce0c4ae989f41cecd8f139d4e8a7364736f6c634300081c0033

Verified Source Code Full Match

Compiler: v0.8.28+commit.7893614a EVM: paris Optimization: No
Ownable.sol 100 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * The initial owner is set to the address provided by the deployer. This can
 * later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}
IERC721.sol 135 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC-721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon
     *   a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC-721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or
     *   {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon
     *   a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC-721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the address zero.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}
Context.sol 28 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (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;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}
IERC165.sol 25 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[ERC].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
ReentrancyGuard.sol 87 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at,
 * consider using {ReentrancyGuardTransient} instead.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant NOT_ENTERED = 1;
    uint256 private constant ENTERED = 2;

    uint256 private _status;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    constructor() {
        _status = NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

        // Any calls to nonReentrant after this point will fail
        _status = ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = NOT_ENTERED;
    }

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == ENTERED;
    }
}
BulkCancelPunkBids.sol 41 lines
//
// https://cryptopunks.eth.limo/
//
pragma solidity ^0.8.20;

import "./interfaces/IPunksToken.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";

contract BulkCancelPunkBids is Ownable, ReentrancyGuard {
    
    address erc721contract = 0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB;
    
    constructor(address initialOwner) Ownable(initialOwner) {
    }

    receive() external payable {}

    function bidAndCancel(uint[] memory punksIndex) public payable nonReentrant {
        require(punksIndex.length > 0, "No punks provided");
        uint amountPerPunk = msg.value / punksIndex.length;

        IPunksToken punk = IPunksToken(erc721contract);
        uint initialBalance = address(this).balance - msg.value;

        for (uint i = 0; i < punksIndex.length; i++) {
            uint punkIndex = punksIndex[i];
            punk.enterBidForPunk{value: amountPerPunk}(punkIndex);
        }

        for (uint i = 0; i < punksIndex.length; i++) {
            uint punkIndex = punksIndex[i];
            punk.withdrawBidForPunk(punkIndex);
        }

        uint amountReceived = address(this).balance - initialBalance;
        if (amountReceived > 0) {
            payable(msg.sender).transfer(amountReceived);
        }
    }
}
IPunksToken.sol 15 lines
// SPDX-License-Identifier: GPL-3.0
/********************************
 *     built by tat2bu.eth      *
 *******************************/

pragma solidity ^0.8.20;

import { IERC721 } from '@openzeppelin/contracts/token/ERC721/IERC721.sol';

interface IPunksToken {

    function enterBidForPunk(uint punkIndex) payable external;
    function withdrawBidForPunk(uint punkIndex) external;

}

Read Contract

owner 0x8da5cb5b → address

Write Contract 3 functions

These functions modify contract state and require a wallet transaction to execute.

bidAndCancel 0xd3db60e0
uint256[] punksIndex
renounceOwnership 0x715018a6
No parameters
transferOwnership 0xf2fde38b
address newOwner

Recent Transactions

No transactions found for this address