Abstract Testnet

Contract

0x5d33f252a35503c732ade70cf638730515467210

Overview

ETH Balance

0 ETH

Multichain Info

N/A
Transaction Hash
Method
Block
From
To
Mint From Childr...45297382025-01-17 18:53:2216 hrs ago1737140002IN
0x5d33f252...515467210
0 ETH0.000002230.025
Mint From Childr...45282382025-01-17 18:27:3116 hrs ago1737138451IN
0x5d33f252...515467210
0 ETH0.000002160.025

Latest 3 internal transactions

Parent Transaction Hash Block From To
45297382025-01-17 18:53:2216 hrs ago1737140002
0x5d33f252...515467210
0 ETH
45282382025-01-17 18:27:3116 hrs ago1737138451
0x5d33f252...515467210
0 ETH
45281962025-01-17 18:26:3916 hrs ago1737138399  Contract Creation0 ETH
Loading...
Loading

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)

File 1 of 1 : FabricContract.sol
// 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 mintFromChildren(address nftContract) external onlyOwner {
    for (uint256 i = 0; i < childContracts.length; i++) {
        // Вызываем mint на заданном NFT контракте от имени дочерних контрактов
        (bool success, ) = nftContract.call(
            abi.encodeWithSignature("mint(address)", childContracts[i])
        );
        require(success, "Mint failed for one of the child contracts");
    }
}


    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 {}
}

Settings
{
  "evmVersion": "paris",
  "optimizer": {
    "enabled": true,
    "mode": "3"
  },
  "outputSelection": {
    "*": {
      "*": [
        "abi",
        "metadata"
      ],
      "": [
        "ast"
      ]
    }
  },
  "detectMissingLibraries": false,
  "forceEVMLA": false,
  "enableEraVMExtensions": false,
  "libraries": {}
}

Contract ABI

[{"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":"nftContract","type":"address"}],"name":"mintFromChildren","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"}]

