-
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
Add overloads on ContractManagement #2242
Conversation
@@ -121,7 +121,7 @@ internal void Invoke(ApplicationEngine engine) | |||
throw new InvalidOperationException("It is not allowed to use Neo.Native.Call directly to call native contracts. System.Contract.Call should be used."); | |||
ExecutionContext context = engine.CurrentContext; | |||
string operation = context.EvaluationStack.Pop().GetString(); | |||
ContractMethodMetadata method = methods[operation]; | |||
ContractMethodMetadata method = methods[(operation, context.EvaluationStack.Count)]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be possible to have more items before cal the method? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's impossible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
InvocationScript
it's controlled by the user, and maybe it can choose a different method if he add a new item.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If he pushes more or less items, the contract should fail.
Test passed with NEP17 contract deploy/update. |
No description provided.