smartcontract: add list of supported standards to manifest

Closes #1204
This commit is contained in:
Anna Shaleva 2020-08-04 12:55:36 +03:00
parent 3e192b11b2
commit 66ceaa6b75
7 changed files with 59 additions and 35 deletions

View file

@ -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,