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
C# library for TON Connect 2.0 #276
Comments
@purpleguy99, we allocate about $1,000 for such TC 2.0 integrations. |
Hello! In addition to the C# library, there are also plans to implement the module in Unity. There will also be a tutorial on how to connect and work with Ton Connect in Unity. |
LGTM! One thing i want to change: let's add "C# & Unity library is added to docs.ton.org" to definition of done |
Done! |
Done! I have released v0.1.0 of the TonConnect SDK for C# and Unity. C# SDK repository: https://github.com/continuation-team/TonSdk.NET/tree/main/TonSDK.Connect Nuget Package: https://www.nuget.org/packages/TonSdk.Connect/ PR to ton docs: ton-community/ton-docs#340 My wallet: |
Ton docs successfully updated. ton-community/ton-docs#340 |
@Naltox any updates? |
@Naltox any updates? |
Hi, @purpleguy99! When checking for compliance with the requirements, an assessment will be given of how closely the source code aligns with the workflows described on the link page, with the existing sdk written in TypeScript serving as a reference. The assessment of implementation quality is made from the perspective of a potential library user. This means that the evaluation is primarily focused on the public interface and the logic of the library's operation. The Microsoft guidelines for implementing libraries and frameworks for the .NET platform will be used to evaluate the implementation quality. Functionality AssessmentBased on the comparison of components and their parts in TonSDK.NET and TS sdk, it can be assumed that the .NET SDK implements the workflow to the required extent. However, to fully assess this, integration with the existing APIs needs to be tested using a sample application. Implementation Quality AssessmentCritical ObservationsConfigureAwaitThe code extensively uses TPL (Task Parallel Library), but considering that the SDK should be a general-purpose library, the method ConfigureAwait(false) is not used anywhere when calling asynchronous methods. This can potentially lead to performance loss when using the library in environments with a https://devblogs.microsoft.com/dotnet/configureawait-faq/ Multiple exceptions with the same error messageIn the SSEClienthttps://github.com/continuation-team/TonSdk.NET/blob/main/TonSDK.Connect/Provider/SSEClient.cs The All delegates are initialized in a separate model that should be passed to the constructor of the root TonConnect object. However, these capabilities are not mentioned in the documentation (except for a single scenario, the documentation does not describe anything at all). Furthermore, if a user-defined handler decides to rethrow an exception or throws its own exception, it will result in the application terminating critically because the ListenForEvents method is defined as async void. Ideally, this code should return a Task that can be worked with by the calling code. Less Critical ObservationsConsole.Write for loggingAll logging is done using the Console.Write methods. This approach does not allow users to integrate library logs with the logging system in their projects or configure log levels. Lists of delegates as event handlersC# has a built-in mechanism for the safe implementation of this pattern - Events. The most disappointing aspect here is that these delegates are implicitly passed throughout the code between different parts of the library. Inconsistent use of nullable reference typesThe Lack of EncapsulationAll components of the library are declared as public, which allows the application using the library to see and use the internals of the library. Over time, this can lead to significant maintenance complexity and breaking changes with each new release. Minor ObservationsAbsence of an interface for the TonConnect classThis doesn't allow integration code to substitute the implementation for testing purposes. Lack of tests for the TonSdk.Connect libraryAdditionally, there is a sparse test coverage for everything else. Final thoughtsIt is evident that a lot of work has been done to implement the library. To meet the users' needs for a high-quality C# SDK implementation, it is recommended to address the above-mentioned critical issues and consider aligning the library with Microsoft's guidelines for developing libraries for the .NET platform. As an example to follow, I can suggest the following libraries: |
Hello @MiGo826 . Thanks for reviewing our solution. Based on this comments, we decided to create a separate branch to correct the critical observations and correct some less important points. I would like to draw your attention to the fact that some comments are really important, and we immediately decided to correct them. In addition, the TonSDK.Net library is not only used in Dotnet projects and applications, but must also provide compatibility with the Unity game engine. I would like to inform you that Unity has its own approaches to handling network requests. When developing the library, we primarily focused on compatibility, and therefore there was a need to create delegates to override some methods such as ListenEvents, etc. Finally, as part of this "Ton Footstep", we tried to fix and organize the code based on your comments. We will release some non-critical fixes as our library evolves, as they are planned to affect the entire TonSDK.NET, not just the .Connect namespace. Please review the footstep task and leave the feedback. Other observations will be fixed as our library evolves. I'm attaching a separate branch with the changes. |
@MiGo826 thanks for the review! Great work 🔥 |
@MiGo826, we appreciate your hard work. How much do you want to receive as a reward as compensation? |
@purpleguy99, I see that many problems have been successfully resolved. Good job! I have a few suggestions for further improving the library:
|
@delovoyhomie Task is done. When will i receive the reward? |
I apologize for the delayed response. The entire review took approximately 4-5 hours, including the examination of the source materials and the preparation of a document with comments. I believe a sum of $50 will cover my efforts, or whatever amount you deem appropriate. My wallet: |
@Naltox @delovoyhomie When will i receive the reward? it's all so long |
@purpleguy99, you don't need to do anything else, the review has been successfully completed, the payment request has already been created. We appreciate your time, but please note that we also expected to do the work from you! Thank you! |
To accurately recognize your valuable contributions in our repository, we kindly request you to create a Pull Request in the Hall of Fame file with your information and Bounty Task details. Please follow these steps:
For reference on what your entry should look like, please see the examples of past merged pull requests. @purpleguy99, thank you for your contribution! |
Summary
Our goal is to develop a C# library for interaction with the TON Connect 2.0 protocol.
Context
There is currently no available library to support TON Connect protocol implementation within the .NET ecosystem. Given the versatility of the multi-platform .NET framework, this proposed C# library will expand opportunities for application development across various environments. This is particularly noteworthy for developers utilizing the widely used Unity platform.
Goals
Deliverables
Definition of Done
Reward
Oriental Release Date
One month after approving
The text was updated successfully, but these errors were encountered: