Sophon Testnet

Contract

0x7b84713ACa0f06BefC6061C71Ee093AB28179189

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
7446762025-03-18 9:31:312 days ago1742290291  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.11

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 CounterCreated(address counterAddress, bytes32 salt, uint256 initialNumber);
    
    // Maps salt to deployed counter address
    mapping(bytes32 => address) public counters;
    
    // Create a new Counter with the provided salt and initial number
    function createCounter(bytes32 salt, uint256 initialNumber) external returns (address) {
        Counter counter = new Counter{salt: salt}(initialNumber);
        address counterAddress = address(counter);
        
        counters[salt] = counterAddress;
        emit CounterCreated(counterAddress, salt, initialNumber);
        
        return counterAddress;
    }
    
    // Get the address of a counter for a given salt
    function getCounterAddress(bytes32 salt) public view returns (address) {
        return counters[salt];
    }
}

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

contract Counter {
    uint256 public number;

    constructor(uint256 initialNumber) {
        number = initialNumber;
    }

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

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

Settings
{
  "evmVersion": "paris",
  "optimizer": {
    "enabled": true,
    "mode": "3"
  },
  "outputSelection": {
    "*": {
      "*": [
        "abi"
      ]
    }
  },
  "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"},{"indexed":false,"internalType":"uint256","name":"initialNumber","type":"uint256"}],"name":"CounterCreated","type":"event"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"counters","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256","name":"initialNumber","type":"uint256"}],"name":"createCounter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"getCounterAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

9c4d535b000000000000000000000000000000000000000000000000000000000000000001000043c3a228185837f20c230650f8f845998c9bca21314b13d1acbb1d8ed500000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x0002000000000002000300000000000200010000000103550000006003100270000000330030019d0000008004000039000000400040043f0000000100200190000000240000c13d0000003302300197000000040020008c000000840000413d000000000301043b000000e003300270000000350030009c000000140000613d000000360030009c0000002c0000613d000000370030009c000000840000c13d000000240020008c000000840000413d0000000002000416000000000002004b000000840000c13d0000000401100370000000000101043b000000000010043f000000200000043f000000000100001900c200a70000040f000000000101041a0000003b01100197000000800010043f0000004101000041000000c30001042e0000000001000416000000000001004b000000840000c13d0000002001000039000001000010044300000120000004430000003401000041000000c30001042e000000440020008c000000840000413d0000000002000416000000000002004b000000840000c13d0000000402100370000000000302043b0000002401100370000000000201043b0000003201000041000000a40010043f000200000002001d000001040020043f00000000010004140000003802000041000000800020043f000300000003001d000000840030043f0000006002000039000000c40020043f0000002002000039000000e40020043f000000330010009c0000003301008041000000c00110021000000039011001c7000080060200003900c200b80000040f0000000100200190000000860000613d000000030400002900000000020000310000000103200367000000000101043b000000000001004b0000000002000019000000890000613d000100000001001d000000000040043f000000200000043f0000000001000414000000330010009c0000003301008041000000c0011002100000003a011001c7000080100200003900c200bd0000040f0000000100200190000000840000613d00000001020000290000003b04200197000000000101043b000000000201041a0000003c02200197000000000242019f000000000021041b000000400100043d000000400210003900000002030000290000000000320435000000200210003900000003030000290000000000320435000300000004001d0000000000410435000000330010009c000000330100804100000040011002100000000002000414000000330020009c0000003302008041000000c002200210000000000112019f0000003d011001c70000800d0200003900000001030000390000003e0400004100c200b80000040f0000000100200190000000840000613d000000400100043d00000003020000290000000000210435000000330010009c000000330100804100000040011002100000003f011001c7000000c30001042e0000000001000019000000c40001043000000060021002700000003302200197000000000301034f0000001f0520018f0000004006200198000000400100043d0000000004610019000000940000613d000000000703034f0000000008010019000000007907043c0000000008980436000000000048004b000000900000c13d000000000005004b000000a10000613d000000000363034f0000000305500210000000000604043300000000065601cf000000000656022f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000006002200210000000330010009c00000033010080410000004001100210000000000121019f000000c4000104300000000002000414000000330020009c0000003302008041000000c002200210000000330010009c00000033010080410000004001100210000000000121019f0000003a011001c7000080100200003900c200bd0000040f0000000100200190000000b60000613d000000000101043b000000000001042d0000000001000019000000c400010430000000bb002104210000000102000039000000000001042d0000000002000019000000000001042d000000c0002104230000000102000039000000000001042d0000000002000019000000000001042d000000c200000432000000c30001042e000000c400010430000000000000000000000000000000000000000000000000010000237f8b7ac3a695a5670d53fbeaf6f4050b22ad7a5b1d0e47d83b97f0a500000000000000000000000000000000000000000000000000000000ffffffff000000020000000000000000000000000000004000000100000000000000000000000000000000000000000000000000000000000000000000000000a3893deb000000000000000000000000000000000000000000000000000000008cf332db000000000000000000000000000000000000000000000000000000003c882a6b3cda33511d41a8a5431b1770c5bc0ddd62e1cd30555d16659b89c0d60f4f9f5702000000000000000000000000000000000000a40000008000000000000000000200000000000000000000000000000000000040000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000020000000000000000000000000000000000006000000000000000000000000092ed34504153276c08466a1095454750bcb3f75dc7969669eb3dbcf04d0e5320000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffe00000000000000000000000000000000000000020000000800000000000000000a2a79856e9eda68fef977b243f0ca9d42fa7d9d0203e6017487fddf1f6a267d3

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.