Midpoint Cross Testnet

chainId 139420 · tMIDX · temporary explorer

Address

Address
0xb99ef086c2095e2e8f52b18f21e75eab05dd4252
Label
Counter demo contract
Note
MidxCounter: Read/Write contract demo; anyone may increment
Type
contract
Balance
0 tMIDX (0 wei)
Nonce
1
Code size
826 bytes

Contract

Creator
0x59de9c0c9e9ff2e83d21a44ebd4fa83eb9ac1394 tMIDX wallet
Creation tx
0x16d30a9ebed516d66ab6261cde03… (block 29,102)

Source code ✓ verified

Contract
MidxCounter
Compiler
solc 0.8.36+commit.8a079791
Optimizer
enabled, 200 runs
Verified
2026-11-28 15:19:07 UTC
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

/// @title MidxCounter
/// @notice Demo target for the explorer's Read / Write contract tabs: anyone can
/// bump the counter, every bump emits an event, and the immutable exercises
/// the verifier's immutable-reference handling.
contract MidxCounter {
    uint256 public count;
    address public lastCaller;
    uint256 public immutable deployedAt;

    event Incremented(address indexed by, uint256 newCount, uint256 added);

    constructor() {
        deployedAt = block.number;
    }

    function increment() external {
        add(1);
    }

    function add(uint256 n) public {
        require(n > 0 && n <= 1000, "add: n must be 1..1000");
        count += n;
        lastCaller = msg.sender;
        emit Incremented(msg.sender, count, n);
    }

    function greet(string calldata name) external pure returns (string memory) {
        return string.concat("hello, ", name);
    }
}

ABI

[
 {
  "type": "constructor",
  "inputs": [],
  "stateMutability": "nonpayable"
 },
 {
  "name": "Incremented",
  "type": "event",
  "inputs": [
   {
    "name": "by",
    "type": "address",
    "indexed": true,
    "internalType": "address"
   },
   {
    "name": "newCount",
    "type": "uint256",
    "indexed": false,
    "internalType": "uint256"
   },
   {
    "name": "added",
    "type": "uint256",
    "indexed": false,
    "internalType": "uint256"
   }
  ],
  "anonymous": false
 },
 {
  "name": "add",
  "type": "function",
  "inputs": [
   {
    "name": "n",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "outputs": [],
  "stateMutability": "nonpayable"
 },
 {
  "name": "count",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "deployedAt",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "greet",
  "type": "function",
  "inputs": [
   {
    "name": "name",
    "type": "string",
    "internalType": "string"
   }
  ],
  "outputs": [
   {
    "name": "",
    "type": "string",
    "internalType": "string"
   }
  ],
  "stateMutability": "pure"
 },
 {
  "name": "increment",
  "type": "function",
  "inputs": [],
  "outputs": [],
  "stateMutability": "nonpayable"
 },
 {
  "name": "lastCaller",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "address",
    "internalType": "address"
   }
  ],
  "stateMutability": "view"
 }
]

Read contract (4)

count() → uint256
uint256 1
deployedAt() → uint256
uint256 29102
greet(string name) → string
lastCaller() → address

Write contract (2)

no wallet connected; a browser wallet signs and broadcasts, the explorer only encodes the call
add(uint256 n)
increment()

Events (1 total)

TxBlockAgeContractEventDetails
0x3ca1d1a83c3211…29,10623h 6m agoCounter demo 0xb99ef0…Incrementedby=0xfa6580a93320a56a7d6d716bee2a206b2ac3a62c newCount=1 added=1

Internal transactions (latest 10)

TxBlockAgeTraceTypeFromToMethodValueGas usedResult
0x3ca1d1a83c32…29,10623h 6m ago0.1staticcallCounter relay demo 0xfa6580…Counter demo 0xb99ef0…count0260ok
0x3ca1d1a83c32…29,10623h 6m ago0.0callCounter relay demo 0xfa6580…Counter demo 0xb99ef0…add046,430ok

Transactions

None found in the last 250 blocks.
Temporary placeholder infrastructure for chain registration. Not a production network - state may be reset without notice.