Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Generate ¶
Generate writes Go file containing smartcontract bindings to the `cfg.Output`. It doesn't check manifest from Config for validity, incorrect manifest can lead to unexpected results.
func ToEventBindingName ¶
ToEventBindingName converts event name specified in the contract manifest to a valid go exported event structure name.
func ToParameterBindingName ¶
ToParameterBindingName converts parameter name specified in the contract manifest to a valid go structure's exported field name.
Types ¶
type ContractTmpl ¶
type ContractTmpl struct { binding.ContractTmpl SafeMethods []SafeMethodTmpl CustomEvents []CustomEventTemplate NamedTypes []binding.ExtendedType IsNep11D bool IsNep11ND bool IsNep17 bool HasReader bool HasWriter bool HasIterator bool }
type CustomEventTemplate ¶
type CustomEventTemplate struct { // Name is the event's name that will be used as the event structure name in // the resulting RPC binding. It is a valid go structure name and may differ // from ManifestName. Name string // ManifestName is the event's name declared in the contract manifest. // It may contain any UTF8 character. ManifestName string Parameters []EventParamTmpl }
type EventParamTmpl ¶
type EventParamTmpl struct { binding.ParamTmpl // ExtType holds the event parameter's type information provided by Manifest, // i.e. simple types only. ExtType binding.ExtendedType }
type SafeMethodTmpl ¶
type SafeMethodTmpl struct { binding.MethodTmpl Unwrapper string ItemTo string ExtendedReturn binding.ExtendedType }
Click to show internal directories.
Click to hide internal directories.