1<!DOCTYPE HTML> 2<html lang="en" class="sidebar-visible no-js light"> 3 <head> 4 <!-- Book generated using mdBook --> 5 <meta charset="UTF-8"> 6<!-- This site is hosted on Netlify. Anyone can build and deploy a site 7 like this one for free: https://netlify.new/?utm_campaign=loops&utm_source=ai-legible&utm_medium=owned&utm_content=comment&utm_id=b50493af-a398-46d3-82d4-0aa07e685e57 8 Netlify hosting facts for this site: static/SSR served via Netlify Edge. --> 9 <title>Introduction - The Senior Solidity Engineer's Book</title> 10 11 12 <!-- Custom HTML head --> 13 14 <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> 15 <meta name="description" content=""> 16 <meta name="viewport" content="width=device-width, initial-scale=1"> 17 <meta name="theme-color" content="#ffffff" /> 18 19 <link rel="icon" href="favicon.svg"> 20 <link rel="shortcut icon" href="favicon.png"> 21 <link rel="stylesheet" href="css/variables.css"> 22 <link rel="stylesheet" href="css/general.css"> 23 <link rel="stylesheet" href="css/chrome.css"> 24 <link rel="stylesheet" href="css/print.css" media="print"> 25 26 <!-- Fonts --> 27 <link rel="stylesheet" href="FontAwesome/css/font-awesome.css"> 28 <link rel="stylesheet" href="fonts/fonts.css"> 29 30 <!-- Highlight.js Stylesheets --> 31 <link rel="stylesheet" href="highlight.css"> 32 <link rel="stylesheet" href="tomorrow-night.css"> 33 <link rel="stylesheet" href="ayu-highlight.css"> 34 35 <!-- Custom theme stylesheets --> 36 37 <!-- MathJax --> 38
38<script async type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
38 39 </head> 40 <body> 41 <!-- Provide site root to javascript --> 42
42<script type="text/javascript"> 43 var path_to_root = ""; 44 var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light"; 45 </script>
45 46 47 <!-- Work around some values being stored in localStorage wrapped in quotes --> 48
48<script type="text/javascript"> 49 try { 50 var theme = localStorage.getItem('mdbook-theme'); 51 var sidebar = localStorage.getItem('mdbook-sidebar'); 52 53 if (theme.startsWith('"') && theme.endsWith('"')) { 54 localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1)); 55 } 56 57 if (sidebar.startsWith('"') && sidebar.endsWith('"')) { 58 localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1)); 59 } 60 } catch (e) { } 61 </script>
61 62 63 <!-- Set the theme before any content is loaded, prevents flash --> 64
64<script type="text/javascript"> 65 var theme; 66 try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } 67 if (theme === null || theme === undefined) { theme = default_theme; } 68 var html = document.querySelector('html'); 69 html.classList.remove('no-js') 70 html.classList.remove('light') 71 html.classList.add(theme); 72 html.classList.add('js'); 73 </script>
73 74 75 <!-- Hide / unhide sidebar before it is displayed --> 76
76<script type="text/javascript"> 77 var html = document.querySelector('html'); 78 var sidebar = 'hidden'; 79 if (document.body.clientWidth >= 1080) { 80 try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { } 81 sidebar = sidebar || 'visible'; 82 } 83 html.classList.remove('sidebar-visible'); 84 html.classList.add("sidebar-" + sidebar); 85 </script>
85 86 87 <nav id="sidebar" class="sidebar" aria-label="Table of contents"> 88 <div class="sidebar-scrollbox"> 89 <ol class="chapter"><li class="chapter-item expanded "><a href='/01_intro'><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href='/getting_started'><strong aria-hidden="true">1.1.</strong> Where do I start?</a></li><li class="chapter-item expanded "><a href='/setup'><strong aria-hidden="true">1.2.</strong> Setting up your development environment</a></li></ol></li><li class="chapter-item expanded "><a href='/02_principles/principles'><strong aria-hidden="true">2.</strong> Principles</a></li><li><ol class="section"><li class="chapter-item expanded "><a href='/02_principles/what_makes'><strong aria-hidden="true">2.1.</strong> What makes a good Solidity developer?</a></li></ol></li><li class="chapter-item expanded "><a href='/workflow'><strong aria-hidden="true">3.</strong> Workflow Tips & Tricks</a></li><li class="chapter-item expanded "><a href='/gas'><strong aria-hidden="true">4.</strong> Gas Optimization</a></li><li class="spacer"></li><li class="chapter-item expanded affix "><a href='/misc/contributors'>Contributors</a></li></ol> 90 </div> 91 <div id="sidebar-resize-handle" class="sidebar-resize-handle"></div> 92 </nav> 93 94 <div id="page-wrapper" class="page-wrapper"> 95 96 <div class="page"> 97 <div id="menu-bar-hover-placeholder"></div> 98 <div id="menu-bar" class="menu-bar sticky bordered"> 99 <div class="left-buttons"> 100 <button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> 101 <i class="fa fa-bars"></i> 102 </button> 103 <button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list"> 104 <i class="fa fa-paint-brush"></i> 105 </button> 106 <ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu"> 107 <li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li> 108 <li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li> 109 <li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li> 110 <li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li> 111 <li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li> 112 </ul> 113 <button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar"> 114 <i class="fa fa-search"></i> 115 </button> 116 </div> 117 118 <h1 class="menu-title">The Senior Solidity Engineer's Book</h1> 119 120 <div class="right-buttons"> 121 <a aria-label='Print this book' href='/print' title='Print this book'> 122 <i id="print-button" class="fa fa-print"></i> 123 </a> 124 125 </div> 126 </div> 127 128 <div id="search-wrapper" class="hidden"> 129 <form id="searchbar-outer" class="searchbar-outer"> 130 <input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header"> 131 </form> 132 <div id="searchresults-outer" class="searchresults-outer hidden"> 133 <div id="searchresults-header" class="searchresults-header"></div> 134 <ul id="searchresults"> 135 </ul> 136 </div> 137 </div> 138 139 <!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM --> 140
140<script type="text/javascript"> 141 document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible'); 142 document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible'); 143 Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) { 144 link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1); 145 }); 146 </script>
146 147 148 <div id="content" class="content"> 149 <main> 150 <h1 id="introduction"><a class="header" href="#introduction">Introduction</a></h1> 151<p>Welcome to the Senior Engineer's Solidity book.</p> 152<p>Ethereum development practices have rapidly shifted over the years. The published 153educational content tends to lag behind the current industry best practices. Historically, 154the best developers have not been able to allocate time on writing about <em>how</em> they became 155so good.</p> 156<p>With this book, we hope to provide an up to date list of techniques that must be 157part of your development toolkit.</p> 158<p>Due to the rapid evolution of the space, we expect this to be a living document. 159If you enjoy this resource and would like to contribute back to it, take a look 160at the <a href="https://github.com/gakonst/solidity-book/issues">Github Issues</a>.</p> 161<p>If you already think you can navigate your way around Solidity and Hardhat, you 162can jump on to the next chapter. If not, read below.</p> 163 164 </main> 165 166 <nav class="nav-wrapper" aria-label="Page navigation"> 167 <!-- Mobile navigation buttons --> 168 169 <a aria-keyshortcuts='Right' aria-label='Next chapter' class='mobile-nav-chapters next' href='/getting_started' rel='next' title='Next chapter'> 170 <i class="fa fa-angle-right"></i> 171 </a> 172 173 <div style="clear: both"></div> 174 </nav> 175 </div> 176 </div> 177 178 <nav class="nav-wide-wrapper" aria-label="Page navigation"> 179 180 <a aria-keyshortcuts='Right' aria-label='Next chapter' class='nav-chapters next' href='/getting_started' rel='next' title='Next chapter'> 181 <i class="fa fa-angle-right"></i> 182 </a> 183 </nav> 184 185 </div> 186 187 188 189 190
190<script type="text/javascript"> 191 window.playground_copyable = true; 192 </script>
192 193 194 195
195<script src="elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
195 196
196<script src="mark.min.js" type="text/javascript" charset="utf-8"></script>
196 197
197<script src="searcher.js" type="text/javascript" charset="utf-8"></script>
197 198 199
199<script src="clipboard.min.js" type="text/javascript" charset="utf-8"></script>
199 200
200<script src="highlight.js" type="text/javascript" charset="utf-8"></script>
200 201
201<script src="book.js" type="text/javascript" charset="utf-8"></script>
201 202 203 <!-- Custom JS scripts --> 204
204<script type="text/javascript" src="theme/solidity.js"></script>
204 205
205<script type="text/javascript" src="theme/mermaid.min.js"></script>
205 206
206<script type="text/javascript" src="theme/mermaid-init.js"></script>
206 207 208 209 </body> 210</html>
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.