diff --git a/pkg/compiler/debug.go b/pkg/compiler/debug.go index 9a80ffd3f..b8bf2b306 100644 --- a/pkg/compiler/debug.go +++ b/pkg/compiler/debug.go @@ -461,6 +461,13 @@ func (di *DebugInfo) ConvertToManifest(o *Options) (*manifest.Manifest, error) { "multiple methods with the same number of parameters", name) } m.Name = emitName + // Check the resulting name against set of safe methods. + for i := range o.SafeMethods { + if m.Name == o.SafeMethods[i] { + m.Safe = true + break + } + } } return result, nil } diff --git a/pkg/smartcontract/manifest/standard/comply.go b/pkg/smartcontract/manifest/standard/comply.go index 35986b225..26a87a391 100644 --- a/pkg/smartcontract/manifest/standard/comply.go +++ b/pkg/smartcontract/manifest/standard/comply.go @@ -129,7 +129,7 @@ func checkMethod(m *manifest.Manifest, expected *manifest.Method, } } if expected.Safe != actual.Safe { - return fmt.Errorf("%w: expected %t", ErrSafeMethodMismatch, expected.Safe) + return fmt.Errorf("'%s' %w: expected %t", expected.Name, ErrSafeMethodMismatch, expected.Safe) } return nil }