Merge pull request #1296 from nspcc-dev/smartcontract/examples
examples: update examples
This commit is contained in:
commit
c3f7a419a0
19 changed files with 248 additions and 275 deletions
|
@ -14,6 +14,7 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/nspcc-dev/neo-go/pkg/smartcontract"
|
||||
"github.com/nspcc-dev/neo-go/pkg/smartcontract/manifest"
|
||||
"github.com/nspcc-dev/neo-go/pkg/smartcontract/nef"
|
||||
"golang.org/x/tools/go/loader"
|
||||
)
|
||||
|
@ -37,6 +38,9 @@ type Options struct {
|
|||
// Contract features.
|
||||
ContractFeatures smartcontract.PropertyState
|
||||
|
||||
// Runtime notifications.
|
||||
ContractEvents []manifest.Event
|
||||
|
||||
// The list of standards supported by the contract.
|
||||
ContractSupportedStandards []string
|
||||
}
|
||||
|
@ -190,7 +194,7 @@ func CompileAndSave(src string, o *Options) ([]byte, error) {
|
|||
}
|
||||
|
||||
if o.ManifestFile != "" {
|
||||
m, err := di.ConvertToManifest(o.ContractFeatures, o.ContractSupportedStandards...)
|
||||
m, err := di.ConvertToManifest(o.ContractFeatures, o.ContractEvents, o.ContractSupportedStandards...)
|
||||
if err != nil {
|
||||
return b, fmt.Errorf("failed to convert debug info to manifest: %w", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue