Skip to content

improvements: Repeated arguments and quick operations helpers #376

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

Open
ivaylogarnev-limechain opened this issue Apr 7, 2025 · 0 comments
Milestone

Comments

@ivaylogarnev-limechain
Copy link
Contributor

ivaylogarnev-limechain commented Apr 7, 2025

I've noticed that we're repeating a lot of the same arguments in multiple places, which makes the code harder to maintain. One optimization idea is to extract those repeated arguments into a separate file for reuse, improving clarity and reducing duplication. We can explore patterns or techniques to manage and reduce repetitive code in test suites.

Additionally, I think we can introduce more helper functions for commonly used operations instead of relying on JSONRPCRequest everywhere. We already have some useful helpers like createAccount and generateEd25519PrivateKey, and I think we could expand on that idea.

For example, instead of one large createToken function, which can get messy due to the number of arguments, we could break it down into smaller, more targeted helpers such as:

  • createBasicFungibleToken
  • createBasicNonFungibleToken
  • createFungibleTokenWithInitialSupply

These would help encapsulate logic and improve readability while making it easier to use the TCK.

@ivaylogarnev-limechain ivaylogarnev-limechain changed the title :improvement: Repeated arguments and quick operations helpers improvements: Repeated arguments and quick operations helpers Apr 7, 2025
@ivaylogarnev-limechain ivaylogarnev-limechain added this to the v0.3.0 milestone May 13, 2025
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

No branches or pull requests

1 participant