-
Notifications
You must be signed in to change notification settings - Fork 17
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
smart contract: charge commission in the “resolving_disputes” function #37
Comments
I am applying to this issue via OnlyDust platform. My background and how it can be leveraged: software engineering background, backend & smart contract dev with contribution to similar tasks(https://app.onlydust.com/u/Bosun-Josh121) . here's link to a contribution: #28 I have good experience in similar tasks & in codebase and i'm confident in delivering this if assigned. I will work on feedback & recommendation ensuring contact. Can deliver within a day upon assignment |
I'd be happy to do this. I am proficient in cairo, and will love to contribute to this project. ready to put in the work. |
Hi, |
Can I take this issue? |
Would love to tackle this! |
Proposal to Work on the IssueI am eager to contribute to this issue and believe I am well-suited for the task, given my extensive experience in Cairo programming and building decentralized applications on StarkNet. My expertise spans across multiple domains crucial for this implementation:
Why Assign This to Me?I have a track record of delivering high-quality solutions efficiently, with a deep understanding of smart contract security, decentralized architectures, and full-stack development. My ability to bridge frontend, backend, and blockchain components ensures a well-rounded, optimized solution. Estimated TimelineI anticipate delivering a fully functional solution within 3 days. Please let me know if I can proceed. I am excited about the opportunity to contribute and look forward to collaborating! Best regards, |
Would love to tackle this! |
This issue is for you @Bosun-Josh121 ! 🚀 Many thanks to all the other dev's who sent in their application. 🔥 |
Thanks ser. Noted 🚀 |
Description:
Currently, the “resolving_disputes” function does not charge any commissions. We require this function to charge the appropriate commissions, similar to what is already done in the “distribute_escrow_earnings” function.
Requirements:
The function must receive the following parameters:
Validations:
This function must handle the same validations it currently handles. Additionally, it must validate that the contract has sufficient balance to charge the commissions and transfer the amounts assigned to both the client and the service provider.
Errors:
We currently have a number of custom errors which we throw when executing some of the contract functions. An example of the above would be the following:
You only need to worry about throwing the error message, you don't need to handle custom errors. So if you need to return an error within the flow due to one of the validations, you can do it as follows:
You must make sure that the message you are sending as an error is very clear and makes sense as to why the error is being sent.
Test:
To test your changes in the “resolving_disputes” function, you must modify and adapt all the tests that use this function in the file test.rs.
Additionally, ensure that the current tests validate the following due to your changes:
Ensure that all tests are successful to validate that your changes fulfill the function’s objectives.
To run the test you have just created you can use the command
cargo test
.Recommendation:
Stellar people have in their discord a channel called “stella-help”, in that channel you can ask your technical questions about Stellar and its libraries (including the “soroban_sdk” library we use in the contract). This bot can help you a lot to solve your issues. Just remember that before submitting your query you must add the word “stella” at the beginning of the query. Otherwise the bot will not answer you.
The Stellar discord where you can find this channel is the following: Stellar Discord
The text was updated successfully, but these errors were encountered: