Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Paint Pixels | 5717529 | 2 days ago | IN | 0 ETH | 0.00000211 |
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Source Code Verified (Exact Match)
Contract Name:
PixelPainting
Compiler Version
v0.8.24+commit.e11b9ed9
ZkSolc Version
v1.5.7
Optimization Enabled:
Yes with Mode 3
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// 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 per pixel event PixelsPainted( address indexed user, bytes32 pixelsHash, uint256 timestamp, bytes32 transactionId ); function paintPixels(bytes32 pixelsHash) external payable { // If sender is fee recipient, no payment required if (msg.sender != FEE_RECIPIENT) { require(msg.value == FIXED_FEE, "Must send exactly 0.00003 ETH per pixel"); } 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"); } }
{ "evmVersion": "paris", "optimizer": { "enabled": true, "mode": "3" }, "outputSelection": { "*": { "*": [ "abi", "metadata" ], "": [ "ast" ] } }, "detectMissingLibraries": false, "forceEVMLA": false, "enableEraVMExtensions": false, "libraries": {} }
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"bytes32","name":"pixelsHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"transactionId","type":"bytes32"}],"name":"PixelsPainted","type":"event"},{"inputs":[],"name":"FEE_RECIPIENT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FIXED_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"pixelsHash","type":"bytes32"}],"name":"paintPixels","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"withdrawFees","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
9c4d535b00000000000000000000000000000000000000000000000000000000000000000100006771393673bdc24de78070f7aaaf4afd587496236b1283fe19b4ab7f9600000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x00020000000000020000008003000039000000400030043f00000001002001900000002e0000c13d00000060021002700000004302200197000000040020008c0000004a0000413d000000000301043b000000e003300270000000450030009c000000360000213d000000480030009c000000410000613d000000490030009c0000004a0000c13d0000000001000416000000000001004b0000004a0000c13d00000000010004110000004a0010009c0000009b0000c13d00000059010000410000000000100443000000000100041000000004001004430000000001000414000000430010009c0000004301008041000000c0011002100000005a011001c70000800a02000039010801030000040f00000001002001900000009a0000613d000000000301043b000000000003004b000000b10000c13d000000400100043d00000044021000390000006403000041000000000032043500000024021000390000001303000039000000ec0000013d0000000001000416000000000001004b0000004a0000c13d0000002001000039000001000010044300000120000004430000004401000041000001090001042e000000460030009c000000480000613d000000470030009c0000004a0000c13d0000000001000416000000000001004b0000004a0000c13d0000004a01000041000000800010043f0000004b01000041000001090001042e0000000001000416000000000001004b0000004a0000c13d0000004c01000041000000800010043f0000004b01000041000001090001042e000000240020008c0000004c0000813d00000000010000190000010a000104300000000401100370000000000301043b00000000020004110000004a0020009c000000540000613d00000000010004160000004c0010009c000000a50000c13d0000006001200210000000a00010043f000200000003001d000000b40030043f000000510100004100000000001004430000000001000414000000430010009c0000004301008041000000c00110021000000052011001c70000800b02000039010801030000040f00000001002001900000009a0000613d000000000101043b000100000001001d000000d40010043f000000530100004100000000001004430000000001000414000000430010009c0000004301008041000000c00110021000000052011001c70000800b02000039010801030000040f00000001002001900000009a0000613d000000000101043b000000f40010043f0000007401000039000000800010043f0000012001000039000000400010043f0000000001000414000000430010009c0000004301008041000000c00110021000000054011001c70000801002000039010801030000040f00000001002001900000004a0000613d000000000101043b000000400200043d0000004003200039000000000013043500000020012000390000000103000029000000000031043500000002010000290000000000120435000000430020009c000000430200804100000040012002100000000002000414000000430020009c0000004302008041000000c002200210000000000112019f00000055011001c70000800d02000039000000020300003900000056040000410000000005000411010800fe0000040f00000001002001900000004a0000613d000000e40000013d000000000001042f0000004d01000041000000800010043f0000002001000039000000840010043f0000001f01000039000000a40010043f0000005701000041000000c40010043f00000058010000410000010a000104300000004d01000041000000800010043f0000002001000039000000840010043f0000002701000039000000a40010043f0000004e01000041000000c40010043f0000004f01000041000000e40010043f00000050010000410000010a000104300000000001000414000000430010009c0000004301008041000000c0011002100000005b011001c700008009020000390000004a040000410000000005000019010800fe0000040f00000060031002700000004303300198000000e20000613d0000001f043000390000005c044001970000003f044000390000005d04400197000000400500043d0000000004450019000000000054004b000000000600003900000001060040390000005e0040009c000000f70000213d0000000100600190000000f70000c13d000000400040043f0000001f0430018f00000000063504360000005f053001980000000003560019000000d50000613d000000000701034f000000007807043c0000000006860436000000000036004b000000d10000c13d000000000004004b000000e20000613d000000000151034f0000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f00000000001304350000000100200190000000e60000613d0000000001000019000001090001042e000000400100043d0000004402100039000000620300004100000000003204350000002402100039000000110300003900000000003204350000004d020000410000000000210435000000040210003900000020030000390000000000320435000000430010009c0000004301008041000000400110021000000063011001c70000010a000104300000006001000041000000000010043f0000004101000039000000040010043f00000061010000410000010a00010430000000000001042f00000101002104210000000102000039000000000001042d0000000002000019000000000001042d00000106002104230000000102000039000000000001042d0000000002000019000000000001042d0000010800000432000001090001042e0000010a00010430000000000000000000000000000000000000000000000000000000000000000000000000ffffffff000000020000000000000000000000000000004000000100000000000000000000000000000000000000000000000000000000000000000000000000c970127d00000000000000000000000000000000000000000000000000000000c970127e00000000000000000000000000000000000000000000000000000000ebd090540000000000000000000000000000000000000000000000000000000023d1b06c00000000000000000000000000000000000000000000000000000000476343ee0000000000000000000000005255ef6956a77143d3f18978555c6cdcd4f2aa0a000000000000000000000000000000000000002000000080000000000000000000000000000000000000000000000000000000000000000000001b48eb57e00008c379a0000000000000000000000000000000000000000000000000000000004d7573742073656e642065786163746c7920302e3030303033204554482070657220706978656c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084000000800000000000000000796b89b91644bc98cd93958e4c9038275d622183e25ac5af08cc6b5d95539132020000020000000000000000000000000000000400000000000000000000000042cbb15ccdc3cad6266b0e7a08c0454b23bf29dc2df74b6f3c209e9336465bd10200000000000000000000000000000000000074000000a000000000000000000200000000000000000000000000000000000060000000000000000000000000f8cc0e0e04d3f7839c9b20b27090f01fda591ebd44d4c0b470a01e0ffcb0464e4f6e6c792066656520726563697069656e742063616e2077697468647261770000000000000000000000000000000000000000640000008000000000000000009cc7f708afc65944829bd487b90b72536b1951864fbfc14e125fc972a6507f390200000200000000000000000000000000000024000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001ffffffe000000000000000000000000000000000000000000000000000000003ffffffe0000000000000000000000000000000000000000000000000ffffffffffffffff00000000000000000000000000000000000000000000000000000000ffffffe04e487b710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000000000000000000000005769746864726177616c206661696c656400000000000000000000000000000000000000000000000000000000000000000000640000000000000000000000004e6f206665657320746f207769746864726177000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c7bdb828152b84220e0f3b9d231c1d7654e4deff3b4552f891a5dc1dde9fcc8e
Loading...
Loading
Loading...
Loading
[ 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.