Documentation ¶
Index ¶
- Variables
- func AddContractCallFlags(flagSet *flag.FlagSet, callFlags *ContractCallFlags)
- func AddContractStaticCallFlags(flagSet *flag.FlagSet, callFlags *ContractCallFlags)
- func CallContract(defaultAddr string, method string, params proto.Message, result interface{}) error
- func CallContractWithFlags(callFlags *ContractCallFlags, defaultAddr string, method string, ...) error
- func ContractCallCommand(name string) *cobra.Command
- func ContractResolveCommand() *cobra.Command
- func GetSigner(privFile, hsmConfigFile, algo string) (auth.Signer, error)
- func ParseAddress(s, chainID string) (diadem.Address, error)
- func ParseAmount(s string) (*diadem.BigUInt, error)
- func ParseBytes(s string) ([]byte, error)
- func ResolveAccountAddress(address string, chainFlags *ContractCallFlags) (diadem.Address, error)
- func ResolveAddress(s, chainID, URI string) (diadem.Address, error)
- func ResolveContract(callFlags *ContractCallFlags, defaultAddr string) (*client.Contract, error)
- func StaticCallContract(defaultAddr string, method string, params proto.Message, result interface{}) error
- func StaticCallContractWithFlags(callFlags *ContractCallFlags, defaultAddr string, method string, ...) error
- type ContractCallFlags
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func AddContractCallFlags ¶
func AddContractCallFlags(flagSet *flag.FlagSet, callFlags *ContractCallFlags)
AddContractCallFlags adds flags to the given flag set that are used when calling a mutable method on a Go contract.
func AddContractStaticCallFlags ¶
func AddContractStaticCallFlags(flagSet *flag.FlagSet, callFlags *ContractCallFlags)
AddContractStaticCallFlags adds flags to the given flag set that are used when calling a static method on a Go contract.
func CallContract ¶
func CallContractWithFlags ¶
func ContractCallCommand ¶
ContractCallCommand is deprecated in favor of CallContractWithFlags / StaticCallContractWithFlags
func ContractResolveCommand ¶
func ParseAddress ¶
ParseAddress attempts to parse the given string into an address, if the resulting address doesn't have a chain ID the given chain ID will be used instead.
func ParseBytes ¶
func ResolveAccountAddress ¶
func ResolveAccountAddress(address string, chainFlags *ContractCallFlags) (diadem.Address, error)
ResolveAccountAddress attempts to parse the given string into the address of a user account. If the chain ID on the parsed address doesn't match the chain ID specified in chainFlags then the address is resolved to an on-chain address via the address mapper.
func ResolveAddress ¶
ResolveAddress attempts to parse the given string into an address, if that fails it assumes the string corresponds to a contract name and attempts to obtain the corresponding contract address.
func ResolveContract ¶
func ResolveContract(callFlags *ContractCallFlags, defaultAddr string) (*client.Contract, error)