Open JoelVR17 opened 1 day ago
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/Josh-121) looking to make first contribution on this project
How I plan on tackling this issue I would create function and ensure it meets stated requirements, I would also work on feedback & recommendation ensuring contact. Can deliver within a day upon assignment
I will like to take care of this issue! I'm a member of Dojo Coding community! Have experience working with Rust before, contributing to Dojo game engine mostly.
hello , my name is joanne, currently i have been working with rust creating simple projects to improve my skills, i would love to work on this issues to challenge my self, by creating the required function and implement the tests
I'd like to handle this task.
Hello, I'm Ikem, a blockchain developer with over 3 years of experience in smart contract development.
I would love to help implement the milestone management functions for the escrow system.
My proposed approach:
Looking forward to enhancing the escrow system! 🚀
Let me try this one! I can write cairo & rust, also I have contributed to OD hack in cairo.
This issue is for you @Bosun-Josh121 ! 🚀 Remember to follow all the guidelines, both the ones inside the repository and the guideline to perform the PR.
Many thanks to all the other dev's who sent in their application. 🔥
You must apply through OnlyDust. If not, you'll be ignored
Description:
Functions are needed to modify the “status” and “flag” of an escrow milestone in the contract.rs file. Two functions are needed since one must be executed only by the service provider and one by the signer.
What is a milestone?
Milestone is a property of the escrow itself which can be found defined in the storage_types.rs file. It defines a series of objectives to be met by the service provider in order to complete an escrow.
First requirement:
A function must be created which can be executed only by the service provider. This function must be able to change the value of the “status” property of the milestone.
This function must be called: “change_milestone_status”.
The function must receive the following parameters:
Note: Feel free to add more parameters to the function if necessary.
Validations required:
Second requirement:
A function must be created which can be executed only by the signer. This function must be able to change the value of the “flag” property of the milestone.
This function must be called: “change_milestone_flag”.
The function must receive the following parameters:
Note: Feel free to add more parameters to the function if necessary.
Validations required:
Note: Regarding the required parameters, feel free to add any other parameters to the functions needed to complete the issue.
Ensure that the new milestone information is stored correctly within the escrow.
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.
Tests:
In the test.rs file you must develop the following test to check that the contract flow works correctly together with the functions you have just built:
You can rely on the previously created tests to complete your test. The important thing is that you succeed in testing your code and that it works well in conjunction with the entire contract flow which is explained in the list above. Also, please note that you should not create a test for each of the items in the above list. This list indicates with each of its items the flow that must contain the only test that you must create to verify that the code you made works. You can also create more than 1 test if necessary, but if you do, you must justify why.
⚠️ Important: Please define a clear name for the test so that the purpose of the test is clearly understood.
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
⚠️ Please follow the guidelines for requesting an issue, launching commits and describing PR's. Otherwise they will be ignored. ⚠️