Contract Source Code:
File 1 of 1 : PixelPainting.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; contract PixelPainting { address public constant FEE_RECIPIENT = 0x5255eF6956a77143D3F18978555c6cdCd4F2aA0A; uint256 public constant FIXED_FEE = 30000000000000; // 0.00003 ETH event PixelsPainted( address indexed user, bytes32 pixelsHash, uint256 timestamp, bytes32 transactionId ); function paintPixels(bytes32 pixelsHash) external payable { require(msg.value == FIXED_FEE, "Must send exactly 0.00003 ETH"); bytes32 transactionId = keccak256( abi.encodePacked( msg.sender, pixelsHash, block.timestamp, block.number ) ); emit PixelsPainted( msg.sender, pixelsHash, block.timestamp, transactionId ); } function withdrawFees() external { require(msg.sender == FEE_RECIPIENT, "Only fee recipient can withdraw"); uint256 balance = address(this).balance; require(balance > 0, "No fees to withdraw"); (bool success, ) = payable(FEE_RECIPIENT).call{value: balance}(""); require(success, "Withdrawal failed"); } }
Please enter a contract address above to load the contract details and source code.
Please DO NOT store any passwords or private keys here. A private note (up to 100 characters) can be saved and is useful for transaction tracking.
This website uses cookies to improve your experience. By continuing to use this website, you agree to its Terms and Privacy Policy.