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

refactor(scripts): implement ScriptContext #851

Merged
merged 1 commit into from
Nov 28, 2023
Merged

Conversation

glevco
Copy link
Contributor

@glevco glevco commented Nov 5, 2023

Motivation

Create the ScriptContext scaffolding that may be used by future opcodes.

Acceptance Criteria

  • Create new, currently empty, ScriptContext class.
  • Change function opcodes execution to use a new execute_op_code(), that takes a ScriptContext as an argument.
  • Remove unused arguments from all opcode functions.

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged

@glevco glevco self-assigned this Nov 5, 2023
Copy link

codecov bot commented Nov 5, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (cffe172) 85.34% compared to head (d3c075f) 85.25%.

Files Patch % Lines
hathor/transaction/scripts/opcode.py 97.08% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #851      +/-   ##
==========================================
- Coverage   85.34%   85.25%   -0.10%     
==========================================
  Files         281      282       +1     
  Lines       22392    22413      +21     
  Branches     3391     3402      +11     
==========================================
- Hits        19111    19108       -3     
- Misses       2599     2615      +16     
- Partials      682      690       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@glevco glevco marked this pull request as ready for review November 5, 2023 18:28
Base automatically changed from refactor/scripts to master November 7, 2023 01:56
@glevco glevco force-pushed the feat/script-context branch from 4ade1b1 to 309cd74 Compare November 7, 2023 02:02
hathor/transaction/scripts/opcode.py Show resolved Hide resolved
hathor/transaction/scripts/execute.py Outdated Show resolved Hide resolved
@glevco glevco force-pushed the feat/script-context branch from b8ac57b to 431d711 Compare November 27, 2023 20:22
Copy link
Member

@jansegre jansegre left a comment

Choose a reason for hiding this comment

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

Approved, but it's not a feature, it's a refactor, right?

@glevco glevco force-pushed the feat/script-context branch from f35564b to d3c075f Compare November 28, 2023 21:36
@glevco glevco changed the title feat(scripts): implement ScriptContext refactor(scripts): implement ScriptContext Nov 28, 2023
@glevco glevco merged commit 573c054 into master Nov 28, 2023
9 checks passed
@glevco glevco deleted the feat/script-context branch November 28, 2023 23:45
@jansegre jansegre mentioned this pull request Dec 11, 2023
2 tasks
This was referenced Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants