Files
smom-dbis-138/contracts/mainnet-checkpoint/ISO20022IntakeGateway.sol
defiQUG c336809676
Some checks failed
CI/CD Pipeline / Solidity Contracts (push) Failing after 1m3s
CI/CD Pipeline / Security Scanning (push) Successful in 2m18s
CI/CD Pipeline / Lint and Format (push) Failing after 34s
CI/CD Pipeline / Terraform Validation (push) Failing after 20s
CI/CD Pipeline / Kubernetes Validation (push) Successful in 22s
Deploy ChainID 138 / Deploy ChainID 138 (push) Failing after 40s
HYBX OMNL TypeScript & anchor / token-aggregation build + reconcile artifact (push) Failing after 49s
OMNL reconcile anchor / Run omnl:reconcile and upload artifacts (push) Failing after 21s
Validation / validate-genesis (push) Successful in 25s
Validation / validate-terraform (push) Failing after 21s
Validation / validate-kubernetes (push) Failing after 8s
Validation / validate-smart-contracts (push) Failing after 8s
Validation / validate-security (push) Failing after 1m11s
Validation / validate-documentation (push) Failing after 14s
Verify Deployment / Verify Deployment (push) Failing after 45s
Add mainnet checkpoint stack: ISO attestation, participant Etherscan surface, and services.
Ship AddressActivityRegistry V1/V2, ISO20022IntakeGateway, Chain138ParticipantSurface,
checkpoint hub contracts, checkpoint-core package, aggregator/indexer/sdk services,
relay profile guards, M00 diamond bridge facet, and OMNL compliance contracts.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 00:30:45 -07:00

74 lines
2.2 KiB
Solidity

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";
/**
* @title ISO20022IntakeGateway
* @notice On-chain entry for canonical ISO 20022 / MT-103 mapped instructions (idempotent by instructionId).
* @dev Full MX/MT payloads remain off-chain; keyed by payloadHash. See SMART_CONTRACTS_ISO20022_FIN_METHODOLOGY.md
*/
contract ISO20022IntakeGateway is AccessControl {
bytes32 public constant RELAYER_ROLE = keccak256("RELAYER_ROLE");
struct CanonicalMessage {
bytes32 instructionId;
bytes32 endToEndIdHash;
bytes32 uetr;
bytes32 payloadHash;
bytes32 debtorRefHash;
bytes32 creditorRefHash;
bytes32 purposeHash;
uint8 msgTypeCode;
address token;
uint256 amount;
bytes3 currencyCode;
}
mapping(bytes32 => bool) public processedInstructions;
mapping(bytes32 => CanonicalMessage) public inboundMessages;
event InboundAccepted(
bytes32 indexed instructionId,
bytes32 indexed uetr,
bytes32 payloadHash,
uint8 msgTypeCode,
address token,
uint256 amount,
bytes3 currencyCode,
address indexed relayer
);
event CCIPRouterUpdated(address router);
address public ccipRouter;
constructor(address admin) {
_grantRole(DEFAULT_ADMIN_ROLE, admin);
_grantRole(RELAYER_ROLE, admin);
}
function setCCIPRouter(address router) external onlyRole(DEFAULT_ADMIN_ROLE) {
ccipRouter = router;
emit CCIPRouterUpdated(router);
}
function submitInbound(CanonicalMessage calldata m) external onlyRole(RELAYER_ROLE) {
require(m.instructionId != bytes32(0), "instructionId");
require(m.payloadHash != bytes32(0), "payloadHash");
require(!processedInstructions[m.instructionId], "duplicate instruction");
processedInstructions[m.instructionId] = true;
inboundMessages[m.instructionId] = m;
emit InboundAccepted(
m.instructionId,
m.uetr,
m.payloadHash,
m.msgTypeCode,
m.token,
m.amount,
m.currencyCode,
msg.sender
);
}
}