mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-03 23:02:27 +00:00
Merge pull request #1264 from nspcc-dev/smartcontract/manifest/supported_standards
smartcontract: add list of supported standards to manifest
This commit is contained in:
commit
ef53a45e7a
7 changed files with 59 additions and 35 deletions
|
@ -359,7 +359,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(fs smartcontract.PropertyState) (*manifest.Manifest, error) {
|
||||
func (di *DebugInfo) ConvertToManifest(fs smartcontract.PropertyState, supportedStandards ...string) (*manifest.Manifest, error) {
|
||||
var err error
|
||||
if di.MainPkg == "" {
|
||||
return nil, errors.New("no Main method was found")
|
||||
|
@ -384,6 +384,9 @@ func (di *DebugInfo) ConvertToManifest(fs smartcontract.PropertyState) (*manifes
|
|||
|
||||
result := manifest.NewManifest(di.Hash)
|
||||
result.Features = fs
|
||||
if supportedStandards != nil {
|
||||
result.SupportedStandards = supportedStandards
|
||||
}
|
||||
result.ABI = manifest.ABI{
|
||||
Hash: di.Hash,
|
||||
Methods: methods,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue