-
Notifications
You must be signed in to change notification settings - Fork 47
Feature Request - Add Helper Class for Enhanced Usability #26
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
Conversation
|
Hello bro, I'm glad you submitted the PR. I have carefully checked it. It can be concise and improve efficiency, and can meet the needs of some people, but the design principle of a class is to achieve single responsibility and scalability as much as possible. |
|
Hi @Fenguoz, Thank you for your thoughtful review! I’ve refined the implementation to better align with the principles you highlighted: Key Adjustments:
The new // Initialize
$network = new Network(new NodeApi('RPC_URL'));
// Get validated services
$bnb = $network->getBnbService();
$usdt = $network->getBEP20Service('0x...', 18); Would love your thoughts on this approach! Happy to iterate further if needed. Best, |
|
Hi bro, I am glad to receive your PR again. I have carefully checked it and found some useful suggestions. For example, the verification of contract address and decimal. But I think adding |
|
Hi @Fenguoz, Thank you for your continued guidance and thoughtful feedback! 🙏 I deeply respect your design philosophy and approach to maintaining this project. Regarding Your Notes:
Benefits:
I'm happy to remove the Network class entirely if it doesn't align with the project's direction. |
A new PR needs to be submitted, otherwise all historical codes will be merged😊 |
|
Hi @Fenguoz, Thank you for the clarification! 🙌 I've submitted a new PR with the agreed-upon changes Changes Included:
Let me know if any adjustments are needed! 😊 |
|
Good job. |
Dear Fenguoz,
I hope this message finds you well. I've been using your excellent BSC-PHP library and would like to contribute an improvement that could benefit the community.
What's Proposed:
A new Helper class that provides:
Key Benefits:
✅ Reduces boilerplate code for common tasks
✅ Implements best practices for key management
✅ Adds documentation-ready methods
✅ Maintains full compatibility with existing APIs
✅ Includes comprehensive usage examples
Best regards,
H0Z3YN