Files
smom-dbis-138/contracts/rwa/libraries/RWATaxonomy.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

55 lines
1.8 KiB
Solidity

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
/**
* @title RWATaxonomy
* @notice On-chain validation helpers for M00 Li* index instruments (not M1 c* eMoney).
*/
library RWATaxonomy {
bytes32 public constant GRU_LAYER_M00 = keccak256("M00");
bytes32 public constant ASSET_CLASS_COMMODITIES = keccak256("Commodities");
bytes32 public constant TICKER_LIXAU = keccak256("LiXAU");
bytes32 public constant TICKER_LIPMG = keccak256("LiPMG");
bytes32 public constant TICKER_LIBMG1 = keccak256("LiBMG1");
bytes32 public constant TICKER_LIBMG2 = keccak256("LiBMG2");
bytes32 public constant TICKER_LIBMG3 = keccak256("LiBMG3");
error InvalidIndexTicker();
error InvalidAssetClass();
error InvalidGruLayer();
error EmptyString();
function hashString(string memory value) internal pure returns (bytes32) {
return keccak256(bytes(value));
}
function isAllowedIndexTicker(bytes32 tickerHash) internal pure returns (bool) {
return tickerHash == TICKER_LIXAU
|| tickerHash == TICKER_LIPMG
|| tickerHash == TICKER_LIBMG1
|| tickerHash == TICKER_LIBMG2
|| tickerHash == TICKER_LIBMG3;
}
function validateProduct(
string memory indexTicker,
string memory assetClass,
string memory gruLayer
) internal pure returns (bytes32 tickerHash) {
if (bytes(indexTicker).length == 0 || bytes(assetClass).length == 0) {
revert EmptyString();
}
tickerHash = hashString(indexTicker);
if (!isAllowedIndexTicker(tickerHash)) {
revert InvalidIndexTicker();
}
if (hashString(assetClass) != ASSET_CLASS_COMMODITIES) {
revert InvalidAssetClass();
}
if (hashString(gruLayer) != GRU_LAYER_M00) {
revert InvalidGruLayer();
}
}
}