-
Notifications
You must be signed in to change notification settings - Fork 81
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
NEP-14 and NEP-15 support #1651
Comments
I'll check the documentation, but we of course do support NEP-15 manifests, take a look at workshop page for example. The only potential inconvenience is that the compiler needs both Go source code and YAML metadata file (but our examples do have them) with name/standards/safe methods/events description to generate proper manifest. In your case it would be something like this:
|
Thanks! Actually, I simply didn't read the fucking manual, and also didn't execute It's all fine, and thanks anyway for your answer! 💯 |
Just a follow-up question: What's the reason for having the .yml metadata along with the Go smart contracts? I would like to have an insight into your design decision. |
We need to get metadata from somewhere, currently that's contract's name, list of supported standards, list of safe methods and events. And we don't have anything similar to C# attributes in Go (the closest thing probably is tag in structure field declaration, but that's just for struct fields), so we either need to invent some magic comments (or magic variables, see #1038 also) or use a separate "project descriptor" file. We've used YAMLs for metadata in Neo 2.x implementation, so adapting them to Neo 3 was a natural choice. I'm open for better suggestions though. |
@roman-khimov thanks for the clarification! Let's close this issue and I will move the discussion about this to #1038 . 👍 |
I don't know if I just overlooked, or maybe the documentation didn't mention it, but I could not find a way to compile a smart contract and outputting the ABI of it.
My question is:
How can I compile the
examples/token/token.go
and output an ABI/manifest that is compatible with NEP-14/NEP-15?The text was updated successfully, but these errors were encountered: