@@ -16,86 +16,86 @@ use super::client::Client;
1616#[ derive( Debug , Subcommand ) ]
1717#[ cfg_attr( test, derive( PartialEq , Eq ) ) ]
1818pub enum StarknetCommands {
19- /// Get Starknet JSON-RPC specification version
19+ /// Get Starknet JSON-RPC specification version [starknet_specVersion]
2020 #[ command( name = "spec" ) ]
2121 SpecVersion ,
2222
23- /// Get block with full transactions
23+ /// Get block with full transactions [starknet_getBlockWithTxs]
2424 #[ command( name = "block" ) ]
2525 GetBlockWithTxs ( GetBlockArgs ) ,
2626
27- /// Get state update for a block
27+ /// Get state update for a block [starknet_getStateUpdate]
2828 #[ command( name = "state-update" ) ]
2929 GetStateUpdate ( BlockIdArgs ) ,
3030
31- /// Get storage value at address and key
31+ /// Get storage value at address and key [starknet_getStorageAt]
3232 #[ command( name = "storage" ) ]
3333 GetStorageAt ( GetStorageAtArgs ) ,
3434
35- /// Get transaction by hash
35+ /// Get transaction by hash [starknet_getTransactionByHash]
3636 #[ command( name = "tx" ) ]
3737 GetTransactionByHash ( GetTransactionArgs ) ,
3838
39- /// Get transaction by block ID and index
39+ /// Get transaction by block ID and index [starknet_getTransactionByBlockIdAndIndex]
4040 #[ command( name = "tx-by-block" ) ]
4141 GetTransactionByBlockIdAndIndex ( GetTransactionByBlockIdAndIndexArgs ) ,
4242
43- /// Get transaction receipt
43+ /// Get transaction receipt [starknet_getTransactionReceipt]
4444 #[ command( name = "receipt" ) ]
4545 GetTransactionReceipt ( TxHashArgs ) ,
4646
47- /// Get contract class definition
47+ /// Get contract class definition [starknet_getClass]
4848 #[ command( name = "class" ) ]
4949 GetClass ( GetClassArgs ) ,
5050
51- /// Get contract class hash at address
51+ /// Get contract class hash at address [starknet_getClassHashAt]
5252 #[ command( name = "class-at" ) ]
5353 GetClassHashAt ( GetClassHashAtArgs ) ,
5454
55- /// Get contract class at address
55+ /// Get contract class at address [starknet_getClassAt]
5656 #[ command( name = "code" ) ]
5757 GetClassAt ( GetClassAtArgs ) ,
5858
59- /// Get number of transactions in block
59+ /// Get number of transactions in block [starknet_getBlockTransactionCount]
6060 #[ command( name = "tx-count" ) ]
6161 GetBlockTransactionCount ( BlockIdArgs ) ,
6262
63- /// Call contract function
63+ /// Call contract function [starknet_call]
6464 #[ command( name = "call" ) ]
6565 Call ( CallArgs ) ,
6666
67- /// Get latest block number
67+ /// Get latest block number [starknet_blockNumber]
6868 #[ command( name = "block-number" ) ]
6969 BlockNumber ,
7070
71- /// Get latest block hash and number
71+ /// Get latest block hash and number [starknet_blockHashAndNumber]
7272 BlockHashAndNumber ,
7373
74- /// Get chain ID
74+ /// Get chain ID [starknet_chainId]
7575 #[ command( name = "id" ) ]
7676 ChainId ,
7777
78- /// Get sync status
78+ /// Get sync status [starknet_syncing]
7979 #[ command( name = "sync" ) ]
8080 Syncing ,
8181
82- /// Get nonce for address
82+ /// Get nonce for address [starknet_getNonce]
8383 #[ command( name = "nonce" ) ]
8484 GetNonce ( GetNonceArgs ) ,
8585
86- /// Get events matching filter criteria
86+ /// Get events matching filter criteria [starknet_getEvents]
8787 #[ command( name = "events" ) ]
8888 GetEvents ( GetEventsArgs ) ,
8989
90- /// Get transaction execution trace
90+ /// Get transaction execution trace [starknet_traceTransaction]
9191 #[ command( name = "trace" ) ]
9292 TraceTransaction ( TxHashArgs ) ,
9393
94- /// Get execution traces for all transactions in a block
94+ /// Get execution traces for all transactions in a block [starknet_traceBlockTransactions]
9595 #[ command( name = "block-traces" ) ]
9696 TraceBlockTransactions ( TraceBlockTransactionsArg ) ,
9797
98- /// Get storage proofs for classes, contracts, and storage keys
98+ /// Get storage proofs for classes, contracts, and storage keys [starknet_getStorageProof]
9999 #[ command( name = "proof" ) ]
100100 GetStorageProof ( GetStorageProofArgs ) ,
101101}
@@ -115,11 +115,11 @@ pub struct GetBlockArgs {
115115 #[ arg( default_value = "latest" ) ]
116116 block : BlockIdArg ,
117117
118- /// Return block with receipts
118+ /// Return block with receipts [starknet_getBlockWithReceipts]
119119 #[ arg( long) ]
120120 receipts : bool ,
121121
122- /// Return only transaction hashes instead of full transactions
122+ /// Return only transaction hashes instead of full transactions [starknet_getBlockWithTxHashes]
123123 #[ arg( long, conflicts_with = "receipts" ) ]
124124 tx_hashes_only : bool ,
125125}
@@ -139,7 +139,7 @@ pub struct GetTransactionArgs {
139139 #[ arg( value_name = "TX_HASH" ) ]
140140 tx_hash : TxHash ,
141141
142- /// Get only the transaction status instead of full transaction
142+ /// Get only the transaction status instead of full transaction [starknet_getTransactionStatus]
143143 #[ arg( long) ]
144144 status : bool ,
145145}
0 commit comments