Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Latest 25 internal transactions (View All)
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
4526218 | 17 hrs ago | 0 ETH | ||||
4526218 | 17 hrs ago | 0 ETH | ||||
4526218 | 17 hrs ago | 0 ETH | ||||
4525966 | 17 hrs ago | 0 ETH | ||||
4525966 | 17 hrs ago | Contract Creation | 0 ETH | |||
4525966 | 17 hrs ago | 0 ETH | ||||
4525966 | 17 hrs ago | 0 ETH | ||||
4525966 | 17 hrs ago | Contract Creation | 0 ETH | |||
4525966 | 17 hrs ago | 0 ETH | ||||
4525966 | 17 hrs ago | 0 ETH | ||||
4525966 | 17 hrs ago | Contract Creation | 0 ETH | |||
4525966 | 17 hrs ago | 0 ETH | ||||
4525966 | 17 hrs ago | 0 ETH | ||||
4525966 | 17 hrs ago | Contract Creation | 0 ETH | |||
4525966 | 17 hrs ago | 0 ETH | ||||
4525966 | 17 hrs ago | 0 ETH | ||||
4525966 | 17 hrs ago | Contract Creation | 0 ETH | |||
4525966 | 17 hrs ago | 0 ETH | ||||
4525966 | 17 hrs ago | 0 ETH | ||||
4525966 | 17 hrs ago | Contract Creation | 0 ETH | |||
4525966 | 17 hrs ago | 0 ETH | ||||
4525966 | 17 hrs ago | 0 ETH | ||||
4525966 | 17 hrs ago | Contract Creation | 0 ETH | |||
4525966 | 17 hrs ago | 0 ETH | ||||
4525966 | 17 hrs ago | 0 ETH |
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:
FabricContract
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; interface IChildContract { function mint(address to) external; function withdraw() external; function transferOwnership(address newOwner) external; } contract FabricContract { address[] public childContracts; address public owner; modifier onlyOwner() { require(msg.sender == owner, "Not the owner"); _; } event ChildContractDeployed(address indexed childAddress); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { owner = msg.sender; } function createChildContracts(uint256 count) external onlyOwner { for (uint256 i = 0; i < count; i++) { ChildContract child = new ChildContract(owner); childContracts.push(address(child)); emit ChildContractDeployed(address(child)); } } function mintThroughChildren(address to) external onlyOwner { for (uint256 i = 0; i < childContracts.length; i++) { IChildContract(childContracts[i]).mint(to); } } function getChildContracts() external view returns (address[] memory) { return childContracts; } function withdrawFromChildren() external onlyOwner { for (uint256 i = 0; i < childContracts.length; i++) { IChildContract(childContracts[i]).withdraw(); } } function transferOwnership(address newOwner) external onlyOwner { require(newOwner != address(0), "New owner is the zero address"); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } contract ChildContract is IChildContract { address public owner; uint256 public tokenId; mapping(uint256 => address) private tokenOwners; event Mint(address indexed to, uint256 tokenId); event Transfer(address indexed from, address indexed to, uint256 tokenId); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); modifier onlyOwner() { require(msg.sender == owner, "Not the owner"); _; } constructor(address _owner) { owner = _owner; tokenId = 0; } function mint(address to) external onlyOwner override { tokenId++; tokenOwners[tokenId] = to; emit Mint(to, tokenId); } function transfer(address to, uint256 _tokenId) external { require(tokenOwners[_tokenId] == msg.sender, "Not the token owner"); require(to != address(0), "Invalid recipient"); tokenOwners[_tokenId] = to; emit Transfer(msg.sender, to, _tokenId); } function ownerOf(uint256 _tokenId) external view returns (address) { return tokenOwners[_tokenId]; } function withdraw() external onlyOwner override { uint256 balance = address(this).balance; require(balance > 0, "No funds to withdraw"); // Используем `call` вместо `transfer` (bool success, ) = payable(owner).call{value: balance}(""); require(success, "Transfer failed"); } function transferOwnership(address newOwner) external onlyOwner override { require(newOwner != address(0), "New owner is the zero address"); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } // Функция для получения эфира на контракт receive() external payable {} }
{ "evmVersion": "paris", "optimizer": { "enabled": true, "mode": "3" }, "outputSelection": { "*": { "*": [ "abi", "metadata" ], "": [ "ast" ] } }, "detectMissingLibraries": false, "forceEVMLA": false, "enableEraVMExtensions": false, "libraries": {} }
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"childAddress","type":"address"}],"name":"ChildContractDeployed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"childContracts","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"count","type":"uint256"}],"name":"createChildContracts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getChildContracts","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mintThroughChildren","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawFromChildren","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
9c4d535b0000000000000000000000000000000000000000000000000000000000000000010000afc67cb47338120977ef92db6facbeb15de6f56d387e2be12421fb54b300000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x000200000000000200030000000000020000006003100270000000860330019700010000003103550000008004000039000000400040043f0000000100200190000000680000c13d000000040030008c000001140000413d000000000201043b000000e002200270000000890020009c000000760000a13d0000008a0020009c000000850000213d0000008d0020009c000000a40000613d0000008e0020009c000001140000c13d000000240030008c000001140000413d0000000002000416000000000002004b000001140000c13d0000000401100370000000000301043b0000000101000039000000000101041a00000092011001970000000002000411000000000012004b000001360000c13d000000000003004b000001340000613d0000000001000019000200000003001d000300000001001d000000400100043d0000009f0010009c000001250000213d0000000102000039000000000202041a0000002403100039000000a00400004100000000004304350000009202200197000000840310003900000000002304350000006402100039000000000300041400000020040000390000000000420435000000440210003900000060040000390000000000420435000000a102000041000000000021043500000004021000390000000000020435000000860010009c00000086010080410000004001100210000000860030009c0000008603008041000000c002300210000000000121019f000000a2011001c700008006020000390215020b0000040f0000000100200190000001aa0000613d000000000101043b000000000001004b000001af0000613d000000000200041a0000009e0020009c000001250000213d0000000103200039000000000030041b000000000000043f0000009205100197000000980120009a000000000201041a0000008702200197000000000252019f000000000021041b0000000001000414000000860010009c0000008601008041000000c00110021000000093011001c70000800d020000390000000203000039000000a3040000410215020b0000040f0000000100200190000001140000613d00000003010000290000000101100039000000020010006c000000260000413d000001340000013d0000000001000416000000000001004b000001140000c13d0000000101000039000000000201041a00000087022001970000000003000411000000000232019f000000000021041b0000002001000039000001000010044300000120000004430000008801000041000002160001042e0000008f0020009c000000bc0000613d000000900020009c000000c80000613d000000910020009c000001140000c13d0000000001000416000000000001004b000001140000c13d0000000101000039000000000101041a0000009201100197000000800010043f000000a501000041000002160001042e0000008b0020009c0000010b0000613d0000008c0020009c000001140000c13d000000240030008c000001140000413d0000000002000416000000000002004b000001140000c13d0000000401100370000000000101043b000000920010009c000001140000213d0000000102000039000000000302041a00000092023001970000000005000411000000000025004b000001360000c13d00000092061001980000015a0000c13d0000009501000041000000800010043f0000002001000039000000840010043f0000001d01000039000000a40010043f0000009601000041000000c40010043f00000097010000410000021700010430000000240030008c000001140000413d0000000002000416000000000002004b000001140000c13d0000000401100370000000000101043b000000000200041a000000000021004b000001140000813d021501fd0000040f0000000302200210000000000101041a000000000121022f0000009201100197000000ff0020008c0000000001002019000000400200043d0000000000120435000000860020009c00000086020080410000004001200210000000a4011001c7000002160001042e0000000001000416000000000001004b000001140000c13d0000002002000039000000000100041a000000800010043f000000000000043f000000000001004b000001160000c13d000000a0010000390000000004020019000001410000013d0000000001000416000000000001004b000001140000c13d0000000101000039000000000101041a00000092011001970000000002000411000000000012004b000001360000c13d000000000100041a000000000001004b000001340000613d0000000002000019000000000000043f000200000002001d000000980120009a000000000101041a000000990200004100000000002004430000009201100197000300000001001d00000004001004430000000001000414000000860010009c0000008601008041000000c0011002100000009a011001c70000800202000039021502100000040f0000000100200190000001a90000613d000000000101043b000000000001004b000001140000613d000000400400043d000000a701000041000000000014043500000000010004140000000302000029000000040020008c000001020000613d000000860040009c000000860300004100000000030440190000004003300210000000860010009c0000008601008041000000c001100210000000000131019f000000a8011001c7000300000004001d0215020b0000040f00000003040000290000006003100270000000860030019d00010000000103550000000100200190000001d10000613d0000009e0040009c000001250000213d000000400040043f00000002020000290000000102200039000000000100041a000000000012004b000000d50000413d000001340000013d000000240030008c000001140000413d0000000002000416000000000002004b000001140000c13d0000000401100370000000000101043b000000920010009c0000012b0000a13d00000000010000190000021700010430000000a005000039000000a90300004100000000040000190000000006050019000000000503041a0000009205500197000000000556043600000001033000390000000104400039000000000014004b000001190000413d000000410160008a000000ac04100197000000aa0040009c000001400000413d000000ab01000041000000000010043f0000004101000039000000040010043f0000009c0100004100000217000104300000000102000039000000000202041a00000092022001970000000003000411000000000023004b000001360000c13d000000000200041a000000000002004b0000016e0000c13d0000000001000019000002160001042e0000009501000041000000800010043f0000002001000039000000840010043f0000000d01000039000000a40010043f000000a601000041000000c40010043f000000970100004100000217000104300000008001400039000000400010043f0000000000210435000000a002400039000000800300043d0000000000320435000000c002400039000000000003004b000001510000613d000000a00400003900000000050000190000000046040434000000920660019700000000026204360000000105500039000000000035004b0000014b0000413d0000000002120049000000860020009c00000086020080410000006002200210000000860010009c00000086010080410000004001100210000000000112019f000002160001042e000300000003001d0000000001000414000000860010009c0000008601008041000000c00110021000000093011001c70000800d0200003900000003030000390000009404000041000200000006001d0215020b0000040f0000000100200190000001140000613d0000000301000029000000870110019700000002011001af0000000102000039000000000012041b0000000001000019000002160001042e000100920010019b0000000002000019000000000000043f000200000002001d000000980120009a000000000101041a000000990200004100000000002004430000009201100197000300000001001d00000004001004430000000001000414000000860010009c0000008601008041000000c0011002100000009a011001c70000800202000039021502100000040f0000000100200190000001a90000613d000000000101043b000000000001004b000001140000613d000000400400043d0000009b01000041000000000014043500000004014000390000000102000029000000000021043500000000010004140000000302000029000000040020008c000001a00000613d000000860040009c000000860300004100000000030440190000004003300210000000860010009c0000008601008041000000c001100210000000000131019f0000009c011001c7000300000004001d0215020b0000040f00000003040000290000006003100270000000860030019d00010000000103550000000100200190000001de0000613d0000009e0040009c000001250000213d000000400040043f00000002020000290000000102200039000000000100041a000000000012004b000001700000413d000001340000013d000000000001042f00010000000103550000006002100270000000860020019d0000008602200197000001b10000013d00000001010003670000000002000031000000ac052001980000001f0620018f000000400300043d0000000004530019000001bc0000613d000000000701034f0000000008030019000000007907043c0000000008980436000000000048004b000001b80000c13d000000000006004b000001c90000613d000000000151034f0000000305600210000000000604043300000000065601cf000000000656022f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f0000000000140435000000860020009c00000086020080410000006001200210000000860030009c00000086030080410000004002300210000000000112019f000002170001043000000086033001970000001f0530018f0000009d06300198000000400200043d0000000004620019000001ea0000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000001d90000c13d000001ea0000013d00000086033001970000001f0530018f0000009d06300198000000400200043d0000000004620019000001ea0000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000001e60000c13d000000000005004b000001f70000613d000000000161034f0000000305500210000000000604043300000000065601cf000000000656022f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000006001300210000000860020009c00000086020080410000004002200210000000000112019f0000021700010430000000000200041a000000000012004b000002040000a13d000000980110009a000000000000043f0000000002000019000000000001042d000000ab01000041000000000010043f0000003201000039000000040010043f0000009c010000410000021700010430000000000001042f0000020e002104210000000102000039000000000001042d0000000002000019000000000001042d00000213002104230000000102000039000000000001042d0000000002000019000000000001042d0000021500000432000002160001042e000002170001043000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000002000000000000000000000000000000400000010000000000000000000000000000000000000000000000000000000000000000000000000095bc992700000000000000000000000000000000000000000000000000000000eee531f700000000000000000000000000000000000000000000000000000000eee531f800000000000000000000000000000000000000000000000000000000f2fde38b0000000000000000000000000000000000000000000000000000000095bc992800000000000000000000000000000000000000000000000000000000e64f0e13000000000000000000000000000000000000000000000000000000000d567b9b00000000000000000000000000000000000000000000000000000000323a75ed000000000000000000000000000000000000000000000000000000008da5cb5b000000000000000000000000ffffffffffffffffffffffffffffffffffffffff02000000000000000000000000000000000000000000000000000000000000008be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e008c379a0000000000000000000000000000000000000000000000000000000004e6577206f776e657220697320746865207a65726f20616464726573730000000000000000000000000000000000000000000064000000800000000000000000d6f21326ab749d5729fcba5677c79037b459436ab7bff709c9d06ce9f10c1a9d1806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b8302000002000000000000000000000000000000240000000000000000000000006a62784200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffe0000000000000000000000000000000000000000000000000ffffffffffffffff000000000000000000000000000000000000000000000000ffffffffffffff7b0100009d86dfa3e9bf43316ca1779b6a34d4095cd4e942bae7fb69e289864eb99c4d535bdea7cd8a978f128b93471df48c7dbab89d703809115bdc118c235bfd02000000000000000000000000000000000000a4000000000000000000000000d383bbde99bc6efa0a60481c2112cf459c97914f835794b8d7e2d54bc9de067f000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000200000008000000000000000004e6f7420746865206f776e6572000000000000000000000000000000000000003ccfd60b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563000000000000000000000000000000000000000000000000ffffffffffffff804e487b7100000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe000000000000000000000000000000000000000000000000000000000000000002e86f27ef69d3055bea296e89738e05502e19b38a350495a97842677ff465f84
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.