Address
- Address
- 0xfa6580a93320a56a7d6d716bee2a206b2ac3a62c
- Label
- Counter relay demo contract
- Note
- MidxCounterRelay: forwards bumps to the Counter demo (internal transactions demo)
- Type
- contract
- Balance
- 0 tMIDX (0 wei)
- Nonce
- 1
- Code size
- 685 bytes
Contract
Source code ✓ verified
- Contract
- MidxCounterRelay
- Compiler
- solc 0.8.36+commit.8a079791
- Optimizer
- enabled, 200 runs
- Verified
- 2026-11-28 15:27:04 UTC
Constructor arguments
000000000000000000000000b99ef086c2095e2e8f52b18f21e75eab05dd4252
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
interface ICounter {
function add(uint256 n) external;
function count() external view returns (uint256);
}
/// @title MidxCounterRelay
/// @notice Forwards bumps to a MidxCounter so the explorer has contract-to-contract
/// calls (internal transactions) to show; the constructor argument exercises
/// constructor-argument capture in verification.
contract MidxCounterRelay {
ICounter public immutable counter;
uint256 public relayed;
event Relayed(address indexed by, uint256 n, uint256 counterAfter);
constructor(ICounter target) {
counter = target;
}
function bump() external {
bumpBy(1);
}
function bumpBy(uint256 n) public {
counter.add(n);
relayed += n;
emit Relayed(msg.sender, n, counter.count());
}
}
ABI
[
{
"type": "constructor",
"inputs": [
{
"name": "target",
"type": "address",
"internalType": "contract ICounter"
}
],
"stateMutability": "nonpayable"
},
{
"name": "Relayed",
"type": "event",
"inputs": [
{
"name": "by",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "n",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "counterAfter",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"name": "bump",
"type": "function",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "bumpBy",
"type": "function",
"inputs": [
{
"name": "n",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "counter",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract ICounter"
}
],
"stateMutability": "view"
},
{
"name": "relayed",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
}
]Read contract (2)
Write contract (2)
no wallet connected; a browser wallet signs and broadcasts, the explorer only encodes the call
Events (1 total)
Internal transactions (latest 10)
Transactions (1 indexed)CSV
page 1 / 1
Temporary placeholder infrastructure for chain registration.
Not a production network - state may be reset without notice.