This smart contract is designed for accepting and managering orders in the shop. A customer can create a new order. Customer sends his encrypted address using public key of the owner. Every order has status: processing, sent, delivered, complited and canceled. Customer or owner can cancel an order if order is in the "processing" status. Also you can get orders list or remove orders by filter using status (for example to get info only about "sent" and "complited" orders) or timestamp. Here I used filtering by bit masking. Remove orders can only owner of course.
The smart contract is written using Solidity for the Ethereum blockchain. I used to brownie as a development environment framework.
- First you need to clone this repo to your machine:
git clone https://github.com/TsigelnikovNikita/orderManager.git
- Then you need to install brownie (you can create a special venv or install in the global env. It's up to you):
pip install eth-brownie
- After that you need to check that you have an installed brownie framework:
brownie
- The last one is just compiling the contract!:
brownie compile
This contract has unit-tests. You can run these using:
brownie test
It's just a study work. If you have any proposals or remarks please feel free and let me know about it.