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_CrossChainDispatch.sol": {
"content": "// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import {Ownable} from "./utils/Ownable.sol";
/// @title RSC_CrossChainDispatch
/// @notice Emits intents that off-chain relayers consume
contract RSC_CrossChainDispatch is Ownable {
event Dispatched(uint32 indexed destChainId, address indexed to, bytes payload, bytes32 messageId);
function dispatch(uint32 destChainId, address to, bytes calldata payload) external onlyOwner returns (bytes32 messageId) {
require(destChainId != 0 && to != address(0), "bad args");
messageId = keccak256(abi.encodePacked(block.chainid, destChainId, to, payload, block.number, address(this)));
emit Dispatched(destChainId, to, payload, messageId);
}
}
"
},
"src/utils/Ownable.sol": {
"content": "// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
/// @title Minimal Ownable utility
abstract contract Ownable {
error NotOwner();
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
owner = msg.sender;
emit OwnershipTransferred(address(0), msg.sender);
}
modifier onlyOwner() {
if (msg.sender != owner) revert NotOwner();
_;
}
function transferOwnership(address newOwner) external onlyOwner {
require(newOwner != address(0), "Owner=zero");
emit OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
}
"
}
},
"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
}
}}
Submitted on: 2025-09-27 11:51:23
Comments
Log in to comment.
No comments yet.