Add helpers for using Web3 types on the Confutils command-line
This commit is contained in:
parent
319af0b00b
commit
4fe1a81ce7
|
@ -0,0 +1,17 @@
|
||||||
|
import
|
||||||
|
ethtypes
|
||||||
|
|
||||||
|
func parseCmdArg*(T: type Address, input: TaintedString): T
|
||||||
|
{.raises: [ValueError, Defect].} =
|
||||||
|
fromHex(T, string input)
|
||||||
|
|
||||||
|
func completeCmdArg*(T: type Address, input: TaintedString): seq[string] =
|
||||||
|
return @[]
|
||||||
|
|
||||||
|
func parseCmdArg*(T: type BlockHash, input: TaintedString): T
|
||||||
|
{.raises: [ValueError, Defect].} =
|
||||||
|
fromHex(T, string input)
|
||||||
|
|
||||||
|
func completeCmdArg*(T: type BlockHash, input: TaintedString): seq[string] =
|
||||||
|
return @[]
|
||||||
|
|
Loading…
Reference in New Issue