Skip to main content

License

Type-safe SPDX license identifiers for smart contract metadata.

Overview

Branded string type representing SPDX license identifiers. Used in Solidity source files and smart contract metadata to identify licensing terms. Includes validation for OSI-approved licenses.

Quick Start

Common Licenses

API Reference

Constructors

Methods

Constants

Solidity License Identifier

SPDX license identifiers are required in Solidity files since version 0.6.8:
The identifier appears in compiled contract metadata and can be used to:
  • Identify licensing terms programmatically
  • Filter contracts by license type
  • Ensure compliance with open source requirements

Use Cases

Contract Metadata Analysis

License Filtering

References