feat(account): Add TestCoin helper class for testing purposes
Overview
This PR introduces the TestCoin helper class to simplify coin creation during testing. The class provides utility methods for generating test coins with random or specified parameters, making it easier to write and maintain tests that require coin instances.
Features
TestCoin.create(): Creates a single test coin with customizable parametersTestCoin.many(): Generates multiple test coins with shared base parameters- Uses crypto-secure random generation via
@fuel-ts/crypto - Properly handles big numbers using
@fuel-ts/math
Related Issues
Closes #3445
Related PR's
Fixed #3460
@crStiv is attempting to deploy a commit to the Fuel Labs Team on Vercel.
A member of the Team first needs to authorize it.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| ts-docs-api | ❌ Failed (Inspect) | Feb 26, 2025 0:31am |
@petertonysmith94 Added tests for TestCoin class as requested. The tests cover default values, custom parameters, multiple coin creation and parameter inheritance
@danielbate I've included a test case you wanted me to do inside fuel gauge, does it seem alright?
Hey @crStiv, how are you? I noticed it's been a while since your last interaction on this, and I just wanted to check if you're still interested in working on it.
Hey @crStiv, how are you? I noticed it's been a while since your last interaction on this, and I just wanted to check if you're still interested in working on it.
Hey Sergio! Yeah, I remember about it, but have a lot of work today, still thanks for reminding me about this PR, I'll try to provide changes to it to the end of the week
Hey @crStiv, how are you? I noticed it's been a while since your last interaction on this, and I just wanted to check if you're still interested in working on it.
Sorry if it takes much longer time than you expected
@crStiv No worries. Take your time. I was just checking if you were still interested in working on this.
Let us know if you have any questions, we are happy to help.
Closing this issue due to inactivity.