Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NEP5: In C#.NEO, you can't have a method and an event with the same name (e.g. transfer) as required in the specification #33

Closed
mwherman2000 opened this issue Mar 22, 2018 · 5 comments
Labels

Comments

@mwherman2000
Copy link
Contributor

mwherman2000 commented Mar 22, 2018

The NEP5 spec (https://github.com/neo-project/proposals/blob/master/nep-5.mediawiki) states that there are to be a Required method and a Required event both called transfer. This isn't allowed in C#.NEO.

The specification needs to be corrected/updated. It's not strong enough to be implemented reliably on the NEO platform as it is written.

@erikzhang
Copy link
Member

@mwherman2000
Copy link
Contributor Author

mwherman2000 commented Mar 23, 2018

The next line in the example is what I'm referring to: https://github.com/neo-project/examples-csharp/blob/master/ICO_Template/ICO_Template.cs#L29 doesn't conform to the specification or visa versa.

The event is called transfer in the specification and Transferred in the example you provided.

@RavenXce
Copy link

The method name is not important and isn't specified in the spec as it is compiled away. Only the event name matters.

@mwherman2000
Copy link
Contributor Author

mwherman2000 commented Mar 23, 2018

The specification needs to say that - it needs to be reliable: accurate, clear, correct, and complete.

It needs to be a document that can be given to:

  1. A C#NEO developer and have enough detail about the actual expected smart contract interfaces and intended functionality for him/her to create a conforming NEP5 smart contract (e.g. the method public static object Main(string operation, params object[] args) is not mentioned anywhere in the specification) . There is not enough accurate, clear, correct, and complete information in the current specification for a developer to create a conforming, verifiable NEP5 smart contract.
  2. A quality assurance/quality control/tester along with the developer's implementation to verify the the smart contract works and conforms to the specification. There is not enough accurate, clear, correct, and complete information in the current specification for a tester to verify a particular smart contract implementation conforms to the NEP5 specification.
  3. Third-parties such as developers of wallets and other NEO software infrastructure components that interact with NEP5 smart contracts to verify that:
    a) their code conforms to the NEP5 specification as a consumer of NEP5 smart contacts, as well as
    b) any particular smart contract implementation used by a wallet or other software components also conforms to the NEP5 specification.

The specification needs to be corrected/updated. It's not strong enough to be implemented reliably on the NEO platform as it is written. It needs to be a specification ...not a high-level guide.

For example, https://github.com/neo-project/examples-csharp/blob/master/ICO_Template/ICO_Template.cs#L29, does not conform to the NEP5 specification as it is written today.

@mwherman2000
Copy link
Contributor Author

NEP5 is really an interoperability specification between NEP5 smart contracts and wallets ...that's why it needs to reliable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants