TON Goods - Smart contract online store for selling and buying


The goal of the project is to create an ecosystem for selling and purchasing goods on TON. The general idea is following. There are the Sellers each of whom is selling some goods. Each of the Sellers has it's list of the goods that he sells. The Seller accepts the requests from the Buyers as internal messages. Then the Seller may estimate inspect his stores and warehouses (offline) and send back to the Buyer the response with the price estimation for the requested set of goods. If the seller doesn't have enough goods in the store - he may specify the amount of each product that he proposes. When the Buyer got the price estimations from different Sellers, he may pay for the proposed goods.

Each price request and response has it's expiration time - after it it won't be possible to send the request and it's not possible to pay for the outdated price estimation. It allows to put some deadlines - the Buyer knows after what date he shouldn't wait for the response any more and the Seller may reserve the products for the buyer when giving back the price, but he'll reserve them only for the limited period of time. It also allows to clean up the smart contracts storage from time to time removing outdated entiries.

Some precautions to avoid flooding of the sellers are made. First, the seller may just close the store - then no new requests will be accepted. Second - the seller may set a price for accepting price request. It will allow to cut out the "spam" requests that are not really intended to buy anything and just waste storage and processing time.

For now for the technical reasons the Buyers and Sellers smart contracts have to be in the same workchain to be able to communicate.

Each seller and buyer stores it's name or short description in the blockchain to simplify the identification for the other parties.