9c4d535b0000000000000000000000000000000000000000000000000000000000000000010000bf5c2a628704b15c29e0428a3ba77e6ad51114f8d3682b2f13388ac4ed00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x000200000000000200020000000000020000006003100270000000920330019700010000003103550000008004000039000000400040043f00000001002001900000008b0000c13d000000040030008c000001d00000413d000000000201043b000000e002200270000000950020009c000000990000a13d000000960020009c000000a80000213d000000990020009c000000c70000613d0000009a0020009c000001d00000c13d000000240030008c000001d00000413d0000000002000416000000000002004b000001d00000c13d0000000402100370000000000902043b0000009e0090009c000001d00000213d0000000102000039000000000202041a0000009e022001970000000004000411000000000024004b0000013f0000c13d000000000200041a000000000002004b0000013d0000613d000000000131034f000000ab0a000041000000240b000039000000200c00008a000000000d000019000100000009001d000000000000043f000000a902d0009a000000000402041a000000400300043d00000020023000390000000000a204350000009e04400197000000240530003900000000004504350000000000b30435000000ac0030009c000001580000213d0000006004300039000000400040043f00000000040304330000000003000414000000040090008c000000440000c13d00000000030000310000000102000039000000000003004b0000005e0000c13d000000840000013d000000920020009c00000092020080410000004001200210000000920040009c00000092040080410000006002400210000000000112019f000000920030009c0000009203008041000000c002300210000000000121019f000000000209001900020000000d001d0245023b0000040f000000020d000029000000200c00008a000000240b000039000000ab0a0000410000000109000029000000010220018f00010000000103550000006003100270000000920030019d0000009203300197000000000003004b000000840000613d000000a80030009c000001580000213d0000001f043000390000000004c4016f0000003f044000390000000005c4016f000000400400043d0000000005540019000000000045004b00000000060000390000000106004039000000a80050009c000001580000213d0000000100600190000001580000c13d000000400050043f00000000063404360000000005c301700000000004560019000000770000613d000000000701034f000000007807043c0000000006860436000000000046004b000000730000c13d0000001f03300190000000840000613d000000000551034f0000000303300210000000000604043300000000063601cf000000000636022f000000000505043b0000010003300089000000000535022f00000000033501cf000000000363019f0000000000340435000000000002004b000001fa0000613d000000010dd00039000000000200041a00000000002d004b0000002d0000413d0000013d0000013d0000000001000416000000000001004b000001d00000c13d0000000101000039000000000201041a00000093022001970000000003000411000000000232019f000000000021041b0000002001000039000001000010044300000120000004430000009401000041000002460001042e0000009b0020009c000000df0000613d0000009c0020009c000000eb0000613d0000009d0020009c000001d00000c13d0000000001000416000000000001004b000001d00000c13d0000000101000039000000000101041a0000009e01100197000000800010043f000000b101000041000002460001042e000000970020009c0000012e0000613d000000980020009c000001d00000c13d000000240030008c000001d00000413d0000000002000416000000000002004b000001d00000c13d0000000401100370000000000101043b0000009e0010009c000001d00000213d0000000102000039000000000302041a0000009e023001970000000005000411000000000025004b0000013f0000c13d0000009e06100198000001bc0000c13d000000a101000041000000800010043f0000002001000039000000840010043f0000001d01000039000000a40010043f000000a201000041000000c40010043f000000a3010000410000024700010430000000240030008c000001d00000413d0000000002000416000000000002004b000001d00000c13d0000000401100370000000000101043b000000000200041a000000000021004b000001d00000813d0245022d0000040f0000000302200210000000000101041a000000000121022f0000009e01100197000000ff0020008c0000000001002019000000400200043d0000000000120435000000920020009c00000092020080410000004001200210000000b0011001c7000002460001042e0000000001000416000000000001004b000001d00000c13d0000002002000039000000000100041a000000800010043f000000000000043f000000000001004b000001490000c13d000000a0010000390000000004020019000001a30000013d0000000001000416000000000001004b000001d00000c13d0000000101000039000000000101041a0000009e011001970000000002000411000000000012004b0000013f0000c13d000000000100041a000000000001004b0000013d0000613d0000000002000019000000000000043f000100000002001d000000a90120009a000000000101041a000000b30200004100000000002004430000009e01100197000200000001001d00000004001004430000000001000414000000920010009c0000009201008041000000c001100210000000b4011001c70000800202000039024502400000040f0000000100200190000001d20000613d000000000101043b000000000001004b000001d00000613d000000400400043d000000b501000041000000000014043500000000010004140000000202000029000000040020008c000001250000613d000000920040009c000000920300004100000000030440190000004003300210000000920010009c0000009201008041000000c001100210000000000131019f000000b6011001c7000200000004001d0245023b0000040f00000002040000290000006003100270000000920030019d000100000001035500000001002001900000020e0000613d000000a80040009c000001580000213d000000400040043f00000001020000290000000102200039000000000100041a000000000012004b000000f80000413d0000013d0000013d000000240030008c000001d00000413d0000000002000416000000000002004b000001d00000c13d0000000401100370000000000301043b0000000101000039000000000101041a0000009e011001970000000002000411000000000012004b0000013f0000c13d000000000003004b0000015e0000c13d0000000001000019000002460001042e000000a101000041000000800010043f0000002001000039000000840010043f0000000d01000039000000a40010043f000000b201000041000000c40010043f000000a3010000410000024700010430000000a005000039000000b80300004100000000040000190000000006050019000000000503041a0000009e05500197000000000556043600000001033000390000000104400039000000000014004b0000014c0000413d000000410160008a000000bc04100197000000b90040009c000001a20000413d000000ba01000041000000000010043f0000004101000039000000040010043f000000bb0100004100000247000104300000000001000019000100000003001d000200000001001d000000400100043d000000a40010009c000001580000213d0000000102000039000000000202041a0000002403100039000000a50400004100000000004304350000009e02200197000000840310003900000000002304350000006402100039000000000300041400000020040000390000000000420435000000440210003900000060040000390000000000420435000000a602000041000000000021043500000004021000390000000000020435000000920010009c00000092010080410000004001100210000000920030009c0000009203008041000000c002300210000000000121019f000000a7011001c700008006020000390245023b0000040f0000000100200190000001d30000613d000000000101043b000000000001004b000001d80000613d000000000200041a000000a80020009c000001580000213d0000000103200039000000000030041b000000000000043f0000009e05100197000000a90120009a000000000201041a0000009302200197000000000252019f000000000021041b0000000001000414000000920010009c0000009201008041000000c0011002100000009f011001c70000800d020000390000000203000039000000aa040000410245023b0000040f0000000100200190000001d00000613d00000002010000290000000101100039000000010010006c000001600000413d0000013d0000013d0000008001400039000000400010043f0000000000210435000000a002400039000000800300043d0000000000320435000000c002400039000000000003004b000001b30000613d000000a004000039000000000500001900000000460404340000009e0660019700000000026204360000000105500039000000000035004b000001ad0000413d0000000002120049000000920020009c00000092020080410000006002200210000000920010009c00000092010080410000004001100210000000000112019f000002460001042e000200000003001d0000000001000414000000920010009c0000009201008041000000c0011002100000009f011001c70000800d020000390000000303000039000000a004000041000100000006001d0245023b0000040f0000000100200190000001d00000613d0000000201000029000000930110019700000001011001af0000000102000039000000000012041b0000000001000019000002460001042e00000000010000190000024700010430000000000001042f00010000000103550000006002100270000000920020019d0000009202200197000001da0000013d00000001010003670000000002000031000000bc052001980000001f0620018f000000400300043d0000000004530019000001e50000613d000000000701034f0000000008030019000000007907043c0000000008980436000000000048004b000001e10000c13d000000000006004b000001f20000613d000000000151034f0000000305600210000000000604043300000000065601cf000000000656022f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f0000000000140435000000920020009c00000092020080410000006001200210000000920030009c00000092030080410000004002300210000000000112019f0000024700010430000000400100043d0000006402100039000000ad0300004100000000003204350000004402100039000000ae03000041000000000032043500000024021000390000002a030000390000000000320435000000a1020000410000000000210435000000040210003900000020030000390000000000320435000000920010009c00000092010080410000004001100210000000af011001c7000002470001043000000092033001970000001f0530018f000000b706300198000000400200043d00000000046200190000021a0000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000002160000c13d000000000005004b000002270000613d000000000161034f0000000305500210000000000604043300000000065601cf000000000656022f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000006001300210000000920020009c00000092020080410000004002200210000000000112019f0000024700010430000000000200041a000000000012004b000002340000a13d000000a90110009a000000000000043f0000000002000019000000000001042d000000ba01000041000000000010043f0000003201000039000000040010043f000000bb010000410000024700010430000000000001042f0000023e002104210000000102000039000000000001042d0000000002000019000000000001042d00000243002104230000000102000039000000000001042d0000000002000019000000000001042d0000024500000432000002460001042e000002470001043000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000002000000000000000000000000000000400000010000000000000000000000000000000000000000000000000000000000000000000000000095bc992700000000000000000000000000000000000000000000000000000000e64f0e1200000000000000000000000000000000000000000000000000000000e64f0e1300000000000000000000000000000000000000000000000000000000f2fde38b0000000000000000000000000000000000000000000000000000000095bc9928000000000000000000000000000000000000000000000000000000009ec6ac89000000000000000000000000000000000000000000000000000000000d567b9b00000000000000000000000000000000000000000000000000000000323a75ed000000000000000000000000000000000000000000000000000000008da5cb5b000000000000000000000000ffffffffffffffffffffffffffffffffffffffff02000000000000000000000000000000000000000000000000000000000000008be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e008c379a0000000000000000000000000000000000000000000000000000000004e6577206f776e657220697320746865207a65726f20616464726573730000000000000000000000000000000000000000000064000000800000000000000000000000000000000000000000000000000000000000000000ffffffffffffff7b0100009d2e95192d9bb616c17d3b07a404c2b6fdf45af6e948f2728dc8598f3e9c4d535bdea7cd8a978f128b93471df48c7dbab89d703809115bdc118c235bfd02000000000000000000000000000000000000a4000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffd6f21326ab749d5729fcba5677c79037b459436ab7bff709c9d06ce9f10c1a9dd383bbde99bc6efa0a60481c2112cf459c97914f835794b8d7e2d54bc9de067f6a62784200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffff9f20636f6e747261637473000000000000000000000000000000000000000000004d696e74206661696c656420666f72206f6e65206f6620746865206368696c640000000000000000000000000000000000000084000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000200000008000000000000000004e6f7420746865206f776e6572000000000000000000000000000000000000001806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b8302000002000000000000000000000000000000240000000000000000000000003ccfd60b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffe0290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563000000000000000000000000000000000000000000000000ffffffffffffff804e487b71000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00000000000000000000000000000000000000000000000000000000000000000d1d4bc7d41d36a894bb72b1bd72925dca23fee29cecc8a2a0f3e9a9b3373f57d

Block Transaction Gas Used Reward
view all blocks produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.