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

Add overloads on ContractManagement #2242

Merged
merged 3 commits into from
Jan 19, 2021
Merged

Add overloads on ContractManagement #2242

merged 3 commits into from
Jan 19, 2021

Conversation

erikzhang
Copy link
Member

No description provided.

@erikzhang erikzhang closed this Jan 16, 2021
@erikzhang erikzhang deleted the native/add-overloads branch January 16, 2021 13:15
@erikzhang erikzhang restored the native/add-overloads branch January 16, 2021 13:20
@erikzhang erikzhang reopened this Jan 16, 2021
@@ -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)];
Copy link
Member

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? 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's impossible.

Copy link
Member

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.

Copy link
Member Author

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.

@superboyiii superboyiii mentioned this pull request Jan 18, 2021
36 tasks
@cloud8little
Copy link
Contributor

Test passed with NEP17 contract deploy/update.

@erikzhang erikzhang merged commit 14529e6 into master Jan 19, 2021
@erikzhang erikzhang deleted the native/add-overloads branch January 19, 2021 09:26
cloud8little pushed a commit to cloud8little/neo that referenced this pull request Jan 24, 2021
ixje added a commit to CityOfZion/neo-mamba that referenced this pull request Feb 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants