https://github.com/mediolano-app/mediolano-contracts
Cairo Smart Contracts @ Mediolano - a dapp designed to be the intellectual property provider service of the web3. Powered by Starknet.
https://github.com/mediolano-app/mediolano-contracts
blockchain cairo cairo-lang ethereum intellectual-property ip open-source starknet
Last synced: 19 days ago
JSON representation
Cairo Smart Contracts @ Mediolano - a dapp designed to be the intellectual property provider service of the web3. Powered by Starknet.
- Host: GitHub
- URL: https://github.com/mediolano-app/mediolano-contracts
- Owner: mediolano-app
- License: mit
- Created: 2024-10-23T17:52:10.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-20T22:27:57.000Z (12 months ago)
- Last Synced: 2024-11-20T23:26:38.370Z (12 months ago)
- Topics: blockchain, cairo, cairo-lang, ethereum, intellectual-property, ip, open-source, starknet
- Language: Cairo
- Homepage: https://mediolano.app
- Size: 72.9 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Programmable IP for the Integrity Web
Cairo smart contracts for Mediolano, the intellectual property provider of the integrity web, powered on Starknet.
Quick links:
Mediolano Dapp (Sepolia)
Website mediolano.xyz
Telegram | YouTube | X / Twitter

> [!IMPORTANT]
> Mediolano dapp is in constant development and the current version runs on Starknet's Sepolia devnet. Use for testing purposes only.
## Mediolano
Mediolano empowers creators, artists and organizations to make money from their content, without requiring them to know anything about crypto.
With permissionless services for Programmable Intellectual Property (IP), leveraging Starknetβs high-speed, low-cost transactions and zero-knowledge proofs, Mediolano provides a comprehensive suite of solutions to tokenize and monetize assets efficiently, transparently and with sovereignty.
With zero fees, Mediolanoβs open-source protocol and dapp ensures immediate tokenization and protection under the Berne Convention for the Protection of Literary and Artistic Works (1886), covering 181 countries. This framework guarantees global recognition of authorship, providing verifiable proof of ownership for 50 to 70 years, depending on jurisdiction.
The platform also introduces advanced monetization, enabling diverse approaches to licensing, royalties, and financing creators economies. These tools are designed to offer integrations with various ecosystems, including communities, games, and AI agents, unlocking the true power of Programmable IP for the Integrity Web.
## ποΈ Architecture Overview
### Core Components
```
Mediolano Protocol
βββ Medialane Protocol (Marketplace Core)
βββ User Achievements System
βββ IP Tokenization (ERC-721/ERC-1155)
βββ Programmable Licensing
βββ Revenue Sharing & Royalties
βββ Community & Club Management
βββ Franchise & Monetization
βββ Escrow & Negotiations
βββ Collective Agreements
βββ Collaborative Storytelling
βββ Partner Certification
```
## Roadmap
- [x] Starknet Ignition **24.9**
- [x] MIP Protocol @ Starknet Sepolia **24.11**
- [x] Mediolano Dapp @ Starknet Sepolia **24.11**
- [x] Programmable IP Contracts **25.02**
- [x] MIP Dapp @ Starknet Sepolia **25.06**
- [X] MIP Protocol @ Starknet Mainnet **25.07**
- [X] MIP Collections Protocol @ Starknet Sepolia **25.07**
- [X] MIP Dapp @ Starknet Mainnet **25.08**
- [X] MIP Collections Protocol @ Starknet Mainnet **25.08**
- [ ] Mediolano Dapp @ Starknet Mainnet **25.10**
- [ ] Medialane Protocol @ Starknet Sepolia **25.11**
- [ ] Medialane Dapp @ Starknet Sepolia **25.11**
- [ ] Medialane Protocol @ Starknet Mainnet **25.12**
- [ ] Medialane Dapp @ Starknet Mainnet **25.12**
## π Getting Started
### Prerequisites
Before you begin, ensure you have the following requirements:
* **Node.js** (version 18 or later) and npm installed. Download them from the official Node [website](https://nodejs.org/en/download/).
* **Basic understanding** of Starknet Foundry to deploy your own contract instance
* **Cairo** and **Scarb** for smart contract development
### System Requirements
- **Npm + Git**
- **ASDF + Scarb**
- **Starknet CLI**
- **Starknet Foundry**
- **Operating System**: macOS, Windows (including WSL), and Linux are supported
### Installation
1. **Clone the repository** to your local machine:
```bash
git clone https://github.com/mediolano-app/mediolano-contracts.git
cd mediolano-contracts
```
2. **Install dependencies**:
```bash
# Install Scarb (Cairo package manager)
curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh
# Install Starknet Foundry
curl -L https://raw.githubusercontent.com/foundry-rs/starknet-foundry/master/scripts/install.sh | sh
```
3. **Build contracts**:
```bash
# Build all contracts
scarb build
# Or build specific contract
cd contracts/IP-Club
scarb build
```
4. **Run tests**:
```bash
# Run all tests
scarb test
# Run tests for specific contract
cd contracts/User-Achievements
scarb test
```
## π§ Development
### Project Structure
```
mediolano-contracts/
βββ contracts/
β βββ Medialane-Protocol/ # Core marketplace
β βββ User-Achievements/ # Gamification system
β βββ IP-Club/ # Community management
β βββ IP-Revenue-Share/ # Revenue distribution
β βββ IP-License-Agreement/ # Licensing contracts
β βββ IP-Collective-Agreement/ # Multi-party agreements
β βββ ... # Additional contracts
βββ scripts/ # Deployment scripts
βββ tests/ # Integration tests
βββ docs/ # Documentation
```
### Building and Testing
Each contract directory contains its own `Scarb.toml` configuration file. You can build and test contracts individually:
```bash
# Navigate to specific contract
cd contracts/IP-Club
# Build the contract
scarb build
# Run contract tests
scarb test
# Format code
scarb fmt
```
### Deployment
Deploy contracts to Starknet networks:
```bash
# Deploy to Sepolia testnet
starkli deploy ./target/dev/contract_name.contract_class.json \
--network sepolia \
--keystore ./keystore.json
# Deploy to mainnet
starkli deploy ./target/dev/contract_name.contract_class.json \
--network mainnet \
--keystore ./keystore.json
```
## π‘οΈ Security
### Security Measures
- **Access Control**: Role-based permissions using OpenZeppelin components
- **Reentrancy Protection**: Guards against reentrancy attacks
- **Input Validation**: Comprehensive validation of all user inputs
- **Overflow Protection**: Safe math operations throughout
- **Pause Functionality**: Emergency pause capabilities for critical contracts
## π€ Contributing
We are building open-source Integrity Web with the amazing **OnlyDust** platform. Check our [website](https://app.onlydust.com/p/mediolano) for more information.
We also have a [Telegram](https://t.me/mediolanoapp) group focused to support development.
Contributions are **greatly appreciated**. If you have a feature or suggestion that would make our platform better, please fork the repo and create a pull request with the tag "enhancement".
### How to Contribute
1. **Fork the Project**
2. **Create your Feature Branch** (`git checkout -b feature/Feature`)
3. **Commit your Changes** (`git commit -m 'Add some Feature'`)
4. **Push to the Branch** (`git push origin feature/YourFeature`)
5. **Open a Pull Request**
### Development Guidelines
- Follow Cairo best practices and coding standards
- Write comprehensive tests for new features
- Update documentation for any API changes
- Ensure all tests pass before submitting a pull request
- Use descriptive commit messages
### Issue Reporting
When reporting issues, please include:
- **Environment details** (OS, Cairo version, Scarb version)
- **Steps to reproduce** the issue
- **Expected vs actual behavior**
- **Error messages or logs**
- **Minimal code example** if applicable
## π License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## π Acknowledgments
- **Starknet Foundation** for the amazing ZK-rollup technology
- **OpenZeppelin** for secure smart contract components
- **OnlyDust** for supporting open-source development
- **Community Contributors** who make this project possible
## π Support
- **Documentation**: Check individual contract READMEs for specific guidance
- **Community**: Join our [Telegram](https://t.me/mediolanoapp) for discussions
- **Issues**: Report bugs and feature requests on GitHub
---
**Built with β€οΈ for the Integrity Web on Starknet**