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 ¶ added in v0.102.0
ToEventBindingName converts event name specified in the contract manifest to a valid go exported event structure name.
func ToParameterBindingName ¶ added in v0.102.0
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
IsNep24 bool
IsNep24Payable bool
HasReader bool
HasWriter bool
HasIterator bool
}
type CustomEventTemplate ¶ added in v0.102.0
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 ¶ added in v0.102.0
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 ¶ added in v0.100.0
type SafeMethodTmpl struct {
binding.MethodTmpl
Unwrapper string
ItemTo string
ExtendedReturn binding.ExtendedType
}
Click to show internal directories.
Click to hide internal directories.