Documentation
¶
Index ¶
- Variables
- func AddressArgFunc(key string, index int) func(*cobra.Command, []string) error
- func AddressArgOrKeystoreAddressFunc(key string, index int) func(*cobra.Command, []string) error
- func BigFloatArgFunc(key string, index int) func(*cobra.Command, []string) error
- func BigIntArgFunc(key string, index int) func(*cobra.Command, []string) error
- func BoolArgFunc(key string, index int) func(*cobra.Command, []string) error
- func ChainArgs(funcs ...func(cmd *cobra.Command, args []string) error) func(*cobra.Command, []string) error
- func CheckAccreditationGetter(cmd *cobra.Command) func(*big.Int, error)
- func CheckAddressGetter(cmd *cobra.Command) func(common.Address, error)
- func CheckCountryGetter(cmd *cobra.Command) func([2]byte, error)
- func CheckErr(cmd *cobra.Command, err error)
- func CheckGetter(cmd *cobra.Command) func(interface{}, error)
- func CheckHashGetter(cmd *cobra.Command) func([32]byte, error)
- func Connect(cmd *cobra.Command, args []string)
- func ConnectWithKeyStore(cmd *cobra.Command, args []string)
- func CountryCodeArgFunc(key string, index int) func(*cobra.Command, []string) error
- func CountryFromArg(s string) ([2]byte, error)
- func DateArgFunc(key string, index int) func(*cobra.Command, []string) error
- func DateFromArg(s string) (time.Time, error)
- func FlagOrConfigAddress(cmd *cobra.Command, flag, configKey string) (common.Address, error)
- func GetArgAddress(index int, args []string) (common.Address, error)
- func HexArgFunc(key string, index int, length int) func(*cobra.Command, []string) error
- func IntArgFunc(key string, index int) func(*cobra.Command, []string) error
- func IsAddress(s string) error
- func IsAddressArg(key string, args []string, i int) error
- func IsIntArg(key string, args []string, i int) error
- func NewConnection(cmd *cobra.Command, args []string) (*connection.Connection, error)
- func NewKeystoreConnection(cmd *cobra.Command, args []string) (*connection.Connection, error)
- func PrintTransFn(cmd *cobra.Command) func(*types.Transaction, error)
- func PrintTransaction(cmd *cobra.Command, tx *types.Transaction)
- func UintArgFunc(key string, index, bitSize int) func(*cobra.Command, []string) error
Constants ¶
This section is empty.
Variables ¶
var Conn *connection.Connection
Conn is a connection to the node
Functions ¶
func AddressArgFunc ¶
BoolArgFunc returns a cobra.Command Arg function to validate the given argument index is a common.Address.
func AddressArgOrKeystoreAddressFunc ¶
AddressArgOrKeystoreAddressFunc returns a cobra.Command Arg function to validate that either the 'keystoreAddress' arg is set, or a config file value is set.
func BigFloatArgFunc ¶
BoolArgFunc returns a cobra.Command Arg function to validate the given argument index is a big.Float.
func BigIntArgFunc ¶
BoolArgFunc returns a cobra.Command Arg function to validate the given argument index is a big.Int.
func BoolArgFunc ¶
BoolArgFunc returns a cobra.Command Arg function to validate the given argument index is a bool.
func ChainArgs ¶
func ChainArgs(funcs ...func(cmd *cobra.Command, args []string) error) func(*cobra.Command, []string) error
ChainArgs chains the given args functions for use as a single cobra.Command Args.
func CheckAddressGetter ¶
CheckGetter prints the given error and exits, if the error is not nil, otherwise the returned address is printed.
func CheckGetter ¶
CheckGetter prints the given error and exits, if the error is not nil, otherwise the return value is printed.
func ConnectWithKeyStore ¶
Connect creates a connection to the node, using the address from the keystore as the transactor
func CountryCodeArgFunc ¶
CountryCodeArgFunc returns a cobra.Command Arg function that validates the argument at the given index is a valid country code.
func CountryFromArg ¶
CountryFromArg returns the country code in bytes.
func DateArgFunc ¶
DateArgFunc returns a cobra.Command Arg function that validates the argument at the given index is a valid date.
func DateFromArg ¶
DateFromArg returns the parsed string as a date.
func FlagOrConfigAddress ¶
FlagOrConfigAddress returns the address of the given flag, when set, or the matching address for the given key, within the config file.
func GetArgAddress ¶
GetArgAddress returns the address for the argument at the specified index.
func HexArgFunc ¶
HexArgFunc returns a cobra.Command Arg function that validates the argument at the given index is a hex string of the given length.
func IntArgFunc ¶
BoolArgFunc returns a cobra.Command Arg function to validate the given argument index is an int.
func IsAddressArg ¶
IsAddressArg validates that the args contains enough values, and if the given argument position is a valid address.
func IsIntArg ¶
IsAddressArg validates that the args contains enough values, and if the given argument position is an int.
func NewConnection ¶
func NewConnection(cmd *cobra.Command, args []string) (*connection.Connection, error)
func NewKeystoreConnection ¶
func NewKeystoreConnection(cmd *cobra.Command, args []string) (*connection.Connection, error)
func PrintTransFn ¶
func PrintTransFn(cmd *cobra.Command) func(*types.Transaction, error)
PrintTransFn returns a function that checks for an error, printing the transaction when successful.
func PrintTransaction ¶
func PrintTransaction(cmd *cobra.Command, tx *types.Transaction)
PrintTransaction prints the transaction info.
Types ¶
This section is empty.