neo-project / neo-express

Neo Private Net optimized for development scenarios
MIT License
35 stars 37 forks source link

NEP-17 Validation is breaking existing examples #428

Closed lock9 closed 8 months ago

lock9 commented 9 months ago

Describe the bug Neo express is refusing to deploy a NEP-17 contract, arguing that it's not NEP-17 compliant. The problem applies to both our Python and C# examples. We believe that the validation may not be working as expected.

To Reproduce Steps to reproduce the behavior:

  1. Create a NEP-17 example / take one from here: https://gist.github.com/lock9/78aa3b2fc41c44b453b7b9ab82f21be8
  2. Compile the contract
  3. Try to deploy the contract
  4. See error: System.Exception: Coin Contract Contract declares support for NEP-17 standards. However is not NEP-17 compliant. Invalid methods/events.

Expected behavior We believe it should work. We are having the same issue with our Python NEP-17 contract. We've tried to update the manifest manually to fix differences in parameter names or types, but it didn't work.

please complete the following information

roman-khimov commented 8 months ago

There should be a better error message, of course (manifest is not compliant with 'NEP-17': 'balanceOf' method has wrong safe flag: expected true for example), but have you checked the manifest against NEP-17?

cschuchardt88 commented 8 months ago

It was a typo in neo-express with transfer not being Transfer

lock9 commented 8 months ago

There should be a better error message, of course (manifest is not compliant with 'NEP-17': 'balanceOf' method has wrong safe flag: expected true for example), but have you checked the manifest against NEP-17?

Yes, I did. Two different examples stopped working, which is why I suspected it was a bug (it is). It will be fixed by #430

Jim8y commented 8 months ago

fixed by https://github.com/neo-project/neo-express/pull/430