Understand the basics of smart contract interaction on the Stellar network by creating a trading offer and simulating a basic trade using the SingleOffer contract.
First Step:
You need to clone this repo, and you will make changes on the lib.rs file that is under the single_offer_to_complete/src folder.
Second step:
You will write some control mechanism after comment blocks like example below on ‘create’, ‘trade’ and ‘updt_price’ functions:
//Add a control here to check 'buy_price' and 'sell_price' are not equal to 0
Third step:
Update the trade function in the provided smart contract to allow trades only after a specific cutoff date.
Join the project workspace to share your solution and receive feedback.
Swap insights and ask questions about “Learn everything about Stellar”.