├── .DS_Store ├── .gitattributes ├── .gitignore ├── 404.html ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── README.md ├── _config.yml ├── _data ├── footer.yml └── navigation.yml ├── _includes ├── list-posts.html ├── navigation.html ├── post-title.html ├── relative-src.html ├── social-icon.html └── youtube.html ├── _layouts ├── archive.html ├── default.html ├── page.html └── post.html ├── _posts └── _defaults.md ├── _sass ├── elements.scss ├── footer.scss ├── forms.scss ├── landing-page.scss ├── layout.scss ├── mixins │ ├── columns.scss │ └── flexbox.scss ├── navigation.scss └── variables.scss ├── about.html ├── ace.js ├── compiler.js ├── compiler_worker.js ├── css └── screen.scss ├── favicon.png ├── images ├── SolBlue.png ├── SolBlueGradient.png ├── SolBlueHeader.png ├── SolBlueLines.png ├── SolGray.png └── logo.svg ├── index.html ├── mode-javascript.js ├── mode-solidity.js ├── robots.txt ├── siteicon.png └── touch-icon.png /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethereum/solidity-portal/8c7b481c65a12dd218bf1a9a3a879f5380c7c0a9/.DS_Store -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | _site/ 2 | .sass-cache/ 3 | .jekyll-metadata 4 | .jekyll-cache/ 5 | -------------------------------------------------------------------------------- /404.html: -------------------------------------------------------------------------------- 1 | --- 2 | title: Whoops! 3 | description: The page you are looking for does not seem to exist (in this universe). 🪐 4 | permalink: /404.html 5 | sitemap: false 6 | --- 7 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'jekyll', '4.0.0' 4 | 5 | group :jekyll_plugins do 6 | gem 'jekyll-archives', '2.1.1' 7 | gem 'jekyll-feed', '0.12.1' 8 | gem 'jekyll-paginate', '1.1.0' 9 | gem 'jekyll-seo-tag', '2.6.1' 10 | gem 'jekyll-sitemap', '1.3.1' 11 | end 12 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | addressable (2.8.0) 5 | public_suffix (>= 2.0.2, < 5.0) 6 | colorator (1.1.0) 7 | concurrent-ruby (1.1.7) 8 | em-websocket (0.5.2) 9 | eventmachine (>= 0.12.9) 10 | http_parser.rb (~> 0.6.0) 11 | eventmachine (1.2.7) 12 | ffi (1.13.1) 13 | forwardable-extended (2.6.0) 14 | http_parser.rb (0.6.0) 15 | i18n (1.8.5) 16 | concurrent-ruby (~> 1.0) 17 | jekyll (4.0.0) 18 | addressable (~> 2.4) 19 | colorator (~> 1.0) 20 | em-websocket (~> 0.5) 21 | i18n (>= 0.9.5, < 2) 22 | jekyll-sass-converter (~> 2.0) 23 | jekyll-watch (~> 2.0) 24 | kramdown (~> 2.1) 25 | kramdown-parser-gfm (~> 1.0) 26 | liquid (~> 4.0) 27 | mercenary (~> 0.3.3) 28 | pathutil (~> 0.9) 29 | rouge (~> 3.0) 30 | safe_yaml (~> 1.0) 31 | terminal-table (~> 1.8) 32 | jekyll-archives (2.1.1) 33 | jekyll (>= 2.4) 34 | jekyll-feed (0.12.1) 35 | jekyll (>= 3.7, < 5.0) 36 | jekyll-paginate (1.1.0) 37 | jekyll-sass-converter (2.1.0) 38 | sassc (> 2.0.1, < 3.0) 39 | jekyll-seo-tag (2.6.1) 40 | jekyll (>= 3.3, < 5.0) 41 | jekyll-sitemap (1.3.1) 42 | jekyll (>= 3.7, < 5.0) 43 | jekyll-watch (2.2.1) 44 | listen (~> 3.0) 45 | kramdown (2.3.1) 46 | rexml 47 | kramdown-parser-gfm (1.1.0) 48 | kramdown (~> 2.0) 49 | liquid (4.0.3) 50 | listen (3.3.1) 51 | rb-fsevent (~> 0.10, >= 0.10.3) 52 | rb-inotify (~> 0.9, >= 0.9.10) 53 | mercenary (0.3.6) 54 | pathutil (0.16.2) 55 | forwardable-extended (~> 2.6) 56 | public_suffix (4.0.6) 57 | rb-fsevent (0.10.4) 58 | rb-inotify (0.10.1) 59 | ffi (~> 1.0) 60 | rexml (3.2.5) 61 | rouge (3.25.0) 62 | safe_yaml (1.0.5) 63 | sassc (2.4.0) 64 | ffi (~> 1.9) 65 | terminal-table (1.8.0) 66 | unicode-display_width (~> 1.1, >= 1.1.1) 67 | unicode-display_width (1.7.0) 68 | 69 | PLATFORMS 70 | ruby 71 | 72 | DEPENDENCIES 73 | jekyll (= 4.0.0) 74 | jekyll-archives (= 2.1.1) 75 | jekyll-feed (= 0.12.1) 76 | jekyll-paginate (= 1.1.0) 77 | jekyll-seo-tag (= 2.6.1) 78 | jekyll-sitemap (= 1.3.1) 79 | 80 | BUNDLED WITH 81 | 1.17.3 82 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 ethereum 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 🚨 This repository has been archived. Please visit the new home for the Solidity website codebase at [`ethereum/solidity-website`](https://github.com/ethereum/solidity-website) 2 | 3 | # Solidity Language Portal 4 | 5 | The Solidity Language Portal is based on the [Hydra template](https://learn.cloudcannon.com/templates/hydra/) for Jekyll. 6 | 7 | ## Develop 8 | 9 | Hydra was built with [Jekyll](http://jekyllrb.com/) version 3.3.1, but should support newer versions as well. 10 | 11 | Install the dependencies with [Bundler](http://bundler.io/): 12 | 13 | ~~~bash 14 | $ bundle install 15 | ~~~ 16 | 17 | Run `jekyll` commands through Bundler to ensure you're using the right versions: 18 | 19 | ~~~bash 20 | $ bundle exec jekyll serve 21 | ~~~ 22 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | # ---- 2 | # Site 3 | 4 | title: Solidity Programming Language 5 | url: "https://soliditylang.org/" 6 | baseurl: 7 | 8 | # Values for the jekyll-seo-tag gem (https://github.com/jekyll/jekyll-seo-tag) 9 | logo: /siteicon.png 10 | description: The Solidity language portal is a comprehensive information page for the Solidity programming language. It features documentation, binaries, blog, resources & more. 11 | author: 12 | name: Solidity Team 13 | email: solidity@ethereum.org 14 | twitter: solidity_lang 15 | social: 16 | name: Solidity 17 | links: 18 | - https://github.com/ethereum/solidity 19 | - https://gitter.im/ethereum/solidity 20 | - https://twitter.com/solidity_lang 21 | 22 | # ----- 23 | # Build 24 | 25 | timezone: Etc/UTC 26 | 27 | collections: 28 | staff_members: 29 | _hide_content: true 30 | 31 | paginate: 10 32 | paginate_path: "/blog/:num/" 33 | permalink: pretty 34 | 35 | defaults: 36 | - 37 | scope: 38 | path: "" 39 | type: "posts" 40 | values: 41 | layout: "post" 42 | _options: 43 | content: 44 | width: 1500 45 | height: 2500 46 | - 47 | scope: 48 | path: "" 49 | type: "staff_members" 50 | values: 51 | _options: 52 | image_path: 53 | width: 600 54 | height: 600 55 | - 56 | scope: 57 | path: "" 58 | values: 59 | layout: "page" 60 | - 61 | scope: 62 | path: "index.html" 63 | values: 64 | layout: "default" 65 | - 66 | scope: 67 | path: "contact.html" 68 | values: 69 | full_width: true 70 | 71 | jekyll-archives: 72 | enabled: 73 | - categories 74 | 75 | plugins: 76 | - jekyll-archives 77 | - jekyll-sitemap 78 | - jekyll-seo-tag 79 | - jekyll-feed 80 | - jekyll-paginate 81 | 82 | exclude: 83 | - Gemfile 84 | - Gemfile.lock 85 | - README.md 86 | - LICENCE 87 | 88 | # ----------- 89 | # CloudCannon 90 | 91 | social_icons: 92 | - Facebook 93 | - Google Plus 94 | - Instagram 95 | - LinkedIn 96 | - Pinterest 97 | - Tumblr 98 | - Twitter 99 | - YouTube 100 | - RSS 101 | - Gitter 102 | - Github 103 | 104 | _comments: 105 | map: Update the map location and display settings. 106 | latitude: Coordinates for the center marker on the map. 107 | longitude: Coordinates for the center marker on the map. 108 | zoom: The zoom level for the map. 109 | pricing_table: Update the information in the pricing tables. 110 | highlight: Emphasis the text 111 | color: The background colour used in the plan name and call to action. 112 | new_window: Open link in new window 113 | -------------------------------------------------------------------------------- /_data/footer.yml: -------------------------------------------------------------------------------- 1 | - links: 2 | - name: releases 3 | link: https://github.com/ethereum/solidity/releases 4 | new_window: true 5 | - name: github 6 | link: https://github.com/ethereum/solidity 7 | new_window: true 8 | - name: security policy & bounty 9 | link: https://github.com/ethereum/solidity/blob/develop/SECURITY.md 10 | new_window: true 11 | - name: blog 12 | link: https://blog.soliditylang.org 13 | new_window: true 14 | - name: about 15 | link: /about/ 16 | - links: 17 | - name: documentation 18 | link: https://docs.soliditylang.org/en/latest/ 19 | new_window: true 20 | - name: contributing 21 | link: https://docs.soliditylang.org/en/latest/contributing.html 22 | new_window: true 23 | - name: tools & resources 24 | link: https://docs.soliditylang.org/en/latest/resources.html 25 | new_window: true 26 | - name: logo policy 27 | link: https://docs.soliditylang.org/en/latest/brand-guide.html 28 | new_window: true 29 | - links: 30 | - name: twitter 31 | link: https://twitter.com/solidity_lang 32 | new_window: true 33 | - name: mastodon 34 | link: https://fosstodon.org/@solidity 35 | new_window: true 36 | - name: matrix 37 | link: https://matrix.to/#/#ethereum_solidity:gitter.im 38 | new_window: true 39 | - name: gitter 40 | link: https://gitter.im/ethereum/solidity 41 | new_window: true 42 | - name: forum 43 | link: https://forum.soliditylang.org/ 44 | new_window: true 45 | -------------------------------------------------------------------------------- /_data/navigation.yml: -------------------------------------------------------------------------------- 1 | - name: Install 2 | link: https://docs.soliditylang.org/en/latest/installing-solidity.html 3 | new_window: true 4 | highlight: false 5 | - name: Docs 6 | link: https://docs.soliditylang.org/en/latest/ 7 | new_window: true 8 | highlight: false 9 | - name: Chat 10 | link: https://gitter.im/ethereum/solidity 11 | new_window: true 12 | highlight: false 13 | - name: Forum 14 | link: https://forum.soliditylang.org/ 15 | new_window: true 16 | highlight: false 17 | - name: Blog 18 | link: https://blog.soliditylang.org 19 | new_window: true 20 | highlight: true 21 | -------------------------------------------------------------------------------- /_includes/list-posts.html: -------------------------------------------------------------------------------- 1 | {% for post in include.posts %} 2 |
  • 3 |

    {{ post.title }}

    4 | {% include post-title.html post=post %} 5 |
    6 | {{ post.excerpt }} 7 | 8 |
    9 |
  • 10 | {% endfor %} 11 | -------------------------------------------------------------------------------- /_includes/navigation.html: -------------------------------------------------------------------------------- 1 | 15 | -------------------------------------------------------------------------------- /_includes/post-title.html: -------------------------------------------------------------------------------- 1 |

    2 | {% for category in include.post.categories %} 3 | 4 | {{ category | capitalize }} 5 | 6 | {% endfor %} 7 | {{ include.post.date | date: "%B %d, %Y" }} 8 |

    9 | -------------------------------------------------------------------------------- /_includes/relative-src.html: -------------------------------------------------------------------------------- 1 | {% assign prefix = include.src | slice: 0, 2 %}{% assign protocol = include.src | slice: 0, 4 %}{% unless protocol == 'http' or prefix == "//" %}{{ site.baseurl }}{% endunless %}{{ include.src }} 2 | -------------------------------------------------------------------------------- /_includes/social-icon.html: -------------------------------------------------------------------------------- 1 | {% case include.icon %} 2 | {% when "Facebook" %} 3 | 4 | {% when "Google Plus" %} 5 | 6 | {% when "Instagram" %} 7 | 8 | {% when "LinkedIn" %} 9 | 10 | {% when "Pinterest" %} 11 | 12 | {% when "Tumblr" %} 13 | 14 | {% when "Twitter" %} 15 | 16 | {% when "YouTube" %} 17 | 18 | {% when "RSS" %} 19 | 20 | {% endcase %} -------------------------------------------------------------------------------- /_includes/youtube.html: -------------------------------------------------------------------------------- 1 |
    2 | 3 |
    4 | -------------------------------------------------------------------------------- /_layouts/archive.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | --- 4 | 5 |
    6 | {% assign blog = site.pages | where: "path", "blog/index.html" | first %} 7 | 8 | {% if blog.title %} 9 |

    {{ blog.title }}

    10 | {% endif %} 11 | 12 | {% if blog.description %} 13 |

    {{ blog.description }}

    14 | {% endif %} 15 | 16 |
    17 | {{ page.title | capitalize }} 18 |
    19 | 20 | 23 |
    24 | -------------------------------------------------------------------------------- /_layouts/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {% seo %} 9 | {% feed_meta %} 10 | 11 | 12 | 13 | 14 | 15 |
    16 |
    17 |
    Solidity Logo
    18 | {% include navigation.html %} 19 |
    20 |
    21 | {{ content }} 22 | 40 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /_layouts/page.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 |
    5 |
    6 |
    7 | {% if page.heading %} 8 |

    {{ page.heading }}

    9 | {% elsif page.title and page.layout != 'archive' %} 10 |

    {{ page.title }}

    11 | {% endif %} 12 | {% if page.description %} 13 |

    {{ page.description }}

    14 | {% endif %} 15 | {{ content }} 16 |
    17 |
    18 |
    19 | -------------------------------------------------------------------------------- /_layouts/post.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | --- 4 |
    5 | {% include post-title.html post=page %} 6 | 7 | 8 |
    9 | {{ content }} 10 | 11 |
    12 | {% assign author_id = page.author_staff_member | prepend: "/staff_members/" | append: "/" %} 13 | {% assign author = site.staff_members | where: "url", author_id | first %} 14 |
    {{ author.name }}
    15 |

    {{ author.blurb }}

    16 |
    17 | 18 |
    19 | {% if page.previous.url %} 20 | 21 | {% endif %} 22 | {% if page.next.url %} 23 | 24 | {% endif %} 25 |
    26 | 27 | {% if site.disqus_shortname and page.comments %} 28 |
    29 | 43 | 44 | {% endif %} 45 |
    46 |
    47 | -------------------------------------------------------------------------------- /_posts/_defaults.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 3 | categories: 4 | author_staff_member: 5 | date: 6 | --- 7 | -------------------------------------------------------------------------------- /_sass/elements.scss: -------------------------------------------------------------------------------- 1 | html { 2 | background: #111111; 3 | } 4 | 5 | html, body { 6 | margin: 0; 7 | padding: 0; 8 | } 9 | 10 | body { 11 | font-family: "Inter", "Helvetica Neue", "Helvetica", "Arial"; 12 | } 13 | 14 | a { 15 | color: #002fa7; 16 | text-decoration: none; 17 | } 18 | 19 | a:hover { 20 | text-decoration: underline; 21 | } 22 | 23 | img { 24 | width: 100%; 25 | } 26 | 27 | h1 strong, h2 strong { 28 | font-family: "Inter", sans-serif;; 29 | font-weight: 600; 30 | letter-spacing: 0.04em; 31 | } 32 | 33 | h1 { 34 | font-family: "Inter", sans-serif; 35 | font-weight: 400; 36 | font-size: 2.3em; 37 | letter-spacing: 0.04em; 38 | margin: 0; 39 | } 40 | 41 | h2 { 42 | font-family: "Inter", sans-serif; 43 | font-weight: 400; 44 | font-size: 2.3em; 45 | letter-spacing: 0.04em; 46 | margin: 0 0 30px 0; 47 | line-height: 1.3em; 48 | } 49 | 50 | h3 { 51 | font-family: "Inter", sans-serif; 52 | font-weight: 400; 53 | font-size: 1.5em; 54 | letter-spacing: 0.04em; 55 | margin: 20px 0 10px 0; 56 | line-height: 1.3em; 57 | } 58 | 59 | 60 | p, address { 61 | font-family: 'Work Sans', sans-serif; 62 | font-size: 1.1em; 63 | color: #111111; 64 | margin-bottom: 20px; 65 | font-weight: 400; 66 | letter-spacing: 0.02em; 67 | line-height: 1.5em; 68 | } 69 | 70 | code { 71 | padding: 2px 4px; 72 | font-size: 90%; 73 | color: #002fa7; 74 | background-color: #f9f2f4; 75 | border-radius: 4px; 76 | } -------------------------------------------------------------------------------- /_sass/footer.scss: -------------------------------------------------------------------------------- 1 | .footer-links { 2 | width: 100%; 3 | margin: 10px; 4 | padding: 0; 5 | 6 | @media #{$tablet} { 7 | -webkit-flex: 1 0 180px; 8 | flex: 1 0 180px; 9 | } 10 | 11 | li { 12 | list-style: none; 13 | margin: 15px auto; 14 | 15 | @media #{$tablet} { 16 | max-width: 150px; 17 | } 18 | a { 19 | 20 | &:hover { 21 | text-decoration: none; 22 | } 23 | svg { 24 | fill: #999; 25 | margin-right: 10px; 26 | transition: fill 0.2s ease; 27 | vertical-align: middle; 28 | position: relative; 29 | top: -2px; 30 | width: 22px; 31 | height: 22px; 32 | } 33 | 34 | &:hover svg { 35 | fill: #002fa7; 36 | 37 | } 38 | } 39 | } 40 | } 41 | 42 | footer { 43 | padding: 50px 0 50px 0; 44 | font-size: 0.9em; 45 | position: relative; 46 | background: #BBBCBC; 47 | color: #111111; 48 | 49 | .copyright { 50 | font-size: .8em; 51 | margin: 0 auto; 52 | color: #111111; 53 | 54 | @media #{$tablet} { 55 | text-align: center; 56 | } 57 | 58 | } 59 | 60 | &, 61 | a { 62 | font-family: 'Work Sans', sans-serif; 63 | color: #111111; 64 | font-weight: normal; 65 | font-size: 0.9m; 66 | } 67 | 68 | h2 { 69 | font-size: 1.4em; 70 | margin: 30px 0; 71 | color: #ccc; 72 | } 73 | 74 | .footer-columns { 75 | @extend %flexbox; 76 | @include flex-flow(wrap); 77 | margin: -10px -10px 10px -10px; 78 | } 79 | 80 | a { 81 | text-decoration: underline; 82 | 83 | &:hover { 84 | color: #002fa7; 85 | } 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /_sass/forms.scss: -------------------------------------------------------------------------------- 1 | .button a, input[type=submit] { 2 | font-family: 'Work Sans', sans-serif; 3 | color: #000000; 4 | text-decoration: underline; 5 | padding: 10px 30px; 6 | background: $brand-color; 7 | border-radius: 2px; 8 | transition: .2s ease-in-out; 9 | } 10 | 11 | .button a:hover, input[type=submit]:hover { 12 | border: 1px solid #002fa7; 13 | background: $secondary-brand-color; 14 | cursor: pointer; 15 | } 16 | 17 | .button.alt a { 18 | background: #BBBCBC; 19 | border-radius: 3px; 20 | border: 1px solid rgba(255, 255, 255, 0.3); 21 | padding: 16px 50px; 22 | } 23 | 24 | .button.alt a:hover { 25 | background: #002fa7; 26 | color: #ffffff; 27 | } 28 | 29 | textarea, input, button, select { font-family: inherit; font-size: inherit; } 30 | 31 | input[type=submit] { 32 | margin: 20px 0 0 0; 33 | } 34 | 35 | label, input, textarea { 36 | display: block; 37 | width: 100%; 38 | box-sizing: border-box; 39 | } 40 | 41 | textarea { 42 | resize: vertical; 43 | height: 150px; 44 | } 45 | 46 | label { 47 | margin: 20px 0 5px 0; 48 | } 49 | 50 | input, textarea { 51 | padding: 10px; 52 | font-size: 1em; 53 | } 54 | 55 | input, textarea { 56 | -webkit-transition: all 0.30s ease-in-out; 57 | -moz-transition: all 0.30s ease-in-out; 58 | -ms-transition: all 0.30s ease-in-out; 59 | -o-transition: all 0.30s ease-in-out; 60 | outline: none; 61 | border: 1px solid #DDDDDD; 62 | } 63 | 64 | input[type=text]:focus, input[type=email]:focus, input[type=password]:focus, textarea:focus { 65 | box-shadow: 0 0 5px rgba(81, 203, 238, 1); 66 | border: 1px solid rgba(81, 203, 238, 1); 67 | } -------------------------------------------------------------------------------- /_sass/landing-page.scss: -------------------------------------------------------------------------------- 1 | .hero { 2 | color: #2b2b2b; 3 | text-align: left; 4 | background: #EFEFEF; 5 | padding-top: 50px 0; 6 | 7 | p { 8 | color: #2B2B2B; 9 | } 10 | } 11 | 12 | @media #{$desktop} { 13 | .flex { 14 | @include flexbox; 15 | align-items: center; 16 | flex-direction: row; 17 | 18 | .text, .image { 19 | -webkit-flex: 1; 20 | flex: 1; 21 | padding: 0 20px; 22 | } 23 | } 24 | 25 | .content section:nth-child(even) .flex { 26 | flex-direction: row-reverse; 27 | } 28 | } 29 | 30 | .highlight-section { 31 | background: #efefef; 32 | color: #111111; 33 | text-align: right; 34 | margin: 0; 35 | padding: 100px 0; 36 | 37 | h2 { 38 | margin-bottom: 50px; 39 | font-weight: normal; 40 | } 41 | } 42 | 43 | .highlight-section-blue{ 44 | background: #002fa7; 45 | color: #ffffff; 46 | text-align: left; 47 | margin: 0; 48 | padding: 100px 0; 49 | 50 | a { 51 | color: #C4C4C4; 52 | text-decoration: underline; 53 | } 54 | 55 | a:hover { 56 | text-decoration: underline; 57 | color: #ffffff; 58 | } 59 | 60 | p { 61 | color: #ffffff; 62 | } 63 | } 64 | 65 | .highlight-section-left { 66 | background: #ffffff; 67 | color: #111111; 68 | text-align: left; 69 | margin: 0; 70 | padding: 100px 0; 71 | } 72 | 73 | .playground { 74 | text-align: left; 75 | color: #111111; 76 | background: #ffffff; 77 | margin: 0; 78 | padding: 100px 0; 79 | } 80 | -------------------------------------------------------------------------------- /_sass/layout.scss: -------------------------------------------------------------------------------- 1 | .content { 2 | background: #ffffff; 3 | padding: 1px 0 0 0; 4 | position: relative; 5 | } 6 | 7 | .content-dark { 8 | background: #efefef; 9 | padding: 1px 0 0 0; 10 | position: relative; 11 | } 12 | 13 | .container, .text-container { 14 | margin: 0 auto; 15 | position: relative; 16 | padding: 0 20px; 17 | } 18 | 19 | .text-container { 20 | max-width: 750px; 21 | } 22 | 23 | .container { 24 | max-width: 1140px; 25 | 26 | &.max-container { 27 | max-width: 100%; 28 | padding: 0; 29 | } 30 | } 31 | 32 | header { 33 | color: #fff; 34 | padding: 20px 0; 35 | background: $brand-color; 36 | 37 | a { 38 | color: #fff; 39 | text-decoration: none; 40 | z-index: 1; 41 | position: relative; 42 | 43 | &:hover { 44 | text-decoration: none; 45 | } 46 | } 47 | 48 | .company-name { 49 | font-size: 1.7em; 50 | line-height: 0; 51 | 52 | a { 53 | display: inline-block; 54 | } 55 | 56 | img { 57 | display: block; 58 | width: auto; 59 | } 60 | } 61 | } 62 | 63 | .hero-image{ 64 | max-width: 100%; 65 | height: auto; 66 | display: block; 67 | border-radius: 2px; 68 | margin-left: auto; 69 | margin-right: auto; 70 | background: #EFEFEF; 71 | padding: 20px 0 0 0; 72 | position: relative; 73 | } 74 | 75 | .image{ 76 | max-width: 50%; 77 | height: auto; 78 | display: block; 79 | border-radius: 0px; 80 | margin-left: auto; 81 | margin-right: auto; 82 | background: #EFEFEF; 83 | position: relative; 84 | } 85 | 86 | .small-image{ 87 | max-width: 20%; 88 | height: auto; 89 | display: block; 90 | border-radius: 2px; 91 | margin-left: auto; 92 | margin-right: auto; 93 | background: #FFFFFF; 94 | position: relative; 95 | } 96 | 97 | .video_wrapper { 98 | position: relative; 99 | padding-bottom: 56.25%; 100 | padding-top: 25px; 101 | height: 0; 102 | } 103 | 104 | .video_wrapper iframe { 105 | position: absolute; 106 | top: 0; 107 | left: 0; 108 | width: 100%; 109 | height: 100%; 110 | } 111 | 112 | section { 113 | padding: 100px 0; 114 | } 115 | 116 | section + section { 117 | padding-top: 0; 118 | } 119 | 120 | .subtext { 121 | margin-top: 10px; 122 | text-align: center; 123 | } 124 | 125 | 126 | .cta { 127 | margin: 60px 0; 128 | } 129 | 130 | .page { 131 | margin-bottom: 0; 132 | padding-bottom: 80px; 133 | } 134 | 135 | .center-text { 136 | text-align: center; 137 | } -------------------------------------------------------------------------------- /_sass/mixins/columns.scss: -------------------------------------------------------------------------------- 1 | @mixin columns($value) { 2 | columns: $value; 3 | -webkit-columns: $value; 4 | -moz-columns: $value; 5 | } 6 | -------------------------------------------------------------------------------- /_sass/mixins/flexbox.scss: -------------------------------------------------------------------------------- 1 | // Flexbox Mixins 2 | // http://philipwalton.github.io/solved-by-flexbox/ 3 | // https://github.com/philipwalton/solved-by-flexbox 4 | // 5 | // Copyright (c) 2013 Brian Franco 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a 8 | // copy of this software and associated documentation files (the 9 | // "Software"), to deal in the Software without restriction, including 10 | // without limitation the rights to use, copy, modify, merge, publish, 11 | // distribute, sublicense, and/or sell copies of the Software, and to 12 | // permit persons to whom the Software is furnished to do so, subject to 13 | // the following conditions: 14 | // The above copyright notice and this permission notice shall be included 15 | // in all copies or substantial portions of the Software. 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | // 24 | // This is a set of mixins for those who want to mess around with flexbox 25 | // using the native support of current browsers. For full support table 26 | // check: http://caniuse.com/flexbox 27 | // 28 | // Basically this will use: 29 | // 30 | // * Fallback, old syntax (IE10, mobile webkit browsers - no wrapping) 31 | // * Final standards syntax (FF, Safari, Chrome, IE11, Opera) 32 | // 33 | // This was inspired by: 34 | // 35 | // * http://dev.opera.com/articles/view/advanced-cross-browser-flexbox/ 36 | // 37 | // With help from: 38 | // 39 | // * http://w3.org/tr/css3-flexbox/ 40 | // * http://the-echoplex.net/flexyboxes/ 41 | // * http://msdn.microsoft.com/en-us/library/ie/hh772069(v=vs.85).aspx 42 | // * http://css-tricks.com/using-flexbox/ 43 | // * http://dev.opera.com/articles/view/advanced-cross-browser-flexbox/ 44 | // * https://developer.mozilla.org/en-us/docs/web/guide/css/flexible_boxes 45 | 46 | //---------------------------------------------------------------------- 47 | 48 | // Flexbox Containers 49 | // 50 | // The 'flex' value causes an element to generate a block-level flex 51 | // container box. 52 | // 53 | // The 'inline-flex' value causes an element to generate a inline-level 54 | // flex container box. 55 | // 56 | // display: flex | inline-flex 57 | // 58 | // http://w3.org/tr/css3-flexbox/#flex-containers 59 | // 60 | // (Placeholder selectors for each type, for those who rather @extend) 61 | 62 | @mixin flexbox { 63 | display: -webkit-box; 64 | display: -webkit-flex; 65 | display: -moz-flex; 66 | display: -ms-flexbox; 67 | display: flex; 68 | } 69 | 70 | %flexbox { @include flexbox; } 71 | 72 | //---------------------------------- 73 | 74 | @mixin inline-flex { 75 | display: -webkit-inline-box; 76 | display: -webkit-inline-flex; 77 | display: -moz-inline-flex; 78 | display: -ms-inline-flexbox; 79 | display: inline-flex; 80 | } 81 | 82 | %inline-flex { @include inline-flex; } 83 | 84 | //---------------------------------------------------------------------- 85 | 86 | // Flexbox Direction 87 | // 88 | // The 'flex-direction' property specifies how flex items are placed in 89 | // the flex container, by setting the direction of the flex container's 90 | // main axis. This determines the direction that flex items are laid out in. 91 | // 92 | // Values: row | row-reverse | column | column-reverse 93 | // Default: row 94 | // 95 | // http://w3.org/tr/css3-flexbox/#flex-direction-property 96 | 97 | @mixin flex-direction($value: row) { 98 | @if $value == row-reverse { 99 | -webkit-box-direction: reverse; 100 | -webkit-box-orient: horizontal; 101 | } @else if $value == column { 102 | -webkit-box-direction: normal; 103 | -webkit-box-orient: vertical; 104 | } @else if $value == column-reverse { 105 | -webkit-box-direction: reverse; 106 | -webkit-box-orient: vertical; 107 | } @else { 108 | -webkit-box-direction: normal; 109 | -webkit-box-orient: horizontal; 110 | } 111 | -webkit-flex-direction: $value; 112 | -moz-flex-direction: $value; 113 | -ms-flex-direction: $value; 114 | flex-direction: $value; 115 | } 116 | // Shorter version: 117 | @mixin flex-dir($args...) { @include flex-direction($args...); } 118 | 119 | //---------------------------------------------------------------------- 120 | 121 | // Flexbox Wrap 122 | // 123 | // The 'flex-wrap' property controls whether the flex container is single-line 124 | // or multi-line, and the direction of the cross-axis, which determines 125 | // the direction new lines are stacked in. 126 | // 127 | // Values: nowrap | wrap | wrap-reverse 128 | // Default: nowrap 129 | // 130 | // http://w3.org/tr/css3-flexbox/#flex-wrap-property 131 | 132 | @mixin flex-wrap($value: nowrap) { 133 | // No Webkit Box fallback. 134 | -webkit-flex-wrap: $value; 135 | -moz-flex-wrap: $value; 136 | @if $value == nowrap { 137 | -ms-flex-wrap: none; 138 | } @else { 139 | -ms-flex-wrap: $value; 140 | } 141 | flex-wrap: $value; 142 | } 143 | 144 | //---------------------------------------------------------------------- 145 | 146 | // Flexbox Flow (shorthand) 147 | // 148 | // The 'flex-flow' property is a shorthand for setting the 'flex-direction' 149 | // and 'flex-wrap' properties, which together define the flex container's 150 | // main and cross axes. 151 | // 152 | // Values: | 153 | // Default: row nowrap 154 | // 155 | // http://w3.org/tr/css3-flexbox/#flex-flow-property 156 | 157 | @mixin flex-flow($values: (row nowrap)) { 158 | // No Webkit Box fallback. 159 | -webkit-flex-flow: $values; 160 | -moz-flex-flow: $values; 161 | -ms-flex-flow: $values; 162 | flex-flow: $values; 163 | } 164 | 165 | //---------------------------------------------------------------------- 166 | 167 | // Flexbox Order 168 | // 169 | // The 'order' property controls the order in which flex items appear within 170 | // their flex container, by assigning them to ordinal groups. 171 | // 172 | // Default: 0 173 | // 174 | // http://w3.org/tr/css3-flexbox/#order-property 175 | 176 | @mixin order($int: 0) { 177 | -webkit-box-ordinal-group: $int + 1; 178 | -webkit-order: $int; 179 | -moz-order: $int; 180 | -ms-flex-order: $int; 181 | order: $int; 182 | } 183 | 184 | //---------------------------------------------------------------------- 185 | 186 | // Flexbox Grow 187 | // 188 | // The 'flex-grow' property sets the flex grow factor. Negative numbers 189 | // are invalid. 190 | // 191 | // Default: 0 192 | // 193 | // http://w3.org/tr/css3-flexbox/#flex-grow-property 194 | 195 | @mixin flex-grow($int: 0) { 196 | -webkit-box-flex: $int; 197 | -webkit-flex-grow: $int; 198 | -moz-flex-grow: $int; 199 | -ms-flex-positive: $int; 200 | flex-grow: $int; 201 | } 202 | 203 | //---------------------------------------------------------------------- 204 | 205 | // Flexbox Shrink 206 | // 207 | // The 'flex-shrink' property sets the flex shrink factor. Negative numbers 208 | // are invalid. 209 | // 210 | // Default: 1 211 | // 212 | // http://w3.org/tr/css3-flexbox/#flex-shrink-property 213 | 214 | @mixin flex-shrink($int: 1) { 215 | -webkit-flex-shrink: $int; 216 | -moz-flex-shrink: $int; 217 | -ms-flex-negative: $int; 218 | flex-shrink: $int; 219 | } 220 | 221 | //---------------------------------------------------------------------- 222 | 223 | // Flexbox Basis 224 | // 225 | // The 'flex-basis' property sets the flex basis. Negative lengths are invalid. 226 | // 227 | // Values: Like "width" 228 | // Default: auto 229 | // 230 | // http://www.w3.org/TR/css3-flexbox/#flex-basis-property 231 | 232 | @mixin flex-basis($value: auto) { 233 | -webkit-flex-basis: $value; 234 | -moz-flex-basis: $value; 235 | -ms-flex-preferred-size: $value; 236 | flex-basis: $value; 237 | } 238 | 239 | //---------------------------------------------------------------------- 240 | 241 | // Flexbox "Flex" (shorthand) 242 | // 243 | // The 'flex' property specifies the components of a flexible length: the 244 | // flex grow factor and flex shrink factor, and the flex basis. When an 245 | // element is a flex item, 'flex' is consulted instead of the main size 246 | // property to determine the main size of the element. If an element is 247 | // not a flex item, 'flex' has no effect. 248 | // 249 | // Values: none | || 250 | // Default: See individual properties (1 1 0). 251 | // 252 | // http://w3.org/tr/css3-flexbox/#flex-property 253 | 254 | @mixin flex($fg: 1, $fs: null, $fb: null) { 255 | 256 | // Set a variable to be used by box-flex properties 257 | $fg-boxflex: $fg; 258 | 259 | // Box-Flex only supports a flex-grow value so let's grab the 260 | // first item in the list and just return that. 261 | @if type-of($fg) == 'list' { 262 | $fg-boxflex: nth($fg, 1); 263 | } 264 | 265 | -webkit-box-flex: $fg-boxflex; 266 | -webkit-flex: $fg $fs $fb; 267 | -moz-box-flex: $fg-boxflex; 268 | -moz-flex: $fg $fs $fb; 269 | -ms-flex: $fg $fs $fb; 270 | flex: $fg $fs $fb; 271 | } 272 | 273 | //---------------------------------------------------------------------- 274 | 275 | // Flexbox Justify Content 276 | // 277 | // The 'justify-content' property aligns flex items along the main axis 278 | // of the current line of the flex container. This is done after any flexible 279 | // lengths and any auto margins have been resolved. Typically it helps distribute 280 | // extra free space leftover when either all the flex items on a line are 281 | // inflexible, or are flexible but have reached their maximum size. It also 282 | // exerts some control over the alignment of items when they overflow the line. 283 | // 284 | // Note: 'space-*' values not supported in older syntaxes. 285 | // 286 | // Values: flex-start | flex-end | center | space-between | space-around 287 | // Default: flex-start 288 | // 289 | // http://w3.org/tr/css3-flexbox/#justify-content-property 290 | 291 | @mixin justify-content($value: flex-start) { 292 | @if $value == flex-start { 293 | -webkit-box-pack: start; 294 | -ms-flex-pack: start; 295 | } @else if $value == flex-end { 296 | -webkit-box-pack: end; 297 | -ms-flex-pack: end; 298 | } @else if $value == space-between { 299 | -webkit-box-pack: justify; 300 | -ms-flex-pack: justify; 301 | } @else if $value == space-around { 302 | -ms-flex-pack: distribute; 303 | } @else { 304 | -webkit-box-pack: $value; 305 | -ms-flex-pack: $value; 306 | } 307 | -webkit-justify-content: $value; 308 | -moz-justify-content: $value; 309 | justify-content: $value; 310 | } 311 | // Shorter version: 312 | @mixin flex-just($args...) { @include justify-content($args...); } 313 | 314 | //---------------------------------------------------------------------- 315 | 316 | // Flexbox Align Items 317 | // 318 | // Flex items can be aligned in the cross axis of the current line of the 319 | // flex container, similar to 'justify-content' but in the perpendicular 320 | // direction. 'align-items' sets the default alignment for all of the flex 321 | // container's items, including anonymous flex items. 'align-self' allows 322 | // this default alignment to be overridden for individual flex items. (For 323 | // anonymous flex items, 'align-self' always matches the value of 'align-items' 324 | // on their associated flex container.) 325 | // 326 | // Values: flex-start | flex-end | center | baseline | stretch 327 | // Default: stretch 328 | // 329 | // http://w3.org/tr/css3-flexbox/#align-items-property 330 | 331 | @mixin align-items($value: stretch) { 332 | @if $value == flex-start { 333 | -webkit-box-align: start; 334 | -ms-flex-align: start; 335 | } @else if $value == flex-end { 336 | -webkit-box-align: end; 337 | -ms-flex-align: end; 338 | } @else { 339 | -webkit-box-align: $value; 340 | -ms-flex-align: $value; 341 | } 342 | -webkit-align-items: $value; 343 | -moz-align-items: $value; 344 | align-items: $value; 345 | } 346 | 347 | //---------------------------------- 348 | 349 | // Flexbox Align Self 350 | // 351 | // Values: auto | flex-start | flex-end | center | baseline | stretch 352 | // Default: auto 353 | 354 | @mixin align-self($value: auto) { 355 | // No Webkit Box Fallback. 356 | -webkit-align-self: $value; 357 | -moz-align-self: $value; 358 | @if $value == flex-start { 359 | -ms-flex-item-align: start; 360 | } @else if $value == flex-end { 361 | -ms-flex-item-align: end; 362 | } @else { 363 | -ms-flex-item-align: $value; 364 | } 365 | align-self: $value; 366 | } 367 | 368 | //---------------------------------------------------------------------- 369 | 370 | // Flexbox Align Content 371 | // 372 | // The 'align-content' property aligns a flex container's lines within the 373 | // flex container when there is extra space in the cross-axis, similar to 374 | // how 'justify-content' aligns individual items within the main-axis. Note, 375 | // this property has no effect when the flexbox has only a single line. 376 | // 377 | // Values: flex-start | flex-end | center | space-between | space-around | stretch 378 | // Default: stretch 379 | // 380 | // http://w3.org/tr/css3-flexbox/#align-content-property 381 | 382 | @mixin align-content($value: stretch) { 383 | // No Webkit Box Fallback. 384 | -webkit-align-content: $value; 385 | -moz-align-content: $value; 386 | @if $value == flex-start { 387 | -ms-flex-line-pack: start; 388 | } @else if $value == flex-end { 389 | -ms-flex-line-pack: end; 390 | } @else { 391 | -ms-flex-line-pack: $value; 392 | } 393 | align-content: $value; 394 | } 395 | -------------------------------------------------------------------------------- /_sass/navigation.scss: -------------------------------------------------------------------------------- 1 | .nav-open nav { 2 | border-bottom: 1px dotted rgba(255, 255, 255, .2); 3 | padding: 10px 0; 4 | a { 5 | display: block; 6 | } 7 | 8 | @media #{$mid-point} { 9 | border: 0; 10 | padding: 0 20px; 11 | 12 | a { 13 | display: inline; 14 | } 15 | } 16 | } 17 | 18 | nav { 19 | text-transform: lowercase; 20 | font-size: 0.9em; 21 | font-weight: 400; 22 | width: 100%; 23 | 24 | @media #{$mid-point} { 25 | text-align: right; 26 | position: absolute; 27 | top: 13px; 28 | right: 0; 29 | padding: 0 20px; 30 | } 31 | 32 | 33 | a { 34 | font-family: 'Work Sans', sans-serif; 35 | margin: 0 6px; 36 | padding: 20px 10px; 37 | border-bottom: 1px solid rgba(255,255,255,0); 38 | color: #2b2b2b; 39 | transition: .2s ease-in-out; 40 | display: none; 41 | 42 | @media #{$mid-point} { 43 | display: inline; 44 | padding: 10px; 45 | } 46 | 47 | 48 | &.nav-toggle { 49 | display: inline; 50 | position: absolute; 51 | right: 10px; 52 | top: -22px; 53 | font-size: 1.9em; 54 | border: 0; 55 | 56 | @media #{$mid-point} { 57 | display: none; 58 | } 59 | 60 | &:hover { 61 | border: 0; 62 | } 63 | } 64 | } 65 | 66 | a:hover { 67 | 68 | border-bottom: 1px solid #002fa7; 69 | color: #111111; 70 | font-weight: normal; 71 | } 72 | 73 | @media #{$mid-point} { 74 | a.highlight { 75 | border: 1px #002fa7 solid; 76 | border-radius: 5px; 77 | 78 | &:hover { 79 | background: #002fa7; 80 | color: #ffffff; 81 | } 82 | } 83 | } 84 | 85 | a.active { 86 | color: #002fa7; 87 | } 88 | 89 | } 90 | -------------------------------------------------------------------------------- /_sass/variables.scss: -------------------------------------------------------------------------------- 1 | $brand-color: #E5E5E5; 2 | $secondary-brand-color: #C4C4C4; 3 | 4 | // Breakpoints 5 | $tablet: "(min-width: 450px)"; 6 | $mid-point: "(min-width: 620px)"; 7 | $desktop: "(min-width: 768px)"; 8 | -------------------------------------------------------------------------------- /about.html: -------------------------------------------------------------------------------- 1 | --- 2 | title: About Solidity 3 | --- 4 | 5 | 6 | 7 | 8 |
    9 |
    10 |
    11 |

    Solidity is a statically-typed curly-braces programming language designed for developing smart contracts that run on the Ethereum Virtual Machine.

    12 |

    Smart contracts are programs that are executed inside a peer-to-peer network where nobody has special authority over the execution, and thus they allow to implement tokens of value, ownership, voting and other kinds of logics. Note that when deploying contracts, you should use the latest released version of Solidity. This is because breaking changes as well as new features and bug fixes are introduced regularly.

    13 |

    Currently, 0.x version numbers are being used to indicate the fast pace of change.

    14 |

    Solidity was publicly previewed for the first time in November 2014 at Devcon0. Solidity v0.1.0 turned 5 years old on July 8th 2020. You can read more about Solidity's history here.

    15 |

    The Solidity programming language is an open-source, community project 16 | governed by a core team. The core team is sponsored by the Ethereum Foundation.

    17 |
    18 |
    19 |
    -------------------------------------------------------------------------------- /compiler.js: -------------------------------------------------------------------------------- 1 | let examples = new Map(); 2 | 3 | examples["helloWorld"] = `// SPDX-License-Identifier: MIT 4 | pragma solidity ^0.8.0; 5 | contract MyContract { 6 | function helloWorld() public pure returns (string memory) { 7 | return "Hello, World!"; 8 | } 9 | }`; 10 | 11 | examples["erc20"] = `// SPDX-License-Identifier: MIT 12 | pragma solidity ^0.8.0; 13 | contract ERC20 { 14 | string public constant name = "ERC20"; 15 | string public constant symbol = "ERC"; 16 | uint8 public constant decimals = 18; 17 | 18 | mapping(address => uint256) balances; 19 | 20 | event Transfer(address indexed from, address indexed to, uint256 tokens); 21 | 22 | uint256 public immutable totalSupply; 23 | 24 | constructor(uint256 total) { 25 | totalSupply = total; 26 | balances[msg.sender] = total; 27 | } 28 | 29 | function balanceOf(address tokenOwner) public view returns (uint256) { 30 | return balances[tokenOwner]; 31 | } 32 | 33 | function transfer(address receiver, uint256 numTokens) public returns (bool) { 34 | require(balances[msg.sender] >= numTokens); 35 | balances[msg.sender] = balances[msg.sender] - numTokens; 36 | balances[receiver] = balances[receiver] + numTokens; 37 | emit Transfer(msg.sender, receiver, numTokens); 38 | return true; 39 | } 40 | 41 | function transferFrom(address owner, address buyer, uint256 numTokens) public returns (bool) { 42 | require(balances[owner] >= numTokens); 43 | balances[owner] = balances[owner] - numTokens; 44 | balances[buyer] = balances[buyer] + numTokens; 45 | emit Transfer(owner, buyer, numTokens); 46 | return true; 47 | } 48 | }`; 49 | 50 | examples["simpleAuction"] = `// SPDX-License-Identifier: GPL-3.0 51 | pragma solidity >=0.7.0 <0.9.0; 52 | contract SimpleAuction { 53 | // Parameters of the auction. Times are either 54 | // absolute unix timestamps (seconds since 1970-01-01) 55 | // or time periods in seconds. 56 | address payable public beneficiary; 57 | uint public auctionEndTime; 58 | 59 | // Current state of the auction. 60 | address public highestBidder; 61 | uint public highestBid; 62 | 63 | // Allowed withdrawals of previous bids 64 | mapping(address => uint) pendingReturns; 65 | 66 | // Set to true at the end, disallows any change. 67 | // By default initialized to \`false\`. 68 | bool ended; 69 | 70 | // Events that will be emitted on changes. 71 | event HighestBidIncreased(address bidder, uint amount); 72 | event AuctionEnded(address winner, uint amount); 73 | 74 | // The following is a so-called natspec comment, 75 | // recognizable by the three slashes. 76 | // It will be shown when the user is asked to 77 | // confirm a transaction. 78 | 79 | /// Create a simple auction with \`_biddingTime\` 80 | /// seconds bidding time on behalf of the 81 | /// beneficiary address \`_beneficiary\`. 82 | constructor( 83 | uint _biddingTime, 84 | address payable _beneficiary 85 | ) { 86 | beneficiary = _beneficiary; 87 | auctionEndTime = block.timestamp + _biddingTime; 88 | } 89 | 90 | /// Bid on the auction with the value sent 91 | /// together with this transaction. 92 | /// The value will only be refunded if the 93 | /// auction is not won. 94 | function bid() public payable { 95 | // No arguments are necessary, all 96 | // information is already part of 97 | // the transaction. The keyword payable 98 | // is required for the function to 99 | // be able to receive Ether. 100 | 101 | // Revert the call if the bidding 102 | // period is over. 103 | require( 104 | block.timestamp <= auctionEndTime, 105 | "Auction already ended." 106 | ); 107 | 108 | // If the bid is not higher, send the 109 | // money back (the failing require 110 | // will revert all changes in this 111 | // function execution including 112 | // it having received the money). 113 | require( 114 | msg.value > highestBid, 115 | "There already is a higher bid." 116 | ); 117 | 118 | if (highestBid != 0) { 119 | // Sending back the money by simply using 120 | // highestBidder.send(highestBid) is a security risk 121 | // because it could execute an untrusted contract. 122 | // It is always safer to let the recipients 123 | // withdraw their money themselves. 124 | pendingReturns[highestBidder] += highestBid; 125 | } 126 | highestBidder = msg.sender; 127 | highestBid = msg.value; 128 | emit HighestBidIncreased(msg.sender, msg.value); 129 | } 130 | 131 | /// Withdraw a bid that was overbid. 132 | function withdraw() public returns (bool) { 133 | uint amount = pendingReturns[msg.sender]; 134 | if (amount > 0) { 135 | // It is important to set this to zero because the recipient 136 | // can call this function again as part of the receiving call 137 | // before \`send\` returns. 138 | pendingReturns[msg.sender] = 0; 139 | 140 | if (!payable(msg.sender).send(amount)) { 141 | // No need to call throw here, just reset the amount owing 142 | pendingReturns[msg.sender] = amount; 143 | return false; 144 | } 145 | } 146 | return true; 147 | } 148 | 149 | /// End the auction and send the highest bid 150 | /// to the beneficiary. 151 | function auctionEnd() public { 152 | // It is a good guideline to structure functions that interact 153 | // with other contracts (i.e. they call functions or send Ether) 154 | // into three phases: 155 | // 1. checking conditions 156 | // 2. performing actions (potentially changing conditions) 157 | // 3. interacting with other contracts 158 | // If these phases are mixed up, the other contract could call 159 | // back into the current contract and modify the state or cause 160 | // effects (ether payout) to be performed multiple times. 161 | // If functions called internally include interaction with external 162 | // contracts, they also have to be considered interaction with 163 | // external contracts. 164 | 165 | // 1. Conditions 166 | require(block.timestamp >= auctionEndTime, "Auction not yet ended."); 167 | require(!ended, "auctionEnd has already been called."); 168 | 169 | // 2. Effects 170 | ended = true; 171 | emit AuctionEnded(highestBidder, highestBid); 172 | 173 | // 3. Interaction 174 | beneficiary.transfer(highestBid); 175 | } 176 | }`; 177 | 178 | let worker = new Worker("compiler_worker.js"); 179 | let editor = ace.edit("compilerInput"); 180 | 181 | let compile = () => { 182 | worker.postMessage(JSON.stringify({ 183 | language: "Solidity", 184 | sources: {"": { content: editor.getValue()}}, 185 | settings: { optimizer: { enabled: true }, outputSelection: { "*": {"*": ['evm.bytecode.object', 'evm.gasEstimates', 'evm.assembly']}}} 186 | })); 187 | } 188 | 189 | editor.session.setMode("ace/mode/solidity"); 190 | editor.getSession().setUseWorker(false); 191 | editor.renderer.on('afterRender', compile); 192 | 193 | worker.addEventListener('message', (message) => { 194 | if (message.data.version !== undefined) { 195 | document.getElementById("compiler_version").innerText = message.data.version; 196 | compile(); 197 | } else if (message.data.result !== undefined) { 198 | let result = JSON.parse(message.data.result); 199 | console.log(result); 200 | let errors = document.getElementById('compiler_errors'); 201 | errors.innerHTML = ''; 202 | if (result.errors === undefined) { 203 | errors.innerHTML = ''; 204 | for (contractName in result.contracts['']) { 205 | let contract = result.contracts[''][contractName]; 206 | errors.innerHTML += '' + contractName + ' (' + contract.evm.bytecode.object.length / 2 + ' bytes)
    '; 207 | errors.innerHTML += 'Deployment costs: ' + contract.evm.gasEstimates.creation.totalCost + ' gas.
    '; 208 | errors.innerHTML += 'Bytecode:'; 209 | errors.innerHTML += 'Assembly:'; 210 | } 211 | } else { 212 | for (error of result.errors) { 213 | errors.innerHTML += '

    Errors:

    ' + error.formattedMessage + '
    '; 214 | } 215 | } 216 | } 217 | }); 218 | 219 | let dropDownList = document.getElementById("selectedContract"); 220 | function selectionChanged() { 221 | editor.setValue(examples[dropDownList.options[dropDownList.selectedIndex].id], 1); 222 | } 223 | selectionChanged(); 224 | dropDownList.addEventListener('change', selectionChanged); -------------------------------------------------------------------------------- /compiler_worker.js: -------------------------------------------------------------------------------- 1 | importScripts(['https://solc-bin.ethereum.org/emscripten-wasm32/solc-emscripten-wasm32-latest.js']) 2 | 3 | let version = Module.cwrap('solidity_version', 'string', []); 4 | postMessage({version: version()}); 5 | let compile = Module.cwrap('solidity_compile', 'string', ['string', 'number', 'number']); 6 | 7 | addEventListener('message', (event) => { 8 | postMessage({result: compile(event.data, 0, 0)}) 9 | }) 10 | -------------------------------------------------------------------------------- /css/screen.scss: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | @import "mixins/flexbox"; 4 | @import "mixins/columns"; 5 | @import "variables"; 6 | @import "elements"; 7 | @import "landing-page"; 8 | @import "layout"; 9 | @import "forms"; 10 | @import "navigation"; 11 | @import "footer"; -------------------------------------------------------------------------------- /favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethereum/solidity-portal/8c7b481c65a12dd218bf1a9a3a879f5380c7c0a9/favicon.png -------------------------------------------------------------------------------- /images/SolBlue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethereum/solidity-portal/8c7b481c65a12dd218bf1a9a3a879f5380c7c0a9/images/SolBlue.png -------------------------------------------------------------------------------- /images/SolBlueGradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethereum/solidity-portal/8c7b481c65a12dd218bf1a9a3a879f5380c7c0a9/images/SolBlueGradient.png -------------------------------------------------------------------------------- /images/SolBlueHeader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethereum/solidity-portal/8c7b481c65a12dd218bf1a9a3a879f5380c7c0a9/images/SolBlueHeader.png -------------------------------------------------------------------------------- /images/SolBlueLines.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethereum/solidity-portal/8c7b481c65a12dd218bf1a9a3a879f5380c7c0a9/images/SolBlueLines.png -------------------------------------------------------------------------------- /images/SolGray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethereum/solidity-portal/8c7b481c65a12dd218bf1a9a3a879f5380c7c0a9/images/SolGray.png -------------------------------------------------------------------------------- /images/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | --- 2 | title: Solidity Programming Language 3 | description: Solidity is a statically-typed curly-braces programming language designed for developing smart contracts that run on Ethereum. 4 | --- 5 | 6 | 7 | 8 | 14 | 15 | 16 |
    17 |
    18 | Solidity Hero 19 |
    20 |
    21 | 22 |
    23 |
    24 |
    25 |

    Solidity v0.8.20 is here.

    26 |

    Solidity 0.8.20 includes a range of improvements in the via-IR pipeline and improves the list of events exposed in the contract ABI, and, most importantly, introduces support for the Shanghai hard fork! 27 |

    For all details please refer to the release announcement. We have also included 3 bugfixes in this release!

    28 |
    29 |
    30 |
    31 | 32 |
    33 |
    34 |
    35 |
    36 |

    Solidity is a statically-typed curly-braces programming language designed for developing smart contracts that run on Ethereum.

    37 | 38 |
    39 | Solidity Logo 40 |
    41 |
    42 |
    43 | 44 |
    45 |
    46 |
    47 |

    Solidity is evolving rapidly.

    48 |

    As a relatively young language, Solidity is advancing at a rapid speed. We aim for a regular (non-breaking) release every month, with approximately one breaking release per year. You can follow the implementation status of new features in the Solidity Github project. You can 49 | see the upcoming changes for the next breaking release by switching from the default branch (`develop`) to the `breaking branch`. You can actively shape Solidity by providing your input and participating in the language design.

    50 |
    51 |
    52 |
    53 | 54 |
    55 |
    56 |
    57 |
    58 |

    Stay always up-to-date by following the Solidity blog and the Solidity Twitter.

    59 |

    Recent news include:

    60 |
    69 |
    70 | 71 |
    72 |
    73 |

    Try Solidity here.

    74 |
    75 |
    76 |
    77 | 82 |
    83 |
    84 |
    85 |
    86 |

    Compiler Result

    87 |
    88 |
    89 |
    Compiler version: Loading...
    90 |
    91 |
    92 |
    93 | 94 | 95 | 96 | 97 |
    98 |
    99 | 100 |
    101 |
    102 |
    103 |

    New to Solidity? Getting started is easy.

    104 |

    As a beginner, you find great tutorials, resources and tools that help you get started building with Solidity on the ethereum.org developer portal.

    Alternatively, you can start by learning the basics about blockchain, smart contracts and the Ethereum Virtual Machine (EVM) in the Solidity docs.

    105 |
    106 |
    107 | 108 |
    109 |
    110 |
    111 |
    112 |

    Contribute towards enhancing Solidity by sharing your opinion in the language design discussions!


    113 |

    We welcome Solidity power users, auditors, security experts and tooling developers to 114 | get involved and actively contribute to the Solidity language design process.

    115 |
      116 |
    • Join the Solidity forum, where existing properties of the language and proposals for new language features can be discussed.

    • 117 |
    • Give input by completing (feature) feedback surveys which are regularly distributed via Twitter and the forum.

    • 118 |
    • Join the dedicated language design discussion calls, in which selected topics, issues or feature implementations are debated in detail.

    • 119 |
    • Or share your thoughts and take part in design discussions directly via relevant Github issues.

    • 120 |
    121 |

    For ad-hoc inquiries and questions you can reach out to the core team using the solidity-dev Matrix channel (currently also still available on Gitter), a 122 | dedicated chatroom for conversations around the Solidity compiler and language development.

    123 |
    124 |
    125 |
    126 |
    127 | 128 |
    129 |
    130 |
    131 |

    The Solidity Summit is a free interactive forum for people involved and interested in the Solidity language and the ecosystem around it.

    132 |

    After a first virtual Solidity Summit in 2020, we met in person for the second Solidity Summit in 2022 in Amsterdam.

    133 |

    Solidity Summits usually feature talks & discussions on Solidity, Yul, language design and tooling. The event series aims to...

    134 |
      135 |
    • Enable useful (language-design related) discussions which result in improvement proposals and actual implementations.

    • 136 |
    • Foster communication between teams working on similar topics.

    • 137 |
    • Identify needs for the smart contract ecosystem for Ethereum.

    • 138 |
    139 |

    Useful links from prior Solidity Summits:

    140 |

    🗓️ 2020 Agenda +++ 📺 2020 Talks +++ 📖 2020 Event Recap.

    141 |

    🗓️ 2022 Agenda +++ 📺 2022 Talks +++ 📖 2022 Event Recap.

    142 |
    143 | {% include youtube.html youtube_id="6m5EDuCjxgk?list=PLX8x7Zj6Vezl1lqBgxiQH3TFbRNZza8Fk" %} 144 |
    145 |
    146 | -------------------------------------------------------------------------------- /mode-javascript.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},s.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",r="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+o+")(\\.)(prototype)(\\.)("+o+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:r},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:r},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:r},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/cstyle").CstyleBehaviour,f=e("./folding/cstyle").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start"){if(o=="start"||o=="no_regex")return"";var u=t.match(/^\s*(\/?)\*/);u&&(u[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(l.prototype),t.Mode=l}); 2 | (function() { 3 | ace.require(["ace/mode/javascript"], function(m) { 4 | if (typeof module == "object" && typeof exports == "object" && module) { 5 | module.exports = m; 6 | } 7 | }); 8 | })(); 9 | -------------------------------------------------------------------------------- /mode-solidity.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/mode/solidity_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang").deepCopy,s=e("./text_highlight_rules").TextHighlightRules,o=function(e){var t="byte|int|uint";for(var n=8;n<=256;n+=8)t+="|bytes"+n/8+"|uint"+n+"|int"+n;var r={"variable.language":"this|super",keyword:"as|emit|from|import|returns","keyword.control":"break|continue|do|else|for|if|return|while","keyword.control.deprecated":"throw","keyword.operator":"delete|new","keyword.other.reserved":"abstract|after|alias|apply|auto|case|catch|copyof|default|define|final|immutable|implements|in|inline|let|macro|match|mutable|null|of|override|partial|promise|reference|relocatable|sealed|sizeof|static|supports|switch|try|type|typedef|typeof|unchecked","storage.type":"contract|library|interface|function|constructor|event|modifier|struct|mapping|enum|var|bool|address|"+t,"storage.type.array.dynamic":"bytes|string","storage.modifier.inheritance":"is","storage.modifier.storagelocation":"storage|memory|calldata","storage.modifier.statemutability":"constant|payable|pure|view","storage.modifier.visibility":"private|public|external|internal","storage.modifier.event":"anonymous|indexed","support.function":"addmod|assert|blockhash|ecrecover|gasleft|keccak256|mulmod|require|revert|ripemd160|selfdestruct|sha256","support.function.deprecated":"sha3|suicide","support.variable":"now","constant.language.boolean":"true|false","constant.numeric.other.unit.currency":"wei|szabo|finney|ether","constant.numeric.other.unit.time":"seconds|minutes|hours|days|weeks","constant.numeric.other.unit.time.deprecated":"years"},s=this.createKeywordMapper(r,"identifier"),o=!1,u=function(t){var n=s(t);return o&&"identifier"==n&&(n="variable.parameter"),o=!0,n},a="[a-zA-Z_$][a-zA-Z_$0-9]*\\b|\\$",f="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|.)",l=function(t){return{token:"comment."+t+".doc.documentation.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},c=function(t){return{token:"comment."+t+".doc.documentation.tag",regex:"\\B@(?:author|dev|notice|param|return|title)\\b"}},h=function(e,t){return(e!="start"||t.length)&&t.unshift("function_arguments",e),o=!1,"function_arguments"};this.$rules={start:[{token:"comment.block.doc.documentation",regex:"\\/\\*(?=\\*)",push:"doc_comment"},{token:"comment.line.triple-slash.double-slash.doc.documentation",regex:"\\/\\/\\/",push:"doc_line_comment"},{token:"comment.block",regex:"\\/\\*",push:"comment"},{token:"comment.line.double-slash",regex:"\\/\\/",push:"line_comment"},{token:"text",regex:"\\s+|^$"},{token:"string.quoted.single",regex:"'(?=.)",push:"qstring"},{token:"string.quoted.double",regex:'"(?=.)',push:"qqstring"},{token:"storage.type.reserved",regex:"u?fixed(?:8x[0-8]|16x(?:1[0-6]|[0-9])|24x(?:2[0-4]|1[0-9]|[0-9])|32x(?:3[0-2]|[1-2][0-9]|[0-9])|40x(?:40|[1-3][0-9]|[0-9])|48x(?:4[0-8]|[1-3][0-9]|[0-9])|56x(?:5[0-6]|[1-4][0-9]|[0-9])|64x(?:6[0-4]|[1-5][0-9]|[0-9])|72x(?:7[0-2]|[1-6][0-9]|[0-9])|(?:80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)x(?:80|[1-7][0-9]|[0-9]))?",inheritingStateRuleId:"fixedNumberType"},{token:"keyword.control",regex:/\b_\b/},{token:["string.other.hex","string.other.hex","string.other.hex","string.other.hex","string.other.hex"],regex:/(\b)(hex)(['"])((?:[0-9a-fA-F]{2})*)(\3)/},{token:"constant.numeric.hex",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["keyword","text","keyword","text","constant.other"],regex:"(pragma)(\\s+)(solidity|experimental)(\\s+)([^;]+)"},{token:["keyword","text","identifier","text","keyword","text","identifier"],regex:"(using)(\\s+)("+a+")(\\s+)(for)(\\s+)("+a+"|\\*)"},{token:"support.function.deprecated",regex:/block\s*\.\s*blockhash|\.\s*callcode/},{token:"support.function",regex:/abi\s*\.\s*(?:encodeWithSignature|encodeWithSelector|encodePacked|encode)|\.\s*(?:delegatecall|transfer|call|send)/},{token:"support.variable",regex:/block\s*\.\s*(?:difficulty|timestamp|coinbase|gaslimit|number)|msg\s*\.\s*(?:sender|value|data)|tx\s*\.\s*(?:gasprice|origin)|\.\s*balance/},{token:"support.variable.deprecated",regex:/msg\s*\.\s*gas/},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+a+")(\\s*)(\\()",next:h},{token:["storage.type","text","paren.lparen"],regex:"(function)(\\s*)(\\()",next:h},{token:["keyword","text","paren.lparen"],regex:"(returns)(\\s*)(\\()",next:h},{token:s,regex:a,inheritingStateRuleId:"keywordMapper"},{token:"keyword.operator",regex:/--|\*\*|\+\+|=>|<<|>>|<<=|>>=|&&|\|\||[!&|+\-*\/%~^<>=]=?/},{token:"punctuation.operator",regex:/[?:;]/},{token:"punctuation.operator",regex:/[.,]/,inheritingStateRuleId:"punctuation"},{token:"paren.lparen",regex:/[\[{]/},{token:"paren.lparen",regex:/[(]/,inheritingStateRuleId:"lparen"},{token:"paren.rparen",regex:/[\]}]/},{token:"paren.rparen",regex:/[)]/,inheritingStateRuleId:"rparen"}],comment:[l("block"),{token:"comment.block",regex:"\\*\\/",next:"pop"},{defaultToken:"comment.block",caseInsensitive:!0}],line_comment:[l("line"),{token:"comment.line.double-slash",regex:"$|^",next:"pop"},{defaultToken:"comment.line.double-slash",caseInsensitive:!0}],doc_comment:[l("block"),c("block"),{token:"comment.block.doc.documentation",regex:"\\*\\/",next:"pop"},{defaultToken:"comment.block.doc.documentation",caseInsensitive:!0}],doc_line_comment:[l("line"),c("line"),{token:"comment.line.triple-slash.double-slash.doc.documentation",regex:"$|^",next:"pop"},{defaultToken:"comment.line.triple-slash.double-slash.doc.documentation",caseInsensitive:!0}],qqstring:[{token:"constant.language.escape",regex:f},{token:"string.quoted.double",regex:"\\\\$",next:"qqstring"},{token:"string.quoted.double",regex:'"|$',next:"pop"},{defaultToken:"string.quoted.double"}],qstring:[{token:"constant.language.escape",regex:f},{token:"string.quoted.single",regex:"\\\\$",next:"qstring"},{token:"string.quoted.single",regex:"'|$",next:"pop"},{defaultToken:"string.quoted.single"}]};var p=i(this.$rules.start);p.forEach(function(e,t){if(e.inheritingStateRuleId){switch(e.inheritingStateRuleId){case"keywordMapper":e.token=u;break;case"punctuation":e.onMatch=function(n,r,i){return o=!1,e.token};break;case"lparen":e.next=h;break;case"rparen":e.next="pop";break;case"fixedNumberType":e.onMatch=function(n,r,i){return o=!0,e.token}}delete e.inheritingStateRuleId,delete this.$rules.start[t].inheritingStateRuleId,p[t]=e}},this),this.$rules.function_arguments=p,this.normalizeRules()};r.inherits(o,s),t.SolidityHighlightRules=o}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/solidity",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/solidity_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./solidity_highlight_rules").SolidityHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../range").Range,a=e("../worker/worker_client").WorkerClient,f=e("./behaviour/cstyle").CstyleBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.foldingRules=new l};r.inherits(c,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var u=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc_comment"){if(o=="start")return"";var u=t.match(/^\s*(\/?)\*/);u&&(u[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/solidity"}.call(c.prototype),t.Mode=c}); 2 | (function() { 3 | ace.require(["ace/mode/solidity"], function(m) { 4 | if (typeof module == "object" && typeof exports == "object" && module) { 5 | module.exports = m; 6 | } 7 | }); 8 | })(); 9 | -------------------------------------------------------------------------------- /robots.txt: -------------------------------------------------------------------------------- 1 | --- 2 | layout: null 3 | sitemap: false 4 | --- 5 | User-agent: * 6 | Sitemap: {{ site.url }}/sitemap.xml 7 | -------------------------------------------------------------------------------- /siteicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethereum/solidity-portal/8c7b481c65a12dd218bf1a9a3a879f5380c7c0a9/siteicon.png -------------------------------------------------------------------------------- /touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethereum/solidity-portal/8c7b481c65a12dd218bf1a9a3a879f5380c7c0a9/touch-icon.png --------------------------------------------------------------------------------