cli: fetch extended evet types from contract config
The user should specify it via parameter's `extendedtype` field and via upper-level `namedtypes` field of the contract configuration YAML. Also, as we have proper event structure source, make the `--guess-eventtype` compilation option and make event types guess optional. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
parent
194639bb15
commit
e2580187a1
8 changed files with 216 additions and 36 deletions
|
@ -593,9 +593,20 @@ func (di *DebugInfo) ConvertToManifest(o *Options) (*manifest.Manifest, error) {
|
|||
if o.ContractSupportedStandards != nil {
|
||||
result.SupportedStandards = o.ContractSupportedStandards
|
||||
}
|
||||
events := make([]manifest.Event, len(o.ContractEvents))
|
||||
for i, e := range o.ContractEvents {
|
||||
params := make([]manifest.Parameter, len(e.Parameters))
|
||||
for j, p := range e.Parameters {
|
||||
params[j] = p.Parameter
|
||||
}
|
||||
events[i] = manifest.Event{
|
||||
Name: o.ContractEvents[i].Name,
|
||||
Parameters: params,
|
||||
}
|
||||
}
|
||||
result.ABI = manifest.ABI{
|
||||
Methods: methods,
|
||||
Events: o.ContractEvents,
|
||||
Events: events,
|
||||
}
|
||||
if result.ABI.Events == nil {
|
||||
result.ABI.Events = make([]manifest.Event, 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue