Sophon Testnet

Contract

0x76cD56829898f5F416AFEa3895fEE64e0C491553

Overview

SOPH Balance

Sophon Sepolia  LogoSophon Sepolia  LogoSophon Sepolia  Logo0 SOPH

Multichain Info

N/A
Transaction Hash
Method
Block
From
To

There are no matching entries

1 Internal Transaction found.

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To
7396462025-03-17 13:32:5225 days ago1742218372  Contract Creation0 SOPH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CounterFactory

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 2 : CounterFactory.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;

import "./Counter.sol";

contract CounterFactory {
    event CounterDeployed(address counterAddress, bytes32 salt);
    
    // Mapping to keep track of deployed contracts
    mapping(bytes32 => address) public deployedCounters;
    
    // Deploy a new Counter with create2
    function deployCounter(bytes32 salt) public returns (address) {
        Counter counter = new Counter{salt: salt}();
        address counterAddress = address(counter);
        
        deployedCounters[salt] = counterAddress;
        emit CounterDeployed(counterAddress, salt);
        
        return counterAddress;
    }
    
    // Get the address of a counter before it's deployed (deterministic address)
    function getCounterAddress(bytes32 salt) public view returns (address) {
        bytes memory bytecode = type(Counter).creationCode;
        bytes32 hash = keccak256(
            abi.encodePacked(
                bytes1(0xff),
                address(this),
                salt,
                keccak256(bytecode)
            )
        );
        
        return address(uint160(uint256(hash)));
    }
}

File 2 of 2 : Counter.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;

contract Counter {
    uint256 public number;

    function setNumber(uint256 newNumber) public {
        number = newNumber;
    }

    function increment() public {
        number++;
    }
}

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

Contract ABI

API
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"counterAddress","type":"address"},{"indexed":false,"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"CounterDeployed","type":"event"},{"inputs":[{"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"deployCounter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"deployedCounters","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"getCounterAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

9c4d535b00000000000000000000000000000000000000000000000000000000000000000100005717d7a31262706450effc611847a87c5d788745b494934c56ce358eca00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x0003000000000002000200000000000200000060031002700000004003300197000200000031035500010000000103550000008004000039000000400040043f0000000100200190000000340000c13d000000040030008c000000dc0000413d000000000201043b000000e002200270000000420020009c0000003c0000613d000000430020009c0000004d0000613d000000440020009c000000dc0000c13d000000240030008c000000dc0000413d0000000002000416000000000002004b000000dc0000c13d0000000401100370000000000301043b0000004701000041000000a40010043f00000000010004140000004e02000041000000800020043f000200000003001d000000840030043f0000006002000039000000c40020043f000000e40000043f000000400010009c0000004001008041000000c0011002100000004f011001c7000080060200003900fd00f30000040f00000001002001900000007b0000613d0000000202000029000000000101043b000000000001004b000000ac0000c13d000000020100036700000000020000310000007f0000013d0000000001000416000000000001004b000000dc0000c13d0000002001000039000001000010044300000120000004430000004101000041000000fe0001042e000000240030008c000000dc0000413d0000000002000416000000000002004b000000dc0000c13d0000000401100370000000000101043b000000000010043f000000200000043f0000004002000039000000000100001900fd00de0000040f000000000101041a0000004501100197000000800010043f0000004601000041000000fe0001042e000000240030008c000000dc0000413d0000000001000416000000000001004b000000dc0000c13d0000014001000039000000400010043f0000008401000039000000800010043f0000004701000041000000c40010043f0000000001000414000000400010009c0000004001008041000000c00110021000000048011001c7000080100200003900fd00f80000040f0000000100200190000000dc0000613d000000000301043b000000400200043d000000200120003900000049040000410000000000410435000000000400041000000060044002100000002105200039000000000045043500000004040000390000000104400367000000000404043b0000005505200039000000000035043500000035032000390000000000430435000000550300003900000000003204350000004a0020009c0000009f0000413d0000004c01000041000000000010043f0000004101000039000000040010043f0000004d01000041000000ff0001043000020000000103550000006002100270000000400020019d000000400220019700000053052001980000001f0620018f000000400300043d00000000045300190000008a0000613d000000000701034f0000000008030019000000007907043c0000000008980436000000000048004b000000860000c13d000000000006004b000000970000613d000000000151034f0000000305600210000000000604043300000000065601cf000000000656022f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f0000000000140435000000400020009c00000040020080410000006001200210000000400030009c00000040030080410000004002300210000000000112019f000000ff000104300000008003200039000200000003001d000000400030043f000000000202043300fd00de0000040f000000450110019700000002020000290000000000120435000000400020009c000000400200804100000040012002100000004b011001c7000000fe0001042e000100000001001d000000000020043f000000200000043f0000000001000414000000400010009c0000004001008041000000c00110021000000050011001c7000080100200003900fd00f80000040f0000000100200190000000dc0000613d00000001020000290000004503200197000000000101043b000000000201041a0000005102200197000000000232019f000000000021041b000000400100043d000000200210003900000002040000290000000000420435000200000003001d0000000000310435000000400010009c000000400100804100000040011002100000000002000414000000400020009c0000004002008041000000c002200210000000000112019f00000050011001c70000800d020000390000000103000039000000520400004100fd00f30000040f0000000100200190000000dc0000613d000000400100043d00000002020000290000000000210435000000400010009c000000400100804100000040011002100000004b011001c7000000fe0001042e0000000001000019000000ff00010430000000400010009c00000040010080410000004001100210000000400020009c00000040020080410000006002200210000000000112019f0000000002000414000000400020009c0000004002008041000000c002200210000000000112019f00000054011001c7000080100200003900fd00f80000040f0000000100200190000000f10000613d000000000101043b000000000001042d0000000001000019000000ff00010430000000f6002104210000000102000039000000000001042d0000000002000019000000000001042d000000fb002104230000000102000039000000000001042d0000000002000019000000000001042d000000fd00000432000000fe0001042e000000ff0001043000000000000000000000000000000000000000000000000000000000ffffffff000000020000000000000000000000000000004000000100000000000000000000000000000000000000000000000000000000000000000000000000fd1837ca00000000000000000000000000000000000000000000000000000000a3893deb000000000000000000000000000000000000000000000000000000001cb5ac5d000000000000000000000000ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000002000000080000000000000000001000019bc8d0da1e300559f607c2bd014ae298a03e2cf704d8ed086a7108c0a0200000000000000000000000000000000000084000000a00000000000000000ff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffff8000000000000000000000000000000000000000200000000000000000000000004e487b710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000000000000000000000003cda33511d41a8a5431b1770c5bc0ddd62e1cd30555d16659b89c0d60f4f9f5702000000000000000000000000000000000000840000008000000000000000000200000000000000000000000000000000000040000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000d324055a41dc609a1c1388f4a6c64fc27c0680d94cccbf6ed0d0461cee702569ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a483dfa80b998d80dd928e8dfec0d93b8a857a02f1d0287b055138e53039bafa

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
Loading...
Loading
Loading...
Loading
[ 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.