-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Auto generate entrypoint method redirection based on method names / ABI #1094
Comments
@shargon but how does it work? Is the compiler blocking an implementation of |
The compiler generate it, only if not exists |
@shargon I think we should block it completely, otherwise the ABI method names may not match the operation argument, and in my opinion, it should always match, after all, that is why the ABI is for |
I don't think so, I think that should be created only if not exist, like now, maybe you need to add specific logic for verification, or maybe you don't want to create methods. Now is more powerful. Acording to the abi, if a developer want to do by himself, what is wrong? |
@shargon the problem is that the ABI won't represent what it should: the contract interface. What is the sense of having an interface if it is not respected? 🤔 |
If we avoid the What do you think @erikzhang @lightszero? |
This is an interesting proposal. Usually we call a contract like this:
Do you mean that we change to this:
This will indeed be faster. But I can think of some drawbacks, such as the inability to hide private methods. |
exactly this
If we allow only the offset if it is inside the ABI, we can hide them. |
Then we need to compare. I think it is the same as comparing the method. |
Summary
Today we have the ABI listing the methods available in a contract, however, it is not possible to know how to call these methods, because it depends on the implementation of the "switch statement", so the operation parameter doesn't have to match any method name in the ABI - but it should.
Do you have any solution you want to propose?
We should auto generate the entrypoint map to the methods, just like neo-one does.
If we can ensure that the operation matches the method names, we can automatically deserialize the results based on the ABI and allow users to explore and use smart contracts deployed in the network.
Where in the software does this update applies to?
The text was updated successfully, but these errors were encountered: