Skip to content

Add overloads on ContractManagement#2242

Merged
erikzhang merged 3 commits intomasterfrom
native/add-overloads
Jan 19, 2021
Merged

Add overloads on ContractManagement#2242
erikzhang merged 3 commits intomasterfrom
native/add-overloads

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