RSC_SubscriptionRegistry

Description:

Smart contract deployed on Ethereum with Factory features.

Blockchain: Ethereum

Source Code: View Code On The Blockchain

Solidity Source Code:

{{
  "language": "Solidity",
  "sources": {
    "src/RSC_SubscriptionRegistry.sol": {
      "content": "// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

import {IRscSubscriptionRegistry} from "./RSCInterfaces.sol";

contract RSC_SubscriptionRegistry is IRscSubscriptionRegistry {
    struct SubKey { address topic; bytes32 eventSig; }
    mapping(bytes32 => bool) public wildcard;
    mapping(bytes32 => bool) public subscribed;

    function subscribe(address topic, bytes32 eventSig, bool isWildcard) external override {
        bytes32 key = keccak256(abi.encode(topic, eventSig));
        subscribed[key] = true;
        wildcard[key] = isWildcard;
        emit Subscribed(topic, eventSig, isWildcard);
    }

    function unsubscribe(address topic, bytes32 eventSig) external override {
        bytes32 key = keccak256(abi.encode(topic, eventSig));
        subscribed[key] = false;
        wildcard[key] = false;
        emit Unsubscribed(topic, eventSig);
    }
}



"
    },
    "src/RSCInterfaces.sol": {
      "content": "// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

interface IRscCallbackProxy {
    function remoteExec(bytes32 msgId, bytes calldata payload) external;
}

interface IRscSubscriptionRegistry {
    event Subscribed(address indexed topic, bytes32 indexed eventSig, bool wildcard);
    event Unsubscribed(address indexed topic, bytes32 indexed eventSig);
    function subscribe(address topic, bytes32 eventSig, bool wildcard) external;
    function unsubscribe(address topic, bytes32 eventSig) external;
    function subscribed(bytes32 key) external view returns (bool);
    function wildcard(bytes32 key) external view returns (bool);
}



"
    }
  },
  "settings": {
    "remappings": [
      "forge-std/=lib/forge-std/src/",
      "reactive-lib/=lib/reactive-lib/src/"
    ],
    "optimizer": {
      "enabled": true,
      "runs": 200
    },
    "metadata": {
      "useLiteralContent": false,
      "bytecodeHash": "ipfs",
      "appendCBOR": true
    },
    "outputSelection": {
      "*": {
        "*": [
          "evm.bytecode",
          "evm.deployedBytecode",
          "devdoc",
          "userdoc",
          "metadata",
          "abi"
        ]
      }
    },
    "evmVersion": "cancun",
    "viaIR": true
  }
}}

Tags:
Factory|addr:0x2bbccfe0adad84cb15d801ad70e771c09b966ef7|verified:true|block:23452052|tx:0xf843fea4bc38e06fff2cbc72498bf0a6755d314d03754b03934b15e74b5059f9|first_check:1758966688

Submitted on: 2025-09-27 11:51:29

Comments

Log in to comment.

No comments yet.