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 inherit/extends from Native standard #772

Closed
igormcoelho opened this issue May 23, 2019 · 4 comments
Closed

NEP5 inherit/extends from Native standard #772

igormcoelho opened this issue May 23, 2019 · 4 comments
Labels
Design Issue state - Feature accepted but the solution requires a design before being implemented Feature Type: Large changes or new features Ledger Module - The ledger is our 'database', this is used to tag changes about how we store information VM New features that affect the Neo Virtual Machine or the Interop layer

Comments

@igormcoelho
Copy link
Contributor

igormcoelho commented May 23, 2019

It would be incredibly safe for users if they manage to deploy some token contract that inherits from Native NEP5.
It could be something declared in the manifest, for example, "inheritsFrom" : "NEP5scripthash" (or done manually, or even as part of Contract.Create informing parent hashes). The expected result for a "transfer" operation is: before invoking my contract, first invoke NEP5scripthash "transfer" with the given parameters,then invoke my operations.
We could also do this manually if a native implementation is provided. For example:

Main (op , args )
if op == "transfer", invoke "super::transfer" with my own storage.

This would make it much safer and fast to develop contracts on Neo. Whats your thoughts ?

@erikzhang erikzhang added the Discussion Initial issue state - proposed but not yet accepted label May 24, 2019
@erikzhang erikzhang added this to the NEO 3.0 milestone May 24, 2019
@erikzhang
Copy link
Member

Very interesting.

@shargon
Copy link
Member

shargon commented May 24, 2019

Is a good feature, but instead of with native contracts, maybe with syscalls

@igormcoelho
Copy link
Contributor Author

Is a good feature, but instead of with native contracts, maybe with syscalls

I think that any hash can be provided as the "parent hash" (or multiple parents). If native, it will be like you said, syscall +name... anyway, it could be any deployed contract (even not native).

@lock9 lock9 added Design Issue state - Feature accepted but the solution requires a design before being implemented Ledger Module - The ledger is our 'database', this is used to tag changes about how we store information Feature Type: Large changes or new features VM New features that affect the Neo Virtual Machine or the Interop layer and removed Discussion Initial issue state - proposed but not yet accepted labels Aug 12, 2019
@lock9
Copy link
Contributor

lock9 commented Sep 12, 2019

@igormcoelho would you like to work in this feature? We plan to have this in our next version. If you don't want to work on it, is it ok if we assign someone else to do it?

@erikzhang erikzhang removed this from the NEO 3.0 milestone Dec 6, 2019
Thacryba pushed a commit to simplitech/neo that referenced this issue Feb 17, 2020
* workshops

* Update index.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Design Issue state - Feature accepted but the solution requires a design before being implemented Feature Type: Large changes or new features Ledger Module - The ledger is our 'database', this is used to tag changes about how we store information VM New features that affect the Neo Virtual Machine or the Interop layer
Projects
None yet
Development

No branches or pull requests

4 participants