1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//! `PublisherRegistry` contract ABI bindings (ADR 002 § Contract:
//! `PublisherRegistry`).
//!
//! Generated by the `alloy::sol!` macro from the Solidity surface in
//! `contracts/src/PublisherRegistry.sol`. The registry records namespace
//! ownership and lifecycle only — it stores no content hashes. The
//! hash → namespace association is supplied off-chain by the requester at fetch
//! time (ADR 002 § Hash-to-namespace association), so there is no on-chain
//! reverse lookup here. Only the namespace-creation write (used by the publish
//! CLI) and the `ownerOf` read are mirrored.
// The `sol!`-generated bindings include macro-emitted code that uses
// patterns workspace clippy denies (raw indexing into ABI fixed-size
// byte arrays, `unwrap` on infallible conversions). These allows scope
// the relaxation to this module only.
#[allow(
clippy::expect_used,
clippy::indexing_slicing,
clippy::panic,
clippy::unwrap_used,
clippy::pub_underscore_fields,
clippy::missing_docs_in_private_items,
clippy::too_many_arguments,
missing_debug_implementations,
missing_docs,
non_snake_case,
non_camel_case_types
)]
mod sol_types {
alloy::sol! {
#[sol(rpc)]
contract PublisherRegistry {
/// Mint a fresh namespace owned by the caller. Returns its id
/// (namespace ids start at 1; 0 is reserved). Emits `NamespaceCreated`.
function createNamespace() external returns (uint256 namespaceId);
/// Current owner of `namespaceId` (address(0) if never created).
function ownerOf(uint256 namespaceId) external view returns (address);
/// A fresh `namespaceId` was created and owned by `owner`.
event NamespaceCreated(uint256 indexed namespaceId, address indexed owner);
}
}
}
pub use sol_types::PublisherRegistry;