MockLaunchFeeManager

0xb94acbf6603a27fd6e7c8ba2e210de081d2daab4

Verification
Verified
v0.8.24+commit.e11b9ed9
Type
Contract
1,397 bytes
ABI entries
15
4 read · 4 write
License
none

Contract information

Address
0xb94acbf6603a27fd6e7c8ba2e210de081d2daab4
Chain
Robinhood Chain (4663)
Compiler
v0.8.24+commit.e11b9ed9
Optimization
Enabled
Creation tx
0xa61127f645…0e726053c3

Token

Not a token

This contract does not expose ERC-20 metadata.

Read contract (4)

collectedByProject(uint256)uint256
factory()address
owner()address
totalCollected()uint256

Events (1)

OwnershipTransferred

ABI

[
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "initialOwner",
        "type": "address"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "constructor"
  },
  {
    "inputs": [],
    "name": "FactoryAlreadySet",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "InvalidFactory",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "NotFactory",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "owner",
        "type": "address"
      }
    ],
    "name": "OwnableInvalidOwner",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "account",
        "type": "address"
      }
    ],
    "name": "OwnableUnauthorizedAccount",
    "type": "error"
  },
  {
    "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": "address",
        "name": "",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "projectNumber",
        "type": "uint256"
      },
      {
        "internalType": "bytes32",
        "name": "",
        "type": "bytes32"
      },
      {
        "internalType": "uint32",
        "name": "",
        "type": "uint32"
      }
    ],
    "name": "collectLaunchFee",
    "outputs": [],
    "stateMutability": "payable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "projectNumber",
        "type": "uint256"
      }
    ],
    "name": "collectedByProject",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "factory",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "owner",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "renounceOwnership",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "factory_",
        "type": "address"
      }
    ],
    "name": "setFactory",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "totalCollected",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "newOwner",
        "type": "address"
      }
    ],
    "name": "transferOwnership",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  }
]

Source code

// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;

import { ILaunchFeeManager } from "../interfaces/ILaunchFeeManager.sol";
import { MockFactoryBound } from "./MockFactoryBound.sol";

/// @notice Local-only launch fee sink with per-project accounting and no withdrawal path.
contract MockLaunchFeeManager is ILaunchFeeManager, MockFactoryBound {
    uint256 public totalCollected;
    mapping(uint256 projectNumber => uint256 amount) public collectedByProject;

    constructor(
        address initialOwner
    ) MockFactoryBound(initialOwner) { }

    function collectLaunchFee(
        address,
        uint256 projectNumber,
        bytes32,
        uint32
    ) external payable onlyFactory {
        totalCollected += msg.value;
        collectedByProject[projectNumber] += msg.value;
    }
}
Chain explorer2624msChain node74ms