-
Notifications
You must be signed in to change notification settings - Fork 11
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
*.nef files not found in the current workspace #34
Comments
I think the problem is that there is no metadata file (and the text of the error message is a bit misleading!) Adding a right click option for .nef will be possible (I'll still have to make it emit an error if the metadata cannot be found, though) |
hmmm... got it. So, what's the file extension the vscode extension is looking for to detect the "metadata" (file manifest/ABI)? And, most importantly: how does the vscode extensions associate that a metadata file belongs to a particular .nef file? (given the fact that a workspace could contain multiple compiled smart contracts (.nef's))
Looking forward to it! 💯 👍 |
NEON produces four files - .nef, .manifest.json, .abi.json and .nefdbgnfo. They are all generated in the same folder as the source DLL or project file resides and all have the same base file name. i.e. mycontract.dll generates mycontract.nef, mycontract.manifest.json, mycontract.nefdbgnfo and mycontract.abi.json. The NEF and manifest files are required for deployment. nefdbgnfo is used by the debugger. abi.json is redundant in NEO 3 - that information is duplicated in the manifest file. |
@devhawk alright, neow3j outputs these files. But it seems that some of the SDKs/compilers in the community does not follow this. Do you think that we could write a small "standard" (NEP) for this? Or even, include this information to NEP-14 and NEP-15. I could try to propose this, since it gets clear to interoperability of tools at a higher level (e.g., vs code extensions, etc). |
There's already a neo proposal for the contract manifest: neo-project/proposals#114 |
@devhawk I don't see anywhere written that files should be named ".manifest.json" or ".nefdbgnfo.json", or "*.abi.json" in this proposal, though. Again, just because NEON produces those files and that However, if I would prefer simply to "standardize" that, somewhere, and make compilers aware that those names should be produced by default. 😄 |
Good point @gsmachado regarding .manifest.json file extension. File extension for debug info however is specified in NDX-DN11. And the .abi.json file is not used at all in neo 3, so we can safely ignore that file. Technically, from the platform perspective, only the file contents of the contract binary and manifest matter - the platform doesn't store them in the file system with an extension anyway. However, for the sake of tooling, it seems we should include some text in both the NEF and manfest NEPs that specify file extension naming conventions when this content is stored in a file system. You want to open the issues or should I @gsmachado ? |
@devhawk I initiated the discussion and Erik included in the NEP. 👍 😄 |
aaaaaand, it was also included in this NEP. 🚀 |
@djnicholson you can assign this issue to me. I will test your last commits and I will come here to close the issue if that's the case, thanks. |
I forgot to close this issue. My fault. I tested and it's fine. Closing. 💪 |
Hello @devhawk @djnicholson
I have a Golang workspace, where I create a
token.go
file, which is a smart contract. I compiled this smart contract in the workspace, and atoken.nef
file was the output:Then, after initializing the neo-express and stuff, I tried to deploy the contract like this:
Then, this message immediately appeared:
I believe this is a bug since I clearly have at least one
.nef
file in my vscode workspace.The text was updated successfully, but these errors were encountered: