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 AddressForKeystoreAlias(alias string) (common.Address, string, bool, error)
- func AddressesFlag(cmd *cobra.Command, flag string, required bool) ([]common.Address, error)
- func BigFloatArgFunc(key string, index int) func(*cobra.Command, []string) error
- func BigIntArgFunc(key string, index int) func(*cobra.Command, []string) error
- func BlockFlag(cmd *cobra.Command)
- func BoolArgFunc(key string, index int) func(*cobra.Command, []string) error
- func Bytes32FromArg(s string) ([32]byte, 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 CheckAddressesGetter(cmd *cobra.Command) func([]common.Address, error)
- func CheckBytes32Getter(cmd *cobra.Command) func([32]byte, error)
- func CheckBytesGetter(cmd *cobra.Command) func([]byte, 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 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 FilterOpts(cmd *cobra.Command) bind.FilterOpts
- func FlagOrConfigAddress(cmd *cobra.Command, flag, configKey string) (common.Address, error)
- func GetArgAddress(index int, args []string) (common.Address, error)
- func GetArgAddresses(index int, args []string) ([]common.Address, error)
- func HexArgFunc(key string, index int) func(*cobra.Command, []string) error
- func HexArgLenFunc(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 OptionalFlagAddress(cmd *cobra.Command, flag string) (common.Address, error)
- func PrintBlock(w io.Writer, latest *types.Header, block *types.Block) error
- func PrintTransaction(w io.Writer, tx *types.Transaction) error
- func PrintTransactionFn(cmd *cobra.Command) func(*types.Transaction, error)
- func ReplayTransaction(cmd *cobra.Command, h common.Hash, gasPrice *big.Int) error
- func StringsFlag(cmd *cobra.Command, flag string, required bool) ([]string, error)
- func UintArgFunc(key string, index, bitSize int) func(*cobra.Command, []string) error
- func WaitFlag(cmd *cobra.Command)
- func WaitOnTransaction(cmd *cobra.Command, tx common.Hash, timeout int) error
- func WaitOnTransactions(cmd *cobra.Command, transactions []common.Hash, timeout int) error
Constants ¶
This section is empty.
Variables ¶
var Conn *connection.Connection
Conn is a connection to the node
Functions ¶
func AddressArgFunc ¶
AddressArgFunc 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 AddressForKeystoreAlias ¶ added in v0.0.3
AddressForKeystoreAlias returns the address in the config 'keystoreAddressAliases' secion of the given alias
func AddressesFlag ¶ added in v0.2.0
AddressesFlag returns the addresses for the given flag, returning an error when unset and required
func BigFloatArgFunc ¶
BigFloatArgFunc returns a cobra.Command Arg function to validate the given argument index is a big.Float.
func BigIntArgFunc ¶
BigIntArgFunc returns a cobra.Command Arg function to validate the given argument index is a big.Int.
func BlockFlag ¶ added in v0.2.0
BlockFlag adds the 'block' flag to the given caller-session command
func BoolArgFunc ¶
BoolArgFunc returns a cobra.Command Arg function to validate the given argument index is a bool.
func Bytes32FromArg ¶ added in v0.2.0
Bytes32FromArg returns the bytes32 for the argument at the specified index.
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 CheckAccreditationGetter ¶
CheckAccreditationGetter prints the UTC date and EPOCH.
func CheckAddressGetter ¶
CheckAddressesGetter prints the address.
func CheckAddressesGetter ¶ added in v0.0.3
CheckAddressesGetter prints the collection of addresses.
func CheckBytes32Getter ¶ added in v0.2.0
CheckBytes32Getter prints the return hex
func CheckBytesGetter ¶ added in v0.2.0
CheckBytes32Getter prints the return hex
func CheckCountryGetter ¶
CheckCountryGetter prints the country code.
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 FilterOpts ¶ added in v0.2.0
func FilterOpts(cmd *cobra.Command) bind.FilterOpts
FilterOpts returns options with 'start' end 'end' values set from command-line flags
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 GetArgAddresses ¶ added in v0.2.0
GetArgAddresses returns the addresses 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
func HexArgLenFunc ¶ added in v0.2.0
HexArgLenFunc returns a cobra.Command Arg function that validates the argument at the given index is a hex string of the given length.
func IntArgFunc ¶
IntArgFunc 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 ¶
IsIntArg 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)
NewConnection returns a connection using the URL from 't0ken.yaml'
func NewKeystoreConnection ¶
func NewKeystoreConnection(cmd *cobra.Command, args []string) (*connection.Connection, error)
NewKeystoreConnection returns a connection using the URL, address, and optional password from 't0ken.yaml'
func OptionalFlagAddress ¶ added in v0.2.0
FlagAddress returns the address of the given flag, when set.
func PrintBlock ¶ added in v0.0.3
PrintBlock prints the block info.
func PrintTransaction ¶
func PrintTransaction(w io.Writer, tx *types.Transaction) error
PrintTransaction prints the transaction info.
func PrintTransactionFn ¶ added in v0.0.3
func PrintTransactionFn(cmd *cobra.Command) func(*types.Transaction, error)
PrintTransactionFn returns a function that checks for an error, printing the transaction when successful.
func ReplayTransaction ¶ added in v0.0.3
ReplayTransaction attempts to replay an existing, pending transaction.
func StringsFlag ¶ added in v0.2.0
StringsFlag returns the strings for the given flag, returning an error when unset and required
func UintArgFunc ¶
UintArgFunc returns a cobra.Command Arg function to validate the given argument index is an uint of the specified bit size.
func WaitFlag ¶ added in v0.0.5
WaitFlag adds the 'wait' flag to the given command, to wait for 'n' confirmations..
func WaitOnTransaction ¶ added in v0.0.3
Types ¶
This section is empty.