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

[Neo Core Style] define a class for the contractbasemethod #3291

Merged
merged 2 commits into from
Jun 5, 2024

Conversation

Jim8y
Copy link
Contributor

@Jim8y Jim8y commented Jun 5, 2024

Description

Define a class for the contractbasemethod, avoid directly using method name string and int pcount everywhere.

Currently we directly use the string name of internal contract methods and its corresponding pcount as interger value everywhere, this makes it hard to maintain the core and is not a good coing experience. Thus i collect them together into a contractbasemethod record and added comments to explain them in detail.

Fixes # (issue)

Type of change

  • Optimization (the change is only an optimization)
  • Style (the change is only a code style for better maintenance or standard purpose)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Run existing tests are they are.

Test Configuration:

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@Jim8y Jim8y requested a review from a team June 5, 2024 00:04
@shargon shargon merged commit 2fa8f0c into neo-project:master Jun 5, 2024
6 checks passed
@Jim8y Jim8y deleted the contractbasemethod branch June 6, 2024 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants