Source Code
Overview
ETH Balance
0.1 ETH
Token Holdings
More Info
ContractCreator
Multichain Info
N/A
Latest 5 from a total of 5 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Mint From Childr... | 4533680 | 14 hrs ago | IN | 0 ETH | 0.00000211 | ||||
Mint From Childr... | 4533536 | 14 hrs ago | IN | 0.015 ETH | 0.00000238 | ||||
Mint From Childr... | 4531180 | 15 hrs ago | IN | 0.05 ETH | 0.00000256 | ||||
Transfer | 4530959 | 15 hrs ago | IN | 0.1 ETH | 0.00000247 | ||||
Create Child Con... | 4530883 | 15 hrs ago | IN | 0 ETH | 0.00002137 |
Latest 25 internal transactions (View All)
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
4533680 | 14 hrs ago | 0 ETH | ||||
4533536 | 14 hrs ago | 0.015 ETH | ||||
4531180 | 15 hrs ago | 0 ETH | ||||
4531180 | 15 hrs ago | 0.005 ETH | ||||
4531180 | 15 hrs ago | 0 ETH | ||||
4531180 | 15 hrs ago | 0 ETH | ||||
4531180 | 15 hrs ago | 0.05 ETH | ||||
4530959 | 15 hrs ago | 0.1 ETH | ||||
4530883 | 15 hrs ago | 0 ETH | ||||
4530883 | 15 hrs ago | Contract Creation | 0 ETH | |||
4530883 | 15 hrs ago | 0 ETH | ||||
4530883 | 15 hrs ago | 0 ETH | ||||
4530883 | 15 hrs ago | Contract Creation | 0 ETH | |||
4530883 | 15 hrs ago | 0 ETH | ||||
4530883 | 15 hrs ago | 0 ETH | ||||
4530883 | 15 hrs ago | Contract Creation | 0 ETH | |||
4530883 | 15 hrs ago | 0 ETH | ||||
4530883 | 15 hrs ago | 0 ETH | ||||
4530883 | 15 hrs ago | Contract Creation | 0 ETH | |||
4530883 | 15 hrs ago | 0 ETH | ||||
4530883 | 15 hrs ago | 0 ETH | ||||
4530883 | 15 hrs ago | Contract Creation | 0 ETH | |||
4530883 | 15 hrs ago | 0 ETH | ||||
4530883 | 15 hrs ago | 0 ETH | ||||
4530883 | 15 hrs ago | Contract Creation | 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; } interface ITargetContract { function mint(uint256 payableAmount, uint256 tokens) external payable; } 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); event FundsWithdrawn(address indexed to, uint256 amount); 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 mintFromChildren(address targetContract, uint256 mintCost) external onlyOwner payable { require(address(this).balance >= mintCost * childContracts.length, "Insufficient funds in FabricContract"); uint256 childMintCost = mintCost; for (uint256 i = 0; i < childContracts.length; i++) { address child = childContracts[i]; // Отправляем средства на дочерний контракт (bool sent, ) = payable(child).call{value: childMintCost}(""); require(sent, "Failed to send funds to child contract"); // Вызываем функцию mint на целевом контракте от имени дочернего контракта (bool success, ) = child.call( abi.encodeWithSignature("mint(address)", targetContract) ); require(success, "Mint failed for one of the child contracts"); // Возвращаем остаток средств на FabricContract IChildContract(child).withdraw(); } } function getChildContracts() external view returns (address[] memory) { return childContracts; } function withdrawFunds() external onlyOwner { uint256 balance = address(this).balance; require(balance > 0, "No funds to withdraw"); (bool success, ) = payable(owner).call{value: balance}(""); require(success, "Withdraw failed"); emit FundsWithdrawn(owner, balance); } // Функция для получения эфира на контракт receive() external payable {} } 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"); (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":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"FundsWithdrawn","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":"targetContract","type":"address"},{"internalType":"uint256","name":"mintCost","type":"uint256"}],"name":"mintFromChildren","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
9c4d535b0000000000000000000000000000000000000000000000000000000000000000010000fbc8afc76fb2fb5e2648c3b3dcd2990165215a3677aa547a1213429c6100000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x000200000000000200040000000000020000006003100270000000c70330019700010000003103550000008004000039000000400040043f0000000100200190000000510000c13d000000040030008c0000005f0000413d000000000201043b000000e002200270000000ca0020009c000000630000213d000000ce0020009c000000bc0000613d000000cf0020009c000000c80000613d000000d00020009c000001c30000c13d000000440030008c000001c30000413d0000000402100370000000000402043b000000d10040009c000001c30000213d0000002401100370000000000301043b0000000101000039000000000101041a000000d1011001970000000002000411000000000012004b000001130000c13d000400000004001d000100000003001d000000dc010000410000000000100443000000000100041000000004001004430000000001000414000000c70010009c000000c701008041000000c001100210000000dd011001c70000800a02000039031903140000040f0000000100200190000002910000613d000000000200041a000000010400002900000000034200a9000000000101043b000000000004004b0000003b0000613d00000000044300d9000000000042004b000002b90000c13d000000000031004b000001c50000813d000000400100043d0000006402100039000000ec0300004100000000003204350000004402100039000000ed030000410000000000320435000000240210003900000024030000390000000000320435000000e0020000410000000000210435000000040210003900000020030000390000000000320435000000c70010009c000000c7010080410000004001100210000000e3011001c70000031b000104300000000001000416000000000001004b000001c30000c13d0000000101000039000000000201041a000000c8022001970000000003000411000000000232019f000000000021041b000000200100003900000100001004430000012000000443000000c9010000410000031a0001042e000000000003004b000001c30000c13d00000000010000190000031a0001042e000000cb0020009c000000f20000613d000000cc0020009c000000fb0000613d000000cd0020009c000001c30000c13d000000240030008c000001c30000413d0000000002000416000000000002004b000001c30000c13d0000000401100370000000000301043b0000000101000039000000000101041a000000d1011001970000000002000411000000000012004b000001130000c13d000000000003004b000000610000613d000400000000001d000300000003001d000000400100043d000000d20010009c0000012c0000213d0000000102000039000000000202041a0000002403100039000000d3040000410000000000430435000000d102200197000000840310003900000000002304350000006402100039000000000300041400000020040000390000000000420435000000440210003900000060040000390000000000420435000000d402000041000000000021043500000004021000390000000000020435000000c70010009c000000c7010080410000004001100210000000c70030009c000000c703008041000000c002300210000000000121019f000000d5011001c700008006020000390319030f0000040f0000000100200190000002920000613d000000000101043b000000000001004b000002970000613d000000000200041a000000d60020009c0000012c0000213d0000000103200039000000000030041b000000000000043f000000d105100197000000d70120009a000000000201041a000000c802200197000000000252019f000000000021041b0000000001000414000000c70010009c000000c701008041000000c001100210000000d8011001c70000800d020000390000000203000039000000d9040000410319030f0000040f00000001002001900000000303000029000001c30000613d0000000401000029000400010010003d000000040030006b0000007a0000413d000000610000013d0000000001000416000000000001004b000001c30000c13d0000002002000039000000000100041a000000800010043f000000000000043f000000000001004b0000011d0000c13d000000a0010000390000000004020019000001330000013d0000000001000416000000000001004b000001c30000c13d0000000101000039000000000101041a000000d1011001970000000002000411000000000012004b000001130000c13d000000dc010000410000000000100443000000000100041000000004001004430000000001000414000000c70010009c000000c701008041000000c001100210000000dd011001c70000800a02000039031903140000040f0000000100200190000002910000613d000000000901043b000000000009004b0000014c0000c13d000000400100043d0000004402100039000000f6030000410000000000320435000000240210003900000014030000390000000000320435000000e0020000410000000000210435000000040210003900000020030000390000000000320435000000c70010009c000000c7010080410000004001100210000000f3011001c70000031b000104300000000001000416000000000001004b000001c30000c13d0000000101000039000000000101041a000000d101100197000000800010043f000000db010000410000031a0001042e000000240030008c000001c30000413d0000000002000416000000000002004b000001c30000c13d0000000401100370000000000101043b000000000200041a000000000021004b000001c30000813d031903010000040f0000000302200210000000000101041a000000000121022f000000d101100197000000ff0020008c0000000001002019000000400200043d0000000000120435000000c70020009c000000c7020080410000004001200210000000da011001c70000031a0001042e000000e001000041000000800010043f0000002001000039000000840010043f0000000d01000039000000a40010043f000000ee01000041000000c40010043f000000ef010000410000031b00010430000000a005000039000000f70300004100000000040000190000000006050019000000000503041a000000d105500197000000000556043600000001033000390000000104400039000000000014004b000001200000413d000000410160008a000000f904100197000000f80040009c000001320000413d000000de01000041000000000010043f0000004101000039000000040010043f000000df010000410000031b000104300000008001400039000000400010043f0000000000210435000000a002400039000000800300043d0000000000320435000000c002400039000000000003004b000001430000613d000000a00400003900000000050000190000000046040434000000d10660019700000000026204360000000105500039000000000035004b0000013d0000413d0000000002120049000000c70020009c000000c7020080410000006002200210000000c70010009c000000c7010080410000004001100210000000000112019f0000031a0001042e00000000010004140000000004000411000000040040008c000001790000c13d0000000001000032000001af0000613d0000001f03100039000000f9033001970000003f03300039000000f904300197000000400300043d0000000004430019000000000034004b00000000050000390000000105004039000000d60040009c0000012c0000213d00000001005001900000012c0000c13d000000400040043f0000000005130436000000f9021001980000001f0310018f000000000125001900000001040003670000016b0000613d000000000604034f000000006706043c0000000005750436000000000015004b000001670000c13d000000000003004b000001af0000613d000000000224034f0000000303300210000000000401043300000000043401cf000000000434022f000000000202043b0000010003300089000000000232022f00000000023201cf000000000242019f0000000000210435000001af0000013d000000c70010009c000000c701008041000000c001100210000000d8011001c7000080090200003900000000030900190000000005000019000400000009001d0319030f0000040f000000040900002900010000000103550000006003100270000000c70030019d000000c703300198000001ad0000613d0000001f04300039000000f0044001970000003f04400039000000f104400197000000400500043d0000000004450019000000000054004b00000000060000390000000106004039000000d60040009c0000012c0000213d00000001006001900000012c0000c13d000000400040043f0000001f0430018f0000000006350436000000eb053001980000000003560019000001a00000613d000000000701034f000000007807043c0000000006860436000000000036004b0000019c0000c13d000000000004004b000001ad0000613d000000000151034f0000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f00000000001304350000000100200190000002bf0000613d0000000101000039000000000201041a000000400100043d0000000000910435000000c70010009c000000c70100804100000040011002100000000003000414000000c70030009c000000c703008041000000c003300210000000000113019f000000f4011001c7000000d1052001970000800d020000390000000203000039000000f5040000410319030f0000040f0000000100200190000000610000c13d00000000010000190000031b00010430000000000002004b0000000401000029000000610000613d000200d10010019b000400000000001d000000000000043f0000000401000029000000d70110009a000000000201041a0000000001000414000000d109200197000000040090008c000300000009001d000001d90000c13d00000000010000310000000102000039000000400300043d000000000001004b000001ee0000c13d000002130000013d000000c70010009c000000c701008041000000c0011002100000000103000029000000000003004b000001e40000613d000000d8011001c7000080090200003900000000040900190000000005000019000001e50000013d00000000020900190319030f0000040f000000030900002900010000000103550000006001100270000000c70010019d000000c701100197000000400300043d000000000001004b000002130000613d0000001f04100039000000f9044001970000003f04400039000000f9044001970000000004430019000000000034004b00000000050000390000000105004039000000d60040009c0000012c0000213d00000001005001900000012c0000c13d000000400040043f0000000006130436000000f90410019800000000034600190000000105000367000002050000613d000000000705034f000000007807043c0000000006860436000000000036004b000002010000c13d0000001f06100190000002120000613d000000000445034f0000000305600210000000000603043300000000065601cf000000000656022f000000000404043b0000010005500089000000000454022f00000000045401cf000000000464019f0000000000430435000000400300043d00000024053000390000000100200190000002c60000613d0000002004300039000000e40200004100000000002404350000000202000029000000000025043500000024020000390000000000230435000000e50030009c0000012c0000213d0000006002300039000000400020043f00000000050304330000000003000414000000040090008c0000000102000039000002380000613d000000c70040009c000000c7040080410000004001400210000000c70050009c000000c7050080410000006002500210000000000112019f000000c70030009c000000c703008041000000c002300210000000000121019f00000000020900190319030f0000040f000000030900002900010000000103550000006001100270000000c70010019d000000c701100197000000000001004b0000025f0000613d0000001f03100039000000f9033001970000003f03300039000000f904300197000000400300043d0000000004430019000000000034004b00000000050000390000000105004039000000d60040009c0000012c0000213d00000001005001900000012c0000c13d000000400040043f0000000006130436000000f90410019800000000034600190000000105000367000002520000613d000000000705034f000000007807043c0000000006860436000000000036004b0000024e0000c13d0000001f011001900000025f0000613d000000000445034f0000000301100210000000000503043300000000051501cf000000000515022f000000000404043b0000010001100089000000000414022f00000000011401cf000000000151019f00000000001304350000000100200190000002d80000613d000000e801000041000000000010044300000004009004430000000001000414000000c70010009c000000c701008041000000c001100210000000dd011001c70000800202000039031903140000040f0000000100200190000002910000613d000000000101043b000000000001004b000001c30000613d000000400400043d000000e901000041000000000014043500000000010004140000000302000029000000040020008c000002880000613d000000c70040009c000000c70300004100000000030440190000004003300210000000c70010009c000000c701008041000000c001100210000000000131019f000000ea011001c7000300000004001d0319030f0000040f00000003040000290000006003100270000000c70030019d00010000000103550000000100200190000002e20000613d000000d60040009c0000012c0000213d000000400040043f0000000402000029000400010020003d000000000100041a000000040010006b000001ca0000413d000000610000013d000000000001042f00010000000103550000006002100270000000c70020019d000000c702200197000002990000013d00000001010003670000000002000031000000f9052001980000001f0620018f000000400300043d0000000004530019000002a40000613d000000000701034f0000000008030019000000007907043c0000000008980436000000000048004b000002a00000c13d000000000006004b000002b10000613d000000000151034f0000000305600210000000000604043300000000065601cf000000000656022f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f0000000000140435000000c70020009c000000c7020080410000006001200210000000c70030009c000000c7030080410000004002300210000000000112019f0000031b00010430000000de01000041000000000010043f0000001101000039000000040010043f000000df010000410000031b00010430000000400100043d0000004402100039000000f203000041000000000032043500000024021000390000000f03000039000000e70000013d000000e0010000410000000000130435000000040130003900000020020000390000000000210435000000260100003900000000001504350000006401300039000000e10200004100000000002104350000004401300039000000e2020000410000000000210435000000c70030009c000000c7030080410000004001300210000000e3011001c70000031b00010430000000400100043d0000006402100039000000e60300004100000000003204350000004402100039000000e703000041000000000032043500000024021000390000002a03000039000000460000013d000000c7033001970000001f0530018f000000eb06300198000000400200043d0000000004620019000002ee0000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000002ea0000c13d000000000005004b000002fb0000613d000000000161034f0000000305500210000000000604043300000000065601cf000000000656022f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000006001300210000000c70020009c000000c7020080410000004002200210000000000112019f0000031b00010430000000000200041a000000000012004b000003080000a13d000000d70110009a000000000000043f0000000002000019000000000001042d000000de01000041000000000010043f0000003201000039000000040010043f000000df010000410000031b00010430000000000001042f00000312002104210000000102000039000000000001042d0000000002000019000000000001042d00000317002104230000000102000039000000000001042d0000000002000019000000000001042d00000319000004320000031a0001042e0000031b0001043000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000200000000000000000000000000000040000001000000000000000000000000000000000000000000000000000000000000000000000000008da5cb5a000000000000000000000000000000000000000000000000000000008da5cb5b0000000000000000000000000000000000000000000000000000000095bc992800000000000000000000000000000000000000000000000000000000e64f0e13000000000000000000000000000000000000000000000000000000000d567b9b0000000000000000000000000000000000000000000000000000000024600fc3000000000000000000000000000000000000000000000000000000008d91ba7a000000000000000000000000ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000ffffffffffffff7b0100009d1f621a873f56322480f79aae05550d20e47b1be8a47a805dc1da4a2c9c4d535bdea7cd8a978f128b93471df48c7dbab89d703809115bdc118c235bfd02000000000000000000000000000000000000a4000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffd6f21326ab749d5729fcba5677c79037b459436ab7bff709c9d06ce9f10c1a9d0200000000000000000000000000000000000000000000000000000000000000d383bbde99bc6efa0a60481c2112cf459c97914f835794b8d7e2d54bc9de067f000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000200000008000000000000000009cc7f708afc65944829bd487b90b72536b1951864fbfc14e125fc972a6507f3902000002000000000000000000000000000000240000000000000000000000004e487b7100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000008c379a0000000000000000000000000000000000000000000000000000000006e747261637400000000000000000000000000000000000000000000000000004661696c656420746f2073656e642066756e647320746f206368696c6420636f00000000000000000000000000000000000000840000000000000000000000006a62784200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffff9f20636f6e747261637473000000000000000000000000000000000000000000004d696e74206661696c656420666f72206f6e65206f6620746865206368696c641806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b833ccfd60b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffe07261637400000000000000000000000000000000000000000000000000000000496e73756666696369656e742066756e647320696e20466162726963436f6e744e6f7420746865206f776e657200000000000000000000000000000000000000000000000000000000000000000000000000006400000080000000000000000000000000000000000000000000000000000000000000000000000001ffffffe000000000000000000000000000000000000000000000000000000003ffffffe05769746864726177206661696c6564000000000000000000000000000000000000000000000000000000000000000000000000640000000000000000000000000200000000000000000000000000000000000020000000000000000000000000eaff4b37086828766ad3268786972c0cd24259d4c87a80f9d3963a3c3d999b0d4e6f2066756e647320746f207769746864726177000000000000000000000000290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563000000000000000000000000000000000000000000000000ffffffffffffff80ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0e182075d7634538e850ec060de5cdf287f84d56530878a3277518eb397e79a8d
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.