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

70 lines
1.9 KiB
Solidity

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
/**
* @title RWAStorage
* @notice ERC-7201 namespaced app storage for RWA ERC-2535 facets (upgrade-safe, expandable).
* @dev Attach facets to M00 Diamond or a dedicated RWAM00Diamond; do not collide with GRUStorage slots.
*/
library RWAStorage {
/// @custom:storage-location erc7201:dbis.storage.RWA
bytes32 private constant RWA_STORAGE_LOCATION =
0x8a3c9e1f4b2d7065c8e0a1f3d9b4e7c2a5f8d1b6e3c9a0f4d7b2e5c8a1f3d900;
/// @notice How the instrument is issued — not a public market security offering by default.
enum IssuanceMode {
Unset,
ThirdPartyTokenization,
PrivateClosedLoop,
CommodityIndex,
InternalLedgerOnly
}
/// @notice Off-chain payload scheme (URI stored off-chain; on-chain: hash + scheme id).
enum UriScheme {
None,
IPFS,
Filecoin,
Arweave,
HTTPS,
InternalDB
}
struct DocumentRef {
bytes32 contentHash;
bytes32 uriHash;
UriScheme scheme;
uint64 updatedAt;
}
struct InstrumentIdentity {
bytes32 isinHash;
bytes32 cusipHash;
bytes32 issuerLeiHash;
bytes32 underlyingIsinHash;
}
struct AssetRecord {
address tokenPointer;
IssuanceMode issuanceMode;
InstrumentIdentity identity;
bytes32 primaryContentHash;
DocumentRef[] documents;
mapping(bytes32 standardId => address) standardFacets;
}
struct Layout {
mapping(bytes32 assetId => AssetRecord) assets;
mapping(bytes32 standardId => bool) enabledStandards;
address governance;
address documentAdmin;
}
function layout() internal pure returns (Layout storage l) {
bytes32 slot = RWA_STORAGE_LOCATION;
assembly {
l.slot := slot
}
}
}