https://github.com/halas77/scm
https://github.com/halas77/scm
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/halas77/scm
- Owner: halas77
- Created: 2024-08-10T20:13:33.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-08-12T13:11:42.000Z (10 months ago)
- Last Synced: 2025-01-14T07:49:55.509Z (4 months ago)
- Language: Solidity
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: ReadMe.md
Awesome Lists containing this project
README
# Simple PMS
## Overview
The **Simple PMS** project is a demonstration of Solidity fundamentals through a basic product management system. This project covers key Solidity concepts including variables, structs, mappings, inheritance, functions, events, and modifiers. The goal is to showcase these basics in a practical example.
## Features
- **Ownership Control**: Functions restricted to the contract owner.
- **Product Management**: Create, store, and manage products with unique identifiers.
- **Event Logging**: Logs important actions such as product creation and shipping## Contract Files
The project includes the following Solidity files:
- **`Ownable.sol`**: Implements ownership functionality for the smart contracts.
- **`Product.sol`**: Defines the `Product` struct and provides methods to create and manage products.
- **`ProductManager.sol`**: Manages product creation, storage, and shipping operations.### Ownable.sol
This contract sets up ownership for the smart contracts, including:
- Assigning ownership to an account.
- Restricting specific functions to only the owner.### Product.sol
Defines the `Product` struct with:
- `productCode`: A unique code for the product.
- `productName`: The name of the product.
- `isExist`: The status of the product.Includes functionality to:
- Create products and map them to unique IDs.
- Store and retrieve product details.### ProductManager.sol
Extends the `Ownable` contract and provides:
- `notifyStoredProduct`: Notify the network when product is stored.
- `notifyShippedProduct`: Notify the network when product is shipped.