Skip to content

mediolano-app/mediolano-contracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Mediolano Codebase

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

medialane-screen

Important

Mediolano dapp is in constant development and the current version runs on Starknet's Sepolia devnet. Use for testing purposes only.

Programmable IP for the Integrity Web

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

Key Features

  • ๐ŸŽฏ Zero-Knowledge IP Protection: Leverage Starknet's ZK-proofs for privacy-preserving IP validation
  • ๐Ÿ’ฐ Revenue Sharing: Automated distribution of royalties to IP owners and collaborators
  • ๐Ÿค Collective Ownership: Multi-party IP agreements with governance and voting mechanisms
  • ๐Ÿช Marketplace Integration: Seamless trading and licensing of IP assets
  • ๐ŸŽฎ Gamification: Achievement system to reward creators and build reputation
  • ๐ŸŒ Community Tools: NFT-based clubs and communities for creators
  • ๐Ÿ“„ Smart Licensing: Programmable licensing with customizable terms
  • ๐Ÿ”’ Escrow Services: Secure transaction handling for IP negotiations

Roadmap

  • Starknet Ignition 24.9

  • MIP Protocol @ Starknet Sepolia 24.11

  • Mediolano Dapp @ Starknet Sepolia 24.11

  • Programmable IP Contracts 25.02

  • MIP Dapp @ Starknet Sepolia 25.06

  • MIP Protocol @ Starknet Mainnet 25.07

  • MIP Collections Protocol @ Starknet Sepolia 25.07

  • MIP Dapp @ Starknet Mainnet 25.08

  • Mediolano Dapp @ Starknet Mainnet 25.08

  • MIP Collections Protocol @ Starknet Mainnet 25.08

  • Medialane Protocol @ Starknet Sepolia 25.08

  • Medialane Dapp @ Starknet Sepolia 25.09

  • Medialane Protocol @ Starknet Mainnet 25.11

  • Medialane Dapp @ Starknet Mainnet 25.11

๐Ÿš€ 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.
  • 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:
git clone https://github.com/mediolano-app/mediolano-contracts.git
cd mediolano-contracts
  1. Install dependencies:
# 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
  1. Build contracts:
# Build all contracts
scarb build

# Or build specific contract
cd contracts/IP-Club
scarb build
  1. Run tests:
# 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:

# 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:

# 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 for more information.

We also have a Telegram 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 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 for discussions
  • Issues: Report bugs and feature requests on GitHub

Built with โค๏ธ for the Integrity Web on Starknet

About

Cairo Smart Contracts @ Mediolano - intellectual property provider for the integrity web. Powered on Starknet.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 26