@@ -9,6 +9,22 @@ type ChainBlockExplorer = {
99 apiUrl ?: string | undefined ;
1010} ;
1111
12+ /**
13+ * Repository metadata for Sablier protocol contracts.
14+ */
15+ export type Repository = {
16+ commit : string ;
17+ url : `https://github.com/sablier-labs/${string } `;
18+ } ;
19+
20+ /**
21+ * Map of contract names to their aliases.
22+ * Used in the Sablier Interface and indexers.
23+ */
24+ export type AliasMap = {
25+ [ contractName : string ] : string ;
26+ } ;
27+
1228export namespace Shared {
1329 /**
1430 * Common properties shared by EVM and Solana chains.
@@ -34,64 +50,46 @@ export namespace Shared {
3450 /** Used in deployment files to identify the chain, e.g., arbitrum-sepolia. */
3551 slug : string ;
3652 } ;
37- }
38-
39- /* -------------------------------------------------------------------------- */
40-
41- /**
42- * Repository metadata for Sablier protocol contracts.
43- */
44- export type Repository = {
45- commit : string ;
46- url : `https://github.com/sablier-labs/${string } `;
47- } ;
48-
49- /**
50- * Map of contract names to their aliases.
51- * Used in the Sablier Interface and indexers.
52- */
53- export type AliasMap = {
54- [ contractName : string ] : string ;
55- } ;
5653
57- /**
58- * Generic contract mapping that supports both simple addresses and address-with-block tuples.
59- * @internal
60- */
61- export type ContractMapBase < TAddress extends string > = {
62- [ contractName : string ] : TAddress | [ TAddress , number ] ;
63- } ;
54+ /**
55+ * Generic contract mapping that supports both simple addresses and address-with-block tuples.
56+ * @internal
57+ */
58+ export type ContractMap < TAddress extends string > = {
59+ [ contractName : string ] : TAddress | [ TAddress , number ] ;
60+ } ;
6461
65- /**
66- * Base manifest structure for contract names in a protocol version.
67- */
68- export type ManifestBase = {
69- [ contractKey : string ] : string ;
70- } ;
62+ /**
63+ * Base manifest structure for contract names in a protocol version.
64+ */
65+ export type Manifest = {
66+ [ contractKey : string ] : string ;
67+ } ;
7168
72- /**
73- * Generic contract type shared across all platforms (EVM, Solana, etc.).
74- * This provides a consistent interface for contract metadata regardless of the underlying blockchain.
75- *
76- * @template TAddress - The address type for the platform (e.g., `0x${string}` for EVM, `string` for Solana)
77- * @template TProtocol - The protocol enum/type for the platform
78- * @template TVersion - The version enum/type for the platform
79- */
80- export type ContractBase < TAddress extends string , TProtocol , TVersion > = {
81- /** The address of the contract. */
82- address : TAddress ;
83- /** Optional alias for the contract, used in the Sablier Interface and the indexers. */
84- alias ?: string ;
85- /** The block number at which the contract was deployed. */
86- block ?: number ;
87- /** The ID of the chain the contract is deployed on. */
88- chainId : number ;
89- /** URL to the explorer page for the contract. */
90- explorerURL ?: string ;
91- /** The name of the contract. */
92- name : string ;
93- /** The protocol the contract is part of (optional). */
94- protocol : TProtocol | undefined ;
95- /** The release version the contract is part of (optional). */
96- version : TVersion | undefined ;
97- } ;
69+ /**
70+ * Generic contract type shared across all platforms (EVM, Solana, etc.).
71+ * This provides a consistent interface for contract metadata regardless of the underlying blockchain.
72+ *
73+ * @template TAddress - The address type for the platform (e.g., `0x${string}` for EVM, `string` for Solana)
74+ * @template TProtocol - The protocol enum/type for the platform
75+ * @template TVersion - The version enum/type for the platform
76+ */
77+ export type Contract < TAddress extends string , TProtocol , TVersion > = {
78+ /** The address of the contract. */
79+ address : TAddress ;
80+ /** Optional alias for the contract, used in the Sablier Interface and the indexers. */
81+ alias ?: string ;
82+ /** The block number at which the contract was deployed. */
83+ block ?: number ;
84+ /** The ID of the chain the contract is deployed on. */
85+ chainId : number ;
86+ /** URL to the explorer page for the contract. */
87+ explorerURL ?: string ;
88+ /** The name of the contract. */
89+ name : string ;
90+ /** The protocol the contract is part of (optional). */
91+ protocol : TProtocol | undefined ;
92+ /** The release version the contract is part of (optional). */
93+ version : TVersion | undefined ;
94+ } ;
95+ }
0 commit comments