-
Notifications
You must be signed in to change notification settings - Fork 0
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
[NayNay] User Programs: Add Program + testing #173
Conversation
- updated folder structure for consistency - added new method for adding programs as a pure function - added tests
Things missing from checklist @rh0delta |
export async function addProgram (entropy: Entropy, { programPointer, programConfig, verifyingKey }: AddProgramParams): Promise<void> { | ||
return entropy.programs.add( | ||
{ | ||
program_pointer: programPointer, | ||
program_config: programConfig, | ||
}, | ||
verifyingKey | ||
) | ||
} |
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.
❓ this extraction doesn't seem to add much other than a variant API.
It's fine if it helps parts of the code conform to the same pattern and/or we expect the complexity here to grow? Feels like marginal gain because it doesn't really improve readability and the function you're wrapping is an SDK method which is already tested.
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.
Your choice as to whether it's worth the change
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 we're going single-function-files then I'd probably call the file add-program.ts
I wouldn't worry because I think we're gonna workshop the file/folder structure of this repo in the "near" future
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.
I believe the idea here is to conform to a structure where we are essentially creating these pure functions to work with both the tui and programmatic cli, mainly to reduce repetition of the same code in multiple files.
Related Issue(s)
Proposed Changes
Testing
Screenshots (if applicable)
Additional Context
Checklist
CHANGELOG.md
entry.github.com:entropyxyz/entropy-docs
, where necessary.