mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-03 23:02:27 +00:00
compiler: use Options
in ConvertToManifest()
This commit is contained in:
parent
03d32ecd61
commit
9fd8577dd9
5 changed files with 13 additions and 13 deletions
|
@ -425,7 +425,7 @@ func parsePairJSON(data []byte, sep string) (string, string, error) {
|
|||
|
||||
// ConvertToManifest converts contract to the manifest.Manifest struct for debugger.
|
||||
// Note: manifest is taken from the external source, however it can be generated ad-hoc. See #1038.
|
||||
func (di *DebugInfo) ConvertToManifest(name string, events []manifest.Event, supportedStandards ...string) (*manifest.Manifest, error) {
|
||||
func (di *DebugInfo) ConvertToManifest(o *Options) (*manifest.Manifest, error) {
|
||||
if di.MainPkg == "" {
|
||||
return nil, errors.New("no Main method was found")
|
||||
}
|
||||
|
@ -440,16 +440,16 @@ func (di *DebugInfo) ConvertToManifest(name string, events []manifest.Event, sup
|
|||
}
|
||||
}
|
||||
|
||||
result := manifest.NewManifest(name)
|
||||
if supportedStandards != nil {
|
||||
result.SupportedStandards = supportedStandards
|
||||
}
|
||||
if events == nil {
|
||||
events = make([]manifest.Event, 0)
|
||||
result := manifest.NewManifest(o.Name)
|
||||
if o.ContractSupportedStandards != nil {
|
||||
result.SupportedStandards = o.ContractSupportedStandards
|
||||
}
|
||||
result.ABI = manifest.ABI{
|
||||
Methods: methods,
|
||||
Events: events,
|
||||
Events: o.ContractEvents,
|
||||
}
|
||||
if result.ABI.Events == nil {
|
||||
result.ABI.Events = make([]manifest.Event, 0)
|
||||
}
|
||||
result.Permissions = []manifest.Permission{
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue