flâneur

Solidity Patterns | solidity-patterns

fravoll.github.io · 313 words · saved by 2 readers

A compilation of patterns and best practices for the smart contract programming language Solidity

This document contains a collection of design and programming patterns for the smart contract programming language Solidity in version 0.4.20. Note that newer versions might have changed some of the functionalities. Each pattern consists of a code sample and a detailed explanation, including background, implications and additional information about the patterns. Contents Behavioral Patterns Guard Check: Ensure that the behavior of a smart contract and its input parameters are as expected. State Machine: Enable a contract to go through different stages with different corresponding…

saved by

related reading