Add get man page, remove chain spec arg from get, info
This commit is contained in:
		
							parent
							
								
									a3081367db
								
							
						
					
					
						commit
						7e6daa0be3
					
				| @ -1,5 +1,6 @@ | ||||
| - 0.0.27: | ||||
| 	* Add man pages | ||||
| 	* Add man pages with chainlib man page generator helper | ||||
| 	* Remove redundant arg flags from runnables: get | ||||
| - 0.0.26: | ||||
| 	* Remove manual 0x handling bug in tx | ||||
| - 0.0.25: | ||||
|  | ||||
							
								
								
									
										5
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								Makefile
									
									
									
									
									
								
							| @ -3,8 +3,9 @@ BUILD_DIR = build/$(PREFIX)/share/man | ||||
| 
 | ||||
| man: | ||||
| 	mkdir -vp $(BUILD_DIR) | ||||
| 	chainlib-man.py -b`PYTHONPATH=. python chainlib/eth/runnable/flags.py gas` -n eth-gas -d $(BUILD_DIR)/ man/gas.head.groff | ||||
| 	chainlib-man.py -b`PYTHONPATH=. python chainlib/eth/runnable/flags.py info` -n eth-info -d $(BUILD_DIR)/ man/info.head.groff | ||||
| 	chainlib-man.py -b `PYTHONPATH=. python chainlib/eth/runnable/flags.py gas` -v -n eth-gas -d $(BUILD_DIR)/ man/gas.head.groff | ||||
| 	chainlib-man.py -b `PYTHONPATH=. python chainlib/eth/runnable/flags.py info` -v -n eth-info -d $(BUILD_DIR)/ man/info.head.groff | ||||
| 	chainlib-man.py -b `PYTHONPATH=. python chainlib/eth/runnable/flags.py get` -v -n eth-get -d $(BUILD_DIR)/ man/get.head.groff | ||||
| 
 | ||||
| 
 | ||||
| .PHONY: man | ||||
|  | ||||
| @ -4,6 +4,7 @@ from chainlib.cli import ( | ||||
|         argflag_std_read, | ||||
|         argflag_std_write, | ||||
|         argflag_std_base, | ||||
|         reset as argflag_reset, | ||||
|         argflag_std_base_read, | ||||
|         flag_reset as argflag_reset, | ||||
|         Flag,         | ||||
|     ) | ||||
|  | ||||
| @ -7,6 +7,8 @@ from hexathon import add_0x | ||||
| 
 | ||||
| cmds = { | ||||
|         'gas': chainlib.eth.cli.argflag_std_write | chainlib.eth.cli.Flag.WALLET, | ||||
|         'info': chainlib.eth.cli.argflag_reset(chainlib.cli.argflag_std_base_read, chainlib.eth.cli.Flag.CHAIN_SPEC), | ||||
|         'get': chainlib.eth.cli.argflag_reset(chainlib.cli.argflag_std_base_read, chainlib.eth.cli.Flag.CHAIN_SPEC), | ||||
|         } | ||||
| 
 | ||||
| if __name__ == '__main__': | ||||
|  | ||||
| @ -48,7 +48,8 @@ logg = logging.getLogger() | ||||
| script_dir = os.path.dirname(os.path.realpath(__file__))  | ||||
| config_dir = os.path.join(script_dir, '..', 'data', 'config') | ||||
| 
 | ||||
| arg_flags = chainlib.eth.cli.argflag_std_read | ||||
| arg_flags = chainlib.eth.cli.argflag_std_base_read  | ||||
| arg_flags = chainlib.eth.cli.argflag_reset(arg_flags, chainlib.eth.cli.Flag.CHAIN_SPEC) | ||||
| argparser = chainlib.eth.cli.ArgumentParser(arg_flags) | ||||
| argparser.add_positional('item', type=str, help='Address or transaction to retrieve data for') | ||||
| args = argparser.parse_args() | ||||
|  | ||||
							
								
								
									
										17
									
								
								man/get.head.groff
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								man/get.head.groff
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,17 @@ | ||||
| .TH eth-get 1 | ||||
| 
 | ||||
| .SH NAME | ||||
| eth-get \- Retrieve transaction and transaction state from network | ||||
| 
 | ||||
| .SH SYNOPSIS | ||||
| \fBeth-get\fP [ -p \fIrpc_provider\fP] \fItx_hash\fP | ||||
| 
 | ||||
| .SH DESCRIPTION | ||||
| .P | ||||
| Retrieve a transaction by its transaction hash. | ||||
| .P | ||||
| \fBeth-get\fP retrieves the state of the transaction (the "receipt") and applies it to the output. | ||||
| .P | ||||
| It also re-serializes the transaction wire format for reference.  | ||||
| 
 | ||||
| .SS OPTIONS | ||||
							
								
								
									
										27
									
								
								man/info.head.groff
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								man/info.head.groff
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,27 @@ | ||||
| .TH eth-info 1 | ||||
| 
 | ||||
| .SH NAME | ||||
| eth-info - Return key metrics from the current state of the EVM network. | ||||
| 
 | ||||
| .SH SYNOPSIS | ||||
| \fBeth-info\fP [ -p \fIrpc_provider\fP ] [ \fIkey\fP ] | ||||
| 
 | ||||
| .SH DESCRIPTION | ||||
| \fBeth-info\fP reports statistics from the current state of the EVM network: | ||||
| 
 | ||||
| .EX | ||||
| $ eth-info | ||||
| Block: 1024478 | ||||
| Gas price: 1000000000 | ||||
| .EE | ||||
| 
 | ||||
| An individual data item may be specified using the \fIkey\fP positional argument: | ||||
| 
 | ||||
| .EX | ||||
| $ eth-info block | ||||
| Block: 1024478 | ||||
| $ eth-info --raw gas_price | ||||
| 1000000000 | ||||
| .EE | ||||
| 
 | ||||
| .SS OPTIONS | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user