Solidity

Solidity ist eine objektorientierte High-Level-Sprache zur Implementierung von Smart Contracts auf der Ethereum-Blockchain und anderen kompatiblen Plattformen.

Solidity wurde für die Ethereum Virtual Machine (EVM) entwickelt. Es ist statisch typisiert, unterstützt Vererbung, Bibliotheken und komplexe benutzerdefinierte Typen. Entwickler verwenden Solidity, um Smart Contracts zu schreiben, die das Verhalten von Konten und Anwendungen auf der Blockchain regeln. Die Syntax der Sprache ähnelt JavaScript und C++, was sie für Programmierer, die mit diesen Sprachen vertraut sind, relativ zugänglich macht. Solidity-Code wird in Bytecode kompiliert, der dann auf der EVM bereitgestellt und ausgeführt wird.

Zu den Funktionen von Solidity gehören die Unterstützung von Zustandsvariablen, Funktionen, Ereignissen und Modifikatoren. Es bietet auch integrierte kryptografische Funktionen und Zugriff auf Blockchain-Daten. Solidity Smart Contracts sind jedoch nach der Bereitstellung unveränderlich, daher sind sorgfältige Planung und gründliche Tests unerlässlich, um Schwachstellen zu vermeiden. Sicherheitsaudits und formale Verifizierung sind gängige Praktiken zur Risikominderung.

        graph LR
  Center["Solidity"]:::main
  Pre_javascript["javascript"]:::pre --> Center
  click Pre_javascript "/terms/javascript"
  Pre_smart_contract["smart-contract"]:::pre --> Center
  click Pre_smart_contract "/terms/smart-contract"
  Rel_ethereum["ethereum"]:::related -.-> Center
  click Rel_ethereum "/terms/ethereum"
  Rel_smart_contract_architecture["smart-contract-architecture"]:::related -.-> Center
  click Rel_smart_contract_architecture "/terms/smart-contract-architecture"
  Rel_java["java"]:::related -.-> Center
  click Rel_java "/terms/java"
  classDef main fill:#7c3aed,stroke:#8b5cf6,stroke-width:2px,color:white,font-weight:bold,rx:5,ry:5;
  classDef pre fill:#0f172a,stroke:#3b82f6,color:#94a3b8,rx:5,ry:5;
  classDef child fill:#0f172a,stroke:#10b981,color:#94a3b8,rx:5,ry:5;
  classDef related fill:#0f172a,stroke:#8b5cf6,stroke-dasharray: 5 5,color:#94a3b8,rx:5,ry:5;
  linkStyle default stroke:#4b5563,stroke-width:2px;

      

🧠 Wissenstest

1 / 3

🧒 Erkläre es wie einem 5-Jährigen

📜 Solidity is a special code language used to write 'digital rules' for the world's computer ([Ethereum](/de/terms/ethereum)). It's like writing a contract that nobody can cheat on because the computer follows the rules exactly as they are written.

🤓 Expert Deep Dive

Solidity's design prioritizes deterministic execution within the EVM, crucial for consensus. Its static typing catches many errors at compile time, reducing runtime surprises. The language's object-oriented features, while convenient, introduce complexities in inheritance and state management that can lead to subtle bugs if not managed carefully. Gas optimization is a primary concern; inefficient Solidity code can lead to prohibitively expensive transactions. The compiler itself is a critical component, and its evolution (e.g., introduction of Yul IR, optimizer improvements) significantly impacts gas costs and security. [Formal verification tools](/de/terms/formal-verification-tools) are increasingly important for auditing Solidity contracts due to the high stakes of immutable, on-chain logic.

🔗 Verwandte Begriffe

Voraussetzungen:

📚 Quellen